@font-face { font-family: "Inter"; font-style: normal; font-weight: 380 700; font-display: swap; src: url("./fonts/inter-latin.woff2") format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 500 700; font-display: swap; src: url("./fonts/space-grotesk-latin.woff2") format("woff2"); }
:root {
  color-scheme: dark;
  --bg: #0b0818;
  --card: #171130;
  --card-flat: #120d27;
  --ink: #f6f2ff;
  --muted: #ac9fd1;
  --muted-2: #8a7fac;
  --line: #2d2456;
  --line-soft: #201a41;
  --accent: #5be9c9;
  --accent-ink: #062821;
  --accent-soft: #16332d;
  --accent-2: #b58cff;
  --accent-2-ink: #1c0f3d;
  --danger: #ff8a97;
  --warn: #f0c26a;
  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-family: var(--font-body);
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
* { box-sizing: border-box; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
  background-image:
    radial-gradient(1100px 560px at 12% -12%, #241c47 0%, transparent 60%),
    radial-gradient(900px 520px at 104% 0%, #1a1338 0%, transparent 55%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='96'%3E%3Cg fill='none' stroke-linecap='round'%3E%3Cpath d='M14 20 12 14 6 12l6-2 2-6 2 6 6 2-6 2z' fill='%23b58cff' fill-opacity='.14' stroke='none'/%3E%3Cpath d='M78 62l-1.6-4.6L72 56l4.4-1.6L78 50l1.6 4.4L84 56l-4.4 1.4z' fill='%23f0c26a' fill-opacity='.16' stroke='none'/%3E%3Cpath d='M40 78c4-3 10-3 14 0' stroke='%235be9c9' stroke-opacity='.14' stroke-width='1.2'/%3E%3C/g%3E%3Cg fill='%235be9c9' fill-opacity='.18'%3E%3Ccircle cx='30' cy='10' r='1.6'/%3E%3Ccircle cx='58' cy='34' r='1.3'/%3E%3Ccircle cx='90' cy='16' r='1.6'/%3E%3Ccircle cx='16' cy='60' r='1.3'/%3E%3Ccircle cx='64' cy='86' r='1.6'/%3E%3C/g%3E%3C/svg%3E");
  background-position: 0 0, 0 0, 0 0;
  background-size: auto, auto, 96px 96px;
  background-repeat: no-repeat, no-repeat, repeat;
  background-color: var(--bg);
  animation: sky-drift 150s linear infinite;
  color: var(--ink);
  padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
}
/* The star field drifts by exactly one tile so the loop is seamless — the
   whole page feels like a slow night sky instead of a static backdrop. */
@keyframes sky-drift { to { background-position: 0 0, 0 0, 96px 96px; } }
button, input { font: inherit; }
button, a, summary, label { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button, summary, a, label { outline-offset: 4px; }
:focus-visible { outline: 3px solid var(--accent); border-radius: 4px; }
button { cursor: pointer; }
button:active, .drop-zone:active { transform: translateY(1px); filter: brightness(.94); }
button:disabled { opacity: .55; cursor: wait; }
a { color: var(--accent); }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: 0; transform: translateY(-150%); padding: 12px; background: var(--card); z-index: 10; border-radius: 0 0 10px 10px; }
.skip-link:focus { transform: none; }

.topbar, .shell, footer { width: min(100% - 32px, 1120px); margin-inline: auto; min-width: 0; }
.topbar { min-height: 64px; display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; }
.brand-group { display: inline-flex; align-items: center; gap: 1px; min-width: 0; }
.brand { display: inline-flex; align-items: center; min-height: 44px; gap: 9px; color: var(--ink); text-decoration: none; font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; letter-spacing: -.01em; }
.brand-group .credit-link { align-self: flex-end; margin-bottom: 9px; font-size: .72rem; }
.brand-group .credit-link::before { content: "·"; margin: 0 5px 0 3px; color: var(--muted-2); }
.brand-mark { display: inline-grid; place-items: center; width: 30px; height: 30px; flex-shrink: 0; }
.privacy-pill { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: .78rem; max-width: min(12rem, 100%); text-align: right; }
.privacy-pill::before { content: ""; flex-shrink: 0; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.shell { flex: 1; min-height: 0; display: flex; flex-direction: column; }

/* ---------- Start view ---------- */
.start-view { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: center; padding-block: clamp(16px, 4vh, 40px); }
@media (min-height: 860px) {
  .start-view { justify-content: flex-start; padding-top: clamp(48px, 12vh, 140px); }
}
.start-grid { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; width: 100%; overflow: hidden; }
.start-copy { position: relative; z-index: 1; max-width: 660px; min-width: 0; }
/* One orchestrated entrance for the pitch, each line arriving a beat after the last —
   the page's single deliberate moment of motion, not repeated on every section. */
.start-copy > * { animation: reveal-up .7s cubic-bezier(.16, .8, .24, 1) both; }
.start-copy > *:nth-child(1) { animation-delay: 0s; }
.start-copy > *:nth-child(2) { animation-delay: .08s; }
.start-copy > *:nth-child(3) { animation-delay: .16s; }
.start-copy > *:nth-child(4) { animation-delay: .26s; }
.start-copy > *:nth-child(5) { animation-delay: .38s; }
.start-copy > *:nth-child(6) { animation-delay: .46s; }
.start-visual { animation: reveal-up .8s cubic-bezier(.16, .8, .24, 1) .3s both; }
@keyframes reveal-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
.start-visual { display: none; }
.hero-signal { display: block; margin-bottom: clamp(10px, 3vh, 26px); color: var(--accent); }
.hero-signal .signal-node { fill: var(--bg); stroke: var(--accent); stroke-width: 3; }
.hero-signal .signal-arc { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 96; stroke-dashoffset: 96; animation: draw-signal .9s cubic-bezier(.3, .8, .4, 1) .1s forwards; }
.hero-signal .signal-arc + .signal-arc { opacity: .55; animation-delay: .3s; }
.hero-signal .signal-spark { transform-origin: 60px 10px; animation: twinkle-spark 1.8s ease-in-out .9s infinite; }
@keyframes draw-signal { to { stroke-dashoffset: 0; } }
@keyframes twinkle-spark { 0%, 100% { opacity: .4; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.15); } }
.eyebrow { color: var(--accent); font-size: .95rem; font-weight: 600; margin: 0 0 clamp(8px, 2vh, 16px); }
h1, h2, p { overflow-wrap: anywhere; }
h1 { font-family: var(--font-display); font-size: clamp(1.9rem, 3.4vw + 2.2vh, 5.6rem); font-weight: 700; line-height: 1.02; letter-spacing: -.03em; margin: 0; }
h1 span { color: var(--accent); }
.lead { color: var(--muted); margin-block: clamp(12px, 3vh, 26px); font-size: clamp(.9rem, .4vw + 1.6vh, 1.15rem); max-width: 36ch; }
.primary-button, .secondary-button, .text-button, .download-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-width: 44px; min-height: 50px; padding: 11px 20px; border-radius: 13px;
  font-family: var(--font-body); font-weight: 650; font-size: 1rem; line-height: 1.4;
  text-decoration: none; overflow-wrap: anywhere; text-align: center; border: 1px solid transparent;
}
.primary-button { color: var(--accent-ink); background: linear-gradient(120deg, var(--accent), #8fe9d7 55%, var(--accent-2)); border-color: var(--accent); box-shadow: 0 10px 28px -10px rgba(91, 233, 201, .5), 0 4px 18px -8px rgba(181, 140, 255, .45); transition: transform .15s ease, box-shadow .15s ease, filter .15s ease; }
.primary-button:hover { filter: brightness(1.06); transform: translateY(-1px); box-shadow: 0 14px 32px -10px rgba(91, 233, 201, .65), 0 6px 22px -8px rgba(181, 140, 255, .6); }
.primary-button:active { transform: translateY(0); }
.secondary-button { color: var(--ink); background: #221a45; border: 1px solid #40376e; }
.text-button { color: var(--muted); border: 1px solid transparent; background: transparent; }
.text-button:hover { color: var(--ink); }
.download-button { color: var(--accent-ink); background: var(--accent); }
.start-view > .start-grid > .start-copy > .primary-button { width: 100%; min-height: clamp(48px, 7vh, 58px); padding-inline: 26px; font-size: 1.05rem; }
.microcopy { color: var(--muted-2); font-size: .86rem; margin-block: clamp(10px, 2.5vh, 20px) 0; }

.start-visual { position: relative; z-index: 0; justify-content: flex-end; min-width: 0; }
.start-visual::before {
  content: ""; position: absolute; inset: 6% 14%; z-index: 0;
  background:
    radial-gradient(closest-side, rgba(91, 233, 201, .38), transparent 70%),
    radial-gradient(closest-side at 70% 65%, rgba(181, 140, 255, .32), transparent 72%);
  filter: blur(48px); animation: glow-pulse 5s ease-in-out infinite;
}
.hero-illustration-wrap { position: relative; z-index: 1; width: 100%; max-width: 620px; margin: -8px -18px -22px 0; filter: drop-shadow(0 30px 50px rgba(4, 10, 22, .6)); transform: rotate(4deg); }
.hero-illustration { width: 100%; height: auto; display: block; animation: float-hero 6.5s ease-in-out infinite; }
@keyframes glow-pulse { 0%, 100% { opacity: .5; transform: scale(1); } 50% { opacity: .85; transform: scale(1.07); } }
@keyframes float-hero { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-16px); } }

/* ---------- Room view ---------- */
.room-view { padding-block: 8px 16px; }
.room-heading { display: flex; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.room-heading h1 { font-size: 1.4rem; letter-spacing: -.02em; }
.room-heading button { font-size: .82rem; padding-inline: 10px; flex-shrink: 0; }
.workspace-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: start; }
.workspace-grid > *, .section-heading > *, .link-field > * { min-width: 0; }
.workspace-grid.solo { grid-template-columns: minmax(0, 1fr); }
.card { border: 1px solid var(--line); border-radius: 18px; background: var(--card); box-shadow: 0 24px 60px -34px rgba(2, 6, 16, .7); }
.transfer-card { padding: 20px; position: relative; }
.transfer-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 2px; border-radius: 18px 18px 0 0; background: linear-gradient(90deg, var(--accent), transparent 70%); opacity: .35; }
.transfer-card.connected::before { opacity: .9; }

.link-indicator { position: relative; display: flex; align-items: center; gap: 9px; margin-bottom: 16px; }
.link-node { width: 10px; height: 10px; flex-shrink: 0; border-radius: 50%; background: var(--line); border: 2px solid var(--muted-2); transition: background-color .3s, border-color .3s; }
.link-line { position: relative; flex: 0 0 48px; height: 2px; border-radius: 1px; background: repeating-linear-gradient(90deg, var(--muted-2) 0 5px, transparent 5px 9px); background-size: 14px 2px; }
.transfer-card.connected .link-node { background: var(--accent); border-color: var(--accent); }
.transfer-card.connected .link-line { background: var(--accent); }
@keyframes pulse-node { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.3); opacity: .5; } }
@keyframes flow-line { to { background-position: 14px 0; } }
.transfer-card:not(.connected) .link-node { animation: pulse-node 1.7s ease-in-out infinite; }
.transfer-card:not(.connected) .link-node:last-child { animation-delay: .5s; }
.transfer-card:not(.connected) .link-line { animation: flow-line .9s linear infinite; }
/* A mote of light carries itself across the link while devices are pairing —
   the one place the "fae" concept gets to move on its own, tied to real state. */
.link-spark { position: absolute; top: 50%; left: 0; width: 5px; height: 5px; margin-top: -2.5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 6px 1px var(--accent); opacity: 0; }
.transfer-card:not(.connected) .link-spark { animation: carry-spark 1.8s ease-in-out infinite; }
@keyframes carry-spark { 0% { opacity: 0; left: 0; } 12% { opacity: 1; } 88% { opacity: 1; } 100% { opacity: 0; left: 44px; } }
.link-burst { position: absolute; left: 50%; top: 50%; width: 20px; height: 20px; margin: -10px 0 0 -10px; color: var(--warn); opacity: 0; pointer-events: none; }
.transfer-card.connected .link-burst { animation: burst-once .7s ease-out; }
@keyframes burst-once { 0% { opacity: 0; transform: scale(.3) rotate(-15deg); } 45% { opacity: 1; transform: scale(1.15) rotate(4deg); } 100% { opacity: 0; transform: scale(1.5) rotate(10deg); } }

.status-block { position: relative; }
.status-block h2 { font-family: var(--font-display); margin: 8px 0; font-size: 1.35rem; font-weight: 600; line-height: 1.25; letter-spacing: -.01em; }
.status-block p { margin: 0; color: var(--muted); font-size: .92rem; }
.status-badge { display: inline-flex; gap: 7px; align-items: center; color: var(--muted); font-size: .82rem; font-weight: 650; }
.status-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.status-badge.connected { color: var(--accent); }
.status-badge.error { color: var(--danger); }
#retryConnectionButton { margin-top: 16px; width: 100%; }

.drop-zone {
  position: relative; display: grid; justify-items: center; gap: 5px; margin-top: 22px;
  padding: 20px 12px; border: 1.5px dashed #3d6459; border-radius: 16px; background: var(--accent-soft);
  text-align: center; cursor: pointer; transition: border-color .15s ease, background-color .15s ease;
}
.drop-zone:hover, .drop-zone.dragover { border-color: var(--accent); background: #1a3c35; }
.drop-zone input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.drop-zone:focus-within { outline: 3px solid var(--accent); outline-offset: 4px; }
.drop-zone.disabled { display: none; }
.drop-icon { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: rgba(91, 233, 201, .14); color: var(--accent); transition: transform .18s ease; }
.drop-icon svg { width: 20px; height: 20px; }
.drop-zone:hover .drop-icon, .drop-zone.dragover .drop-icon { transform: translateY(-3px) scale(1.06); }
.drop-zone strong { font-size: .98rem; }
.drop-zone > span:last-child { color: var(--muted); font-size: .82rem; }

.queue-section { margin-top: 26px; min-width: 0; }
.queue-section h2 { font-family: var(--font-display); font-size: 1.05rem; font-weight: 600; margin-block: 0 10px; }
.queue-section h2 span { color: var(--muted); font-weight: 500; }
.section-heading { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.section-heading .text-button { font-size: .82rem; padding: 8px; }
.file-list { container-type: inline-size; list-style: none; margin: 8px 0 0; padding: 2px 4px; display: flex; flex-direction: column; gap: 10px; max-height: min(34rem, 68dvh); overflow-y: auto; scrollbar-gutter: stable; overscroll-behavior: contain; }
.file-list:empty { display: none; }
.queue-item.file-card { display: flex; flex-direction: column; gap: 12px; width: 100%; padding: 14px; border: 1px solid var(--line-soft); border-radius: 14px; background: var(--card-flat); min-width: 0; transition: border-color .15s ease; }
.queue-item.file-card[data-status="completed"] { border-color: #204238; }
.queue-item.file-card[data-status="failed"], .queue-item.file-card[data-status="rejected"], .queue-item.file-card[data-status="interrupted"] { border-color: #4a2830; }
.file-row { display: flex; align-items: center; gap: 16px; min-width: 0; flex: 1; }
.file-thumb {
  position: relative; flex-shrink: 0; width: 84px; height: 84px; border-radius: 13px; overflow: hidden;
  display: grid; place-items: center; background: var(--accent-soft); color: var(--accent);
  border: none; padding: 0; font: inherit; appearance: none;
}
.file-thumb[data-category="image"] { background: #0b1626; border: 1px solid var(--line-soft); }
.file-thumb svg { width: 30px; height: 30px; }
.file-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.file-ext { position: absolute; left: 0; right: 0; bottom: 0; padding: 2px 0 3px; text-align: center; font-size: .58rem; font-weight: 700; letter-spacing: .02em; color: var(--accent-ink); background: var(--accent); }
button.file-thumb:not(:disabled) { cursor: zoom-in; }
button.file-thumb:not(:disabled) .preview-hint { opacity: 0; transition: opacity .15s ease; position: absolute; inset: 0; display: grid; place-items: center; background: rgba(6, 12, 24, .5); color: #fff; }
button.file-thumb:not(:disabled) .preview-hint svg { width: 20px; height: 20px; }
button.file-thumb:not(:disabled):hover .preview-hint, button.file-thumb:not(:disabled):focus-visible .preview-hint { opacity: 1; }
.file-info { flex: 1; min-width: 0; }
.file-name { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 1rem; font-weight: 600; }
.file-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-block: 6px 0; }
.file-size { color: var(--muted-2); font-size: .8rem; }
.file-status { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: .8rem; font-weight: 600; }
.file-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--muted-2); flex-shrink: 0; }
.file-status[data-tone="active"] { color: var(--accent); }
.file-status[data-tone="active"]::before { background: var(--accent); }
.file-status[data-tone="done"] { color: var(--accent); }
.file-status[data-tone="done"]::before { background: var(--accent); }
.file-status[data-tone="error"] { color: var(--danger); }
.file-status[data-tone="error"]::before { background: var(--danger); }
.progress-wrap { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.queue-item progress { flex: 1; display: block; width: 100%; height: 6px; accent-color: var(--accent); border-radius: 3px; overflow: hidden; }
.file-percent { flex-shrink: 0; min-width: 2.6em; text-align: right; color: var(--muted-2); font-size: .78rem; font-variant-numeric: tabular-nums; }
.file-percent:empty { display: none; }
.file-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.file-actions > * { font-size: .82rem; min-height: 40px; padding-block: 8px; padding-inline: 14px; }
.file-actions .download-button { order: -1; }
.file-actions .text-button { margin-left: auto; padding-inline: 10px; }
.action-icon { display: inline-flex; width: 15px; height: 15px; flex-shrink: 0; }
.action-icon svg { width: 100%; height: 100%; }

/* Wide enough cards (a wide card, or a whole row once the invite column is gone) put the
   actions beside the file info instead of stacking them in a separate footer row. */
@container (min-width: 480px) {
  .queue-item.file-card { flex-direction: row; align-items: center; }
  .file-thumb { width: 96px; height: 96px; }
  .file-actions { flex-shrink: 0; padding-top: 0; border-top: none; }
}

.invite-card { background: var(--card-flat); }
.invite-card summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 52px; padding: 14px 18px; font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; cursor: pointer; overflow-wrap: anywhere; list-style: none; }
.invite-card summary::-webkit-details-marker { display: none; }
.invite-card summary::after { content: ""; flex-shrink: 0; width: 9px; height: 9px; border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); transition: transform .2s ease; }
.invite-card[open] summary::after { transform: rotate(45deg); }
.invite-content { padding: 0 18px 20px; }
.invite-content > p:first-child { margin-top: 0; color: var(--muted); font-size: .9rem; }
.qr-frame { position: relative; background: white; border-radius: 14px; padding: 10px; width: min(192px, 100%); margin: 18px auto; }
.qr-frame::before, .qr-frame::after { content: ""; position: absolute; width: 22px; height: 22px; border: 2px solid var(--accent); border-radius: 6px; }
.qr-frame::before { top: -8px; left: -8px; border-right: none; border-bottom: none; }
.qr-frame::after { bottom: -8px; right: -8px; border-left: none; border-top: none; }
.qr-frame img { display: block; width: 100%; height: auto; aspect-ratio: 1; }
.qr-spark { position: absolute; top: -14px; right: -12px; width: 18px; height: 18px; color: var(--warn); animation: hover-spark 3.4s ease-in-out infinite; }
@keyframes hover-spark { 0%, 100% { transform: translateY(0) rotate(0deg); opacity: .85; } 50% { transform: translateY(-4px) rotate(12deg); opacity: 1; } }
.link-field { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 10px 14px; border: 1px solid var(--line-soft); border-radius: 12px; background: var(--card); }
.link-field span { flex: 1; overflow-wrap: anywhere; color: var(--muted); font-size: .82rem; align-content: center; font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; }
.link-field button { flex-shrink: 0; font-size: .82rem; }
#shareLinkButton { width: 100%; margin-top: 12px; }
.notice { border-left: 3px solid var(--warn); padding-left: 12px; color: #f2d69a; font-size: .85rem; }

.info-panel { margin-top: 20px; border: 1px dashed var(--line); border-radius: 14px; background: transparent; }
.info-panel summary { display: flex; align-items: center; gap: 9px; min-height: 42px; padding: 9px 14px; cursor: pointer; list-style: none; color: var(--muted-2); font-size: .84rem; font-weight: 600; }
.info-panel summary::-webkit-details-marker { display: none; }
.info-mark { display: inline-grid; place-items: center; flex-shrink: 0; width: 16px; height: 16px; border-radius: 50%; border: 1px solid var(--muted-2); font-size: .68rem; font-style: italic; font-family: Georgia, serif; }
.info-panel[open] summary { color: var(--muted); }
.info-body { display: flex; flex-direction: column; gap: 10px; padding: 2px 16px 16px; }
.info-item { display: flex; gap: 12px; padding: 12px; border-radius: 12px; background: var(--card-flat); }
.info-item-icon { flex-shrink: 0; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: rgba(154, 166, 189, .12); color: var(--muted); }
.info-item-icon svg { width: 16px; height: 16px; }
.info-item-body { min-width: 0; }
.info-item-body strong { display: block; color: var(--ink); font-size: .86rem; font-weight: 650; margin-bottom: 3px; }
.info-item-body p { margin: 0; max-width: 62ch; color: var(--muted-2); font-size: .82rem; }
.info-item--highlight { background: var(--accent-soft); border: 1px solid #2a5347; }
.info-item--highlight .info-item-icon { background: rgba(91, 233, 201, .18); color: var(--accent); }
.info-item--highlight .info-item-body strong { color: var(--accent); }
/* ---------- Landing: why / how / security / FAQ ---------- */
.landing-extra { margin-top: clamp(48px, 10vh, 96px); display: flex; flex-direction: column; gap: clamp(56px, 10vh, 104px); padding-bottom: clamp(24px, 6vh, 56px); }
.landing-extra section { position: relative; padding-top: clamp(28px, 5vh, 44px); }
.landing-extra section::before { content: ""; position: absolute; top: 0; left: 0; width: 46px; height: 3px; border-radius: 2px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.landing-extra h2 { font-family: var(--font-display); font-size: clamp(1.6rem, 1vw + 2.2vh, 2.5rem); font-weight: 700; letter-spacing: -.02em; line-height: 1.1; margin: 0 0 10px; max-width: 44ch; }
.section-lead { color: var(--muted); font-size: 1.05rem; max-width: 58ch; margin: 0 0 34px; }

/* Why: a single connected strip with dividers on wide screens — a grid of
   repeated cards below that, where forcing one row would just cramp it. */
.waiver-grid { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 26px 22px; }
.waiver-item { display: flex; gap: 14px; align-items: flex-start; min-width: 0; flex: 1 1 220px; }
.waiver-icon { flex-shrink: 0; width: 30px; height: 30px; color: var(--accent); margin-top: 2px; }
.waiver-item strong { display: block; font-size: 1.02rem; font-weight: 650; margin-bottom: 5px; }
.waiver-item p { margin: 0; color: var(--muted-2); font-size: .86rem; max-width: 30ch; }
@media (min-width: 1050px) {
  .waiver-grid { flex-wrap: nowrap; gap: 0; }
  .waiver-item { flex: 1 1 0; padding-left: 22px; border-left: 1px solid var(--line-soft); }
  .waiver-item:first-child { padding-left: 0; border-left: none; }
}

/* How: numbered beads strung on one gradient line — a real sequence, shown as one. */
.steps-list { position: relative; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 28px; }
.steps-list li { display: flex; gap: 16px; align-items: flex-start; min-width: 0; }
.step-num { position: relative; z-index: 1; flex-shrink: 0; display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: var(--accent-ink); font-family: var(--font-display); font-weight: 700; font-size: .98rem; box-shadow: 0 0 0 6px var(--bg); }
.steps-list strong { display: block; font-size: 1.04rem; font-weight: 650; margin-bottom: 4px; }
.steps-list p { margin: 0; color: var(--muted-2); font-size: .88rem; max-width: 38ch; }
@media (min-width: 720px) {
  .steps-list { grid-template-columns: repeat(3, 1fr); gap: 0 24px; }
  .steps-list li { flex-direction: column; gap: 14px; }
  .steps-list::before { content: ""; position: absolute; top: 18px; left: 18px; right: 18px; height: 2px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); opacity: .45; }
}

/* Security: one trust panel instead of another card grid — the claim gets a single frame. */
.security-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; border-radius: 18px; background: var(--card-flat); border: 1px solid var(--line-soft); overflow: hidden; position: relative; }
.security-list::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 2px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); opacity: .8; }
.security-item { display: flex; gap: 16px; align-items: flex-start; min-width: 0; padding: 20px clamp(18px, 3vw, 28px); }
.security-item + .security-item { border-top: 1px solid var(--line-soft); }
.security-icon { flex-shrink: 0; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); }
.security-icon svg { width: 19px; height: 19px; }
.security-item strong { display: block; font-size: .98rem; font-weight: 650; margin-bottom: 4px; }
.security-item p { margin: 0; color: var(--muted-2); font-size: .86rem; max-width: 60ch; }
@media (min-width: 720px) {
  .security-list { flex-direction: row; }
  .security-item { flex: 1; flex-direction: column; }
  .security-item + .security-item { border-top: none; border-left: 1px solid var(--line-soft); }
}

/* FAQ: wide, editorial two-column layout instead of one long narrow list. */
.faq-list { columns: 1; column-gap: 20px; }
.faq-item { break-inside: avoid; margin: 0 0 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--card-flat); }
.faq-item summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 14px 18px; font-weight: 600; font-size: .96rem; cursor: pointer; list-style: none; overflow-wrap: anywhere; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: ""; flex-shrink: 0; width: 9px; height: 9px; border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); transition: transform .2s ease; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { margin: 0; padding: 0 18px 18px; color: var(--muted); font-size: .88rem; }
@media (min-width: 760px) {
  .faq-list { columns: 2; }
}

.toast { color: var(--accent-ink); font-size: .9rem; font-weight: 600; padding: 0; overflow-wrap: anywhere; border-radius: 12px; opacity: 0; transform: translateY(6px); transition: opacity .18s ease, transform .18s ease; }
.toast.show { padding: 12px 16px; background: var(--accent); opacity: 1; transform: translateY(0); box-shadow: 0 12px 26px -10px rgba(91, 233, 201, .6); }

footer { display: flex; gap: 12px; flex-wrap: wrap; justify-content: space-between; padding-block: 22px max(22px, env(safe-area-inset-bottom, 0px)); color: var(--muted-2); font-size: .76rem; }
.footer-mark { display: inline-flex; align-items: center; gap: 6px; }
.footer-mark svg { width: 13px; height: 13px; color: var(--accent); opacity: .8; }
.credit-link { color: var(--muted-2); text-decoration: none; }
.credit-link::before { content: "·"; margin: 0 6px; color: var(--line); }
.credit-link:hover, .credit-link:focus-visible { color: var(--accent); text-decoration: underline; }

dialog {
  position: fixed; inset: auto;
  top: calc(var(--visual-top, 0px) + env(safe-area-inset-top, 0px) + 12px);
  left: max(12px, env(safe-area-inset-left, 0px)); right: max(12px, env(safe-area-inset-right, 0px));
  margin: auto; width: min(440px, calc(100% - 24px));
  max-height: calc(100vh - 24px);
  max-height: calc(var(--visual-height, 100dvh) - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 24px);
  padding: 0; border: 1px solid #40376e; border-radius: 20px; color: var(--ink); background: var(--card);
  overflow-y: auto; overscroll-behavior: contain;
}
dialog::backdrop { background: #030812e0; backdrop-filter: blur(2px); }
.dialog-card { margin: 0; }
.dialog-body { padding: 24px 20px 16px; overflow-wrap: anywhere; }
.dialog-body .eyebrow { margin-bottom: 8px; }
.dialog-body h2 { font-family: var(--font-display); margin-top: 0; font-size: 1.4rem; font-weight: 600; }
#incomingSender, #incomingMeta { color: var(--muted); font-size: .9rem; }
#incomingName { display: block; margin-block: 6px; font-size: 1.05rem; font-weight: 650; overflow-wrap: anywhere; }
.dialog-actions { display: flex; flex-wrap: wrap; gap: 10px; position: sticky; bottom: 0; padding: 14px 20px max(14px, env(safe-area-inset-bottom, 0px)); background: var(--card); border-top: 1px solid var(--line); }
.dialog-actions button { flex: 1; }

.preview-dialog { width: min(920px, calc(100% - 24px)); background: var(--card-flat); padding: 0; }
.preview-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.preview-head strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .92rem; font-weight: 650; }
#previewCloseButton { flex-shrink: 0; min-width: 40px; min-height: 40px; padding: 8px; }
#previewCloseButton svg { width: 16px; height: 16px; }
.preview-media { display: grid; place-items: center; min-height: 200px; max-height: calc(var(--visual-height, 100dvh) - 140px); padding: 16px; }
.preview-media img, .preview-media video { display: block; max-width: 100%; max-height: calc(var(--visual-height, 100dvh) - 172px); width: auto; height: auto; border-radius: 8px; }
.preview-media audio { width: 100%; }

@media (min-width: 600px) {
  .topbar, .shell, footer { width: min(100% - 48px, 1120px); }
  .topbar { min-height: 80px; }
  .start-view > .start-grid > .start-copy > .primary-button { width: auto; min-width: 300px; }
  .lead { font-size: 1.18rem; }
  .transfer-card { padding: 26px; }
}
@media (min-width: 760px) {
  .start-grid { flex-direction: row; align-items: center; gap: 24px; }
  .start-copy { flex: 2 1 460px; }
  .start-visual { display: flex; flex: 1 1 320px; }
}
@media (min-width: 960px) {
  .workspace-grid { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 24px; }
  .room-heading { margin-block: 16px 24px; }
  .room-heading h1 { font-size: 1.8rem; }
  .start-copy { flex-basis: 520px; }
  .start-visual { flex-basis: 420px; }
  .hero-illustration-wrap { max-width: 640px; }
}
@media (min-width: 1300px) {
  .start-copy { flex-basis: 560px; }
  .start-visual { flex-basis: 520px; }
  .hero-illustration-wrap { max-width: 740px; }
}
/* Below this, real vertical space is tight even on wide desktop windows: trim the
   chrome (topbar/footer) so the hero never has to fight them for room. */
@media (max-height: 820px) {
  .topbar { min-height: 52px; }
  footer { padding-block: 12px max(12px, env(safe-area-inset-bottom, 0px)); }
  .start-view { padding-block: clamp(8px, 2.5vh, 24px); }
  .start-view h1 { font-size: clamp(1.7rem, 1vw + 3.6vh, 3.4rem); }
}
@media (max-height: 450px) and (orientation: landscape) {
  .topbar { min-height: 44px; }
  .start-view { padding-block: 6px; justify-content: flex-start; }
  .hero-signal { display: none; }
  .start-visual { display: none; }
  .start-view h1 { font-size: 2rem; }
  .start-view .eyebrow { margin-bottom: 6px; }
  .lead { margin-block: 8px; font-size: 1rem; }
  .microcopy { margin-top: 6px; }
  .start-view > .start-grid > .start-copy > .primary-button { min-height: 44px; }
  footer { padding-block: 8px max(8px, env(safe-area-inset-bottom, 0px)); }
}
@media (prefers-reduced-motion: no-preference) { button { transition: background-color .12s ease; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } .hero-signal .signal-arc { stroke-dashoffset: 0 !important; } }
.language-picker { display: inline-flex; align-items: center; gap: .35rem; margin-left: auto; padding: .28rem .55rem .28rem .45rem; border: 1px solid rgba(181, 140, 255, .42); border-radius: 999px; background: linear-gradient(135deg, rgba(91, 233, 201, .08), rgba(181, 140, 255, .12)); box-shadow: 0 0 18px rgba(181, 140, 255, .12), inset 0 0 12px rgba(240, 194, 106, .05); color: var(--muted); }
.language-spark { color: var(--warn); font-size: .85rem; text-shadow: 0 0 8px rgba(240, 194, 106, .8); }
.language-picker { appearance: none; border: 0; background: transparent; color: inherit; font: inherit; font-size: .78rem; cursor: pointer; padding: .1rem .1rem; }
.language-picker:focus-visible { outline: 2px solid var(--warn); outline-offset: 2px; border-radius: 4px; }
.language-picker { background: #17112c; color: #f8f3ff; }
@media (max-width: 620px) { .language-picker { margin-left: .35rem; } .language-picker .language-spark { display: none; } }
.header-tools { display: inline-flex; align-items: center; justify-content: flex-end; gap: 14px; margin-left: auto; }
.language-picker { border: 1px solid rgba(181, 140, 255, .42); color: var(--muted); }
.language-picker:hover { color: var(--ink); border-color: var(--accent-2); background: linear-gradient(135deg, rgba(91, 233, 201, .14), rgba(181, 140, 255, .2)); }
/* Compact magical language toggle: keep the icon and label inside the pill at every zoom. */
.language-picker { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; width: max-content; min-width: 7.2rem; min-height: 2.15rem; margin: 0; padding: .38rem .8rem; gap: .38rem; white-space: nowrap; line-height: 1.2; overflow: hidden; }
.language-picker #languageLabel { display: inline-block; font-weight: 700; white-space: nowrap; }
.language-picker .language-spark { flex: 0 0 auto; }
