/* App-level layout on top of the verbatim mockup CSS (styles.css).
   The mockup is a fixed-height demo; a live app must fill the viewport and
   let each rail scroll independently. Nothing here changes the mockup's
   look — only how the panes size and scroll. */

/* Own both schemes → the browser won't force-dark-invert the page. */
html { color-scheme: light dark; }
html, body { height: 100%; }
body { margin: 0; overflow: hidden; }

/* The play screen fills the viewport: header (auto) + shell (fills rest). */
#app-root {
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#app-root > header.session { flex: none; }
#app-root > .shell { flex: 1 1 auto; min-height: 0; }

/* Let the grid columns shrink below their content so inner panes can scroll
   (grid/flex children default to min-height:auto, which blocks overflow). */
.shell > * { min-height: 0; }
.party, .ledger { overflow-y: auto; }
.table { min-height: 0; }
.stream { min-height: 0; }

/* The front porch (join screen) centers a card and scrolls if tall. */
.porch-wrap {
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
}

/* The input upgraded from the mockup's single-line <input> to a multiline
   <textarea> (Enter sends, Shift+Enter newline), matching apps/sh_table. Give
   it the same look the mockup gives `.inputbar input`. */
.inputbar textarea {
  flex: 1;
  background: var(--oak-2);
  border: 1px solid var(--oak-3);
  border-radius: 2px;
  color: var(--chrome-ink);
  padding: 10px 14px;
  font: inherit;
  font-size: 13px;
  line-height: 1.5;
  resize: none;
  max-height: 8.5em;
  overflow-y: auto;
}
.inputbar textarea::placeholder {
  color: var(--chrome-dim);
  font-family: Palatino, Georgia, serif;
  font-style: italic;
}

/* Rendered markdown inside a paper message keeps paper typography (the
   mockup's `.paper-msg p/h1/...` rules already cover the emitted tags). */
.paper-msg .md > :first-child { margin-top: 0; }
.paper-msg .md > :last-child { margin-bottom: 0; }

/* ============ front porch (join screen) ============
   The porch has no mockup counterpart — it mirrors apps/sh_table's
   JoinScreen (a centered 520px identity/seats card). */
.porch { max-width: 520px; width: 100%; padding: 24px; box-sizing: border-box; }
.porch .brand {
  margin: 0; font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  font-size: 30px; letter-spacing: .18em; font-weight: 600; color: var(--chrome-ink);
}
.porch .sub { font-size: 11px; letter-spacing: .28em; color: var(--chrome-dim); margin-top: 4px; }
.porch .adv {
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  font-size: 19px; font-weight: 600; color: var(--chrome-ink); margin-top: 28px;
}
.porch .advmeta { font-size: 10.5px; color: var(--chrome-dim); margin-top: 2px; line-height: 1.5; }
.porch .seatshead { font-size: 10px; letter-spacing: .2em; color: var(--chrome-dim); margin: 18px 0 8px; }
.porch .seat {
  display: flex; align-items: center; gap: 10px; border: 1px solid var(--oak-3);
  border-radius: 3px; padding: 8px 10px; margin-bottom: 6px;
}
.porch .seat.open { cursor: pointer; }
.porch .seat .stripe { width: 4px; height: 26px; border-radius: 2px; flex: none; }
.porch .seat .char { font-family: "Iowan Old Style", Palatino, Georgia, serif; font-size: 14px; font-weight: 600; }
.porch .seat .stat { font-size: 11px; color: var(--chrome-dim); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.porch .nlabel { display: block; font-size: 12px; letter-spacing: .06em; color: var(--chrome-dim); margin: 20px 0 4px; }
.porch input.name {
  width: 100%; box-sizing: border-box; background: var(--oak-2); border: 1px solid var(--oak-3);
  border-radius: 2px; color: var(--chrome-ink); padding: 10px 14px; font: inherit; font-size: 13px;
}
.porch .host { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 12px; color: var(--chrome-dim); cursor: pointer; user-select: none; }
.porch .err { color: var(--wax); font-size: 12px; margin-top: 12px; }
.porch .join {
  margin-top: 16px; width: 100%; background: var(--verdigris-deep); color: var(--slip);
  border: 1px solid var(--verdigris); border-radius: 2px; padding: 12px;
  letter-spacing: .1em; font-size: 13px; cursor: pointer;
}
.porch .join:hover { background: var(--verdigris); }
.porch .join:disabled { opacity: .6; cursor: default; }

/* Live narration streaming (NarrationDelta): a blinking caret trailing the
   in-progress GM draft, so the table sees the GM "writing". */
.streaming-cursor {
  display: inline-block; width: 0.45em; height: 1.05em; margin-left: 2px;
  background: var(--id-gm); vertical-align: text-bottom; border-radius: 1px;
  animation: sh-blink 1s steps(2, start) infinite;
}
@keyframes sh-blink { to { visibility: hidden; } }
.paper-msg.streaming { box-shadow: none; }

/* ============ the barrow map (RHS) ============ */
.railtabs { display: flex; gap: 5px; margin-bottom: 12px; }
.railtab {
  background: none; border: 1px solid var(--oak-3); color: var(--chrome-dim);
  padding: 3px 12px; border-radius: 2px; letter-spacing: .16em; font-size: 10px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace; cursor: pointer;
}
.railtab.active { color: var(--flame); border-color: var(--flame-dim); }

/* the hand-drawn map lives on a scrap of graph paper (parchment + faint grid) */
.barrowmap-wrap {
  background-color: var(--paper);
  background-image:
    linear-gradient(rgba(44, 33, 19, .10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(44, 33, 19, .10) 1px, transparent 1px);
  background-size: 12px 12px;
  border: 1px solid var(--paper-edge); border-radius: 2px;
  box-shadow: var(--slip-shadow);
  padding: 4px; margin-bottom: 8px;
  display: flex; justify-content: center;
  overflow-x: auto;
}
.barrowmap { display: block; }
.barrowmap .corridor { stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; }
.barrowmap .corridor.faint { stroke: var(--ink-dim); stroke-dasharray: 3 4; }
.barrowmap .room { fill: none; stroke: var(--ink); stroke-width: 1.8; }
.barrowmap .room.unvisited { stroke: var(--ink-dim); stroke-dasharray: 4 3; }
.barrowmap .room.current {
  fill: color-mix(in srgb, var(--wax) 15%, transparent);
  stroke: var(--wax); stroke-width: 2.6;
}
.barrowmap .roomlabel {
  fill: var(--ink); font-size: 7.5px; letter-spacing: .01em;
  font-family: "Iowan Old Style", Palatino, Georgia, serif;
}
.barrowmap .roomlabel.dim { fill: var(--ink-dim); font-style: italic; }
.barrowmap .heremark { fill: var(--wax); font-size: 9px; }

.mapcap {
  font-family: "Iowan Old Style", Palatino, Georgia, serif;
  font-variant-caps: small-caps; letter-spacing: .06em; font-size: 13px;
  color: var(--flame);
}
.mapsec { font-size: 9px; letter-spacing: .2em; color: var(--chrome-dim); margin: 12px 0 5px; }
.exit {
  display: flex; align-items: baseline; gap: 7px; padding: 4px 2px;
  border-bottom: 1px dashed var(--oak-3);
}
.exit .arrow { color: var(--verdigris); }
.exit .exitname {
  flex: 1; font-family: "Iowan Old Style", Palatino, Georgia, serif;
  font-size: 13.5px; color: var(--chrome-ink);
}
.exittag { font-size: 8.5px; letter-spacing: .12em; }
.exittag.seen { color: var(--verdigris); }
.exittag.unseen { color: var(--flame-dim); }
.noexit, .mapempty {
  font-size: 11px; color: var(--chrome-dim); font-style: italic;
  font-family: Palatino, Georgia, serif; line-height: 1.5;
}

/* ============ beat tray banners ============ */
.tray.tray-stack { flex-direction: column; align-items: stretch; }
.tray-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.tray-banner {
  background: var(--oak-2); border-radius: 2px; padding: 8px 12px; margin-bottom: 8px;
}
.tray-banner .btag { font-size: 9px; letter-spacing: .2em; font-weight: 700; margin-right: 10px; }
.tray-banner .btext { font-family: Palatino, Georgia, serif; }
.tray-banner.clarify { border: 1px solid var(--flame-dim); }
.tray-banner.clarify .btag { color: var(--flame); }
.tray-banner.clarify .btext { font-style: italic; color: var(--chrome-ink); }
.tray-banner.foes { border: 1px solid var(--wax); }
.tray-banner.foes .btext { font-weight: 700; color: var(--wax); }
.cancel-beat {
  margin-left: auto;
  background: transparent;
  color: var(--flame);
  border: 1px solid var(--flame-dim);
  border-radius: 2px;
  padding: 6px 12px;
  letter-spacing: .12em;
  font-size: 10px;
}
.cancel-beat:hover { background: var(--oak-3); }
.cancel-beat:disabled { opacity: .55; cursor: default; }
.cancel-beat + .resolve { margin-left: 0; }

/* ============ Ruling cards ============
   Offers are public mechanical contracts, visually distinct from both GM
   prose and the compact beat tray. The card keeps one stable silhouette while
   it saves, awaits projection, becomes accepted, resolves, or visibly expires. */
.ruling-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 18px;
  margin: 10px 12px 0;
  padding: 15px 17px;
  border: 1px solid var(--flame-dim);
  border-left: 4px solid var(--flame);
  border-radius: 3px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--flame) 7%, transparent), transparent 48%),
    var(--oak-2);
  color: var(--chrome-ink);
  box-shadow: 0 7px 20px rgba(0, 0, 0, .16);
}
.ruling-card__head {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 14px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--oak-3);
}
.ruling-card__status {
  color: var(--flame);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .22em;
}
.ruling-card__address {
  color: var(--verdigris);
  font-size: 9px;
  letter-spacing: .13em;
}
.ruling-card__attempt {
  grid-column: 1 / -1;
  margin: 0;
  padding: 9px 12px;
  border-left: 2px solid var(--verdigris);
  background: color-mix(in srgb, var(--verdigris) 6%, transparent);
  font: italic 16px/1.45 Palatino, Georgia, serif;
}
.ruling-card__section h3 {
  margin: 0 0 4px;
  color: var(--chrome-dim);
  font-size: 8px;
  letter-spacing: .18em;
}
.ruling-card__section ul {
  margin: 0;
  padding-left: 17px;
  color: var(--chrome-ink);
  font: 13px/1.45 Palatino, Georgia, serif;
}
.ruling-card__section li + li { margin-top: 3px; }
.ruling-card__response-status,
.ruling-card__stale-reason,
.ruling-card__controls,
.ruling-card__host-controls {
  grid-column: 1 / -1;
}
.ruling-card__response-status {
  padding-top: 9px;
  border-top: 1px dashed var(--oak-3);
  color: var(--verdigris);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .14em;
}
.ruling-card__response-status.delayed,
.ruling-card__response-status.stale { color: var(--wax); }
.ruling-card__controls,
.ruling-card__host-controls { display: flex; flex-wrap: wrap; gap: 7px; }
.ruling-card__controls button,
.ruling-card__host-controls button {
  min-width: 92px;
  padding: 8px 13px;
  border: 1px solid var(--verdigris);
  border-radius: 2px;
  background: var(--verdigris-deep);
  color: var(--slip);
  font: inherit;
  font-size: 10px;
  letter-spacing: .1em;
  cursor: pointer;
}
.ruling-card__controls button:hover { background: var(--verdigris); }
.ruling-card__controls button:disabled,
.ruling-card__host-controls button:disabled {
  opacity: .5;
  cursor: default;
}
.ruling-card__host-controls button {
  border-color: var(--wax);
  background: transparent;
  color: var(--wax);
}
.ruling-card.accepted { border-left-color: var(--verdigris); opacity: .82; }
.ruling-card.resolved {
  border-color: color-mix(in srgb, var(--verdigris) 62%, var(--oak-3));
  border-left-color: var(--verdigris);
}
.ruling-card.resolved .ruling-card__status { color: var(--verdigris); }
.ruling-card__result-section {
  padding-top: 9px;
  border-top: 1px dashed var(--oak-3);
}
.ruling-card__roll {
  margin-top: 3px;
  color: var(--chrome-dim);
  font: 10px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
}
.ruling-card.stale {
  border-color: color-mix(in srgb, var(--wax) 55%, var(--oak-3));
  border-left-color: var(--wax);
  background: color-mix(in srgb, var(--wax) 5%, var(--oak-2));
}
.ruling-card.stale .ruling-card__status { color: var(--wax); }
.ruling-card__stale-reason {
  margin: 0;
  color: var(--wax);
  font: italic 13px/1.45 Palatino, Georgia, serif;
}
.ic-prompt-wait {
  margin: 6px 12px 0;
  padding: 7px 11px;
  border: 1px solid var(--oak-3);
  border-left: 3px solid var(--verdigris);
  color: var(--chrome-dim);
  font-size: 9px;
  letter-spacing: .1em;
}
.ic-prompt-wait.locked { border-left-color: var(--wax); color: var(--wax); }
@media (max-width: 680px) {
  .ruling-card { grid-template-columns: 1fr; }
}

/* identity accent stripe (party rail PC card + in-scene rows); only the
   dynamic `background:<accent>` is set inline. The porch's own scoped
   `.porch .seat .stripe` still wins there by specificity. */
.stripe { width: 4px; height: 40px; flex: none; border-radius: 2px; }
.stripe.sm { width: 3px; height: 30px; margin-right: 8px; }
/* in-scene NPC name (the mockup's `.npc-row .st b` gives it chrome-ink weight;
   this adds the serif face the rail uses). */
.npcname { font-family: "Iowan Old Style", Palatino, Georgia, serif; }

/* ============ mobile drawer ============ */
.mobbtn {
  background: none; border: 1px solid var(--oak-3); color: var(--chrome-dim);
  padding: 3px 10px; border-radius: 2px; font-size: 10px; letter-spacing: .1em;
  font-family: ui-monospace, "SF Mono", Menlo, monospace; cursor: pointer;
}
.mobbtn:hover { color: var(--flame); border-color: var(--flame-dim); }
/* only shown when the corresponding rail is hidden by the shell breakpoints */
.btn-party, .btn-map { display: none; }
@media (max-width: 1120px) { .btn-map { display: inline-flex; } }
@media (max-width: 820px) { .btn-party { display: inline-flex; } }

.drawer-overlay { position: fixed; inset: 0; z-index: 60; }
.drawer-scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, .55); }
.drawer {
  position: absolute; top: 0; right: 0; height: 100%;
  width: min(88vw, 360px);
  background: var(--oak); background-image: var(--grain);
  border-left: 1px solid var(--oak-3);
  box-shadow: -10px 0 30px rgba(0, 0, 0, .45);
  display: flex; flex-direction: column; overflow: hidden;
}
.drawer-head {
  flex: none; display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid var(--oak-3);
}
.drawer-title {
  font-family: "Iowan Old Style", Palatino, Georgia, serif;
  font-variant-caps: small-caps; letter-spacing: .1em; font-size: 17px;
  color: var(--chrome-ink);
}
.drawer-close {
  background: none; border: 0; color: var(--chrome-dim); font-size: 20px;
  line-height: 1; cursor: pointer;
}
.drawer-close:hover { color: var(--flame); }
.drawer-body { flex: 1; overflow-y: auto; padding: 10px 14px; }
/* inside the drawer the party rail drops its column chrome and own scroll —
   and must re-show itself (the shell's `@media(max-width:820px){.party{
   display:none}}` hides every .party, including this one). */
.drawer-body .party { display: block; border: 0; padding: 0; overflow: visible; }
/* the map/ledger footer count is styled only as `.ledger .foot` in the shell
   CSS; inside the drawer the rail body renders with no `.ledger` ancestor, so
   mirror it here (otherwise "N of M chambers known" is unstyled on phones). */
.drawer-body .foot { margin-top: 10px; font-size: 9px; letter-spacing: .1em; color: var(--chrome-dim); line-height: 1.8; }
.drawer-body .foot i { color: var(--verdigris); font-style: normal; }

/* INVITE button + transient "copied" note in the header. */
.invite { background: none; border: 0; color: var(--chrome-dim); display: inline-flex; align-items: center; gap: 6px; letter-spacing: .2em; font-size: 10px; cursor: pointer; padding: 2px 4px; }
.invite:hover { color: var(--flame); }

/* Mid-session disconnect (npc-04): loud, unmissable, actionable. */
.connlost {
  background: var(--wax, #8b3a2e); color: #fff; text-align: center;
  padding: 8px 12px; font-size: 11px; letter-spacing: .14em;
}

/* The GM-composing indicator: shown in the stream between a committed beat
   and its narration (or first streamed delta), so the wait is never dead
   air. The trailing dots animate via a content keyframe. */
.composing {
  padding: 10px 22px 16px;
  color: var(--chrome-dim);
  font-family: Palatino, Georgia, serif;
  font-style: italic;
  font-size: 14px;
}
.composing::after {
  display: inline-block;
  width: 1.5em;
  text-align: left;
  content: '…';
  animation: composing-dots 1.6s steps(1, end) infinite;
}
@keyframes composing-dots {
  0% { content: ''; }
  25% { content: '.'; }
  50% { content: '..'; }
  75% { content: '…'; }
}

/* ============ hosted home / lobby / invitation ============
   A candlelit campaign registry: the same oak, ink and verdigris language as
   the table, but with the breathing room of a bookplate rather than a game
   dashboard. No generic SaaS cards or purple-gradient chrome. */
.hosted-home,
.hosted-invite,
.hosted-table-loading {
  /* A hard viewport cap: the shell above is overflow:hidden, so this view
     must scroll internally — if it merely grew with its content, everything
     below the fold (the sign-in action) would be unreachable. */
  height: 100vh;
  overflow-y: auto;
  display: grid;
  place-items: safe center;
  padding: clamp(24px, 6vw, 72px);
  box-sizing: border-box;
  background:
    radial-gradient(circle at 50% 12%, rgba(175, 127, 54, .12), transparent 34rem),
    var(--oak);
}
.home-card,
.invite-card,
.table-loading-card {
  width: min(680px, 100%);
  position: relative;
  padding: clamp(30px, 7vw, 76px);
  box-sizing: border-box;
  border: 1px solid var(--oak-3);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .025), transparent 40%),
    var(--oak-2);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .35);
}
.home-card::before,
.invite-card::before {
  content: "❦";
  position: absolute;
  top: 20px;
  right: 26px;
  color: var(--flame-dim);
  font-size: 26px;
}
.hosted-home .brand,
.hosted-invite .brand,
.hosted-table-loading .brand,
.hosted-lobby .brand {
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  letter-spacing: .22em;
  font-size: 25px;
  color: var(--chrome-ink);
}
.hosted-home .sub,
.hosted-invite .sub,
.hosted-lobby .sub {
  margin-top: 5px;
  color: var(--chrome-dim);
  font-size: 9px;
  letter-spacing: .24em;
  text-transform: uppercase;
}
.hosted-home h1,
.hosted-invite h1,
.hosted-lobby h1,
.empty-registry h2 {
  margin: 52px 0 22px;
  max-width: 13ch;
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  font-size: clamp(38px, 7vw, 68px);
  line-height: .98;
  font-weight: 500;
  color: var(--chrome-ink);
}
.hosted-home h1 em { color: var(--flame); font-weight: 500; }
.home-copy,
.invite-adventure {
  max-width: 54ch;
  font-family: Palatino, Georgia, serif;
  font-size: 17px;
  line-height: 1.7;
  color: var(--chrome-ink);
}
.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  margin-top: 24px;
  padding: 13px 20px;
  border: 1px solid var(--verdigris);
  border-radius: 2px;
  background: var(--verdigris-deep);
  color: var(--slip);
  font: inherit;
  font-size: 11px;
  letter-spacing: .14em;
  text-decoration: none;
  cursor: pointer;
}
.primary-action:hover,
.secondary-action:hover { background: var(--verdigris); }
.primary-action.compact { margin-top: 0; padding: 10px 14px; }
.primary-action.form-action { width: 100%; }
.home-note,
.loading-copy {
  margin-top: 24px;
  max-width: 58ch;
  color: var(--chrome-dim);
  font: italic 13px/1.6 Palatino, Georgia, serif;
}
.hosted-error,
.hosted-notice {
  margin: 16px 0;
  padding: 10px 12px;
  border-left: 3px solid var(--wax);
  color: var(--chrome-ink);
  background: color-mix(in srgb, var(--wax) 10%, transparent);
  font-size: 12px;
}
.hosted-notice {
  border-color: var(--verdigris);
  background: color-mix(in srgb, var(--verdigris) 10%, transparent);
}
.quiet-link,
.quiet-button {
  border: 0;
  background: none;
  color: var(--chrome-dim);
  font: inherit;
  font-size: 10px;
  letter-spacing: .14em;
  text-decoration: none;
  cursor: pointer;
}
.quiet-link:hover,
.quiet-button:hover { color: var(--flame); }

.hosted-lobby {
  height: 100vh;
  overflow-y: auto;
  background: var(--oak);
}
.lobby-head {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px clamp(22px, 6vw, 76px);
  border-bottom: 1px solid var(--oak-3);
  background: color-mix(in srgb, var(--oak) 92%, transparent);
  backdrop-filter: blur(12px);
}
.lobby-body { width: min(1020px, 100%); margin: 0 auto; padding: 46px 24px 90px; box-sizing: border-box; }
.lobby-title { display: flex; justify-content: space-between; align-items: end; gap: 20px; }
.hosted-lobby h1 { margin: 0; font-size: clamp(38px, 6vw, 60px); }
.secondary-action { margin: 0; background: transparent; color: var(--verdigris); }
.table-registry { margin-top: 36px; display: grid; gap: 14px; }
.registry-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px 28px;
  padding: 24px;
  border: 1px solid var(--oak-3);
  background: var(--oak-2);
}
.registry-card h2 { margin: 6px 0 5px; font: 500 25px/1.1 "Iowan Old Style", Palatino, Georgia, serif; color: var(--chrome-ink); }
.registry-card p { margin: 0; color: var(--chrome-dim); font-size: 11px; }
.role-stamp { color: var(--flame); font-size: 8px; letter-spacing: .2em; }
.registry-actions { display: flex; flex-direction: column; align-items: stretch; justify-content: center; gap: 8px; }
.invite-editor { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr auto; gap: 8px; padding-top: 16px; border-top: 1px dashed var(--oak-3); }
.invite-editor input { min-width: 0; background: var(--oak); border: 1px solid var(--oak-3); color: var(--chrome-ink); padding: 10px 12px; font: inherit; }
.invite-editor button { border: 1px solid var(--verdigris); background: var(--verdigris-deep); color: var(--slip); padding: 8px 14px; letter-spacing: .1em; }
.invite-editor small { grid-column: 1 / -1; color: var(--chrome-dim); font: italic 11px Palatino, Georgia, serif; }
.invite-ledger { grid-column: 1 / -1; display: grid; gap: 7px; margin-top: 8px; }
.invite-status-row { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; padding: 11px 12px; border: 1px solid var(--oak-3); background: color-mix(in srgb, var(--oak) 72%, transparent); }
.invite-status-copy { display: grid; gap: 3px; min-width: 0; }
.invite-status-copy strong { overflow: hidden; color: var(--chrome-ink); font: 500 14px "Iowan Old Style", Palatino, Georgia, serif; text-overflow: ellipsis; }
.invite-status-copy .invite-failure { color: var(--wax); }
.invite-status-actions { display: flex; gap: 6px; }
.invite-status-actions button:last-child { border-color: var(--wax); background: transparent; color: var(--wax); }
.empty-registry { margin-top: 42px; padding: 34px; border: 1px dashed var(--oak-3); }
.empty-registry h2 { margin: 0 0 8px; font-size: 28px; }

.invite-card h1 { margin-bottom: 18px; }
.invite-adventure { color: var(--flame); font-variant-caps: small-caps; letter-spacing: .04em; }
.invite-seats { display: grid; gap: 8px; margin: 24px 0 4px; }
.invite-seat { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; width: 100%; padding: 13px 15px; border: 1px solid var(--oak-3); background: transparent; color: var(--chrome-ink); cursor: pointer; }
.invite-seat.selected { border-color: var(--verdigris); background: color-mix(in srgb, var(--verdigris) 8%, transparent); }
.seat-glyph { color: var(--flame); font-size: 18px; }
.seat-name { text-align: left; font: 600 17px "Iowan Old Style", Palatino, Georgia, serif; }
.seat-choice { color: var(--chrome-dim); font-size: 8px; letter-spacing: .15em; }
.invite-card .quiet-link { display: inline-block; margin-top: 18px; }

@media (max-width: 680px) {
  .registry-card { grid-template-columns: 1fr; }
  .registry-actions { align-items: stretch; }
  .invite-editor { grid-template-columns: 1fr; }
  .invite-editor small { grid-column: auto; }
  .invite-status-row { grid-template-columns: 1fr; }
  .invite-status-actions { justify-content: flex-start; }
  .lobby-title { align-items: stretch; flex-direction: column; }
  .secondary-action { align-self: flex-start; }
}

/* optimistic-input-echo.md: the sender's own just-sent words, visibly
   provisional — dimmed with a pulsing edge — until the durable ack's
   authoritative paper replaces them (or a timeout takes them back). */
.paper-msg.pending {
  opacity: 0.6;
  animation: pending-edge 1.6s ease-in-out infinite;
}
@keyframes pending-edge {
  0%, 100% { border-left-color: color-mix(in srgb, currentColor 25%, transparent); }
  50% { border-left-color: currentColor; }
}

/* The ack-timeout banner: inline, directly above the input bar — unmissable,
   adjacent to the restored words, never a modal. */
.ack-banner {
  margin: 6px 12px 0;
  padding: 8px 12px;
  border: 1px solid #b3541e;
  border-left-width: 4px;
  border-radius: 4px;
  background: rgba(179, 84, 30, 0.12);
  color: #e8b48a;
  font-size: 13px;
}

/* The invitation share dialog: the copyable secure link the email also
   carries, shown once at mint time. */
.share-dialog-backdrop {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 8, 6, 0.65);
  z-index: 40;
}
.share-dialog {
  max-width: 460px;
  margin: 16px;
  padding: 20px 22px;
  border: 1px solid #6b5335;
  border-radius: 6px;
  background: #171310;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}
.share-link {
  margin: 12px 0;
  padding: 10px 12px;
  border: 1px dashed #6b5335;
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  word-break: break-all;
  user-select: all;
}
.share-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}
