/* public/government.css — the Government as a 4X game. Civ 5/6 is the
   foundation: dark stone, gold edges, a tab strip like a top bar, rooms as
   panels, tiles like a city's tiles. Tokens at the top; a seat's accent comes
   from its hue (--hue). Claude, 2026-10-24. */

:root{
  --void:#070706;--panel:#111113;--panel2:#17181c;--stone:#1b1d23;--line:#272b33;--line2:#363b46;
  --ink:#ece7de;--muted:#a39e95;--dim:#6f737b;--gold:#d4af37;--gold2:#8a6d1c;--ember:#d0703c;--phos:#39ff14;--jade:#4caf7d;
  --serif:"Iowan Old Style","Palatino Linotype",Palatino,Georgia,serif;
  --mono:ui-monospace,"SF Mono",Menlo,Consolas,monospace;
  --bar-h:0px;
}
*{box-sizing:border-box}
html,body{margin:0;background:var(--void);color:var(--ink);font:16px/1.5 var(--serif)}
a{color:inherit}
button,input,select,textarea{font:inherit;color:var(--ink)}
button{background:var(--panel2);border:1px solid var(--line2);border-radius:4px;padding:6px 12px;cursor:pointer}
button:hover{border-color:var(--gold)}
button:disabled{opacity:.5;cursor:default}
input,select,textarea{background:var(--void);border:1px solid var(--line2);border-radius:4px;padding:6px 8px}
textarea{width:100%;min-height:64px;resize:vertical}
.dim{color:var(--dim)}
.small{font-size:.82em}
.zh{color:var(--gold);font-weight:400}
.status{min-height:1.4em;margin:0;color:var(--ember)}
.status.ok{color:var(--phos)}

/* the top bar */
.masthead{display:flex;gap:14px;align-items:center;max-width:1240px;margin:0 auto;padding:14px 16px 6px}
.masthead .trigram{font-size:34px;color:var(--ember);line-height:1}
.masthead h1{margin:0;font-size:clamp(22px,3.4vw,30px);font-weight:400;flex:1}
.controls{display:flex;gap:8px;align-items:center}
.controls .tog{min-width:40px;padding:6px 10px}
.controls .tog[aria-pressed="true"]{border-color:var(--gold);color:var(--gold)}
.rec{display:flex;gap:6px;align-items:center;border-color:var(--line2)}
.rec[aria-pressed="true"]{border-color:var(--ember);color:var(--ember);box-shadow:0 0 0 3px rgba(208,112,60,.25);animation:pulse 1.6s ease-in-out infinite}
@keyframes pulse{0%,100%{box-shadow:0 0 0 2px rgba(208,112,60,.2)}50%{box-shadow:0 0 0 7px rgba(208,112,60,.05)}}

/* the gate (unchanged) */
.gate{max-width:560px;margin:28px auto;padding:26px 20px 22px;background:var(--panel);border:1px solid var(--line);border-radius:8px;text-align:center}
.gate h2{margin:14px 0 6px;font-weight:400;font-size:22px}
.gate .y{margin:0 0 18px;color:var(--muted);font-style:italic}
.gate .mark{color:var(--gold);font-style:normal;font-family:var(--mono);font-size:.8em;margin-right:6px}
.gate form{display:flex;flex-direction:column;gap:10px;align-items:center}
.gate label{display:flex;gap:8px;align-items:center;color:var(--muted)}
.gate input{width:min(22em,70vw)}
.door{position:relative;width:120px;height:150px;margin:0 auto;border:2px solid var(--line2);border-radius:60px 60px 6px 6px;overflow:hidden;background:var(--panel2)}
.door .leaf{position:absolute;top:0;bottom:0;width:50%;background:linear-gradient(180deg,#2a211a,#1a140f);transition:transform .9s ease}
.door .leaf.l{left:0;border-right:1px solid var(--line);transform-origin:left}
.door .leaf.r{right:0;transform-origin:right}
.gate.open .leaf.l{transform:perspective(300px) rotateY(80deg)}
.gate.open .leaf.r{transform:perspective(300px) rotateY(-80deg)}
.gate.open{border-color:var(--gold)}

/* the stage */
main{max-width:1240px;margin:0 auto;padding:6px 16px calc(72px + var(--bar-h))}
.stage{position:relative;background:linear-gradient(180deg,#14161b,#0c0d10);border:1px solid var(--line2);border-radius:10px;box-shadow:inset 0 0 0 1px #000,0 0 0 1px var(--gold2);overflow:hidden}
.tabs{display:flex;gap:4px;padding:8px 8px 0;overflow-x:auto;scrollbar-width:none;border-bottom:1px solid var(--gold2);background:linear-gradient(180deg,#1f2229,#15171c)}
.tabs::-webkit-scrollbar{display:none}
.tab{position:relative;flex:0 0 auto;display:flex;gap:6px;align-items:center;padding:8px 12px 10px;border:1px solid var(--line2);border-bottom:0;border-radius:8px 8px 0 0;background:var(--stone);color:var(--muted);cursor:pointer;user-select:none;touch-action:pan-x;--accent:var(--gold)}
.tab .glyph{font-size:1.15em;line-height:1;color:var(--accent)}
.tab .word{font-size:.92em;letter-spacing:.02em}
.tab .count{font-family:var(--mono);font-size:.7em;color:var(--void);background:var(--gold);border-radius:9px;padding:0 6px;line-height:1.5}
.tab.kind-later{opacity:.72;border-style:dashed}
.tab.kind-later .word::after{content:" ·";color:var(--dim)}
.tab[aria-selected="true"]{background:var(--panel);color:var(--ink);border-color:var(--accent);box-shadow:0 2px 0 var(--panel),0 -2px 0 var(--accent)}
.tab.dragging{opacity:.5}
.tab.over{outline:2px dashed var(--gold)}
.tab .mv{display:none;position:absolute;top:-1px;width:16px;height:100%;padding:0;border:0;background:transparent;color:var(--gold);font-size:.8em;line-height:1}
.tab .mv.l{left:-2px}.tab .mv.r{right:-2px}
.tab[aria-selected="true"]:hover .mv,.tab[aria-selected="true"]:focus-within .mv,.tabs.touch .tab[aria-selected="true"] .mv{display:block}

/* the walkway: characters pass by the windows */
.walkway{position:relative;height:110px;background:linear-gradient(180deg,rgba(8,9,12,.55),rgba(8,9,12,.15) 55%,rgba(8,9,12,.35)),url(/government/palace/gallery.webp?v=20261025c) left bottom/auto 100% repeat-x #0b0c10;border-bottom:1px solid var(--line)}
/* the walkers: the three proconsuls drawn by Claude from the Sovereign's cards (walkers.js) */
.figure{position:absolute;bottom:2px;width:58px;height:102px;transition:left 2.8s cubic-bezier(.45,.05,.55,.95);will-change:left}
/* each walker is a button to his own room ([Y] 2026-10-26 "I should be able to click on these guys now to go to their thing") */
button.figure{border:0;padding:0;margin:0;background:none;color:inherit;font:inherit;cursor:pointer;-webkit-tap-highlight-color:transparent}
button.figure:hover .fig,button.figure:focus-visible .fig{filter:brightness(1.18)}
button.figure:hover .tag,button.figure:focus-visible .tag{display:block}
button.figure:focus-visible{outline:2px solid var(--gold);outline-offset:2px;border-radius:6px}
.figure::after{content:"";position:absolute;left:10px;right:10px;bottom:0;height:6px;border-radius:50%;background:rgba(0,0,0,.55);filter:blur(2px);z-index:0}
.figure .fig{position:absolute;inset:0;z-index:1}
.figure .fig svg{display:block;width:100%;height:100%;overflow:visible;filter:drop-shadow(0 1px 1px rgba(0,0,0,.5))}
.figure.flip .fig{transform:scaleX(-1)}
.figure svg g{transform-box:fill-box}
.figure .w-body{transform-origin:50% 100%;animation:wk-breathe 4.6s ease-in-out infinite}
.figure .w-head{transform-origin:40% 90%;animation:wk-nod 11s ease-in-out infinite}
/* each arm turns at its shoulder: the pivot is set on the drawing itself (public/government/walkers.js) */
.figure .w-tail{transform-origin:95% 95%;animation:wk-tail 2.6s ease-in-out infinite}
.figure .w-steam path{fill:none;stroke:rgba(255,250,232,.75);stroke-width:1.4;stroke-linecap:round;opacity:0;animation:wk-steam 2.8s ease-out infinite}
.figure .w-steam .s2{animation-delay:1.4s}
.figure .w-flame{transform-box:fill-box;transform-origin:50% 100%;animation:wk-flame .9s ease-in-out infinite}
.figure.walking .w-body{animation:wk-bob .62s ease-in-out infinite}
.figure.walking .w-foot.a{animation:wk-step .62s linear infinite}
.figure.walking .w-foot.b{animation:wk-step .62s linear infinite;animation-delay:-.31s}
.figure.walking .w-armb{animation:wk-swing .62s ease-in-out infinite}
.figure.walking .w-armf{animation:wk-swing .62s ease-in-out infinite reverse}
.figure.walking .w-armf.w-carry{animation:wk-carry .62s ease-in-out infinite reverse}
.figure.walking .w-armb.w-carry{animation:wk-carry .62s ease-in-out infinite}
.figure.walking .w-still,.figure.walking[data-seat="instructor"] .w-armb,.figure.walking[data-seat="instructor"] .w-armf{animation:none}
.figure.walking .w-tail{animation-duration:1.24s}
@keyframes wk-breathe{0%,100%{transform:scaleY(1)}50%{transform:scaleY(1.012)}}
@keyframes wk-nod{0%,100%{transform:rotate(0)}18%{transform:rotate(-3deg)}30%{transform:rotate(2deg)}44%,56%{transform:rotate(-11deg) translateY(-1px)}64%{transform:rotate(0)}76%,84%{transform:rotate(5deg)}92%{transform:rotate(0)}}
@keyframes wk-bob{0%,50%,100%{transform:translateY(0) rotate(-1deg)}25%,75%{transform:translateY(-2px) rotate(1deg)}}
@keyframes wk-step{0%{transform:translate(-5px,0)}25%{transform:translate(0,-3px)}50%{transform:translate(5px,0)}100%{transform:translate(-5px,0)}}
@keyframes wk-swing{0%,100%{transform:rotate(-8deg)}50%{transform:rotate(7deg)}}
@keyframes wk-carry{0%,100%{transform:rotate(-2.5deg)}50%{transform:rotate(2deg)}}
@keyframes wk-tail{0%,100%{transform:rotate(-7deg)}50%{transform:rotate(9deg)}}
@keyframes wk-steam{0%{opacity:0;transform:translateY(2px)}25%{opacity:.85}100%{opacity:0;transform:translateY(-8px)}}
@keyframes wk-flame{0%,100%{transform:scale(1,1)}30%{transform:scale(.88,1.12)}60%{transform:scale(1.08,.94)}}
.figure .tag{position:absolute;left:50%;top:-14px;transform:translateX(-50%);font-family:var(--mono);font-size:.62em;color:var(--dim);white-space:nowrap;display:none;z-index:2}
.labels-on .figure .tag{display:block}
@media (prefers-reduced-motion:reduce){.figure{transition:none}.figure .w-body,.figure .w-head,.figure .w-tail,.figure .w-foot,.figure .w-armb,.figure .w-armf,.figure .w-flame,.figure .w-steam path{animation:none}}

/* the room */
.room{padding:14px;min-height:300px;--accent:hsl(var(--hue,45) 55% 58%);--accent2:hsl(var(--hue,45) 40% 28%)}
.room-head{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin-bottom:12px}
.room-head .who{display:flex;gap:8px;align-items:baseline}
.room-head .post{font-family:var(--mono);font-size:.72em;letter-spacing:.18em;text-transform:uppercase;color:var(--accent)}
.room-head .name{font-size:20px;margin:0}
.stances{display:flex;gap:4px;margin-left:auto}
.stances button{padding:4px 10px;font-size:.88em;border-radius:14px}
.stances button[aria-pressed="true"]{border-color:var(--accent);color:var(--accent);background:var(--accent2)}
.stances button .dot{display:inline-block;width:6px;height:6px;border-radius:50%;background:var(--phos);margin-left:6px;vertical-align:middle}
.stances button.quiet .dot{background:var(--dim)}
.stat{display:flex;gap:10px;align-items:center;font-family:var(--mono);font-size:.78em;color:var(--muted);border:1px solid var(--line2);border-radius:6px;padding:4px 10px;background:var(--panel)}
.stat b{color:var(--gold);font-size:1.25em;font-weight:500}
.stat .bar{width:80px;height:6px;background:var(--line);border-radius:3px;overflow:hidden}
.stat .bar i{display:block;height:100%;background:var(--jade)}
.stat .tagline{color:var(--dim);font-size:.9em}

/* tiles */
.tiles{display:grid;grid-template-columns:repeat(auto-fill,minmax(96px,1fr));gap:14px;padding:6px 0}
.tile{position:relative;display:flex;flex-direction:column;align-items:center;gap:6px;padding:8px;background:transparent;border:0;cursor:pointer}
.tile .pic{width:88px;height:88px;border-radius:14px;border:2px solid var(--line2);background:var(--stone);display:grid;place-items:center;overflow:hidden;transition:transform .2s ease,box-shadow .2s ease}
.tile .pic img{width:100%;height:100%;display:block}
.tile:hover .pic,.tile:focus-visible .pic{transform:translateY(-2px);box-shadow:0 10px 24px -14px var(--accent)}
.tile .label{font-size:.82em;color:var(--muted);text-align:center;max-width:120px;display:none;line-height:1.25}
.labels-on .tile .label{display:block}
.tile .where{position:absolute;top:4px;right:10px;font-size:.6em;font-family:var(--mono);color:var(--dim);letter-spacing:.1em;display:none}
.labels-on .tile .where{display:block}
/* the condition layer: colour, glow, border */
.tile.mark-new .pic{border-color:var(--gold);box-shadow:0 0 0 1px var(--gold2),0 0 18px -2px rgba(212,175,55,.55)}
.tile.mark-urgent .pic{border-color:var(--ember);box-shadow:0 0 0 2px rgba(208,112,60,.4),0 0 22px -2px var(--ember);animation:pulse 1.4s ease-in-out infinite}
.tile.mark-stalled .pic{border-style:dashed;border-color:var(--dim);opacity:.7;filter:saturate(.4)}
.tile.mark-done .pic{border-color:var(--jade);opacity:.85}
.tile.mark-done .pic::after{content:"✓";position:absolute;right:6px;bottom:4px;color:var(--jade);font-size:1.1em;text-shadow:0 0 4px #000}
.tile .pic{position:relative}
.empty-room{color:var(--dim);font-style:italic;padding:18px 0}
.unknown{color:var(--ember);font-size:.85em}

/* the matter, opened */
.matter{background:var(--panel);color:var(--ink);border:1px solid var(--gold2);border-radius:10px;padding:0;max-width:min(520px,92vw);box-shadow:0 30px 80px -30px #000}
.matter::backdrop{background:rgba(0,0,0,.6)}
.matter-head{display:flex;justify-content:flex-end;padding:6px 6px 0;margin:0}
.matter .x{border:0;background:transparent;font-size:1.3em;padding:2px 10px;color:var(--dim)}
.matter-body{padding:0 20px 20px;display:grid;grid-template-columns:96px 1fr;gap:16px}
.matter-body .pic{width:96px;height:96px;border-radius:14px;border:2px solid var(--line2);overflow:hidden}
.matter-body .pic img{width:100%;height:100%}
.matter-body h2{margin:0 0 4px;font-size:20px;font-weight:400}
.matter-body .what{margin:0 0 6px;color:var(--muted)}
.matter-body .decision{margin:0 0 10px}
.matter-body .rooms{font-family:var(--mono);font-size:.7em;color:var(--dim);letter-spacing:.1em;text-transform:uppercase;margin-bottom:8px}
.options{display:flex;gap:6px;flex-wrap:wrap}
.options button{border-radius:14px}
.options button.chosen{border-color:var(--jade);color:var(--jade)}
.ruled{color:var(--jade);font-size:.88em;margin:8px 0 0}
.ways{margin:10px 0 0;padding:8px 10px;border:1px dashed var(--line2);border-radius:6px;font-size:.85em;color:var(--muted)}
.ways .ph{color:var(--dim);font-style:italic}
.src{font-size:.78em;color:var(--dim);margin-top:8px}
.src a{color:var(--accent)}

/* Hanuman's turns */
.week{margin:8px 0 6px}
.week-bar{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0 0 6px}
.week-title{font-family:var(--mono);font-size:.78em;letter-spacing:.16em;text-transform:uppercase;color:var(--gold)}
.week-step{background:var(--stone);border:1px solid var(--line2);color:var(--muted);border-radius:6px;min-width:40px;min-height:36px;cursor:pointer}
.week-step:disabled{opacity:.3;cursor:default}
/* the days side by side, one card in view, a swipe or the arrows to move */
.turns{display:flex;gap:0;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none;border-radius:8px}
.turns::-webkit-scrollbar{display:none}
.turns > .turn{flex:0 0 100%;scroll-snap-align:start;box-sizing:border-box;background:var(--stone);border:1px solid var(--line2);border-radius:8px;padding:10px 12px 12px;min-height:120px;display:flex;flex-direction:column;gap:6px}
.turn.today{border-color:var(--gold);box-shadow:0 0 0 1px var(--gold2),0 0 16px -4px var(--gold)}
.turn.rest{background:linear-gradient(180deg,#1b1d23,#14161b);border-style:dashed}
.turn .day{font-family:var(--mono);font-size:.7em;letter-spacing:.12em;text-transform:uppercase;color:var(--muted);display:flex;justify-content:space-between}
.turn.today .day{color:var(--gold)}
.turn .date{color:var(--dim)}
.ev{display:flex;gap:8px;align-items:center;font-size:.95em;line-height:1.3}
.ev .t{font-family:var(--mono);font-size:.78em;color:var(--dim);min-width:3.2em}
.ev .g{width:9px;height:9px;border-radius:50%;flex:0 0 9px}
.ev.teach .g{background:var(--gold)}.ev.bjj .g{background:#c0392b}.ev.wood .g{background:#a0522d}.ev.meeting .g{background:#5b8def}.ev.church .g{background:#e8e8e8}.ev.dnd .g{background:#9b59b6}.ev.routine .g{background:var(--jade)}.ev.rest .g{background:var(--dim)}
.ev.optional{opacity:.6}
/* the schedule's words always show: labels-off is for the tiles, and a week of bare dots is no schedule ([Y] 2026-10-25 "I don't actually see my schedule here") */
.ev .w{display:inline}
.turn-note{font-size:.76em;color:var(--dim)}
.advisor{display:inline-flex;gap:8px;align-items:center;margin-top:8px;padding:6px 10px;border:1px dashed var(--line2);border-radius:6px;color:var(--dim);font-size:.82em}

/* not built yet */
.later-room{display:grid;place-items:center;min-height:280px;color:var(--dim);text-align:center}
.later-room .big{font-size:64px;color:var(--gold2);line-height:1}
.later-room .word{font-size:1.1em;color:var(--muted)}
.later-room .nb{font-family:var(--mono);font-size:.78em;letter-spacing:.14em;text-transform:uppercase}

/* the Forum: a room of doors (2026-10-25) */
.forum-room{padding:18px 6px 8px;max-width:860px;margin:0 auto}
.forum-head{display:flex;gap:14px;align-items:center;margin-bottom:8px}.forum-head .big{font-size:44px;color:var(--gold2);line-height:1}.forum-head .name{margin:0;font-size:1.6em}
.forum-room .y{margin:0 0 20px;color:var(--muted);font-style:italic}.forum-room .y .mark{color:var(--gold);font-style:normal;font-family:var(--mono);font-size:.8em;margin-right:6px}
.forum-doors{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:16px}
.forum-door{display:grid;gap:8px;padding:22px 20px 18px;background:var(--panel);border:1px solid var(--line2);border-radius:10px;color:var(--ink);text-decoration:none;min-height:200px}
.forum-door:hover,.forum-door:focus-visible{border-color:var(--gold);outline:none}
.forum-door .big{font-size:40px;color:var(--gold2);line-height:1}.forum-door .word{font-size:1.25em}.forum-door .line{color:var(--muted);font-size:.92em;line-height:1.45}
.forum-door .nb{margin-top:auto;font-family:var(--mono);font-size:.74em;letter-spacing:.14em;text-transform:uppercase;color:var(--jade)}.forum-door.waits .nb{color:var(--dim)}
.forum-room .small{margin-top:18px}
.forum-head .big-ico{width:56px;height:56px;object-fit:contain}
.forum-door.wonder .nth{font-family:var(--mono);font-size:.72em;letter-spacing:.16em;text-transform:uppercase;color:var(--gold)}

/* settings */
.settings[hidden]{display:none}
.settings{margin:0 0 10px;padding:10px 14px;background:var(--panel);border:1px solid var(--line2);border-radius:8px;display:flex;gap:18px;align-items:center;flex-wrap:wrap}
.settings fieldset{border:0;margin:0;padding:0;display:flex;gap:14px;align-items:center}
.settings legend{font-family:var(--mono);font-size:.72em;letter-spacing:.16em;text-transform:uppercase;color:var(--gold);float:left;margin-right:10px}
.settings label{display:flex;gap:6px;align-items:center;color:var(--muted)}

/* the console of 2026-10-23, folded under the room */
.console-fold{margin-top:14px;border-top:1px solid var(--line)}
.console-fold > summary{cursor:pointer;color:var(--dim);font-family:var(--mono);font-size:.74em;letter-spacing:.16em;text-transform:uppercase;padding:8px 0;list-style:none}
.console-fold > summary::before{content:"▸ ";color:var(--accent)}
.console-fold[open] > summary::before{content:"▾ "}
.console{display:flex;flex-direction:column;background:var(--panel);border:1px solid var(--line);border-radius:8px}
.console .body{display:flex;flex-direction:column;gap:2px;padding:4px 0 10px}
.module{padding:10px 14px;border-top:1px solid var(--line)}
.module:first-child{border-top:0}
.module h3{margin:0 0 6px;font-family:var(--mono);font-size:.72em;letter-spacing:.2em;text-transform:uppercase;color:var(--accent);display:flex;justify-content:space-between;gap:8px}
.module h3 .sub{color:var(--dim);letter-spacing:.08em;text-transform:none;font-weight:400}
.module .empty{color:var(--dim);font-style:italic;margin:0}
.module .note{color:var(--muted);font-size:.85em;margin:0 0 6px}
.module ol,.module ul{margin:0;padding:0;list-style:none}
.track li{padding:6px 0;border-top:1px dotted var(--line)}
.track li:first-child{border-top:0}
.track .when{font-family:var(--mono);font-size:.72em;color:var(--dim)}
.track .src{font-size:.82em;color:var(--muted)}
.track .src a{color:var(--accent)}
.field li{padding:6px 0;border-top:1px dotted var(--line)}
.field li:first-child{border-top:0}
.field .kind{font-family:var(--mono);font-size:.7em;letter-spacing:.14em;text-transform:uppercase;color:var(--accent);margin-right:6px}
.field .kind.boundary{color:var(--gold)}
.field .signed{font-size:.8em;color:var(--dim)}
.field form{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin:4px 0 10px}
.field form textarea{grid-column:1/-1}
.field form .row{grid-column:1/-1;display:flex;gap:6px;align-items:center;flex-wrap:wrap}
.pages .label{font-family:var(--mono);font-size:.72em;color:var(--gold);letter-spacing:.1em}
.pages p{margin:4px 0}
.pages ul{padding-left:18px;list-style:disc}
.terminal .log{display:flex;flex-direction:column;gap:8px;max-height:46vh;overflow:auto;padding:4px 0}
.terminal .turn{padding:6px 10px;border-radius:6px;white-space:pre-wrap;min-height:0;display:block}
.terminal .turn.you{background:var(--panel2);border:1px solid var(--line2);align-self:flex-end;max-width:92%}
.terminal .turn.seat{background:var(--void);border:1px solid var(--accent2);align-self:flex-start;max-width:96%}
.terminal .turn.err{color:var(--ember);border:1px dashed var(--ember);align-self:stretch}
.terminal .tag{display:block;margin-top:6px;font-family:var(--mono);font-size:.68em;letter-spacing:.08em;color:var(--dim);border-top:1px dotted var(--line);padding-top:4px}
.terminal .tag b{color:var(--accent);font-weight:500}
.terminal .mk{margin-top:4px;font-size:.78em}
.terminal form{display:flex;gap:6px;margin-top:8px;align-items:flex-end}
.terminal form textarea{flex:1;min-height:48px}
.terminal .who{font-family:var(--mono);font-size:.7em;color:var(--dim);letter-spacing:.12em;text-transform:uppercase}

/* the slots */
.throne-slot{margin:18px 0 0;margin-left:auto;width:max-content;max-width:100%;padding:6px 12px;border:1px dashed var(--line2);border-radius:6px;color:var(--dim);font-size:.82em;display:flex;gap:10px;align-items:center;opacity:.75}
.throne-slot .glyph{color:var(--gold);font-size:1.3em}
#character-sheet:not([hidden]){margin:20px 0 0;padding:14px;border:1px solid var(--line);border-radius:8px;background:var(--panel)}
.colophon{max-width:1240px;margin:0 auto;padding:8px 16px calc(24px + var(--bar-h));font-size:.78em}

@media (max-width:720px){
  .masthead{padding:10px 12px 4px;gap:10px}
  .masthead h1{font-size:20px}
  .rec span{display:none}
  main{padding:6px 10px calc(72px + var(--bar-h))}
  .room{padding:10px}
  .tiles{grid-template-columns:repeat(auto-fill,minmax(84px,1fr));gap:10px}
  .tile .pic{width:76px;height:76px}
  .matter-body{grid-template-columns:1fr}
  .stances{margin-left:0}
  .stat .bar{width:56px}
}

/* THE PORTRAITS: the Sovereign's cards, alive with light (Claude, 2026-10-25) */
.portrait{position:relative;display:block;float:right;width:260px;margin:4px 0 14px 18px;padding:0;border:0;border-radius:10px;overflow:hidden;background:#000;box-shadow:0 10px 30px -10px rgba(0,0,0,.8),0 0 0 1px var(--line2);cursor:zoom-in;isolation:isolate}
.portrait img{display:block;width:100%;height:auto;transform-origin:50% 40%;animation:pt-breathe 10s ease-in-out infinite}
.portrait .glow{position:absolute;left:var(--x);top:var(--y);width:var(--s);aspect-ratio:1;transform:translate(-50%,-50%);border-radius:50%;background:radial-gradient(circle,rgba(var(--c),.9) 0%,rgba(var(--c),.35) 30%,rgba(var(--c),0) 68%);mix-blend-mode:screen;pointer-events:none;animation:pt-flicker var(--d,3s) ease-in-out infinite}
.portrait .steam{position:absolute;left:var(--x);top:var(--y);width:5%;height:12%;border-radius:50%;background:radial-gradient(ellipse at 50% 85%,rgba(255,250,232,.55),rgba(255,250,232,0) 70%);filter:blur(2px);opacity:0;pointer-events:none;transform:translate(-50%,-100%);animation:pt-rise 4.2s linear infinite;animation-delay:var(--delay,0s)}
.portrait .sheen{position:absolute;inset:-20%;background:linear-gradient(115deg,rgba(255,236,170,0) 42%,rgba(255,236,170,.16) 50%,rgba(255,236,170,0) 58%);transform:translateX(-60%);mix-blend-mode:screen;pointer-events:none;animation:pt-sheen 11s ease-in-out infinite}
.portrait:focus-visible{outline:2px solid var(--gold);outline-offset:3px}
@keyframes pt-breathe{0%,100%{transform:scale(1)}50%{transform:scale(1.014)}}
@keyframes pt-flicker{0%,100%{opacity:.55}18%{opacity:.85}33%{opacity:.62}52%{opacity:.95}71%{opacity:.68}86%{opacity:.82}}
@keyframes pt-rise{0%{opacity:0;transform:translate(-50%,-100%) scale(.8,1)}18%{opacity:.7}100%{opacity:0;transform:translate(-20%,-260%) scale(2.2,1.6)}}
@keyframes pt-sheen{0%,62%{transform:translateX(-60%)}82%,100%{transform:translateX(60%)}}
.console-fold{clear:both}
.portrait-dialog{padding:0;border:0;background:transparent;max-width:min(92vw,560px);max-height:94vh;overflow:visible}
.portrait-dialog::backdrop{background:rgba(5,6,8,.86)}
.portrait.whole{float:none;width:min(92vw,560px,calc(94vh * 2 / 3));margin:0;cursor:zoom-out}
@media (max-width:720px){.portrait{width:44%;margin:2px 0 10px 12px}}
@media (prefers-reduced-motion:reduce){.portrait img,.portrait .glow,.portrait .steam,.portrait .sheen{animation:none}.portrait .steam,.portrait .sheen{display:none}}

/* THE PALACE: the front of the Government over his painted hall (Claude, 2026-10-25) */
.tab .tab-ico{width:20px;height:20px;border-radius:5px;display:block;flex:0 0 20px}
.later-room .big-ico{width:min(240px,60vw);height:auto;border-radius:22px;display:block;margin:0 auto 14px;box-shadow:0 12px 40px -12px rgba(0,0,0,.9),0 0 0 1px rgba(212,175,55,.35)}
#room[data-seat="palace"]{padding:0}
.palace{position:relative;min-height:min(78vh,760px);padding:18px;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-areas:"now court" "left court" "waiting order";align-content:start;gap:16px;background:linear-gradient(180deg,rgba(6,7,10,.35),rgba(6,7,10,.05) 30%,rgba(6,7,10,.55)),url(/government/palace/hall-wide.webp?v=20261025c) center/cover no-repeat #0b0c10;border-radius:0 0 10px 10px}
.palace-panel{background:rgba(10,11,16,.66);backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);border:1px solid rgba(212,175,55,.38);border-radius:14px;padding:12px;box-shadow:0 14px 40px -18px rgba(0,0,0,.9)}
.palace-panel.now{grid-area:now}.palace-panel.waiting{grid-area:waiting}.palace-panel.court{grid-area:court;align-self:start}.palace-panel.left{grid-area:left}.palace-panel.order{grid-area:order}
.palace .now-tag{font-family:var(--mono);font-size:.74em;letter-spacing:.18em;text-transform:uppercase;color:var(--gold,#d4af37)}
/* pick up where you left off: the page itself, small, inside the panel */
.left-card{display:flex;flex-direction:column;gap:8px;color:var(--ink,#ece6d8);text-decoration:none}
.left-screen{position:relative;width:100%;height:150px;overflow:hidden;border-radius:10px;background:#07080b;box-shadow:0 0 0 1px rgba(212,175,55,.35),inset 0 0 0 1px rgba(0,0,0,.6)}
.left-screen iframe{position:absolute;left:0;top:0;border:0;transform-origin:0 0;pointer-events:none;background:#0b0c10}
.left-screen::after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,transparent 60%,rgba(6,7,10,.55))}
.left-card:hover .left-screen,.left-card:focus-visible .left-screen{box-shadow:0 0 0 2px var(--gold,#d4af37)}
.left-txt{display:flex;flex-direction:column;gap:2px;min-width:0}
.left-what{font-size:1.25em;line-height:1.2;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.left-over{color:var(--muted);font-size:.9em}
.left-empty{display:flex;flex-direction:column;gap:6px;padding:4px}
/* the order box */
.order-wrap{display:flex;flex-direction:column;gap:8px}
.order-form{display:flex;flex-direction:column;gap:8px}
.order-text{width:100%;box-sizing:border-box;min-height:58px;resize:vertical;padding:10px 12px;border-radius:10px;border:1px solid var(--line2);background:rgba(6,7,10,.7);color:var(--ink,#ece6d8);font:inherit;font-size:1.05em}
.order-row{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.order-chips{display:flex;flex-wrap:wrap;gap:6px}
.order-chips .chip{padding:4px 10px;border-radius:999px;border:1px solid var(--line2);background:rgba(20,22,28,.7);color:var(--muted);font:inherit;font-size:.85em;cursor:pointer}
.order-chips .chip[aria-pressed="true"]{border-color:var(--gold,#d4af37);color:var(--gold,#d4af37);background:rgba(212,175,55,.12)}
.order-to{flex:1;min-width:8em;color:var(--muted);font-size:.9em}
.order-send{padding:7px 14px;border-radius:10px;border:1px solid var(--gold,#d4af37);background:rgba(212,175,55,.16);color:var(--gold,#d4af37);font:inherit;cursor:pointer}
.order-send:disabled{opacity:.5}
.order-st{margin:0;min-height:1em;color:var(--muted);font-size:.85em}
.order-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px}
.order-list li{display:flex;flex-direction:column;gap:1px;padding:6px 8px;border-left:2px solid rgba(212,175,55,.45);background:rgba(6,7,10,.35);border-radius:0 6px 6px 0}
.order-list .who{font-family:var(--mono);font-size:.72em;color:var(--muted)}
.order-list .said{font-size:.95em;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.now-card{display:flex;align-items:center;gap:14px;width:100%;padding:6px;border:0;background:none;color:var(--ink,#ece6d8);cursor:zoom-in;text-align:left;font:inherit}
.now-card .now-ico{width:78px;height:78px;border-radius:16px;flex:0 0 78px;box-shadow:0 0 0 1px rgba(212,175,55,.4)}
.now-card .now-txt{display:flex;flex-direction:column;gap:4px;min-width:0}
.now-card .now-tag{font-family:var(--mono);font-size:.74em;letter-spacing:.18em;text-transform:uppercase;color:var(--gold,#d4af37)}
.now-card .now-what{font-size:1.5em;line-height:1.15}
.now-card .now-what b{font-family:var(--mono);font-weight:500;font-size:.62em;color:var(--muted);margin-right:4px}
.now-card.live .now-ico{animation:pt-flicker 2.6s ease-in-out infinite;box-shadow:0 0 0 2px var(--gold,#d4af37),0 0 22px -2px rgba(212,175,55,.8)}
.palace-court{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.court-card{position:relative;padding:0;border:0;border-radius:10px;overflow:hidden;background:#000;cursor:pointer;box-shadow:0 0 0 1px rgba(212,175,55,.35),0 10px 24px -12px rgba(0,0,0,.9);transition:transform .2s ease}
.court-card:hover,.court-card:focus-visible{transform:translateY(-3px)}
.court-card img{display:block;width:100%;height:auto}
.court-card .count{position:absolute;top:6px;right:6px}
.court-card .label{position:absolute;left:0;right:0;bottom:0;padding:4px 6px;background:linear-gradient(0deg,rgba(0,0,0,.8),transparent);color:#f3e6c2;font-size:.85em;text-align:center;display:none}
.labels-on .court-card .label{display:block}
.palace .tiles{margin:0}
/* the day, full screen */
.day-dialog{position:fixed;inset:0;width:100vw;height:100dvh;max-width:none;max-height:none;margin:0;padding:max(16px,env(safe-area-inset-top)) 16px 16px;border:0;box-sizing:border-box;background:linear-gradient(180deg,rgba(6,7,10,.86),rgba(6,7,10,.94)),url(/government/palace/hall-tall.webp?v=20261025c) center/cover no-repeat #07080b;color:var(--ink,#ece6d8)}
.day-dialog::backdrop{background:#000}
.day-close{position:absolute;top:max(12px,env(safe-area-inset-top));right:14px;width:44px;height:44px;border-radius:50%;border:1px solid var(--line2);background:rgba(20,22,28,.8);color:var(--muted);font-size:18px;cursor:pointer;z-index:2}
.week.full{height:100%;display:flex;flex-direction:column;max-width:760px;margin:0 auto;padding-top:52px;box-sizing:border-box}
.week.full .week-title{font-size:1.1em}
.week.full .turns{flex:1;min-height:0}
.week.full .turns > .turn{padding:22px 22px 26px;gap:16px;overflow-y:auto}
.week.full .turn .day{font-size:1em}
.week.full .ev{font-size:1.6em;gap:14px}
.week.full .ev .t{font-size:.6em;min-width:4em}
.week.full .ev .g{width:16px;height:16px;flex:0 0 16px}
.week:not(.full) .turns{cursor:zoom-in}
@media (max-width:720px){
  .palace{grid-template-columns:1fr;grid-template-areas:"now" "left" "court" "order" "waiting";padding:12px;gap:12px;min-height:min(84vh,900px);background-image:linear-gradient(180deg,rgba(6,7,10,.35),rgba(6,7,10,.05) 30%,rgba(6,7,10,.55)),url(/government/palace/hall-tall.webp?v=20261025c)}
  .now-card .now-ico{width:60px;height:60px;flex-basis:60px}
  .now-card .now-what{font-size:1.25em}
}

/* The Claude meter banner (2026-10-29), across the top of every tab. */
.claude-banner{display:block;max-width:1240px;margin:0 auto 8px;padding:8px 16px;border:1px solid var(--line2);border-radius:8px;background:var(--panel2);color:var(--ink);font:13px/1.4 var(--mono);text-decoration:none;overflow-wrap:anywhere}
.claude-banner:hover,.claude-banner:focus-visible{border-color:var(--gold)}
.claude-banner.short{border-color:var(--ember)}
.claude-banner.exhausted{border-color:var(--ember);color:var(--ember)}
