/* Promised Lands, touch UI. The map fills the screen edge to edge; idle = the floating pills + BUILD + MENU + a small compass (design 5.1-5.3). Every number comes from the three layouts of
   design 5.2 through CSS variables that src/ui/layout.js sets on #app (--pill-h, --fab ...). Warm parchment and ink, gold for good, amber for trouble, never red scolds. Targets 40 px or more. */
:root { --ink: #3b2410; --ink2: #6b4426; --night: #2b2118; --gold: #e8b845; --goldd: #c9962e; --goldl: #ffe08a; --parch: #f7e8c4; --green: #4caf50; --blue: #3f7fd6; --yellow: #f1d12a; --red: #d9482b; --amber: #e59a2f;
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-l: env(safe-area-inset-left, 0px); --safe-r: env(safe-area-inset-right, 0px); --safe-t: env(safe-area-inset-top, 0px);
  --ui: system-ui, -apple-system, 'Segoe UI', Roboto, 'Liberation Sans', 'DejaVu Sans', Arial, sans-serif; --serif: Georgia, 'Liberation Serif', 'DejaVu Serif', serif; }
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { width: 100%; height: 100%; overflow: hidden; background: var(--night); color: var(--ink); font: 16px/1.3 var(--ui); overscroll-behavior: none; touch-action: none; -webkit-user-select: none; user-select: none; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
svg { display: block; }
#app { position: fixed; inset: 0; overflow: hidden; }
#map { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
#ui { position: absolute; inset: 0; pointer-events: none; }
#ui > * { pointer-events: auto; }
.boot { position: absolute; inset: 0; z-index: 60; display: grid; place-items: center; color: var(--parch); font: 28px var(--serif); letter-spacing: 0.04em; background: var(--night); }
.glass { background: linear-gradient(rgba(252, 241, 210, 0.97), rgba(241, 219, 170, 0.96)); border: 1.5px solid var(--goldd); border-radius: 14px; box-shadow: 0 4px 14px rgba(40, 20, 0, 0.45), inset 0 0 0 1px rgba(255, 248, 224, 0.75); color: var(--ink); }
.pos { color: #2e7d32; font-style: normal; font-weight: 800; } .neg { color: #b23a1c; font-style: normal; font-weight: 800; }

/* ---- the status strip: floating glass pills (style 2). The pill element is 44 px high (the hit area); the glass is its top 28 px. */
.pills { position: absolute; z-index: 10; top: max(var(--pill-top), var(--safe-t)); left: max(var(--side), var(--safe-l)); right: calc(max(var(--side), var(--safe-r)) + 58px); display: flex; flex-wrap: wrap; align-items: flex-start; column-gap: var(--pill-gap); row-gap: var(--row-gap); pointer-events: none !important; }
.pill { position: relative; isolation: isolate; pointer-events: auto; display: flex; align-items: center; gap: 6px; height: 44px; margin-bottom: -16px; padding: 0 11px 16px; white-space: nowrap; color: #fbeccb; cursor: pointer; font-variant-numeric: tabular-nums; touch-action: none; }
.pill::before { content: ''; position: absolute; inset: 0 0 16px 0; z-index: -1; border-radius: 15px; background: rgba(46, 29, 15, 0.8); backdrop-filter: blur(4px); border: 1px solid rgba(232, 184, 69, 0.85); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(255, 235, 170, 0.18); }
.pill svg.ic { width: 17px; height: 17px; flex: none; }
.pill b { font: 800 13px/1 var(--ui); } .pill em { font: 800 11px/1 var(--ui); font-style: normal; } .pill small { font: 600 9.5px/1 var(--ui); opacity: 0.8; }
.pill .pos { color: #a6ec84; } .pill .neg { color: #ff9a7a; }
.pill.city { padding-left: 8px; } .pill .nm { display: flex; flex-direction: column; gap: 2px; } .pill .nm b { font: 700 13.5px/1 var(--serif); color: var(--goldl); letter-spacing: 0.2px; }
.pill .crest svg { width: 20px; height: 20px; color: rgba(232, 184, 69, 0.9); }
.pill.pop small:empty, .pill.coin em:empty { display: none; }
.pwr { gap: 7px; flex: 0 1 329px; min-width: 150px; } .pwr .lampic svg { width: 30px; height: 22px; } .pwr .pw-t { font: 700 10px/1 var(--ui); opacity: 0.85; overflow: hidden; text-overflow: ellipsis; }
.oil { flex: 1 1 60px; min-width: 60px; max-width: 160px; height: 7px; border-radius: 5px; background: rgba(0, 0, 0, 0.5); box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.45); overflow: hidden; }
.oil i { display: block; height: 100%; border-radius: 5px; background: linear-gradient(#fff0b0, #f4b93a 55%, #d68a1c); box-shadow: 0 0 7px rgba(255, 200, 60, 0.9); transition: width 0.4s; }
.pct { font: 800 11.5px/1 var(--ui); min-width: 30px; text-align: right; }
.pwr[data-stage='low'] .oil i { background: linear-gradient(#ffd596, #e59a2f 55%, #c47a14); } .pwr[data-stage='low'] .pct, .pwr[data-stage='dark'] .pct, .pwr[data-stage='flicker'] .pct { color: #ff9a7a; }
.pwr[data-stage='flicker'] .oil i { background: linear-gradient(#ffd596, #e59a2f 55%, #c47a14); animation: blink 2s steps(1) infinite; }
.pwr[data-stage='dark'] .oil { box-shadow: inset 0 0 0 1px #d9482b; }
@keyframes blink { 50% { opacity: 0.25; } }
.speed { position: absolute; z-index: 12; top: 0; right: max(4px, var(--safe-r)); width: var(--speed-hit-w); height: var(--speed-hit-h); display: flex; align-items: flex-start; justify-content: center; touch-action: none; }
.speed .sp { margin-top: var(--speed-pill-top); width: var(--speed-pill-w); height: var(--speed-pill-h); border-radius: 12px; display: flex; align-items: center; justify-content: center; background: rgba(46, 29, 15, 0.85); border: 1px solid rgba(232, 184, 69, 0.9); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4); }
.sp-ic svg { width: 15px; height: 15px; }
.l-portrait .pills { right: max(var(--side), var(--safe-r)); } .l-portrait .pwr { flex: 1 0 100%; } .l-portrait .crest { display: none; } .l-portrait .oil { max-width: none; }
.l-compact .pw-t { display: none; } .l-compact .pwr { flex-basis: 182px; }

/* ---- corner buttons and the undo chip */
.fab { position: absolute; z-index: 14; width: var(--fab); height: var(--fab); border-radius: 50%; display: flex; align-items: center; justify-content: center; background: radial-gradient(circle at 35% 28%, #fbe08a, #dba02e 60%, #a56a14); border: 2px solid #5b3a1c; box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.55); }
.fab svg { width: 26px; height: 26px; } .fab.on { background: radial-gradient(circle at 35% 28%, #fff6c8, #f5c744 60%, #c8861a); box-shadow: 0 0 0 3px rgba(255, 224, 138, 0.9), 0 3px 9px rgba(0, 0, 0, 0.5); }
.fab.small { width: var(--compass); height: var(--compass); background: rgba(46, 29, 15, 0.82); border: 1.5px solid rgba(232, 184, 69, 0.9); backdrop-filter: blur(3px); transition: opacity 0.4s; } .fab.small.idle { opacity: 0.45; }
#fab-build { left: max(var(--fab-edge), var(--safe-l)); bottom: max(var(--fab-edge), var(--safe-b)); } #fab-menu { right: max(var(--fab-edge), var(--safe-r)); bottom: max(var(--fab-edge), var(--safe-b)); }
#fab-compass { right: max(var(--compass-right), var(--safe-r)); top: calc(var(--compass-top) + var(--safe-t)); }
.l-landscape #fab-compass, .l-compact #fab-compass { top: auto; bottom: calc(var(--compass-bottom) + var(--safe-b)); }
.dim .fab { filter: saturate(0.35) brightness(0.7); }
.undo { position: absolute; z-index: 14; left: max(var(--fab-edge), var(--safe-l)); bottom: calc(var(--fab-edge) + var(--fab) + 8px + var(--safe-b)); height: var(--undo-h); min-width: 44px; padding: 0 16px; border-radius: 22px; font: 800 14px/1 var(--ui); background: linear-gradient(#ffe69a, #f0b13a); border: 2px solid #8a5a14; box-shadow: 0 3px 9px rgba(0, 0, 0, 0.45); }
.lefty #fab-build { left: auto; right: max(var(--fab-edge), var(--safe-r)); } .lefty #fab-menu { right: auto; left: max(var(--fab-edge), var(--safe-l)); } .lefty #fab-compass { right: auto; left: max(var(--compass-right), var(--safe-l)); }
.lefty .undo { left: auto; right: max(var(--fab-edge), var(--safe-r)); } .lefty .menu { right: auto; left: 6px; }

/* ---- trays: only one is ever up (design 5.1). They slide in over 180 ms. */
.tray { position: absolute; z-index: 13; animation: slidein 0.18s ease-out; }
@keyframes slidein { from { opacity: 0; margin-bottom: -18px; } to { opacity: 1; margin-bottom: 0; } }
#tray-build { left: 50%; transform: translateX(-50%); bottom: calc(var(--cat-bottom) + var(--safe-b)); height: var(--cat-tray-h); display: flex; gap: 1px; padding: 5px 6px; max-width: calc(100% - 12px); }
.cat { width: var(--cat-w); height: var(--cat-h); flex: none; border-radius: 11px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: 1.5px solid transparent; }
.cat .ci svg { width: 28px; height: 28px; } .cat .lb { font: 700 10px/1 var(--ui); } .l-compact .cat .lb { display: none; } .l-compact .cat .ci svg { width: 30px; height: 30px; }
.cat.on { background: linear-gradient(#fff4c5, #f5cf68); border-color: #b9801a; box-shadow: 0 0 6px rgba(255, 210, 90, 0.8); }
#pop-items { left: 50%; transform: translateX(-50%); bottom: calc(var(--item-bottom) + var(--safe-b)); padding: var(--item-pad); max-width: calc(100% - 12px); }
#pop-items h6 { font: 800 11px/1 var(--serif); margin: 0 0 4px 2px; height: 14px; } .l-compact #pop-items h6 { display: none; }
.popgroups { display: flex; gap: 10px; overflow-x: auto; touch-action: pan-x; scrollbar-width: none; } .popgroups::-webkit-scrollbar { display: none; }
.popgroups .grp { display: flex; flex-direction: column; gap: 3px; flex: none; } .popgroups .grp em { font: 800 9px/1 var(--ui); font-style: normal; letter-spacing: 0.5px; text-transform: uppercase; color: var(--ink2); }
.popgroups .row { display: flex; gap: 5px; }
.item { position: relative; flex: none; width: var(--item-w); height: var(--item-h); border-radius: 10px; border: 1.5px solid #8a5a2a; background: linear-gradient(#fffaf0, #ecd7a3); display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding: 3px 2px 4px; gap: 1px; overflow: hidden; }
.item .ph svg { width: 34px; height: 34px; } .l-compact .item .ph svg { width: 26px; height: 26px; }
.item b { font: 700 10.5px/1.05 var(--ui); text-align: center; } .item small { font: 700 10px/1.1 var(--ui); color: #8a5a14; text-align: center; } .l-compact .item b { font-size: 9.5px; } .l-compact .item small { font-size: 9px; }
.item.on { border-color: #fff3c4; box-shadow: 0 0 0 2px #ffd25a; } .item.landmark { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold); }
.item.poor, .zb.poor { opacity: 0.55; filter: grayscale(0.6); }
#armed { left: 50%; transform: translateX(-50%); bottom: calc(var(--armed-bottom) + var(--safe-b)); height: var(--armed-h); width: min(var(--armed-w), calc(100% - 2 * var(--fab) - 32px)); display: flex; align-items: center; gap: 8px; padding: 4px 8px; }
.l-portrait #armed { left: 6px; right: 6px; width: auto; transform: none; }
#armed .ph svg { width: 34px; height: 34px; } #armed .at { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; } #armed .at b { font: 700 13px/1.1 var(--ui); } #armed .at small { font: 700 11px/1 var(--ui); color: #8a5a14; }
.bt { min-height: 42px; padding: 0 13px; border-radius: 10px; border: 1.5px solid #6b4426; background: linear-gradient(#fbf1d4, #e4c98b); font: 700 12.5px/1 var(--ui); display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; }
.bt.gold { background: linear-gradient(#ffe69a, #f0b13a); border-color: #8a5a14; } .bt.done { background: linear-gradient(#8fdc7a, #3f9f3a); border-color: #1f6a2a; color: #fff; }
.tick { width: 46px; height: 44px; border-radius: 11px; border: 1.5px solid #1f6a2a; background: linear-gradient(#8fdc7a, #3f9f3a); display: flex; align-items: center; justify-content: center; } .tick svg { width: 24px; height: 24px; }

/* ---- the zone palette (pictures c): demand block, three groups, Done */
#tray-zone { left: var(--pal-left); right: var(--pal-right); bottom: calc(var(--pal-bottom) + var(--safe-b)); display: flex; align-items: flex-end; gap: 9px; padding: 5px 8px 6px; overflow-x: auto; touch-action: pan-x; scrollbar-width: none; }
.l-portrait #tray-zone { left: 6px; right: 6px; flex-wrap: wrap; gap: 6px; overflow: visible; }
.zgroups { display: contents; }
.rcim { width: var(--pal-demand-w); flex: none; display: flex; flex-direction: column; gap: 2px; padding-bottom: 1px; min-height: 50px; }
.rcim h6 { font: 800 8.5px/1 var(--ui); letter-spacing: 0.6px; text-transform: uppercase; color: var(--ink2); text-align: center; margin-bottom: 1px; }
.rcim .bars { height: 38px; display: flex; justify-content: space-between; position: relative; padding: 0 3px; } .rcim .bars::after { content: ''; position: absolute; left: 0; right: 0; top: 19px; height: 1px; background: rgba(107, 68, 38, 0.6); }
.rcim .bar { width: 14px; height: 100%; position: relative; } .rcim .bar i { position: absolute; left: 0; right: 0; border: 1px solid rgba(0, 0, 0, 0.45); transition: height 0.4s; } .rcim .bar i.up { bottom: 50%; border-radius: 2px 2px 0 0; } .rcim .bar i.dn { top: 50%; border-radius: 0 0 2px 2px; }
.rcim .lab { display: flex; justify-content: space-between; padding: 0 3px; } .rcim .lab b { width: 14px; text-align: center; font: 800 10px/1 var(--ui); }
.l-compact .rcim, .l-landscape .rcim { position: sticky; left: 0; } .l-compact #done { position: sticky; right: 0; }
.zgroups .grp, #tray-zone > .grp { display: flex; flex-direction: column; gap: 2px; flex: none; }
.grp > em { font: 800 8.5px/1 var(--ui); font-style: normal; letter-spacing: 0.35px; text-transform: uppercase; color: #fff; padding: 3px 5px; border-radius: 5px; text-align: center; white-space: nowrap; text-shadow: 0 1px 0 rgba(0, 0, 0, 0.35); }
.grp .btns { display: flex; gap: 3px; }
.zb { position: relative; width: var(--pal-btn-w); height: var(--pal-btn-h); flex: none; border-radius: 8px; border: 1.5px solid #6b4426; background: linear-gradient(#fbf1d4, #e4c98b); display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding: 2px 0 3px; gap: 1px; overflow: hidden; }
.zb::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--c, #999); } .zb .ph svg { width: 26px; height: 26px; } .zb .lb { font: 700 9px/1.05 var(--ui); text-align: center; letter-spacing: -0.1px; }
.zb.on { border-color: #fff3c4; box-shadow: 0 0 0 2px #ffd25a, 0 0 8px rgba(255, 210, 90, 0.8); background: linear-gradient(#fff4c5, #f5cf68); }
#done { width: var(--pal-done-w); height: var(--pal-done-h); margin-left: auto; flex: none; border-radius: 11px; border: 1.5px solid #1f6a2a; background: linear-gradient(#8fdc7a, #3f9f3a); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font: 800 11px/1 var(--ui); text-shadow: 0 1px 0 rgba(0, 0, 0, 0.3); }
#done svg { width: 20px; height: 20px; }
@media (max-width: 379px) { .l-portrait .rcim { order: 5; } }
.flag { position: absolute; z-index: 15; transform: translate(-50%, -100%); padding: 7px 13px; border-radius: 16px; font: 700 14px/1 var(--ui); white-space: nowrap; pointer-events: none !important; background: #1f6a2a; color: #fff; border: 1.5px solid #8fdc7a; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4); }
.flag.warn { background: var(--amber); color: var(--ink); border-color: #8a5a14; } .flag.below { transform: translate(-50%, 0); }

/* ---- menu panel and scrim (picture d) */
.scrim { position: absolute; inset: 0; z-index: 15; background: rgba(20, 10, 0, 0.28); }
.menu { position: absolute; z-index: 16; display: flex; flex-direction: column; overflow: hidden; left: var(--menu-left); right: var(--menu-right); bottom: calc(var(--menu-bottom) + var(--safe-b)); max-height: calc(var(--menu-max-vh) * 1vh); }
.l-landscape .menu, .l-compact .menu { left: auto; width: var(--menu-w); top: var(--menu-top); bottom: var(--menu-bottom); max-height: none; } .l-landscape.lefty .menu, .l-compact.lefty .menu { right: auto; left: 6px; }
.menu .hd { height: var(--menu-hd); flex: none; display: flex; align-items: center; padding: 0 2px 0 12px; font: 700 15px/1 var(--serif); background: linear-gradient(#7a5230, #4b2f19); color: var(--goldl); } .menu .hd span { flex: 1; }
.xbtn { position: relative; flex: none; width: 44px; height: 44px; } .xbtn::before { content: ''; position: absolute; inset: 2px; border-radius: 50%; background: rgba(255, 245, 215, 0.95); border: 1.5px solid var(--goldd); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35); } .xbtn svg { position: relative; width: 20px; height: 20px; margin: auto; }
#menulist { overflow-y: auto; touch-action: pan-y; }
.mi { height: var(--menu-row); width: 100%; display: flex; align-items: center; gap: 10px; padding: 0 10px 0 12px; border-bottom: 1px solid rgba(160, 110, 40, 0.35); text-align: left; position: relative; }
.mi .ri svg { width: 26px; height: 26px; } .mi .t { flex: 1; display: flex; flex-direction: column; gap: 2px; } .mi .t b { font: 700 14px/1 var(--ui); } .mi .t small { font: 500 10.5px/1 var(--ui); color: var(--ink2); } .mi .chev svg { width: 14px; height: 14px; opacity: 0.6; } .mi:last-child { border-bottom: 0; }

/* ---- toasts, hint, cards, query, banner, Elder, rings */
.toast { position: absolute; z-index: 11; left: 50%; transform: translateX(-50%); top: calc(var(--toast-top) + var(--safe-t)); height: var(--toast-h); max-width: calc(100% - 24px); display: flex; align-items: center; gap: 8px; padding: 0 16px 0 10px; border-radius: 18px; background: rgba(46, 29, 15, 0.92); color: #fbeccb; border: 1px solid rgba(232, 184, 69, 0.85); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4); font: 600 13px/1.1 var(--ui); animation: fadein 0.25s; }
.l-landscape .toast, .l-compact .toast { max-width: var(--toast-max-w); } .toast[data-kind='warn'] { background: var(--amber); color: var(--ink); border-color: #8a5a14; }
.toast .tic svg { width: 20px; height: 20px; flex: none; } .toast .tt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.hint { position: absolute; z-index: 11; left: 50%; transform: translateX(-50%); top: calc(var(--hint-top) + var(--safe-t)); height: 28px; max-width: calc(100% - 24px); padding: 0 14px; border-radius: 14px; display: flex; align-items: center; background: rgba(46, 29, 15, 0.82); color: #fbeccb; border: 1px solid rgba(232, 184, 69, 0.85); font: 600 12px/1 var(--ui); white-space: nowrap; pointer-events: none !important; }
.card { position: absolute; z-index: 18; top: calc(var(--pills-end) + 6px + var(--safe-t)); width: 244px; padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 4px; }
.card h4 { font: 700 15px/1.1 var(--serif); } .card p { font: 500 12px/1.3 var(--ui); } .card p.small { font-size: 11px; color: var(--ink2); }
.qcard { position: absolute; z-index: 18; left: 50%; transform: translateX(-50%); width: min(300px, calc(100% - 24px)); bottom: calc(var(--fab-edge) + var(--fab) + 10px + var(--safe-b)); padding: 8px 12px 10px; display: flex; flex-direction: column; gap: 3px; }
.qcard.top { bottom: auto; top: calc(var(--pills-end) + 8px + var(--safe-t)); } .qcard h4 { font: 700 15px/1.1 var(--serif); } .qcard p { font: 500 12.5px/1.3 var(--ui); }
.tag { position: absolute; z-index: 15; transform: translate(-50%, -150%); padding: 5px 10px; border-radius: 12px; background: #fffaf0; border: 1.5px solid var(--goldd); font: 700 12px/1 var(--ui); pointer-events: none !important; white-space: nowrap; }
.banner { position: absolute; z-index: 12; left: 50%; transform: translateX(-50%); top: calc(var(--banner-top) + var(--safe-t)); width: min(440px, calc(100% - 12px)); }
.l-landscape .banner, .l-compact .banner { width: min(440px, calc(100% - 150px)); }
.banner.power { display: flex; align-items: center; gap: 10px; padding: 8px 10px 9px; background: linear-gradient(#3a2a46, #251a31); border-color: var(--gold); color: #fbeccb; min-height: var(--power-h); }
.banner .pl svg { width: 56px; height: 41px; flex: none; } .banner h3 { font: 700 14px/1.2 var(--serif); color: var(--goldl); } .banner p { font: 500 11px/1.25 var(--ui); color: #dccff5; margin-top: 2px; } .banner .bt-txt { flex: 1; } .banner .bt { min-height: 46px; color: var(--ink); }
.elder { position: absolute; z-index: 20; left: 50%; transform: translateX(-50%); bottom: 70px; width: min(420px, calc(100% - 2 * var(--fab) - 28px)); display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 16px; background: #fffaf0; border: 2px solid var(--goldd); box-shadow: 0 4px 14px rgba(40, 20, 0, 0.5); color: var(--ink); transition: bottom 0.18s; }
.l-portrait .elder { width: calc(100% - 24px); } .elder .eface { width: 42px; height: 42px; flex: none; border-radius: 50%; background: #e9d29a; border: 2px solid #7a4e24; overflow: hidden; } .elder .eface svg { width: 100%; height: 100%; }
.elder .es { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; } .elder .esay { font: 700 14px/1.15 var(--serif); } .elder .ehint { font: 500 11.5px/1.2 var(--ui); color: var(--ink2); } .elder .eskip { min-height: 40px; padding: 0 10px; font-size: 12px; }
.ring { animation: pulse 1.2s ease-in-out infinite; outline: 3px solid #ffd25a; outline-offset: 2px; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 214, 90, 0.95); } 50% { box-shadow: 0 0 0 10px rgba(255, 214, 90, 0); } }
.mapring { position: absolute; z-index: 14; width: 70px; height: 46px; margin: -23px 0 0 -35px; border-radius: 50%; pointer-events: none !important; }

/* ---- sheets: full screen, header with the X at the top-right (design 5.7) */
.sheethost { position: absolute; inset: 0; z-index: 30; } .sheethost.modal { display: grid; place-items: center; background: rgba(20, 10, 0, 0.35); }
.sheet { position: absolute; inset: 0; display: flex; flex-direction: column; background: linear-gradient(#f9ecc9, #efd9a2); }
.sheethost.modal .sheet { position: relative; inset: auto; width: min(430px, calc(100% - 20px)); max-height: calc(100% - 20px); border-radius: 14px; overflow: hidden; border: 1.5px solid var(--goldd); box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5); }
.sheet .hd { height: var(--sheet-hd); flex: none; display: flex; align-items: center; gap: 8px; padding: 0 2px 0 12px; background: linear-gradient(#7a5230, #4b2f19); color: var(--goldl); border-bottom: 2px solid var(--goldd); padding-top: var(--safe-t); }
.sheet .hd h2 { font: 700 17px/1 var(--serif); flex: 1; } .sheet .hd .info { font: 600 12px/1 var(--ui); color: #e6cf9d; } .sheet .hd .hic svg { width: 24px; height: 24px; }
.sheet .body { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; } .sheethost.modal .body { overflow-y: auto; touch-action: pan-y; padding: 6px 12px 12px; }
.sheet .pos { color: #2e7d32; } .sheet .neg { color: #b23a1c; }
.tabs { display: flex; gap: 4px; padding: 4px 8px 0; background: #d9bd83; flex: none; }
.tab { min-height: 40px; padding: 0 14px; border-radius: 9px 9px 0 0; font: 700 12.5px/1 var(--ui); display: flex; align-items: center; background: #c4a468; border: 1.5px solid #7a4e24; border-bottom: 0; color: #5b3a1c; } .tab.on { background: linear-gradient(#fbf1d4, #f4e2b0); color: var(--ink); }
.pane { flex: 1; min-height: 0; display: flex; gap: 12px; padding: 8px 12px; border-top: 1.5px solid #7a4e24; overflow-y: auto; touch-action: pan-y; } .pane.loans .col { flex: 1; gap: 8px; }
.col { display: flex; flex-direction: column; min-width: 0; } .col.l { width: 322px; flex: none; } .col.r { flex: 1; }
.l-portrait .pane { flex-direction: column; gap: 8px; padding: 6px 10px; } .l-portrait .col.l { width: auto; } .l-compact .col.l { width: 290px; }
h5 { font: 800 10.5px/1 var(--ui); letter-spacing: 0.7px; text-transform: uppercase; color: var(--ink2); margin: 6px 0 4px; display: flex; justify-content: space-between; }
.trow { display: flex; align-items: center; gap: 5px; min-height: 44px; border-bottom: 1px dashed #b4915b; } .trow .nm { flex: 1 1 80px; min-width: 72px; min-height: 40px; font: 700 12.5px/1.05 var(--ui); display: flex; align-items: center; gap: 5px; text-align: left; } .trow .nm i { width: 12px; height: 12px; border-radius: 3px; border: 1px solid rgba(0, 0, 0, 0.4); flex: none; }
.chv svg { width: 12px; height: 12px; transition: transform 0.15s; } .nm.open .chv svg { transform: rotate(90deg); } .subrows { padding-left: 10px; background: rgba(255, 255, 255, 0.28); border-radius: 8px; }
.pm { width: 40px; height: 40px; border-radius: 9px; border: 1.5px solid #6b4426; background: linear-gradient(#ecd39b, #c9a062); font: 800 22px/1 var(--ui); display: flex; align-items: center; justify-content: center; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55); flex: none; }
.rate { flex: none; width: 44px; text-align: center; font: 800 17px/1 var(--ui); } .amt { margin-left: auto; font: 800 14px/1 var(--ui); text-align: right; min-width: 44px; }
.sumrow { display: flex; justify-content: space-between; align-items: center; font: 700 14px/1 var(--ui); padding: 6px 0 3px; border-top: 2px solid #6b4426; margin-top: 2px; }
.loanbox { margin-top: 6px; border: 1.5px solid #7a4e24; border-radius: 9px; background: #fff6dc; padding: 5px 7px; display: flex; align-items: center; justify-content: space-between; gap: 7px; } .loanbox b { font: 800 13px/1.1 var(--ui); display: block; } .loanbox small { font: 500 10.5px/1.2 var(--ui); color: var(--ink2); }
.treasurer { display: flex; align-items: center; gap: 7px; background: #fffaf0; border: 1.5px solid #7a4e24; border-radius: 10px; padding: 4px 8px 4px 5px; margin-top: 8px; } .treasurer .bub { font: 500 11px/1.25 var(--ui); } .treasurer .bub b { font: 700 12px var(--serif); }
.face { width: 38px; height: 38px; flex: none; border-radius: 50%; border: 2px solid #7a4e24; background: #e9d29a; overflow: hidden; display: flex; align-items: center; justify-content: center; } .face svg { width: 28px; height: 28px; }
.drow { display: grid; grid-template-columns: 128px 1fr 44px 52px; align-items: center; gap: 6px; min-height: 44px; border-bottom: 1px dashed #b4915b; } .drow .nm { min-height: 40px; font: 700 12.5px/1.05 var(--ui); display: flex; gap: 5px; align-items: center; text-align: left; } .drow .di svg { width: 20px; height: 20px; }
.drow .pc { font: 800 13px/1 var(--ui); text-align: right; } .drow .co { font: 700 12.5px/1 var(--ui); text-align: right; } .drow.fixed small { font: 500 11px/1.2 var(--ui); color: var(--ink2); }
input[type='range'] { -webkit-appearance: none; appearance: none; width: 100%; height: 40px; background: none; touch-action: pan-y; }
input[type='range']::-webkit-slider-runnable-track { height: 8px; border-radius: 5px; background: linear-gradient(#ffe69a, #e0a02a); box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35); }
input[type='range']::-moz-range-track { height: 8px; border-radius: 5px; background: linear-gradient(#ffe69a, #e0a02a); }
input[type='range']::-webkit-slider-thumb { -webkit-appearance: none; width: 34px; height: 34px; margin-top: -13px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff3c4, #e8b845 60%, #b9801a); border: 2px solid #6b4426; box-shadow: 0 2px 3px rgba(0, 0, 0, 0.4); }
input[type='range']::-moz-range-thumb { width: 30px; height: 30px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff3c4, #e8b845 60%, #b9801a); border: 2px solid #6b4426; }
.netline { display: flex; justify-content: space-between; align-items: baseline; font: 800 15px/1 var(--serif); padding: 8px 2px 4px; border-top: 2px solid #6b4426; margin-top: 2px; }
.loanlist { white-space: pre-line; font: 600 13px/1.5 var(--ui); } .loanbtns { display: flex; gap: 8px; flex-wrap: wrap; }
.drow2 { display: grid; grid-template-columns: 1fr 86px; grid-template-areas: 'n b' 'w w' 'y y'; gap: 2px 8px; align-items: center; padding: 6px 0; border-bottom: 1px dashed #b4915b; } .drow2 b { grid-area: n; font: 700 13px/1.1 var(--ui); } .drow2 .dbar { grid-area: b; position: relative; height: 10px; border-radius: 5px; background: rgba(0, 0, 0, 0.12); }
.drow2 .dbar::after { content: ''; position: absolute; left: 50%; top: -2px; bottom: -2px; width: 1px; background: rgba(107, 68, 38, 0.7); } .drow2 .dbar i { position: absolute; top: 0; bottom: 0; border-radius: 5px; } .drow2 .dbar i.up { background: #4caf50; } .drow2 .dbar i.dn { background: #d98a2b; }
.drow2 .dw { grid-area: w; font: 700 12px/1.1 var(--ui); color: var(--ink2); } .drow2 small { grid-area: y; font: 500 11px/1.25 var(--ui); color: var(--ink2); }
.settings { padding: 4px 12px 16px; overflow-y: auto; touch-action: pan-y; flex: 1; } .srow { display: flex; align-items: center; gap: 10px; min-height: 48px; border-bottom: 1px dashed #b4915b; } .srow .sl { flex: 1; font: 700 14px/1.1 var(--ui); }
.sw { position: relative; width: 56px; height: 44px; flex: none; } .sw::before { content: ''; position: absolute; left: 2px; right: 2px; top: 8px; bottom: 8px; border-radius: 14px; background: #b9a27a; border: 1.5px solid #6b4426; } .sw i { position: absolute; left: 6px; top: 12px; width: 20px; height: 20px; border-radius: 50%; background: #fff6dc; border: 1.5px solid #6b4426; transition: left 0.15s; } .sw.on::before { background: #7bc86c; } .sw.on i { left: 30px; }
.segs { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; } .seg { min-height: 40px; min-width: 48px; padding: 0 10px; border-radius: 9px; border: 1.5px solid #6b4426; background: linear-gradient(#fbf1d4, #e4c98b); font: 700 12px/1 var(--ui); } .seg.on { background: linear-gradient(#ffe69a, #f0b13a); border-color: #8a5a14; box-shadow: 0 0 0 2px #ffd25a; }
.bt.hold { margin: 8px 0; } .bt.hold.holding { background: linear-gradient(90deg, #f0b13a 0, #f0b13a 100%) no-repeat, #e4c98b; background-size: 0 100%; animation: fill 3s linear forwards; } @keyframes fill { to { background-size: 100% 100%; } } .about { font: 500 12px/1.4 var(--ui); padding: 8px 0; }

/* ---- while a full sheet is open the strip and the corner buttons give way; calm mode switches the motion off */
.sheet-open #ui > :not(.sheethost) { display: none !important; }
.calm *, .calm *::before { animation: none !important; transition: none !important; }

/* ===== window styles: one block per window, each owned by one helper (wave 4); keep your CSS between your two marker lines ===== */
/* >>> advisors */
/* Advisors window (WP-4A, design 5.7): eight parchment cards in a grid that scrolls, one column on a phone held upright, two from 600 px; every button 44 px or more. */
.advisors { flex: 1; min-height: 0; overflow-y: auto; touch-action: pan-y; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 8px; align-content: start; padding: 8px max(10px, var(--safe-r)) calc(14px + var(--safe-b)) max(10px, var(--safe-l)); }
.advcard { position: relative; display: flex; gap: 10px; align-items: flex-start; padding: 8px 12px 8px 8px; border: 1.5px solid #7a4e24; border-radius: 14px; background: linear-gradient(#fffaf0, #fbf0d6); box-shadow: inset 0 0 0 1px rgba(255, 248, 224, 0.8), 0 2px 4px rgba(60, 30, 0, 0.18); }
.advcard.quiet, .advcard.empty { background: linear-gradient(#fbf3de, #f3e5bf); border-color: #a07a48; box-shadow: inset 0 0 0 1px rgba(255, 248, 224, 0.6); }
.advface { position: relative; flex: none; width: 52px; height: 52px; border-radius: 50%; border: 2px solid #7a4e24; overflow: hidden; background: radial-gradient(circle at 35% 30%, #fff3c4, #e9d29a 70%); display: grid; place-items: center; }
.advface b { font: 800 22px/1 var(--serif); color: var(--ink2); } .advface.ok b { visibility: hidden; } .advface img { position: absolute; max-width: none; height: auto; pointer-events: none; }
.advcol { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.advname { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 8px; min-height: 26px; padding-right: 18px; } .advname h3 { font: 700 16px/1.3 var(--serif); } .advname small { font: 700 11.5px/1.3 var(--ui); color: var(--ink2); }
.advdot { position: absolute; top: 8px; right: 9px; width: 12px; height: 12px; border-radius: 50%; background: var(--red); border: 1.5px solid #fff; box-shadow: 0 0 0 1px rgba(60, 30, 0, 0.25); }
.advmsg { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 6px 0 7px; border-top: 1px dashed #b4915b; } .advmsg:first-child { border-top: 0; padding-top: 0; } .advmsg:last-child { padding-bottom: 0; }
.advmsg .say { font: 500 13.5px/1.35 var(--ui); } .advmsg.new .say { font-weight: 700; } .advmsg .verse { font: italic 500 11.5px/1.35 var(--serif); color: var(--ink2); }
.advnew { display: inline-block; margin-right: 6px; padding: 2px 6px; border-radius: 8px; background: var(--red); color: #fff; font: 800 10px/1.2 var(--ui); letter-spacing: 0.4px; text-transform: uppercase; vertical-align: 1px; }
.advgo { min-height: 46px; margin-top: 3px; max-width: 100%; white-space: normal; text-align: center; line-height: 1.15; font-size: 13px; }
.advnone { min-height: 24px; font: 500 13px/1.35 var(--ui); color: var(--ink2); }
.l-compact .advisors { gap: 6px; padding-top: 6px; } .l-compact .advcard { padding: 6px 10px 6px 6px; gap: 8px; } .l-compact .advface { width: 44px; height: 44px; } .l-compact .advface b { font-size: 19px; }
.l-compact .advmsg .say { font-size: 12.5px; } .l-compact .advmsg .verse { font-size: 11px; } .l-compact .advgo { min-height: 44px; }
/* <<< advisors */
/* (spacer) */
/* >>> maps */
/* the chooser: tiles of 56 px or more, as many columns as fit (2 on a phone held upright, 4 or 5 sideways) */
.maps { flex: 1; min-height: 0; overflow-y: auto; touch-action: pan-y; padding: 8px max(10px, var(--safe-r)) calc(14px + var(--safe-b)) max(10px, var(--safe-l)); }
.mgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.mrow { min-height: 56px; display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 11px; border: 1.5px solid #8a5a2a; background: linear-gradient(#fffaf0, #ecd7a3); text-align: left; }
.mrow .mic { flex: none; } .mrow .mic svg { width: 28px; height: 28px; }
.mrow .mt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; } .mrow b { font: 700 14px/1.1 var(--ui); } .mrow small { font: 500 11.5px/1.2 var(--ui); color: var(--ink2); }
.mrow.on { border-color: #fff3c4; box-shadow: 0 0 0 2px #ffd25a, 0 0 8px rgba(255, 210, 90, 0.8); background: linear-gradient(#fff4c5, #f5cf68); } .mrow.moff { background: linear-gradient(#f3e6c4, #dcc48f); }
.mlegend { margin-top: 12px; max-width: 440px; padding: 4px 10px 10px; border: 1.5px solid #7a4e24; border-radius: 10px; background: #fff6dc; } .mlegend p { font: 500 11.5px/1.3 var(--ui); margin-top: 6px; }
.mramp { display: block; height: 11px; border-radius: 6px; border: 1px solid rgba(0, 0, 0, 0.4); overflow: hidden; } .mramp.steps { display: flex; } .mramp.steps i { flex: 1; }
.mends { display: flex; justify-content: space-between; margin-top: 3px; font: 700 10px/1 var(--ui); color: var(--ink2); } .mends.steps span { flex: 1; text-align: center; }
/* the chip on the map: the legend of the map that is showing and its X; only while a map is on (any open window hides it with the rest of the HUD); above the Undo chip's place, below toasts, trays and cards */
.mapchip { position: absolute; z-index: 10; left: max(var(--fab-edge), var(--safe-l)); bottom: calc(var(--fab-edge) + var(--fab) + var(--undo-h) + 16px + var(--safe-b)); width: 206px; display: flex; align-items: flex-start; }
.mapchip.wide { width: 250px; }
.mc-pick { flex: 1; min-width: 0; min-height: 52px; display: flex; flex-direction: column; justify-content: center; gap: 3px; padding: 5px 0 5px 10px; text-align: left; } .mc-t { font: 800 12px/1.1 var(--serif); }
/* <<< maps */
/* (spacer) */
/* >>> scribe */
/* The Scribe (WP-4C): tabs News | Graphs. Tabs, chips and range buttons are 44 px or more; the panes scroll. Portrait stacks everything; landscape and compact put the news in two columns and the graph pickers on the left. */
.sheet[data-sheet='scribe'] .tabs { padding: 4px 8px 0; } .sheet[data-sheet='scribe'] .tab { min-height: 44px; min-width: 96px; justify-content: center; font-size: 14px; } .l-compact .sheet[data-sheet='scribe'] .tabs { padding-top: 2px; }
.scr-pane { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 10px 12px 16px; border-top: 1.5px solid #7a4e24; overflow-y: auto; touch-action: pan-y; } .l-compact .scr-pane { padding: 6px 10px 10px; }
.scr-news { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; align-content: start; } .l-landscape .scr-news, .l-compact .scr-news { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); align-items: start; }
.scr-paper, .scr-card { background: #fff6dc; border: 1.5px solid #7a4e24; border-radius: 10px; padding: 10px 12px; box-shadow: inset 0 0 0 3px rgba(232, 184, 69, 0.16); } .scr-card { padding: 8px 12px 10px; margin-bottom: 10px; } .scr-side > :last-child { margin-bottom: 0; }
.scr-mast { text-align: center; padding-bottom: 6px; border-bottom: 3px double #7a4e24; } .scr-mast h3 { font: 700 21px/1.15 var(--serif); letter-spacing: 0.03em; } .scr-date { font: 700 13px/1.3 var(--ui); color: var(--ink2); margin-top: 3px; } .scr-weather { font: italic 500 13px/1.3 var(--serif); color: var(--ink2); }
.scr-score { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; min-height: 48px; padding: 8px 2px; border-bottom: 1px dashed #b4915b; } .scr-sl { font: 800 12px/1 var(--ui); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink2); white-space: nowrap; }
.scr-score b { font: 800 26px/1 var(--serif); } .scr-delta { font: 800 13px/1.2 var(--ui); } .scr-delta.pos { color: #2e7d32; } .scr-delta.neg { color: #b23a1c; }
.scr-head { display: flex; align-items: center; gap: 10px; min-height: 58px; padding: 8px 0; border-bottom: 1px dashed #b4915b; } .scr-head:nth-last-child(2) { border-bottom: 0; }
.scr-pic { flex: none; width: 48px; height: 48px; border-radius: 50%; border: 2px solid #7a4e24; background: #e9d29a; display: flex; align-items: center; justify-content: center; overflow: hidden; } .scr-pic svg { width: 34px; height: 34px; }
.scr-ht { min-width: 0; } .scr-ht h4 { font: 700 15px/1.25 var(--serif); } .scr-head:first-child h4 { font-size: 17px; } .scr-verse { font: italic 500 12.5px/1.3 var(--serif); color: var(--ink2); margin-top: 3px; } .scr-quiet { font: italic 500 13px/1.4 var(--serif); color: var(--ink2); padding: 10px 2px; }
.scr-card h5 { display: block; margin: 0 0 6px; font: 800 12px/1.2 var(--ui); letter-spacing: 0.04em; } .scr-q { font: 700 14px/1.3 var(--serif); }
.scr-bar { height: 14px; margin: 8px 0 5px; border-radius: 7px; background: rgba(0, 0, 0, 0.12); overflow: hidden; } .scr-bar i { display: block; height: 100%; border-radius: 7px; background: linear-gradient(#8fdc7a, #4caf50); } .scr-res { font: 700 13px/1.2 var(--ui); color: var(--ink2); }
.scr-list { list-style: none; } .scr-list li { position: relative; padding: 6px 0 6px 14px; font: 500 13px/1.35 var(--ui); border-bottom: 1px dashed #d5bd8a; } .scr-list li:last-child { border-bottom: 0; }
.scr-list li::before { content: ''; position: absolute; left: 2px; top: 13px; width: 6px; height: 6px; border-radius: 50%; background: var(--goldd); } .scr-list li.none { color: var(--ink2); font-style: italic; } .scr-list li.none::before { display: none; }
/* graphs: head (title, now, change), the chart, the three ranges, the 15 chips */
.scr-graphs { display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr); grid-template-areas: 'view' 'ranges' 'chips'; align-content: start; }
.scr-view { grid-area: view; display: flex; flex-direction: column; gap: 8px; min-width: 0; min-height: 0; } .scr-ranges { grid-area: ranges; align-self: start; } .scr-chips { grid-area: chips; }
.scr-gt { font: 700 17px/1.2 var(--serif); } .scr-gnow { margin-top: 3px; font: 500 14px/1.3 var(--ui); } .scr-gnow b { font-weight: 800; } .scr-gtrend { margin-top: 2px; font: 700 13px/1.3 var(--ui); } .scr-gtrend.pos { color: #2e7d32; } .scr-gtrend.neg { color: #b23a1c; }
.scr-ghilo, .scr-gshort { margin-top: 2px; font: 500 12.5px/1.3 var(--ui); color: var(--ink2); }
.scr-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; align-content: start; } .scr-ranges { display: flex; gap: 6px; }
.scr-chip, .scr-range { min-height: 44px; min-width: 44px; padding: 0 8px; border-radius: 10px; border: 1.5px solid #6b4426; background: linear-gradient(#fbf1d4, #e4c98b); font: 700 13px/1.1 var(--ui); color: var(--ink); } .scr-range { flex: 1 1 0; }
.scr-chip.on, .scr-range.on { background: linear-gradient(#ffe69a, #f0b13a); border-color: #8a5a14; box-shadow: 0 0 0 2px #ffd25a; }
.scr-chart { position: relative; flex: none; height: clamp(210px, 34vh, 330px); background: #fff6dc; border: 1.5px solid #7a4e24; border-radius: 10px; --ix: 104px; --it: 22px; --ib: 30px; }
.scr-yax { position: absolute; left: 0; width: calc(var(--ix) - 6px); top: var(--it); bottom: var(--ib); pointer-events: none; } .scr-yax span { position: absolute; right: 0; transform: translateY(-50%); display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.scr-yax b { font: 700 12px/1.1 var(--ui); color: var(--ink); } .scr-yax small { font: 500 11px/1.1 var(--ui); color: var(--ink2); }
.scr-plot { position: absolute; left: var(--ix); right: 12px; top: var(--it); bottom: var(--ib); touch-action: pan-y; cursor: crosshair; } .scr-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.scr-svg .gl { stroke: rgba(107, 68, 38, 0.22); stroke-width: 1; vector-effect: non-scaling-stroke; } .scr-svg .gl.base { stroke: rgba(107, 68, 38, 0.5); } .scr-svg .gl.zero { stroke: rgba(107, 68, 38, 0.6); }
.scr-svg .area { fill: rgba(107, 68, 38, 0.11); stroke: none; } .scr-svg .ln { fill: none; stroke: #6b4426; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.scr-dot { position: absolute; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: #6b4426; box-shadow: 0 0 0 2px #fff6dc; pointer-events: none; } .scr-dot.sel { width: 16px; height: 16px; margin: -8px 0 0 -8px; background: #e8b845; border: 2px solid #3b2410; }
.scr-cross { position: absolute; top: 0; bottom: 0; width: 0; border-left: 1px solid rgba(59, 36, 16, 0.55); pointer-events: none; }
.scr-tip { position: absolute; top: 4px; z-index: 2; transform: translateX(-50%); padding: 4px 8px; border-radius: 8px; background: #fffaf0; border: 1.5px solid #7a4e24; box-shadow: 0 2px 6px rgba(40, 20, 0, 0.3); pointer-events: none; white-space: nowrap; } .scr-tip.l { transform: none; } .scr-tip.r { transform: translateX(-100%); } .scr-tip.low { top: auto; bottom: 4px; }
.scr-tip b { display: block; font: 800 13px/1.2 var(--ui); } .scr-tip small { display: block; font: 600 12px/1.2 var(--ui); color: var(--ink2); }
.scr-xax { position: absolute; left: var(--ix); right: 12px; bottom: 4px; height: 18px; pointer-events: none; } .scr-xax span { position: absolute; top: 0; font: 600 12px/1.3 var(--ui); color: var(--ink2); white-space: nowrap; } .scr-xax .l { left: 0; } .scr-xax .m { left: 50%; transform: translateX(-50%); } .scr-xax .r { right: 0; }
.scr-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 16px; font: italic 500 14px/1.4 var(--serif); color: var(--ink2); } .scr-chart.none .scr-plot, .scr-chart.none .scr-yax, .scr-chart.none .scr-xax { visibility: hidden; }
.scr-sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.l-landscape .scr-graphs, .l-compact .scr-graphs { flex: 1; min-height: 0; grid-template-columns: 296px minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); grid-template-areas: 'ranges view' 'chips view'; column-gap: 12px; }
.l-landscape .scr-chart, .l-compact .scr-chart { flex: 1; height: auto; min-height: 0; } .l-landscape .scr-chips { grid-template-columns: repeat(3, minmax(0, 1fr)); } .l-landscape .scr-chips, .l-compact .scr-chips { min-height: 0; overflow-y: auto; touch-action: pan-y; padding: 3px; margin: -3px; } .l-landscape .scr-ghilo { display: none; }
.l-compact .scr-graphs { grid-template-columns: 214px minmax(0, 1fr); column-gap: 10px; row-gap: 6px; } .l-compact .scr-chips { grid-template-columns: repeat(2, minmax(0, 1fr)); } .l-compact .scr-range { font-size: 12px; padding: 0 3px; }
.l-compact .scr-gt, .l-compact .scr-ghilo, .l-compact .scr-gshort { display: none; } .l-compact .scr-chart { --ix: 96px; --it: 12px; --ib: 24px; } .l-compact .scr-yax small { display: none; }
.l-compact .scr-mast h3 { display: none; } .l-compact .scr-mast { padding-bottom: 4px; } .l-compact .scr-score { min-height: 0; padding: 4px 2px; flex-wrap: nowrap; } .l-compact .scr-score b { font-size: 22px; }
/* <<< scribe */
/* (spacer) */
/* >>> laws */
/* The Laws tab of the Budget sheet (design 2.15): a scrolling list of 24 rows in four groups; the switch is the shared .sw (56 x 44 px); landscape and compact lay the rows in two columns. */
.pane.laws { position: relative; flex-direction: column; gap: 6px; padding-top: 0; padding-bottom: 14px; } .pane.laws > * { flex: none; }
.lawsum { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 10px 2px 0; font: 800 14px/1.2 var(--serif); } .lawsum span { font: 800 13px/1.2 var(--ui); }
.lawmsg { position: sticky; top: 0; z-index: 2; padding: 7px 10px; border-radius: 9px; box-shadow: 0 2px 5px rgba(60, 30, 0, 0.25); border: 1.5px solid #8a5a14; background: #fff1c9; font: 700 12.5px/1.3 var(--ui); color: #6b3d06; }
.lawjump { display: flex; flex-wrap: wrap; gap: 6px; }
.lawchip { min-height: 44px; padding: 0 12px 0 8px; display: inline-flex; align-items: center; gap: 6px; border-radius: 9px; border: 1.5px solid #6b4426; background: linear-gradient(#fbf1d4, #e4c98b); font: 700 12.5px/1 var(--ui); } .lawchip .di svg, .lawgroup h5 .di svg { width: 20px; height: 20px; }
.lawgroup h5 { margin: 8px 0 2px; padding-bottom: 3px; border-bottom: 2px solid #6b4426; justify-content: flex-start; align-items: center; gap: 7px; font: 800 13px/1 var(--serif); letter-spacing: 0.3px; text-transform: none; color: var(--ink); }
.lawgroup h5 em { margin-left: auto; font: 700 11.5px/1 var(--ui); font-style: normal; color: var(--ink2); }
.law { display: grid; grid-template-columns: 1fr 56px; align-items: center; gap: 8px; min-height: 66px; padding: 6px 0; border-bottom: 1px dashed #b4915b; } .law.on { background: linear-gradient(90deg, rgba(123, 200, 108, 0.22), transparent 70%); }
.lawtx b { font: 700 13.5px/1.15 var(--ui); } .lawtx p { font: 500 12px/1.3 var(--ui); margin-top: 1px; }
.lawmeta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; margin-top: 2px; } .lawcost { font: 800 12.5px/1.2 var(--ui); } .lawmeta small { font: 500 10.5px/1.2 var(--ui); color: var(--ink2); }
.lawnote { margin-top: 2px; font: 700 12px/1.25 var(--ui); color: #8a4b08; }
.law.short .sw, .law.locked .sw { opacity: 0.5; }
.l-landscape .lawrows, .l-compact .lawrows { display: grid; grid-template-columns: 1fr 1fr; column-gap: 18px; }
/* <<< laws */
/* >>> specials */
/* WP-8U: the land's own pieces. The BUILD category named after the land, its cards (the painted picture, a green check when the piece is on the land), the armed bar and the Put away button of the query card. Only new rules here. */
#tray-build { overflow-x: auto; scrollbar-width: none; touch-action: pan-x; } #tray-build::-webkit-scrollbar { display: none; }
.item.sp .ph { display: flex; align-items: center; justify-content: center; height: 38px; } .item.sp .ph canvas.thumb { display: block; width: 38px; height: 38px; }
.item.sp b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
.item.sp .ck { position: absolute; top: 3px; right: 3px; width: 19px; height: 19px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: linear-gradient(#8fdc7a, #3f9f3a); border: 1.5px solid #1f6a2a; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35); } .item.sp .ck svg { width: 11px; height: 11px; }
.item.sp.placed { border-color: #3f9f3a; } .item.sp.placed small { color: #2e7d32; }
.l-compact .item.sp .ph { height: 26px; } .l-compact .item.sp .ph canvas.thumb { width: 26px !important; height: 26px !important; } .l-compact .item.sp .ck { width: 15px; height: 15px; } .l-compact .item.sp .ck svg { width: 9px; height: 9px; }
#armed .ph canvas.thumb { display: block; width: 38px !important; height: 38px !important; }
.qcard .bt.away { align-self: flex-start; margin-top: 4px; }
/* <<< specials */
