/* Archonyx staff page: the game's bronze and parchment, dark. One column on a phone; nothing loads from outside. */

:root {
  --bg: #15110d;
  --panel: #1f1912;
  --panel-2: #2a2219;
  --line: #4a3b2a;
  --bronze: #c08a4a;
  --bronze-hi: #e2ab68;
  --ink: #efe3cc;
  --muted: #b5a385;
  --serious: #e66a58;
  --warn: #e3b04b;
  --ok: #82bb7f;
  --whisper: #a594e0;
  --radius: 8px;
  --gutter: 16px;
  --head: Georgia, "Times New Roman", serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.45 var(--body); }
body { min-height: 100vh; overflow-x: hidden; }
a { color: var(--bronze-hi); }
h1, h2, .brand, .menu-item, .btn, .tab, .tag { font-family: var(--head); letter-spacing: 0.06em; }
h1 { font-size: 22px; margin: 0; font-weight: 600; }
h2 { font-size: 15px; margin: 0 0 8px; color: var(--bronze-hi); text-transform: uppercase; font-weight: 600; }
p { margin: 0; }

/* ---- top bar and menu ---- */
.top { display: flex; align-items: center; gap: 12px; padding: 10px var(--gutter); background: var(--panel); border-bottom: 1px solid var(--line); }
.top .brand { color: var(--bronze-hi); text-decoration: none; font-weight: 600; flex: 0 0 auto; }
.who { color: var(--muted); margin-left: auto; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.menu { display: flex; gap: 4px; padding: 0 var(--gutter); background: var(--panel); border-bottom: 1px solid var(--line); overflow-x: auto; }
.menu-item { display: inline-flex; align-items: center; gap: 6px; padding: 10px 12px; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; white-space: nowrap; }
.menu-item:hover { color: var(--ink); }
.menu-on { color: var(--ink); border-bottom-color: var(--bronze); }
.badge { background: var(--bronze); color: #1a120a; border-radius: 999px; padding: 0 7px; font: 600 12px/18px var(--body); }
.badge-serious { background: var(--serious); color: #fff; }
.resting-bar { background: #5a2a1f; color: #ffd9cf; padding: 8px var(--gutter); font-size: 14px; }

/* ---- screens ---- */
.main { max-width: 1000px; margin: 0 auto; padding: var(--gutter); }
.screen { display: flex; flex-direction: column; gap: 12px; }
.screen-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.screen-tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.counts { color: var(--muted); font-size: 14px; }
.hint { color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.quiet { color: var(--muted); }
.notice { padding: 24px; text-align: center; color: var(--muted); background: var(--panel); border: 1px dashed var(--line); border-radius: var(--radius); }
.notice-error { color: var(--serious); border-color: var(--serious); }
.banner { padding: 10px 12px; border-radius: var(--radius); }
.banner-warn { background: #4a2a12; color: #ffe2b8; border: 1px solid #8a5a22; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.card-warn { border-color: var(--serious); background: #2a1512; }
.steps { white-space: pre-wrap; }
.big { font: 600 32px/1 var(--head); margin: 4px 0 8px; }
.big-on { color: var(--ok); }
.big-off { color: var(--muted); }
.player-name { font: 600 20px var(--head); color: var(--ink); text-transform: none; }

/* What a player wrote: shown as typed, broken anywhere so a long word can't widen the page */
.said { white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }

/* ---- buttons, tabs, fields ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 8px 14px; border-radius: var(--radius);
  border: 1px solid var(--bronze); background: transparent; color: var(--bronze-hi); font-size: 13px; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn:hover { background: rgba(192, 138, 74, 0.12); }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn-primary { background: var(--bronze); color: #1a120a; }
.btn-primary:hover { background: var(--bronze-hi); }
.btn-small { min-height: 32px; padding: 4px 10px; font-size: 12px; }
.btn:focus-visible, .menu-item:focus-visible, .tab:focus-visible, .row-link:focus-visible, .field:focus-visible, .linkish:focus-visible {
  outline: 2px solid var(--bronze-hi); outline-offset: 2px; }
.tabs { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.tab { padding: 8px 12px; color: var(--muted); text-decoration: none; font-size: 13px; }
.tab-on { background: var(--panel-2); color: var(--ink); }
.field { width: 100%; padding: 10px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: 15px var(--body); }
.field-tall { min-height: 110px; }
.search { display: flex; gap: 8px; }
.search .field { flex: 1 1 auto; min-width: 0; }
.linkish { background: none; border: 0; padding: 0; color: var(--bronze-hi); font: inherit; font-weight: 600; cursor: pointer; text-align: left; }
.chip-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--muted); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---- tags ---- */
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { display: inline-block; padding: 1px 7px; border-radius: 4px; border: 1px solid var(--line); color: var(--muted); font-size: 11px; white-space: nowrap; }
.tag-serious { border-color: var(--serious); color: var(--serious); }
.tag-frozen { border-color: #7fb3e0; color: #9cc8ee; }
.tag-whisper { border-color: var(--whisper); color: var(--whisper); }
.tag-warn { border-color: var(--warn); color: var(--warn); }
.tag-quiet { opacity: 0.8; }
.tag-mode-open { border-color: var(--ok); color: var(--ok); }
.tag-mode-slow, .tag-mode-readonly { border-color: var(--warn); color: var(--warn); }
.tag-mode-closed { border-color: var(--serious); color: var(--serious); }

/* ---- lists ---- */
.rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.row { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.row-serious { border-left: 4px solid var(--serious); }
.row-link { color: inherit; text-decoration: none; display: flex; flex-direction: column; gap: 6px; }
.row-link:hover .row-title { color: var(--bronze-hi); }
.row-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.row-title { font-weight: 600; }
.row-when { margin-left: auto; color: var(--muted); font-size: 13px; }
.row-body { color: var(--ink); }
.row-meta { display: flex; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.plain { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }

.lines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.line { display: grid; grid-template-columns: 8.5em 9em 1fr auto; gap: 4px 10px; align-items: baseline; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.line-herald { grid-template-columns: 8.5em 1fr auto; }
.line-when { color: var(--muted); font-size: 12px; white-space: nowrap; }
.line-who { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.line-actions { display: flex; gap: 6px; }
.line-reported { background: rgba(230, 106, 88, 0.12); border-left: 3px solid var(--serious); }
.line-down .line-said { text-decoration: line-through; color: var(--muted); }
.line-flagged { background: rgba(227, 176, 75, 0.08); }

/* ---- dialog ---- */
.dialog { width: min(560px, calc(100vw - 2 * var(--gutter))); max-height: calc(100vh - 2 * var(--gutter)); padding: 0; border: 1px solid var(--bronze);
  border-radius: var(--radius); background: var(--panel); color: var(--ink); }
.dialog::backdrop { background: rgba(0, 0, 0, 0.65); }
.dialog-form { display: flex; flex-direction: column; gap: 12px; padding: 16px; }
.dialog-title { margin: 0; font: 600 18px var(--head); color: var(--bronze-hi); text-transform: none; }
.dialog-subject { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 30vh; overflow: auto; }
.dialog-effect { color: var(--ink); font-weight: 600; }
.dialog-hint { color: var(--muted); font-size: 13px; }
.dialog-typed { display: flex; flex-direction: column; gap: 6px; }
.dialog-error { color: var(--serious); min-height: 1.2em; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.choices { display: flex; flex-direction: column; gap: 4px; }
.choice { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; }
.choice:has(input:checked) { border-color: var(--bronze); background: rgba(192, 138, 74, 0.12); }
.choice-off { opacity: 0.45; cursor: default; }
.choice input { accent-color: var(--bronze); width: 18px; height: 18px; }

/* ---- sign-in ---- */
.signin { min-height: 100vh; display: grid; place-items: center; padding: var(--gutter); }
.signin-card { width: min(420px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 28px 24px;
  display: flex; flex-direction: column; gap: 14px; text-align: center; }
.signin-card .brand { color: var(--bronze-hi); font-weight: 600; letter-spacing: 0.3em; }
.signin-card h1 { font-size: 28px; }
.signin-button { display: flex; justify-content: center; min-height: 44px; }
.signin-error { color: var(--warn); min-height: 1.2em; }
.noscript { padding: var(--gutter); }

/* ---- toast ---- */
.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); max-width: calc(100vw - 2 * var(--gutter)); padding: 10px 16px;
  border-radius: var(--radius); background: var(--panel-2); border: 1px solid var(--ok); color: var(--ink); z-index: 10; }
.toast-warn { border-color: var(--warn); }

/* ---- phones ---- */
@media (max-width: 700px) {
  .main { padding: 12px; }
  .line { grid-template-columns: 1fr auto; }
  .line-when { grid-column: 1; }
  .line-who { grid-column: 1; white-space: normal; }
  .line-said { grid-column: 1 / -1; }
  .line-actions { grid-column: 1 / -1; }
  .line .tag { grid-column: 2; grid-row: 1; justify-self: end; }
  .facts { grid-template-columns: 1fr; gap: 2px; }
  .facts dd { margin-bottom: 8px; }
  .dialog-actions .btn { flex: 1 1 auto; }
  .top { flex-wrap: wrap; }
  .top .btn { margin-left: auto; }
  .who { order: 3; flex-basis: 100%; margin-left: 0; }
}
