/* "Use it as an app" guide (install.js). Uses the color tokens from style.css. */
.install-open { margin: 0 8px 8px; background: rgba(88,101,242,.18); color: var(--strong); border: 1px solid rgba(88,101,242,.5);
  border-radius: 8px; padding: 9px; font-weight: 700; font-size: 14px; flex: none; }
.install { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 16px;
  background: rgba(17,18,20,.72); animation: ifade .2s ease; }
@keyframes ifade { from { opacity: 0; } }
.install-sheet { position: relative; width: 100%; max-width: 440px; max-height: calc(100dvh - 32px); overflow-y: auto;
  background: var(--side); border: 1px solid var(--line); border-radius: 18px; padding: 22px 20px 14px; box-shadow: 0 24px 64px rgba(0,0,0,.6); }
.install-sheet h2 { margin: 10px 0 6px; font-size: 21px; line-height: 1.35; color: var(--strong); }
.isub { margin: 0; color: var(--muted); font-size: 14px; }
.iclose { position: absolute; right: 10px; top: 10px; width: 32px; height: 32px; border: 0; border-radius: 50%; background: var(--hover); color: var(--muted); font-size: 14px; }
.ibadge { display: inline-block; font-size: 12px; font-weight: 700; color: #f0b232; background: rgba(240,178,50,.14); border-radius: 999px; padding: 3px 10px; }
.ibadge.ok { color: #23a55a; background: rgba(35,165,90,.15); }

/* 3-step progress: ブラウザで開く → Xでログイン → ホーム画面に追加 */
.iflow { list-style: none; display: flex; gap: 6px; padding: 0; margin: 16px 0 0; }
.iflow li { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11.5px; color: var(--muted); text-align: center; position: relative; }
.iflow li span { width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: var(--hover); color: var(--muted); font-weight: 800; font-size: 13px; position: relative; z-index: 1; }
.iflow li:not(:last-child)::after { content: ""; position: absolute; top: 13px; left: calc(50% + 18px); right: calc(-50% + 18px); border-top: 2px dashed var(--line); }
.iflow li.now { color: var(--strong); font-weight: 700; }
.iflow li.now span { background: var(--accent); color: #fff; box-shadow: 0 0 0 4px rgba(88,101,242,.25); }
.iflow li.done span { background: #23a55a; color: #fff; }

.ibig { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 18px; width: 100%; border: 0;
  background: var(--accent); color: #fff; font-weight: 800; font-size: 17px; border-radius: 14px; padding: 15px; box-shadow: 0 10px 24px rgba(88,101,242,.35); }
.ibig:hover { text-decoration: none; background: var(--accent-2); }
.ibig .i { display: inline-flex; }
.inote { margin-top: 14px; background: rgba(88,101,242,.12); border: 1px solid rgba(88,101,242,.35); border-radius: 12px; padding: 10px 12px;
  font-size: 13px; color: var(--text); }
.inote b { color: var(--strong); }
.ilogin { display: block; margin-top: 8px; text-align: center; background: var(--strong); color: #000; font-weight: 800; border-radius: 999px; padding: 9px; }
.ilogin:hover { text-decoration: none; }
.ifallback { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
.ifallback summary { cursor: pointer; color: var(--muted); font-size: 13px; font-weight: 700; }
.isteps { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 11px; }
.istep-text { display: flex; gap: 8px; align-items: baseline; font-size: 13.5px; color: var(--text); margin-bottom: 5px; }
.istep-text b { color: var(--strong); }
.istep-text .n { flex: none; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 11px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center; transform: translateY(-1px); }
.ilater { display: block; margin: 14px auto 0; background: none; border: 0; color: var(--muted); font-size: 13px; padding: 6px 10px; }
.copy { display: flex; gap: 6px; }
.copy-url { flex: 1; min-width: 0; background: var(--dark); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 8px; font-size: 13px; }
.copy-btn { flex: none; background: var(--strong); color: #000; border: 0; border-radius: 8px; padding: 0 12px; font-weight: 700; font-size: 13px; }

/* Phone UI mocks: iOS-like dark controls. The control to press glows and gets a tap ripple. */
.mock { position: relative; background: #1c1c1e; border: 1px solid #3a3a3c; border-radius: 12px; padding: 6px; color: #f2f2f7; font-size: 13px;
  font-family: -apple-system, "Hiragino Sans", system-ui, sans-serif; }
.mock .i { display: inline-flex; }
.mock .dim { opacity: .45; }
.mock .hot { position: relative; color: #fff; background: rgba(88,101,242,.35); box-shadow: 0 0 0 2px #7b86ff; animation: iglow 1.6s ease-in-out infinite; }
@keyframes iglow { 50% { box-shadow: 0 0 0 5px rgba(123,134,255,.35); } }
.tap { position: absolute; right: -4px; bottom: -6px; width: 22px; height: 22px; border-radius: 50%; background: rgba(255,255,255,.85);
  pointer-events: none; animation: itap 1.6s ease-out infinite; }
@keyframes itap { 0% { transform: scale(.7); box-shadow: 0 0 0 0 rgba(255,255,255,.6); } 60% { transform: scale(1); box-shadow: 0 0 0 10px rgba(255,255,255,0); } 100% { transform: scale(.7); } }
.bar26, .xbar { display: flex; align-items: center; gap: 8px; }
.bar26 .btn, .xbar .btn { flex: none; width: 34px; height: 34px; border-radius: 50%; background: #2c2c2e; display: inline-flex; align-items: center; justify-content: center; }
.bar26 .addr, .xbar .addr { flex: 1; min-width: 0; height: 34px; border-radius: 17px; background: #2c2c2e; display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  font-size: 13px; white-space: nowrap; overflow: hidden; }
.bar18 { display: flex; justify-content: space-around; align-items: center; }
.bar18 .btn { width: 40px; height: 36px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; color: #0a84ff; font-size: 18px; }
.bar18 .btn.hot { color: #fff; }
.mock.menu, .mock.sheet { display: grid; gap: 4px; }
.mock.menu .row, .mock.sheet .row { display: flex; align-items: center; gap: 10px; padding: 7px 12px; border-radius: 10px; background: #2c2c2e; }
.dialog-top { display: flex; justify-content: space-between; align-items: center; padding: 2px 4px 8px; }
.dialog-top .dim { color: #0a84ff; opacity: 1; }
.dialog-top .add { color: #fff; font-weight: 700; padding: 3px 10px; border-radius: 8px; }
.dialog-app { display: flex; gap: 10px; align-items: center; background: #2c2c2e; border-radius: 10px; padding: 8px; }
.dialog-app img { width: 36px; height: 36px; border-radius: 9px; }
.dialog-app div { display: flex; flex-direction: column; line-height: 1.3; }
.dialog-app small { color: #8e8e93; }
.dialog-toggle { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; background: #2c2c2e; border-radius: 10px; padding: 8px 10px; }
.switch { width: 40px; height: 24px; border-radius: 12px; background: #3a3a3c; position: relative; flex: none; }
.switch.on { background: #34c759; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; }
.switch.on::after { left: 18px; }

/* Big bouncing arrow at the real screen edge, pointing at the browser's own button. */
.ipointer { position: fixed; z-index: 61; display: flex; flex-direction: column; align-items: center; color: #fff; pointer-events: none;
  font-weight: 800; text-shadow: 0 2px 8px rgba(0,0,0,.6); animation: ibounce 1s ease-in-out infinite; }
.ipointer span { font-size: 34px; line-height: 1; }
.ipointer b { font-size: 12px; background: var(--accent); border-radius: 999px; padding: 2px 8px; text-shadow: none; }
.ipointer.br, .ipointer.bc { flex-direction: column-reverse; bottom: calc(6px + env(safe-area-inset-bottom)); }
.ipointer.br { right: 14px; }
.ipointer.bc { left: 50%; margin-left: -20px; }
.ipointer.tr { right: 14px; top: calc(6px + env(safe-area-inset-top)); animation-name: ibounceup; }
@keyframes ibounce { 50% { transform: translateY(6px); } }
@keyframes ibounceup { 50% { transform: translateY(-6px); } }

@media (max-width: 760px) {
  /* Phones: sheet sits above the bottom edge so the arrow to Safari's own bar stays visible. */
  .install { align-items: flex-end; padding: 0 0 calc(64px + env(safe-area-inset-bottom)); }
  .install-sheet { margin: 0 10px; max-height: calc(100dvh - 90px - env(safe-area-inset-bottom)); }
}

/* X on iPhone: Safari (recommended) and Chrome side by side */
.ibrowsers { display: grid; grid-template-columns: 1.25fr 1fr; gap: 8px; margin-top: 18px; }
.ibrowsers .ibig { margin-top: 0; padding: 14px 8px; font-size: 16px; flex-wrap: wrap; gap: 6px; }
.ibrowsers .ibig small { flex-basis: 100%; text-align: center; font-size: 11px; font-weight: 700; opacity: .85; margin-top: -2px; }
.ibig.alt { background: var(--hover); box-shadow: none; border: 1px solid var(--line); color: var(--strong); }
.ibig.alt:hover { background: var(--active); }
.chrome-dot { width: 18px; height: 18px; border-radius: 50%; flex: none;
  background: radial-gradient(circle, #4285f4 0 32%, #fff 33% 42%, transparent 43%), conic-gradient(#ea4335 0 120deg, #fbbc05 0 240deg, #34a853 0); }
.ihint { margin: 8px 0 0; color: var(--muted); font-size: 12px; text-align: center; }
.mock .addr.chrome { justify-content: flex-start; padding: 0 4px 0 12px; }
.mock .addr.chrome .btn.inline { margin-left: auto; width: 30px; height: 30px; background: transparent; }

/* debug helpers */
.ipreview { margin: 0 36px 8px 0; font-size: 11px; font-weight: 700; color: #f23f42; background: rgba(242,63,66,.12); border-radius: 6px; padding: 4px 8px; }
.iua { position: fixed; z-index: 70; left: 8px; right: 8px; top: calc(8px + env(safe-area-inset-top)); margin: 0; white-space: pre-wrap; word-break: break-all; font-size: 11px; background: #000; color: #0f0; border-radius: 8px; padding: 8px; }

/* X for iPhone bottom bar mock: [✕][‹][hakorimo.com ⋮][↻] */
.xios { display: flex; align-items: center; gap: 6px; }
.xios .btn { flex: none; width: 34px; height: 34px; border-radius: 50%; background: #2c2c2e; display: inline-flex; align-items: center; justify-content: center; font-size: 15px; }
.xios .addr { flex: 1; min-width: 0; height: 34px; border-radius: 17px; background: #2c2c2e; display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-size: 14px; }
.xios .addr.hot { background: rgba(88,101,242,.35); }
.xios .addr .kebab { display: inline-flex; opacity: .9; }
.xios .addr .kebab svg { width: 16px; height: 16px; }
.mock .globe { font-size: 16px; }
.ibrowsers.small { margin-top: 10px; grid-template-columns: 1fr 1fr; }
.ibrowsers.small .ibig { padding: 10px 6px; font-size: 14px; }

/* iOS 26 share sheet: round actions row (コピー / デバイスに送信 / リーディングリスト / もっと見る) */
.ractions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 8px 4px; }
.ract { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.ract .rc { position: relative; width: 44px; height: 44px; border-radius: 50%; background: #3a3a3c; display: inline-flex; align-items: center; justify-content: center; font-size: 18px; }
.ract .rc.dim { opacity: .45; }
.ract small { font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.istep .mock + .mock { margin-top: 6px; }
.mock .addr.chrome .grow { flex: 1; text-align: center; }

/* keep the top-right arrow clear of the sheet (Chrome: address bar at the top) */
.install:has(.ipointer.tr) { padding-top: calc(64px + env(safe-area-inset-top)); }
@media (max-width: 760px) { .install:has(.ipointer.tr) .install-sheet { max-height: calc(100dvh - 150px - env(safe-area-inset-bottom) - env(safe-area-inset-top)); } }

/* top banner (message-like, does not block the chat) */
.ibanner { position: fixed; z-index: 45; left: 50%; top: calc(56px + env(safe-area-inset-top)); transform: translateX(-50%);
  width: min(520px, calc(100vw - 16px)); display: flex; align-items: center; background: rgba(43,45,49,.97); border: 1px solid rgba(88,101,242,.55);
  border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.45); animation: islide .35s cubic-bezier(.2,.9,.3,1.2); }
@keyframes islide { from { transform: translate(-50%, -24px); opacity: 0; } }
.ibanner-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; background: none; border: 0; text-align: left; padding: 10px 4px 10px 12px; color: var(--text); }
.ibanner-main img { width: 36px; height: 36px; border-radius: 10px; flex: none; }
.ibanner-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.ibanner-text b { color: var(--strong); font-size: 14px; }
.ibanner-text small { color: var(--muted); font-size: 12px; }
.ibanner-cta { flex: none; background: var(--accent); color: #fff; font-weight: 800; font-size: 12.5px; border-radius: 999px; padding: 7px 11px; white-space: nowrap; }
.ibanner-close { flex: none; align-self: stretch; background: none; border: 0; color: var(--muted); padding: 0 12px; font-size: 14px; }
