/*
VOICE   bright, friendly game platform — confident blue on clean white
IDEA    a low-poly gem: faceted triangles in layered blues frame every hero surface
PICTURE the live 3D character, large, on a blue faceted stage
COLOUR  white ground, PolyGo blue #1a5cff, deep #0a2a7a, coin gold #ffc933 only for currency
TYPE    Fredoka for headings and numbers, Nunito for text
LAYOUT  sticky white top bar, content up to 1240px, stage + panel splits, bottom tabs on phones
*/
:root {
  --blue: #1a5cff; --blue-2: #2f6bff; --blue-d: #0a2a7a; --blue-dd: #071d57; --blue-50: #f2f6ff; --blue-100: #e2ebff; --blue-200: #c5d6ff;
  --ink: #0d1b3d; --muted: #5a6b8c; --line: #e3eaf7; --bg: #ffffff; --card: #ffffff; --coin: #ffc933; --red: #e63950; --green: #1aa36b;
  --r: 16px; --shadow: 0 1px 2px rgba(13,27,61,.06), 0 8px 24px rgba(13,27,61,.06);
  --link: #1a5cff; --deep: #0a2a7a; --top: rgba(255,255,255,.92); --quote: #34466b; --gold-soft: #fffaf0; --gold-line: #ffe08a;
  --head: 'Fredoka', 'Nunito', system-ui, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; min-width: 0; }
html { scroll-padding-top: calc(var(--hdr) + 16px); }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif; overflow-x: clip; }
h1, h2, h3 { font-family: var(--head); font-weight: 600; line-height: 1.1; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(30px, 4vw, 44px); } h2 { font-size: 24px; } h3 { font-size: 18px; }
a { color: var(--link); text-decoration: none; } a:hover { text-decoration: underline; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--blue-200); outline-offset: 2px; border-radius: 8px; }
[hidden] { display: none !important; }
img { display: block; }

/* ---------- buttons & inputs ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: 12px; border: 0;
  background: var(--blue); color: #fff; font-weight: 800; cursor: pointer; box-shadow: 0 3px 0 var(--blue-d); transition: transform .08s, box-shadow .08s, background .15s; white-space: nowrap; }
.btn:hover { background: var(--blue-2); text-decoration: none; }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--blue-d); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn.ghost { background: var(--blue-50); color: var(--link); box-shadow: inset 0 0 0 1.5px var(--blue-100); }
.btn.ghost:hover { background: var(--blue-100); }
.btn.white { background: #fff; color: var(--link); box-shadow: 0 3px 0 rgba(0,0,0,.15); }
.btn.gold { background: var(--coin); color: #4a3500; box-shadow: 0 3px 0 #c99a12; }
.btn.danger { background: var(--card); color: var(--red); box-shadow: inset 0 0 0 1.5px #f6c7cf; }
.btn.sm { min-height: 36px; padding: 0 14px; font-size: 14px; border-radius: 10px; }
.btn.block { width: 100%; }
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field label { font-weight: 700; font-size: 14px; }
.input { width: 100%; min-height: 48px; padding: 12px 14px; font-size: 16px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--card); transition: border-color .15s, box-shadow .15s; }
.input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px var(--blue-100); }
textarea.input { resize: vertical; min-height: 96px; line-height: 1.5; }
.hint { font-size: 13px; color: var(--muted); }
.err { color: var(--red); font-weight: 700; font-size: 14px; min-height: 1.4em; }
.pw { position: relative; } .pw .input { padding-right: 70px; }
.pw button { position: absolute; right: 6px; top: 6px; height: 36px; padding: 0 10px; border: 0; background: none; color: var(--link); font-weight: 800; font-size: 13px; cursor: pointer; }
.meter { height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; } .meter i { display: block; height: 100%; width: 0; background: var(--red); transition: width .2s, background .2s; }
.check { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; cursor: pointer; min-height: 36px; }
.check input { width: 18px; height: 18px; accent-color: var(--blue); }

/* ---------- top bar ---------- */
.top { position: sticky; top: 0; z-index: 20; background: var(--top); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top-in { max-width: 1240px; margin: 0 auto; height: 64px; padding: 0 max(3vw, 16px); display: flex; align-items: center; gap: 24px; }
.logo { display: flex; align-items: center; gap: 8px; font-family: var(--head); font-weight: 700; font-size: 24px; color: var(--deep); }
.logo:hover { text-decoration: none; } .logo svg { width: 32px; height: 32px; }
.nav { display: flex; gap: 4px; }
.nav a { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 10px; color: var(--muted); font-weight: 800; }
.nav a:hover { background: var(--blue-50); color: var(--link); text-decoration: none; }
.nav a.on { background: var(--blue-50); color: var(--link); }
.nav svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
/* second row of the header: the player's own pages */
:root { --hdr: 110px; } /* full header height (both rows and borders): sticky panels sit below it */
.subnav { border-top: 1px solid var(--line); }
.subnav-in { max-width: 1240px; margin: 0 auto; height: 44px; padding: 0 max(3vw, 16px); display: flex; align-items: center; gap: 4px; }
.subnav a { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border-radius: 9px; color: var(--muted); font-weight: 800; font-size: 14.5px; }
.subnav a:hover { background: var(--blue-50); color: var(--link); text-decoration: none; }
.subnav a.on { background: var(--blue-50); color: var(--link); }
.subnav svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.coins { display: flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px 0 8px; border-radius: 99px; background: #fff8e0; color: #6b4e00; font-family: var(--head); font-weight: 600; font-size: 17px; box-shadow: inset 0 0 0 1.5px #ffe7a0; }
.coins:hover { text-decoration: none; }
.coin { display: inline-block; width: 20px; height: 20px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff1b8 0 18%, var(--coin) 19% 60%, #e0a800 61%); box-shadow: inset 0 0 0 2px #e0a800; flex: none; }
.coin.sm { width: 16px; height: 16px; }
.menu { position: relative; }
.me-btn { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 12px 0 4px; border: 0; border-radius: 99px; background: var(--blue-50); cursor: pointer; font-weight: 800; }
.me-btn img { width: 36px; height: 36px; border-radius: 50%; background: var(--blue-100); }
.menu-pop { position: absolute; right: 0; top: 52px; min-width: 180px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 6px; display: grid; }
.menu-pop a, .menu-pop button { text-align: left; padding: 10px 12px; border-radius: 10px; border: 0; background: none; color: var(--ink); font-weight: 700; cursor: pointer; }
.menu-pop a:hover, .menu-pop button:hover { background: var(--blue-50); text-decoration: none; }

/* ---------- layout ---------- */
.wrap { max-width: 1240px; margin: 0 auto; padding: 28px max(3vw, 16px) 64px; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.pad { padding: 20px; }
.stack > * + * { margin-top: 16px; }
.sticky { position: sticky; top: calc(var(--hdr) + 24px); }
.muted { color: var(--muted); }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.spacer { flex: 1; }
.poly { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }

/* ---------- auth ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.show { position: relative; overflow: hidden; background: linear-gradient(160deg, #2f6bff, #0a2a7a 70%); color: #fff; display: flex; flex-direction: column; padding: 40px clamp(24px, 4vw, 56px); }
.show .logo { color: #fff; position: relative; }
.show canvas { position: relative; flex: 1; width: 100%; min-height: 320px; cursor: grab; touch-action: pan-y; }
.show canvas:active { cursor: grabbing; }
.show .cap { position: relative; max-width: 460px; }
.show .cap h1 { color: #fff; }
.show .cap p { color: #d7e3ff; margin: 10px 0 0; font-size: 17px; }
.tag { position: relative; align-self: flex-start; margin-top: 12px; display: inline-flex; gap: 8px; align-items: center; padding: 6px 12px; border-radius: 99px; background: rgba(255,255,255,.14); font-weight: 700; font-size: 14px; }
.form-side { display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: var(--card); }
.form-card { width: 100%; max-width: 400px; }
.form-card h2 { font-size: 32px; margin-bottom: 6px; }
.form-card .sub { color: var(--muted); margin: 0 0 24px; }
.switch { margin-top: 20px; text-align: center; color: var(--muted); }
.perks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0 0 24px; padding: 0; list-style: none; }
.perks li { background: var(--blue-50); border-radius: 12px; padding: 10px; font-size: 13px; font-weight: 700; color: var(--deep); text-align: center; }
.perks b { display: block; font-family: var(--head); font-size: 20px; color: var(--link); }

/* ---------- feed ---------- */
.composer { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 14px; }
.av { width: 48px; height: 48px; border-radius: 50%; background: linear-gradient(160deg, var(--blue-100), var(--blue-50)); flex: none; }
.av.sm { width: 34px; height: 34px; }
.composer .bar { display: flex; align-items: center; gap: 12px; margin-top: 10px; flex-wrap: wrap; }
.post { padding: 18px 20px; }
.post-h { display: flex; align-items: center; gap: 12px; }
.post-h .who { font-weight: 800; color: var(--ink); } .post-h .who:hover { color: var(--link); }
.post-h time { color: var(--muted); font-size: 14px; }
.badge { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 99px; background: var(--blue); color: #fff; font-size: 12px; font-weight: 800; margin-left: 6px; vertical-align: 2px; }
.post-b { margin: 12px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 16.5px; }
.look { position: relative; overflow: hidden; margin-top: 14px; border-radius: 14px; background: linear-gradient(170deg, var(--blue-2), var(--blue-d)); display: flex; justify-content: center; }
.look img { position: relative; width: 260px; height: 260px; }
.look span { position: absolute; left: 12px; bottom: 10px; color: #fff; font-weight: 800; font-size: 13px; background: rgba(7,29,87,.5); padding: 3px 10px; border-radius: 99px; }
.acts { display: flex; gap: 6px; margin-top: 12px; }
.act { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 12px; border-radius: 10px; border: 0; background: none; color: var(--muted); font-weight: 800; cursor: pointer; }
.act:hover { background: var(--blue-50); color: var(--link); }
.act svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linejoin: round; }
.act.liked { color: var(--red); } .act.liked svg { fill: var(--red); }
.act.del { margin-left: auto; }
.comments { margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.cmt { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px; margin-bottom: 10px; }
.cmt .bub { background: var(--blue-50); border-radius: 12px; padding: 8px 12px; overflow-wrap: anywhere; }
.cmt .bub a { font-weight: 800; color: var(--ink); margin-right: 6px; }
.cmt-form { display: flex; gap: 8px; } .cmt-form .input { min-height: 42px; padding: 8px 12px; }
.side-me { overflow: hidden; }
.side-me .stage-sm { position: relative; height: 230px; background: linear-gradient(170deg, var(--blue-2), var(--blue-d)); display: flex; justify-content: center; overflow: hidden; }
.side-me .stage-sm img { position: relative; height: 230px; width: 230px; }
.daily { display: flex; align-items: center; gap: 14px; }
.daily .big { font-family: var(--head); font-size: 28px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.mini-items { display: grid; gap: 8px; }
.mini-item { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 6px; border-radius: 12px; color: var(--ink); }
.mini-item:hover { background: var(--blue-50); text-decoration: none; }
.mini-item img { width: 52px; height: 52px; border-radius: 10px; background: var(--blue-50); }
.price { display: inline-flex; align-items: center; gap: 5px; font-family: var(--head); font-weight: 600; white-space: nowrap; }

/* ---------- avatar studio ---------- */
.studio { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.stage { position: relative; overflow: hidden; border-radius: 22px; background: linear-gradient(170deg, #3d7bff 0%, var(--blue) 40%, var(--blue-d) 100%); height: min(72vh, 640px); min-height: 380px; }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; touch-action: pan-y; }
.stage canvas:active { cursor: grabbing; }
.stage .floor { position: absolute; left: 0; right: 0; bottom: 0; height: 28%; background: linear-gradient(180deg, rgba(255,255,255,0), rgba(255,255,255,.12)); }
.stage .over { position: absolute; left: 16px; right: 16px; top: 14px; display: flex; justify-content: space-between; gap: 10px; color: #fff; pointer-events: none; }
.stage .over > * { pointer-events: auto; }
.stage .name { font-family: var(--head); font-size: 22px; font-weight: 600; }
.stage .tip { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; color: #c9d9ff; font-size: 13px; font-weight: 700; pointer-events: none; }
.tabs { display: flex; gap: 4px; padding: 4px; background: var(--blue-50); border-radius: 14px; overflow-x: auto; }
.tabs button { flex: 1; min-height: 40px; padding: 0 9px; border: 0; border-radius: 10px; background: none; font-weight: 800; color: var(--muted); cursor: pointer; white-space: nowrap; }
.tabs button.on { background: var(--card); color: var(--link); box-shadow: 0 1px 3px rgba(13,27,61,.12); }
.opt-group { margin-top: 18px; } .opt-group h3 { font-size: 15px; font-family: inherit; font-weight: 800; margin-bottom: 10px; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.sw { width: 44px; height: 44px; border-radius: 12px; border: 3px solid var(--card); box-shadow: 0 0 0 1.5px var(--line); cursor: pointer; }
.sw.on { box-shadow: 0 0 0 3px var(--blue); }
.sw.custom { position: relative; overflow: hidden; background: conic-gradient(#ff5d5d, #ffc933, #2ec4b6, #1a5cff, #8b5cf6, #ff5d5d); }
.sw.custom input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 40px; padding: 0 14px; border-radius: 99px; border: 1.5px solid var(--line); background: var(--card); font-weight: 800; color: var(--muted); cursor: pointer; }
.chip:hover { border-color: var(--blue-200); color: var(--link); }
.chip.on { background: var(--blue); border-color: var(--blue); color: #fff; }
.gear { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.gear button { position: relative; border: 1.5px solid var(--line); background: var(--blue-50); border-radius: 14px; padding: 6px 6px 8px; cursor: pointer; font-weight: 700; font-size: 13px; color: var(--ink); }
.gear button img { width: 100%; aspect-ratio: 1; }
.gear button.on { border-color: var(--blue); background: var(--card); box-shadow: 0 0 0 2px var(--blue); }
.gear button.on::after { content: 'Equipped'; position: absolute; top: 6px; right: 6px; background: var(--blue); color: #fff; font-size: 11px; padding: 1px 7px; border-radius: 99px; }
.savebar { display: flex; gap: 10px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); flex-wrap: wrap; }

/* ---------- market ---------- */
.mk-hero { position: relative; overflow: hidden; background: linear-gradient(160deg, var(--blue-2), var(--blue-d) 80%); color: #fff; }
.mk-hero .in { position: relative; max-width: 1240px; margin: 0 auto; padding: 32px max(3vw, 16px); display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.mk-hero p { margin: 6px 0 0; color: #d7e3ff; }
.bal { margin-left: auto; background: rgba(255,255,255,.12); border-radius: 16px; padding: 12px 18px; display: flex; align-items: center; gap: 14px; }
.bal .big { font-family: var(--head); font-size: 30px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.bal .coin { width: 26px; height: 26px; }
.filters { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.filters .input { min-height: 42px; width: 200px; padding: 8px 12px; }
.filters select.input { width: auto; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.item { display: flex; flex-direction: column; text-align: left; border: 1.5px solid var(--line); border-radius: 18px; background: var(--card); padding: 10px; cursor: pointer; transition: transform .12s, border-color .12s, box-shadow .12s; color: var(--ink); }
.item:hover { transform: translateY(-2px); border-color: var(--blue-200); box-shadow: var(--shadow); }
.item.sel { border-color: var(--blue); box-shadow: 0 0 0 2px var(--blue); }
.item .tile { border-radius: 12px; aspect-ratio: 1; display: grid; place-items: center; }
.item .tile img { width: 88%; height: 88%; }
.item .nm { font-weight: 800; margin-top: 10px; line-height: 1.25; }
.item .ft { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; gap: 6px; }
.rar { font-size: 12px; font-weight: 800; text-transform: capitalize; }
.t-common { background: linear-gradient(160deg, #f2f6ff, #e2ebff); } .c-common { color: #5a6b8c; }
.t-rare { background: linear-gradient(160deg, #dff0ff, #b8dcff); } .c-rare { color: #1a7fd6; }
.t-epic { background: linear-gradient(160deg, #ece4ff, #d2c2ff); } .c-epic { color: #6d3fe0; }
.t-legendary { background: linear-gradient(160deg, #fff4d1, #ffe08a); } .c-legendary { color: #b07800; }
.own { font-size: 12px; font-weight: 800; color: var(--green); background: #e3f7ee; padding: 2px 8px; border-radius: 99px; }
.tryon .stage { height: 360px; min-height: 0; border-radius: 16px; }
.tryon .info { padding: 16px 4px 4px; }
.tryon .desc { color: var(--muted); margin: 6px 0 14px; }

/* ---------- profile ---------- */
.pf { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 28px; align-items: start; }
.pf .stage { height: 420px; min-height: 0; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.stats div { background: var(--blue-50); border-radius: 12px; padding: 10px 12px; }
.stats div { font-size: 14px; } .stats b { display: block; font-family: var(--head); font-size: 24px; color: var(--link); font-weight: 600; }

/* ---------- toasts & modal ---------- */
#toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); display: grid; gap: 8px; z-index: 60; width: min(92vw, 420px); }
.toast { background: var(--blue-dd); color: #fff; padding: 12px 16px; border-radius: 12px; font-weight: 700; box-shadow: var(--shadow); display: flex; gap: 10px; align-items: center; animation: pop .25s ease-out; }
.toast.bad { background: var(--red); }
@keyframes pop { from { transform: translateY(10px); opacity: 0; } }
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(7,29,87,.45); display: grid; place-items: center; padding: 16px; }
.modal .box { background: var(--card); border-radius: 20px; padding: 24px; width: min(100%, 420px); box-shadow: 0 20px 60px rgba(7,29,87,.3); }
.modal .box p { color: var(--muted); }
.modal .row { justify-content: flex-end; margin-top: 18px; }
.loading { padding: 60px; text-align: center; color: var(--muted); }


/* ---------- forum ---------- */
.fsearch { margin-left: auto; display: flex; gap: 8px; width: min(100%, 420px); }
.fsearch .input { min-height: 46px; border-color: transparent; }
.fsec + .fsec { margin-top: 28px; }
.fsec > h2 { font-size: 15px; font-family: inherit; font-weight: 800; color: var(--muted); margin: 0 0 10px 4px; }
.catlist, .tlist { overflow: hidden; }
.cat-row, .t-row { position: relative; display: grid; align-items: center; gap: 16px; padding: 16px 20px; }
.cat-row { grid-template-columns: 52px minmax(0, 1fr) 110px minmax(0, 250px); }
.cat-row + .cat-row, .t-row + .t-row { border-top: 1px solid var(--line); }
.cat-row:hover, .t-row:hover { background: var(--blue-50); }
.stretch { color: var(--ink); font-weight: 800; }
.stretch::after { content: ''; position: absolute; inset: 0; }
.stretch:hover { color: var(--link); text-decoration: none; }
.cat-row .raise, .t-row .raise { position: relative; z-index: 1; }
.cat-ic { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; color: #fff; flex: none;
  background: linear-gradient(135deg, rgba(255,255,255,.28) 0 50%, rgba(0,0,0,.08) 50%), var(--c); box-shadow: inset 0 -3px 0 rgba(0,0,0,.12); }
.cat-ic svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }
.cat-ic.big { width: 64px; height: 64px; border-radius: 18px; } .cat-ic.big svg { width: 32px; height: 32px; }
.cat-main { display: grid; gap: 2px; } .cat-main .stretch { font-size: 17px; }
.cat-main .muted { font-size: 15px; }
.team { display: inline-flex; margin-left: 8px; font-size: 12px; font-weight: 800; color: var(--link); background: var(--blue-50); border-radius: 99px; padding: 1px 8px; vertical-align: 2px; }
.dot { display: none; }
.cat-stats, .t-stats { font-size: 14px; color: var(--muted); line-height: 1.35; }
.cat-stats b, .t-stats b { color: var(--ink); font-family: var(--head); font-weight: 600; font-size: 17px; }
.cat-last { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px; align-items: center; font-size: 14px; }
.cat-last a.tt { display: block; font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cat-last a.tt:hover { color: var(--link); }
.latest a { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px; padding: 8px; border-radius: 12px; color: var(--ink); align-items: center; }
.latest a:hover { background: var(--blue-50); text-decoration: none; }
.latest b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-weight: 700; font-size: 14px; color: var(--muted); margin-bottom: 18px; }
.crumbs span:last-child { color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 40ch; }
.cat-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.cat-head p { margin: 4px 0 0; }
.t-row { grid-template-columns: 44px minmax(0, 1fr) 96px minmax(0, 170px); }
.t-row .av { width: 44px; height: 44px; }
.t-main { display: grid; gap: 2px; } .t-main .stretch { font-size: 16.5px; overflow-wrap: anywhere; }
.pill { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 99px; font-size: 12px; font-weight: 800; margin-right: 6px; vertical-align: 2px; }
.pill svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.pill.pin { background: #fff4d1; color: #8a5f00; } .pill.lock { background: #eef0f5; color: #5b6478; } .pill.cat { background: var(--blue-50); color: var(--link); }
.t-last { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 8px; align-items: center; font-size: 13px; color: var(--muted); }
.t-last .av { width: 30px; height: 30px; } .t-last a { color: var(--ink); font-weight: 700; }
.pager { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 18px; font-weight: 700; color: var(--muted); }
.th-head { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 20px; }
.th-head h1 { overflow-wrap: anywhere; } .th-head .pill { vertical-align: 8px; }
.modtools { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.modtools select.input { min-height: 36px; padding: 4px 10px; font-size: 14px; width: auto; }
.fpost { display: grid; grid-template-columns: 170px minmax(0, 1fr); overflow: hidden; scroll-margin-top: calc(var(--hdr) + 24px); }
.fpost.op { border-color: var(--blue-200); }
.fpost.flash { animation: flash 1.6s ease-out; }
@keyframes flash { from { box-shadow: 0 0 0 4px var(--blue-200); } }
.fp-author { background: var(--blue-50); padding: 18px 14px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; border-right: 1px solid var(--line); }
.fp-author .av { width: 84px; height: 84px; background: var(--card); margin-bottom: 6px; }
.fp-author .who { font-weight: 800; color: var(--ink); overflow-wrap: anywhere; }
.fp-author .badge { margin: 0; }
.fp-main { padding: 16px 20px; display: flex; flex-direction: column; min-height: 100%; }
.fp-meta { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--muted); }
.fp-meta a { color: var(--muted); font-weight: 700; }
.rich { margin-top: 8px; font-size: 16.5px; overflow-wrap: anywhere; flex: 1; }
.rich p { margin: 0 0 12px; } .rich p:last-child { margin-bottom: 0; }
.rich ul { margin: 0 0 12px; padding-left: 22px; }
.rich blockquote { margin: 0 0 12px; padding: 8px 14px; border-left: 4px solid var(--blue-200); background: var(--blue-50); border-radius: 0 10px 10px 0; color: var(--quote); font-size: 15px; }
.rich strong { font-weight: 800; }
.fpost .look { margin-top: 12px; max-width: 420px; }
.fpost .acts { margin-top: 12px; flex-wrap: wrap; }
.edit-area { margin-top: 8px; display: grid; gap: 8px; }
.reply-box h2 { font-size: 20px; margin-bottom: 12px; }
textarea.tall { min-height: 220px; }
.narrow { max-width: 860px; }
.preview { margin-top: 20px; }
.preview .rich { min-height: 40px; }
.notice { display: flex; gap: 10px; align-items: center; padding: 14px 16px; border-radius: 14px; background: #eef0f5; color: #3b4660; font-weight: 700; }
@media (max-width: 980px) {
  .cat-row { grid-template-columns: 52px minmax(0, 1fr) 110px; } .cat-last { display: none; }
  .t-row { grid-template-columns: 44px minmax(0, 1fr) 90px; } .t-last { display: none; }
}
@media (max-width: 600px) {
  .cat-row { grid-template-columns: 44px minmax(0, 1fr); padding: 14px 16px; gap: 12px; } .cat-ic { width: 44px; height: 44px; }
  .cat-stats { grid-column: 2; font-size: 13px; } .cat-stats br { display: none; } .cat-stats b { font-size: 14px; }
  .t-row { grid-template-columns: 36px minmax(0, 1fr); padding: 12px 14px; gap: 12px; } .t-row .av { width: 36px; height: 36px; }
  .t-stats { grid-column: 2; } .dot { display: inline; } .t-stats br { display: none; } .t-stats b { font-size: 14px; }
  .fpost { grid-template-columns: minmax(0, 1fr); }
  .fp-author { flex-direction: row; justify-content: flex-start; text-align: left; border-right: 0; border-bottom: 1px solid var(--line); padding: 10px 14px; flex-wrap: wrap; column-gap: 10px; }
  .fp-author .av { width: 40px; height: 40px; margin: 0; }
  .fp-author .joined { display: none; }
  .fp-main { padding: 14px 16px; }
  .fsearch { margin-left: 0; }
  .modtools { margin-left: 0; }
}

/* ---------- site banner & version warning ---------- */
.site-banner { position: relative; z-index: 15; font-weight: 700; }
.sb-in { max-width: 1240px; margin: 0 auto; padding: 10px max(3vw, 16px); display: flex; align-items: center; gap: 14px; flex-wrap: wrap; min-height: 48px; }
.sb-text { flex: 1 1 260px; overflow-wrap: anywhere; }
.sb-link { color: inherit; text-decoration: underline; text-underline-offset: 3px; font-weight: 800; white-space: nowrap; }
.sb-link:hover { color: inherit; opacity: .85; }
.sb-x { width: 36px; height: 36px; border: 0; border-radius: 10px; background: rgba(0,0,0,.12); color: inherit; font-size: 22px; line-height: 1; cursor: pointer; flex: none; }
.sb-x:hover { background: rgba(0,0,0,.2); }
.ver-warn { background: #fff4d1; color: #5c4100; border-bottom: 1px solid #ffe08a; padding: 10px max(3vw, 16px); font-weight: 700; font-size: 14px; text-align: center; }
.linkbtn { border: 0; background: none; padding: 0; color: var(--muted); font: inherit; font-weight: 700; cursor: pointer; text-decoration: underline; }
.linkbtn:hover { color: var(--red); }

/* ---------- admin ---------- */
.adm-hero .in { padding-block: 26px; }
.adm { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 24px; align-items: start; }
.adm-nav { position: sticky; top: calc(var(--hdr) + 24px); display: grid; gap: 4px; }
.adm-nav a { padding: 10px 14px; border-radius: 12px; font-weight: 800; color: var(--muted); }
.adm-nav a:hover { background: var(--blue-50); color: var(--link); text-decoration: none; }
.adm-nav a.on { background: var(--blue); color: #fff; }
#admBody h2 { font-size: 22px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.tile { background: var(--blue-50); border-radius: 14px; padding: 14px 16px; display: grid; }
.tile b { font-family: var(--head); font-weight: 600; font-size: 28px; color: var(--deep); line-height: 1.1; }
.tile span { font-size: 14px; font-weight: 700; color: var(--muted); }
.adm-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.adm-grid2.tight { gap: 10px; }
.adm-grid2 > .card h3 { margin-bottom: 6px; }
.on-pill { background: #e3f7ee; color: var(--green); } .off-pill { background: #eef0f5; color: #5b6478; }
.adm-admin { background: var(--blue); color: #fff; } .adm-mod { background: var(--blue-50); color: var(--link); }
.adm-ban { background: #fde4e8; color: var(--red); } .adm-mute { background: #fff4d1; color: #8a5f00; }
.loglist { display: grid; margin-top: 8px; }
.logrow { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); align-items: start; }
.logrow:first-child { border-top: 0; }
.logrow > div { display: grid; gap: 2px; overflow-wrap: anywhere; }
.logrow .pill { justify-content: center; margin: 2px 0 0; background: var(--blue-50); color: var(--link); }
.logrow .act-ban, .logrow .act-scrub { background: #fde4e8; color: var(--red); } .logrow .act-mute { background: #fff4d1; color: #8a5f00; }
.logrow .act-grant, .logrow .act-grant-all { background: #e3f7ee; color: var(--green); }
.toggle { display: inline-flex; align-items: center; gap: 12px; font-weight: 800; cursor: pointer; min-height: 44px; }
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.toggle span { width: 50px; height: 30px; border-radius: 99px; background: #cfd8ea; position: relative; transition: background .15s; flex: none; }
.toggle span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: var(--card); box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .15s; }
.toggle input:checked + span { background: var(--blue); } .toggle input:checked + span::after { transform: translateX(20px); }
.toggle input:focus-visible + span { outline: 3px solid var(--blue-200); outline-offset: 2px; }
.bprev { margin: 0 0 16px; display: grid; gap: 6px; } .bprev .site-banner { border-radius: 12px; overflow: hidden; } .bprev .sb-in { padding: 10px 16px; }
.colorpick { display: flex; gap: 8px; } .colorpick input[type=color] { width: 52px; height: 48px; border: 1.5px solid var(--line); border-radius: 12px; padding: 3px; background: var(--card); cursor: pointer; flex: none; }
.adm-sec { margin-bottom: 18px; overflow: hidden; }
.adm-sec-h { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 14px 20px; background: var(--blue-50); border-bottom: 1px solid var(--line); }
.adm-sec-f { padding: 12px 20px; border-top: 1px solid var(--line); }
.adm-cat { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 20px; }
.adm-cat + .adm-cat { border-top: 1px solid var(--line); }
.adm-cat-a, .adm-sec-h { } .adm-cat-a { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.cf-prev { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 14px; align-items: center; padding: 14px; margin: 14px 0; border-radius: 14px; background: var(--blue-50); }
.iconpick { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 6px; }
.iconpick button { height: 44px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); cursor: pointer; display: grid; place-items: center; }
.iconpick button.on { border-color: var(--blue); background: var(--blue); color: #fff; }
.iconpick svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.modal .box { max-height: calc(100vh - 32px); overflow: auto; }
.modal .box:has(.iconpick) { width: min(100%, 560px); }
.ucard { overflow: hidden; }
.utable { width: 100%; border-collapse: collapse; font-size: 15px; }
.utable th { text-align: left; font-size: 13px; color: var(--muted); font-weight: 800; padding: 12px 14px; background: var(--blue-50); border-bottom: 1px solid var(--line); }
.utable td { padding: 10px 14px; border-top: 1px solid var(--line); vertical-align: middle; overflow-wrap: anywhere; }
.utable .num { text-align: right; white-space: nowrap; }
.utable tbody tr { cursor: pointer; } .utable tbody tr:hover, .utable tbody tr:focus-visible { background: var(--blue-50); }
.ucell { display: flex; align-items: center; gap: 10px; }
.uhead { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-top: 10px; }
.uhead .av { width: 72px; height: 72px; }
.uhead h2 .pill { vertical-align: 4px; margin-left: 6px; }
.notice.warn { background: #fde4e8; color: #8c1d30; margin: 10px 0 0; padding: 8px 12px; font-size: 14px; }
.scrub { display: grid; gap: 2px; }
.scrub .check { align-items: flex-start; font-weight: 500; } .scrub .check input { margin-top: 3px; flex: none; }
.gitems { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px; }
.gi { position: relative; border: 1.5px solid var(--line); background: var(--card); border-radius: 14px; padding: 6px 6px 8px; cursor: pointer; font-size: 12.5px; font-weight: 700; color: var(--ink); display: grid; gap: 2px; justify-items: center; text-align: center; }
.gi img { width: 100%; aspect-ratio: 1; background: var(--blue-50); border-radius: 10px; }
.gi em { font-style: normal; font-size: 11px; font-weight: 800; min-height: 1.3em; color: var(--muted); }
.gi.own { background: var(--blue-50); } .gi.own em { color: var(--green); }
.gi.add { border-color: var(--green); box-shadow: 0 0 0 2px var(--green); } .gi.add em { color: var(--green); }
.gi.rem { border-color: var(--red); box-shadow: 0 0 0 2px var(--red); opacity: .8; } .gi.rem em { color: var(--red); }
/* ---------- account settings ---------- */
.adm-nav button { text-align: left; padding: 10px 14px; border-radius: 12px; font-weight: 800; color: var(--muted); border: 0; background: none; cursor: pointer; font-size: 16px; }
.adm-nav button:hover { background: var(--blue-50); color: var(--link); }
.set-body > section { scroll-margin-top: calc(var(--hdr) + 24px); }
.set-body h2 { font-size: 22px; margin-bottom: 4px; }
.set-body .notice:not(.warn) { margin: 12px 0 0; }
#nameSave .coin { margin-left: 2px; }
.devices { display: grid; gap: 10px; margin: 12px 0 16px; }
.dev { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--blue-50); }
.dev-ic { width: 40px; height: 40px; border-radius: 10px; background: var(--card); display: grid; place-items: center; color: var(--link); }
.dev-ic svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.danger-zone { border-color: #f6c7cf; }
.danger-zone h2 { color: var(--red); }
.tfa-steps { margin: 0; padding-left: 22px; display: grid; gap: 18px; }
.tfa-steps li::marker { font-weight: 800; color: var(--link); }
.qrbox { width: 200px; margin: 12px 0; padding: 8px; background: var(--card); border: 1.5px solid var(--line); border-radius: 14px; }
.qrbox svg { display: block; width: 100%; height: auto; }
.secret { font: 600 15px/1.4 ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; background: var(--blue-50); padding: 8px 12px; border-radius: 10px; letter-spacing: .04em; overflow-wrap: anywhere; }
.code-input { font: 700 22px/1 ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; letter-spacing: .2em; }
.rcodes { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.rcodes code { font: 700 16px/1 ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; background: var(--blue-50); border: 1.5px dashed var(--blue-200); border-radius: 10px; padding: 12px; text-align: center; letter-spacing: .05em; }

@media (max-width: 860px) {
  .adm { grid-template-columns: minmax(0, 1fr); }
  .adm-nav { position: static; display: flex; overflow-x: auto; gap: 6px; padding-bottom: 4px; }
  .adm-nav a, .adm-nav button { white-space: nowrap; flex: none; }
  .adm-grid2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .adm-cat { grid-template-columns: 44px minmax(0, 1fr); } .adm-cat .cat-ic { width: 44px; height: 44px; } .adm-cat-a { grid-column: 1 / -1; justify-content: flex-start; }
  .utable thead { display: none; } .utable tr { display: grid; padding: 10px 14px; border-top: 1px solid var(--line); } .utable td { display: flow-root; border: 0; padding: 3px 0 3px 6.5em; text-align: start; }
  .utable td::before { content: attr(data-l); float: left; width: 6em; margin-left: -6.5em; color: var(--muted); font-size: 13px; font-weight: 700; }
  .utable .num { text-align: start; }
  .logrow { grid-template-columns: minmax(0, 1fr); gap: 4px; } .logrow .pill { justify-self: start; }
  .sb-in { gap: 8px; }
}

/* ---------- groups ---------- */
.glogo { width: 52px; height: 52px; border-radius: 14px; flex: none; object-fit: cover; background: var(--card); display: block; }
.glogo.sm { width: 40px; height: 40px; border-radius: 11px; }
.glogo.xl { width: 104px; height: 104px; border-radius: 24px; box-shadow: 0 6px 20px rgba(7,29,87,.25); }
.ggrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.gcard { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 6px 14px; padding: 16px; color: var(--ink); align-content: start; transition: transform .12s, box-shadow .12s, border-color .12s; }
.gcard:hover { text-decoration: none; transform: translateY(-2px); border-color: var(--blue-200); }
.gc-t { display: grid; gap: 2px; align-content: center; justify-items: start; } .gc-t b { font-size: 17px; overflow-wrap: anywhere; }
.gcard p { grid-column: 1 / -1; margin: 6px 0 0; font-size: 15px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.gprev { margin-bottom: 20px; } .gprev .gcard { background: var(--blue-50); }
.grole { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px 0 8px; border-radius: 99px; background: var(--card); border: 1.5px solid var(--line); font-size: 12.5px; font-weight: 800; color: var(--ink); vertical-align: 1px; white-space: nowrap; }
.grole i { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.g-hero { position: relative; overflow: hidden; background: linear-gradient(160deg, var(--blue-2), var(--blue-d) 80%); color: #fff; }
.g-hero .in { position: relative; max-width: 1240px; margin: 0 auto; padding: 30px max(3vw, 16px); display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.g-id { flex: 1 1 280px; } .g-id h1 { color: #fff; overflow-wrap: anywhere; } .g-id p { margin: 6px 0 0; color: #d7e3ff; } .g-id a { color: #fff; font-weight: 800; }
.g-id .grole { border-color: transparent; }
.g-act { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.btn.ghost-w { background: rgba(255,255,255,.14); color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.35); }
.btn.ghost-w:hover { background: rgba(255,255,255,.24); }
.gtabs { display: flex; gap: 4px; padding: 4px; background: var(--blue-50); border-radius: 14px; overflow-x: auto; }
.gtabs a { flex: 1; text-align: center; padding: 10px 14px; border-radius: 10px; font-weight: 800; color: var(--muted); white-space: nowrap; }
.gtabs a:hover { text-decoration: none; color: var(--link); }
.gtabs a.on { background: var(--card); color: var(--link); box-shadow: 0 1px 3px rgba(13,27,61,.12); }
.shoutbox { padding: 16px 20px; margin-bottom: 18px; border-color: var(--gold-line); background: linear-gradient(180deg, var(--gold-soft), var(--card)); }
.shoutbox .mega, .shout-pill svg { display: inline-grid; place-items: center; }
.shoutbox .mega svg { width: 22px; height: 22px; fill: none; stroke: #c48a00; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.shout-text { font-size: 18px; font-weight: 700; margin: 8px 0 4px; overflow-wrap: anywhere; }
.shout-form { margin-top: 12px; } .shout-form .input { flex: 1; min-height: 42px; padding: 8px 12px; width: auto; }
.old-shouts { margin-top: 10px; font-size: 15px; } .old-shouts summary { cursor: pointer; font-weight: 800; color: var(--link); } .old-shouts p { margin: 8px 0; overflow-wrap: anywhere; }
.post.shout { border-color: var(--gold-line); background: linear-gradient(180deg, var(--gold-soft), var(--card) 60%); }
.shout-pill { background: #fff4d1; color: #8a5f00; margin-left: 8px; } .shout-pill svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.post-rich { margin-top: 10px; }
.post .post-h .pill.pin { margin: 0; }
.mrow, .rrow { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 18px; }
.mrow + .mrow, .rrow + .rrow { border-top: 1px solid var(--line); }
.mrow .who { font-weight: 800; color: var(--ink); }
.mrow-a { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.mrow-a select.input { width: auto; min-height: 36px; padding: 4px 10px; font-size: 14px; }
.rrow { grid-template-columns: 18px minmax(0, 1fr) auto; }
.rdot { width: 18px; height: 18px; border-radius: 50%; }
.rmain { display: grid; gap: 6px; }
.perm-chips { display: flex; flex-wrap: wrap; gap: 6px; } .perm-chips span { font-size: 12.5px; font-weight: 700; background: var(--blue-50); color: var(--deep); padding: 2px 8px; border-radius: 99px; } .perm-chips .none { background: #eef0f5; color: var(--muted); }
.perm-list { display: grid; gap: 2px; } .check.dim { opacity: .55; }
.role-mini { display: grid; gap: 8px; margin-top: 8px; } .role-mini > div { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.logo-edit { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
.filebtn { position: relative; overflow: hidden; } .filebtn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.privacy { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pv { display: flex; gap: 10px; align-items: flex-start; padding: 14px; border: 1.5px solid var(--line); border-radius: 14px; cursor: pointer; }
.pv:has(input:checked) { border-color: var(--blue); background: var(--blue-50); }
.pv input { margin-top: 4px; accent-color: var(--blue); width: 18px; height: 18px; flex: none; }
.pv span { display: grid; gap: 2px; }
.pf-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.pf-h h2 { margin: 0; }
.pf-primary { display: flex; align-items: center; gap: 12px; padding: 12px 20px; background: var(--blue-50); border-bottom: 1px solid var(--line); color: var(--ink); }
.pf-primary:hover { text-decoration: none; background: var(--blue-100); }
.pf-primary .pp-t { display: grid; flex: 1; min-width: 0; }
.pf-primary .pp-t b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-l { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 800; color: #a06d00; }
.pp-empty { font-weight: 700; font-size: 14px; color: var(--link); }
svg.star { width: 14px; height: 14px; fill: currentColor; flex: none; }
.btn svg.star { width: 16px; height: 16px; }
.pf-ggrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.pf-gt { position: relative; display: grid; justify-items: center; align-content: start; gap: 8px; padding: 34px 14px 16px; text-align: center; color: var(--ink); transition: transform .12s, border-color .12s; }
.pf-gt:hover { text-decoration: none; transform: translateY(-2px); border-color: var(--blue-200); }
.pf-gt .glogo { width: 64px; height: 64px; border-radius: 18px; }
.pf-gt b { font-size: 16px; line-height: 1.25; overflow-wrap: anywhere; }
.pf-gt.is-primary { border-color: #ffd86b; box-shadow: 0 0 0 1.5px #ffd86b, var(--shadow); }
.prim-badge { position: absolute; top: 8px; right: 8px; display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 800; color: #8a5f00; background: #fff4d1; border-radius: 99px; padding: 2px 8px; }
@media (max-width: 600px) {
  .pf-ggrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .privacy { grid-template-columns: minmax(0, 1fr); }
  .mrow { grid-template-columns: 40px minmax(0, 1fr); } .mrow .av { width: 40px; height: 40px; } .mrow-a { grid-column: 1 / -1; justify-content: flex-start; }
  .rrow { grid-template-columns: 14px minmax(0, 1fr); } .rrow .mrow-a { grid-column: 2; }
  .g-hero .in { gap: 14px; } .glogo.xl { width: 76px; height: 76px; border-radius: 18px; }
  .nav a { padding: 4px 6px; }
}

/* ---------- dark mode (toggled from the user menu; saved per account) ---------- */
:root[data-theme=dark] {
  color-scheme: dark;
  --bg: #0b1220; --card: #121b2f; --ink: #e6ecfa; --muted: #9eabc8; --line: #243251;
  --blue-50: #16213a; --blue-100: #1d2b4b; --blue-200: #34508a;
  --link: #86aaff; --deep: #c9d8ff; --top: rgba(11,18,32,.9); --quote: #b9c6e4; --gold-soft: #241f10; --gold-line: #5a4a1a;
  --shadow: 0 1px 2px rgba(0,0,0,.35), 0 8px 24px rgba(0,0,0,.3);
}
:root[data-theme=dark] .btn { background: #2f6bff; }
:root[data-theme=dark] .btn:hover { background: #4579ff; }
:root[data-theme=dark] .btn.ghost { background: var(--blue-50); box-shadow: inset 0 0 0 1.5px var(--blue-100); }
:root[data-theme=dark] .btn.danger { background: transparent; color: #ff7a8e; box-shadow: inset 0 0 0 1.5px #6b2633; }
:root[data-theme=dark] .btn.gold { background: var(--coin); }
:root[data-theme=dark] .btn.white { background: #fff; }
:root[data-theme=dark] .btn.ghost-w { background: rgba(255,255,255,.14); }
:root[data-theme=dark] .chip.on, :root[data-theme=dark] .adm-nav a.on, :root[data-theme=dark] .iconpick button.on, :root[data-theme=dark] .adm-admin, :root[data-theme=dark] .badge { background: #2f6bff; }
:root[data-theme=dark] .toggle span { background: #34405c; }
:root[data-theme=dark] .toggle input:checked + span { background: #2f6bff; }
:root[data-theme=dark] .coins { background: #2a2410; color: #ffd76a; box-shadow: inset 0 0 0 1.5px #5a4a1a; }
:root[data-theme=dark] .notice { background: #1b2438; color: #c3cde3; }
:root[data-theme=dark] .notice.warn { background: #3a1a22; color: #ffb3c0; }
:root[data-theme=dark] .ver-warn { background: #2a2410; color: #ffd76a; border-color: #5a4a1a; }
:root[data-theme=dark] .on-pill, :root[data-theme=dark] .own { background: #12342a; color: #5fe0a8; }
:root[data-theme=dark] .off-pill, :root[data-theme=dark] .pill.lock { background: #222c42; color: #a9b5cf; }
:root[data-theme=dark] .adm-ban { background: #3a1a22; color: #ff8a9c; }
:root[data-theme=dark] .adm-mute, :root[data-theme=dark] .pill.pin, :root[data-theme=dark] .shout-pill, :root[data-theme=dark] .prim-badge { background: #33290c; color: #ffd76a; }
:root[data-theme=dark] .pp-l { color: #ffd76a; }
:root[data-theme=dark] .t-common { background: linear-gradient(160deg, #1a2440, #223053); }
:root[data-theme=dark] .t-rare { background: linear-gradient(160deg, #13304a, #1b4467); }
:root[data-theme=dark] .t-epic { background: linear-gradient(160deg, #2a1f4d, #3a2a6b); }
:root[data-theme=dark] .t-legendary { background: linear-gradient(160deg, #3a2f10, #574515); }
:root[data-theme=dark] .c-common { color: #9eabc8; } :root[data-theme=dark] .c-rare { color: #6cb8ff; } :root[data-theme=dark] .c-epic { color: #b79bff; } :root[data-theme=dark] .c-legendary { color: #ffcf4d; }
:root[data-theme=dark] .danger-zone { border-color: #6b2633; }
:root[data-theme=dark] .pf-gt.is-primary { border-color: #8a6d1c; box-shadow: 0 0 0 1.5px #8a6d1c, var(--shadow); }
:root[data-theme=dark] .rcodes code { border-color: var(--blue-200); }
:root[data-theme=dark] .site-banner .sb-x { background: rgba(0,0,0,.2); }
:root[data-theme=dark] .modal { background: rgba(2,6,16,.7); }
:root[data-theme=dark] .qrbox { background: #fff; }
:root[data-theme=dark] .gi img, :root[data-theme=dark] .mini-item img, :root[data-theme=dark] .gear button img { background: var(--blue-100); }
:root[data-theme=dark] hr { border-color: var(--line); }

/* ---------- user menu: dark toggle ---------- */
.menu-dark { justify-content: space-between; flex-direction: row-reverse; gap: 12px; padding: 4px 12px; min-height: 44px; font-weight: 700; }
.menu-pop hr { border: 0; border-top: 1px solid var(--line); margin: 4px 6px; }

/* ---------- avatar backdrop picker ---------- */
.bg-pick { display: flex; gap: 16px; align-items: center; margin-top: 16px; }
.bg-big { width: 104px; height: 104px; border-radius: 50%; box-shadow: var(--shadow); flex: none; }
.bg-pick .hint { margin: 0; }
.bg-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.bg-opt { display: grid; justify-items: center; gap: 6px; padding: 8px 4px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--card); color: var(--ink); font-size: 12.5px; font-weight: 700; cursor: pointer; }
.bg-opt img { width: 100%; max-width: 64px; aspect-ratio: 1; border-radius: 50%; }
.bg-opt.on { border-color: var(--blue); box-shadow: 0 0 0 2px var(--blue); }

/* ---------- profile backgrounds ---------- */
.pf-banner { position: relative; overflow: hidden; height: 190px; background: linear-gradient(160deg, #2f6bff, #0a2a7a); }
.pf-banner-in { position: relative; max-width: 1240px; margin: 0 auto; padding: 16px max(3vw, 16px); display: flex; justify-content: flex-end; }
.pf-wrap { padding-top: 0; }
.pf > aside { margin-top: -130px; position: relative; z-index: 2; }
.pf > section { padding-top: 28px; }
.pat-prev { position: relative; overflow: hidden; height: 90px; border-radius: 14px; margin: 12px 0 16px; }
.pat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.pat, .sch { display: grid; gap: 6px; justify-items: center; padding: 6px 6px 8px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); font-size: 12.5px; font-weight: 700; cursor: pointer; }
.pat-sw { position: relative; overflow: hidden; display: block; width: 100%; height: 44px; border-radius: 8px; }
.sch-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.sch i { display: block; width: 100%; height: 30px; border-radius: 8px; }
.pat.on, .sch.on { border-color: var(--blue); box-shadow: 0 0 0 2px var(--blue); }
.modal .box:has(.pat-grid) { width: min(100%, 560px); }
@media (max-width: 980px) { .pf > aside { margin-top: -120px; } .pf > section { padding-top: 0; } }
@media (max-width: 600px) { .pf-banner { height: 150px; } .bg-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; } .bg-opt span { font-size: 11px; } .sch-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- avatar studio (v2) ---------- */
.studio { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.studio-stage { position: sticky; top: calc(var(--hdr) + 24px); }
.stage.bd-light .over, .stage.bd-light .tip { color: #0d1b3d; }
.stage.bd-light .tip { opacity: .7; }
.stage-sm.bd-light, .look.bd-light { color: #0d1b3d; }
.studio-stage .tip { left: auto; right: 16px; text-align: right; }
.zoomtg { position: absolute; left: 14px; bottom: 12px; display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: rgba(7,29,87,.35); backdrop-filter: blur(6px); }
.zoomtg button { border: 0; background: none; color: #fff; font-weight: 800; font-size: 13px; padding: 6px 10px; border-radius: 9px; cursor: pointer; min-height: 32px; }
.zoomtg button.on { background: #fff; color: #0d1b3d; }
.studio-panel { padding: 20px; display: flex; flex-direction: column; }
.sp-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.sp-head h1 { font-size: 30px; }
.catnav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 16px 0 6px; }
.catbtn { display: flex; align-items: center; gap: 10px; text-align: left; padding: 10px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--card); color: var(--ink); cursor: pointer; min-height: 60px; transition: border-color .12s, background .12s; }
.catbtn:hover { border-color: var(--blue-200); }
.catbtn.on { border-color: var(--blue); background: var(--blue-50); box-shadow: 0 0 0 1.5px var(--blue); }
.cat-i { width: 38px; height: 38px; border-radius: 11px; background: var(--blue-50); color: var(--link); display: grid; place-items: center; flex: none; }
.catbtn.on .cat-i { background: var(--blue); color: #fff; }
:root[data-theme=dark] .catbtn.on .cat-i { background: #2f6bff; }
.cat-i svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cat-t { display: grid; gap: 1px; min-width: 0; } .cat-t b { font-size: 15px; }
.cat-s { display: flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cdot { width: 12px; height: 12px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px rgba(0,0,0,.15); flex: none; }
.catbody { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 16px; scroll-margin-top: calc(var(--hdr) + 16px); }
@media (max-width: 980px) { .catbody { scroll-margin-top: calc(var(--hdr) + 8px + 34vh); } }
.catbody h2 { font-size: 22px; } .catbody > .hint { margin: 4px 0 0; }
.catsteps { display: flex; gap: 8px; margin-top: 18px; }
.studio-save { position: sticky; bottom: 0; background: var(--card); margin: 18px -20px -20px; padding: 14px 20px; border-top: 1px solid var(--line); border-radius: 0 0 var(--r) var(--r); z-index: 3; }
@media (max-width: 980px) {
  .stage.studio-stage { position: sticky; top: var(--hdr); z-index: 4; height: 34vh; min-height: 220px; border-radius: 0 0 22px 22px; margin: -28px calc(-1 * max(3vw, 16px)) 0; }
  .catnav { display: flex; overflow-x: auto; margin: 12px -20px 6px; padding: 2px 20px 6px; scroll-snap-type: x proximity; }
  .catbtn { flex: none; min-height: 52px; scroll-snap-align: start; }
}
@media (max-width: 760px) { .studio-save { bottom: 72px; margin-bottom: -20px; padding: 10px 20px; } .studio-save .btn { min-height: 40px; } .studio-save #shareBtn { display: none; } .sp-head h1 { font-size: 24px; } .studio-panel { padding: 16px 20px 20px; } .studio-stage .tip { display: none; } }

/* ---------- blog ---------- */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.blog-card { display: flex; flex-direction: column; overflow: hidden; color: var(--ink); transition: transform .12s, border-color .12s; }
a.blog-card:hover { text-decoration: none; transform: translateY(-2px); border-color: var(--blue-200); }
.bc-img { width: 100%; aspect-ratio: 1200 / 630; object-fit: cover; display: block; }
.bc-fallback { position: relative; overflow: hidden; background: linear-gradient(160deg, var(--blue-2), var(--blue-d)); display: grid; place-items: center; color: #fff; }
.bc-fallback svg:not(.poly) { position: relative; width: 44px; height: 44px; fill: none; stroke: currentColor; stroke-width: 1.8; opacity: .9; }
.bc-t { padding: 14px 16px 16px; display: grid; gap: 4px; }
.bc-t b { font-size: 18px; line-height: 1.25; font-family: var(--head); font-weight: 600; }
.bc-t p { margin: 2px 0 0; color: var(--muted); font-size: 15px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.home-blog { margin-bottom: 26px; }
.home-blog .blog-grid.home { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bp-hero { position: relative; overflow: hidden; min-height: 280px; display: flex; align-items: flex-end; background: linear-gradient(160deg, var(--blue-2), var(--blue-d)); color: #fff; }
.bp-hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bp-hero > img + .in::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7,29,87,0), rgba(7,29,87,.75)); z-index: -1; }
.bp-hero .in { position: relative; z-index: 1; width: 100%; max-width: 860px; margin: 0 auto; padding: 40px max(3vw, 16px) 28px; }
.bp-hero h1 { color: #fff; font-size: clamp(30px, 4.5vw, 46px); } .bp-hero p { color: #e1e9ff; margin: 8px 0 0; }
.crumb-w { color: #fff; font-weight: 800; } .crumb-w:hover { color: #fff; }
.bp-body { margin-top: -20px; position: relative; z-index: 2; font-size: 17px; }
.bp-body .rich { font-size: 17.5px; line-height: 1.7; } .rich h3 { font-size: 22px; margin: 22px 0 8px; }
.lede { font-size: 19px; color: var(--muted); margin: 0 0 16px; }
.blog-edit { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.blog-card.prev { pointer-events: none; }
.bl-thumb { width: 96px; flex: none; } .bl-thumb .bc-img { border-radius: 10px; }
/* ---------- reports ---------- */
.rep svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.act.rep { margin-left: auto; color: var(--muted); } .act.del + .act.rep { margin-left: 0; }
.btn.rep svg { width: 16px; height: 16px; }
.reasons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.reasons .pv { padding: 10px 12px; } .reasons .pv b { font-size: 14px; font-weight: 700; }
.modal .box:has(.reasons) { width: min(100%, 520px); }
.rp-row { display: flex; gap: 14px; align-items: flex-start; padding: 14px 18px; color: var(--ink); }
.rp-row + .rp-row { border-top: 1px solid var(--line); }
.rp-row:hover { background: var(--blue-50); text-decoration: none; }
.rp-n { min-width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-family: var(--head); font-weight: 600; background: var(--blue-50); color: var(--link); flex: none; }
.rp-n.hot { background: #fde4e8; color: var(--red); }
.rp-main { flex: 1; min-width: 0; } .rp-main p { margin: 4px 0; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rp-content { margin: 12px 0; padding: 14px; background: var(--blue-50); border-radius: 12px; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 360px; overflow: auto; }
.rp-rep { padding: 8px 0; border-top: 1px solid var(--line); } .rp-rep:first-of-type { border-top: 0; } .rp-rep p { margin: 4px 0 0; overflow-wrap: anywhere; }
.punish { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; } .punish .pv { padding: 10px 8px; justify-content: flex-start; gap: 6px; min-width: 0; } .punish .pv b { font-size: 14px; }
.nbadge { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; background: var(--red); color: #fff; font-size: 12px; font-weight: 800; margin-left: 4px; }
.warn-list { display: grid; gap: 8px; margin: 12px 0; } .warn-list .notice { margin: 0; display: block; }
.np-card { margin-top: 30px; }
/* ---------- admin: items ---------- */
.it-card { display: grid; gap: 6px; padding: 10px; color: var(--ink); align-content: start; }
.it-card:hover { text-decoration: none; border-color: var(--blue-200); }
.it-card .ithumb { border-radius: 12px; aspect-ratio: 1; display: grid; place-items: center; } .it-card .ithumb img { width: 92%; height: 92%; }
.it-meta { display: flex; justify-content: space-between; align-items: center; gap: 6px; flex-wrap: wrap; } .it-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.it-prev { position: sticky; top: calc(var(--hdr) + 24px); } .it-prev .stage { height: 380px; min-height: 0; border-radius: 16px; }
.it-thumb { width: 92px; height: 92px; border-radius: 14px; display: grid; place-items: center; flex: none; } .it-thumb img { width: 100%; height: 100%; }
.base-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); gap: 6px; }
.base-grid button { aspect-ratio: 1; border: 1.5px solid var(--line); border-radius: 10px; background: var(--blue-50); padding: 3px; cursor: pointer; }
.base-grid button img { width: 100%; height: 100%; object-fit: contain; }
.base-grid button.on { border-color: var(--blue); box-shadow: 0 0 0 2px var(--blue); background: var(--card); }
.sw-none { display: grid; place-items: center; font-weight: 800; color: var(--muted); background: var(--card); }
/* ---------- admin: lists ---------- */
.wordlist { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; max-height: 260px; overflow: auto; }
.wchip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 4px 4px 10px; border-radius: 99px; background: var(--blue-50); font-weight: 700; font-size: 14px; }
.wchip em { font-style: normal; font-size: 11px; color: var(--muted); }
.wchip button { width: 24px; height: 24px; border-radius: 50%; border: 0; background: transparent; color: var(--muted); font-size: 16px; cursor: pointer; }
.wchip button:hover { background: var(--card); color: var(--red); }
/* ---------- admin: economy charts (palette validated light + dark) ---------- */
.viz-root { --series-1: #2a78d6; --series-2: #eb6834; }
:root[data-theme=dark] .viz-root { --series-1: #3987e5; --series-2: #d95926; }
.ch-fig { position: relative; height: 260px; margin-top: 10px; }
.ch-fig > svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ch-grid { stroke: var(--line); stroke-width: 1; } .ch-ax { fill: var(--muted); font-size: 12px; }
.ch-line { fill: none; stroke: var(--series-1); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.ch-dot { fill: var(--series-1); stroke: var(--card); stroke-width: 2; }
.ch-in { fill: var(--series-1); } .ch-out { fill: var(--series-2); }
.ch-cross { stroke: var(--muted); stroke-width: 1; }
.ch-tip { position: absolute; pointer-events: none; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; box-shadow: var(--shadow); display: grid; gap: 2px; font-size: 13px; min-width: 120px; z-index: 2; }
.k-in, .k-out { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.k-in { background: var(--series-1); } .k-out { background: var(--series-2); }
.legend { display: flex; gap: 14px; font-size: 14px; color: var(--muted); font-weight: 700; }
.ch-table { margin-top: 12px; } .ch-table summary { cursor: pointer; font-weight: 800; color: var(--link); } .ch-table .utable { margin-top: 8px; }
.eco-t td, .eco-t th { padding: 8px 10px; } .eco-t tbody tr { cursor: default; }
.hbars { display: grid; gap: 10px; margin-top: 10px; }
.hb { display: grid; grid-template-columns: 140px minmax(0, 1fr) 70px; gap: 10px; align-items: center; font-size: 14px; }
.hb b { text-align: right; font-variant-numeric: tabular-nums; }
.hb-track { height: 14px; background: var(--blue-50); border-radius: 4px; overflow: hidden; }
.hb-track i { display: block; height: 100%; border-radius: 0 4px 4px 0; }
.hb-track i.k-in, .hb-track i.k-out { width: auto; margin: 0; }
.eco-set { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 16px; }
.tile b { font-variant-numeric: tabular-nums; }
.eco .tiles { grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); }
.eco .tile b { font-size: clamp(22px, 2.1vw, 27px); overflow-wrap: anywhere; }
@media (max-width: 980px) { .blog-edit { grid-template-columns: minmax(0, 1fr); } .home-blog .blog-grid.home { grid-template-columns: repeat(3, minmax(240px, 1fr)); overflow-x: auto; } .it-prev { position: static; } }
@media (max-width: 600px) { .reasons, .punish { grid-template-columns: repeat(2, minmax(0, 1fr)); } .eco-set { grid-template-columns: minmax(0, 1fr); } .hb { grid-template-columns: 110px minmax(0, 1fr) 56px; } .ch-fig { height: 220px; } .rp-row { flex-wrap: wrap; } }

@media (max-width: 980px) {
  .cols, .studio, .pf { grid-template-columns: minmax(0, 1fr); }
  .sticky { position: static; }
  .tryon { order: -1; }
  .tryon .stage { height: 280px; }
  .side-extra { display: none; }
  .g-aside { order: -1; } .g-aside .roles-card { display: none; }
}
@media (max-width: 760px) {
  .auth { grid-template-columns: minmax(0, 1fr); }
  .show { min-height: 420px; padding: 24px; }
  .show canvas { min-height: 260px; }
  .top { backdrop-filter: none; background: var(--bg); }
  .nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--card); border-top: 1px solid var(--line); justify-content: space-around; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); }
  .nav a { flex-direction: column; gap: 2px; height: 52px; font-size: 12px; padding: 4px 10px; min-width: 0; }
  .wrap { padding-bottom: 96px; }
  .me-btn #meName { display: none; } .me-btn { padding: 0 4px; }
  .logo span { font-size: 22px; }
  .top-in { gap: 12px; }
  :root { --hdr: 106px; }
  .subnav-in { height: 40px; justify-content: space-around; }
  .subnav a { padding: 0 14px; }
  .stage { height: 56vh; }
  .bal { margin-left: 0; }
  .filters .input { width: 100%; }
  .perks { grid-template-columns: minmax(0, 1fr); }
  #toasts { bottom: 90px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
/* economy tables are small: keep them as real tables on phones */
@media (max-width: 760px) {
  .utable.eco-t thead { display: table-header-group; } .utable.eco-t tr { display: table-row; padding: 0; }
  .utable.eco-t td { display: table-cell; padding: 8px; border-top: 1px solid var(--line); }
  .utable.eco-t td::before { content: none; } .utable.eco-t .num { text-align: right; } .utable.eco-t th { padding: 8px; }
}
/* ---------- admin: item builder ---------- */
#itToBuilder { color: var(--link); } #itToBuilder:hover { color: var(--link); }
.choose { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.choice { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 16px; align-items: start; color: var(--ink); }
.choice:hover { text-decoration: none; border-color: var(--blue-200); transform: translateY(-2px); }
.choice .ithumb { border-radius: 16px; aspect-ratio: 1; display: grid; place-items: center; } .choice .ithumb img { width: 100%; }
.choice b { font-family: var(--head); font-size: 20px; font-weight: 600; } .choice p { margin: 6px 0 12px; color: var(--muted); }
.bd { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 20px; align-items: start; }
.bd-prev { position: sticky; top: calc(var(--hdr) + 20px); padding: 12px; }
.bd-stage { height: min(calc(100vh - 260px), 560px); min-height: 320px; border-radius: 16px; }
.bd-stage .tip { bottom: 60px; }
.bd-views { position: absolute; left: 10px; right: 10px; bottom: 10px; display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: rgba(7,29,87,.35); backdrop-filter: blur(6px); flex-wrap: wrap; justify-content: center; }
.bd-views button { border: 0; background: transparent; color: #fff; font: inherit; font-weight: 800; font-size: 13px; padding: 7px 10px; border-radius: 9px; cursor: pointer; }
.bd-views button:hover { background: rgba(255,255,255,.16); }
.bd-views button.on { background: #fff; color: #0d1b3d; }
.bd-hist { position: absolute; top: 10px; right: 10px; display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: rgba(7,29,87,.35); backdrop-filter: blur(6px); }
.bd-hist button { border: 0; background: transparent; color: #fff; font: inherit; font-weight: 800; font-size: 13px; padding: 6px 10px; border-radius: 9px; cursor: pointer; }
.bd-hist button:hover:not(:disabled) { background: rgba(255,255,255,.16); } .bd-hist button:disabled { opacity: .45; cursor: default; }
.bd-danger { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
:root[data-theme=dark] .bd-dot { box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.35); }
#bdZoom { margin-left: auto; }
.bd-sum { display: flex; align-items: center; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.bd-sum-t { display: grid; gap: 2px; min-width: 0; } .bd-sum-t b { overflow-wrap: anywhere; }
.bd-side { display: grid; gap: 16px; min-width: 0; }
.bd-add { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 6px; }
.bd-add button { display: grid; justify-items: center; gap: 2px; padding: 6px 4px 8px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--blue-50); color: var(--ink); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; line-height: 1.15; text-align: center; }
.bd-add button:hover:not(:disabled) { border-color: var(--blue); background: var(--card); }
.bd-add button:disabled { opacity: .45; cursor: not-allowed; }
.bd-add img { width: 44px; height: 44px; object-fit: contain; }
.bd-list { display: grid; gap: 4px; margin-top: 14px; max-height: 300px; overflow: auto; padding: 2px; }
.bd-row { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border: 1.5px solid transparent; border-radius: 12px; background: var(--blue-50); color: var(--ink); font: inherit; cursor: pointer; text-align: left; }
.bd-row:hover { border-color: var(--blue-200); }
.bd-row.on { border-color: var(--blue); background: var(--card); box-shadow: 0 0 0 1px var(--blue); }
.bd-row img { width: 30px; height: 30px; object-fit: contain; flex: none; }
.bd-dot { width: 18px; height: 18px; border-radius: 6px; flex: none; box-shadow: inset 0 0 0 1.5px rgba(0,0,0,.15); }
.bd-rn { font-weight: 800; white-space: nowrap; }
.bd-tags { display: flex; gap: 4px; flex-wrap: wrap; margin-left: auto; justify-content: flex-end; } .bd-tags .pill { font-size: 11px; }
.bd-empty { padding: 14px; text-align: center; background: var(--blue-50); border-radius: 12px; }
.bd-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; margin-top: 12px; }
.bd-sw { gap: 6px; } .bd-sw .sw { width: 32px; height: 32px; border-radius: 9px; border-width: 2px; }
.bd-axes { border: 0; padding: 0; margin: 0 0 12px; }
.bd-axes legend { font-weight: 800; font-size: 14px; margin-bottom: 4px; display: flex; gap: 14px; align-items: center; width: 100%; }
.bd-lock { font-weight: 700; font-size: 13px; color: var(--muted); margin-left: auto; }
.bd-ax { display: grid; grid-template-columns: 104px minmax(0, 1fr) 84px; gap: 10px; align-items: center; padding: 2px 0; }
.bd-ax label { font-size: 13px; color: var(--muted); font-weight: 700; }
.bd-ax input[type=range] { width: 100%; accent-color: var(--blue); }
.bd-ax .input { padding: 6px 8px; font-variant-numeric: tabular-nums; }
.bd-flags { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.bd-delbtn { color: var(--red); }
.bd-slots { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.bd-slots button { display: grid; gap: 2px; padding: 8px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.bd-slots button span { font-size: 11px; color: var(--muted); line-height: 1.25; }
.bd-slots button.on { border-color: var(--blue); background: var(--blue-50); box-shadow: 0 0 0 1px var(--blue); }
.bd-tc { display: inline-flex; gap: 8px; align-items: center; font-weight: 700; }
.bd-tc input { width: 44px; height: 32px; border: 1.5px solid var(--line); border-radius: 8px; padding: 2px; background: var(--card); }
.bd-save { position: sticky; bottom: 0; z-index: 4; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 12px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 -6px 18px rgba(7,29,87,.08); }
@media (max-width: 1100px) { .bd-slots { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 980px) {
  .bd { grid-template-columns: minmax(0, 1fr); }
  .bd-prev { top: 58px; z-index: 6; padding: 8px; box-shadow: var(--shadow); }
  .bd-stage { height: 34vh; min-height: 220px; }
  .bd-stage .tip { display: none; }
  .bd-sum { display: none; }
  .bd-stage { height: 27vh; min-height: 190px; }
  .bd-side :is(button, input, select, .bd-row, fieldset) { scroll-margin-top: calc(27vh + var(--hdr) + 36px); scroll-margin-bottom: 100px; }
  .choose { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) { .bd-save { position: static; box-shadow: none; } }
@media (max-width: 600px) {
  .bd-ax { grid-template-columns: 78px minmax(0, 1fr) 70px; gap: 8px; }
  .bd-two { grid-template-columns: minmax(0, 1fr); }
  .bd-slots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bd-views button { padding: 6px 8px; }
  .choice { grid-template-columns: 72px minmax(0, 1fr); }
}
/* ---------- market v2: item types and item pages ---------- */
.mk-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); margin-top: 4px; }
a.item:hover { text-decoration: none; }
.item .tile { position: relative; }
.item .tile .pill { position: absolute; left: 8px; top: 8px; font-size: 11px; }
.own-tag { position: absolute; right: 8px; top: 8px; }
.item .pt { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; } .item .pt .hint { font-size: 12px; }
.ty-col { background: #efe7ff; color: #6d3fe0; } .ty-lim { background: #fff1d6; color: #9a6400; }
:root[data-theme=dark] .ty-col { background: #2a1f4d; color: #c4b2ff; } :root[data-theme=dark] .ty-lim { background: #3a2a0c; color: #ffd27a; }
.ip { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.ip-stage-card { padding: 10px; } .ip-stage { height: min(62vh, 560px); min-height: 340px; border-radius: 16px; }
.ip-info h1 { font-size: clamp(28px, 3.4vw, 38px); margin: 10px 0 6px; overflow-wrap: anywhere; }
.ip-badges { display: flex; gap: 6px; flex-wrap: wrap; } .ip-badges .pill { text-transform: capitalize; }
.ip-desc { color: var(--muted); font-size: 17px; margin: 0 0 12px; }
.ip-creator { display: flex; gap: 10px; align-items: center; padding: 10px 0 14px; border-bottom: 1px solid var(--line); font-weight: 700; }
.ip-buy { padding-top: 16px; display: grid; gap: 10px; }
.ip-price { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; font-size: 26px; font-weight: 800; font-family: var(--head); } .ip-price .hint { font-size: 14px; font-family: var(--body); font-weight: 600; }
.ip-meter { height: 8px; background: var(--blue-50); border-radius: 99px; overflow: hidden; } .ip-meter i { display: block; height: 100%; background: var(--blue); border-radius: 99px; }
.ip-note { margin: 0; font-weight: 700; }
.ip-c { text-align: center; margin: 0; }
.ip-own { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; padding: 10px 12px; background: var(--blue-50); border-radius: 12px; font-weight: 700; }
.ip-info > .ip-c:last-child { margin-top: 14px; }
.ip-tiles { margin-top: 20px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.ip-trade { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 20px; margin-top: 20px; align-items: start; }
.ls-list { display: grid; margin-top: 8px; max-height: 460px; overflow: auto; }
.ls-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); } .ls-row:first-child { border-top: 0; }
.ls-who { display: grid; flex: 1; min-width: 0; } .ls-who a { font-weight: 800; overflow-wrap: anywhere; }
.ls-price { font-weight: 800; white-space: nowrap; }
.my-copies { display: grid; gap: 6px; margin: 10px 0 14px; }
.mc-row { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--blue-50); border-radius: 12px; flex-wrap: wrap; } .mc-row > span { flex: 1; }
.sell-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 12px; }
.ch-dot { stroke: var(--card); stroke-width: 2; }
@media (max-width: 980px) { .ip, .ip-trade { grid-template-columns: minmax(0, 1fr); } .ip-stage { height: 46vh; min-height: 280px; } }
@media (max-width: 600px) { .sell-form { grid-template-columns: minmax(0, 1fr); } .ls-row { flex-wrap: wrap; } .ls-who { flex-basis: calc(100% - 60px); } .ls-price { margin-left: 52px; } }
.rel { margin-top: 6px; padding-top: 14px; border-top: 1px solid var(--line); }
.rel-types { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rel-type { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 4px 0 0; font-weight: 700; }
.rel-limit { display: flex; gap: 12px; align-items: center; margin-top: 10px; flex-wrap: wrap; } .rel-limit > div { flex: 1; min-width: 220px; }
#relStatus .chip:disabled { opacity: .45; cursor: not-allowed; }
@media (max-width: 600px) { .rel-types { grid-template-columns: minmax(0, 1fr); } }
.ip-stage .tip { bottom: 58px; }
@media (max-width: 600px) { .ip-stage .tip { display: none; } .filters #mkType, .filters #mkSort { flex: 1 1 140px; } .filters #mkSearch { flex: 1 1 100%; order: -1; } }

/* ---------- profile inventory ---------- */
.pf-inv { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.pf-inv .item { padding: 8px; border-radius: 16px; }
.pf-inv .item .nm { font-size: 14.5px; margin-top: 8px; overflow-wrap: anywhere; }
.pf-inv .item .ft { font-size: 12.5px; flex-wrap: wrap; }
.pf-inv .cp { font-size: 12px; font-weight: 800; color: var(--muted); white-space: nowrap; }
.pf-inv-more { margin-top: 12px; }
@media (max-width: 600px) { .pf-inv { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }

/* ---------- 0.13: shared bits ---------- */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sec-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 12px; }
.sec-h h2 { margin: 0; font-size: 24px; } .sec-h p.hint { margin: 2px 0 0; } .sec-h .count { font-weight: 800; color: var(--muted); }
.odot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 2px var(--card); }
.odot.inline { margin-right: 5px; vertical-align: 0; box-shadow: none; }
s.was { color: var(--muted); font-size: .85em; font-weight: 700; margin-right: 4px; }

.warn-pill { background: #fff1d6; color: #8a5a00; } :root[data-theme=dark] .warn-pill { background: #3a2a0c; color: #ffd27a; }

/* big search box inside page heroes */
.hero-l { flex: 1 1 420px; min-width: 0; }
.hero-search { position: relative; margin-top: 16px; max-width: 560px; }
.hero-search svg { position: absolute; left: 16px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%); fill: none; stroke: var(--muted); stroke-width: 2.2; stroke-linecap: round; pointer-events: none; }
.hero-search .input { width: 100%; min-height: 52px; padding-left: 46px; padding-right: 44px; border-radius: 14px; font-size: 16.5px; border-color: transparent; box-shadow: 0 6px 20px rgba(5, 20, 70, .25); }
.kbd-hint { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font: 700 12px var(--body, inherit); color: var(--muted); border: 1.5px solid var(--line); border-radius: 6px; padding: 1px 7px; pointer-events: none; }
.hero-search .input:focus + .kbd-hint, .hero-search .input:not(:placeholder-shown) + .kbd-hint { display: none; }
.mk-disc { color: #ffd86b; white-space: nowrap; }

/* market shelves */
.shelf { margin-bottom: 30px; }
.shelf-row { display: grid; grid-auto-flow: column; grid-auto-columns: 176px; gap: 14px; overflow-x: auto; padding: 4px 2px 12px; scroll-snap-type: x proximity; overscroll-behavior-x: contain; }
.shelf-row .item { scroll-snap-align: start; }
/* narrow cards, or a struck-through member price: put rarity and price on their own lines */
.shelf-row .item .ft, .item .ft:has(.was) { flex-direction: column; align-items: flex-start; gap: 3px; }
.mk-all { scroll-margin-top: calc(var(--hdr) + 16px); padding-top: 6px; border-top: 1px solid var(--line); }
.mk-all .sec-h { margin-top: 22px; }

/* users page */
.us-sec { margin-bottom: 32px; }
.us-online { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.us-chip { display: inline-flex; align-items: center; gap: 9px; padding: 5px 14px 5px 5px; border-radius: 99px; background: var(--card); border: 1.5px solid var(--line); color: var(--ink); font-weight: 800; }
.us-chip:hover { border-color: var(--blue-200); text-decoration: none; }
.us-av { position: relative; flex: none; display: inline-block; }
.us-av img { width: 38px; height: 38px; border-radius: 50%; display: block; background: var(--blue-50); }
.us-av .odot { position: absolute; right: -1px; bottom: -1px; }
.us-more { padding: 0 6px; }
.lb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.lb { padding: 16px 18px 10px; }
.lb-h h3 { margin: 0; font-size: 18px; } .lb-h .hint { font-size: 13px; }
.lb-list { list-style: none; margin: 10px 0 0; padding: 0; }
.lb-list li { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); min-width: 0; }
.lb-list li:first-child { border-top: 0; }
.lb-rank { width: 26px; height: 26px; flex: none; display: grid; place-items: center; border-radius: 50%; font-weight: 800; font-size: 13px; color: var(--muted); background: var(--blue-50); }
.lb-list .top1 .lb-rank { background: #ffd86b; color: #5a3f00; } .lb-list .top2 .lb-rank { background: #dfe5ef; color: #3b4660; } .lb-list .top3 .lb-rank { background: #f3c9a3; color: #6b3b12; }
.lb-list .av.sm { width: 30px; height: 30px; }
.lb-n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 800; }
.lb-n a { color: var(--ink); }
.lb-v { flex: none; font-weight: 800; white-space: nowrap; }
.us-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.us-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; color: var(--ink); }
.us-card:hover { text-decoration: none; border-color: var(--blue-200); }
.us-card .us-av img { width: 48px; height: 48px; }
.us-t { display: flex; flex-direction: column; min-width: 0; } .us-t b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .us-t .hint { font-size: 13px; }
:root[data-theme=dark] .lb-list .top2 .lb-rank { background: #3b4660; color: #e6ebf5; } :root[data-theme=dark] .lb-list .top3 .lb-rank { background: #5b3518; color: #f3c9a3; }

/* upgrades */
.upg-hero { background: linear-gradient(160deg, #1a5cff, #0a2a7a 70%, #3a2d08 140%); }
.upg-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 24px; align-items: start; margin-top: 4px; }
.upg-price { margin-top: 6px; display: flex; align-items: baseline; gap: 8px; } .upg-price b { font-family: var(--head); font-size: 34px; } .upg-price span { color: var(--muted); font-weight: 700; }
.mem-status { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; padding: 12px 16px; border-radius: 14px; background: #fff4d1; color: #5a3f00; }
.mem-status.t-silver { background: #eef1f6; color: #2b3442; } .mem-status.t-bronze { background: #f8e6d6; color: #4a2508; }
:root[data-theme=dark] .mem-status { background: #3a2d08; color: #ffe39a; } :root[data-theme=dark] .mem-status.t-silver { background: #252e40; color: #dfe5ef; } :root[data-theme=dark] .mem-status.t-bronze { background: #3a2412; color: #f3c9a3; }
.mem-status .tb { position: static; transform: none; flex: none; }
.mperks { list-style: none; padding: 0; margin: 18px 0 20px; display: grid; gap: 14px; }
.mperks li { display: flex; gap: 12px; align-items: flex-start; } .mperks li > span:last-child { display: flex; flex-direction: column; } .mperks .hint { font-size: 14px; }
.pk-i { flex: none; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--blue-50); color: var(--link); }
.pk-i svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.upg-coins h2 { margin: 0; font-size: 24px; }
.pack-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.pack { position: relative; padding: 22px 16px 16px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; }
.pack-c { display: flex; align-items: center; gap: 8px; font-family: var(--head); font-size: 30px; } .pack-c .coin { width: 26px; height: 26px; }
.pack .btn { margin-top: 12px; }
.pack-tag { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); background: #ffd86b; color: #4a3500; white-space: nowrap; }
.pur-list { margin-top: 8px; }
.pur-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.pur-row:first-child { border-top: 0; }
.pur-n { flex: 1 1 220px; display: flex; flex-direction: column; } .pur-a { font-weight: 800; }
.steps-ol { margin: 8px 0 12px; padding-left: 22px; display: grid; gap: 6px; }
code { overflow-wrap: anywhere; }
/* floating Upgrades button, bottom left: a plain blue pill */
.upg-fab { position: fixed; left: 18px; bottom: 18px; z-index: 25; display: inline-flex; align-items: center; height: 40px; padding: 0 18px; border-radius: 99px;
  background: var(--blue); color: #fff; font-weight: 800; font-size: 14.5px; letter-spacing: .01em; box-shadow: 0 4px 14px rgba(26, 92, 255, .35); transition: transform .12s, box-shadow .12s, background .12s; }
.upg-fab:hover { text-decoration: none; background: #0f4ae6; transform: translateY(-1px); box-shadow: 0 8px 20px rgba(26, 92, 255, .4); }
.upg-fab:focus-visible { outline: 3px solid rgba(26, 92, 255, .45); outline-offset: 3px; }
.upg-fab[hidden] { display: none; }
/* admin: coin pack editor */
.pk-row { display: grid; grid-template-columns: 130px 110px minmax(0, 1fr) auto auto; gap: 10px; align-items: end; padding: 10px 0; border-top: 1px solid var(--line); }
.pk-f { display: flex; flex-direction: column; gap: 4px; font-weight: 800; font-size: 13px; } .pk-f .input { min-height: 40px; }
.pk-on { margin-bottom: 8px; }
/* profile: member banner image over the pattern */
.pf-img { position: absolute; inset: 0; background-size: cover; background-position: center; }
.own-banner { padding: 12px 14px; border-radius: 12px; background: var(--blue-50); }


@media (max-width: 980px) { .upg-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) {
  .upg-fab { bottom: calc(80px + env(safe-area-inset-bottom)); left: 12px; height: 36px; padding: 0 14px; font-size: 13.5px; }
  body[data-route=avatar] .upg-fab, body[data-route=admin] .upg-fab, body[data-route=item] .upg-fab { display: none; }
  .shelf-row { grid-auto-columns: 150px; gap: 10px; }
  .hero-search .input { min-height: 48px; } .kbd-hint { display: none; }
  .pk-row { grid-template-columns: 1fr 1fr; } .pk-row .pk-f:nth-child(3) { grid-column: 1 / -1; }
  .lb-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) { .us-grid { grid-template-columns: minmax(0, 1fr); } .nav a { padding: 4px 4px; } }

/* ---------- 0.14: membership tiers ---------- */
/* Bronze / Silver / Gold badge across the bottom of a player picture */
.avw { position: relative; display: inline-flex; flex: none; vertical-align: middle; height: max-content; align-self: start; } /* never stretched by a grid or flex row */
.lb-list .avw, .ls-row .avw, .ucell .avw, .cat-last .avw, .latest .avw, .t-last .avw, .ip-creator .avw, .row > .avw { align-self: center; }
.tb { position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%); z-index: 1; display: inline-flex; align-items: center; justify-content: center;
  padding: 3px 7px 2px; border-radius: 99px; font: 800 9.5px/1 var(--body, system-ui, sans-serif); letter-spacing: .05em; text-transform: uppercase; white-space: nowrap;
  box-shadow: 0 0 0 2px var(--card), 0 1px 3px rgba(0, 0, 0, .25); pointer-events: auto; }
.tb.t-gold { background: linear-gradient(180deg, #ffe9a3, #f2b705 55%, #d79a00); color: #4a3300; }
.tb.t-silver { background: linear-gradient(180deg, #ffffff, #c9d1dc 55%, #a7b1bf); color: #2b3442; }
.tb.t-bronze { background: linear-gradient(180deg, #f6c79a, #c9783a 55%, #a35c27); color: #fff; text-shadow: 0 1px 0 rgba(80, 35, 5, .5); }
.tb.sm { width: 15px; height: 15px; padding: 0; bottom: -3px; font-size: 8.5px; letter-spacing: 0; box-shadow: 0 0 0 1.5px var(--card), 0 1px 2px rgba(0, 0, 0, .25); }
.tb.big { position: static; transform: none; padding: 5px 12px 4px; font-size: 11.5px; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }
.fp-author .avw { margin-bottom: 8px; } .fp-author .avw .av { margin: 0; }
.us-av .tb { bottom: -5px; } .us-av .tb.sm { bottom: -3px; }
.me-avw { margin-right: 2px; } .me-avw #meTier .tb { bottom: -3px; }
.tb.pf-tb { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 2; font-size: 12.5px; padding: 6px 14px 5px; }
.stage:has(.pf-tb) .tip { bottom: 50px; }
.mem-pill.t-gold { background: #fff1c2; color: #6b4a00; } .mem-pill.t-silver { background: #eef1f6; color: #3b4660; } .mem-pill.t-bronze { background: #f8e6d6; color: #7a3e12; }
:root[data-theme=dark] .mem-pill.t-gold { background: #3a2d08; color: #ffd86b; } :root[data-theme=dark] .mem-pill.t-silver { background: #252e40; color: #dfe5ef; } :root[data-theme=dark] .mem-pill.t-bronze { background: #3a2412; color: #f3c9a3; }
/* Upgrades: tier cards */
.upg-sec { margin-bottom: 30px; }
.tier-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; align-items: stretch; }
.tier-card { position: relative; display: flex; flex-direction: column; padding: 0 22px 22px; overflow: hidden; border-width: 2px; }
.tier-card::before { content: ''; display: block; height: 8px; margin: 0 -22px 18px; }
.tier-card.t-bronze::before { background: linear-gradient(90deg, #f6c79a, #a35c27); } .tier-card.t-silver::before { background: linear-gradient(90deg, #ffffff, #a7b1bf); } .tier-card.t-gold::before { background: linear-gradient(90deg, #ffe9a3, #d79a00); }
.tier-card.current { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(26, 92, 255, .15), var(--shadow); }
.tier-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tier-card h3 { margin: 12px 0 0; font-size: 22px; }
.tier-card .mperks { margin: 16px 0 18px; flex: 1; gap: 11px; }
.mperks li.off { color: var(--muted); } .mperks li.off .pk-i { background: transparent; color: var(--muted); border: 1.5px dashed var(--line); }
.btn.tier-btn.t-gold, :root[data-theme=dark] .btn.tier-btn.t-gold { background: linear-gradient(180deg, #ffd860, #f2b705); color: #4a3300; box-shadow: 0 3px 0 #b88a00; }
.btn.tier-btn.t-silver, :root[data-theme=dark] .btn.tier-btn.t-silver { background: linear-gradient(180deg, #f4f6f9, #c4ccd8); color: #222b3a; box-shadow: 0 3px 0 #8f99a8; }
.btn.tier-btn.t-bronze, :root[data-theme=dark] .btn.tier-btn.t-bronze { background: linear-gradient(180deg, #e7a46a, #b8692f); color: #fff; box-shadow: 0 3px 0 #7d4318; }
.tier-note { margin: 8px 0 0; text-align: center; font-size: 13px; }
.upg-coins .pack-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
/* admin: tier editor */
.tier-edit { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 10px; }
.te { border: 1.5px solid var(--line); border-radius: 14px; padding: 14px 14px 6px; margin: 0; min-width: 0; }
.te legend { padding: 0 6px; } .te legend .tb { position: static; transform: none; font-size: 11px; padding: 5px 11px 4px; }
.te .toggle { margin: 4px 0 12px; }
.cur-f { margin: 0; display: flex; flex-direction: row; align-items: center; gap: 8px; } .cur-f .input { width: auto; min-height: 38px; }
@media (max-width: 900px) { .tier-edit { grid-template-columns: minmax(0, 1fr); } }

/* ---------- 0.15 ---------- */
/* sub-nav badge and the avatar-menu dot */
.subnav a { position: relative; }
.subnav .nbadge { margin-left: 2px; }
.me-btn.has-dot { position: relative; } .me-btn.has-dot::after { content: ''; position: absolute; top: 4px; right: 6px; width: 10px; height: 10px; border-radius: 50%; background: #e0245e; box-shadow: 0 0 0 2px var(--card); }
.staff-pill { background: color-mix(in srgb, var(--rc, #5b6478) 16%, transparent); color: var(--rc, #5b6478); }
:root[data-theme=dark] .staff-pill { background: color-mix(in srgb, var(--rc, #9aa6bd) 26%, transparent); color: color-mix(in srgb, var(--rc, #9aa6bd) 55%, #fff); }
/* market shelves: arrows instead of a scrollbar, fading edges, cards easing in */
.shelf-wrap { position: relative; }
.shelf-row { scrollbar-width: none; scroll-behavior: smooth; } .shelf-row::-webkit-scrollbar { display: none; }
.shelf-wrap::before, .shelf-wrap::after { content: ''; position: absolute; top: 0; bottom: 12px; width: 56px; z-index: 2; pointer-events: none; opacity: 0; transition: opacity .2s; }
.shelf-wrap::before { left: 0; background: linear-gradient(90deg, var(--bg), transparent); } .shelf-wrap::after { right: 0; background: linear-gradient(270deg, var(--bg), transparent); }
.shelf-wrap.fade-l::before, .shelf-wrap.fade-r::after { opacity: 1; }
.shelf-arrow { position: absolute; top: calc(50% - 6px); z-index: 3; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--card); color: var(--ink);
  display: grid; place-items: center; cursor: pointer; box-shadow: 0 6px 18px rgba(10, 30, 90, .18); transition: transform .15s, background .15s, color .15s; }
.shelf-arrow:hover { background: var(--blue); color: #fff; border-color: var(--blue); transform: translateY(-50%) scale(1.06); }
.shelf-arrow svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.shelf-arrow.prev { left: -14px; } .shelf-arrow.next { right: -14px; } .shelf-arrow[hidden] { display: none; }
.shelf-row .rise { opacity: 0; transform: translateY(14px) scale(.97); transition: opacity .45s ease var(--d, 0ms), transform .45s cubic-bezier(.2, .8, .2, 1) var(--d, 0ms), border-color .12s, box-shadow .12s; }
.shelf-row .rise.in { opacity: 1; transform: none; } .shelf-row .rise.in:hover { transform: translateY(-3px); }
@media (prefers-reduced-motion: reduce) { .shelf-row .rise { opacity: 1; transform: none; } }
@media (max-width: 760px) { .shelf-arrow { width: 36px; height: 36px; } .shelf-arrow.prev { left: -6px; } .shelf-arrow.next { right: -6px; } }
/* Home: best friends + status, blog in the sidebar */
.bf-card h3 { margin: 0; }
.bf-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.bf { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 14px; background: var(--blue-50); color: var(--ink); min-width: 0; }
.bf:hover { text-decoration: none; box-shadow: 0 0 0 2px var(--blue-200) inset; }
.bf .us-av img { width: 46px; height: 46px; }
.bf-t { display: flex; flex-direction: column; min-width: 0; gap: 1px; } .bf-t b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bf-on { font-size: 12.5px; font-weight: 800; color: var(--muted); } .bf-on.on { color: #16a34a; }
.bf-status { font-size: 13.5px; color: var(--ink); overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; } .bf-status.none { color: var(--muted); font-style: italic; }
.bf-empty { margin: 10px 0 0; }
.my-status { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); } .my-status .row { margin-top: 4px; flex-wrap: nowrap; } .my-status .input { min-height: 40px; flex: 1; width: auto; }
.blog-mini { display: grid; gap: 10px; margin-top: 10px; }
.bm { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 10px; align-items: center; color: var(--ink); }
.bm:hover { text-decoration: none; } .bm:hover b { color: var(--link); }
.bm .bc-img { width: 76px; height: 50px; border-radius: 10px; object-fit: cover; aspect-ratio: auto; position: relative; overflow: hidden; }
.bm .bc-fallback svg:not(.poly) { width: 22px; height: 22px; }
.bm > span { display: flex; flex-direction: column; min-width: 0; } .bm b { font-size: 14.5px; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; } .bm .hint { font-size: 12.5px; }
@media (max-width: 760px) { .bf-list { grid-template-columns: minmax(0, 1fr); } .bf { align-items: center; } }
/* forum: posting guide */
.post-guide h4 { margin: 14px 0 6px; font-size: 14px; }
.pg-steps { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 4px; font-size: 14.5px; }
.fmt-help { width: 100%; border-collapse: collapse; font-size: 14px; }
.fmt-help th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 0 0 4px; }
.fmt-help td { padding: 6px 0; border-top: 1px solid var(--line); vertical-align: middle; } .fmt-help td:first-child { padding-right: 10px; white-space: nowrap; }
.fmt-help code { background: var(--blue-50); padding: 2px 6px; border-radius: 6px; font-size: 13px; }
.fh-q { border-left: 3px solid var(--blue-200); padding-left: 8px; color: var(--muted); } .fh-l { color: var(--link); text-decoration: underline; }
.fmt-more { margin-top: 6px; } .fmt-more summary { cursor: pointer; font-weight: 800; font-size: 14px; color: var(--link); } .fmt-more .fmt-help { margin-top: 8px; max-width: 420px; }
/* friends */
.pf-status { margin: 10px 0 0; padding: 8px 12px; border-radius: 12px; background: var(--blue-50); font-weight: 700; overflow-wrap: anywhere; }
.fr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.fr-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; color: var(--ink); } .fr-card:hover { text-decoration: none; border-color: var(--blue-200); }
.fr-card .us-av img, .fr-row .us-av img { width: 46px; height: 46px; }
.fr-t { display: flex; flex-direction: column; min-width: 0; } .fr-t b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .fr-t .hint { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bf-pill { align-self: flex-start; background: #fff4d1; color: #8a5f00; font-size: 11px; margin: 2px 0; } :root[data-theme=dark] .bf-pill { background: #3a2d08; color: #ffd86b; }
.fr-list { display: grid; gap: 10px; }
.fr-row { display: flex; align-items: center; gap: 10px; padding: 10px 14px; flex-wrap: wrap; }
.fr-who { display: flex; align-items: center; gap: 12px; color: var(--ink); min-width: 0; flex: 1 1 220px; } .fr-who:hover { text-decoration: none; } .fr-who:hover b { color: var(--link); }
.fb-on { color: #16a34a; }
.gtabs .count { color: var(--muted); font-weight: 700; margin-left: 2px; }
.hs-btn { position: absolute; right: 7px; top: 50%; transform: translateY(-50%); }
#addF .input { padding-right: 140px; }
/* support */
.sp-cols { grid-template-columns: minmax(0, 1fr) 360px; }
.sp-list { display: grid; margin-top: 8px; }
.sp-item { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); color: var(--ink); } .sp-item:first-child { border-top: 0; }
.sp-item:hover { text-decoration: none; } .sp-item > span:first-child { flex: 1; display: flex; flex-direction: column; min-width: 0; } .sp-item.unread b { color: var(--link); }
.msgs { display: grid; gap: 12px; margin: 18px 0; }
.msg { max-width: 86%; padding: 12px 14px; border-radius: 16px; background: var(--blue-50); }
.msg.me { justify-self: end; background: var(--blue); color: #fff; } .msg.me .hint { color: #d7e3ff; } .msg.me .staff-pill { background: rgba(255, 255, 255, .2); color: #fff; }
.msg-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13.5px; margin-bottom: 4px; } .msg-b { white-space: pre-wrap; overflow-wrap: anywhere; }
.sp-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); color: var(--ink); } .sp-row:first-child { border-top: 0; }
.sp-row:hover { text-decoration: none; background: var(--blue-50); } .sp-main { flex: 1; display: flex; flex-direction: column; min-width: 0; } .sp-row.unread .sp-main b { color: var(--link); }
.sp-detail { grid-template-columns: minmax(0, 1fr) 300px; align-items: start; }
@media (max-width: 980px) { .sp-cols, .sp-detail { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 600px) { .sp-row { flex-wrap: wrap; } .msg { max-width: 100%; } }
/* admin: staff roles */
.roles-list { display: grid; gap: 12px; }
.role-card { padding: 14px 18px; } .role-card summary { display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none; flex-wrap: wrap; } .role-card summary::-webkit-details-marker { display: none; }
.role-dot { width: 14px; height: 14px; border-radius: 50%; flex: none; }
.role-form { margin-top: 14px; }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin: 14px 0; }
.perm-g { border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 14px; margin: 0; } .perm-g legend { font-weight: 800; padding: 0 6px; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.perm-g .check { margin: 6px 0; }
.color-in { width: 64px; padding: 4px; min-height: 44px; }
/* five links in the sub bar: text only on narrow phones */
@media (max-width: 600px) {
  .subnav-in { justify-content: space-between; padding: 0 10px; gap: 0; }
  .subnav a { padding: 0 8px; font-size: 14px; gap: 0; } .subnav a svg { display: none; }
}
.perm-g .check input, .check input[type=checkbox] { flex: none; }

/* ---------- Play: the lobby ---------- */
.play-hero { position: relative; overflow: hidden; border-radius: 24px; background: linear-gradient(135deg, #1a5cff, #0a2a7a); color: #fff; padding: 32px; margin-top: 24px;
  display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-end; justify-content: space-between; }
.play-hero .poly { position: absolute; inset: 0; width: 100%; height: 100%; }
.play-hero-t, .play-stats { position: relative; }
.play-hero-t p { max-width: 540px; opacity: .92; font-size: 17px; margin: 8px 0 0; }
.play-stats { display: grid; grid-template-columns: repeat(4, auto); gap: 10px; margin: 0; }
.play-stats div { background: rgba(255,255,255,.14); border-radius: 14px; padding: 10px 14px; }
.play-stats dt { font-size: 13px; font-weight: 700; opacity: .88; }
.play-stats dd { margin: 0; font-family: var(--head); font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; }
.play-lobby > .notice { margin-top: 16px; }
.play-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 20px; }
.play-card { overflow: hidden; display: flex; flex-direction: column; padding: 0; }
.play-card > .pad { display: flex; flex-direction: column; flex: 1; }
.play-card > .pad > .row:last-child { margin-top: auto !important; padding-top: 14px; }
.play-prev { position: relative; height: 250px; }
.play-prev canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.play-live { position: absolute; left: 14px; top: 14px; display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: 99px; background: rgba(10,22,52,.62); color: #fff; font-weight: 800; font-size: 13.5px; }
.play-live.on::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,.3); }
.play-card h2 { font-size: 26px; }
.play-card p.muted { margin: 6px 0 0; }
.play-card .btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.btn.disabled { opacity: .5; pointer-events: none; }
.play-rules { margin: 12px 0 0; padding-left: 18px; display: grid; gap: 4px; font-size: 15px; }
.play-friends { display: flex; align-items: center; gap: 6px; margin-top: 12px; flex-wrap: wrap; }
.play-friends .hint { margin-right: 4px; }
.play-face img { width: 34px; height: 34px; border-radius: 10px; }
.play-rooms { display: grid; gap: 6px; margin-top: 12px; }
.play-room { display: flex; gap: 10px; align-items: center; padding: 8px 12px; border-radius: 12px; background: var(--blue-50); color: var(--ink); }
.play-room:hover { text-decoration: none; background: var(--blue-100); }
.play-room > span:first-of-type { color: var(--muted); font-weight: 700; font-size: 14px; margin-right: auto; }
.play-how { margin-top: 20px; }
.play-how .pl-keys { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); margin-top: 12px; }
.play-how .hint { margin: 12px 0 0; }
.bf-row { position: relative; display: grid; }
.bf-row > .bf { height: 100%; }
.play-join { position: absolute; right: 10px; top: 10px; min-height: 30px !important; padding: 0 12px !important; font-size: 13px !important; }
.fr-cell { position: relative; display: grid; }
.fr-cell .play-join { top: 50%; transform: translateY(-50%); }
.fr-cell .play-join:active { transform: translateY(calc(-50% + 2px)); }
.pc-head { display: flex; gap: 14px; align-items: center; }
.pc-head .avw img { width: 76px; height: 76px; border-radius: 18px; }
.pc-head h2 { margin-bottom: 6px; }
.pc-head .pill { margin-right: 6px; }
.pc-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.pc-mod { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.pc-mod label { font-weight: 800; font-size: 13px; color: var(--muted); }
.pc-mod .row { gap: 8px; margin-top: 6px; flex-wrap: wrap; }
@media (max-width: 860px) {
  .play-grid { grid-template-columns: minmax(0, 1fr); }
  .play-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .play-hero { padding: 24px; }
}

/* ---------- Play: the game ---------- */
.play-stage { position: fixed; left: 0; right: 0; bottom: 0; top: var(--game-top, 64px); z-index: 5; }
body[data-game] .subnav, body[data-game] #siteBanner { display: none !important; }
body[data-game] { overflow: hidden; }
.pl { position: absolute; inset: 0; overflow: hidden; background: linear-gradient(180deg, var(--sky1) 0%, var(--sky2) 60%); color: #fff; font-size: 15px;
  user-select: none; -webkit-user-select: none; touch-action: none; -webkit-tap-highlight-color: transparent; }
.pl-cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; outline: none; cursor: grab; }
.pl-cv:active { cursor: grabbing; }
.pl-arena.armed .pl-cv, .pl-arena.armed .pl-cv:active { cursor: crosshair; }
.pl kbd { font: 800 11px/1 'Nunito', system-ui, sans-serif; padding: 3px 5px; border-radius: 5px; background: rgba(255,255,255,.22); }
.pl-tags { position: absolute; inset: 0; pointer-events: none; }
.pl-tag { position: absolute; left: 0; top: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; transform-origin: 0 0; will-change: transform; }
.pl-name { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 99px; background: rgba(10,22,52,.62); font-weight: 800; font-size: 13px; white-space: nowrap; }
.pl-tag.me .pl-name { display: none; }
.pl-tag.fr .pl-name { box-shadow: 0 0 0 2px #ffd84d; }
.pl-tier { width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center; font-size: 10px; font-weight: 900; }
.pl-tier.t-gold { background: linear-gradient(#ffe27a, #f2b300); color: #3b2a00; }
.pl-tier.t-silver { background: linear-gradient(#f4f6fa, #b9c2d3); color: #2a3550; }
.pl-tier.t-bronze { background: linear-gradient(#f3c39a, #c27b45); color: #3d1f08; }
.pl-staff { font-size: 10.5px; padding: 0 6px; border-radius: 99px; background: var(--rc); color: #fff; }
.pl-bub { max-width: 230px; padding: 7px 11px; border-radius: 14px; background: #fff; color: #0d1b3d; font-weight: 700; font-size: 14px; line-height: 1.3; text-align: center;
  box-shadow: 0 4px 14px rgba(5,20,70,.25); position: relative; overflow-wrap: anywhere; animation: plIn .2s ease-out; }
.pl-bub::after { content: ''; position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%); border: 6px solid transparent; border-top-color: #fff; border-bottom: 0; }
.pl-thp { width: 54px; height: 5px; border-radius: 3px; background: rgba(10,22,52,.55); overflow: hidden; }
.pl-thp i { display: block; height: 100%; background: #22c55e; }
.pl-top { position: absolute; left: 12px; right: 12px; top: 12px; display: flex; gap: 8px; align-items: center; pointer-events: none; }
.pl-top > * { pointer-events: auto; }
.pl-room { display: flex; flex-direction: column; padding: 5px 14px; border-radius: 14px; background: rgba(10,22,52,.58); backdrop-filter: blur(6px); line-height: 1.25; }
.pl-rname { font-family: var(--head); font-size: 18px; font-weight: 600; white-space: nowrap; }
.pl-count { font-size: 12.5px; opacity: .85; font-weight: 700; }
.pl-conn { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 800; padding: 5px 10px; border-radius: 99px; background: rgba(10,22,52,.58); white-space: nowrap; }
.pl-conn::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #9aa6c0; }
.pl-conn.live::before { background: #22c55e; } .pl-conn.live.poll::before { background: #f5b301; } .pl-conn.off::before { background: #ff4d61; }
.pl-sp { flex: 1; }
.pl-btn { height: 38px; padding: 0 14px; border-radius: 12px; border: 0; background: rgba(10,22,52,.58); color: #fff; font-weight: 800; cursor: pointer; backdrop-filter: blur(6px);
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.pl-btn:hover { background: rgba(10,22,52,.78); }
.pl-btn:focus-visible { outline: 3px solid #fff; }
.pl-leave { background: #fff; color: var(--blue); } .pl-leave:hover { background: #e9f0ff; }
.pl-status { position: absolute; top: 66px; left: 50%; transform: translateX(-50%); padding: 6px 16px; border-radius: 99px; background: rgba(10,22,52,.62); font-family: var(--head); font-size: 17px;
  font-weight: 600; white-space: nowrap; pointer-events: none; font-variant-numeric: tabular-nums; }
.pl-feed { position: absolute; right: 12px; top: 64px; display: grid; gap: 6px; justify-items: end; pointer-events: none; }
.pl-kill { padding: 5px 12px; border-radius: 10px; background: rgba(10,22,52,.62); font-size: 14px; animation: plIn .2s ease-out; }
.pl-kill.me { background: rgba(26,92,255,.88); }
.pl-center { position: absolute; left: 50%; top: 36%; transform: translate(-50%, -50%); padding: 12px 22px; border-radius: 16px; background: rgba(10,22,52,.62); font-family: var(--head);
  font-size: 24px; font-weight: 600; text-align: center; pointer-events: none; white-space: nowrap; }
.pl-center.pop { animation: plPop .35s ease-out; }
.pl-center.ko { background: rgba(214,40,64,.88); }
.pl-chat { position: absolute; left: 12px; bottom: 12px; width: min(380px, calc(100% - 24px)); display: flex; flex-direction: column; gap: 6px; }
.pl-log { max-height: 200px; overflow-y: auto; display: flex; flex-direction: column; gap: 3px; padding-top: 14px; scrollbar-width: none;
  -webkit-mask-image: linear-gradient(transparent, #000 16px); mask-image: linear-gradient(transparent, #000 16px); }
.pl-log::-webkit-scrollbar { display: none; }
.pl-line { padding: 3px 10px; border-radius: 10px; background: rgba(10,22,52,.52); font-size: 14px; line-height: 1.35; align-self: flex-start; max-width: 100%; overflow-wrap: anywhere; transition: opacity .6s; }
.pl-line b { color: #bcd2ff; } .pl-line b.me { color: #ffd84d; }
.pl-line.sys { font-style: italic; background: rgba(10,22,52,.4); } .pl-line.dim { opacity: .8; }
/* the chat stays up for 20 seconds after the last message, then fades out until someone chats again */
.pl-log .pl-line { transition: opacity 1.2s; }
.pl-log.idle .pl-line { opacity: 0; }
.pl.chatting .pl-log.idle .pl-line, .pl-chat:hover .pl-log.idle .pl-line { opacity: 1; transition-duration: .2s; }
.pl-say input { width: 100%; height: 42px; border-radius: 12px; border: 2px solid rgba(255,255,255,.55); background: rgba(10,22,52,.75); color: #fff; padding: 0 12px; font-weight: 700; outline: none; }
.pl-say input::placeholder { color: rgba(255,255,255,.7); }
.pl-say input:focus { border-color: #fff; }
.pl-chatbtn { align-self: flex-start; }
.pl.chatting .pl-chatbtn { display: none; }
.pl-emotes { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; }
.pl-hp { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-radius: 14px; background: rgba(10,22,52,.62); }
.pl-hpbar { width: 220px; height: 12px; border-radius: 6px; background: rgba(255,255,255,.2); overflow: hidden; }
.pl-hpbar i { display: block; height: 100%; background: #22c55e; transition: width .15s; }
.pl-hpbar i.mid { background: #f5b301; } .pl-hpbar i.low { background: #ff4d61; }
.pl-hp b { font-family: var(--head); font-size: 20px; font-weight: 600; min-width: 36px; text-align: right; font-variant-numeric: tabular-nums; }
.pl-cross { position: absolute; left: 50%; top: 50%; width: 26px; height: 26px; margin: -13px; pointer-events: none; opacity: 0; transition: opacity .15s; }
.pl-cross::before, .pl-cross::after { content: ''; position: absolute; left: 50%; top: 0; width: 3px; height: 100%; margin-left: -1.5px; background: #fff; border-radius: 2px; transform: rotate(45deg); box-shadow: 0 0 4px rgba(0,0,0,.5); }
.pl-cross::after { transform: rotate(-45deg); }
.pl-cross.hit { opacity: 1; }
/* shift lock: a ring in the middle of the screen shows where you're aiming or clicking */
.pl-aim { position: absolute; left: 50%; top: 50%; width: 20px; height: 20px; margin: -10px; border-radius: 50%; border: 2.5px solid #fff; pointer-events: none; opacity: 0; transition: opacity .15s;
  box-shadow: 0 0 0 1.5px rgba(10,22,52,.45), inset 0 0 0 1.5px rgba(10,22,52,.45); }
.pl-aim::after { content: ''; position: absolute; left: 50%; top: 50%; width: 4px; height: 4px; margin: -2px; border-radius: 50%; background: #fff; }
.pl.locked .pl-aim, .pl.touch.locking .pl-aim { opacity: .95; }
.pl-lockhint { position: absolute; left: 50%; top: calc(50% + 30px); transform: translateX(-50%); padding: 6px 14px; border-radius: 99px; background: rgba(10,22,52,.72); font-weight: 800; font-size: 13.5px; pointer-events: none; white-space: nowrap; }
.pl-lockbtn svg { flex: none; }
.pl-lockbtn.on { background: rgba(26,92,255,.92); box-shadow: inset 0 0 0 2px #fff; }
.pl-lockbtn.on:hover { background: rgba(26,92,255,1); }
/* battles: the blaster slot (press 1) */
.pl-hotbar { position: absolute; bottom: 72px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; }
.pl-slot { position: relative; width: 78px; height: 62px; border-radius: 14px; border: 3px solid rgba(255,255,255,.3); background: rgba(10,22,52,.58); color: rgba(255,255,255,.85); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; font-weight: 800; font-size: 12px; backdrop-filter: blur(6px); padding: 6px 0 2px; }
.pl-slot kbd { position: absolute; left: 4px; top: 4px; padding: 2px 4px; font-size: 10px; }
.pl-slot:hover { background: rgba(10,22,52,.78); }
.pl-slot.on { border-color: #fff; color: #fff; background: rgba(26,92,255,.88); box-shadow: 0 0 0 3px rgba(26,92,255,.3); }
.pl-slot:focus-visible { outline: 3px solid #ffd84d; outline-offset: 2px; }
.pl-arena:not(.armed) .pl-fire { display: none; }
.pl-hurt { position: absolute; inset: 0; pointer-events: none; opacity: 0; background: radial-gradient(ellipse at center, transparent 50%, rgba(230,57,80,.7) 100%); }
.pl-panel { position: absolute; right: 12px; top: 60px; width: min(340px, calc(100% - 24px)); max-height: calc(100% - 140px); overflow: auto; padding: 14px 16px; border-radius: 16px;
  background: var(--card); color: var(--ink); box-shadow: 0 10px 30px rgba(5,20,70,.3); user-select: text; -webkit-user-select: text; }
.pl-ph { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.pl-ph h2 { font-size: 20px; }
.pl-x { border: 0; background: none; font-size: 26px; line-height: 1; cursor: pointer; color: var(--muted); padding: 0 4px; }
.pl-keys { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pl-keys li { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-weight: 700; }
.pl-keys li span { color: var(--muted); }
.pl-keys kbd, .play-how kbd { font: 800 12px/1 'Nunito', system-ui, sans-serif; padding: 4px 6px; border-radius: 6px; background: var(--blue-50); color: var(--ink); border: 1px solid var(--line); margin-right: 2px; }
.pl-note { font-size: 14px; color: var(--muted); margin: 10px 0 0; }
.pl-people { display: grid; gap: 2px; }
.pl-person { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border: 0; border-radius: 12px; background: none; cursor: pointer; text-align: left; color: inherit; font-weight: 700; }
.pl-person:hover { background: var(--blue-50); }
.pl-person img { width: 38px; height: 38px; border-radius: 10px; }
.pl-you { margin-left: auto; font-size: 12px; font-weight: 800; color: var(--muted); } .pl-you.fr { color: #8a5f00; }
.pl-score { width: 100%; border-collapse: collapse; margin-top: 8px; font-variant-numeric: tabular-nums; font-size: 14.5px; }
.pl-score th { text-align: left; font-size: 12.5px; color: var(--muted); padding: 4px 6px; }
.pl-score td { padding: 6px; border-top: 1px solid var(--line); }
.pl-score tr.me td { background: var(--blue-50); font-weight: 800; }
.pl-over { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(7,18,45,.45); backdrop-filter: blur(3px); padding: 16px; }
.pl-box { width: min(440px, 100%); background: var(--card); color: var(--ink); border-radius: 20px; padding: 24px; text-align: center; box-shadow: 0 20px 50px rgba(5,20,70,.35); user-select: text; -webkit-user-select: text; }
.pl-box p { color: var(--muted); margin: 8px 0 0; }
.pl-box .row { justify-content: center; margin-top: 16px; gap: 10px; }
.pl-spin { width: 34px; height: 34px; border-radius: 50%; border: 4px solid var(--blue-100); border-top-color: var(--blue); margin: 0 auto 12px; animation: plSpin .8s linear infinite; }
.pl-pod { list-style: none; padding: 0; margin: 16px 0 6px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; align-items: end; }
.pl-pod li { display: grid; gap: 2px; padding: 10px 6px; border-radius: 14px; background: var(--blue-50); }
.pl-pod li.p1 { order: 2; background: #fff4d1; color: #4a3500; padding-top: 22px; } .pl-pod li.p2 { order: 1; } .pl-pod li.p3 { order: 3; }
.pl-pod b { font-family: var(--head); font-size: 20px; font-weight: 600; }
.pl-pod span { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-pod em { font-style: normal; font-size: 13px; color: var(--muted); }
.pl-pod li.p1 em { color: #7a5a00; }
.pl-coins { font-family: var(--head); font-size: 22px; color: #8a5f00 !important; display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; }
:root[data-theme=dark] .pl-coins { color: #ffd76a !important; }
:root[data-theme=dark] .pl-pod li.p1 { background: #3a2d08; color: #ffe6a0; }
.pl-touch { position: absolute; left: 0; right: 0; bottom: 0; height: 0; }
.pl-stick { position: absolute; left: 20px; bottom: 24px; width: 124px; height: 124px; border-radius: 50%; background: rgba(10,22,52,.35); border: 2px solid rgba(255,255,255,.45); touch-action: none; }
.pl-stick i { position: absolute; left: 50%; top: 50%; width: 54px; height: 54px; margin: -27px; border-radius: 50%; background: rgba(255,255,255,.88); pointer-events: none; }
.pl-tbtns { position: absolute; right: 18px; bottom: 24px; display: flex; gap: 12px; align-items: flex-end; }
.pl-jump, .pl-fire { width: 76px; height: 76px; border-radius: 50%; border: 0; font-weight: 900; color: #fff; background: rgba(26,92,255,.88); box-shadow: 0 4px 0 rgba(10,42,122,.85); touch-action: none; }
.pl-fire { width: 92px; height: 92px; background: rgba(230,57,80,.92); box-shadow: 0 4px 0 rgba(140,20,40,.85); }
.pl-jump:active, .pl-fire:active { transform: translateY(2px); box-shadow: none; }
.pl.touch .pl-chat { bottom: 168px; width: min(320px, calc(100% - 24px)); }
.pl.touch .pl-log { max-height: 130px; }
.pl.touch .pl-emotes { bottom: auto; top: 62px; }
.pl.touch .pl-hp { bottom: auto; top: 62px; }
.pl.touch .pl-status { top: 112px; }
.pl.touch .pl-feed { top: 112px; }
.pl.touch .pl-hotbar { left: auto; right: 18px; transform: none; bottom: 132px; }
.pl.touch .pl-slot kbd { display: none; }
@keyframes plIn { from { opacity: 0; transform: translateY(6px); } }
@keyframes plPop { from { opacity: 0; transform: translate(-50%, -50%) scale(.8); } }
@keyframes plSpin { to { transform: rotate(360deg); } }
@media (max-width: 760px) {
  body[data-game] .nav { display: none; }
  .pl-btn { height: 34px; padding: 0 10px; font-size: 14px; }
  .pl-btn kbd { display: none; }
  .pl-conn { font-size: 0; padding: 7px; gap: 0; }
  .pl-room { padding: 4px 10px; } .pl-rname { font-size: 15px; } .pl-count { font-size: 11.5px; }
  .pl-hpbar { width: 140px; }
  .pl-emotes .pl-btn { padding: 0 9px; }
  .pl-center { font-size: 19px; white-space: normal; width: max-content; max-width: calc(100% - 32px); }
  .pl-status { font-size: 15px; }
}
@media (max-width: 560px) { .pl-lockbtn span { display: none; } }
@media (max-width: 420px) { .pl-top [data-act=help] { display: none; } }
.fr-play { color: var(--green); font-weight: 800; }

/* ---------- Play: games made by players ---------- */
.games-sec { margin-top: 34px; }
.games-head { align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.games-head p { margin: 4px 0 0; }
.games-head .btn svg, .gp-acts .btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.games-tools { margin: 16px 0 14px; gap: 12px; flex-wrap: wrap; }
.games-q { width: min(280px, 100%); }
.games-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.games-empty { grid-column: 1 / -1; padding: 30px; text-align: center; }
.games-empty .btn { margin-top: 10px; }
.gc { padding: 0; overflow: hidden; display: flex; flex-direction: column; color: var(--ink); transition: transform .12s, box-shadow .12s; }
a.gc:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 10px 28px rgba(13,27,61,.12); }
.gc-img { position: relative; display: block; aspect-ratio: 16 / 9; background: var(--blue-50); overflow: hidden; }
.gc-img > img { width: 100%; height: 100%; object-fit: cover; }
.gc-blank { position: absolute; inset: 0; background: linear-gradient(135deg, #1a5cff, #0a2a7a); }
.gc-blank .poly { width: 100%; height: 100%; }
.gc-mode { position: absolute; left: 10px; top: 10px; font-size: 12px; }
.pill.gc-mode { background: rgba(255,255,255,.92); color: #0d1b3d; }
.game-page .pill.gc-mode { position: static; background: var(--blue-50); color: var(--link); }
.gc-live { position: absolute; right: 10px; top: 10px; display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; background: rgba(10,22,52,.65); color: #fff; font-size: 12.5px; font-weight: 800; }
.gc-live::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #22c55e; }
.gc-t { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px 14px; }
.gc-t > b { font-family: var(--head); font-weight: 600; font-size: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gc-by { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); font-weight: 700; }
.gc-by img { width: 22px; height: 22px; border-radius: 7px; }
.gc-stats { display: flex; gap: 12px; font-size: 13px; color: var(--muted); font-weight: 700; flex-wrap: wrap; }
.gc-acts { gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.gs-pill { align-self: flex-start; font-size: 12px; }
.gs-pill.ok { background: #dcfce7; color: #166534; } .gs-pill.warn { background: #fff4d1; color: #8a5f00; } .gs-pill.bad { background: #fde4e8; color: #8c1d30; }
:root[data-theme=dark] .gs-pill.ok { background: #12351f; color: #86efac; } :root[data-theme=dark] .gs-pill.warn { background: #3a2d08; color: #ffd86b; } :root[data-theme=dark] .gs-pill.bad { background: #3b1620; color: #ff9aab; }
.studio-hero { align-items: center; }
.studio-home .games-grid { margin-top: 14px; }
.tpl-pick { display: grid; gap: 8px; }
.tpl-pick small { display: block; color: var(--muted); font-weight: 700; }
.game-page { padding-top: 22px; }
.back-link { font-weight: 800; }
.gp { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 28px; margin-top: 14px; align-items: start; }
.gp-media { padding: 0; overflow: hidden; aspect-ratio: 16 / 9; position: relative; }
.gp-media > img { width: 100%; height: 100%; object-fit: cover; }
.gp-info { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.gp-info h1 { font-size: clamp(28px, 3.4vw, 40px); }
.gp-by { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); }
.gp-by:hover { text-decoration: none; } .gp-by:hover b { color: var(--link); }
.gp-stats { display: grid; grid-template-columns: repeat(4, auto); gap: 10px; margin: 4px 0; }
.gp-stats div { background: var(--blue-50); border-radius: 12px; padding: 8px 12px; }
.gp-stats dt { font-size: 12.5px; color: var(--muted); font-weight: 700; }
.gp-stats dd { margin: 0; font-family: var(--head); font-size: 22px; font-weight: 600; color: var(--deep); }
.gp-acts { gap: 10px; flex-wrap: wrap; align-items: center; }
.gp-play { min-height: 52px; padding: 0 28px; font-size: 18px; }
#gpLike.on { color: var(--red); }
.gp-desc { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.gp-mod { display: flex; align-items: center; gap: 10px; padding-top: 10px; border-top: 1px solid var(--line); width: 100%; }
.gp-mod b { font-size: 13px; color: var(--muted); }
.gp-best { margin-top: 24px; }
.gp-best .utable { margin-top: 10px; }
.gp-best tr.me td { background: var(--blue-50); font-weight: 800; }
@media (max-width: 860px) { .gp { grid-template-columns: minmax(0, 1fr); } .gp-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; } }

/* ---------- Play: obstacle courses and test play ---------- */
.pl-status.done { background: rgba(26,163,107,.9); }
.pl-center.big { font-size: 30px; display: grid; gap: 6px; background: rgba(10,22,52,.75); }
.pl-center.big small { font-family: 'Nunito', system-ui, sans-serif; font-size: 15px; font-weight: 700; opacity: .9; }
.pl-test { position: absolute; left: 50%; bottom: 64px; transform: translateX(-50%); padding: 5px 14px; border-radius: 99px; background: rgba(245,163,0,.92); color: #3d2a00; font-weight: 800; font-size: 13.5px; pointer-events: none; white-space: nowrap; }
.pl-obby .pl-emotes { bottom: 12px; }

/* ---------- World Studio editor ---------- */
.st { position: absolute; inset: 0; display: grid; grid-template-columns: 236px minmax(0, 1fr) 300px; grid-template-rows: auto minmax(0, 1fr); background: var(--bg); color: var(--ink); }
.st-bar { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--card); flex-wrap: wrap; }
.st-b { height: 36px; padding: 0 13px; border-radius: 10px; border: 0; background: var(--blue-50); color: var(--link); font-weight: 800; cursor: pointer; box-shadow: inset 0 0 0 1.5px var(--blue-100); white-space: nowrap; }
.st-b:hover:not(:disabled) { background: var(--blue-100); }
.st-b:disabled { opacity: .45; cursor: not-allowed; }
.st-b.sm { height: 32px; padding: 0 10px; font-size: 14px; }
.st-b.danger { color: var(--red); background: transparent; box-shadow: inset 0 0 0 1.5px #f6c7cf; }
.st-pub { background: var(--blue); color: #fff; box-shadow: 0 3px 0 var(--blue-d); }
.st-pub:hover:not(:disabled) { background: var(--blue-2); }
.st-name { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.st-title { font-family: var(--head); font-weight: 600; font-size: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 280px; }
.st-status { font-size: 12.5px; font-weight: 800; color: var(--muted); }
.st-status.ok { color: var(--green); } .st-status.warn { color: #b77900; } .st-status.bad { color: var(--red); }
.st-sp { flex: 1; }
.st-grp { display: flex; gap: 4px; }
.st-snap { display: flex; align-items: center; gap: 6px; font-weight: 800; font-size: 14px; color: var(--muted); }
.st-snap select { height: 36px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--card); padding: 0 8px; font-weight: 700; color: var(--ink); }
.st-left, .st-right { overflow-y: auto; background: var(--card); padding: 14px; }
.st-left { border-right: 1px solid var(--line); }
.st-right { border-left: 1px solid var(--line); padding-top: 10px; }
.st-left h3 { font-size: 14px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 4px 0 10px; }
.st-left h3 + * + h3, .st-specials { margin-bottom: 4px; }
.st-shapes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-bottom: 18px; }
.st-shapes button { display: grid; justify-items: center; gap: 2px; padding: 6px 2px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--bg); cursor: pointer; font-size: 12px; font-weight: 800; color: var(--ink); }
.st-shapes button:hover { border-color: var(--blue-200); background: var(--blue-50); }
.st-shapes img { width: 44px; height: 44px; }
.st-specials { display: grid; gap: 6px; }
.st-specials button { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--bg); cursor: pointer; text-align: left; color: var(--ink); }
.st-specials button:hover { border-color: var(--blue-200); background: var(--blue-50); }
.st-specials i { flex: none; width: 22px; height: 22px; border-radius: 7px; box-shadow: inset 0 -3px 0 rgba(0,0,0,.18); }
.st-specials b { display: block; font-size: 14px; }
.st-specials small { display: block; font-size: 12px; color: var(--muted); font-weight: 700; }
.st-count { margin-top: 14px; font-size: 13px; color: var(--muted); font-weight: 700; }
.st-count b { color: var(--ink); }
.st-keys { margin-top: 12px; font-size: 13px; color: var(--muted); }
.st-keys summary { cursor: pointer; font-weight: 800; }
.st-keys ul { padding-left: 16px; margin: 8px 0 0; display: grid; gap: 6px; }
.st kbd { font: 800 11px/1 'Nunito', system-ui, sans-serif; padding: 2px 5px; border-radius: 5px; background: var(--blue-50); border: 1px solid var(--line); color: var(--ink); }
.st-view { position: relative; background: linear-gradient(180deg, #dbe7ff, #f2f6ff); min-height: 0; }
.st-cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; outline: none; cursor: grab; touch-action: none; }
.st-cv:active { cursor: grabbing; }
.st-zoom { position: absolute; right: 12px; bottom: 12px; display: grid; gap: 6px; }
.st-zoom button { width: 38px; height: 38px; border-radius: 10px; border: 0; background: rgba(10,22,52,.6); color: #fff; font-size: 22px; font-weight: 800; cursor: pointer; }
.st-tip { position: absolute; left: 12px; bottom: 12px; padding: 5px 12px; border-radius: 99px; background: rgba(10,22,52,.6); color: #fff; font-size: 13px; font-weight: 700; pointer-events: none; max-width: calc(100% - 80px); }
.st-nogl { padding: 40px; text-align: center; }
.st-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 12px; background: var(--blue-50); margin-bottom: 12px; }
.st-tabs button { height: 34px; border: 0; border-radius: 9px; background: none; font-weight: 800; color: var(--muted); cursor: pointer; }
.st-tabs button.on { background: var(--card); color: var(--link); box-shadow: 0 1px 3px rgba(13,27,61,.12); }
.st-tabs button:disabled { opacity: .45; cursor: default; }
.st-sec { padding: 12px 0; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.st-sec:first-child, .st-selh + .st-sec, .st-hint + .st-sec { border-top: 0; padding-top: 4px; }
.st-sec > b { font-size: 14px; }
.st-selh { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.st-selh h3 { font-size: 20px; }
.st-hint { font-size: 13px; color: var(--muted); margin: 0; }
.st-three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.st-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.st-num { display: grid; gap: 3px; font-size: 12.5px; font-weight: 800; color: var(--muted); }
.st-num input { height: 36px; width: 100%; border-radius: 9px; border: 1.5px solid var(--line); background: var(--bg); padding: 0 8px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.st-num input:focus { outline: none; border-color: var(--blue); }
.st-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.st-deg { min-width: 44px; text-align: center; font-weight: 800; font-variant-numeric: tabular-nums; }
.st-acts { padding-top: 12px; border-top: 1px solid var(--line); }
.st-colors { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.st-colors button, .st-cc { aspect-ratio: 1; border-radius: 9px; border: 2px solid var(--line); cursor: pointer; position: relative; }
.st-colors button.on, .st-cc.on { border-color: var(--blue); box-shadow: 0 0 0 2px var(--blue-200); }
.st-cc { background: conic-gradient(red, yellow, lime, cyan, blue, magenta, red); overflow: hidden; }
.st-cc input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.st-lbl { display: grid; gap: 4px; font-size: 13px; font-weight: 800; color: var(--muted); }
.st-lbl .input { font-size: 15px; color: var(--ink); }
.st-modes { display: grid; gap: 6px; }
.st-mode { display: flex; gap: 10px; align-items: flex-start; padding: 9px 11px; border-radius: 12px; border: 1.5px solid var(--line); cursor: pointer; }
.st-mode.on { border-color: var(--blue); background: var(--blue-50); }
.st-mode input { margin-top: 4px; accent-color: var(--blue); }
.st-mode small { display: block; color: var(--muted); font-weight: 700; font-size: 12.5px; }
.st-sub { font-size: 12.5px; font-weight: 800; color: var(--muted); margin-top: 4px; }
.st-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.st-chips button { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px 0 6px; border-radius: 99px; border: 1.5px solid var(--line); background: var(--bg); font-size: 13px; font-weight: 800; color: var(--ink); cursor: pointer; }
.st-chips button.on { border-color: var(--blue); background: var(--blue-50); color: var(--link); }
.st-chips i { width: 20px; height: 20px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.st-check { border-radius: 12px; padding: 12px; background: #fff4d1; color: #5c4100; border: 0; margin-top: 8px; }
.st-check.ready { background: #dcfce7; color: #166534; }
:root[data-theme=dark] .st-check { background: #3a2d08; color: #ffe6a0; } :root[data-theme=dark] .st-check.ready { background: #12351f; color: #86efac; }
.st-check ul { margin: 0; padding-left: 18px; font-size: 14px; }
.st-check p { margin: 0; font-size: 14px; }
.st .toggle { font-weight: 700; font-size: 14px; }
@media (max-width: 1100px) { .st { grid-template-columns: 200px minmax(0, 1fr) 270px; } .st-shapes { grid-template-columns: repeat(2, minmax(0, 1fr)); } .st-specials small { display: none; } }
@media (max-width: 760px) {
  .st { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(260px, 46vh) auto auto; overflow-y: auto; }
  .st-view { grid-row: 2; } .st-left { grid-row: 3; border-right: 0; border-top: 1px solid var(--line); overflow: visible; } .st-right { grid-row: 4; border-left: 0; overflow: visible; }
  .st-shapes { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .st-snap, .st-grp { display: none; }
  .st-title { max-width: 140px; }
}
.play-how .pl-keys li { justify-content: flex-start; gap: 12px; }
.play-how .pl-keys li span { min-width: 104px; }

/* ---------- 0.18: Play page sidebar, Create page, profile tabs ---------- */
.play-cols { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; margin-top: 20px; align-items: start; }
.play-main > .play-grid { margin-top: 0; }
.play-side { position: sticky; top: calc(var(--hdr) + 20px); display: grid; gap: 16px; }
.play-side .play-how { margin: 0; }
.play-how h3 { margin-bottom: 4px; }
.ph-group { padding: 12px 0; border-bottom: 1px solid var(--line); }
.ph-group:last-of-type { border-bottom: 0; padding-bottom: 4px; }
.ph-group h4 { margin: 0 0 8px; font-size: 12.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 800; }
.ph-group dl { margin: 0; display: grid; gap: 7px; }
.ph-group dl > div { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 10px; align-items: center; }
.ph-group dt { font-weight: 800; font-size: 13.5px; color: var(--muted); display: flex; gap: 2px; align-items: center; flex-wrap: nowrap; white-space: nowrap; }
.ph-group dt kbd { padding: 3px 5px; margin: 0; }
.ph-group dd { margin: 0; font-weight: 700; font-size: 14.5px; }
.play-how kbd { font: 800 12px/1 'Nunito', system-ui, sans-serif; padding: 4px 6px; border-radius: 6px; background: var(--blue-50); color: var(--ink); border: 1px solid var(--line); box-shadow: 0 1px 0 var(--line); }
.ph-touch, .ph-note { margin: 8px 0 0; }
.play-make h3 { margin-bottom: 6px; }
.play-make p { margin: 0 0 14px; font-size: 14.5px; }
.play-main .games-sec { margin-top: 30px; }
@media (max-width: 1100px) { .play-cols { grid-template-columns: minmax(0, 1fr) 280px; } .ph-group dl > div { grid-template-columns: 104px minmax(0, 1fr); } }
@media (max-width: 980px) { .play-cols { grid-template-columns: minmax(0, 1fr); } .play-side { position: static; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); align-items: start; } }

.create-hero { align-items: center; }
.cr-slots { position: relative; display: grid; justify-items: center; padding: 12px 20px; border-radius: 16px; background: rgba(255,255,255,.14); }
.cr-slots b { font-family: var(--head); font-size: 30px; font-weight: 600; line-height: 1.1; }
.cr-slots span { font-size: 13px; font-weight: 700; opacity: .88; }
.cr-cols { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; margin-top: 20px; align-items: start; }
.cr-new h2 { margin-bottom: 14px; }
.cr-new .notice { margin: 0 0 14px; }
.cr-new .btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.cr-tpls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.cr-tpl { display: flex; flex-direction: column; border-radius: 14px; border: 2px solid var(--line); overflow: hidden; cursor: pointer; background: var(--card); transition: border-color .12s, box-shadow .12s; }
.cr-tpl:hover { border-color: var(--blue-200); }
.cr-tpl.on { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-100); }
.cr-tpl input { position: absolute; opacity: 0; pointer-events: none; }
.cr-tpl:has(input:focus-visible) { outline: 3px solid var(--blue-200); outline-offset: 2px; }
.cr-tpl-img { aspect-ratio: 16 / 9; background: var(--blue-50); display: block; }
.cr-tpl-img img { width: 100%; height: 100%; object-fit: cover; }
.cr-tpl-t { display: grid; gap: 4px; padding: 10px 12px 12px; justify-items: start; }
.cr-tpl-t b { font-size: 15px; }
.cr-tpl-t small { color: var(--muted); font-weight: 700; font-size: 13px; line-height: 1.35; }
.cr-tpl .pill.gc-mode { position: static; font-size: 11px; background: var(--blue-50); color: var(--link); }
.cr-h { margin: 28px 0 14px; align-items: baseline; gap: 10px; }
.cr-empty { padding: 26px; text-align: center; }
.cr-side { position: sticky; top: calc(var(--hdr) + 20px); display: grid; gap: 16px; }
.cr-limits ul { list-style: none; margin: 12px 0 14px; padding: 0; display: grid; gap: 6px; }
.cr-limits li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--blue-50); font-weight: 700; }
.cr-tier { display: inline-block; min-width: 62px; text-align: center; padding: 3px 8px; border-radius: 7px; font-size: 12.5px; font-weight: 900; letter-spacing: .02em; background: var(--card); color: var(--muted); box-shadow: inset 0 0 0 1.5px var(--line); }
.cr-tier.t-bronze { background: linear-gradient(#f3c39a, #c27b45); color: #3d1f08; box-shadow: none; }
.cr-tier.t-silver { background: linear-gradient(#f4f6fa, #b9c2d3); color: #2a3550; box-shadow: none; }
.cr-tier.t-gold { background: linear-gradient(#ffe27a, #f2b300); color: #3b2a00; box-shadow: none; }
.cr-new .err:empty { display: none; }
.cr-new .row { margin-top: 16px; }
.cr-limits li b { margin-left: auto; }
.cr-limits li em { font-style: normal; font-size: 11.5px; font-weight: 800; padding: 2px 7px; border-radius: 99px; background: var(--blue); color: #fff; }
.cr-limits li.me { box-shadow: inset 0 0 0 2px var(--blue); }
.cr-limits .hint { margin: 10px 0 0; font-size: 13px; }
.cr-tips ul { margin: 10px 0 0; padding-left: 18px; display: grid; gap: 6px; font-size: 14.5px; }
@media (max-width: 980px) { .cr-cols { grid-template-columns: minmax(0, 1fr); } .cr-side { position: static; } }
@media (max-width: 680px) { .cr-tpls { grid-template-columns: minmax(0, 1fr); } .cr-tpl { flex-direction: row; } .cr-tpl-img { width: 128px; flex: none; aspect-ratio: auto; } }

.pf-tabs { display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: var(--blue-50); margin-bottom: 16px; }
.pf-tabs button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; border: 0; border-radius: 11px; background: none; font-weight: 800; font-size: 15.5px; color: var(--muted); cursor: pointer; }
.pf-tabs button span { font-size: 12.5px; padding: 1px 8px; border-radius: 99px; background: var(--card); color: var(--muted); }
.pf-tabs button.on { background: var(--card); color: var(--link); box-shadow: 0 1px 3px rgba(13,27,61,.12); }
.pf-tabs button.on span { background: var(--blue-50); color: var(--link); }
.pf-more { margin-top: 12px; }
.pf-games { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
@media (max-width: 760px) { .subnav a { padding: 0 9px; } }
@media (max-width: 400px) { .subnav a { padding: 0 6px; font-size: 13.5px; } }

/* ---------- Maintenance mode ---------- */
.maint-bar { background: #fff4d1; color: #5c4100; border-bottom: 1px solid #ffe08a; padding: 9px max(3vw, 16px); font-size: 14px; text-align: center; }
.maint-bar a { color: inherit; font-weight: 800; margin-left: 6px; }
:root[data-theme=dark] .maint-bar { background: #2a2410; color: #ffd76a; border-color: #5a4a1a; }
.mt { position: relative; overflow: hidden; min-height: 100vh; display: grid; place-items: center; padding: 40px 16px; background: linear-gradient(160deg, #2f6bff 0%, #1a5cff 40%, #0a2a7a 100%); }
.mt > .poly { position: absolute; inset: 0; width: 100%; height: 100%; }
.mt-card { position: relative; width: min(560px, 100%); background: var(--card); color: var(--ink); border-radius: 24px; padding: 34px 32px 26px; text-align: center; box-shadow: 0 24px 60px rgba(5,20,70,.35); }
.mt-logo { display: inline-flex; align-items: center; gap: 9px; font-family: var(--head); font-size: 22px; font-weight: 700; color: var(--blue); margin-bottom: 20px; }
.mt-icon { width: 64px; height: 64px; border-radius: 20px; margin: 0 auto 16px; display: grid; place-items: center; background: var(--blue-50); color: var(--blue); }
.mt-card h1 { font-size: clamp(26px, 5vw, 34px); margin: 0 0 10px; overflow-wrap: anywhere; }
.mt-msg { color: var(--muted); font-size: 16.5px; line-height: 1.6; margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
.mt-when { display: inline-block; margin: 18px 0 0; padding: 8px 16px; border-radius: 99px; background: var(--blue-50); color: var(--ink); font-weight: 800; }
.mt-auto { margin: 18px 0 0; font-size: 13.5px; color: var(--muted); }
.mt-foot { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); display: flex; gap: 12px; justify-content: center; align-items: center; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.mt-foot a { font-weight: 800; }
.mt.mt-prev { min-height: 0; padding: 26px 14px; border-radius: 16px; }
.mt.mt-prev .mt-card { padding: 24px 22px 20px; }
.mt.mt-prev .mt-card h1 { font-size: 24px; }
.mt-pill { background: #fde4e8; color: #b4233c; }
:root[data-theme=dark] .mt-pill { background: #3a1a22; color: #ffb3c0; }
.mt-status.on { box-shadow: inset 4px 0 0 #e63950; }
.notice.mt-note { margin: 0 0 14px; display: block; font-size: 14px; background: #fff4d1; color: #5c4100; }
.notice.mt-note a { color: inherit; }
:root[data-theme=dark] .notice.mt-note { background: #2a2410; color: #ffd76a; }
.pill.act-maintenance { background: #fff4d1; color: #7a5600; }

/* ---------- Play: guns and team battles (0.21) ---------- */
.pl-hotbar { gap: 6px; }
.pl-slot svg { flex: none; }
.pl-teams { position: absolute; top: 108px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; pointer-events: none; font-family: var(--head); font-weight: 600; }
.pl-teams > span { display: inline-flex; align-items: center; gap: 8px; padding: 5px 14px; border-radius: 12px; font-size: 22px; color: #fff; font-variant-numeric: tabular-nums; box-shadow: 0 3px 10px rgba(5,20,70,.2); }
.pl-teams > span b { font-size: 13.5px; font-family: 'Nunito', system-ui, sans-serif; font-weight: 800; opacity: .95; }
.pl-teams .t1 { background: rgba(230,57,80,.9); } .pl-teams .t2 { background: rgba(26,92,255,.9); }
.pl-teams .mine { outline: 3px solid #fff; }
.pl-teams small { font-size: 12px; font-weight: 800; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.5); font-family: 'Nunito', system-ui, sans-serif; }
.pl-tag.t1 .pl-name { background: rgba(214,40,64,.85); } .pl-tag.t2 .pl-name { background: rgba(26,92,255,.85); }
.pl-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.pl-dot.t1, .pl-th.t1::before { background: #ff4d61; } .pl-dot.t2, .pl-th.t2::before { background: #2f6bff; }
.pl-th { font-size: 15px; margin: 12px 0 0; display: flex; align-items: center; gap: 8px; }
.pl-th::before { content: ''; width: 10px; height: 10px; border-radius: 3px; }
.pl-line b.tm.t1 { color: #ff8a98; } .pl-line b.tm.t2 { color: #9ec0ff; }
.pl-tscore { font-family: var(--head); font-size: 22px; margin: 8px 0 0 !important; }
.pl-tscore .t1 { color: #e63950; } .pl-tscore .t2 { color: #1a5cff; }
.pl.touch .pl-teams { top: 158px; }
/* ---------- World Studio: models, guns, grid (0.21) ---------- */
.st-models { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 4px 0 10px; }
.st-models button { display: grid; justify-items: center; gap: 2px; padding: 6px 2px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--bg); cursor: pointer; font-size: 11.5px; font-weight: 800; color: var(--ink); line-height: 1.15; text-align: center; }
.st-models button:hover { border-color: var(--blue-200); background: var(--blue-50); }
.st-models img { width: 48px; height: 48px; }
.st-left .st-sub { display: block; margin-top: 6px; }
.st-mhint { margin: -4px 0 4px !important; }
.st-guns { display: grid; gap: 6px; margin-top: 4px; }
.st-guns .check { font-size: 13.5px; align-items: baseline; }
.st-guns small { color: var(--muted); font-weight: 700; }
.st-gridb.on { background: var(--blue); color: #fff; box-shadow: none; }
.st-inline { margin-left: 8px !important; display: inline; font-size: 12px; }
/* ---------- playing now: profiles and Home (0.21) ---------- */
.playing-card { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 14px; background: var(--blue-50); box-shadow: inset 0 0 0 1.5px var(--blue-100); }
.playing-card .pg-pic { flex: none; width: 64px; height: 40px; border-radius: 9px; overflow: hidden; display: grid; place-items: center; background: linear-gradient(135deg, #2f6bff, #0a2a7a); }
.playing-card .pg-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pg-world { color: #fff; font-size: 20px; }
.pg-world.w-plaza { background: linear-gradient(135deg, #4cc46a, #2f9a4e); width: 100%; height: 100%; display: grid; place-items: center; }
.pg-t { display: grid; gap: 1px; min-width: 0; flex: 1; line-height: 1.25; }
.pg-t > a { color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pg-t .pill { justify-self: start; font-size: 11px; padding: 1px 8px; }
.pg-l { font-size: 12px; font-weight: 800; color: var(--green); display: inline-flex; align-items: center; gap: 5px; }
.playing-card .btn { flex: none; }
.bf-row .bf-game { margin: 6px 0 0; }
.pf-game { margin-top: 12px; }
.glogo.xs { width: 20px; height: 20px; border-radius: 6px; display: inline-block; vertical-align: middle; }
.gc-grp { display: inline-flex; align-items: center; gap: 6px; }
.gc-grp .glogo.xs { margin: 0; }
.g-games-h { display: flex; align-items: center; gap: 16px; justify-content: space-between; flex-wrap: wrap; margin-bottom: 16px; }
.ap-guns { display: grid; gap: 6px; margin-top: 4px; }
:root[data-theme=dark] .playing-card { background: #172038; box-shadow: inset 0 0 0 1.5px #26324f; }
.playing-card .gc-mode { position: static; }
.bf-game { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 8px; }
.bf-game .pg-pic { width: 52px; height: 34px; }
.bf-game .pg-l { display: none; }
.bf-game .btn { grid-column: 1 / -1; justify-content: center; }
.pl.touch .pl-hotbar { right: 12px; gap: 5px; }
.pl.touch .pl-slot { width: 58px; height: 50px; font-size: 10.5px; border-width: 2px; padding-top: 4px; }
.pl.touch .pl-slot svg { width: 26px; height: 18px; }

/* ---------- 0.22: shirts & pants, item builder extras ---------- */
.free { color: var(--green, #16a34a); font-weight: 800; }
.free.big { font-size: 26px; font-family: var(--head); }
.cl-tile { background: linear-gradient(160deg, #eef3ff, #dbe6fb); }
:root[data-theme=dark] .cl-tile { background: linear-gradient(160deg, #1d2a4a, #15203a); }
.item .cl-tile img { width: 92%; height: 92%; }
.cl-tabs { margin: 18px 0 14px; }
.cl-tabs a.chip { text-decoration: none; }
.cl-page { padding-top: 22px; }
.cl-top { align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.cl-top h1 { margin: 0; }
.cl-hero-r { margin-left: auto; display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.btn.ghost-w { background: transparent; color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.55); }
.btn.ghost-w:hover { background: rgba(255,255,255,.12); }
.cl-news { margin-bottom: 14px; border-left: 4px solid var(--blue); }
.cl-news p { margin: 4px 0; }
.mk-cloth { display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,.12); border-radius: 16px; padding: 8px 14px 8px 8px; color: #fff; text-decoration: none; margin-left: auto; }
.mk-cloth:hover { background: rgba(255,255,255,.2); }
.mk-cloth img { width: 58px; height: 58px; border-radius: 12px; background: rgba(255,255,255,.85); }
.mk-cloth > span { display: grid; line-height: 1.25; }
.mk-cloth > span span { font-size: 13px; color: #d7e3ff; }
.mk-cloth + .bal { margin-left: 0; }
.cl-make { align-items: start; }
.cl-steps { display: grid; gap: 4px; }
.cl-step { padding: 12px 0 14px; border-bottom: 1px solid var(--line); }
.cl-step:last-child { border-bottom: 0; }
.cl-step h2 { display: flex; align-items: center; gap: 10px; font-size: 19px; margin: 0 0 10px; }
.cl-n { width: 26px; height: 26px; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; font-size: 14px; flex: none; }
.cl-tpl { display: grid; grid-template-columns: 170px 1fr; gap: 14px; align-items: start; }
.cl-tpl canvas { width: 170px; height: 170px; border-radius: 10px; box-shadow: 0 0 0 1px var(--line); background: #fff; }
.cl-tpl p { margin: 0 0 10px; }
.cl-drop { display: flex; align-items: center; justify-content: center; gap: 14px; min-height: 120px; border: 2px dashed var(--line); border-radius: 14px; padding: 14px; cursor: pointer; text-align: center; background: var(--blue-50); }
.cl-drop:hover, .cl-drop.over { border-color: var(--blue); background: var(--card); }
.cl-drop img { width: 140px; height: 140px; border-radius: 8px; background: repeating-conic-gradient(#e7ecf5 0 25%, #fff 0 50%) 0 0 / 16px 16px; }
.cl-status { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0 0; padding: 10px 12px; border-radius: 12px; background: var(--blue-50); font-size: 14px; }
.cl-status .pill { flex: none; }
.cl-manage { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
.cl-manage summary { cursor: pointer; font-weight: 800; margin-bottom: 10px; }
.cl-below { display: grid; grid-template-columns: minmax(260px, 380px) 1fr; gap: 20px; margin-top: 20px; align-items: start; }
.cl-flat { margin-top: 10px; border-radius: 12px; overflow: hidden; background: repeating-conic-gradient(#e7ecf5 0 25%, #fff 0 50%) 0 0 / 20px 20px; }
.cl-flat img { display: block; width: 100%; aspect-ratio: 1; }
.cl-gear button.on::after { content: 'Wearing'; }
.cl-gear .cl-none { display: grid; place-items: center; aspect-ratio: 1; border-radius: 10px; background: repeating-linear-gradient(135deg, #e4ebf8 0 8px, #f2f6fd 8px 16px); color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.cl-gear .cl-st { display: block; font-size: 11px; color: var(--muted); font-weight: 700; }
.cl-add { display: grid; place-items: center; border: 1.5px dashed var(--line); border-radius: 14px; font-weight: 800; font-size: 13px; min-height: 96px; text-align: center; padding: 6px; }
.paint-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.paint-sw { display: grid; justify-items: center; gap: 2px; font-size: 12px; font-weight: 700; color: var(--muted); cursor: pointer; }
.paint-sw input { width: 46px; height: 46px; border: 0; padding: 0; border-radius: 12px; background: none; cursor: pointer; }
.cr-list { display: grid; gap: 12px; }
.cr-row { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: start; }
.cr-imgs { display: flex; gap: 8px; }
.cr-imgs img { width: 150px; height: 150px; border-radius: 10px; background: repeating-conic-gradient(#e7ecf5 0 25%, #fff 0 50%) 0 0 / 16px 16px; box-shadow: 0 0 0 1px var(--line); }
.cr-imgs .cr-3d { background: linear-gradient(160deg, #eef3ff, #dbe6fb); }
.cr-info p { margin: 6px 0; }
.bd-import { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: var(--blue-50); }
.bd-import .hint { flex: 1 1 240px; }
.bd-import label.busy { opacity: .6; pointer-events: none; }
.bd-import label.busy::after { content: '…'; }
.bd-pal-f { margin-top: 12px; }
.bd-palsw { width: 34px; height: 34px; }
.bd-palsw input { opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.bd-wear { margin-top: 8px; gap: 6px; align-items: center; }
.bd-wear .chip { font-size: 12px; padding: 4px 10px; }
.bd-dot-wear { background-image: linear-gradient(135deg, transparent 45%, rgba(255,255,255,.9) 45% 55%, transparent 55%) !important; }
.bd-dot-model { background: conic-gradient(#ff5d5d, #ffc933, #2ec4b6, #1a5cff, #8b5cf6, #ff5d5d) !important; }
.bd-anim .bd-ax { margin-top: 8px; }
@media (max-width: 760px) {
  .cl-tpl { grid-template-columns: 1fr; }
  .cl-below { grid-template-columns: 1fr; }
  .cr-row { grid-template-columns: 1fr; }
  .cr-imgs img { width: calc(50% - 4px); height: auto; aspect-ratio: 1; }
  .mk-cloth { margin-left: 0; }
  .cl-hero-r { margin-left: 0; flex-direction: row; }
}
.cl-by { text-transform: none; color: var(--muted); }
.ip-badges .pill.cl-pill { text-transform: none; }
@media (max-width: 560px) { .mk-grid.cl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- 0.23: outfits, Create hub, market sections, item tools ---------- */
.of { margin: 12px 0 4px; }
.of-h { display: flex; align-items: center; gap: 8px; }
.of-h h3 { margin: 0; font-size: 15px; }
.of-row { display: flex; gap: 8px; overflow-x: auto; padding: 6px 2px 6px; scroll-snap-type: x proximity; }
.of-card { position: relative; flex: none; width: 84px; display: grid; gap: 4px; scroll-snap-align: start; }
.of-card > button, button.of-card { border: 1.5px solid var(--line); background: var(--blue-50); border-radius: 14px; padding: 4px 4px 6px; cursor: pointer; display: grid; justify-items: center; gap: 2px; font: inherit; color: var(--ink); width: 84px; }
.of-card > button:hover, button.of-card:hover:not(:disabled) { border-color: var(--blue); }
.of-card.on > button { border-color: var(--blue); box-shadow: 0 0 0 2px var(--blue); background: var(--card); }
.of-card img { width: 72px; height: 72px; border-radius: 10px; }
.of-n { font-size: 12px; font-weight: 800; max-width: 76px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.of-new { min-height: 100px; align-content: center; border-style: dashed !important; background: transparent !important; }
.of-new:disabled { opacity: .5; cursor: not-allowed; }
.of-plus { font-size: 30px; line-height: 1; color: var(--blue); font-weight: 400; }
.of-acts { display: grid; gap: 3px; }
.of-acts button { border: 0; background: var(--blue-50); border-radius: 8px; font: inherit; font-size: 11px; font-weight: 800; color: var(--blue); padding: 3px 0; cursor: pointer; }
.of-acts .of-del { color: var(--red); }
.cr-tabs { margin: 16px 0 14px; }
.cr-tabs a.chip { text-decoration: none; }
.cr-tabs .cr-staff { margin-left: auto; }
.cr-hub { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.cr-card { display: grid; grid-template-rows: auto 1fr; overflow: hidden; color: var(--ink); text-decoration: none; transition: transform .15s, box-shadow .15s; }
.cr-card:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(26, 92, 255, .14); }
.cr-card-img { aspect-ratio: 16 / 9; display: grid; place-items: center; overflow: hidden; background: var(--blue-50); }
.cr-card-img img { width: 100%; height: 100%; object-fit: cover; }
.cr-card-img.cl-tile img { width: auto; height: 100%; aspect-ratio: 1; object-fit: contain; }
.cr-card-t { padding: 14px 16px 16px; display: grid; gap: 6px; align-content: start; }
.cr-card-t b { font-size: 18px; font-family: var(--head); }
.cr-card-t p { margin: 0; color: var(--muted); font-size: 14px; }
.cr-card-t .btn { justify-self: start; margin-top: 4px; }
.cr-recent { margin-top: 26px; }
.cr-recent .sec-h { align-items: center; gap: 8px; }
.cr-recent .sec-h .btn { margin-left: auto; }
.cr-recent .gc { text-decoration: none; color: var(--ink); }
.mk-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 0 6px; }
.mk-tabs a { display: grid; gap: 2px; padding: 12px 16px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--card); text-decoration: none; color: var(--ink); }
.mk-tabs a span { font-size: 13px; color: var(--muted); font-weight: 600; }
.mk-tabs a.on { border-color: var(--blue); box-shadow: 0 0 0 2px var(--blue); background: var(--blue-50); }
.mk-tabs a:hover:not(.on) { border-color: var(--blue); }
.shelf-cl .sec-h .btn + .btn { margin-left: 6px; }
.choose4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ch-up { gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.ch-up select { max-width: 150px; }
.ch-ai textarea { width: 100%; margin-top: 4px; resize: vertical; }
.ch-ai-i { font-size: 44px; display: grid; place-items: center; }
.rc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; max-height: 230px; overflow: auto; padding: 2px; }
.rc-grid button { border: 1.5px solid var(--line); border-radius: 12px; background: var(--blue-50); padding: 4px; cursor: pointer; }
.rc-grid button.on { border-color: var(--blue); box-shadow: 0 0 0 2px var(--blue); background: var(--card); }
.rc-grid img { width: 100%; aspect-ratio: 1; }
.bd-dl { display: inline-flex; gap: 6px; margin: 0 6px; }
@media (max-width: 900px) { .cr-hub { grid-template-columns: 1fr; } .choose4 { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .mk-tabs a span { display: none; } .cr-tabs .cr-staff { margin-left: 0; } }
.gear-note { margin: -4px 0 8px; }

/* ---------- 0.25 ---------- */
.side-me .stage-sm canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; touch-action: pan-y; }
.side-me .stage-sm canvas.no-webgl { display: none; }
.home-feed-note { text-align: center; margin: 14px 0 0; }
.play-sec-h { margin: 22px 0 0; font-size: 20px; }
.play-grid { margin-top: 10px; gap: 16px; }
.play-card .play-prev { height: 150px; }
.play-card > .pad { padding: 14px 16px 16px; }
.play-card .pc-top { display: flex; align-items: center; gap: 10px; }
.play-card .pc-top h2 { font-size: 21px; margin: 0; }
.play-card .pc-top .btn { margin-left: auto; }
.play-card p.muted { font-size: 14px; }
.play-card > .pad > .row:last-child { margin-top: 0 !important; padding-top: 0; }
.play-more { margin-top: 10px; font-size: 14px; }
.play-more summary { cursor: pointer; font-weight: 800; color: var(--blue); }
.play-more .play-rules { margin: 8px 0 0; }
.games-head { margin-top: 28px; }
#gShelves { margin-top: 14px; }
.gshelf .shelf-row { grid-auto-columns: 250px; }
.gshelf .shelf-row .gc { scroll-snap-align: start; }
@media (max-width: 560px) { .gshelf .shelf-row { grid-auto-columns: 220px; } .play-card .play-prev { height: 120px; } }
.gcard { grid-template-columns: 76px minmax(0, 1fr); gap: 6px 16px; align-items: center; }
.gcard > .glogo { width: 76px; height: 76px; border-radius: 20px; box-shadow: 0 3px 10px rgba(7, 29, 87, .12); }
@media (max-width: 560px) { .gcard { grid-template-columns: 64px minmax(0, 1fr); } .gcard > .glogo { width: 64px; height: 64px; border-radius: 17px; } }
.pf-tab-h { margin: 0 0 8px; }
@media (max-width: 560px) { .pf-tabs { gap: 2px; } .pf-tabs button { font-size: 13.5px; gap: 4px; height: 40px; } .pf-tabs button span { padding: 0 6px; font-size: 11.5px; } }
.cr-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 22px; align-items: start; }
.cr-nav { position: sticky; top: 140px; padding: 14px 10px; display: grid; gap: 4px; }
.cr-nav-h { font-size: 15px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 2px 10px 8px; }
.cr-nav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; color: var(--ink); font-weight: 800; text-decoration: none; }
.cr-nav a:hover { background: var(--blue-50); }
.cr-nav a.on { background: var(--blue); color: #fff; }
.cr-nav svg { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.cr-nav .cr-staff { margin-top: 8px; border-top: 1px solid var(--line); border-radius: 0 0 12px 12px; padding-top: 14px; }
.cr-nav .cr-staff .pill { margin-left: auto; }
.cr-nav-tip { margin: 10px 10px 0; font-size: 12.5px; }
.cr-body > .create-hero:first-child { margin-top: 0; }
.cr-body .cr-hub { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
@media (max-width: 1100px) { .cr-body .play-cols { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 860px) {
  .cr-layout { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .cr-nav { position: static; display: flex; overflow-x: auto; padding: 6px; gap: 4px; scrollbar-width: none; }
  .cr-nav::-webkit-scrollbar { display: none; }
  .cr-nav-h, .cr-nav-tip { display: none; }
  .cr-nav a { flex: none; padding: 8px 12px; }
  .cr-nav .cr-staff { margin-top: 0; border-top: 0; border-radius: 12px; padding-top: 8px; }
}
@media (max-width: 1200px) { .cr-body .cr-cols { grid-template-columns: minmax(0, 1fr); } }
.it-tools { gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.it-q { width: 220px; }
.it-sec { margin-bottom: 26px; }
.it-sec .sec-h { display: flex; align-items: baseline; gap: 10px; }
.it-sec .sec-h h3 { margin: 0; font-size: 19px; }
.it-sub { margin: 2px 0 10px; }
#itUnrel { padding: 14px; border-radius: 18px; background: var(--blue-50); border: 1.5px dashed var(--blue-200); }
.it-empty { grid-column: 1 / -1; padding: 18px; }
.sched-pill { background: #ede9fe; color: #6d28d9; }
:root[data-theme=dark] .sched-pill { background: #2e2357; color: #c4b5fd; }
.rel-sched { margin-top: 12px; }
.rel-at { gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.rel-at input { width: auto; }
/* blog: visual editor and rich posts */
.be2 { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.be-side { display: grid; gap: 14px; position: sticky; top: 140px; }
.be-side h3 { margin: 0 0 4px; }
.be-title { font-size: 20px; font-weight: 800; }
.be-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 6px; border: 1.5px solid var(--line); border-bottom: 0; border-radius: 12px 12px 0 0; background: var(--blue-50); position: sticky; top: 118px; z-index: 5; }
.tb-sel { width: auto; height: 34px; padding: 0 8px; font-size: 13.5px; }
.tb-b { position: relative; display: inline-grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); font: 700 15px/1 var(--body, inherit); cursor: pointer; }
.tb-b:hover { background: var(--card); } .tb-b.on { background: var(--blue); color: #fff; }
.tb-b svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tb-sep { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }
.tb-pop { position: relative; }
.tb-swatch { position: absolute; left: 7px; right: 7px; bottom: 4px; height: 3px; border-radius: 2px; background: #1a5cff; }
.tb-menu { position: absolute; top: 40px; left: 0; z-index: 20; width: 228px; padding: 10px; background: var(--card); border-radius: 12px; box-shadow: 0 10px 30px rgba(7, 29, 87, .2); display: grid; gap: 6px; }
.tb-sw { display: flex; flex-wrap: wrap; gap: 6px; }
.tb-sw button, .tb-sw label { width: 26px; height: 26px; border-radius: 7px; border: 1.5px solid var(--line); cursor: pointer; padding: 0; position: relative; overflow: hidden; background: conic-gradient(red, yellow, lime, cyan, blue, magenta, red); }
.tb-sw input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.be-doc { min-height: 380px; max-height: none; padding: 18px 20px; border: 1.5px solid var(--line); border-radius: 0 0 12px 12px; background: var(--card); outline: none; font-size: 17px; line-height: 1.7; margin-top: 0; }
.be-doc:focus { border-color: var(--blue); }
.be-doc:empty::before { content: 'Start writing your post…'; color: var(--muted); }
.be-doc img.sel { outline: 3px solid var(--blue); outline-offset: 2px; }
.be-imgbar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; padding: 8px; border-radius: 10px; background: var(--blue-50); }
.danger-chip { color: var(--red) !important; }
.rich-html h2 { font-size: 28px; margin: 26px 0 10px; } .rich-html h3 { font-size: 22px; margin: 22px 0 8px; } .rich-html h4 { font-size: 18px; margin: 18px 0 6px; }
.rich-html h2:first-child, .rich-html h3:first-child { margin-top: 0; }
.rich-html ol { margin: 0 0 12px; padding-left: 24px; }
.rich-html img { max-width: 100%; height: auto; border-radius: 12px; vertical-align: middle; }
.rich-html hr { border: 0; border-top: 2px solid var(--line); margin: 22px 0; }
.rich-html pre { background: #0d1b3d; color: #e1e9ff; padding: 12px 14px; border-radius: 10px; overflow-x: auto; font: 14px/1.5 ui-monospace, Menlo, Consolas, monospace; white-space: pre-wrap; }
.rich-html a { font-weight: 700; }
.rich-html figure { margin: 0 0 12px; } .rich-html figcaption { font-size: 14px; color: var(--muted); text-align: center; }
#modal .box:has(.be-preview) { max-width: 900px; width: calc(100vw - 32px); max-height: calc(100vh - 40px); overflow: auto; padding: 0 0 16px; }
.be-preview .bp-hero { min-height: 220px; border-radius: 16px 16px 0 0; }
.be-preview + .row { padding: 0 16px; }
@media (max-width: 1050px) { .be2 { grid-template-columns: minmax(0, 1fr); } .be-side { position: static; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); } }
@media (max-width: 560px) { .be-tools { top: 104px; } .be-doc { padding: 14px; } }
.cr-body p.notice { display: block; }
