/* AFTERLIFE: sky blue, warm cream, a little gold. Pixel headings like the banner, mono body. */
@font-face { font-family: "Pixelify"; src: url(/assets/fonts/pixelify-700.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "GMono"; src: url(/assets/fonts/geist-mono-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "GMono"; src: url(/assets/fonts/geist-mono-500.woff2) format("woff2"); font-weight: 500 700; font-display: swap; }

:root {
  --sky: #86b9e6; --sky-d: #4d8fd8; --sky-l: #d4e7f6; --cream: #fff8ea; --cream-2: #f6ead2; --gold: #f3c76c; --gold-d: #d89a35;
  --ink: #23324a; --ink-2: #4f6380; --ink-3: #8193ad; --line: rgba(35, 50, 74, .12); --glass: rgba(255, 250, 240, .82);
  --ok: #4f9a5b; --err: #c4574a; --mint: #9fd88a; --rose: #f4a9bd;
  --px: "Pixelify", "GMono", ui-monospace, monospace; --mono: "GMono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --r: 18px; --shadow: 0 18px 50px -18px rgba(30, 60, 110, .45), 0 2px 0 rgba(255,255,255,.6) inset;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--sky); color: var(--ink); font: 14px/1.55 var(--mono); -webkit-font-smoothing: antialiased; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }
::selection { background: var(--gold); color: var(--ink); }
* { scrollbar-width: thin; scrollbar-color: rgba(35,50,74,.25) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; } ::-webkit-scrollbar-thumb { background: rgba(35,50,74,.22); border-radius: 8px; } ::-webkit-scrollbar-track { background: transparent; }

#sky { position: fixed; inset: 0; width: 100%; height: 100%; display: block; outline: none; touch-action: none; cursor: grab; }
#sky.dragging { cursor: grabbing; }
#veil { position: fixed; inset: 0; background: radial-gradient(120% 90% at 50% 50%, #ffffff, #eef5fb); opacity: 0; pointer-events: none; z-index: 30; }

/* ---------- shared bits ---------- */
.topbar { position: fixed; left: 0; right: 0; top: 0; z-index: 20; display: flex; align-items: center; gap: 16px; padding: 12px 18px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.bar .brand { padding: 4px 14px 4px 4px; border-radius: 14px; background: rgba(77,143,216,.55); backdrop-filter: blur(12px); box-shadow: 0 8px 22px -12px rgba(30,60,110,.7); }
.brand img { width: 36px; height: 36px; border-radius: 10px; box-shadow: 0 0 0 2px rgba(255,255,255,.85), 0 6px 18px -6px rgba(30,60,110,.6); image-rendering: auto; }
.brand .word { font: 700 20px/1 var(--px); letter-spacing: .06em; color: var(--cream); text-shadow: 0 0 14px rgba(255,236,190,.8), 0 2px 0 rgba(40,80,140,.35); }
.links { display: flex; align-items: center; gap: 8px; }
.ic { display: inline-grid; place-items: center; min-width: 38px; height: 38px; padding: 0 10px; border-radius: 12px; border: 0; background: rgba(255,250,240,.78); color: var(--ink); text-decoration: none; box-shadow: 0 6px 18px -10px rgba(30,60,110,.6); backdrop-filter: blur(10px); transition: transform .18s, background .18s; }
.ic:hover { transform: translateY(-2px); background: #fff; }
.ic svg { width: 18px; height: 18px; } .ic img { display: block; }
.ic.off { opacity: .45; }
.ic.ca { font: 500 12px var(--mono); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 12px; border: 0; text-decoration: none; font: 600 13px var(--mono); letter-spacing: .01em; transition: transform .18s, box-shadow .18s, background .18s; white-space: nowrap; }
.btn svg { width: 16px; height: 16px; } .btn img { width: 18px; height: 18px; }
.btn.primary { background: linear-gradient(#ffe39e, var(--gold)); color: #3b2a0c; box-shadow: 0 2px 0 #c58a2a, 0 10px 24px -10px rgba(216,154,53,.9), 0 1px 0 #fff6d8 inset; }
.btn.primary:hover { transform: translateY(-2px); box-shadow: 0 4px 0 #c58a2a, 0 14px 30px -10px rgba(216,154,53,.9), 0 1px 0 #fff6d8 inset; }
.btn.primary:active { transform: translateY(1px); box-shadow: 0 1px 0 #c58a2a; }
.btn.primary:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn.ghost { background: rgba(255,255,255,.7); color: var(--ink); box-shadow: 0 0 0 1px var(--line) inset; }
.btn.ghost:hover { background: #fff; transform: translateY(-1px); }
.btn.block { display: flex; width: 100%; margin-top: 10px; } .btn.lg { height: 50px; font-size: 14px; }
.x { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border-radius: 10px; border: 0; background: rgba(35,50,74,.06); font-size: 20px; line-height: 1; color: var(--ink-2); }
.x:hover { background: rgba(35,50,74,.12); }
.kick { margin: 0 0 4px; font: 500 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--gold-d); }
h2 { margin: 0 0 8px; font: 700 26px/1.1 var(--px); letter-spacing: .02em; color: var(--ink); }
h3 { margin: 18px 0 8px; font: 700 15px/1.2 var(--px); letter-spacing: .03em; }
.lead { margin: 0 0 12px; color: var(--ink-2); }
.small { font-size: 12px; color: var(--ink-3); }
.mono { font-family: var(--mono); }
.status { margin-top: 12px; padding: 10px 12px; border-radius: 12px; font-size: 12.5px; background: rgba(35,50,74,.06); }
.status.err { background: #fde9e4; color: #8d3426; } .status.ok { background: #e6f5df; color: #2f6b38; } .status.hide { display: none; }
.status a { font-weight: 600; }

/* ---------- entrance ---------- */
.gate { position: fixed; inset: 0; z-index: 10; pointer-events: none; transition: opacity .9s ease; }
.gate > * { pointer-events: auto; }
.gate.leaving { opacity: 0; } .gate.leaving * { pointer-events: none; }
.gate-top { justify-content: space-between; }
.gate-copy { position: absolute; left: clamp(20px, 8vw, 140px); top: 50%; transform: translateY(-46%); max-width: 640px; color: var(--cream); animation: rise 1.4s cubic-bezier(.2,.8,.2,1) both .2s; }
.gate .title { margin: 0; font: 700 clamp(48px, 7.4vw, 104px)/.95 var(--px); letter-spacing: .06em; color: #fffaf0; text-shadow: 0 0 22px rgba(255,234,190,.95), 0 0 60px rgba(255,226,170,.55), 0 3px 0 rgba(60,110,180,.25); }
.gate .sub { margin: 16px 0 22px; font: 500 clamp(18px, 2vw, 26px)/1.2 var(--mono); letter-spacing: .08em; text-shadow: 0 0 14px rgba(255,236,190,.8); }
.gate .body { margin: 0 0 30px; font: 400 clamp(12px, 1.05vw, 14.5px)/1.9 var(--mono); letter-spacing: .04em; color: rgba(255,250,240,.95); text-shadow: 0 1px 8px rgba(40,90,160,.35); }
@keyframes rise { from { opacity: 0; transform: translateY(-38%); filter: blur(6px); } to { opacity: 1; transform: translateY(-46%); filter: none; } }
.enter { position: relative; display: inline-flex; align-items: center; gap: 16px; padding: 10px 26px 10px 10px; border-radius: 999px; border: 0; background: rgba(70,128,200,.42); color: #fffaf0; text-shadow: 0 1px 6px rgba(30,70,130,.5); backdrop-filter: blur(10px); box-shadow: 0 0 0 1.5px rgba(255,250,240,.75) inset, 0 12px 40px -12px rgba(40,90,160,.6); touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; transition: transform .25s, background .25s; }
.enter:hover { background: rgba(70,128,200,.55); }
.enter.holding { transform: scale(calc(1 + var(--p, 0) * .06)); background: rgba(255,250,240,calc(.3 + var(--p, 0) * .4)); color: #6b4a14; }
.enter svg { width: 64px; height: 64px; transform: rotate(-90deg); flex: none; }
.enter .ring-bg { fill: rgba(255,250,240,.15); stroke: rgba(255,250,240,.45); stroke-width: 3; }
.enter .ring { fill: none; stroke: #ffe2a0; stroke-width: 5; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; filter: drop-shadow(0 0 6px rgba(255,214,140,.95)); }
.enter .dot { position: absolute; left: 10px; top: 10px; width: 64px; height: 64px; display: grid; place-items: center; pointer-events: none; }
.enter .dot::before { content: ""; width: 16px; height: 16px; background: #fffaf0; clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); filter: drop-shadow(0 0 6px #ffe2a0); transform: scale(calc(1 + var(--p, 0) * 1.1)) rotate(calc(var(--p, 0) * 90deg)); transition: transform .1s; animation: twinkle 2.4s ease-in-out infinite; }
@keyframes twinkle { 50% { opacity: .65; } }
.enter .lbl { display: grid; text-align: left; }
.enter b { font: 700 19px/1.1 var(--px); letter-spacing: .06em; }
.enter small { font: 400 11.5px var(--mono); letter-spacing: .1em; text-transform: uppercase; opacity: .85; }
.gate-load { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); margin: 0; font: 400 12px var(--mono); letter-spacing: .12em; color: rgba(255,250,240,.9); transition: opacity .6s; }
.gate-load.done { opacity: 0; }

/* ---------- live interface ---------- */
.bar { justify-content: space-between; opacity: 0; transform: translateY(-12px); transition: opacity .8s .2s, transform .8s .2s; }
body.live .bar, body.live .panel, body.live .dock, body.live .fab { opacity: 1; transform: none; }
.bar .nav { display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: var(--glass); backdrop-filter: blur(14px); box-shadow: var(--shadow); }
.bar .nav a { padding: 8px 14px; border-radius: 10px; text-decoration: none; font-weight: 500; color: var(--ink-2); transition: background .2s, color .2s; }
.bar .nav a:hover { color: var(--ink); background: rgba(35,50,74,.06); }
.bar .nav a.on { background: #fff; color: var(--ink); box-shadow: 0 2px 8px -4px rgba(30,60,110,.5); }
.bar .nav b { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 4px; border-radius: 8px; background: var(--gold); color: #3b2a0c; font-size: 11px; text-align: center; }
.bar .end { display: flex; align-items: center; gap: 8px; }
.wallet.on { background: #fff; box-shadow: 0 0 0 1.5px var(--mint) inset; }

.panel { position: fixed; z-index: 15; background: var(--glass); backdrop-filter: blur(18px) saturate(1.2); border-radius: var(--r); box-shadow: var(--shadow); opacity: 0; transition: opacity .7s .3s, transform .7s .3s; }
.feed { left: 16px; top: 76px; bottom: 84px; width: 330px; display: flex; flex-direction: column; padding: 16px; transform: translateX(-16px); }
.ph { display: flex; justify-content: space-between; align-items: center; }
.ph h2 { font-size: 17px; margin: 0; display: flex; align-items: center; gap: 8px; }
.ph .x { position: static; }
.live { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(79,154,91,.6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(79,154,91,0); } 100% { box-shadow: 0 0 0 0 rgba(79,154,91,0); } }
.now { margin: 12px 0; padding: 10px 12px; border-radius: 12px; background: #fff; display: grid; gap: 4px; box-shadow: 0 0 0 1px var(--line) inset; }
.now .st { font: 700 12px var(--px); letter-spacing: .12em; color: var(--sky-d); }
.now .st[data-k="back"] { color: var(--ok); } .now .st[data-k="rest"] { color: var(--ink-3); } .now .st[data-k="rebuild"] { color: #d0773b; } .now .st[data-k="revive"] { color: var(--gold-d); }
.now .nm { font-weight: 500; }
.now .pb { height: 5px; border-radius: 4px; background: rgba(35,50,74,.08); overflow: hidden; } .now .pb i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--sky), var(--gold)); transition: width .5s; }
.counts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 0 0 10px; }
.counts div { padding: 8px 6px; border-radius: 10px; background: rgba(255,255,255,.65); text-align: center; }
.counts dt { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.counts dd { margin: 0; font: 700 20px var(--px); }
.log { list-style: none; margin: 0; padding: 0 4px 0 0; overflow: auto; flex: 1; display: grid; gap: 6px; align-content: start; }
.log li { display: grid; grid-template-columns: 10px 1fr auto; gap: 8px; padding: 8px 10px; border-radius: 10px; background: rgba(255,255,255,.55); font-size: 12px; line-height: 1.45; animation: slide .5s ease; }
@keyframes slide { from { opacity: 0; transform: translateY(-6px); } }
.log li i { width: 8px; height: 8px; margin-top: 5px; border-radius: 2px; background: var(--sky); }
.log li[data-k="keep"] i { background: var(--gold); } .log li[data-k="back"] i { background: var(--ok); } .log li[data-k="rest"] i { background: var(--ink-3); } .log li[data-k="launch"] i { background: var(--rose); } .log li[data-k="carry"] i { background: #c9b4e6; }
.log time { color: var(--ink-3); font-size: 11px; }
.note { margin: 10px 0 0; font-size: 11px; color: var(--ink-3); }
.fab { position: fixed; left: 16px; bottom: 84px; z-index: 15; height: 40px; padding: 0 16px; border-radius: 12px; border: 0; background: var(--glass); backdrop-filter: blur(12px); box-shadow: var(--shadow); font-weight: 600; opacity: 0; transition: opacity .7s .3s; }

.detail { right: 16px; top: 76px; max-height: calc(100% - 160px); width: 380px; overflow: auto; padding: 20px; transform: translateX(16px); animation: pop .45s cubic-bezier(.2,.9,.3,1.2); }
@keyframes pop { from { opacity: 0; transform: translateX(20px) scale(.98); } }
.detail .who, .coin-head, .agent-card { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; }
.detail .who img { width: 92px; height: 64px; border-radius: 12px; image-rendering: pixelated; box-shadow: 0 0 0 4px var(--cream-2), 0 0 0 6px var(--c, var(--gold)); }
.coin-img { width: 76px; height: 76px; border-radius: 16px; object-fit: cover; box-shadow: 0 6px 18px -8px rgba(30,60,110,.6); }
.agent-card { padding: 12px; border-radius: 14px; background: #fff; box-shadow: 0 0 0 1px var(--line) inset; }
.agent-card img { width: 84px; height: 59px; border-radius: 10px; image-rendering: pixelated; }
.agent-card h3 { margin: 0; }
.mission { margin: 0; padding: 12px 14px; border-left: 3px solid var(--gold); background: rgba(255,255,255,.6); border-radius: 0 12px 12px 0; white-space: pre-wrap; }
.status-chip, .status.s-alive, .status.s-after, .status.s-unknown { display: inline-block; margin: 2px 0 0; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 600; }
.status.s-alive { background: #e3f4dc; color: #2f6b38; } .status.s-after { background: #fff1d1; color: #8a5a10; } .status.s-unknown { background: rgba(35,50,74,.08); color: var(--ink-2); }
.facts { display: grid; gap: 1px; margin: 14px 0; border-radius: 12px; overflow: hidden; background: var(--line); }
.facts div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 12px; background: rgba(255,255,255,.85); }
.facts dt { color: var(--ink-3); } .facts dd { margin: 0; text-align: right; font-weight: 500; word-break: break-word; }
.row { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.mini-crew { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.mc { display: grid; justify-items: start; gap: 2px; padding: 10px; border-radius: 12px; border: 0; background: #fff; text-align: left; box-shadow: 0 0 0 1px var(--line) inset; transition: transform .18s; }
.mc:hover { transform: translateY(-2px); box-shadow: 0 0 0 2px var(--c) inset; }
.mc img { width: 56px; height: 39px; border-radius: 8px; image-rendering: pixelated; }
.mc span { font-size: 11px; color: var(--ink-3); }

.dock { position: fixed; left: 50%; bottom: 16px; z-index: 15; transform: translate(-50%, 14px); display: flex; gap: 10px; align-items: center; max-width: calc(100% - 32px); opacity: 0; transition: opacity .7s .4s, transform .7s .4s; }
body.live .dock { transform: translate(-50%, 0); }
.dock .isles, .dock .tools { display: flex; gap: 4px; padding: 5px; border-radius: 14px; background: var(--glass); backdrop-filter: blur(14px); box-shadow: var(--shadow); }
.dock .isles { overflow-x: auto; scrollbar-width: none; } .dock .isles::-webkit-scrollbar { display: none; }
.dock button { height: 36px; padding: 0 12px; border-radius: 10px; border: 0; background: transparent; color: var(--ink-2); font-weight: 500; white-space: nowrap; transition: background .2s; }
.dock button:hover { background: rgba(35,50,74,.07); color: var(--ink); }
.dock button[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: 0 2px 8px -4px rgba(30,60,110,.5); }
.dock .tools button { min-width: 36px; padding: 0 10px; }

/* ---------- labels in the sky ---------- */
#tags { position: fixed; inset: 0; pointer-events: none; z-index: 5; }
#tags > * { position: absolute; left: 0; top: 0; pointer-events: auto; will-change: transform; }
body.is-gate #tags { display: none; }
.isl { display: grid; justify-items: center; gap: 1px; padding: 6px 12px 7px; border-radius: 12px; border: 0; background: rgba(255,250,240,.86); box-shadow: 0 8px 20px -10px rgba(30,60,110,.7); backdrop-filter: blur(8px); transition: background .2s, transform .2s; }
.isl b { font: 700 13px/1.1 var(--px); letter-spacing: .05em; }
.isl span { font-size: 10.5px; color: var(--ink-3); max-width: 180px; text-align: center; line-height: 1.3; }
.isl::after { content: ""; position: absolute; left: 50%; bottom: -5px; width: 10px; height: 10px; background: inherit; transform: translateX(-50%) rotate(45deg); border-radius: 2px; }
.isl:hover { background: #fff; }
.isl-launch { background: linear-gradient(#fff3cf, #ffe39e); } .isl-launch b { font-size: 15px; }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 5px; border-radius: 999px; border: 0; background: rgba(255,255,255,.88); font-size: 11px; box-shadow: 0 4px 12px -6px rgba(30,60,110,.7); }
.tag i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 2px #fff, 0 0 8px var(--c); }
.tag b { font-weight: 600; } .tag span { color: var(--ink-3); }
.bubble { max-width: 200px; padding: 7px 11px; border-radius: 12px; background: #fff; font-size: 12px; line-height: 1.35; box-shadow: 0 8px 22px -10px rgba(30,60,110,.7); pointer-events: none !important; animation: bub .35s cubic-bezier(.2,.9,.3,1.3); }
@keyframes bub { from { opacity: 0; scale: .85; } }
.bubble[data-hide="1"] { display: none; }
.soul-tag { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 3px; border-radius: 999px; background: linear-gradient(#fffaf0, #fff0cc); text-decoration: none; font-size: 11.5px; box-shadow: 0 0 0 1.5px var(--gold), 0 6px 16px -8px rgba(216,154,53,.9); }
.soul-tag img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }
.soul-tag:not(:has(img)) { padding-left: 10px; }

/* ---------- sheets ---------- */
.sheet { position: fixed; right: 16px; top: 76px; bottom: 16px; z-index: 25; width: 470px; max-width: calc(100% - 32px); }
.sheet.wide { width: 860px; }
.sheet-card { position: relative; height: 100%; overflow: auto; padding: 24px; border-radius: var(--r); background: rgba(255,250,240,.93); backdrop-filter: blur(20px); box-shadow: var(--shadow); animation: pop .5s cubic-bezier(.2,.9,.3,1.15); }
.search input { width: 100%; height: 42px; padding: 0 14px; border-radius: 12px; border: 0; background: #fff; box-shadow: 0 0 0 1px var(--line) inset; outline: none; }
.search input:focus { box-shadow: 0 0 0 2px var(--sky) inset; }
.souls { list-style: none; margin: 12px 0; padding: 0; display: grid; gap: 6px; }
.souls a { display: grid; grid-template-columns: 46px 1fr auto; gap: 12px; align-items: center; padding: 8px; border-radius: 12px; background: rgba(255,255,255,.7); text-decoration: none; transition: background .2s, transform .2s; }
.souls a:hover { background: #fff; transform: translateX(3px); }
.souls img, .souls .ph { width: 46px; height: 46px; border-radius: 10px; object-fit: cover; background: var(--sky-l); }
.souls .t { display: grid; min-width: 0; } .souls .t b { font-weight: 600; } .souls em { font-style: normal; color: var(--gold-d); }
.souls .t small { color: var(--ink-3); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.souls .m { text-align: right; font-weight: 600; display: grid; } .souls .m small { font-weight: 400; color: var(--ink-3); font-size: 11px; }
.souls .empty { padding: 30px 12px; text-align: center; color: var(--ink-3); background: rgba(255,255,255,.5); border-radius: 12px; }
.steps { margin: 12px 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 10px; }
.steps li { counter-increment: s; display: grid; gap: 4px; padding: 12px 14px 12px 50px; border-radius: 14px; background: rgba(255,255,255,.7); position: relative; }
.steps li::before { content: counter(s); position: absolute; left: 14px; top: 12px; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 8px; background: var(--gold); font: 700 13px var(--px); }
.steps span { color: var(--ink-2); font-size: 13px; }

/* launch */
.lgrid { display: grid; grid-template-columns: 1fr 280px; gap: 18px; align-items: start; }
.ls { padding: 14px; margin-bottom: 12px; border-radius: 16px; background: rgba(255,255,255,.65); box-shadow: 0 0 0 1px var(--line) inset; }
.ls header { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.ls .n { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; background: var(--sky-l); font: 700 13px var(--px); color: var(--sky-d); flex: none; }
.ls h3 { margin: 0; } .ls header p { margin: 0; font-size: 11.5px; color: var(--ink-3); }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.f { display: grid; gap: 5px; margin-bottom: 8px; } .f.full { grid-column: 1 / -1; }
.f > span { font-size: 11.5px; font-weight: 600; color: var(--ink-2); display: flex; justify-content: space-between; } .f em { font-style: normal; font-weight: 400; color: var(--ink-3); }
.f input, .f textarea { width: 100%; padding: 10px 12px; border-radius: 11px; border: 0; background: #fff; box-shadow: 0 0 0 1px var(--line) inset; outline: none; transition: box-shadow .2s; resize: vertical; }
.f input:focus, .f textarea:focus { box-shadow: 0 0 0 2px var(--sky) inset; }
.f input:disabled { background: rgba(255,255,255,.5); }
.tick { display: flex; align-items: center; border-radius: 11px; background: #fff; box-shadow: 0 0 0 1px var(--line) inset; } .tick i { padding-left: 12px; font-style: normal; color: var(--gold-d); font-weight: 600; } .tick input { box-shadow: none !important; padding-left: 4px; }
.drop { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 14px; border: 2px dashed rgba(77,143,216,.45); background: rgba(212,231,246,.35); cursor: pointer; transition: background .2s, border-color .2s; }
.drop:hover, .drop.over { background: rgba(212,231,246,.7); border-color: var(--sky-d); } .drop.has { border-style: solid; border-color: var(--mint); }
.drop .thumb { width: 56px; height: 56px; flex: none; display: grid; place-items: center; border-radius: 12px; background: #fff; font-size: 26px; color: var(--sky-d); overflow: hidden; } .drop .thumb img { width: 100%; height: 100%; object-fit: cover; }
.drop small { display: block; color: var(--ink-3); font-size: 11.5px; }
.glyphs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.glyph { display: grid; justify-items: center; gap: 4px; padding: 8px 4px; border-radius: 12px; border: 0; background: #fff; box-shadow: 0 0 0 1px var(--line) inset; transition: transform .18s, box-shadow .18s; }
.glyph img { width: 100%; max-width: 64px; border-radius: 7px; image-rendering: pixelated; } .glyph small { font-size: 10.5px; color: var(--ink-3); }
.glyph:hover { transform: translateY(-2px); } .glyph.on { box-shadow: 0 0 0 2px var(--gold) inset, 0 6px 16px -8px rgba(216,154,53,.9); }
.checks, .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chk { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 11px; background: #fff; box-shadow: 0 0 0 1px var(--line) inset; cursor: pointer; }
.chk input { position: absolute; opacity: 0; } .chk i { width: 16px; height: 16px; border-radius: 5px; box-shadow: 0 0 0 1.5px var(--ink-3) inset; transition: background .15s; }
.chk input:checked + i { background: var(--gold) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%233b2a0c' stroke-width='2'/%3E%3C/svg%3E") center/14px no-repeat; box-shadow: none; }
.chk input:focus-visible + i { outline: 2px solid var(--sky-d); outline-offset: 2px; }
.chip { height: 36px; padding: 0 14px; border-radius: 11px; border: 0; background: #fff; box-shadow: 0 0 0 1px var(--line) inset; font-weight: 500; transition: box-shadow .15s; }
.chip.on { box-shadow: 0 0 0 2px var(--gold) inset; background: #fff8e6; }
.preview { position: sticky; top: 0; }
.pcard { padding: 14px; border-radius: 18px; background: linear-gradient(170deg, #cfe3f6, #fff6e2 70%); box-shadow: 0 0 0 1px var(--line) inset; }
.pimg { aspect-ratio: 1; border-radius: 14px; background: rgba(255,255,255,.6); display: grid; place-items: center; overflow: hidden; color: var(--ink-3); font-size: 12px; box-shadow: 0 10px 26px -14px rgba(30,60,110,.8); }
.pimg img { width: 100%; height: 100%; object-fit: cover; }
.pwho { display: flex; justify-content: space-between; align-items: baseline; margin: 10px 2px 8px; } .pwho b { font: 700 16px var(--px); } .pwho span { color: var(--gold-d); font-weight: 600; }
.pagent { display: flex; gap: 10px; align-items: center; padding: 8px; border-radius: 12px; background: rgba(255,255,255,.75); } .pagent img { width: 64px; height: 45px; border-radius: 8px; image-rendering: pixelated; } .pagent small { display: block; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.pmission { font-size: 12px; color: var(--ink-2); max-height: 7.5em; overflow: hidden; margin: 10px 2px; }
.fine { font-size: 11px; color: var(--ink-3); margin: 8px 0 0; }

/* admin + misc */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: rgba(35,50,74,.35); backdrop-filter: blur(6px); padding: 16px; }
.modal .card { position: relative; width: 420px; max-width: 100%; padding: 24px; border-radius: var(--r); background: var(--cream); box-shadow: var(--shadow); display: grid; gap: 10px; }
.modal label { display: grid; gap: 4px; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.modal input { padding: 10px 12px; border-radius: 10px; border: 0; background: #fff; box-shadow: 0 0 0 1px var(--line) inset; font-weight: 400; color: var(--ink); }
.modal .actions { display: flex; gap: 8px; justify-content: flex-end; }
.toasts { position: fixed; left: 50%; top: 76px; transform: translateX(-50%); z-index: 60; display: grid; gap: 8px; pointer-events: none; }
.toast { padding: 10px 16px; border-radius: 12px; background: var(--ink); color: var(--cream); font-size: 13px; box-shadow: var(--shadow); animation: pop .35s ease; transition: opacity .4s; } .toast.err { background: #8d3426; } .toast.out { opacity: 0; }
.nogl { position: fixed; inset: 0; z-index: 40; display: grid; place-content: center; justify-items: center; gap: 8px; padding: 24px; text-align: center; background: linear-gradient(#5d9bdc, #cfe4f5); color: var(--cream); }
.nogl h1 { margin: 0; font: 700 48px var(--px); } .nogl img { max-width: 70vw; }

/* ---------- small screens ---------- */
@media (max-width: 1100px) { .sheet.wide { width: 640px; } .lgrid { grid-template-columns: 1fr; } .preview { position: static; } }
@media (max-width: 860px) {
  .topbar { padding: 10px 12px; gap: 8px; }
  .bar .nav { display: none; }
  .brand .word { font-size: 17px; }
  .bar .links .ic.ca, .bar .links .ic.snd { display: none; }
  .bar .wallet { display: none; }
  .bar .btn.primary { height: 38px; padding: 0 12px; font-size: 12px; }
  .gate-copy { left: 16px; right: 16px; top: auto; bottom: max(28px, env(safe-area-inset-bottom)); transform: none; animation: rise2 1.4s cubic-bezier(.2,.8,.2,1) both .2s; }
  @keyframes rise2 { from { opacity: 0; transform: translateY(20px); } }
  .gate .title { font-size: clamp(40px, 12vw, 64px); }
  .gate .sub { margin: 8px 0 12px; font-size: 16px; }
  .gate .body { font-size: 11.5px; line-height: 1.7; margin-bottom: 20px; }
  .gate .body br { display: none; }
  .gate::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 62%; background: linear-gradient(rgba(77,143,216,0), rgba(70,128,200,.55) 45%, rgba(62,116,190,.78)); pointer-events: none; z-index: -1; }
  .gate-copy { z-index: 1; }
  .gate-links .ic.ca { display: none; }
  .feed { left: 8px; right: 8px; top: auto; bottom: 70px; width: auto; height: 46%; }
  .fab { bottom: 70px; left: 8px; }
  .detail { left: 8px; right: 8px; top: auto; bottom: 70px; width: auto; max-height: 48%; }
  .dock { bottom: 10px; gap: 6px; } .dock .tools #r-left, .dock .tools #r-right, .dock .tools #auto { display: none; }
  .sheet, .sheet.wide { left: 8px; right: 8px; top: 64px; bottom: 8px; width: auto; max-width: none; }
  .sheet-card { padding: 18px; }
  .fields { grid-template-columns: 1fr; } .glyphs { grid-template-columns: repeat(3, 1fr); }
  .isl span { display: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
