/* irunecore — obsidian ink, warm stone paper, one ember accent. */

:root {
  color-scheme: light;
  --ink: #14121a;
  --ink-soft: #3f3b49;
  --muted: #6e6878;
  --line: rgba(20, 18, 26, 0.1);
  --line-strong: rgba(20, 18, 26, 0.2);
  --paper: #f5f2ec;
  --surface: rgba(255, 253, 249, 0.82);
  --raised: #fffdf9;
  --sunken: #efebe4;
  --tint: rgba(20, 18, 26, 0.04);
  --tab-on: #fffdf9;
  --ember: #ff5b2e;
  --ember-strong: #f04a1c;
  --ember-ink: #c23a12;
  --ember-wash: rgba(255, 91, 46, 0.1);
  --ember-glow: rgba(255, 91, 46, 0.28);
  --on-ember: #14121a;
  --solid: #14121a;
  --on-solid: #f5f2ec;
  --focus: rgba(255, 91, 46, 0.35);
  --live: #1f9d63;
  --warn-bg: #fff0d9;
  --warn-ink: #8a5600;
  --danger: #b42318;
  --danger-bg: #fde8e6;
  --glow-a: rgba(255, 91, 46, 0.14);
  --glow-b: rgba(120, 104, 255, 0.1);
  --grid: rgba(20, 18, 26, 0.045);
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset, 0 30px 70px -20px rgba(20, 18, 26, 0.18);
  --shadow-soft: 0 6px 16px -6px rgba(20, 18, 26, 0.18);
  --font: "Manrope", "Segoe UI", system-ui, sans-serif;
  --display: "Space Grotesk", "Manrope", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --radius: 26px;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --ink: #f1eee8;
    --ink-soft: #c5c0cc;
    --muted: #918b9b;
    --line: rgba(241, 238, 232, 0.09);
    --line-strong: rgba(241, 238, 232, 0.18);
    --paper: #0d0c11;
    --surface: rgba(24, 22, 30, 0.8);
    --raised: #1b1922;
    --sunken: #121117;
    --tint: rgba(241, 238, 232, 0.035);
    --tab-on: #2a2733;
    --ember: #ff6a3d;
    --ember-strong: #ff7d55;
    --ember-ink: #ff8a63;
    --ember-wash: rgba(255, 106, 61, 0.12);
    --ember-glow: rgba(255, 106, 61, 0.3);
    --on-ember: #120d0b;
    --solid: #f1eee8;
    --on-solid: #14121a;
    --focus: rgba(255, 106, 61, 0.35);
    --live: #3ccf8a;
    --warn-bg: rgba(240, 170, 60, 0.14);
    --warn-ink: #f2c27a;
    --danger: #ff8f84;
    --danger-bg: rgba(255, 110, 96, 0.12);
    --glow-a: rgba(255, 106, 61, 0.12);
    --glow-b: rgba(120, 104, 255, 0.1);
    --grid: rgba(241, 238, 232, 0.03);
    --shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 30px 70px -20px rgba(0, 0, 0, 0.6);
    --shadow-soft: 0 6px 16px -6px rgba(0, 0, 0, 0.5);
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
a { color: inherit; }
svg { flex-shrink: 0; }
:focus-visible { outline: 2px solid var(--ember); outline-offset: 2px; }
::selection { background: var(--ember-glow); }

/* Faint rune grid with two soft glows. */
.backdrop {
  pointer-events: none;
  position: fixed;
  inset: 0;
  background:
    radial-gradient(640px 420px at 12% -8%, var(--glow-a), transparent 70%),
    radial-gradient(560px 380px at 95% 4%, var(--glow-b), transparent 70%),
    linear-gradient(var(--grid) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(90deg, var(--grid) 1px, transparent 1px) 0 0 / 32px 32px;
  mask-image: linear-gradient(180deg, #000 0%, #000 45%, transparent 85%);
}

.shell {
  position: relative;
  width: min(720px, calc(100% - 32px));
  margin: 0 auto;
  padding-bottom: max(40px, env(safe-area-inset-bottom));
}

/* ---- Header ---- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 0 8px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  border-radius: 12px;
}
.mark { width: 34px; height: 34px; }
.mark-bg { fill: var(--solid); }
.mark-stone, .mark-stave {
  fill: none;
  stroke: var(--on-solid);
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.mark-core { fill: var(--ember); }
.brand:hover .mark-core { filter: drop-shadow(0 0 3px var(--ember)); }
.wordmark {
  font-family: var(--display);
  font-weight: 700;
  font-size: 21px;
  letter-spacing: -0.035em;
}
.wordmark em { font-style: normal; color: var(--ember-ink); font-weight: 500; }
.tagline {
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: var(--surface);
}

/* ---- Hero ---- */

.hero { padding: 34px 2px 26px; }
.hero h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(34px, 6.4vw, 52px);
  line-height: 1.02;
  letter-spacing: -0.045em;
}
.hero h1 span { color: var(--muted); }
.hero p {
  margin: 14px 0 0;
  max-width: 48ch;
  color: var(--ink-soft);
  font-size: 16px;
}

/* ---- Panel ---- */

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px) saturate(1.2);
}
.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 8px 8px 0;
  padding: 5px;
  border-radius: 18px;
  background: var(--tint);
  border: 1px solid var(--line);
}
.tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 13px;
  padding: 10px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}
.tab svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tab > span { display: grid; line-height: 1.2; }
.tab b { font-weight: 800; font-size: 14.5px; }
.tab small { font-size: 12px; font-weight: 600; }
.tab:hover:not([aria-selected="true"]):not(:disabled) { color: var(--ink-soft); }
.tab[aria-selected="true"] {
  background: var(--tab-on);
  color: var(--ink);
  box-shadow: var(--shadow-soft);
}
.tab[aria-selected="true"] svg { color: var(--ember); }
.tab[aria-selected="true"] small { color: var(--muted); }
.tab:disabled:not([aria-selected="true"]) { opacity: 0.45; }

.composer { padding: 16px 18px 18px; }

/* ---- Drop zone and picked file ---- */

.drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 200px;
  padding: 28px 20px;
  border: 1.5px dashed var(--line-strong);
  border-radius: 20px;
  background: var(--raised);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}
.drop:hover { border-color: var(--ember); }
.drop:focus-visible { outline: none; border-color: var(--ember); box-shadow: 0 0 0 4px var(--focus); }
.drop.drag {
  border-style: solid;
  border-color: var(--ember);
  background: var(--ember-wash);
  transform: scale(1.01);
}
.drop-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 8px;
  border-radius: 15px;
  background: var(--ember-wash);
  color: var(--ember-ink);
  transition: transform 0.2s;
}
.drop-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.drop:hover .drop-icon, .drop.drag .drop-icon { transform: translateY(-3px); }
.drop strong { font-size: 17px; font-weight: 800; }
.drop u { text-decoration-color: var(--ember); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.drop p { margin: 0; color: var(--muted); font-size: 13.5px; }
kbd {
  display: inline-block;
  min-width: 22px;
  padding: 1px 6px;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: var(--sunken);
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.5;
}

.picked {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 200px;
  padding: 20px;
  border: 1.5px solid var(--ember);
  border-radius: 20px;
  background: var(--ember-wash);
  animation: rise 0.2s ease-out;
}
.picked-info { flex: 1; min-width: 0; display: grid; gap: 2px; }
.picked-info b { font-size: 16px; overflow-wrap: anywhere; }
.picked-info span { color: var(--ink-soft); font-size: 13.5px; }
.icon-button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--raised);
  color: var(--ink-soft);
  transition: color 0.15s, border-color 0.15s;
}
.icon-button:hover:not(:disabled) { color: var(--danger); border-color: var(--danger); }
.icon-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

.file-badge {
  position: relative;
  flex-shrink: 0;
  display: grid;
  place-items: end center;
  width: 46px;
  height: 56px;
  padding-bottom: 8px;
  border-radius: 8px 16px 8px 8px;
  background: var(--solid);
  color: var(--on-solid);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
}
.file-badge::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 50%;
  width: 10px;
  height: 10px;
  margin-left: -5px;
  border: 1.6px solid var(--on-solid);
  transform: rotate(45deg);
  border-radius: 1px;
}
.file-badge::after {
  content: "";
  position: absolute;
  top: 14px;
  left: 50%;
  width: 4px;
  height: 4px;
  margin-left: -2px;
  border-radius: 50%;
  background: var(--ember);
}

/* ---- Live text intro ---- */

.live-intro {
  list-style: none;
  margin: 0;
  padding: 0;
  min-height: 200px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.live-intro li {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 18px 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--raised);
}
.live-intro b {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: var(--solid);
  color: var(--on-solid);
  font-family: var(--display);
  font-size: 14px;
}
.live-intro li:first-child b { background: var(--ember); color: var(--on-ember); }
.live-intro span { color: var(--muted); font-size: 13px; line-height: 1.45; }
.live-intro strong { display: block; margin-bottom: 3px; color: var(--ink); font-size: 15px; font-weight: 800; }

/* ---- Controls row ---- */

.controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 16px;
  margin-top: 16px;
}
.ttl { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.ttl-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.ttl-label svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.segmented {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--tint);
}
.segmented button {
  border: 0;
  border-radius: 999px;
  padding: 7px 13px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 13.5px;
  font-weight: 700;
  transition: background 0.15s, color 0.15s;
}
.segmented button:hover:not([aria-checked="true"]):not(:disabled) { color: var(--ink); }
.segmented button[aria-checked="true"] { background: var(--solid); color: var(--on-solid); }

/* ---- Buttons ---- */

.primary, .ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 14px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, transform 0.08s, box-shadow 0.15s;
}
.primary {
  min-width: 164px;
  padding: 13px 20px;
  border: 0;
  background: var(--ember);
  color: var(--on-ember);
  box-shadow: 0 8px 22px -8px var(--ember-glow), inset 0 -2px 0 rgba(0, 0, 0, 0.12);
}
.primary:hover:not(:disabled) { background: var(--ember-strong); box-shadow: 0 10px 26px -8px var(--ember-glow), inset 0 -2px 0 rgba(0, 0, 0, 0.12); }
.primary:active:not(:disabled), .ghost:active { transform: translateY(1px); }
.primary:disabled { opacity: 0.6; cursor: progress; }
.ghost {
  padding: 10px 15px;
  border: 1px solid var(--line-strong);
  background: var(--raised);
}
.ghost:hover { border-color: var(--ink-soft); }
.text-button {
  border: 0;
  background: none;
  padding: 6px 2px;
  color: var(--ember-ink);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
  transition: text-decoration-color 0.15s;
}
.text-button:hover { text-decoration-color: currentColor; }

/* ---- Upload progress ---- */

.upload { margin-top: 16px; }
.progress {
  height: 6px;
  border-radius: 99px;
  background: var(--sunken);
  overflow: hidden;
}
.progress > span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--ember), #ffb36b);
  box-shadow: 0 0 12px var(--ember-glow);
  transition: width 0.15s linear;
}
.upload-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 6px;
  color: var(--ink-soft);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

/* ---- Messages ---- */

.hint { margin: 0; color: var(--muted); font-size: 13px; }
.loading { padding: 40px 4px; text-align: center; }
.toast {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--danger-bg);
  color: var(--danger);
  font-weight: 650;
}
.snackbar {
  position: fixed;
  left: 50%;
  bottom: max(24px, env(safe-area-inset-bottom));
  z-index: 10;
  padding: 11px 18px;
  border-radius: 999px;
  background: var(--solid);
  color: var(--on-solid);
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 14px 34px -10px rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity 0.18s, transform 0.18s;
}
.snackbar.show { opacity: 1; transform: translate(-50%, 0); }

/* ---- Result and share cards ---- */

.result, .viewer {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--raised);
  padding: 20px;
}
.result {
  margin-top: 16px;
  border-color: var(--ember);
  box-shadow: 0 0 0 4px var(--ember-wash);
  animation: rise 0.22s ease-out;
}
.result-head, .viewer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.result-head strong, .viewer-title {
  display: block;
  font-family: var(--display);
  font-weight: 700;
  font-size: 23px;
  line-height: 1.15;
  letter-spacing: -0.03em;
  overflow-wrap: anywhere;
}
.titles { min-width: 0; }
.kicker {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.kicker.accent { color: var(--ember-ink); }
.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.link-row input {
  flex: 1 1 260px;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--sunken);
  font-family: var(--mono);
  font-size: 14px;
  outline: none;
}
.link-row input:focus { border-color: var(--ember); box-shadow: 0 0 0 4px var(--focus); }
.link-row.compact { margin-top: 12px; }
.result-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}
.result-actions .text-button { margin-left: auto; }
.meta-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.meta-row span {
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.clock {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px 5px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--sunken);
  color: var(--ink-soft);
  font-size: 12.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.clock svg { width: 20px; height: 20px; transform: rotate(-90deg); }
.ring-track, .ring-fill { fill: none; stroke-width: 3; }
.ring-track { stroke: var(--line-strong); }
.ring-fill {
  stroke: var(--ember);
  stroke-linecap: round;
  stroke-dasharray: 100;
  transition: stroke-dashoffset 1s linear;
}
.clock.soon { background: var(--warn-bg); color: var(--warn-ink); border-color: transparent; }
.clock.gone { background: var(--danger-bg); color: var(--danger); border-color: transparent; }

.viewer.empty {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 44px 24px;
  text-align: center;
}
.viewer.empty .hint { max-width: 44ch; margin: 6px 0 16px; font-size: 14px; }
.empty-glyph {
  position: relative;
  width: 64px;
  height: 64px;
  margin-bottom: 14px;
}
.empty-glyph::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 2px dashed var(--line-strong);
  border-radius: 6px;
  transform: rotate(45deg);
}
.empty-glyph::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  border: 2px solid var(--muted);
}

.file-card {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
  padding: 16px;
  border-radius: 18px;
  background: var(--sunken);
}
.file-info { flex: 1; min-width: 0; display: grid; gap: 2px; }
.file-info b { font-size: 16px; overflow-wrap: anywhere; }
.file-info .hint { overflow-wrap: anywhere; }

/* ---- Live pad ---- */

.pad-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
}
.presence {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 700;
}
.presence i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
  transition: background 0.2s, box-shadow 0.2s;
}
.presence.live i { background: var(--live); animation: pulse 2.4s ease-out infinite; }
.sync { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.pad {
  display: block;
  width: 100%;
  min-height: 360px;
  margin-top: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--sunken);
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.65;
  tab-size: 4;
  resize: vertical;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.pad:focus { border-color: var(--ember); box-shadow: 0 0 0 4px var(--focus); }
.pad::placeholder { color: var(--muted); }
.pad:read-only { cursor: default; }
.is-expired .pad { opacity: 0.55; }
.counter {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 12px;
  margin: 8px 2px 0;
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.counter.warn span:first-child { color: var(--danger); font-weight: 700; }
.pad-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

/* ---- Facts and footer ---- */

.facts {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 16px 0 0;
  padding: 0;
}
.facts li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.3;
}
.facts svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--ember-ink);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.footnote {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 24px 4px 0;
  color: var(--muted);
  font-size: 13px;
}
.footnote a { color: var(--ink-soft); font-weight: 800; text-decoration: none; }
.footnote a:hover { color: var(--ember-ink); }
.foot-links { display: inline-flex; align-items: center; gap: 18px; }
.gh-link { display: inline-flex; align-items: center; gap: 6px; }
.gh-link svg { width: 15px; height: 15px; fill: currentColor; }
.noscript {
  margin: 16px 0 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--warn-bg);
  color: var(--warn-ink);
  font-weight: 650;
}

/* ---- FAQ ---- */

.faq { margin-top: 44px; }
.faq h2 {
  margin: 0 0 12px 2px;
  font-family: var(--display);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.faq details {
  border-bottom: 1px solid var(--line);
}
.faq details:first-of-type { border-top: 1px solid var(--line); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 2px;
  font-weight: 750;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--ember-ink);
  font-family: var(--mono);
  font-weight: 500;
  transition: transform 0.2s;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:hover { color: var(--ember-ink); }
.faq details p {
  margin: -4px 2px 18px;
  max-width: 62ch;
  color: var(--ink-soft);
}

/* ---- Share pages reuse the shell without the composer chrome ---- */

body.is-share .hero, body.is-share .facts, body.is-share .faq { display: none; }
body.is-share .topbar { padding-bottom: 18px; }
body.is-share .panel {
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
}
body.is-share .composer { padding: 0; }
body.is-share .viewer {
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px) saturate(1.2);
  animation: rise 0.22s ease-out;
}

.hidden { display: none !important; }
input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--live) 45%, transparent); }
  70%, 100% { box-shadow: 0 0 0 7px transparent; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media (max-width: 640px) {
  .shell { width: calc(100% - 32px); }
  .topbar { padding-top: 18px; }
  .tagline { display: none; }
  .hero { padding: 22px 0 18px; }
  .hero p { font-size: 15px; }
  .composer { padding: 14px; }
  .tab small { display: none; }
  .live-intro { grid-template-columns: 1fr; min-height: 0; }
  .live-intro li { grid-template-columns: auto 1fr; align-items: center; padding: 14px; }
  .controls { flex-direction: column; align-items: stretch; }
  .ttl { justify-content: space-between; }
  .primary { width: 100%; }
  .drop, .picked { min-height: 170px; }
  .facts { grid-template-columns: 1fr; gap: 6px; }
  .facts li { padding: 10px 12px; }
  .link-row > * { flex: 1 1 auto; }
  .file-card { flex-wrap: wrap; }
  .file-card .primary { flex-basis: 100%; }
  .result-actions .text-button { margin-left: 0; }
  .pad { min-height: 300px; }
  .result-head strong, .viewer-title { font-size: 20px; }
}
