/* CIVILPAD: a night town under flat charcoal cards. Warm dark, cream type, the windows' amber as the one accent. */
@font-face { font-family: Geist; src: url(/assets/fonts/geist.woff2) format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Geist Mono'; src: url(/assets/fonts/geist-mono-400.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Geist Mono'; src: url(/assets/fonts/geist-mono-500.woff2) format('woff2'); font-weight: 500 700; font-display: swap; }

:root {
  --bg: #1b1a1f; --card: rgba(30, 29, 34, .9); --card2: #26252b; --line: rgba(237, 230, 214, .09); --line2: rgba(237, 230, 214, .17);
  --ink: #ede6d6; --mute: rgba(237, 230, 214, .62); --faint: rgba(237, 230, 214, .38);
  --amber: #ffc24a; --amber2: #ffd27a; --ok: #8be0a4; --bad: #ff7a5c;
  --r: 14px; --r2: 9px; --sans: Geist, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif; --mono: 'Geist Mono', ui-monospace, Menlo, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); font: 14px/1.45 var(--sans); -webkit-font-smoothing: antialiased; overflow: hidden; }
button, input, select { font: inherit; color: inherit; }
a { color: var(--amber2); text-decoration: none; }
[hidden] { display: none !important; }
.mono { font-family: var(--mono); }
.small { font-size: 12px; color: var(--mute); }
::selection { background: var(--amber); color: #1b1a1f; }
* { scrollbar-width: thin; scrollbar-color: rgba(237, 230, 214, .16) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; } ::-webkit-scrollbar-thumb { background: rgba(237, 230, 214, .14); border-radius: 8px; } ::-webkit-scrollbar-track { background: transparent; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }

#world { position: fixed; inset: 0; width: 100%; height: 100%; display: block; outline: none; touch-action: none; cursor: grab; }
#world.dragging { cursor: grabbing; }
#tags { position: fixed; inset: 0; pointer-events: none; z-index: 2; overflow: hidden; }

/* loader */
.loader { position: fixed; inset: 0; z-index: 80; display: grid; place-content: center; justify-items: center; gap: 12px; background: var(--bg); transition: opacity .7s, visibility .7s; }
.loader.done { opacity: 0; visibility: hidden; pointer-events: none; }
.loader img { animation: bob 2.4s ease-in-out infinite; } @keyframes bob { 50% { transform: translateY(-6px); } }
.loader b { font: 600 12px var(--mono); letter-spacing: .22em; text-transform: uppercase; }
.lbar { width: 180px; height: 3px; border-radius: 3px; background: rgba(237, 230, 214, .1); overflow: hidden; } .lbar i { display: block; height: 100%; width: 30%; background: var(--amber); border-radius: 3px; transition: width .2s; }
.loader small { font: 11px var(--mono); color: var(--faint); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line2); background: rgba(30, 29, 34, .7); cursor: pointer; font-weight: 600; font-size: 13px; white-space: nowrap; color: var(--ink); transition: background .15s, border-color .15s, transform .1s; backdrop-filter: blur(8px); }
.btn:hover { background: rgba(237, 230, 214, .08); border-color: rgba(237, 230, 214, .28); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--amber); border-color: var(--amber); color: #1b1a1f; }
.btn.primary:hover { background: var(--amber2); border-color: var(--amber2); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn.block { width: 100%; } .btn.lg { height: 48px; font-size: 15px; } .btn.sm { height: 32px; font-size: 12px; padding: 0 12px; }

/* top bar */
.topbar { position: fixed; top: 0; left: 0; right: 0; height: 72px; display: flex; align-items: center; gap: 16px; padding: 0 22px; z-index: 20; pointer-events: none; }
.topbar > * { pointer-events: auto; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.brand img { filter: drop-shadow(0 0 14px rgba(255, 170, 40, .3)); }
.word { font-weight: 700; letter-spacing: .16em; font-size: 16px; }
.end { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.links { display: flex; align-items: center; gap: 6px; }
.ic { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 999px; border: 1px solid var(--line2); background: rgba(30, 29, 34, .7); color: var(--ink); cursor: pointer; padding: 0; backdrop-filter: blur(8px); }
.ic:hover { border-color: rgba(237, 230, 214, .3); }
.ic svg { width: 15px; height: 15px; } .ic img { width: 20px; height: 20px; border-radius: 50%; }
.ic.off { opacity: .5; cursor: default; }
.ic.ca { width: auto; padding: 0 14px; font: 500 12px var(--mono); color: var(--amber2); }
.wallet.on { color: var(--amber2); border-color: rgba(255, 194, 74, .45); }

/* hero */
.hero { position: fixed; z-index: 12; left: 22px; top: 92px; width: 380px; padding: 22px 22px 20px; border-radius: var(--r); background: var(--card); border: 1px solid var(--line); backdrop-filter: blur(14px); box-shadow: 0 24px 60px rgba(0, 0, 0, .35); transition: opacity .4s, transform .4s; }
.hero.away { opacity: 0; transform: translateY(-8px); pointer-events: none; }
.kick { margin: 0 0 8px; font: 500 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--amber); }
.hero h1 { margin: 0 0 10px; font-size: 30px; line-height: 1.06; letter-spacing: -.025em; font-weight: 680; }
.hero p { margin: 0 0 16px; color: var(--mute); font-size: 14px; }
.hero-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.hero-x { top: 12px; right: 12px; }

/* corner cards */
.card { position: fixed; z-index: 14; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); backdrop-filter: blur(14px); box-shadow: 0 24px 60px rgba(0, 0, 0, .35); }
.cz-h { display: flex; align-items: center; gap: 10px; padding: 12px 12px 10px 14px; }
.cz-img { width: 36px; height: 36px; border-radius: 9px; background: var(--card2); overflow: hidden; flex: none; display: grid; place-items: center; } .cz-img img { width: 100%; height: 100%; object-fit: cover; }
.cz-who { display: grid; min-width: 0; flex: 1; } .cz-who b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .cz-who small { color: var(--faint); font-size: 11.5px; }
.min { width: 28px; height: 28px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--mute); cursor: pointer; flex: none; }
.min:hover { color: var(--ink); }
.card.folded .cz-body, .card.folded .log { display: none; }
.census { left: 22px; bottom: 22px; width: 290px; }
.cz-body { padding: 0 14px 14px; }
.clock { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--mute); margin-bottom: 8px; } .clock span:first-child { color: var(--ink); font-weight: 600; }
.live { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); margin-left: auto; } .live.on { background: var(--amber); box-shadow: 0 0 10px var(--amber); animation: blink 1.4s infinite; }
@keyframes blink { 50% { opacity: .35; } }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin: 0; background: var(--line); border: 1px solid var(--line); border-radius: var(--r2); overflow: hidden; }
.stats div { background: #1d1c21; padding: 8px 10px; }
.stats dt { font-size: 10px; color: var(--faint); text-transform: uppercase; letter-spacing: .08em; font-family: var(--mono); }
.stats dd { margin: 2px 0 0; font: 500 14px var(--mono); white-space: nowrap; }
#cz-chart { display: block; width: 100%; height: 54px; margin-top: 10px; border-radius: var(--r2); background: rgba(0, 0, 0, .18); }
.cz-sectors { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.cz-sectors span { font-size: 11px; padding: 3px 8px 3px 7px; border-radius: 999px; border: 1px solid var(--line2); color: var(--ink); display: inline-flex; align-items: center; gap: 6px; }
.cz-sectors span::before { content: ''; width: 7px; height: 7px; border-radius: 2px; background: var(--c); }
.cz-sectors .eth { color: var(--amber2); border-color: rgba(255, 194, 74, .35); } .cz-sectors .eth::before { display: none; }
.cz-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; } .cz-acts:empty { display: none; }

.chronicle { right: 22px; bottom: 22px; width: 330px; max-height: min(420px, calc(100vh - 200px)); display: flex; flex-direction: column; border-color: rgba(255, 194, 74, .28); }
.guide { width: 36px; height: 36px; border-radius: 50%; background: radial-gradient(circle at 50% 38%, #ffd27a 0 22%, transparent 23%), linear-gradient(#ff8a4c, #c95a2a); flex: none; position: relative; }
.guide i { position: absolute; left: 50%; bottom: 4px; width: 18px; height: 9px; margin-left: -9px; border-radius: 9px 9px 0 0; background: #ffd27a; }
.log { list-style: none; margin: 0; padding: 0 12px 12px; display: grid; gap: 0; font-size: 12.5px; overflow: auto; align-content: start; }
.log li { display: grid; grid-template-columns: 8px 1fr auto; gap: 9px; align-items: baseline; padding: 7px 2px; border-top: 1px solid var(--line); cursor: pointer; animation: in .45s ease-out; }
.log li:hover span { color: var(--ink); }
@keyframes in { from { opacity: 0; transform: translateY(-5px); background: rgba(255, 194, 74, .1); } }
.log i { width: 7px; height: 7px; border-radius: 2px; background: var(--faint); transform: translateY(-1px); }
.log span { color: var(--mute); } .log em { display: block; font: normal 500 10px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--faint); margin-bottom: 1px; }
.log [data-k=found] i, .log [data-k=service] i { background: var(--amber); box-shadow: 0 0 8px var(--amber); }
.log [data-k=trade] i { background: var(--amber2); } .log [data-k=buy] i { background: rgba(237, 230, 214, .5); } .log [data-k=hire] i, .log [data-k=arrive] i { background: var(--ok); } .log [data-k=close] i { background: var(--bad); } .log [data-k=merge] i { background: #b69cff; } .log [data-k=civic] i { background: var(--ink); }
.log [data-k=found] em, .log [data-k=service] em { color: var(--amber); }
.log time { font: 10.5px var(--mono); color: var(--faint); white-space: nowrap; }
.log.mini { padding: 0; margin: 0 0 4px; } .log.mini li { padding: 5px 0; }

/* detail */
.detail { left: 50%; top: 86px; transform: translateX(-50%); width: min(400px, calc(100vw - 32px)); max-height: calc(100vh - 200px); overflow: auto; padding: 18px 18px 14px; animation: rise .3s cubic-bezier(.2, .8, .2, 1); }
@keyframes rise { from { transform: translate(-50%, 10px); opacity: 0; } }
.detail h3 { margin: 0 0 6px; font-size: 20px; letter-spacing: -.01em; padding-right: 30px; }
.detail .sub { margin: 0 0 12px; color: var(--mute); font-size: 13px; }
.detail h4 { margin: 12px 0 6px; font: 500 10.5px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.people { margin: 0; font-size: 13px; color: var(--mute); }
.lnk { border: 0; background: none; padding: 0; color: var(--amber2); cursor: pointer; font: inherit; } .lnk:hover { text-decoration: underline; }
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; margin: 0 0 4px; }
.kv dt { font-size: 10px; color: var(--faint); font-family: var(--mono); text-transform: uppercase; letter-spacing: .06em; } .kv dd { margin: 0; font: 500 13.5px var(--mono); text-transform: capitalize; }
.x { position: absolute; top: 12px; right: 12px; width: 30px; height: 30px; border-radius: 999px; border: 1px solid var(--line); background: rgba(0, 0, 0, .2); cursor: pointer; font-size: 16px; line-height: 1; color: var(--mute); z-index: 2; }
.x:hover { color: var(--ink); border-color: var(--line2); }

/* labels in the city */
.tag { position: absolute; left: 0; top: 0; pointer-events: auto; display: grid; justify-items: center; gap: 0; padding: 5px 11px 6px; border-radius: 9px; background: rgba(27, 26, 31, .86); border: 1px solid var(--line2); cursor: pointer; backdrop-filter: blur(6px); white-space: nowrap; color: var(--ink); }
.tag::after { content: ''; position: absolute; bottom: -5px; left: 50%; width: 8px; height: 8px; margin-left: -4px; background: inherit; border-right: 1px solid var(--line2); border-bottom: 1px solid var(--line2); transform: rotate(45deg); }
.tag b { font-size: 12px; font-weight: 650; } .tag span { font-size: 10.5px; color: var(--mute); }
.tag.hall { padding: 7px 16px 8px; border-color: rgba(255, 194, 74, .5); } .tag.hall b { font-size: 15px; letter-spacing: .14em; text-transform: uppercase; color: var(--amber2); }
.tag.new { border-color: rgba(255, 194, 74, .6); animation: pop .5s cubic-bezier(.2, 1.4, .4, 1); } .tag.new span { color: var(--amber); }
@keyframes pop { from { opacity: 0; scale: .7; } }
.tag.hov { pointer-events: none; }

/* pill nav + dock */
.pill { position: fixed; z-index: 16; left: 50%; bottom: 22px; transform: translateX(-50%); display: flex; gap: 2px; padding: 5px; border-radius: 999px; background: var(--card); border: 1px solid var(--line2); backdrop-filter: blur(14px); box-shadow: 0 16px 40px rgba(0, 0, 0, .35); }
.pill a { padding: 9px 18px; border-radius: 999px; color: var(--mute); font-weight: 600; font-size: 13.5px; white-space: nowrap; }
.pill a:hover { color: var(--ink); } .pill a.on { background: rgba(237, 230, 214, .1); color: var(--ink); }
.pill b { font: 500 11px var(--mono); color: var(--amber2); margin-left: 3px; }
.dock { position: fixed; z-index: 16; right: 22px; top: 86px; display: grid; gap: 2px; padding: 4px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); backdrop-filter: blur(12px); }
.dock button { width: 34px; height: 34px; border-radius: 999px; border: 0; background: transparent; cursor: pointer; color: var(--mute); font-size: 15px; }
.dock button:hover { background: rgba(237, 230, 214, .08); color: var(--ink); }

/* side sheet */
.sheet { position: fixed; z-index: 30; top: 82px; right: 22px; bottom: 22px; width: 440px; overflow: auto; padding: 24px 24px 22px; border-radius: 16px; background: rgba(27, 26, 31, .96); border: 1px solid var(--line2); box-shadow: 0 30px 80px rgba(0, 0, 0, .5); animation: slide .35s cubic-bezier(.2, .8, .2, 1); }
.sheet.wide { width: 480px; }
@keyframes slide { from { transform: translateX(16px); opacity: 0; } }
.sheet h2 { margin: 0 0 8px; font-size: 24px; letter-spacing: -.02em; font-weight: 680; padding-right: 30px; }
.lead { color: var(--mute); margin: 0 0 18px; font-size: 14px; }
.how { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 14px; }
.how li { display: grid; grid-template-columns: 38px 1fr; gap: 12px; }
.how .n, .ls .n { font: 500 12px var(--mono); color: var(--amber); border: 1px solid rgba(255, 194, 74, .35); border-radius: 8px; height: 30px; display: grid; place-items: center; }
.how h3 { margin: 4px 0 4px; font-size: 15px; } .how p { margin: 0; color: var(--mute); font-size: 13.5px; }
.search { width: 100%; height: 40px; border-radius: 999px; border: 1px solid var(--line2); background: rgba(0, 0, 0, .2); padding: 0 16px; margin-bottom: 12px; }
.coins { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.coins a { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; padding: 8px 10px; border-radius: var(--r2); border: 1px solid var(--line); color: var(--ink); }
.coins a:hover { border-color: rgba(255, 194, 74, .45); background: rgba(255, 194, 74, .04); }
.ci { width: 44px; height: 44px; border-radius: 9px; background: var(--card2); overflow: hidden; } .ci img { width: 100%; height: 100%; object-fit: cover; }
.cn { display: grid; min-width: 0; } .cn small { color: var(--mute); font-size: 11.5px; } .cn b small { color: var(--amber2); font-size: 11px; }
.cs { font: 600 17px var(--mono); color: var(--amber2); display: grid; justify-items: center; } .cs small { font: 10px var(--sans); color: var(--mute); }
.empty { color: var(--mute); padding: 16px; text-align: center; border: 1px dashed var(--line2); border-radius: var(--r2); }

/* launch */
.ls { padding: 14px 0; border-top: 1px solid var(--line); }
.ls header { display: grid; grid-template-columns: 36px 1fr; gap: 10px; align-items: center; margin-bottom: 12px; }
.ls h3 { margin: 0; font-size: 15px; } .ls header p { margin: 0; color: var(--faint); font-size: 12px; }
.hint { margin: 10px 0 6px; font-size: 12.5px; } .hint em { font-style: normal; color: var(--faint); margin-left: 4px; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; } .f.full { grid-column: 1 / -1; }
.f { display: grid; gap: 6px; font-size: 12.5px; } .f em { font-style: normal; color: var(--faint); font-size: 11px; margin-left: 6px; }
.f input { height: 40px; border-radius: var(--r2); border: 1px solid var(--line2); background: rgba(0, 0, 0, .2); padding: 0 12px; min-width: 0; }
.f input:focus { border-color: rgba(255, 194, 74, .6); outline: none; }
.tick { display: flex; align-items: center; border: 1px solid var(--line2); border-radius: var(--r2); background: rgba(0, 0, 0, .2); padding-left: 12px; } .tick i { font-style: normal; color: var(--amber); } .tick input { border: 0; background: transparent; flex: 1; }
.drop { display: flex; gap: 12px; align-items: center; margin-top: 10px; padding: 10px; border: 1px dashed var(--line2); border-radius: var(--r2); cursor: pointer; }
.drop:hover, .drop.over { border-color: var(--amber); } .drop small { display: block; color: var(--faint); font-size: 11.5px; }
.thumb { width: 52px; height: 52px; border-radius: 9px; background: var(--card2); display: grid; place-items: center; color: var(--amber); font-size: 22px; overflow: hidden; flex: none; } .thumb img { width: 100%; height: 100%; object-fit: cover; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.chip { height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line2); background: transparent; cursor: pointer; font-size: 12.5px; display: inline-flex; align-items: center; gap: 7px; }
.chip.on { border-color: var(--amber); color: var(--amber2); background: rgba(255, 194, 74, .08); }
.chip.sec::before { content: ''; width: 8px; height: 8px; border-radius: 2px; background: var(--c); opacity: .5; } .chip.sec.on::before { opacity: 1; }
.chip.sec.on { border-color: var(--c); color: var(--ink); background: color-mix(in srgb, var(--c) 12%, transparent); }
.chips.sm .chip { height: 26px; font-size: 11.5px; padding: 0 10px; cursor: default; } .chips.sm .chip:not(.on) { opacity: .45; }
.ethos { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.eth { text-align: left; padding: 9px 10px; border-radius: var(--r2); border: 1px solid var(--line2); background: transparent; cursor: pointer; display: grid; gap: 2px; }
.eth b { font-size: 13px; } .eth small { font-size: 11px; color: var(--faint); line-height: 1.3; }
.eth.on { border-color: var(--amber); background: rgba(255, 194, 74, .07); } .eth.on b { color: var(--amber2); }
.sl { display: block; margin: 12px 0 6px; } .sl-h { display: flex; justify-content: space-between; font-size: 12.5px; } .sl-h output { font: 500 12px var(--mono); color: var(--amber2); }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; background: transparent; cursor: pointer; margin: 0; }
input[type=range]::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: rgba(237, 230, 214, .14); }
input[type=range]::-moz-range-track { height: 4px; border-radius: 4px; background: rgba(237, 230, 214, .14); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; margin-top: -6px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 10px rgba(255, 194, 74, .5); }
input[type=range]::-moz-range-thumb { width: 14px; height: 14px; border: 0; border-radius: 50%; background: var(--amber); }
.charter { margin: 8px 0 0; padding: 10px 12px; border-radius: var(--r2); background: rgba(255, 194, 74, .06); border: 1px solid rgba(255, 194, 74, .22); font-size: 13px; }
.pcard { margin-top: 6px; padding: 14px; border-radius: var(--r); background: var(--card2); border: 1px solid var(--line); display: grid; gap: 10px; }
.prow { display: flex; gap: 12px; align-items: center; }
.pimg { width: 48px; height: 48px; border-radius: 10px; background: #151418; display: grid; place-items: center; color: var(--faint); font-size: 10px; overflow: hidden; border: 1px solid var(--line); flex: none; } .pimg img { width: 100%; height: 100%; object-fit: cover; }
.pwho { display: grid; } .pwho b { font-size: 15px; } .pwho span { font-family: var(--mono); color: var(--amber2); font-size: 12px; }
.fine { margin: 0; font-size: 11.5px; color: var(--faint); }
.status { padding: 10px 12px; border-radius: var(--r2); border: 1px solid var(--line2); font-size: 12.5px; color: var(--mute); }
.status.err { border-color: rgba(255, 122, 92, .5); color: #ffb8a6; } .status.ok { border-color: rgba(139, 224, 164, .5); color: #c7f0d2; } .status.hide { display: none; }
.status .btn { height: 28px; margin-left: 6px; }

/* admin, toasts, no-gl */
.modal { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; background: rgba(0, 0, 0, .6); }
.mcard { position: relative; width: min(400px, calc(100vw - 32px)); padding: 22px; border-radius: 14px; background: #1e1d22; border: 1px solid var(--line2); display: grid; gap: 10px; }
.mcard h2 { margin: 0 0 4px; font-size: 18px; } .mcard label { display: grid; gap: 4px; font-size: 12.5px; color: var(--mute); }
.mcard input { height: 38px; border-radius: var(--r2); border: 1px solid var(--line2); background: rgba(0, 0, 0, .25); padding: 0 10px; color: var(--ink); }
.mcard .actions { display: flex; gap: 8px; justify-content: flex-end; }
.toasts { position: fixed; z-index: 95; left: 50%; top: 82px; transform: translateX(-50%); display: grid; gap: 6px; }
.toast { padding: 10px 14px; border-radius: 10px; background: #26252b; border: 1px solid var(--line2); font-size: 13px; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); animation: fadein .3s; transition: opacity .4s; }
@keyframes fadein { from { opacity: 0; } }
.toast.err { border-color: rgba(255, 122, 92, .5); } .toast.out { opacity: 0; }
.nogl { position: fixed; inset: 0; display: grid; place-content: center; justify-items: center; text-align: center; padding: 24px; gap: 4px; }

/* narrower screens */
@media (max-width: 999px) {
  .dock { display: none; }
  .hero { width: auto; right: 16px; left: 16px; top: 76px; padding: 16px; } .hero h1 { font-size: 24px; } .hero p { font-size: 13px; margin-bottom: 12px; }
  .census { left: 12px; bottom: 76px; width: calc(50% - 18px); min-width: 0; } .chronicle { right: 12px; bottom: 76px; width: calc(50% - 18px); max-height: 40vh; }
  .census .stats { grid-template-columns: 1fr; } #cz-chart, .cz-sectors { display: none; }
  .sheet, .sheet.wide { left: 12px; right: 12px; width: auto; top: 72px; bottom: 76px; }
  .pill { bottom: 14px; } .pill a { padding: 8px 12px; font-size: 12.5px; }
}
@media (max-width: 640px) {
  .topbar { padding: 0 12px; height: 62px; } .word, .found-cta, .wallet, .ic.ca, .ic.snd { display: none; }
  .hero h1 br { display: none; }
  .census, .chronicle { width: calc(100% - 24px); left: 12px; right: 12px; }
  .census { bottom: auto; top: 66px; } .census .cz-body { display: none; } 
  .chronicle { max-height: 30vh; } .chronicle .log li:nth-child(n+4) { display: none; }
  .hero:not(.away) ~ .census { display: none; }
  .pill a { padding: 8px 10px; }
  .fields, .ethos { grid-template-columns: 1fr; }
  .tag { padding: 3px 8px 4px; } .tag b { font-size: 11px; } .tag span { display: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
body.sheet-open .chronicle, body.sheet-open .dock { display: none; }
.topbar::before { content: ''; position: absolute; inset: 0 0 -30px; background: linear-gradient(rgba(27, 26, 31, .85), rgba(27, 26, 31, 0)); pointer-events: none; z-index: -1; }
