/* Ashish Assistance website: the 3D office's dark glass and gold, plus a light 2D "Today" view for the phone. */
:root {
  --bg: #0e0b08; --panel: rgba(22, 17, 12, .9); --panel-solid: #17110c; --card: rgba(255, 255, 255, .04);
  --line: rgba(201, 162, 74, .3); --line2: rgba(255, 255, 255, .09);
  --gold: #c9a24a; --gold-ink: #e2c27a; --ink: #f1e7d6; --mut: #ab9d86;
  --ok: #4cd08a; --call: #8fb3d9; --idle: #f0b13a; --bad: #ff8a7a;
  --okbg: rgba(76, 208, 138, .12); --warnbg: rgba(240, 177, 58, .12); --badbg: rgba(255, 122, 106, .12); --callbg: rgba(143, 179, 217, .12);
  --btn: rgba(255, 255, 255, .06); --btn-h: rgba(201, 162, 74, .2); --primary: #d4ae58; --primary-ink: #17110c;
  --focus: #f3cf7a; --field: rgba(0, 0, 0, .35); --shadow: 0 10px 40px rgba(0, 0, 0, .45);
  --serif: Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --barH: 58px;
  color-scheme: dark;
}
body.mode-2d {
  --bg: #f3efe7; --panel: #ffffff; --panel-solid: #ffffff; --card: #faf7f1;
  --line: #e1d5bd; --line2: #ebe3d4;
  --gold: #9a7424; --gold-ink: #7a5a14; --ink: #1d1710; --mut: #5c5141;
  --ok: #24744a; --call: #2f5b8f; --idle: #94480f; --bad: #b3261e;
  --okbg: #e3f1e8; --warnbg: #fbf0dc; --badbg: #fbe5e2; --callbg: #e6eef8;
  --btn: #ffffff; --btn-h: #f6eedd; --focus: #8a5a12; --field: #ffffff; --shadow: 0 6px 24px rgba(40, 30, 10, .12);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--sans); -webkit-text-size-adjust: 100%; }
body.mode-3d { height: 100%; overflow: hidden; }
img { max-width: 100%; }
[hidden], .hidden { display: none !important; }
a { color: var(--gold-ink); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 50; background: var(--primary); color: var(--primary-ink); padding: 8px 14px; border-radius: 8px; font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; }
.mut { color: var(--mut); }
.mono { font-family: var(--mono); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ------------------------------------------------------------------ buttons, fields */
button, .btn { font: inherit; color: var(--ink); background: var(--btn); border: 1px solid var(--line); border-radius: 9px; padding: 7px 13px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; line-height: 1.2; }
button:hover, .btn:hover { background: var(--btn-h); }
button:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: default; }
.btn.primary, button.primary { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); font-weight: 650; }
.btn.primary:hover, button.primary:hover { filter: brightness(1.07); }
.btn.on, button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn.quiet { border-color: transparent; background: transparent; }
.btn.danger { color: var(--bad); border-color: currentColor; background: transparent; }
.btn.big { min-height: 52px; font-size: 16px; font-weight: 650; border-radius: 12px; padding: 12px 18px; }
input, textarea, select { font: inherit; color: var(--ink); background: var(--field); border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; width: 100%; min-width: 0; }
textarea { resize: vertical; }
label { font-size: 13px; font-weight: 600; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row.end { justify-content: flex-end; }

/* ------------------------------------------------------------------ the bar */
.bar { position: fixed; top: 10px; left: 12px; right: 12px; z-index: 12; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 8px 12px 8px 16px; background: rgba(20, 15, 10, .88); border: 1px solid var(--line); border-radius: 14px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); color: #f1e7d6; }
.brand { display: flex; align-items: baseline; gap: 10px; text-decoration: none; white-space: nowrap; }
.mark { font: 700 19px var(--serif); letter-spacing: .12em; color: #c9a24a; }
.sub { font-size: 10.5px; letter-spacing: .3em; color: #ab9d86; }
.nav { display: flex; gap: 2px; flex-wrap: wrap; }
.nav a { color: #f1e7d6; text-decoration: none; padding: 6px 10px; border-radius: 8px; border: 1px solid transparent; font-size: 14px; white-space: nowrap; }
.nav a:hover { background: rgba(201, 162, 74, .14); }
.nav a[aria-current="page"] { background: rgba(201, 162, 74, .22); border-color: rgba(201, 162, 74, .55); }
.waiting { display: flex; align-items: center; gap: 6px; margin-left: auto; flex-wrap: wrap; }
.wlabel { font: 600 10px var(--serif); letter-spacing: .16em; text-transform: uppercase; color: #c9a24a; white-space: nowrap; }
.chip { display: inline-flex; align-items: baseline; gap: 5px; padding: 5px 11px; border-radius: 999px; border: 1px solid rgba(201, 162, 74, .3); color: #f1e7d6; text-decoration: none; font-size: 13px; white-space: nowrap; }
.chip b { font: 700 14px var(--mono); color: #e2c27a; }
.chip:hover { background: rgba(201, 162, 74, .16); }
.chip.hot { background: rgba(240, 177, 58, .14); border-color: rgba(240, 177, 58, .65); }
.chip.hot b { color: #f0b13a; }
.chip.spend { font-family: var(--mono); font-size: 12.5px; }
.chip.spend.warn { border-color: rgba(240, 177, 58, .7); color: #f0b13a; }
.chip.spend.over, .chip.spend.paused { border-color: rgba(255, 122, 106, .7); color: #ff8a7a; }
.clock { font: 12px var(--mono); color: #ab9d86; white-space: nowrap; }
.tag { display: inline-block; font: 700 10px var(--sans); letter-spacing: .12em; padding: 3px 7px; border-radius: 6px; white-space: nowrap; }
.tag.preview, .tag.demo { background: #f0b13a; color: #17110c; }
.tag.live { background: rgba(76, 208, 138, .16); color: #4cd08a; border: 1px solid rgba(76, 208, 138, .5); }
.bar .btn.login { color: #f1e7d6; background: rgba(255, 255, 255, .06); border-color: rgba(201, 162, 74, .3); }
.bar .btn.login.primary { background: #d4ae58; color: #17110c; }
.today-link { color: #f1e7d6; border: 1px solid rgba(201, 162, 74, .4); border-radius: 8px; padding: 6px 10px; text-decoration: none; font-size: 14px; }
@media (max-width: 1640px) { .clock { display: none; } }
@media (max-width: 1520px) { .sub { display: none; } }
@media (max-width: 1360px) {
  .sub, .clock, .wlabel .long { display: none; }
  .mark { font-size: 17px; letter-spacing: .08em; }
  .nav a { padding: 6px 8px; }
  .bar { gap: 8px 10px; }
}
@media (max-width: 1100px) { .wlabel { display: none; } }
.grow { flex: 1; min-width: 0; }

/* ------------------------------------------------------------------ 3D office chrome (ids used by the office bundle) */
#scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
#roster { position: fixed; top: calc(var(--barH) + 20px); left: 16px; bottom: 112px; width: 272px; z-index: 6; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
#roster h2 { margin: 0 0 6px; font: 600 11px var(--serif); letter-spacing: .2em; color: var(--gold); text-transform: uppercase; }
#rosterSum { font-size: 11.5px; color: var(--mut); margin: 0 2px 8px; }
#rosterSum b { color: var(--ink); }
.s-working { color: var(--ok); } .s-on_call { color: var(--call); } .s-idle { color: var(--idle); }
#rosterList { list-style: none; margin: 0 -6px 0 0; padding: 0 4px 0 0; overflow: auto; flex: 1; }
#rosterList li.grp { display: flex; align-items: center; gap: 6px; font: 600 10px var(--serif); letter-spacing: .16em; text-transform: uppercase; color: var(--gold); padding: 10px 4px 3px; }
#rosterList li.grp span { width: 8px; height: 8px; border-radius: 2px; }
#rosterList li.grp small { margin-left: auto; color: var(--mut); letter-spacing: 0; font: 11px var(--sans); }
#rosterList li button { width: 100%; display: flex; align-items: center; justify-content: flex-start; gap: 8px; padding: 5px 6px; border: 1px solid transparent; background: none; border-radius: 8px; text-align: left; min-height: 0; }
#rosterList li button:hover, #rosterList li.sel button { background: rgba(201, 162, 74, .16); }
#rosterList li.sel button { border-color: rgba(201, 162, 74, .5); }
#rosterList li img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex: none; border: 1px solid var(--line2); }
#rosterList li.idle img { filter: grayscale(.85); opacity: .7; }
.rn { min-width: 0; flex: 1; }
.rn b { display: block; font-size: 12.5px; }
.rn b em { font-style: normal; font-size: 9px; color: var(--gold); border: 1px solid var(--line); border-radius: 6px; padding: 0 4px; margin-left: 4px; vertical-align: 1px; }
.rn small { display: block; color: var(--mut); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--ok); box-shadow: 0 0 0 2px rgba(76, 208, 138, .25); }
.dot.on_call { background: var(--call); box-shadow: 0 0 0 2px rgba(143, 179, 217, .25); }
.dot.idle { background: var(--idle); box-shadow: 0 0 0 2px rgba(240, 177, 58, .25); }
.dot.thinking { background: #f0b13a; animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.hint { color: var(--mut); font-size: 11px; margin: 8px 2px 0; }
.dock { position: fixed; left: 16px; bottom: 16px; width: 272px; z-index: 7; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.dock #btnTeam { display: none; }
.dock #btnTour { grid-column: 1 / -1; }
#btnTour { background: linear-gradient(180deg, #d9b55c, #b8913d); color: #17110c; border: 0; font-weight: 700; box-shadow: 0 0 0 1px rgba(255, 230, 170, .35), 0 4px 14px rgba(201, 162, 74, .3); }
#btnTour.active { background: rgba(201, 162, 74, .25); color: var(--ink); }
#btnWalk.active { background: rgba(201, 162, 74, .3); }
body.touring #roster, body.touring #near, body.touring .dock { display: none !important; }
body.walking #roster:not(.show) { display: none; }
#tip { position: fixed; z-index: 8; pointer-events: none; display: flex; gap: 10px; align-items: center; background: rgba(14, 11, 8, .92); border: 1px solid rgba(201, 162, 74, .3); padding: 8px 12px 8px 8px; border-radius: 10px; max-width: 300px; font-size: 12px; color: #f1e7d6; }
#tip img, #near img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; flex: none; border: 2px solid rgba(201, 162, 74, .3); }
#tip span, #near span { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
#tip b, #near b { font: 600 14px var(--serif); }
#tip small, #near small { color: #ab9d86; }
#tip em, #near em { font-style: normal; color: #f0c46a; font-size: 11px; margin-top: 3px; }
#near { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); display: flex; gap: 12px; align-items: center; background: rgba(14, 11, 8, .9); border: 1px solid rgba(201, 162, 74, .3); border-radius: 14px; padding: 10px 16px 10px 10px; z-index: 8; max-width: min(440px, calc(100vw - 24px)); color: #f1e7d6; }
#near .nk { margin-top: 5px; font-size: 10.5px; color: #c9a24a !important; }
.st { display: inline-block; font: 700 10px var(--sans); letter-spacing: .08em; text-transform: uppercase; padding: 2px 7px; border-radius: 7px; border: 1px solid; align-self: flex-start; }
.st.working { color: var(--ok); border-color: currentColor; }
.st.on_call { color: var(--call); border-color: currentColor; }
.st.idle { color: var(--idle); border-color: currentColor; background: var(--warnbg); }
#walkHint { position: fixed; top: calc(var(--barH) + 20px); left: 50%; transform: translateX(-50%); background: rgba(14, 11, 8, .85); border: 1px solid rgba(201, 162, 74, .3); border-radius: 10px; padding: 6px 14px; font-size: 12px; color: #ab9d86; z-index: 8; max-width: calc(100vw - 24px); }
#stick { position: fixed; left: 24px; bottom: calc(24px + env(safe-area-inset-bottom)); width: 130px; height: 130px; border-radius: 50%; background: rgba(255, 255, 255, .08); border: 1px solid rgba(201, 162, 74, .3); z-index: 9; touch-action: none; }
#stick i { position: absolute; left: 36px; top: 36px; width: 58px; height: 58px; border-radius: 50%; background: rgba(201, 162, 74, .55); }
#loading { position: fixed; inset: 0; display: grid; place-items: center; z-index: 20; pointer-events: none; transition: opacity .8s; }
#loading > div { display: flex; flex-direction: column; align-items: center; gap: 4px; background: rgba(14, 11, 8, .88); border: 1px solid rgba(201, 162, 74, .3); border-radius: 14px; padding: 16px 26px; color: #f1e7d6; }
#loading b { font: 600 16px var(--serif); color: #c9a24a; }
#loading span { font: 600 22px var(--sans); }
#loading small { color: #ab9d86; }
#loading.done { opacity: 0; }
#tourBox { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); width: min(940px, calc(100vw - 32px)); background: rgba(18, 13, 9, .94); border: 1px solid rgba(201, 162, 74, .55); border-radius: 16px; padding: 14px 18px 12px; z-index: 11; box-shadow: var(--shadow); color: #f1e7d6; }
.tb-head { display: flex; gap: 12px; align-items: center; }
.tb-head img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 2px solid #c9a24a; }
.tb-head small { color: #ab9d86; font-size: 11px; letter-spacing: .04em; }
.tb-head b { display: block; font: 600 19px var(--serif); color: #c9a24a; }
#tbText { margin: 8px 0 10px; font-size: 14.5px; line-height: 1.5; max-height: 24vh; overflow: auto; }
.tb-ctl { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
#tbDots { flex: 1; display: flex; gap: 5px; justify-content: center; flex-wrap: wrap; }
#tbDots i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, .18); }
#tbDots i.done { background: rgba(201, 162, 74, .55); }
#tbDots i.on { background: #c9a24a; box-shadow: 0 0 0 3px rgba(201, 162, 74, .25); }

/* ------------------------------------------------------------------ panels over the office */
.panel { position: fixed; top: calc(var(--barH) + 20px); right: 16px; bottom: 16px; width: min(720px, calc(100vw - 32px)); z-index: 10; display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: var(--shadow); }
.panel.desk { width: min(460px, calc(100vw - 32px)); }
.panel-head { position: relative; padding: 14px 54px 12px 18px; border-bottom: 1px solid var(--line); }
.panel-kicker { font: 600 10.5px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--gold-ink); }
.panel-head h1 { margin: 3px 0 0; font: 600 22px/1.2 var(--serif); }
.panel-head h1:focus { outline: none; }
.panel-head h1:focus-visible { outline: none; } /* focus target for screen readers, not a tab stop */
.panel-close { position: absolute; top: 12px; right: 12px; width: 38px; height: 38px; padding: 0; font-size: 22px; border-radius: 10px; }
.panel-body { flex: 1; overflow: auto; padding: 14px 18px 22px; overscroll-behavior: contain; }
.sec { margin: 18px 0 0; }
.sec:first-child { margin-top: 0; }
.sec > h2, .h2 { margin: 0 0 8px; font: 600 11px var(--serif); letter-spacing: .18em; text-transform: uppercase; color: var(--gold); }
.card { background: var(--card); border: 1px solid var(--line2); border-radius: 12px; padding: 14px; }
.note { font-size: 13px; color: var(--mut); }
.notice { border-radius: 10px; padding: 10px 12px; font-size: 13.5px; }
.notice.warn { background: var(--warnbg); color: var(--ink); border: 1px solid rgba(240, 177, 58, .45); }
.notice.ok { background: var(--okbg); border: 1px solid rgba(76, 208, 138, .4); }
.notice.bad { background: var(--badbg); border: 1px solid rgba(255, 122, 106, .45); }
.notice b { color: inherit; }
.face { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; border: 1px solid var(--line); background: var(--card); }
.face.lg { width: 72px; height: 72px; border: 2px solid var(--gold); }
.face.sm { width: 28px; height: 28px; }
.face.xs { width: 24px; height: 24px; border-radius: 7px; }
.face.idle { filter: grayscale(1); opacity: .6; }
.pill { display: inline-flex; align-items: center; gap: 5px; font: 600 11px var(--mono); padding: 3px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--mut); white-space: nowrap; }
.pill.ok, .pill.done { color: var(--ok); background: var(--okbg); border-color: transparent; }
.pill.warn, .pill.running { color: var(--idle); background: var(--warnbg); border-color: transparent; }
.pill.bad, .pill.failed { color: var(--bad); background: var(--badbg); border-color: transparent; }
.pill.skipped { color: var(--mut); background: var(--card); border-style: dashed; }
.pill.next { color: var(--ink); }
.pill.call { color: var(--call); background: var(--callbg); border-color: transparent; }
.pill.running::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: pulse 1s infinite; }
.empty { color: var(--mut); font-size: 14px; padding: 6px 0; }

/* markdown */
.md { font-size: 14px; line-height: 1.55; overflow-wrap: anywhere; }
.md h1 { font: 600 18px var(--serif); color: var(--gold-ink); margin: 14px 0 6px; }
.md h2 { font: 600 16px var(--serif); color: var(--gold-ink); margin: 16px 0 6px; }
.md h3, .md h4 { font-size: 14px; margin: 12px 0 4px; }
.md p { margin: 6px 0; }
.md ul, .md ol { margin: 6px 0; padding-left: 20px; }
.md li { margin: 3px 0; }
.md .tbl { overflow-x: auto; margin: 8px 0; border: 1px solid var(--line2); border-radius: 8px; }
.md table { border-collapse: collapse; width: 100%; font-size: 13px; }
.md th, .md td { border-bottom: 1px solid var(--line2); padding: 6px 8px; text-align: left; vertical-align: top; overflow-wrap: normal; }
.md th { background: var(--card); color: var(--gold-ink); font-weight: 650; white-space: nowrap; }
.md code { font-family: var(--mono); font-size: 12.5px; background: var(--card); padding: 1px 5px; border-radius: 5px; }
.md pre { background: var(--card); padding: 10px; border-radius: 8px; overflow: auto; }
.md pre code { background: none; padding: 0; }
.md blockquote { margin: 8px 0; padding: 4px 12px; border-left: 3px solid var(--gold); color: var(--mut); }
.md hr { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }

/* desk */
.desk-head { display: flex; gap: 14px; align-items: center; }
.desk-head .who { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.desk-head .role { color: var(--mut); font-size: 13.5px; }
.desk-head .meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 3px; }
.desk-head .dept { font: 600 10.5px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--mut); }
.tablist { display: flex; gap: 6px; flex-wrap: wrap; margin: 16px 0 12px; border-bottom: 1px solid var(--line2); padding-bottom: 10px; }
.tablist [role="tab"] { min-height: 38px; }
.tablist [role="tab"][aria-selected="true"] { background: rgba(201, 162, 74, .25); border-color: var(--gold); font-weight: 650; }
body.mode-2d .tablist [role="tab"][aria-selected="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid var(--line2); }
.list > li:last-child { border-bottom: 0; }
.list .t { font: 600 13px var(--mono); color: var(--gold-ink); min-width: 46px; padding-top: 1px; }
.list .grow { flex: 1; min-width: 0; }
.list .sub2 { display: block; font-size: 12.5px; color: var(--mut); margin-top: 2px; overflow-wrap: anywhere; }
.list .err { color: var(--bad); }
.facerow { display: flex; flex-wrap: wrap; gap: 6px; }
.facechip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 3px; border-radius: 999px; border: 1px solid var(--line2); background: var(--card); color: var(--ink); text-decoration: none; font-size: 13px; }
.facechip:hover { border-color: var(--line); }
.chat { display: flex; flex-direction: column; gap: 10px; }
.msgs { display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 92%; padding: 9px 12px; border-radius: 12px; overflow-wrap: anywhere; font-size: 14px; }
.msg.me { align-self: flex-end; background: rgba(201, 162, 74, .2); border: 1px solid var(--line); white-space: pre-wrap; }
body.mode-2d .msg.me { background: #f6ecd6; }
.msg.ag { align-self: flex-start; background: var(--card); border: 1px solid var(--line2); }
.msg.ag .md p:first-child { margin-top: 0; } .msg.ag .md p:last-child { margin-bottom: 0; }
.msg .cost { display: block; margin-top: 4px; font: 11px var(--mono); color: var(--mut); }
.msg.err { color: var(--bad); }
.msg.typing { color: var(--mut); font-style: italic; }
.chatform { position: sticky; bottom: -22px; display: flex; gap: 8px; align-items: flex-end; padding: 10px 0 12px; background: linear-gradient(transparent, var(--panel-solid) 30%); }
body.mode-3d .chatform { background: linear-gradient(rgba(22, 17, 12, 0), rgba(22, 17, 12, .96) 30%); }
.chatform textarea { flex: 1; min-height: 44px; max-height: 160px; }

/* brief */
.brief-head { display: flex; gap: 14px; align-items: center; }
.brief-head > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.brief-head .from { font: 600 15px var(--serif); }
.stamp { display: inline-block; font: 600 12px/1.45 var(--mono); padding: 6px 10px; border-radius: 10px; align-self: flex-start; }
.stamp.pass { color: var(--ok); background: var(--okbg); }
.stamp.fail { color: var(--bad); background: var(--badbg); }
.decision { position: relative; padding: 16px; margin-top: 12px; }
.decision .q { display: flex; gap: 12px; align-items: flex-start; }
.decision .num { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: var(--primary-ink); font: 700 14px var(--mono); }
.decision h3 { margin: 2px 0 0; font: 600 17px/1.35 var(--serif); }
.decision .rec { margin: 10px 0 6px; }
.decision ul { margin: 6px 0 10px; padding-left: 20px; font-size: 14px; }
.decision .opts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.decision .opts button { min-height: 44px; }
.decision .state { display: block; margin-top: 8px; font-size: 13px; color: var(--mut); }
.decision.answered { border-color: rgba(76, 208, 138, .35); }
.decision.answered .state { color: var(--ok); }
details.notefield summary { cursor: pointer; font-size: 13px; color: var(--mut); margin-top: 10px; }
details.notefield textarea { margin-top: 6px; }

/* send list */
.item { padding: 16px; margin-top: 12px; }
.item .head { display: flex; gap: 12px; align-items: flex-start; }
.item .title { font-weight: 700; font-size: 15.5px; }
.item .meta { display: block; font-size: 13px; color: var(--mut); margin-top: 2px; }
.item .badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.item blockquote { margin: 12px 0 8px; padding: 12px 14px; border-left: 3px solid var(--gold); background: var(--field); border-radius: 0 10px 10px 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14.5px; }
.item .gloss { font-size: 13.5px; color: var(--mut); }
.item .src { font-size: 12.5px; color: var(--mut); margin: 6px 0 0; overflow-wrap: anywhere; }
.uploadform .row { flex-wrap: wrap; gap: 8px; align-items: center; }
.uploadform select, .uploadform input[type=file] { max-width: 100%; min-width: 0; }
.checks { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.check { font-size: 13px; padding: 7px 10px; border-radius: 8px; }
.check.ok { background: var(--okbg); }
.check.warn { background: var(--warnbg); }
.check b { margin-right: 4px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; align-items: center; }
.actions button, .actions .btn { min-height: 44px; }
.item .state { display: block; margin-top: 8px; font-size: 13px; color: var(--mut); }
.item.approved { border-color: rgba(76, 208, 138, .4); }
.item.held, .item.rejected { opacity: .8; }
.sendkit { margin-top: 12px; padding: 12px; border-radius: 10px; background: var(--okbg); }
.sendkit p { margin: 0 0 8px; font-size: 13.5px; }
.editbox { margin-top: 10px; }
.editbox textarea { min-height: 90px; }

/* engine */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); gap: 10px; }
.stat .k { font: 600 10.5px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--mut); }
.stat .v { display: block; font: 600 24px var(--serif); margin: 4px 0 6px; }
.stat .v small { display: block; font: 13px var(--sans); color: var(--mut); margin-top: 2px; }
.meter { height: 8px; border-radius: 99px; background: var(--line2); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--ok); border-radius: 99px; }
.meter.warn i { background: var(--idle); }
.meter.over i { background: var(--bad); }
.stat p { margin: 6px 0 0; font-size: 12.5px; color: var(--mut); }
.models { font-size: 13px; display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }
.unlock { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line2); }
.unlock:last-child { border-bottom: 0; }
.unlock .box { flex: none; width: 18px; height: 18px; margin-top: 2px; border-radius: 5px; border: 2px solid var(--idle); display: grid; place-items: center; font-size: 12px; line-height: 1; }
.unlock.done .box { border-color: var(--ok); background: var(--ok); color: var(--bg); }
.unlock.done .what { text-decoration: line-through; color: var(--mut); }
.pausebar { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.pausebar.paused { background: var(--badbg); border-color: rgba(255, 122, 106, .5); }

/* ------------------------------------------------------------------ phone: light 2D Today view */
body.mode-2d { padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
body.mode-2d .bar { position: sticky; top: 0; left: 0; right: 0; border-radius: 0; border-width: 0 0 1px; background: #17110c; padding: calc(8px + env(safe-area-inset-top)) 14px 8px; }
body.mode-2d .bar .nav, body.mode-2d .bar .waiting, body.mode-2d .bar .chip.spend, body.mode-2d .bar .clock { display: none; }
body.mode-2d .bar .btn.login { margin-left: auto; }
.today { max-width: 640px; margin: 0 auto; padding: 0 16px 24px; }
.t-head { margin: 0 -16px; padding: 16px 16px 18px; background: #17110c; color: #f1e7d6; border-bottom: 3px solid #c9a24a; }
.t-head .k { font: 600 11px var(--mono); letter-spacing: .12em; color: #e2c27a; }
.t-head h1 { margin: 4px 0 2px; font: 600 26px/1.15 var(--serif); }
.t-head p { margin: 4px 0 0; font-size: 13.5px; color: #cfc2ab; }
.t-chips { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0 6px; }
.t-chip { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); text-decoration: none; min-height: 76px; }
.t-chip .k { font: 600 10.5px var(--mono); letter-spacing: .1em; color: var(--gold-ink); }
.t-chip b { font: 700 24px var(--serif); }
.t-chip span { font-size: 12.5px; color: var(--mut); }
.t-chip.hot { border-color: #d9a441; background: var(--warnbg); }
.t-chip.wide { grid-column: 1 / -1; min-height: 0; flex-direction: row; align-items: center; justify-content: space-between; gap: 10px; }
.today .sec > h2 { margin-top: 22px; }
.one { padding: 16px; }
.one .pos { font: 600 11px var(--mono); letter-spacing: .1em; color: var(--mut); }
.one-actions { display: grid; grid-template-columns: 1fr 1fr 1.3fr; gap: 8px; margin-top: 14px; }
.one-actions button { min-height: 54px; font-size: 16px; font-weight: 650; border-radius: 12px; }
body.mode-2d .one .one-actions { position: sticky; bottom: calc(64px + env(safe-area-inset-bottom)); z-index: 2; margin: 14px -16px -2px; padding: 10px 16px 12px; background: var(--card); border-top: 1px solid var(--line2); border-radius: 0 0 12px 12px; }
body.mode-2d #panel .send-intro { font-size: 12.5px; margin: 0 0 4px; }
.floor { display: flex; flex-direction: column; }
.floor .fr { display: grid; grid-template-columns: 92px 1fr auto; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line2); }
.floor .fr:last-child { border-bottom: 0; }
.floor .d { font-size: 13px; font-weight: 650; }
.floor .fs { display: flex; flex-wrap: wrap; gap: 4px; }
.floor .fs a { display: block; border-radius: 7px; line-height: 0; }
.floor .c { font: 12px var(--mono); color: var(--mut); }
.open3d { margin-top: 18px; display: flex; flex-direction: column; gap: 6px; }
.open3d .btn { width: 100%; }
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 12; display: grid; grid-template-columns: repeat(4, 1fr); background: var(--panel); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.tabs a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 9px 4px 10px; font-size: 12px; font-weight: 600; color: var(--mut); text-decoration: none; min-height: 56px; }
.tabs a svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; }
.tabs a[aria-current="page"] { color: var(--ink); }
.tabs a[aria-current="page"] svg { stroke: var(--gold); }
body.mode-2d .panel { position: static; width: auto; max-width: 760px; margin: 0 auto; border: 0; border-radius: 0; background: transparent; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
body.mode-2d .panel-head { padding: 16px 56px 12px 16px; }
body.mode-2d .panel-body { overflow: visible; padding: 12px 16px 24px; }
body.mode-2d .chatform { bottom: calc(64px + env(safe-area-inset-bottom)); }

/* phone in 3D: bottom sheets */
@media (max-width: 820px) {
  body.mode-3d .bar { top: 6px; left: 6px; right: 6px; padding: 6px 8px 6px 12px; gap: 6px; }
  body.mode-3d .bar .nav, body.mode-3d .bar .waiting, body.mode-3d .bar .clock { display: none; }
  body.mode-3d .bar .chip.spend { margin-left: auto; }
  .mark { font-size: 15px; }
  .sub { display: none; }
  body.mode-3d .panel { left: 0; right: 0; bottom: 0; top: auto; width: auto; height: 78vh; border-radius: 16px 16px 0 0; }
  body.mode-3d #roster { display: none; top: calc(var(--barH) + 12px); left: 8px; bottom: 76px; width: 250px; }
  body.mode-3d #roster.show { display: flex; }
  .dock { left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom)); width: auto; display: flex; padding: 6px; }
  .dock button { flex: 1; padding: 6px 4px; font-size: 13px; }
  .dock #btnTeam { display: inline-flex; }
  #tourBox { bottom: 8px; padding: 10px 12px; }
  #tbText { font-size: 13.5px; max-height: 22vh; }
}
@media (max-width: 400px) {
  .one-actions { grid-template-columns: 1fr 1fr; }
  .one-actions .primary { grid-column: 1 / -1; order: -1; }
}

/* ------------------------------------------------------------------ login, toast */
dialog { border: 1px solid var(--line); border-radius: 16px; background: var(--panel-solid); color: var(--ink); padding: 20px; width: min(440px, calc(100vw - 32px)); box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(0, 0, 0, .55); }
dialog h2 { margin: 0 0 6px; font: 600 20px var(--serif); color: var(--gold-ink); }
dialog form { display: flex; flex-direction: column; gap: 8px; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 30; background: #17110c; color: #f1e7d6; border: 1px solid #c9a24a; border-radius: 12px; padding: 10px 16px; font-size: 14px; max-width: min(560px, calc(100vw - 32px)); box-shadow: var(--shadow); }
body.mode-2d .toast { top: calc(64px + env(safe-area-inset-top)); bottom: auto; }
.lastone { margin-bottom: 12px; padding: 12px; border-color: rgba(76, 208, 138, .45); }
.lastone .sendkit { margin-top: 8px; padding: 10px; }
@media (prefers-reduced-motion: reduce) { *, *::before { animation: none !important; transition: none !important; } }

/* ------------------------------------------------------------------ gate: the live site before login shows only this */
body.booting > :not(.skip) { visibility: hidden; }
body.gated > :not(#gate) { display: none !important; }
.gate { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.gate-card { width: min(400px, 100%); display: flex; flex-direction: column; gap: 10px; background: var(--panel-solid); border: 1px solid var(--line); border-radius: 18px; padding: 28px 24px; box-shadow: var(--shadow); }
.gate-mark { font: 600 12px var(--mono); letter-spacing: .14em; color: var(--gold); }
.gate h1 { margin: 0; font: 600 32px/1.1 var(--serif); color: var(--gold-ink); }
.gate p { margin: 0; }
.gate #gateMsg:empty { display: none; }
