:root {
    --bg: #07080d;
    --bg-2: #10131c;
    --card: rgba(18, 22, 34, .72);
    --card-2: rgba(28, 34, 50, .82);
    --line: rgba(255, 255, 255, .08);
    --text: #f7f9ff;
    --muted: #d5deef;
    --gold: #f3c16b;
    --gold-2: #ffd58a;
    --accent: #7cf0d2;
    --accent-2: #5aa7ff;
    --danger: #ff6b7a;
    --ok: #5ee0a0;
    --shadow: 0 20px 50px rgba(0, 0, 0, .35);
    --radius: 18px;
    --font: "Manrope", system-ui, sans-serif;
    --display: "Syne", "Manrope", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    min-height: 100vh;
    color: var(--text);
    font: 15px/1.55 var(--font);
    background:
        radial-gradient(1200px 600px at 10% -10%, #1a1630 0%, transparent 50%),
        radial-gradient(900px 500px at 110% 10%, #132536 0%, transparent 46%),
        var(--bg);
    overflow-x: hidden;
}

.orb {
    position: fixed;
    z-index: 0;
    border-radius: 50%;
    filter: blur(60px);
    opacity: .35;
    pointer-events: none;
    animation: floaty 16s ease-in-out infinite;
}
.orb-a { width: 340px; height: 340px; background: #6a3dff; top: -80px; left: -60px; }
.orb-b { width: 280px; height: 280px; background: #1bb8a8; right: -40px; top: 20%; animation-delay: -6s; }
.orb-c { width: 380px; height: 380px; background: #c47a22; bottom: -120px; left: 30%; opacity: .18; animation-delay: -11s; }

@keyframes floaty {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    50% { transform: translate3d(30px, 24px, 0) scale(1.08); }
}

#page {
    position: relative;
    z-index: 1;
    max-width: 1180px;
    margin: 0 auto;
    padding: 16px 16px 40px;
}

#topnav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    padding: 10px 14px;
    background: rgba(10, 12, 18, .65);
    border: 1px solid var(--line);
    border-radius: 999px;
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
    animation: drop .7s ease both;
}
#topnav a {
    color: var(--muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    padding: 6px 8px;
    border-radius: 999px;
    transition: color .2s, background .2s, transform .2s;
}
#topnav a:hover { color: var(--text); background: rgba(255,255,255,.06); transform: translateY(-1px); }
#topnav .brand {
    width: 34px; height: 34px; display: grid; place-items: center;
    background: linear-gradient(135deg, var(--gold), #c4842a);
    color: #1a1208; font-family: var(--display); font-weight: 800; padding: 0;
}
#topnav .nav-user { margin-left: auto; color: var(--gold); }

#banner {
    margin: 18px 0;
    border-radius: 28px;
    overflow: hidden;
    border: 1px solid var(--line);
    background:
        linear-gradient(135deg, rgba(243,193,107,.16), transparent 40%),
        linear-gradient(180deg, #171b28, #0d1018);
    box-shadow: var(--shadow);
    animation: rise .8s .1s ease both;
}
.banner-art { padding: 56px 28px; text-align: center; position: relative; }
.banner-art::after {
    content: "";
    position: absolute; inset: auto 20% -40px 20%;
    height: 80px;
    background: radial-gradient(closest-side, rgba(243,193,107,.35), transparent);
    pointer-events: none;
}
.banner-art .eyebrow {
    letter-spacing: .42em;
    font-size: 11px;
    margin: 0 0 10px;
    color: var(--gold);
    font-weight: 700;
}
.banner-art h1 {
    margin: 0;
    font-family: var(--display);
    font-size: clamp(32px, 6vw, 64px);
    letter-spacing: -.03em;
    background: linear-gradient(180deg, #fff, #cfd6e6);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.banner-art .sub { margin: 10px 0 0; color: var(--muted); }

.flashes { margin: 14px 0; display: grid; gap: 8px; }
.flash {
    padding: 12px 16px;
    border-radius: 14px;
    border: 1px solid var(--line);
    animation: toast .45s ease both;
}
.flash-ok { background: rgba(94, 224, 160, .12); color: var(--ok); }
.flash-error { background: rgba(255, 107, 122, .12); color: var(--danger); }
.warn { color: var(--danger); font-weight: 700; }

#content-wrap {
    display: grid;
    grid-template-columns: 250px 1fr 250px;
    gap: 16px;
}
#content-wrap:has(#main.wide),
#content-wrap.is-game { grid-template-columns: 1fr; }

#leftbar, #rightbar, #main, .news-item, .pub-box, .stat-card {
    background: var(--card);
    border: 1px solid var(--line);
    backdrop-filter: blur(16px);
}

#leftbar, #rightbar { border-radius: var(--radius); overflow: hidden; animation: rise .6s ease both; }
#rightbar { animation-delay: .12s; }
#main { border-radius: var(--radius); min-height: 100%; animation: rise .65s .05s ease both; }

.sidehead, .content-header, .panel-head {
    margin: 0;
    padding: 12px 16px;
    font-family: var(--display);
    letter-spacing: -.02em;
    background: linear-gradient(90deg, rgba(243,193,107,.12), transparent);
    border-bottom: 1px solid var(--line);
}
.content-header h2, .panel-head { font-size: 15px; }
.panel-head { text-align: left; color: var(--text); border-radius: 16px 16px 0 0; }

.sidecontent { padding: 14px 16px; color: var(--muted); font-size: 13px; }
.sidecontent a { color: var(--gold); }

.world-btn {
    display: flex;
    justify-content: space-between;
    width: 100%;
    border: 0;
    border-top: 1px solid var(--line);
    padding: 11px 16px;
    cursor: pointer;
    font: 700 13px var(--font);
    color: #fff;
    transition: transform .2s, filter .2s;
}
.world-btn:hover { filter: brightness(1.12); transform: translateX(3px); }
.world-valge { background: linear-gradient(90deg, #d9d3c4, #8d8678); color: #1a1208; }
.world-sinine { background: linear-gradient(90deg, #3d5a80, #1d334d); }
.world-roheline { background: linear-gradient(90deg, #3a5a40, #1d3022); }
.world-must { background: linear-gradient(90deg, #2a2a2a, #111); }
.world-punane { background: linear-gradient(90deg, #8a2424, #3a1010); }
.badge {
    background: var(--gold); color: #1a1208;
    font-size: 10px; padding: 2px 7px; border-radius: 999px;
}
.world-login { display: none; padding: 12px 16px 16px; background: rgba(0,0,0,.25); }
.world-login.open { display: block; animation: unfold .28s ease; }
.world-login label { display: block; font-size: 12px; margin-bottom: 8px; color: var(--muted); }
.enter-link {
    display: block; text-align: center;
    background: linear-gradient(135deg, var(--gold), #c4842a);
    color: #1a1208 !important; padding: 10px; font-weight: 800; border-radius: 12px;
}

.inputfield, select, textarea, .qty {
    width: 100%;
    border: 1px solid var(--line);
    background: rgba(255,255,255,.05);
    color: var(--text);
    padding: 10px 12px;
    font: inherit;
    border-radius: 12px;
    outline: none;
    transition: border .2s, box-shadow .2s;
}
.inputfield:focus, select:focus { border-color: rgba(243,193,107,.5); box-shadow: 0 0 0 4px rgba(243,193,107,.12); }
.go, .reg-btn, .actions button, .craft button, form.inline button {
    display: inline-flex; align-items: center; justify-content: center;
    margin-top: 8px;
    background: linear-gradient(135deg, var(--gold), #c4842a);
    color: #1a1208;
    border: 0;
    padding: 10px 16px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    border-radius: 12px;
    transition: transform .18s, box-shadow .18s, filter .18s;
    box-shadow: 0 8px 20px rgba(196, 132, 42, .25);
}
.go:hover, .reg-btn:hover, .actions button:hover, .craft button:hover, form.inline button:hover {
    transform: translateY(-2px);
    filter: brightness(1.06);
}
.reg-btn { width: 100%; margin-top: 12px; }

.stats div { display: flex; justify-content: space-between; margin-bottom: 6px; color: var(--text); }
.stats .total { margin-top: 8px; border-top: 1px dashed var(--line); padding-top: 8px; }
.hint { color: var(--muted); font-size: 12px; }

.news-item { padding: 18px; border: 0; border-top: 1px solid var(--line); }
.news-item:first-of-type { border-top: 0; }
.news-item h3 { margin: 0 0 8px; font-family: var(--display); font-size: 18px; }
.news-item .by { text-align: right; font-size: 12px; color: var(--muted); }
.prose ul, .prose ol { padding-left: 18px; }
.stack label { display: block; margin-bottom: 10px; font-weight: 700; }
.stack .inputfield { max-width: 360px; }

.world-tabs, .goto, .room-nav, .floors {
    display: flex; flex-wrap: wrap; gap: 8px;
    padding: 12px 16px;
}
.world-tabs a, .goto a, .room-nav a {
    color: var(--muted);
    text-decoration: none;
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,.03);
    transition: .2s;
}
.world-tabs a:hover, .goto a:hover, .room-nav a:hover,
.world-tabs a.on, .goto a.on, .room-nav a.on {
    color: #1a1208;
    background: var(--gold);
    border-color: transparent;
}

.grid { width: 100%; border-collapse: collapse; }
.grid th, .grid td { border-bottom: 1px solid var(--line); padding: 10px 8px; text-align: left; }
.grid th { color: var(--muted); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }

#footer {
    display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
    margin-top: 22px; color: var(--muted); font-size: 12px;
}
#footer a { color: var(--muted); margin-left: 10px; text-decoration: none; }
#footer a:hover { color: var(--gold); }

.game-shell {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 16px;
    min-height: 640px;
}
.game-nav {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px;
    backdrop-filter: blur(16px);
    animation: rise .55s ease both;
}
.game-nav .who { margin-bottom: 14px; display: grid; gap: 6px; }
.game-nav .who strong { font-family: var(--display); font-size: 22px; }
.chip {
    display: inline-flex; width: max-content;
    padding: 3px 10px; border-radius: 999px;
    background: rgba(124, 240, 210, .12);
    color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .08em;
    text-transform: uppercase;
}
.stat-card {
    padding: 12px;
    border-radius: 16px;
    margin-bottom: 12px;
}
.stat-card.accent { background: linear-gradient(180deg, rgba(243,193,107,.1), rgba(255,255,255,.02)); }
.stat-row, .bar-label {
    display: flex; justify-content: space-between;
    font-size: 13px; margin: 6px 0;
    color: var(--muted);
}
.stat-row b, .bar-label b { color: var(--text); }
.stat-row.hl b { color: var(--gold); }
.bar {
    height: 8px; border-radius: 99px;
    background: rgba(255,255,255,.08);
    overflow: hidden; margin-bottom: 8px;
}
.bar i {
    display: block; height: 100%; width: 0;
    border-radius: inherit;
    animation: fillbar .8s .2s ease forwards;
}
.bar i.hp { background: linear-gradient(90deg, #ff6b7a, #ffb3a3); }
.bar i.en { background: linear-gradient(90deg, #5aa7ff, #7cf0d2); }
.bar i.xp { background: linear-gradient(90deg, #c4842a, var(--gold)); }
@keyframes fillbar { to { width: var(--p); } }

.side-links { display: grid; gap: 6px; margin-top: 8px; }
.side-links a {
    color: var(--text); text-decoration: none;
    padding: 9px 12px; border-radius: 12px;
    background: rgba(255,255,255,.03);
    border: 1px solid var(--line);
    transition: .2s;
}
.side-links a:hover { background: rgba(243,193,107,.12); border-color: rgba(243,193,107,.3); transform: translateX(3px); }
.side-links a.out { color: var(--danger); }

.game-main {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    backdrop-filter: blur(16px);
}
.game-main .lead { padding: 14px 16px 0; color: var(--muted); }

.actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 14px 16px 20px;
}
.actions button {
    width: 100%;
    text-align: left;
    background: rgba(255,255,255,.04);
    color: var(--text);
    box-shadow: none;
    border: 1px solid var(--line);
    display: block;
}
.actions button strong { display: block; font-size: 15px; color: var(--gold-2); }
.actions button span { font-size: 12px; color: var(--muted); font-weight: 500; }
.actions button:hover { background: rgba(243,193,107,.1); }
.actions button:disabled { opacity: .4; cursor: not-allowed; transform: none; }

.jail-stat b,
.jail-banner strong {
    font-variant-numeric: tabular-nums;
    letter-spacing: .04em;
}
.jail-stat { color: var(--danger) !important; }
.jail-banner {
    animation: jailflash 1s ease-in-out infinite;
    font-weight: 700;
}
.jail-lock,
.jail-lock strong,
.jail-lock span,
a.jail-lock,
button.jail-lock {
    color: var(--danger) !important;
    text-decoration: line-through !important;
    text-decoration-thickness: 2px !important;
    animation: jailflash 1.05s ease-in-out infinite;
}
button.jail-lock {
    border-color: rgba(255, 107, 122, .55) !important;
    background: rgba(255, 107, 122, .08) !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
    transform: none !important;
}
@keyframes jailflash {
    0%, 100% { opacity: 1; filter: brightness(1); }
    50% { opacity: .45; filter: brightness(1.35); }
}

.log { list-style: none; margin: 0; padding: 0 16px 24px; }
.log li { padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.log time { display: block; font-size: 11px; color: var(--muted); }
.log .fail { color: var(--danger); }

.pub-box {
    margin: 14px 16px;
    padding: 16px;
    border-radius: 16px;
    animation: rise .45s ease both;
}
.pub-box.machine { background: rgba(255,255,255,.03); }
.pub-box.skill { background: linear-gradient(90deg, rgba(243,193,107,.08), transparent); }
.next-hint { color: var(--accent); font-weight: 700; }
.pub-box h3 { margin: 0 0 10px; font-family: var(--display); font-size: 18px; }
.open-line { display: flex; gap: 8px; align-items: center; justify-content: flex-start; font-weight: 700; }
form.inline { display: inline; }
form.inline .qty { width: 70px; display: inline-block; margin-right: 6px; }
button.linkish {
    background: none; border: 0; color: var(--gold);
    cursor: pointer; text-decoration: none; font: inherit; padding: 0;
    box-shadow: none; margin: 0;
}
.craft { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.craft select { min-width: min(100%, 320px); }
.recipes .locked { opacity: .4; }
.inv { columns: 2; color: var(--muted); }
.floors { color: var(--muted); }
.floors .on { color: var(--text); font-weight: 700; }
.floors .dim { opacity: .55; }
.bank-grid {
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    gap: 12px;
    padding: 0 16px;
}
.bank-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: end;
    margin-bottom: 14px;
}
.bank-form label { flex: 1; min-width: 220px; }
.bank-form .inputfield { margin-top: 6px; }
.bank-art { display: grid; place-items: center; text-align: center; }
hr.soft { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }
@media (max-width: 800px) { .bank-grid { grid-template-columns: 1fr; } }

.ranks-layout {
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 18px;
}
.you-are { margin: 0 0 12px; color: var(--gold); }
.first-card {
    display: flex; gap: 14px; align-items: center;
    padding: 14px; margin-bottom: 14px;
    border: 1px solid rgba(243,193,107,.35);
    border-radius: 16px;
    background: linear-gradient(90deg, rgba(243,193,107,.16), transparent);
}
.first-card .place {
    font-family: var(--display); font-size: 32px; color: var(--gold);
}
.rank-index h3, .rank-index h4 { margin: 0 0 8px; font-family: var(--display); }
.rank-index h4 { margin-top: 14px; color: var(--muted); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.rank-index ul { list-style: none; margin: 0; padding: 0; }
.rank-index li { display: grid; gap: 2px; margin-bottom: 8px; }
.rank-index a { color: var(--text); text-decoration: none; font-weight: 700; }
.rank-index a.on { color: var(--gold); }
.rank-index .who { color: var(--muted); font-size: 12px; }
.grid tr.is-me td { background: rgba(243,193,107,.12); color: var(--gold-2); }
@media (max-width: 900px) { .ranks-layout { grid-template-columns: 1fr; } }

code { background: rgba(255,255,255,.06); padding: 1px 6px; border-radius: 6px; }

@keyframes rise {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
}
@keyframes drop {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: none; }
}
@keyframes toast {
    from { opacity: 0; transform: translateY(-8px) scale(.98); }
    to { opacity: 1; transform: none; }
}
@keyframes unfold {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: none; }
}

.reveal > * { animation: rise .5s ease both; }
.reveal > *:nth-child(2) { animation-delay: .05s; }
.reveal > *:nth-child(3) { animation-delay: .1s; }
.reveal > *:nth-child(4) { animation-delay: .15s; }

@media (max-width: 980px) {
    #content-wrap, .game-shell { grid-template-columns: 1fr; }
    #rightbar { display: none; }
    .actions { grid-template-columns: 1fr; }
    #topnav { border-radius: 20px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
    }
    .bar i { width: var(--p); }
}

.hint { color: var(--text); opacity: .92; }
.stamp {
    display: block;
    color: #fff;
    text-shadow: 0 1px 0 #000, 0 0 8px #0008;
    font-weight: 800;
}
.help-card {
    margin: 12px 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #141a28;
}
.help-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: #1d2638;
    border-radius: 16px 16px 0 0;
}
.help-toggle, .help-open {
    border: 1px solid var(--line);
    background: #2a354c;
    color: #fff;
    border-radius: 999px;
    padding: 6px 12px;
    font-weight: 800;
    cursor: pointer;
}
.help-body { padding: 12px 14px 16px; color: #fff; }
.help-body p { margin: 0 0 8px; }
.help-card.is-closed .help-body { display: none; }
.help-card.is-closed .help-bar { border-radius: 16px; }
.drink-list { display: grid; gap: 8px; }
.drink-card { margin: 0; }
.drink-hit {
    width: 100%;
    text-align: left;
    display: grid;
    gap: 4px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid #3a4763;
    background: #1a2233;
    color: #fff;
    cursor: pointer;
    box-shadow: none;
    margin: 0;
}
.drink-hit:hover { border-color: var(--gold); background: #243049; transform: none; }
.drink-hit:disabled { opacity: .45; cursor: not-allowed; }
.drink-hit .name { font-size: 16px; }
.drink-hit .meta, .drink-hit .need { font-size: 13px; color: #e8eefc; font-weight: 700; }
.drink-hit .go { color: var(--gold); }
.toast-stack {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 50;
    display: grid;
    gap: 8px;
}
.toast {
    min-width: 220px;
    max-width: 360px;
    padding: 10px 14px;
    border-radius: 12px;
    background: #1b2436;
    color: #fff;
    border: 1px solid #3d4b66;
    box-shadow: var(--shadow);
}
.toast.ok { border-color: var(--ok); }
.toast.err { border-color: var(--danger); color: #ffd4d8; }
.toast-n { color: #ff4d5e; font-weight: 800; }
.xp-pop {
    display: none;
    min-width: 88px;
    text-align: center;
    margin: 0;
    padding: 4px 12px;
    border: 2px solid #ff8a2a;
    border-radius: 999px;
    color: #ffb15a;
    font-weight: 800;
    background: rgba(255, 138, 42, .12);
}
.xp-pop.is-on { display: inline-block; position: relative; z-index: 2; }

.mix-stage {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-height: 150px;
    margin: 8px 0 4px;
}
.glass {
    width: 72px;
    display: grid;
    justify-items: center;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    transform-origin: 50% 90%;
}
.glass-rim {
    width: 54px;
    height: 4px;
    border-radius: 4px 4px 0 0;
    background: rgba(255,255,255,.35);
}
.glass-bowl {
    width: 54px;
    height: 78px;
    clip-path: polygon(6% 0, 94% 0, 72% 100%, 28% 100%);
    background: linear-gradient(180deg, rgba(255,255,255,.18), rgba(255,255,255,.04));
    border: 1px solid rgba(255,255,255,.28);
    position: relative;
    overflow: hidden;
}
.liquid {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: var(--fill, 20%);
    background: linear-gradient(180deg, #ffc46a 0%, #e88920 55%, #c45a10 100%);
    box-shadow: inset 0 8px 12px rgba(255,255,255,.35);
}
.liquid i {
    position: absolute;
    bottom: 10px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,.45);
    opacity: 0;
}
.liquid i:nth-child(1) { left: 28%; animation-delay: 0s; }
.liquid i:nth-child(2) { left: 48%; animation-delay: .4s; }
.liquid i:nth-child(3) { left: 62%; animation-delay: .8s; }
.glass-stem {
    width: 6px;
    height: 28px;
    background: linear-gradient(90deg, rgba(255,255,255,.15), rgba(255,255,255,.4), rgba(255,255,255,.12));
}
.glass-foot {
    width: 36px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,.28);
}
.glass.pour { animation: slosh 1s ease; }
.glass.pour .liquid { animation: splash 1s ease; }
.glass.pour .liquid i { animation: bubble 1s ease-in; }
@keyframes slosh {
    0% { transform: translateX(-50%) rotate(0); }
    25% { transform: translateX(-50%) rotate(-12deg) translateY(-3px); }
    50% { transform: translateX(-50%) rotate(10deg) translateY(-2px); }
    75% { transform: translateX(-50%) rotate(-5deg); }
    100% { transform: translateX(-50%) rotate(0); }
}
@keyframes splash {
    0% { height: var(--fill, 20%); }
    40% { height: calc(var(--fill, 20%) + 14%); }
    100% { height: var(--fill, 20%); }
}
@keyframes bubble {
    0% { transform: translateY(0); opacity: .7; }
    100% { transform: translateY(-42px); opacity: 0; }
}
.xp-flash { animation: xpflash .28s ease; }
@keyframes xpflash {
    0% { transform: scale(1.15); color: #fff; }
    100% { transform: scale(1); }
}
.profile-grid {
    display: grid;
    grid-template-columns: 200px 1fr;
    align-items: start;
    gap: 16px;
    padding: 12px 16px 18px;
}
.look-bar {
    grid-column: 1 / -1;
    margin: 0;
    padding: 0;
}
.look-toggle {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: 0;
    background: transparent;
    color: #fff;
    font-weight: 800;
    font-size: 16px;
    cursor: pointer;
    text-align: left;
}
.look-toggle span { font-size: 12px; font-weight: 700; color: #c9d4ea; }
.look-body { display: none; padding: 0 16px 16px; }
.look-bar.is-open .look-body { display: block; }
.profile-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
    padding: 16px 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #141a28;
    height: fit-content;
}
.avatar-wrap { width: 96px; height: 96px; flex: 0 0 96px; }
.avatar-img, .avatar-fallback {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ff8a2a;
}
.avatar-fallback {
    display: grid;
    place-items: center;
    font: 800 36px/1 var(--display);
    background: #2a354c;
    color: #fff;
}
.profile-name { font-size: 17px; margin-top: 2px; }
.role-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    max-width: max-content;
    border-radius: 999px;
    padding: 3px 12px;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.3;
}
.role-admin { background: #3a2414; color: #ffb15a; border: 1px solid #ff8a2a66; }
.role-mod { background: #12335a; color: #8ec5ff; }
.role-user { background: #1d2a22; color: #8ee0b0; }
.avatar-form { display: grid; gap: 6px; width: 100%; margin-top: 6px; }
.avatar-form input[type=file] { display: none; }
.file-btn, .avatar-form .tiny, .profile-fields button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin: 0;
    padding: 7px 10px;
    border-radius: 10px;
    border: 1px solid #3a4763;
    background: #1e2738;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    box-shadow: none;
    cursor: pointer;
}
.file-btn:hover, .avatar-form .tiny:hover, .profile-fields button:hover {
    background: #2a354c;
    transform: none;
    filter: none;
}
.profile-fields { display: grid; gap: 12px; }
.profile-fields .pub-box { margin: 0; }
.profile-fields h3 { margin: 0 0 8px; }
.profile-fields label { display: grid; gap: 4px; margin: 0 0 10px; color: #fff; font-weight: 700; }
.profile-fields input {
    background: #0e1420;
    color: #fff;
    border: 1px solid #3a4763;
    border-radius: 8px;
    padding: 8px 10px;
    width: 100%;
}
.profile-fields button { width: auto; padding: 7px 14px; }
@media (max-width: 800px) {
    .profile-grid { grid-template-columns: 1fr; }
}
.look-box h3 { margin-top: 12px; }
.look-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 12px; }
.look-card, .swatch {
    display: grid;
    justify-items: center;
    gap: 6px;
    padding: 8px;
    border: 1px solid #3a4763;
    border-radius: 10px;
    background: #121826;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    min-width: 86px;
}
.look-card.on, .swatch.on { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.look-card input, .swatch input { display: none; }
.mini {
    width: 64px;
    height: 44px;
    border: 1px solid #667;
    background: #d9d3c6;
    position: relative;
}
.mini::before, .mini::after {
    content: "";
    position: absolute;
    background: #8ea0c4;
}
.mini-left::before { left: 0; top: 0; bottom: 0; width: 18px; }
.mini-right::before { right: 0; top: 0; bottom: 0; width: 18px; }
.mini-top::before { left: 0; right: 0; top: 0; height: 12px; }
.mini-compact::before { left: 0; top: 0; bottom: 0; width: 10px; }
.mini-compact::after { left: 12px; top: 6px; right: 6px; height: 8px; background: #b7c2d8; }
.swatch span {
    width: 52px;
    height: 36px;
    border: 1px solid #555;
    background: linear-gradient(135deg, var(--a) 55%, var(--b) 55%);
}
.icon-opts { display: flex; gap: 16px; margin: 4px 0 12px; color: #fff; font-weight: 700; }
.look-preview { display: grid; gap: 8px; margin: 0 0 14px; }
.preview-stage {
    height: 92px;
    border-radius: 12px;
    border: 1px solid #3a4763;
    background: #0b0f18;
    display: grid;
    grid-template-columns: 28px 1fr;
    overflow: hidden;
}
.preview-nav { background: #1b2436; }
.preview-main { background: #121826; }
.preview-stage.layout-right { grid-template-columns: 1fr 28px; }
.preview-stage.layout-right .preview-nav { order: 2; }
.preview-stage.layout-top { grid-template-columns: 1fr; grid-template-rows: 18px 1fr; }
.preview-stage.layout-compact { grid-template-columns: 16px 1fr; }
.preview-stage.theme-moss { background: #07140c; }
.preview-stage.theme-moss .preview-nav { background: #16321c; }
.preview-stage.theme-moss .preview-main { background: #102016; }
.preview-stage.theme-blood { background: #14080a; }
.preview-stage.theme-blood .preview-nav { background: #3a1418; }
.preview-stage.theme-blood .preview-main { background: #1a0c10; }
.preview-stage.theme-ink { background: #0a0a0a; }
.preview-stage.theme-ink .preview-nav { background: #222; }
.preview-stage.theme-ink .preview-main { background: #161616; }
.preview-stage.theme-neon { background: #0c0612; }
.preview-stage.theme-neon .preview-nav { background: #3a1450; }
.preview-stage.theme-neon .preview-main { background: #16081c; }
.preview-stage.theme-gold { background: #100c06; }
.preview-stage.theme-gold .preview-nav { background: #3a2c12; }
.preview-stage.theme-gold .preview-main { background: #1a1408; }
.preview-stage.no-icons .preview-nav { opacity: .55; }
.look-now { margin: 0; color: #fff; font-weight: 700; }

body.theme-moss { --bg: #07140c; --bg-2: #102016; --accent: #6dca7a; --gold: #c6e38a; }
body.theme-blood { --bg: #14080a; --bg-2: #1a0c10; --accent: #e35d5d; --gold: #ff8a7a; }
body.theme-ink { --bg: #0a0a0a; --bg-2: #161616; --accent: #d0d0d0; --gold: #f0f0f0; --text: #f2f2f2; }
body.theme-neon { --bg: #0c0612; --bg-2: #16081c; --accent: #ff4ad8; --gold: #7cf0ff; }
body.theme-gold { --bg: #100c06; --bg-2: #1a1408; --accent: #f3c16b; --gold: #ffd58a; }

body.layout-right .game-shell { grid-template-columns: 1fr 280px; }
body.layout-right .game-nav { order: 2; }
body.layout-compact .game-shell { grid-template-columns: 210px 1fr; }
body.layout-top .game-shell { grid-template-columns: 1fr; }
body.layout-top .game-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}
body.layout-top .game-nav .stat-card { display: none; }
body.layout-top .game-nav .side-links { display: flex; flex-wrap: wrap; gap: 8px; }
body.layout-top .game-nav .side-links a { width: auto; }
body.icons-off .orb, body.icons-off .chip, body.icons-off .ico { display: none; }
.ico {
    display: inline-flex;
    width: 14px;
    height: 14px;
    margin-right: 7px;
    vertical-align: -2px;
    flex: 0 0 14px;
}
.ico svg { width: 14px; height: 14px; fill: currentColor; }
.side-links a, .goto a { display: flex; align-items: center; }

.classic-craft {
    display: grid;
    justify-items: center;
    gap: 8px;
    text-align: center;
}
.classic-select {
    width: min(100%, 560px);
    min-height: 0;
    height: auto;
    background: #fff;
    color: #111;
    border: 1px solid #4a4a4a;
    padding: 4px 8px;
    font: 14px/1.45 Tahoma, "Segoe UI", sans-serif;
    border-radius: 2px;
}
.classic-select option:disabled { color: #888; }
.classic-go {
    background: #e7e7e7;
    color: #111;
    border: 1px solid #888;
    border-radius: 4px;
    box-shadow: none;
    font: 14px Tahoma, sans-serif;
    padding: 4px 12px;
    margin: 0;
}
.classic-go:hover { filter: none; transform: none; background: #fff; }
.classic-stats {
    margin-top: 16px;
    color: #fff;
    font-weight: 700;
    line-height: 1.7;
    text-align: center;
}
.machine-title {
    text-align: center;
    background: #2b4a6e;
    color: #fff;
    padding: 8px 12px;
    margin: -16px -16px 16px;
    border-radius: 16px 16px 0 0;
}
