/* A dark room, one thing at a time. Gold is only for what can be done; the display face only for a crystal's name. */
:root { --wall:#0d0d0e; --lift:#171615; --sheet:#1d1b19; --line:#26231f; --text:#f3ede2; --soft:#a79f93; --honey:#d9a566; --ink:#1a1208; --bad:#ef9a86; --side:20px; color-scheme:dark; background:var(--wall) }
* { box-sizing:border-box }
[hidden] { display:none !important }
html, body { height:100%; margin:0 }
body { background:var(--wall); color:var(--text); font:17px/1.4 Assistant,"Segoe UI",Arial,sans-serif; overflow:hidden }
button, input { font:inherit; color:inherit }
button { background:none; border:0; padding:0; cursor:pointer; text-align:inherit }
a { color:inherit; text-decoration:none }
h1, h2, h3, p, ul { margin:0; padding:0 }
ul { list-style:none } i { font-style:normal } bdi { unicode-bidi:isolate }
:focus-visible { outline:2px solid var(--honey); outline-offset:2px }
.sr { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%) }
.gold, .red { font-weight:700; padding:14px 24px; text-align:center } .gold { background:var(--honey); color:var(--ink) } .gold:disabled { opacity:.35; cursor:default } .red { background:#a8402f }
.plain { color:var(--honey); font-weight:700; padding:10px 0 }
.soft { color:var(--soft); font-size:16px } .bad { color:var(--bad) }
.dot { display:inline-block; width:.72em; height:.72em; border-radius:50%; margin-inline-end:.45em }
.none { display:block; width:80%; aspect-ratio:1; border:1px dashed #6d675e; border-radius:50% }

.app { height:100vh; height:100dvh; position:relative }
.side { display:none }
.page { height:100%; overflow-y:auto; overscroll-behavior:contain; padding:calc(8px + env(safe-area-inset-top,0px)) var(--side) calc(28px + env(safe-area-inset-bottom,0px)); scrollbar-width:thin; scrollbar-color:var(--line) transparent }
.bar { display:flex; justify-content:space-between; align-items:center; min-height:48px }
h1 { font-size:32px; line-height:1.1; font-weight:700; margin:6px 0 16px }
.head { display:flex; justify-content:space-between; align-items:center } .head .gold { display:none }
.find { width:100%; background:var(--lift); border:0; border-bottom:2px solid transparent; border-radius:0; padding:13px 14px; appearance:none } .find:focus { outline:0; border-color:var(--honey) } .find::placeholder { color:var(--soft); opacity:1 }
.tools { display:grid; grid-template-columns:1fr auto; gap:16px; align-items:center } .tools .filter { color:var(--text); font-weight:600; padding:13px 4px }
.body { padding-top:12px }
.label { color:var(--soft); margin:18px 0 6px } .nothing { color:var(--soft); padding:34px 0 }

.kinds { display:grid; grid-template-columns:1fr 1fr; gap:26px 14px; padding-top:16px }
.kind { text-align:center; padding-bottom:4px } .kind .thumb { width:100%; height:112px; background:radial-gradient(closest-side,#3a3128,transparent) } .kind .thumb img { max-width:84px; max-height:84px } .kind b { display:block; font-size:18px } .kind i { color:var(--soft); font-size:15.5px }
.foot { display:flex; flex-wrap:wrap; justify-content:space-between; gap:0 18px; border-top:1px solid var(--line); margin-top:34px; color:var(--soft) } .foot a, .foot button { padding:18px 0 }
.pair-end { display:flex; gap:14px; align-items:center } .on-wide { display:none }
.picking .row.pickable { grid-template-columns:24px 54px minmax(0,1fr) auto } .pickable::before { content:""; display:grid; place-items:center; width:24px; height:24px; border:2px solid #6d675e; font-weight:700; font-size:17px; line-height:1 } .pickable[aria-pressed="true"]::before { content:"✓"; border-color:var(--honey); background:var(--honey); color:var(--ink) } .pickable[aria-pressed="true"] { background:linear-gradient(270deg,#241f19,transparent) }
.picks { position:fixed; z-index:6; inset:auto 0 0; background:var(--sheet); padding:12px var(--side) calc(14px + env(safe-area-inset-bottom,0px)); display:grid; gap:8px } .picks .acts { display:flex; gap:22px; align-items:center } .picks .gold { padding:12px 18px; flex:1 } .picks button:disabled { opacity:.4; cursor:default } .picking .page { padding-bottom:150px }

.thumb { display:grid; place-items:center; width:54px; height:50px } .thumb img { max-width:48px; max-height:48px } .thumb .none { width:40px }
.other img { opacity:.5; filter:grayscale(1) }
.row { display:grid; grid-template-columns:54px minmax(0,1fr) auto; gap:14px; align-items:center; width:100%; padding:9px 0; border-bottom:1px solid var(--line) }
.row .what b { display:block; font-size:18px; font-weight:600; line-height:1.25; overflow-wrap:anywhere } .row .what i { color:var(--soft); font-size:15px; display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap }
.row .q { font-weight:700; font-size:19px; font-variant-numeric:tabular-nums } .row .q.un { font-weight:400; font-size:16px; color:var(--bad) }
.row .cell, .row.hd { display:none }
.more { width:100%; text-align:center; color:var(--honey); font-weight:700; padding:18px }

.stone { position:fixed; inset:0; z-index:5; background:var(--wall); display:flex; flex-direction:column; padding:calc(8px + env(safe-area-inset-top,0px)) var(--side) calc(20px + env(safe-area-inset-bottom,0px)) }
.dots { font-size:26px; line-height:1; padding:8px 0 8px 2px; min-width:44px; text-align:left }
.stone .in { flex:1; min-height:0; overflow-y:auto; overscroll-behavior:contain; scrollbar-width:none; padding-bottom:16px; text-align:center }
.face { height:min(36vh,300px); display:grid; place-items:center; background:radial-gradient(closest-side,#4a3e31,#211d19 60%,transparent) } .face img { max-width:min(62vw,230px); max-height:min(29vh,230px) } .face .none { width:130px }
.said { color:var(--soft); font-size:15.5px } .said.warn { color:var(--bad) }
.stone h2 { font:700 clamp(44px,7.2vh,60px)/.9 Karantina,Arial,sans-serif; margin:8px 0 4px; text-wrap:balance }
.sub { color:var(--soft) }
.sizes { margin-top:16px } .size { display:flex; justify-content:space-between; align-items:baseline; width:100%; padding:13px 2px; border-bottom:1px solid var(--line); font-size:18px } .size:disabled { cursor:default } .size b { font-variant-numeric:tabular-nums } .size .un { font-weight:400; font-size:16px; color:var(--bad) }
.notes { text-align:start; color:var(--soft); font-size:16px; margin-top:16px } .notes li { padding:3px 0 }
.cta { width:100%; font-size:19px; padding:16px }

dialog { border:0; padding:22px var(--side) calc(24px + env(safe-area-inset-bottom,0px)); background:var(--sheet); color:var(--text); width:100%; max-width:none; margin:auto 0 0; max-height:88vh; max-height:88dvh; overflow-y:auto; overscroll-behavior:contain }
dialog::backdrop { background:rgba(0,0,0,.66) }
dialog .top { display:flex; justify-content:space-between; align-items:center; gap:16px; margin-bottom:10px } dialog h2 { font-size:21px; line-height:1.2 } dialog .x { color:var(--soft); font-weight:400 }
dialog h3 { font-size:16px; font-weight:600; color:var(--soft); margin:14px 0 8px }
dialog > p { margin-bottom:8px }
dialog .go { display:flex; gap:20px; align-items:center; margin-top:22px } dialog .go .gold, dialog .go .red { flex:1 }
.choice { display:block; width:100%; padding:15px 2px; border-bottom:1px solid #2d2925; font-size:18px; cursor:pointer } .choice:last-child { border:0 } .choice small { display:block; color:var(--soft); font-size:15px } .danger { color:var(--bad) }
.seg { display:grid; grid-auto-flow:column; grid-auto-columns:1fr; background:var(--wall) } .page .seg { background:var(--lift); max-width:460px } .seg button { padding:12px 6px; text-align:center; color:var(--soft) } .seg [aria-pressed="true"] { background:#3a332a; color:var(--text); font-weight:700 }
.chips { display:flex; flex-wrap:wrap; gap:8px } .chip { background:var(--wall); padding:9px 14px; border:1px solid transparent } .chip[aria-pressed="true"] { border-color:var(--honey); background:#2e2821; font-weight:700 }
.amount { display:grid; gap:14px }
.amount .n { width:100%; background:none; border:0; border-bottom:2px solid var(--honey); border-radius:0; font-size:54px; line-height:1.2; font-weight:700; text-align:center; direction:ltr; padding:0 0 4px } .amount .n:focus { outline:0 } .amount .n::placeholder { color:#4c463f; opacity:1 }
.then { text-align:center; color:var(--soft); min-height:1.4em } .then b { color:var(--text) } .then.bad { color:var(--bad) } .amount .note { justify-self:center; font-weight:400; padding:0 }
.amount input:not(.n), .field input { width:100%; background:var(--wall); border:0; border-bottom:2px solid var(--line); border-radius:0; padding:12px; font-weight:400 } .amount input:not(.n):focus, .field input:focus { outline:0; border-color:var(--honey) } .field input::placeholder, .amount input:not(.n)::placeholder { color:#857d71; opacity:1 }
.form { display:grid; gap:16px } .field { display:grid; gap:5px; font-weight:600 } .pair { display:grid; grid-template-columns:1fr 1fr; gap:14px }
.drop { display:grid; place-items:center; min-height:104px; border:1px dashed #6d675e; color:var(--honey); font-weight:700; cursor:pointer } .drop img { max-height:180px; max-width:100% } .drop:focus-within, label.choice:focus-within { outline:2px solid var(--honey) }
.grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(104px,1fr)); gap:12px } .pick { text-align:center; padding:10px 6px; border:1px solid transparent; display:grid; gap:8px; justify-items:center; align-content:space-between } .pick[aria-pressed="true"] { border-color:var(--honey) } .pick img { max-width:92px; max-height:92px } .pick small { color:var(--soft); font-size:14.5px }
.log li { display:grid; grid-template-columns:5em 1fr auto; gap:12px; align-items:baseline; padding:10px 0; border-bottom:1px solid #2d2925 } .log .d { font-weight:700; direction:ltr; text-align:right; font-variant-numeric:tabular-nums } .log .w { color:var(--soft); font-size:16px } .log .undone .d { text-decoration:line-through; opacity:.5 } .log .plain { padding:0; font-weight:400 }
.toast { position:fixed; z-index:30; bottom:calc(92px + env(safe-area-inset-bottom,0px)); left:50%; transform:translateX(-50%); background:var(--text); color:#16130f; padding:12px 18px; display:flex; gap:18px; width:max-content; max-width:calc(100vw - 28px); font-weight:600 } .toast button { font-weight:700; text-decoration:underline; text-underline-offset:3px }

.low { color:var(--honey) } .size small { display:block; color:var(--soft); font-size:14.5px; text-align:start } .size .low, .row .q.low { color:var(--bad) } .foot .low { font-weight:700; flex-basis:100% }
.me { display:grid; place-items:center; width:36px; height:36px; border-radius:50%; background:#3a332a; color:var(--text); font-weight:700; text-align:center } .role { color:var(--soft); font-size:15.5px; font-weight:400 } dialog h2 .role { display:block }
.gate { position:fixed; inset:0; z-index:40; overflow-y:auto; background:radial-gradient(circle min(80vw,52vh) at 50% 34%,#3a3128,var(--wall)); display:grid; place-items:center; padding:24px var(--side) } .gate .box { width:min(380px,100%) } .gate h1 { font:700 56px/.9 Karantina,Arial,sans-serif; margin-bottom:8px } .gate .form { margin-top:22px } .gate input { background:rgba(0,0,0,.55) } .locked .app { visibility:hidden } .gate .bad:empty { display:none }
.field { position:relative } .field .eye { position:absolute; left:10px; bottom:2px; font-size:15px; font-weight:400; color:var(--soft) } .field input[type=password], .field:has(.eye) input { padding-left:74px }
.net { position:fixed; z-index:31; top:0; inset-inline:0; background:var(--honey); color:var(--ink); font-weight:700; text-align:center; padding:6px }
.person, .line { display:grid; grid-template-columns:1fr auto; gap:14px; align-items:center; width:100%; padding:13px 0; border-bottom:1px solid var(--line) } .person b { display:block; font-size:18px; font-weight:600 } .person i { color:var(--soft); font-size:15px } .person:disabled { cursor:default } .stopped { opacity:.5 }
.line { grid-template-columns:3.4em 1fr; align-items:baseline; padding:10px 0 } .line .t { color:var(--soft); font-variant-numeric:tabular-nums } .body > .chips { margin:6px 0 4px } .page .chip { background:var(--lift) }
.rolepick { display:block; width:100%; padding:12px 14px; border:1px solid var(--line); margin-bottom:8px } .rolepick small { display:block; color:var(--soft); font-size:15px } .rolepick[aria-pressed="true"] { border-color:var(--honey); background:#2e2821 }
.qr { width:216px; height:216px; justify-self:center; background:#fff } .key { font-family:ui-monospace,Consolas,monospace; color:var(--text); font-size:15px } .gate .code { font-size:26px; letter-spacing:.14em; text-align:center } .check { display:flex; gap:10px; align-items:center; cursor:pointer } .check input { width:20px; height:20px; accent-color:var(--honey) } .codes { display:grid; grid-template-columns:1fr 1fr; gap:8px 20px; font:600 20px ui-monospace,Consolas,monospace; text-align:center } .gate .box > .plain { margin-top:14px; font-weight:400; color:var(--soft) }
.log li.two { grid-template-columns:1fr auto }

@media (max-width:899px) { body.open .page { visibility:hidden } }
@media (min-width:900px) {
  .app { display:grid; grid-template-columns:230px minmax(0,1fr) } body.open .app { grid-template-columns:230px minmax(0,1fr) 430px }
  .side { display:flex; flex-direction:column; align-items:stretch; border-inline-end:1px solid var(--line); padding:30px 34px 0 0; overflow:hidden auto } .side > * { flex:none } .side .grow { flex:1 0 20px } .side .who { display:flex; gap:12px; align-items:center; padding:14px 0 22px; color:var(--soft) } .side a[href="#/low"] { color:var(--honey) } .side > b { display:block; font-size:26px; line-height:1.1; margin-bottom:22px } .side a { display:flex; justify-content:space-between; padding:10px 0 10px 24px; color:var(--soft) } .side [aria-current] { color:var(--text); font-weight:700; box-shadow:inset -3px 0 0 var(--honey); margin-right:-34px; padding-right:34px } .side .edit { color:var(--soft); padding:22px 0 10px; font-size:16px } .side hr { border:0; border-top:1px solid var(--line); margin:16px 0 16px 24px }
  .page { padding:26px 44px 40px } .page > .bar { display:none }
  h1 { font-size:34px; margin:8px 0 } .head .gold { display:block; padding:12px 24px }
  .tools { grid-template-columns:minmax(0,380px) auto 1fr; gap:26px; margin-top:12px }
  .row { grid-template-columns:64px minmax(0,1.6fr) minmax(0,1fr) 100px; gap:16px } .row.hd { display:grid; color:var(--soft); font-size:15.5px; padding:6px 0 } .row .cell { display:block; color:var(--soft) } .on-phone { display:none } .on-wide { display:block } .picking .row.pickable, .picking .row.hd { grid-template-columns:24px 64px minmax(0,1.6fr) minmax(0,1fr) 100px } .picking .row.hd::before { content:"" } .picks { inset:auto 230px 0 0; padding:16px 44px; display:flex; justify-content:space-between; align-items:center } .picks .gold { flex:none } .row .q, .row.hd span:last-child { text-align:left }
  .stone { position:relative; inset:auto; min-height:0; background:#141312; border-inline-start:1px solid var(--line); padding:16px 30px 26px }
  .row[aria-current="true"] { background:linear-gradient(270deg,#241f19,transparent) }
  dialog { width:460px; margin:auto; max-height:86vh; padding:24px 28px 28px } .toast { bottom:30px }
}
@media (hover:hover) { .row:not(.hd):hover, .choice:hover { background:rgba(255,255,255,.03) } .side a:hover, .side .edit:hover, .foot a:hover, .foot button:hover { color:var(--text) } .gold:not(:disabled):hover { filter:brightness(1.08) } }
@media (prefers-reduced-motion:no-preference) { dialog[open] { animation:rise .18s ease-out } @keyframes rise { from { transform:translateY(24px) } } }
