/* SIG. The app is a page: a classification banner at its head and foot, a gunmetal desk, lit paper for documents.
   One accent (brass) for what's live; oxblood only ever for the banner; a character's ink only ever for their name. */
@font-face { font-family: Archivo; src: url(/fonts/archivo.woff2) format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }
@font-face { font-family: Tinos; src: url(/fonts/tinos.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: Tinos; src: url(/fonts/tinos-italic.woff2) format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: Tinos; src: url(/fonts/tinos-bold.woff2) format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --desk: #22272B; --well: #191D20; --raise: #2B3136; --line: #3A4046; --line-soft: #2F353A;
  --type: #DAD7CF; --dim: #A5AAB1; --faint: #898F95;
  --brass: #C9B27C; --oxblood: #8E1B1B; --sheet: #ECECE8; --ink: #16181A;
  --on: #7FA886; --idle: #C8A45A; --dnd: #C4563F;
  --me: #C9B27C;                      /* the active character's ink */
  --sans: Archivo, "Helvetica Neue", Arial, sans-serif; --serif: Tinos, "Times New Roman", Times, serif;
  --fs: 15px; --t: 160ms; --ease: cubic-bezier(.2, .7, .2, 1);
  /* The type scale: five sizes, each a share of the Text size setting (--fs). Nothing is smaller than micro. */
  --fs-micro: .75rem;                 /* tracked capitals: labels, tabs, buttons, the banner */
  --fs-small: .84rem;                 /* what sits beside the point: times, notes, who else is here */
  --fs-sub: .92rem;                   /* secondary reading */
  --fs-lead: 1.14rem;                 /* narration and the serif lines over a picture */
  --track: .12em;                     /* the one letter-spacing for capitals */
  --on-plate: #F4F1E9; --on-plate-dim: rgba(244, 241, 233, .84);       /* words on a photograph are never grey */
  --pad: 20px; --bar-h: 52px;
}
* { box-sizing: border-box; margin: 0; }
html { font-size: var(--fs); }
html, body { height: 100%; }
body { background: var(--desk); color: var(--type); font: 400 var(--fs)/1.5 var(--sans); font-stretch: 96%; -webkit-font-smoothing: antialiased;
  text-size-adjust: 100%; overflow: hidden; overscroll-behavior: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus { outline: none; }
:focus-visible { outline: 1px solid var(--brass); outline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--brass) 40%, transparent); }
* { scrollbar-width: thin; scrollbar-color: var(--line) transparent; }

/* type roles */
.label { font-size: var(--fs-micro); letter-spacing: var(--track); text-transform: uppercase; color: var(--dim); font-weight: 500; font-stretch: 88%; }
.display { font-stretch: 62%; font-weight: 700; text-transform: uppercase; letter-spacing: .01em; line-height: .92; }
.serif { font-family: var(--serif); }
.dim { color: var(--dim); } .faint { color: var(--faint); }
.num { font-variant-numeric: tabular-nums; }

/* the page frame */
#app { display: grid; grid-template-rows: auto var(--bar-h) 1fr auto; height: 100dvh; }
.banner { background: var(--oxblood); color: #F3EDE4; text-align: center; font-size: var(--fs-micro); font-weight: 600; letter-spacing: var(--track); padding: 4px 12px;
  font-stretch: 90%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: background var(--t); }
.banner[data-kind="open"] { background: #3C4349; color: var(--type); }
.banner[data-kind="unsecured"] { background: #6B5A1E; }
.bar { display: flex; align-items: center; gap: 28px; padding: 0 var(--pad); border-bottom: 1px solid var(--line); background: var(--desk); min-width: 0; }
.brand { display: flex; align-items: center; gap: 10px; flex: none; }
.brand img { width: 30px; height: 30px; opacity: .92; }
.brand b { font-stretch: 62%; font-weight: 800; font-size: 1.5rem; letter-spacing: .06em; }
.views { display: flex; gap: 4px; height: 100%; }
.views button { position: relative; padding: 0 14px; height: 100%; font-size: var(--fs-micro); letter-spacing: var(--track); text-transform: uppercase; font-weight: 600; color: var(--dim);
  font-stretch: 88%; transition: color var(--t); }
.views button:hover { color: var(--type); }
.views button[aria-current="true"] { color: var(--type); }
.views button::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: -1px; height: 2px; background: var(--brass); transform: scaleX(0); transform-origin: left;
  transition: transform 240ms var(--ease); }
.views button[aria-current="true"]::after { transform: scaleX(1); }
.count { display: inline-block; min-width: 17px; padding: 0 5px; margin-left: 7px; border-radius: 9px; background: var(--brass); color: var(--ink); font-size: var(--fs-micro); font-weight: 700;
  letter-spacing: 0; line-height: 17px; text-align: center; vertical-align: 1px; }
.bar .spacer { flex: 1; }
.zulu { font-size: var(--fs-small); color: var(--dim); letter-spacing: .08em; white-space: nowrap; }
.me-chip { display: flex; align-items: center; gap: 10px; padding: 6px 10px 6px 6px; border: 1px solid var(--line); min-width: 0; transition: border-color var(--t), background var(--t); }
.me-chip:hover { border-color: var(--me); background: var(--raise); }
.me-chip .who { text-align: left; min-width: 0; }
.me-chip .who b { display: block; font-size: var(--fs-small); letter-spacing: .1em; font-weight: 700; color: var(--me); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-chip .who span { display: block; font-size: var(--fs-micro); color: var(--dim); white-space: nowrap; }
.iconbtn { width: 34px; height: 34px; display: grid; place-items: center; color: var(--dim); border: 1px solid transparent; transition: color var(--t), border-color var(--t); flex: none; }
.iconbtn:hover { color: var(--type); border-color: var(--line); }
.iconbtn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.stage { position: relative; min-height: 0; overflow: hidden; }
.view { position: absolute; inset: 0; display: grid; min-height: 0; animation: view-in 260ms var(--ease); }
@keyframes view-in { from { opacity: 0; transform: translateY(6px); } }
.copyline { display: flex; justify-content: center; gap: 10px; padding: 5px 12px; font-size: var(--fs-micro); letter-spacing: .1em; color: var(--faint); text-transform: uppercase;
  border-top: 1px solid var(--line-soft); white-space: nowrap; overflow: hidden; }
.copyline i { font-style: normal; color: var(--line); }
.tabs { display: none; }

/* faces: a monogram tile in the character's ink, or their portrait */
.face { --c: var(--dim); position: relative; flex: none; width: 34px; height: 34px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 16%, var(--well));
  color: var(--c); font-stretch: 70%; font-weight: 700; font-size: var(--fs-small); letter-spacing: .04em; border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); overflow: hidden; }
.face img { width: 100%; height: 100%; object-fit: cover; display: block; }
.face.lg { width: 96px; height: 96px; font-size: 1.9rem; } .face.xl { width: 168px; height: 168px; font-size: 3.2rem; } .face.sm { width: 24px; height: 24px; font-size: var(--fs-micro); }
.lamp { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); flex: none; }
.lamp[data-mode="online"] { background: var(--on); box-shadow: 0 0 0 3px color-mix(in srgb, var(--on) 22%, transparent); }
.lamp[data-mode="idle"] { background: var(--idle); } .lamp[data-mode="dnd"] { background: var(--dnd); }

/* controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 16px; border: 1px solid var(--line); font-size: var(--fs-micro); letter-spacing: var(--track);
  text-transform: uppercase; font-weight: 600; font-stretch: 88%; color: var(--type); background: transparent; transition: background var(--t), border-color var(--t), color var(--t); white-space: nowrap; }
.btn:hover { border-color: var(--type); background: var(--raise); }
.btn.go { background: var(--brass); border-color: var(--brass); color: var(--ink); }
.btn.go:hover { background: #D9C48F; border-color: #D9C48F; }
.btn.quiet { border-color: transparent; color: var(--dim); } .btn.quiet:hover { color: var(--type); background: var(--raise); }
.btn.danger:hover { border-color: var(--dnd); color: #E88A76; }
.btn.sm { height: 28px; padding: 0 10px; font-size: var(--fs-micro); }
.btn:disabled { opacity: .4; pointer-events: none; }
.field { width: 100%; height: 38px; padding: 0 12px; background: var(--well); border: 1px solid var(--line); color: var(--type); transition: border-color var(--t); }
textarea.field { height: auto; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.field:focus { border-color: var(--brass); }
.field::placeholder { color: var(--faint); }
select.field { appearance: none; padding-right: 28px; background-image: linear-gradient(45deg, transparent 50%, var(--dim) 50%), linear-gradient(135deg, var(--dim) 50%, transparent 50%);
  background-position: calc(100% - 15px) 16px, calc(100% - 10px) 16px; background-size: 5px 5px; background-repeat: no-repeat; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 9px; border: 1px solid var(--line); font-size: var(--fs-micro); letter-spacing: .08em; color: var(--dim); white-space: nowrap;
  transition: border-color var(--t), color var(--t); }
button.chip:hover { color: var(--type); border-color: var(--dim); }
.chip.on { border-color: var(--brass); color: var(--brass); }
.switch { position: relative; width: 38px; height: 20px; border: 1px solid var(--line); background: var(--well); flex: none; transition: border-color var(--t); }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 12px; height: 12px; background: var(--faint); transition: transform var(--t) var(--ease), background var(--t); }
.switch[aria-checked="true"] { border-color: var(--brass); } .switch[aria-checked="true"]::after { transform: translateX(18px); background: var(--brass); }
.rule { height: 1px; background: var(--line); border: 0; }

/* over the app: menus, sheets, dialogs, toasts */
#over { position: fixed; inset: 0; pointer-events: none; z-index: 50; }
#over > * { pointer-events: auto; }
.scrim { position: absolute; inset: 0; background: rgba(12, 14, 16, .62); animation: fade 160ms; }
@keyframes fade { from { opacity: 0; } }
.menu { position: absolute; min-width: 220px; max-width: 340px; max-height: 70vh; overflow: auto; background: var(--well); border: 1px solid var(--line); padding: 5px 0;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .45); animation: pop 140ms var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(-4px); } }
.menu button, .menu .item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 14px; text-align: left; font-size: var(--fs-sub); color: var(--type); }
.menu button:hover, .menu button.sel { background: var(--raise); }
.menu button small { margin-left: auto; color: var(--dim); font-size: var(--fs-micro); letter-spacing: .06em; }
.menu .head { padding: 9px 14px 5px; }
.menu hr { border: 0; height: 1px; background: var(--line-soft); margin: 5px 0; }
.menu button.danger { color: #E08572; }
.dialog { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); display: flex; flex-direction: column;
  background: var(--desk); border: 1px solid var(--line); box-shadow: 0 30px 80px rgba(0, 0, 0, .5); animation: rise 220ms var(--ease); }
.dialog.wide { width: min(880px, calc(100vw - 32px)); }
@keyframes rise { from { opacity: 0; transform: translate(-50%, calc(-50% + 10px)); } }
.dialog > header { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.dialog > header h2 { font-size: var(--fs-small); letter-spacing: var(--track); text-transform: uppercase; font-weight: 700; flex: 1; }
.dialog > .body { padding: 18px; overflow: auto; display: grid; gap: 14px; }
.dialog > footer { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); }
.formrow { display: grid; gap: 6px; }
.formrow.two { grid-template-columns: 1fr 1fr; gap: 12px; }
#toasts { position: fixed; right: 18px; bottom: 44px; display: grid; gap: 8px; z-index: 60; justify-items: end; pointer-events: none; }
.toast { pointer-events: auto; max-width: 360px; padding: 10px 14px; background: var(--well); border: 1px solid var(--line); border-left: 2px solid var(--brass); font-size: var(--fs-sub);
  box-shadow: 0 14px 40px rgba(0, 0, 0, .4); animation: toast 260ms var(--ease); cursor: pointer; }
.toast b { display: block; font-size: var(--fs-micro); letter-spacing: var(--track); text-transform: uppercase; color: var(--dim); font-weight: 600; margin-bottom: 2px; }
.toast.bad { border-left-color: var(--dnd); }
@keyframes toast { from { opacity: 0; transform: translateX(14px); } }

/* TRAFFIC: nets and lines on the left, the conversation on the right */
.traffic { grid-template-columns: 300px 1fr; }
.side { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line); background: var(--well); }
.side .scroll { overflow: auto; flex: 1; padding-bottom: 20px; }
.side h3 { display: flex; align-items: center; justify-content: space-between; padding: 18px 16px 6px; }
.side h3 button { color: var(--dim); font-size: var(--fs-lead); line-height: 1; width: 22px; height: 22px; }
.side h3 button:hover { color: var(--brass); }
.row { position: relative; display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 16px; text-align: left; transition: background var(--t); }
.row:hover { background: color-mix(in srgb, var(--raise) 60%, transparent); }
.row[aria-current="true"] { background: var(--raise); }
.row[aria-current="true"]::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--brass); }
.row .t { min-width: 0; flex: 1; }
.row .t b { display: block; font-weight: 500; font-size: var(--fs-sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .t span { display: block; font-size: var(--fs-micro); color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row.unread .t b { font-weight: 700; }
.row .glyph { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--line); color: var(--dim); font-size: var(--fs-micro); letter-spacing: .08em; flex: none; font-weight: 600; }
.empty { display: grid; place-content: center; justify-items: center; gap: 10px; text-align: center; padding: 40px; color: var(--dim); height: 100%; }
.empty img { width: 120px; opacity: .1; margin-bottom: 8px; }
.empty .display { font-size: 2.2rem; color: var(--line); }

/* a conversation */
.convo { display: grid; grid-template-rows: auto 1fr auto; min-height: 0; min-width: 0; position: relative; }
.convo-head { display: flex; align-items: center; gap: 14px; padding: 12px var(--pad); border-bottom: 1px solid var(--line); min-width: 0; }
.convo-head h2 { font-size: 1.05rem; font-weight: 600; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.convo-head .sub { font-size: var(--fs-micro); color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.convo-head .grow { flex: 1; min-width: 0; }
.log { overflow-y: auto; overflow-x: hidden; padding: 18px var(--pad) 10px; scroll-behavior: auto; min-height: 0; }
.log-inner { max-width: 860px; margin: 0 auto; display: flex; flex-direction: column; min-height: 100%; justify-content: flex-end; }
.day { align-self: center; margin: 18px 0 10px; font-size: var(--fs-micro); letter-spacing: var(--track); color: var(--faint); text-transform: uppercase; }
.msg { position: relative; display: grid; grid-template-columns: 54px 1fr; column-gap: 12px; padding: 2px 8px 2px 0; border-left: 2px solid transparent; }
.msg.fresh { animation: msg-in 260ms var(--ease); }
@keyframes msg-in { from { opacity: 0; transform: translateY(4px); } }
.msg:hover { background: color-mix(in srgb, var(--raise) 45%, transparent); }
.msg .at { font-size: var(--fs-micro); color: var(--faint); text-align: right; padding-top: 4px; letter-spacing: .04em; opacity: 0; transition: opacity var(--t); }
.msg:hover .at, .msg.first .at { opacity: 1; }
.msg .at.shown { display: flex; justify-content: flex-end; padding-top: 1px; } .msg .at.shown .face { width: 30px; height: 30px; }
.scene-strip .cast .face { width: 34px; height: 34px; }
.msg.first { margin-top: 12px; }
.msg .who { font-size: var(--fs-micro); font-weight: 700; letter-spacing: var(--track); text-transform: uppercase; color: var(--c, var(--dim)); font-stretch: 88%; }
.msg .who small { font-weight: 400; letter-spacing: .04em; text-transform: none; color: var(--faint); margin-left: 8px; font-size: var(--fs-micro); }
.msg .body { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; }
.msg .body .mention { color: var(--brass); font-weight: 600; }
.msg .body a { color: var(--brass); }
.msg.pending { opacity: .55; } .msg.failed .body { color: #E08572; }
.msg.action .body { font-style: italic; color: color-mix(in srgb, var(--type) 82%, var(--c, var(--dim))); }
.msg.aside .body { color: var(--dim); font-size: var(--fs-sub); }
.msg.mine { border-left-color: color-mix(in srgb, var(--me) 55%, transparent); }
.msg.narration { grid-template-columns: 54px 1fr; }
.msg.narration .body { font-family: var(--serif); font-size: var(--fs-lead); line-height: 1.55; color: #E6E2D8; font-style: italic; max-width: 62ch; }
.msg.voice .who { font-style: normal; }
.msg.eyes { border-left-color: var(--brass); background: color-mix(in srgb, var(--brass) 6%, transparent); }
.msg.eyes .who::after { content: "EYES ONLY"; margin-left: 10px; color: var(--brass); font-size: var(--fs-micro); letter-spacing: var(--track); }
.msg.deleted .body { color: var(--faint); font-style: italic; }
.msg .quote { display: block; margin: 2px 0 3px; padding-left: 9px; border-left: 2px solid var(--line); color: var(--dim); font-size: var(--fs-small); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.msg .meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 3px; }
.react { display: inline-flex; gap: 5px; align-items: center; height: 22px; padding: 0 7px; border: 1px solid var(--line); font-size: var(--fs-small); }
.react.me { border-color: var(--brass); }
.msg .edited, .msg .pin { font-size: var(--fs-micro); color: var(--faint); letter-spacing: .08em; margin-left: 8px; }
.msg .tools { position: absolute; right: 8px; top: -12px; display: none; background: var(--well); border: 1px solid var(--line); }
.msg:hover .tools { display: flex; }
.msg .tools button { width: 28px; height: 26px; display: grid; place-items: center; color: var(--dim); font-size: var(--fs-small); }
.msg .tools button:hover { color: var(--brass); background: var(--raise); }
.msg .files { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0; }
.msg .files img { max-width: 320px; max-height: 260px; display: block; border: 1px solid var(--line); cursor: zoom-in; }
.msg .files a.file { display: inline-flex; gap: 8px; align-items: center; padding: 8px 12px; border: 1px solid var(--line); font-size: var(--fs-small); text-decoration: none; }
.sys { align-self: center; margin: 8px 0; font-size: var(--fs-micro); color: var(--faint); letter-spacing: .06em; text-align: center; }
.sys b { color: var(--dim); font-weight: 600; }
.slug { align-self: stretch; display: flex; align-items: center; gap: 14px; margin: 22px 0 6px 66px; font-size: var(--fs-micro); letter-spacing: var(--track); color: var(--dim); text-transform: uppercase; font-weight: 600; }
.slug::after { content: ""; flex: 1; height: 1px; background: var(--line-soft); }
.newline { align-self: stretch; display: flex; align-items: center; gap: 10px; margin: 10px 0; color: var(--brass); font-size: var(--fs-micro); letter-spacing: var(--track); }
.newline::before, .newline::after { content: ""; flex: 1; height: 1px; background: color-mix(in srgb, var(--brass) 40%, transparent); }
.more { align-self: center; margin-bottom: 10px; }
.typing { height: 20px; padding: 0 var(--pad) 0 calc(var(--pad) + 66px); font-size: var(--fs-micro); color: var(--dim); max-width: 900px; margin: 0 auto; width: 100%; }
.typing i { font-style: normal; animation: blink 1.2s infinite; } @keyframes blink { 50% { opacity: .25; } }

/* the composer */
.composer { padding: 4px var(--pad) 14px; }
.composer-in { max-width: 860px; margin: 0 auto; border: 1px solid var(--line); background: var(--well); transition: border-color var(--t); }
.composer-in:focus-within { border-color: var(--me); }
.composer .context { display: flex; align-items: center; gap: 8px; padding: 7px 10px 0; flex-wrap: wrap; }
.composer .replying { display: flex; align-items: center; gap: 8px; padding: 6px 12px; font-size: var(--fs-small); color: var(--dim); border-bottom: 1px solid var(--line-soft); }
.composer .replying span { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.composer textarea { display: block; width: 100%; min-height: 44px; max-height: 40vh; padding: 10px 12px; background: transparent; border: 0; resize: none; line-height: 1.5; }
.composer .foot { display: flex; align-items: center; gap: 6px; padding: 0 8px 7px 10px; }
.composer .hint { flex: 1; font-size: var(--fs-micro); color: var(--faint); letter-spacing: .04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.voice-chip { --c: var(--me); display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 10px 0 8px; border: 1px solid color-mix(in srgb, var(--c) 55%, transparent); color: var(--c);
  font-size: var(--fs-micro); font-weight: 700; letter-spacing: var(--track); text-transform: uppercase; }
.voice-chip:hover { background: color-mix(in srgb, var(--c) 12%, transparent); }
.voice-chip::before { content: ""; width: 6px; height: 6px; background: var(--c); }
.suggest { position: absolute; bottom: 100%; left: 0; }

/* THEATRE: places on the left, the place or its scene on the right */
.theatre { grid-template-columns: 340px 1fr; }
.globe-wrap { position: relative; aspect-ratio: 1 / .86; border-bottom: 1px solid var(--line); background: radial-gradient(circle at 50% 46%, #20262B 0, var(--well) 70%); overflow: hidden; flex: none; }
.globe-wrap canvas { width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
.globe-wrap canvas:active { cursor: grabbing; }
.globe-wrap .coords { position: absolute; left: 14px; bottom: 10px; pointer-events: none; font-size: var(--fs-micro); letter-spacing: var(--track); color: var(--faint); }
/* the search and, for the host, a new place: one row under the globe, nothing laid over the globe itself */
.find-row { display: flex; align-items: stretch; border-bottom: 1px solid var(--line); flex: none; }
.find-row .finder { flex: 1; min-width: 0; border: 0; }
.find-row .add { flex: none; padding: 0 16px; border-left: 1px solid var(--line); font-size: var(--fs-micro); letter-spacing: var(--track); text-transform: uppercase; font-weight: 600; color: var(--dim); white-space: nowrap; transition: color var(--t), background var(--t); }
.find-row .add:hover { color: var(--brass); background: var(--raise); }
.place { position: relative; min-height: 0; display: grid; grid-template-rows: auto 1fr; overflow: hidden; }
.plate { position: relative; height: clamp(180px, 34vh, 380px); overflow: hidden; background: #14181B; flex: none; transition: height 360ms var(--ease); }
.place.poster { grid-template-rows: 1fr; }
.place.poster .plate { height: auto; min-height: 0; }
.plate .img { position: absolute; inset: -6%; background-size: cover; background-position: center; will-change: transform; animation: drift 80s ease-in-out infinite alternate; transition: opacity 1100ms ease, filter 2s; }
@keyframes drift { from { transform: scale(1.02) translate(-1.5%, -1%); } to { transform: scale(1.14) translate(1.5%, 1%); } }
.plate canvas.fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.plate .grade { position: absolute; inset: 0; pointer-events: none; transition: background 2s; mix-blend-mode: multiply; }
.plate .shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(14, 17, 20, .62) 0, rgba(14, 17, 20, .25) 38%, rgba(14, 17, 20, 0) 62%), linear-gradient(180deg, rgba(20, 24, 27, .35) 0, rgba(20, 24, 27, 0) 30%, rgba(34, 39, 43, .55) 72%, var(--desk) 100%); pointer-events: none; }
.plate .title { position: absolute; left: var(--pad); right: var(--pad); bottom: 16px; display: flex; align-items: flex-end; gap: 18px; }
.plate h1 { font-size: clamp(2.4rem, 6vw, 5.2rem); text-shadow: 0 2px 30px rgba(0, 0, 0, .5); }
.plate .where { margin-bottom: 8px; }
.plate .area-now { font-size: var(--fs-small); letter-spacing: var(--track); text-transform: uppercase; font-weight: 700; color: var(--place, var(--brass)); transition: color 1.2s; margin-top: 6px; text-shadow: 0 1px 10px rgba(0, 0, 0, .8); }
.plate .area-now span { display: block; font: italic 400 1rem/1.4 var(--serif); letter-spacing: 0; text-transform: none; color: #E0DCD2; margin-top: 2px; max-width: 60ch; }
.plate .img.under { animation: none; inset: -6%; opacity: 1; transition: none; }
.plate .slate { font-family: var(--serif); font-style: italic; font-size: var(--fs-lead); color: #E6E2D8; margin-top: 4px; text-shadow: 0 1px 12px rgba(0, 0, 0, .7); }
.plate .tools { position: absolute; top: 12px; right: 12px; display: flex; gap: 6px; }
.plate .tools .btn, .plate .tools .chip { background: rgba(25, 29, 32, .72); backdrop-filter: blur(6px); }
.plate .credit { position: absolute; right: 12px; bottom: 6px; font-size: var(--fs-micro); color: rgba(218, 215, 207, .4); letter-spacing: .04em; }
.plate .tod { position: absolute; top: 14px; left: var(--pad); }
.poster-body { position: absolute; left: var(--pad); right: var(--pad); bottom: 44px; max-width: 660px; display: grid; gap: 16px; }
.poster-body .title { position: static; }
.place.poster .plate .shade { background: linear-gradient(180deg, rgba(20, 24, 27, .3) 0, rgba(20, 24, 27, 0) 26%, rgba(25, 29, 32, .5) 55%, rgba(25, 29, 32, .92) 100%); }
.poster-body p { font-family: var(--serif); font-size: var(--fs-lead); line-height: 1.5; color: #E9E5DB; text-shadow: 0 1px 16px rgba(0, 0, 0, .8); }
.areas { display: flex; flex-wrap: wrap; gap: 6px; }
.scene-strip { display: flex; align-items: center; gap: 10px; padding: 8px var(--pad); border-bottom: 1px solid var(--line); min-width: 0; overflow-x: auto; }
.scene-strip > * { flex: none; }
.scene-strip .cast { display: flex; }
.scene-strip .cast .face { margin-right: -6px; border-color: var(--desk); }
.objective { display: inline-flex; align-items: center; gap: 7px; font-size: var(--fs-small); color: var(--type); white-space: nowrap; }
.objective::before { content: ""; width: 10px; height: 10px; border: 1px solid var(--dim); }
.objective.done { color: var(--faint); text-decoration: line-through; } .objective.done::before { background: var(--on); border-color: var(--on); }
.clock { white-space: nowrap; font-size: var(--fs-small); font-variant-numeric: tabular-nums; font-weight: 700; letter-spacing: .08em; color: var(--brass); }
.clock.low { color: #E88A76; animation: blink 1s infinite; }
.held-flag { color: var(--idle); font-size: var(--fs-micro); letter-spacing: var(--track); font-weight: 700; }

/* ARCHIVE: the lore hub */
.archive { grid-template-rows: auto 1fr; }
.subnav { display: flex; gap: 2px; padding: 0 var(--pad); border-bottom: 1px solid var(--line); overflow-x: auto; }
.subnav button { padding: 12px 14px; font-size: var(--fs-micro); letter-spacing: var(--track); text-transform: uppercase; color: var(--dim); font-weight: 600; white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.subnav button:hover { color: var(--type); } .subnav button[aria-current="true"] { color: var(--type); border-bottom-color: var(--brass); }
.hub { overflow: auto; padding: 28px var(--pad) 60px; min-height: 0; }
.hub h1 { font-size: clamp(2.6rem, 7vw, 6rem); color: var(--type); margin-bottom: 6px; }
.hub .lede { font-family: var(--serif); font-size: var(--fs-lead); color: var(--dim); max-width: 56ch; margin-bottom: 28px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.card { --c: var(--dim); position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 190px; padding: 14px; text-align: left; border: 1px solid var(--line); background: var(--well);
  overflow: hidden; transition: border-color var(--t), transform 240ms var(--ease), background var(--t); }
.card:hover { border-color: var(--c); transform: translateY(-2px); background: color-mix(in srgb, var(--c) 7%, var(--well)); }
.card .mono { position: absolute; right: -8px; top: -22px; font-stretch: 62%; font-weight: 800; font-size: 8.5rem; line-height: 1; color: color-mix(in srgb, var(--c) 14%, transparent); letter-spacing: -.02em;
  transition: color var(--t); pointer-events: none; }
.card:hover .mono { color: color-mix(in srgb, var(--c) 28%, transparent); }
.card .portrait { position: absolute; inset: 0; background-size: cover; background-position: center top; opacity: .5; filter: grayscale(.4); transition: opacity var(--t); }
.card:hover .portrait { opacity: .75; }
.card .portrait + .mono { display: none; }
.card b { position: relative; font-stretch: 62%; font-weight: 800; font-size: 1.9rem; letter-spacing: .03em; color: var(--c); line-height: 1; text-transform: uppercase; }
.card span { position: relative; font-size: var(--fs-sub); margin-top: 5px; }
.card small { position: relative; font-size: var(--fs-micro); color: var(--dim); letter-spacing: .08em; margin-top: 2px; }
.card .lamp { position: absolute; top: 14px; left: 14px; }
.group-title { display: flex; align-items: center; gap: 12px; margin: 34px 0 12px; }
.insignia { display: inline-grid; width: 22px; height: 22px; color: var(--brass); flex: none; } .insignia svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linejoin: round; stroke-linecap: round; }
.group-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.doclist { display: grid; gap: 0; border-top: 1px solid var(--line); }
.docrow { display: grid; grid-template-columns: 190px 1fr auto; gap: 16px; align-items: baseline; padding: 14px 4px; border-bottom: 1px solid var(--line-soft); text-align: left; transition: background var(--t), padding var(--t); }
.docrow:hover { background: var(--well); padding-left: 12px; }
.docrow .no { font-size: var(--fs-micro); letter-spacing: .1em; color: var(--dim); }
.docrow b { font-weight: 600; font-size: 1.02rem; } .docrow span { color: var(--dim); font-size: var(--fs-small); margin-left: 10px; }
.tag { display: inline-block; padding: 1px 6px; border: 1px solid var(--line); font-size: var(--fs-micro); letter-spacing: var(--track); color: var(--dim); text-transform: uppercase; }
.tag.held { border-color: var(--oxblood); color: #D98A7C; } .tag.rel { border-color: color-mix(in srgb, var(--on) 60%, transparent); color: var(--on); }
.reader { display: grid; grid-template-columns: 300px 1fr; min-height: 0; height: 100%; }
.reader .person { border-right: 1px solid var(--line); background: var(--well); overflow: auto; padding: 22px 18px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-content: start; }
.person .cs { font-size: 2.6rem; color: var(--c); } .person .nm { font-size: 1.05rem; font-weight: 600; }
.person dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: var(--fs-small); } .person dt { color: var(--dim); } .person dd { text-align: right; }
.person .line { font-family: var(--serif); font-style: italic; font-size: 1.05rem; color: #E0DCD2; }
.sheet-scroll { overflow: auto; padding: 26px 20px 80px; min-height: 0; background: #1C2023; }
.back { display: inline-flex; align-items: center; gap: 8px; color: var(--dim); font-size: var(--fs-micro); letter-spacing: var(--track); text-transform: uppercase; margin-bottom: 14px; }
.back:hover { color: var(--brass); }
.back svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* papers: the players' own writing */
.writer { display: grid; grid-template-rows: auto 1fr; height: 100%; min-height: 0; }
.writer .top { display: flex; align-items: center; gap: 10px; padding: 10px var(--pad); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.writer .page { overflow: auto; padding: 34px 20px 120px; }
.writer .page > div { max-width: 68ch; margin: 0 auto; }
.writer input.title { width: 100%; background: transparent; border: 0; font-family: var(--serif); font-weight: 700; font-size: 2.2rem; margin-bottom: 14px; }
.writer textarea { width: 100%; min-height: 60vh; background: transparent; border: 0; resize: none; font-family: var(--serif); font-size: var(--fs-lead); line-height: 1.65; overflow: hidden; }
.writer .read { font-family: var(--serif); font-size: var(--fs-lead); line-height: 1.65; white-space: pre-wrap; }

/* settings */
.settings { grid-template-columns: 220px 1fr; }
.settings .pane { overflow: auto; padding: 26px var(--pad) 60px; }
.settings .pane > div { max-width: 760px; display: grid; gap: 22px; }
.settings h2 { font-size: 2.4rem; }
.panel { border: 1px solid var(--line); }
.panel > h3 { padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--well); }
.panel .line { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-bottom: 1px solid var(--line-soft); min-width: 0; }
.panel .line:last-child { border-bottom: 0; }
.panel .line .t { flex: 1; min-width: 0; } .panel .line .t small { display: block; color: var(--dim); font-size: var(--fs-small); }
input[type="range"] { accent-color: var(--brass); width: 160px; }

/* the gate: sign-in, the cover sheet, the lock */
#gate { position: fixed; inset: 0; z-index: 80; background: var(--desk); display: grid; place-items: center; overflow: hidden; }
#gate[hidden] { display: none; }
#gate.leaving { animation: lift 700ms var(--ease) forwards; }
@keyframes lift { to { transform: translateY(-100%); } }
.gate-bg { position: absolute; inset: 0; opacity: .5; }
.gate-bg canvas { width: 100%; height: 100%; display: block; }
.cover { position: relative; width: min(520px, calc(100vw - 40px)); display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 18px; text-align: center; }
.cover .crest { width: 148px; height: 148px; opacity: 0; animation: crest 1.4s 200ms var(--ease) forwards; }
@keyframes crest { from { opacity: 0; transform: scale(.94); filter: blur(6px); } to { opacity: .95; transform: none; filter: none; } }
.cover h1 { font-size: var(--fs-small); letter-spacing: .34em; font-weight: 600; text-transform: uppercase; }
.cover .motto { font-family: var(--serif); font-style: italic; font-size: 1.25rem; color: var(--dim); }
.cover .entry { width: 100%; display: grid; gap: 10px; margin-top: 12px; }
.cover .lines { width: 100%; text-align: left; display: grid; gap: 7px; font-size: var(--fs-small); letter-spacing: .08em; min-height: 132px; margin-top: 6px; }
.cover .lines div { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line-soft); padding-bottom: 6px; animation: msg-in 300ms var(--ease); }
.cover .lines div span:last-child { color: var(--on); } .cover .lines div.bad span:last-child { color: #E08572; }
.cover .warning { border: 1px solid var(--line); padding: 12px 14px; font-family: var(--serif); font-size: var(--fs-sub); color: var(--dim); text-align: left; line-height: 1.45; }
.cover .callsign { font-size: clamp(3rem, 12vw, 6.4rem); color: var(--me); margin: 6px 0 0; }
.cover .hold { position: relative; overflow: hidden; }
.cover .hold::before { content: ""; position: absolute; inset: 0; background: rgba(22, 24, 26, .28); transform: scaleX(var(--p, 0)); transform-origin: left; }
.cover .hold span { position: relative; }
.issue { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; width: 100%; }

/* a burner is none of this: a phone bought with cash */
html[data-system="burner"] { --desk: #131416; --well: #1B1C1F; --raise: #25272B; --line: #2E3035; --line-soft: #26282C; --brass: #9AA3AD; --type: #E6E6E8; --dim: #8D9096;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; --serif: var(--sans); }
html[data-system="burner"] .banner, html[data-system="burner"] .copyline, html[data-system="burner"] .brand img, html[data-system="burner"] .zulu { display: none; }
html[data-system="burner"] #app { grid-template-rows: var(--bar-h) 1fr; }
html[data-system="burner"] body { font-stretch: 100%; }
html[data-system="burner"] .brand b { font-size: var(--fs-sub); letter-spacing: 0; font-weight: 600; font-stretch: 100%; text-transform: none; }
html[data-system="burner"] .views button, html[data-system="burner"] .label, html[data-system="burner"] .btn { letter-spacing: .02em; text-transform: none; font-size: var(--fs-sub); font-stretch: 100%; }
html[data-system="burner"] .display { font-stretch: 100%; text-transform: none; font-weight: 600; letter-spacing: -.01em; line-height: 1.05; }
html[data-system="burner"] .btn, html[data-system="burner"] .field, html[data-system="burner"] .composer-in, html[data-system="burner"] .row .glyph, html[data-system="burner"] .face { border-radius: 10px; }
html[data-system="burner"] .msg { display: flex; flex-direction: column; align-items: flex-start; padding: 1px 0; border: 0; }
html[data-system="burner"] .msg:hover { background: none; }
html[data-system="burner"] .msg .at { display: none; }
html[data-system="burner"] .msg .who { text-transform: none; letter-spacing: 0; font-size: var(--fs-micro); margin: 6px 0 2px 12px; }
html[data-system="burner"] .msg .body { background: var(--raise); padding: 8px 12px; border-radius: 16px; max-width: min(78%, 560px); }
html[data-system="burner"] .msg.mine { align-items: flex-end; } html[data-system="burner"] .msg.mine .body { background: color-mix(in srgb, var(--me) 28%, var(--raise)); }
html[data-system="burner"] .msg.mine .who { display: none; }
html[data-system="burner"] .msg.narration .body { background: none; padding: 4px 2px; max-width: 62ch; font-family: Georgia, serif; }
html[data-system="burner"] .slug { margin-left: 0; }
html[data-system="burner"] .typing { padding-left: var(--pad); }

/* a phone: one column, tabs at the foot */
@media (max-width: 760px) {
  :root { --pad: 14px; --bar-h: 48px; }
  #app { grid-template-rows: auto var(--bar-h) 1fr auto; }
  .bar { gap: 10px; } .views, .zulu, .copyline { display: none; }
  .tabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border-top: 1px solid var(--line); background: var(--well); padding-bottom: env(safe-area-inset-bottom); }
  .tabs button { padding: 11px 0 9px; font-size: var(--fs-micro); letter-spacing: var(--track); text-transform: uppercase; color: var(--dim); font-weight: 600; }
  .tabs button[aria-current="true"] { color: var(--brass); }
  .traffic, .theatre, .settings, .reader { grid-template-columns: 1fr; }
  .traffic .side, .theatre .side, .settings .side { border-right: 0; }
  .view.detail .side { display: none; } .view:not(.detail) .convo, .view:not(.detail) .place, .view:not(.detail) .pane { display: none; }
  .reader .person { border-right: 0; border-bottom: 1px solid var(--line); }
  .msg, .msg.narration { grid-template-columns: 1fr; } .msg .at { display: none; } .slug { margin-left: 0; } .typing { padding-left: var(--pad); }
  .globe-wrap { aspect-ratio: 1 / .7; }
  .docrow { grid-template-columns: 1fr; gap: 2px; }
  .plate { height: 26vh; } .poster-body { bottom: 24px; }
  .phone-back { display: grid !important; }
  #toasts { left: 12px; right: 12px; bottom: 70px; justify-items: stretch; }
}
.phone-back { display: none; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 1ms !important; transition-duration: 1ms !important; } .plate .img { animation: none; } }
html[data-motion="off"] *, html[data-motion="off"] *::before, html[data-motion="off"] *::after { animation-duration: 1ms !important; transition-duration: 1ms !important; }

/* --- type: three faces to choose from (Settings › Display) ------------------------------------------------- */
@font-face { font-family: "Chakra Petch"; src: url(/fonts/chakra-400.woff2) format("woff2"); font-weight: 400 500; font-display: swap; }
@font-face { font-family: "Chakra Petch"; src: url(/fonts/chakra-600.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Chakra Petch"; src: url(/fonts/chakra-700.woff2) format("woff2"); font-weight: 700 900; font-display: swap; }
@font-face { font-family: Barlow; src: url(/fonts/barlow-400.woff2) format("woff2"); font-weight: 400 500; font-display: swap; }
@font-face { font-family: Barlow; src: url(/fonts/barlow-600.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: Barlow; src: url(/fonts/barlow-700.woff2) format("woff2"); font-weight: 700 900; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url(/fonts/barlow-condensed-700.woff2) format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url(/fonts/barlow-condensed-800.woff2) format("woff2"); font-weight: 800 900; font-display: swap; }
:root { --display: Archivo, "Helvetica Neue", Arial, sans-serif; }
.display, .brand b, .face, .card .mono, .card b { font-family: var(--display); }
html[data-type="technical"]:not([data-system="burner"]) { --sans: "Chakra Petch", Archivo, sans-serif; --display: "Chakra Petch", Archivo, sans-serif; }
html[data-type="technical"]:not([data-system="burner"]) .display { letter-spacing: .03em; line-height: 1; }
html[data-type="field"]:not([data-system="burner"]) { --sans: Barlow, Archivo, sans-serif; --display: "Barlow Condensed", Archivo, sans-serif; }
html[data-type="field"]:not([data-system="burner"]) .display { font-weight: 800; letter-spacing: .015em; }

/* --- themes: each one flat ground, one accent. Blackout is true black with a slow field moving behind it. ----- */
html[data-theme="blackout"]:not([data-system="burner"]) { --desk: #000000; --well: rgba(11, 12, 14, .74); --raise: #15171A; --line: #262A2F; --line-soft: #191C1F; --type: #EAE8E2; --dim: #8C929B; --faint: #73787F; --brass: #E3E7EC; }
html[data-theme="olive"]:not([data-system="burner"]) { --desk: #24271F; --well: #1B1D17; --raise: #2E3228; --line: #3F4437; --line-soft: #33372C; --type: #DCDACA; --dim: #A8AA9B; --faint: #8C8F83; --brass: #BDB87C; }
html[data-theme="navy"]:not([data-system="burner"]) { --desk: #18212C; --well: #111922; --raise: #212D3B; --line: #30404F; --line-soft: #263343; --type: #D9DFE7; --dim: #98A4B1; --faint: #818B96; --brass: #9CC2E8; }
html[data-theme="desert"]:not([data-system="burner"]) { --desk: #2B2620; --well: #211D18; --raise: #363027; --line: #494035; --line-soft: #3B342B; --type: #E2DACB; --dim: #B1A99E; --faint: #948E85; --brass: #DDB37A; }
html[data-theme="arctic"]:not([data-system="burner"]) { --desk: #1F2529; --well: #171C1F; --raise: #293136; --line: #3B454C; --line-soft: #2F383E; --type: #DDE4E7; --dim: #9EA9AF; --faint: #868F94; --brass: #9FD3D6; }
html[data-theme="redcell"]:not([data-system="burner"]) { --desk: #1F1B1C; --well: #171314; --raise: #2B2526; --line: #3F3637; --line-soft: #332B2C; --type: #E2DAD8; --dim: #A89C9D; --faint: #8C8384; --brass: #E0907F; }
#app { position: relative; z-index: 1; }
#aura { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; display: none; pointer-events: none; }
html[data-theme="blackout"]:not([data-system="burner"]) #aura { display: block; }
html[data-theme="blackout"]:not([data-system="burner"]) body { background: #000; }
html[data-theme="blackout"]:not([data-system="burner"]) .bar { background: rgba(0, 0, 0, .55); }
html[data-theme="blackout"]:not([data-system="burner"]) .btn.go { background: #E3E7EC; border-color: #E3E7EC; color: #000; }
html[data-theme="blackout"]:not([data-system="burner"]) .btn.go:hover { background: #fff; border-color: #fff; }
html[data-theme="blackout"]:not([data-system="burner"]) .count { background: #E3E7EC; color: #000; }
html[data-theme="blackout"]:not([data-system="burner"]) .plate .shade { background: linear-gradient(90deg, rgba(0, 0, 0, .66) 0, rgba(0, 0, 0, .25) 38%, rgba(0, 0, 0, 0) 62%), linear-gradient(180deg, rgba(0, 0, 0, .35) 0, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, .55) 72%, #000 100%); }
html[data-theme="blackout"]:not([data-system="burner"]) .menu, html[data-theme="blackout"]:not([data-system="burner"]) .toast { background: #0B0C0E; }
html[data-theme="blackout"]:not([data-system="burner"]) .dialog, html[data-theme="blackout"]:not([data-system="burner"]) #gate { background: #050506; }
html[data-theme="blackout"]:not([data-system="burner"]) .row[aria-current="true"], html[data-theme="blackout"]:not([data-system="burner"]) .views button::after { box-shadow: 0 0 18px rgba(227, 231, 236, .12); }
.sheet-scroll { background: color-mix(in srgb, var(--well) 70%, #000); }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; padding: 12px 14px; }
.swatch { display: grid; gap: 6px; padding: 8px; border: 1px solid var(--line); text-align: left; font-size: var(--fs-micro); transition: border-color var(--t); }
.swatch:hover { border-color: var(--dim); } .swatch[aria-checked="true"] { border-color: var(--brass); }
.swatch i { display: flex; height: 34px; border: 1px solid rgba(255, 255, 255, .08); }
.swatch i b { flex: 1; } .swatch i b:last-child { flex: 0 0 26%; }

.finder { border-width: 0 0 1px; background: transparent; height: 40px; padding: 0 16px; flex: none; font-size: var(--fs-sub); }
.face img { filter: grayscale(.85) contrast(1.12) brightness(.97); }       /* an uploaded photograph, as a file would hold it */
.card .portrait { filter: grayscale(.85) contrast(1.1); }
.place .scene-strip { border-top: 1px solid color-mix(in srgb, var(--place, var(--line)) 45%, transparent); transition: border-color 1.2s; }
.place .scene-strip .chip.on, .poster-body .chip.on { border-color: var(--place, var(--brass)); color: var(--place, var(--brass)); }
.poster-body .chip { background: rgba(20, 24, 27, .5); }

/* --- reading it ----------------------------------------------------------------------------------------------------
   Two rules, kept everywhere. Words on a photograph are light, never grey, and the picture is darkened behind them.
   Quiet text is --dim (6.4:1 on the desk) or --faint (4.6:1), never fainter; small capitals share one size and one
   letter-spacing (--fs-micro, --track). */
.label, .btn, .chip, .tabs button, .views button, .subnav button, .banner, .copyline { font-size: var(--fs-micro); letter-spacing: var(--track); }
.chip { letter-spacing: .06em; }
.banner { letter-spacing: .16em; }
.copyline { color: var(--faint); }
.field::placeholder, textarea::placeholder { color: var(--faint); opacity: 1; }

/* a picture: darker where the words are, and the words light with a soft edge of their own */
.plate .shade { background: linear-gradient(90deg, rgba(12, 15, 18, .74) 0, rgba(12, 15, 18, .38) 42%, rgba(12, 15, 18, 0) 72%),
  linear-gradient(180deg, rgba(12, 15, 18, .5) 0, rgba(12, 15, 18, 0) 30%, rgba(12, 15, 18, .62) 72%, var(--desk) 100%); }
.place.poster .plate .shade { background: linear-gradient(180deg, rgba(12, 15, 18, .52) 0, rgba(12, 15, 18, .06) 22%, rgba(12, 15, 18, .2) 40%, rgba(12, 15, 18, .78) 62%, rgba(12, 15, 18, .95) 100%); }
.plate h1 { color: var(--on-plate); text-shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 4px 34px rgba(0, 0, 0, .6); }
.plate .label, .plate .where, .plate .tod { color: var(--on-plate-dim); font-weight: 600; text-shadow: 0 1px 2px rgba(0, 0, 0, .95), 0 0 14px rgba(0, 0, 0, .75); }
.plate .area-now { font-size: var(--fs-small); letter-spacing: var(--track); text-shadow: 0 1px 2px rgba(0, 0, 0, .95), 0 0 14px rgba(0, 0, 0, .8); margin-top: 8px; }
.plate .area-now span, .plate .slate, .poster-body p { color: var(--on-plate); text-shadow: 0 1px 2px rgba(0, 0, 0, .9), 0 0 20px rgba(0, 0, 0, .65); }
.plate .slate { font-size: var(--fs-lead); margin-top: 6px; }
.plate .where { margin-bottom: 10px; }
.plate .credit { color: rgba(244, 241, 233, .6); letter-spacing: 0; font-size: .68rem; text-shadow: 0 1px 2px rgba(0, 0, 0, .95); }
.plate .tools .btn, .plate .tools .chip { background: rgba(14, 17, 20, .8); color: var(--on-plate); border-color: rgba(244, 241, 233, .22); }
.poster-body .chip { background: rgba(14, 17, 20, .7); color: var(--on-plate-dim); border-color: rgba(244, 241, 233, .24); }
.poster-body .chip.on { background: rgba(14, 17, 20, .86); }
.poster-body .btn:not(.go) { background: rgba(14, 17, 20, .72); color: var(--on-plate); border-color: rgba(244, 241, 233, .3); }

/* the log: one rhythm. A name, then what they said, with air between speakers and none wasted inside one */
.msg.first { margin-top: 18px; }
.msg .who { font-size: var(--fs-micro); letter-spacing: var(--track); margin-bottom: 3px; line-height: 1.3; }
.msg .who small { color: var(--dim); font-size: var(--fs-small); letter-spacing: 0; }
.msg .body { line-height: 1.56; }
.msg .at { color: var(--dim); }
.msg.narration .body { font-size: var(--fs-lead); line-height: 1.6; color: #EDE9E0; }
.msg.aside .body { color: var(--dim); font-size: var(--fs-sub); }
.msg.eyes .who::after { font-size: var(--fs-micro); letter-spacing: var(--track); }
.msg .edited, .msg .pin { color: var(--dim); }
.day { color: var(--dim); font-weight: 600; margin: 22px 0 12px; }
.sys { color: var(--dim); font-size: var(--fs-small); letter-spacing: 0; margin: 5px 0; }
.sys b { color: var(--type); font-weight: 600; }
.slug { color: var(--type); margin-top: 26px; margin-bottom: 8px; }
.typing { font-size: var(--fs-small); }
.composer .hint { color: var(--faint); font-size: var(--fs-micro); letter-spacing: .02em; }
.scene-strip { gap: 12px; } .scene-strip .dim { font-size: var(--fs-small) !important; }
.clock { font-size: var(--fs-small); letter-spacing: .06em; }
.row .t b { font-weight: 600; } .row .t span { color: var(--dim); font-size: var(--fs-small); }
.me-chip .who span { color: var(--dim); }
.panel .line .t small, .formrow small { color: var(--dim); font-size: var(--fs-small); line-height: 1.45; margin-top: 2px; }
/* Archivo has no italic of its own and a slanted one is a fake: whatever is italic is set in the serif, which has a real one */
.msg.action .body, .msg.deleted .body, .sheet-scroll .empty p, em, i:not(.redacted i) { font-family: var(--serif); font-style: italic; }
.msg.action .body { font-size: 1.08em; line-height: 1.5; color: color-mix(in srgb, var(--type) 88%, var(--c, var(--dim))); }
.msg.action .body b { font-family: var(--sans); font-size: .9em; letter-spacing: .04em; }
html[data-system="burner"] .msg.action .body { font-size: 1em; }

/* the gate: a restricted system's notice, the checks it runs, and authentication */
.cover .notice { border-left: 2px solid var(--oxblood); padding: 2px 0 2px 14px; font-size: var(--fs-small); line-height: 1.5; color: var(--dim); text-align: left; }
.cover .notice b { color: var(--type); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; font-size: var(--fs-micro); }
.cover .lines { min-height: 0; font-size: var(--fs-micro); letter-spacing: .1em; gap: 6px; }
.cover .lines div span:first-child { color: var(--dim); }
.cover .pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; } .cover .pair > :only-child { grid-column: 1 / -1; }
.cover .hold { letter-spacing: .16em; }
.cover .hold::after { content: ""; position: absolute; top: 0; bottom: 0; width: 2px; left: calc(var(--p, 0) * 100%); background: #fff; opacity: calc(var(--p, 0) * 4); box-shadow: 0 0 14px 2px rgba(255, 255, 255, .7); }
.cover .granted { height: 46px; display: grid; place-items: center; border: 1px solid var(--on); color: var(--on); font-size: var(--fs-micro); letter-spacing: .3em; text-transform: uppercase; font-weight: 700;
  animation: granted 520ms var(--ease); }
@keyframes granted { 0% { background: var(--on); color: var(--ink); } 100% { background: transparent; } }

/* the structure of the Group: a chart to walk (archive.js structure) */
.org { margin: 18px 0 6px; display: grid; justify-items: center; }
.org-top { display: grid; justify-items: center; width: 100%; }
.org-link { display: block; width: 1px; height: 16px; background: var(--line); transform-origin: top; }
.org-bus { position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; width: 100%; padding-top: 22px; }
.org-bus::before { content: ""; position: absolute; top: 0; left: 10%; right: 10%; height: 1px; background: var(--line); transform-origin: center; }
.org-bus .node::before { content: ""; position: absolute; top: -23px; left: 50%; width: 1px; height: 22px; background: var(--line); }
.node { position: relative; display: grid; justify-items: center; align-content: start; gap: 3px; padding: 12px 10px 10px; border: 1px solid var(--line); background: var(--well); text-align: center;
  transition: border-color var(--t), background var(--t), transform var(--t); min-width: 0; }
.org-top .node { width: min(340px, 100%); }
.node .insignia { width: 26px; height: 26px; margin-bottom: 2px; }
.node b { font-family: var(--display); font-stretch: 62%; font-weight: 800; font-size: 1.5rem; letter-spacing: .05em; text-transform: uppercase; line-height: 1; }
.node span { font-size: var(--fs-small); color: var(--dim); line-height: 1.3; }
.node small { font-size: var(--fs-micro); letter-spacing: var(--track); color: var(--faint); text-transform: uppercase; margin-top: 2px; }
.node:hover { border-color: var(--brass); transform: translateY(-2px); }
.node.on { border-color: var(--brass); background: color-mix(in srgb, var(--brass) 9%, var(--well)); }
.node.on b { color: var(--brass); }
.org.fresh .node { animation: node-in 440ms var(--ease) both; animation-delay: calc(var(--i) * 70ms + 80ms); }
.org.fresh .org-link { animation: draw-y 300ms var(--ease) both; animation-delay: 160ms; }
.org.fresh .org-bus::before { animation: draw-x 420ms var(--ease) both; animation-delay: 260ms; }
@keyframes node-in { from { opacity: 0; transform: translateY(10px); } }
@keyframes draw-y { from { transform: scaleY(0); } } @keyframes draw-x { from { transform: scaleX(0); } }
.org-hint { margin-top: 20px; color: var(--faint); font-size: var(--fs-small); text-align: center; }
.org-detail { width: 100%; margin-top: 18px; border: 1px solid var(--line); border-top: 2px solid var(--brass); background: var(--well); padding: 20px 22px 22px; display: grid; gap: 16px; text-align: left; animation: msg-in 280ms var(--ease); }
.org-head { display: flex; align-items: center; gap: 12px; } .org-head h2 { font-size: 2rem; } .org-head .insignia { width: 30px; height: 30px; }
.org-blurb { font-size: var(--fs-lead); line-height: 1.5; max-width: 72ch; }
.org-row { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 14px; align-items: start; } .org-row > .label { padding-top: 10px; }
.org-people, .org-files { display: flex; flex-wrap: wrap; gap: 8px; }
.org-people .who { display: flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px; border: 1px solid var(--line-soft); text-align: left; transition: border-color var(--t), background var(--t); min-width: 0; }
.org-people .who:hover { border-color: var(--brass); background: var(--raise); }
.org-people .who b { display: block; font-weight: 600; font-size: var(--fs-sub); letter-spacing: .04em; } .org-people .who small { display: block; color: var(--dim); font-size: var(--fs-micro); }
.above { display: flex; align-items: center; gap: 16px; margin-top: 22px; padding: 16px 4px; color: var(--dim); font-size: var(--fs-small); border-top: 1px dashed var(--line); }
.above .bars { display: flex; gap: 5px; flex-wrap: wrap; max-width: 46%; } .above .bars i { display: block; height: 11px; background: #000; }

/* the picture as a frame of film: a lens's darker corners and fine grain over every photograph, whatever its source,
   so a snapshot and a featured panorama sit in the same world. Words and buttons ride above it. */
.plate .frame::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; mix-blend-mode: multiply; opacity: .9;
  background: radial-gradient(ellipse 120% 100% at 50% 42%, rgba(0, 0, 0, 0) 46%, rgba(0, 0, 0, .5) 100%); }
.plate .grain { position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: .16; mix-blend-mode: overlay;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.plate .title, .plate .tools, .plate .tod, .plate .credit, .poster-body { z-index: 2; }

.swatch-note { padding: 10px 14px 0; color: var(--dim); font-size: var(--fs-small); }

/* --- a picture is a clean frame ------------------------------------------------------------------------------------
   (the owner: "I don't like the overlaps. One nicely done image with filtering.") Nothing is laid over a photograph:
   the place's name and what you can do there are a bar above it, the caption and the way in are below it. */
.place .plate { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; height: auto; overflow: visible; background: transparent; }
.place .plate .frame { position: relative; overflow: hidden; background: #0A0D0F; min-height: 0; }
.place:not(.poster) .plate .frame { height: clamp(170px, 31vh, 360px); transition: height 360ms var(--ease); }
.place .plate .shade { display: none; }
.plate-bar { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 6px var(--pad); min-width: 0; border-bottom: 1px solid var(--line); background: var(--desk); }
.plate-bar .here { display: flex; align-items: baseline; gap: 14px; min-width: 0; overflow: hidden; }
.place .plate-bar h1 { font-size: 1.55rem; line-height: 1; white-space: nowrap; color: var(--type); text-shadow: none; }
.place .plate-bar .area-now { margin: 0; color: var(--place, var(--brass)); font-size: var(--fs-micro); letter-spacing: var(--track); text-transform: uppercase; font-weight: 700; white-space: nowrap; text-shadow: none; }
.place .plate-bar .slate { margin: 0; font-family: var(--serif); font-style: italic; font-size: var(--fs-sub); color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; text-shadow: none; }
.place .plate-bar .tod, .place .plate-bar .where { position: static; margin: 0; color: var(--dim); text-shadow: none; white-space: nowrap; font-weight: 500; }
.place .plate-bar .btn, .place .plate-bar .chip { background: transparent; color: var(--type); border-color: var(--line); backdrop-filter: none; }
.place .plate-bar .chip { color: var(--dim); }
.place .plate .credit { position: static; justify-self: end; padding: 4px var(--pad) 0; color: var(--faint); text-shadow: none; font-size: .68rem; letter-spacing: 0; }
.place:not(.poster) .plate .credit { padding-bottom: 2px; }
.place .poster-body { position: static; max-width: none; display: grid; gap: 12px; padding: 16px var(--pad) 20px; border-top: 1px solid var(--line); background: var(--desk); }
.place .poster-body .title { display: grid; gap: 6px; }
.place .poster-body h1 { font-size: clamp(2.2rem, 4.4vw, 3.8rem); color: var(--type); text-shadow: none; }
.place .poster-body .where { color: var(--dim); text-shadow: none; margin: 0; font-weight: 500; }
.place .poster-body .area-now { margin: 0; color: var(--place, var(--brass)); text-shadow: none; }
.place .poster-body .area-now span { color: var(--dim); text-shadow: none; }
.place .poster-body p { color: var(--type); text-shadow: none; max-width: 80ch; font-size: var(--fs-lead); line-height: 1.5; }
.place .poster-body .chip { background: transparent; color: var(--dim); border-color: var(--line); }
.place .poster-body .chip.on { background: transparent; color: var(--place, var(--brass)); border-color: var(--place, var(--brass)); }
.place .poster-body .btn:not(.go) { background: transparent; color: var(--type); border-color: var(--line); }
.place .poster-body .areas { display: flex; flex-wrap: wrap; gap: 6px; }

/* a place's rooms, building by building */
.place.poster .plate { grid-template-rows: auto minmax(34%, 1fr) auto auto; }
.place .poster-body { max-height: 58vh; overflow-y: auto; }
.rooms { display: grid; gap: 8px; }
.rooms-row { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; align-items: start; }
.rooms-row > .label { padding-top: 7px; }
.room-pick { gap: 8px; max-width: 46vw; overflow: hidden; text-overflow: ellipsis; }

/* --- the mission book (archive.js missions, mission) ---------------------------------------------------------------- */
.op-book { margin: 18px 0 22px; padding: 16px 18px; border: 1px solid var(--line); border-left: 2px solid var(--brass); background: var(--well); display: grid; gap: 6px; }
.op-book h2 { font-size: 1.8rem; } .op-book p { font-size: var(--fs-lead); line-height: 1.5; max-width: 80ch; color: var(--type); }
.op-list { display: grid; border-top: 1px solid var(--line); }
.op-row { display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 14px 6px; border-bottom: 1px solid var(--line-soft); text-align: left; transition: background var(--t), padding var(--t); }
.op-row:hover { background: var(--well); padding-left: 14px; }
.op-no { font-size: var(--fs-micro); letter-spacing: var(--track); color: var(--dim); text-transform: uppercase; font-weight: 600; }
.op-row .op-no { font-family: var(--display); font-stretch: 62%; font-weight: 800; font-size: 1.9rem; letter-spacing: 0; color: var(--faint); }
.op-row.issued .op-no { color: var(--brass); } .op-row.done { opacity: .62; }
.op-main b { display: block; font-family: var(--display); font-stretch: 62%; font-weight: 800; font-size: 1.35rem; letter-spacing: .05em; line-height: 1.1; }
.op-main span { display: block; font-family: var(--serif); font-style: italic; color: var(--type); margin-top: 1px; }
.op-main small { display: block; font-size: var(--fs-micro); letter-spacing: var(--track); text-transform: uppercase; color: var(--dim); margin-top: 4px; }
.op-page { max-width: 900px; }
.op-head { display: grid; gap: 6px; margin: 6px 0 20px; }
.op-head h1 { font-size: clamp(2.4rem, 6vw, 4.4rem); } .op-title { font-style: italic; font-size: var(--fs-lead); color: var(--dim); }
.op-facts { display: flex; flex-wrap: wrap; gap: 0; margin-top: 10px; border: 1px solid var(--line); }
.op-facts div { flex: 1 1 130px; padding: 9px 12px; border-right: 1px solid var(--line-soft); display: grid; gap: 2px; } .op-facts div:last-child { border-right: 0; }
.op-facts b { font-weight: 600; font-size: var(--fs-sub); }
.op-block { display: grid; gap: 8px; margin: 18px 0; }
.op-brief { font-size: var(--fs-lead); line-height: 1.6; max-width: 74ch; }
.op-objectives, .op-block ol, .op-block ul { margin: 0; padding-left: 1.4em; display: grid; gap: 6px; max-width: 80ch; line-height: 1.5; }
.op-objectives li { font-weight: 500; }
.op-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0; }
.op-host { margin-top: 26px; padding: 4px 18px 10px; border: 1px dashed color-mix(in srgb, var(--oxblood) 70%, var(--line)); background: color-mix(in srgb, var(--oxblood) 6%, transparent); }
.op-host-mark { margin: 10px 0 0; font-size: var(--fs-micro); letter-spacing: var(--track); text-transform: uppercase; font-weight: 700; color: #E08572; }
.op-host p { max-width: 80ch; line-height: 1.55; }
.op-voices { display: grid; gap: 8px; } .op-voices div { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 12px; } .op-voices b { font-weight: 600; } .op-voices span { color: var(--dim); }
.sparks { margin-top: 30px; display: grid; gap: 12px; justify-items: start; }
.sparks .group-title { width: 100%; margin: 0; } .spark-kinds { display: flex; flex-wrap: wrap; gap: 6px; }
.spark-line { font-size: var(--fs-lead); line-height: 1.5; min-height: 3em; max-width: 70ch; padding: 12px 16px; border-left: 2px solid var(--brass); background: var(--well); width: 100%; }

/* --- the phrasebook (jargon.js) ------------------------------------------------------------------------------------ */
.phrasebook { display: grid; gap: 14px; }
.phrasebook > .field { position: sticky; top: 0; z-index: 2; background: var(--well); }
.jargon { display: grid; gap: 6px; }
.jargon-sec .group-title { margin: 20px 0 6px; } .jargon-about { color: var(--dim); font-size: var(--fs-small); margin-bottom: 8px; }
.jargon-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 8px; }
.jargon-term { display: grid; gap: 3px; align-content: start; padding: 10px 12px; border: 1px solid var(--line-soft); background: var(--well); text-align: left; transition: border-color var(--t), background var(--t); }
button.jargon-term:hover { border-color: var(--brass); background: var(--raise); }
.jargon-term b { font-weight: 700; letter-spacing: .06em; color: var(--brass); }
.jargon-term span { color: var(--type); font-size: var(--fs-sub); line-height: 1.45; }
.jargon-term q { quotes: none; font-family: var(--serif); font-style: italic; color: var(--dim); font-size: var(--fs-sub); line-height: 1.4; margin-top: 2px; }
.composer .phrases { height: 26px; }
