@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
    color-scheme: light;
    --ink: #23352c;
    --muted: #647469;
    --paper: #fbfaf5;
    --canvas: #e1eddc;
    --line: #c8d8c3;
    --green: #34764d;
    --green-dark: #194a32;
    --lime: #c8e65f;
    --orange: #d96643;
    --blue: #58b6bd;
    --pixel: 'DM Mono', monospace;
    --sans: 'Manrope', sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; color: var(--ink); background: var(--canvas); font-family: var(--sans); }
body.theme-night { --ink: #213346; --muted: #63778c; --paper: #f4f7f8; --canvas: #cfdeea; --line: #afc3d2; --green: #2f6a85; --green-dark: #193b52; --lime: #e9ca57; --orange: #cb684d; --blue: #4c9cb7; --profile-sky: #243b59; --profile-ridge: #416688; --profile-orb: #f0dfa9; }
body.theme-aurora { --ink: #173e3a; --muted: #54746a; --paper: #f5fbf2; --canvas: #cbe8dc; --line: #a8d4c4; --green: #168372; --green-dark: #09584f; --lime: #cbed64; --orange: #e17442; --blue: #38bcb9; --profile-sky: #287d78; --profile-ridge: #23665c; --profile-orb: #f3d777; }
body.theme-tower { --ink: #313d41; --muted: #687579; --paper: #faf9f4; --canvas: #d9dfdc; --line: #b7c4c0; --green: #537578; --green-dark: #344f53; --lime: #edc852; --orange: #c96c49; --blue: #66a8ae; --profile-sky: #a8c2c0; --profile-ridge: #6f8583; --profile-orb: #f1d58a; }
body.theme-mesa { --ink: #482e2a; --muted: #82625a; --paper: #fff7ef; --canvas: #f0d1ba; --line: #dcad91; --green: #a14e39; --green-dark: #6b352a; --lime: #f1d66b; --orange: #db5738; --blue: #559ca1; --profile-sky: #dc9871; --profile-ridge: #a94f3b; --profile-orb: #f3d16a; }
body.theme-marsh { --ink: #243c32; --muted: #5c7565; --paper: #f4f8e9; --canvas: #d3e2b8; --line: #abc78d; --green: #4f812f; --green-dark: #315522; --lime: #d3ed59; --orange: #dc7441; --blue: #4ea9a1; --profile-sky: #527e65; --profile-ridge: #365d45; --profile-orb: #e8d57d; }
body.theme-frost { --ink: #243d50; --muted: #607d8d; --paper: #f5fbfc; --canvas: #cde4ed; --line: #a6cfdb; --green: #317c91; --green-dark: #205567; --lime: #d5e878; --orange: #d7774e; --blue: #50b5d1; --profile-sky: #83c2d5; --profile-ridge: #5596b0; --profile-orb: #f3da91; }
button, input, select, textarea { font: inherit; }
button, a, select, input[type="checkbox"] { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(380px, 0.88fr) 1.12fr; background: var(--paper); }
.login-panel { width: min(480px, calc(100% - 64px)); align-self: center; justify-self: center; padding: 52px 0; animation: rise-in .65s ease both; }
.brand-mark { display: grid; place-items: center; width: 45px; height: 45px; color: var(--green-dark); background: var(--lime); border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); font-size: 23px; }
.eyebrow, .section-kicker { margin: 0 0 10px; color: var(--green); font: 500 11px var(--pixel); letter-spacing: 0; text-transform: uppercase; }
.login-panel .eyebrow { margin-top: 48px; }
h1, h2, h3, p { margin-top: 0; }
.login-panel h1 { margin-bottom: 18px; font-size: clamp(48px, 6vw, 76px); line-height: .98; letter-spacing: 0; font-weight: 800; }
.login-panel h1 span, .brand-small > span { color: var(--orange); }
.login-copy { max-width: 360px; margin-bottom: 34px; color: var(--muted); font-size: 15px; line-height: 1.8; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; width: 100%; min-height: 48px; border: 1px solid transparent; padding: 12px 18px; text-decoration: none; font-size: 13px; font-weight: 800; cursor: pointer; transition: transform .16s, box-shadow .16s, background .16s; }
.button:hover { transform: translateY(-2px); box-shadow: 0 5px 0 rgba(35,53,44,.16); }
.button-discord { color: #fff; background: #5865f2; }
.button-primary { color: #fff; background: var(--green-dark); }
.button-secondary { color: var(--ink); background: var(--lime); }
.register-link { display: block; margin: 19px 0 0; text-align: center; color: var(--green-dark); font-size: 13px; font-weight: 800; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.fine-print { margin: 34px 0 0; color: #899389; font: 10px var(--pixel); }
.login-art { position: relative; min-height: 100vh; overflow: hidden; background: #a8d1c0; }
.login-art::before { position: absolute; inset: 0; content: ''; opacity: .25; background-image: linear-gradient(90deg, transparent 95%, rgba(35,53,44,.2) 96%), linear-gradient(transparent 95%, rgba(35,53,44,.2) 96%); background-size: 48px 48px; }
.sun { position: absolute; top: 17%; right: 20%; width: 116px; aspect-ratio: 1; background: #f1d17b; box-shadow: 12px 12px 0 rgba(255,255,255,.24); }
.mountain { position: absolute; bottom: 0; width: 115%; height: 60%; clip-path: polygon(0 64%, 14% 43%, 25% 59%, 46% 11%, 66% 54%, 80% 29%, 100% 63%, 100% 100%, 0 100%); }
.mountain-back { left: -8%; background: #6f9f83; }
.mountain-front { left: 4%; height: 43%; background: #3f7559; clip-path: polygon(0 51%, 13% 20%, 27% 55%, 43% 23%, 57% 60%, 75% 12%, 100% 54%, 100% 100%, 0 100%); }
.art-caption { position: absolute; left: 10%; bottom: 9%; color: white; text-shadow: 0 2px 12px rgba(20,47,33,.2); }
.art-caption span { display: block; margin-bottom: 16px; font: 11px var(--pixel); }
.art-caption strong { font-size: clamp(30px, 4vw, 52px); line-height: 1.12; }
.setup-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(ellipse at 80% 8%, #d5e5c5 0, transparent 38%), var(--canvas); }
.setup-box { width: min(520px, 100%); padding: 40px; background: var(--paper); border: 1px solid var(--line); box-shadow: 8px 8px 0 #d5dccd; animation: rise-in .5s ease both; }
.brand-small { color: var(--ink); font: 800 20px var(--sans); text-decoration: none; }
.brand-small i { margin-left: 8px; color: var(--muted); font: 10px var(--pixel); font-style: normal; }
.setup-box .eyebrow { margin-top: 45px; }
.setup-box h1, .page-heading h1 { margin-bottom: 12px; font-size: 38px; line-height: 1.12; letter-spacing: 0; }
.setup-box > p:not(.eyebrow) { color: var(--muted); font-size: 14px; line-height: 1.7; }
.stack-form { display: grid; gap: 14px; }
.stack-form label { display: grid; gap: 7px; color: var(--ink); font-size: 12px; font-weight: 800; }
.stack-form input, .stack-form select, .stack-form textarea, .choice-form select, .equip-form select { width: 100%; min-height: 42px; padding: 10px 11px; color: var(--ink); background: #fff; border: 1px solid #cfd8ca; border-radius: 0; outline: none; }
.stack-form input:focus, .stack-form select:focus, .stack-form textarea:focus, .choice-form select:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(62,119,91,.12); }
.stack-form textarea { resize: vertical; }
.stack-form input[type="file"] { font-size: 11px; }
.logout-form { margin-top: 18px; }
.text-button { padding: 0; color: var(--muted); background: none; border: 0; font-size: 12px; text-decoration: underline; cursor: pointer; }
.notice { padding: 11px 13px; border-left: 3px solid var(--green); color: var(--green-dark); background: #edf5e7; font-size: 12px; }
.notice.error { border-color: var(--orange); color: #85442d; background: #fff0e9; }
.topbar { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 0 max(5vw, 24px); background: var(--paper); border-bottom: 1px solid var(--line); }
.topbar nav { display: flex; align-self: stretch; gap: 30px; }
.topbar nav a { display: grid; align-items: center; color: var(--muted); border-bottom: 2px solid transparent; font-size: 12px; font-weight: 800; text-decoration: none; }
.topbar nav a.active { color: var(--green-dark); border-color: var(--green); }
.account { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 11px; }
.account form { display: flex; }
.icon-button { width: 33px; height: 33px; color: var(--ink); background: transparent; border: 1px solid var(--line); cursor: pointer; }
.notice-bar { max-width: 1220px; margin: 16px auto 0; padding: 10px 14px; font-size: 12px; }
.character-page, .admin-page { max-width: 1220px; margin: auto; padding: 38px 28px 24px; animation: rise-in .45s ease both; }
.page-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 23px; }
.page-heading h1 { margin-bottom: 0; font-size: 34px; }
.divider { padding: 0 6px; color: #b4bdb2; }
.level-stamp { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 70px; height: 70px; color: var(--green-dark); background: var(--lime); border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); font: 9px var(--pixel); }
.level-stamp b { font: 800 26px var(--sans); }
.xp-strip { display: grid; grid-template-columns: 1fr auto; gap: 8px 24px; align-items: center; margin-bottom: 18px; padding: 16px 20px; background: var(--green-dark); color: white; }
.xp-top { display: flex; justify-content: space-between; font: 10px var(--pixel); }
.xp-top strong { font: 500 12px var(--pixel); }
.xp-top small { color: #b9d5c1; font-size: 10px; }
.xp-track { grid-column: 1 / -1; height: 7px; overflow: hidden; background: rgba(255,255,255,.2); }
.xp-track span { display: block; height: 100%; background: var(--lime); transition: width .45s ease; }
.xp-strip > p { grid-column: 1 / -1; margin: 0; color: #c2d6ca; font: 9px var(--pixel); text-align: right; }
.level-choice { display: flex; align-items: center; justify-content: space-between; gap: 25px; margin-bottom: 18px; padding: 18px 20px; background: #e6efcc; border-left: 4px solid #8da93d; }
.level-choice h2 { margin: 0 0 4px; font-size: 18px; }
.level-choice p:not(.section-kicker) { margin: 0; color: var(--muted); font-size: 12px; }
.level-choice .section-kicker { margin-bottom: 5px; color: #667d2b; }
.choice-form { display: flex; width: min(510px, 58%); gap: 8px; }
.choice-form select { min-width: 0; }
.choice-form .button { width: auto; flex: 0 0 auto; }
.inventory-layout { display: grid; grid-template-columns: minmax(310px, .8fr) minmax(470px, 1.2fr); align-items: start; gap: 18px; }
.paper { background: var(--paper); border: 1px solid var(--line); }
.character-card, .gear-card { padding: 19px; }
.card-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-heading .section-kicker { margin-bottom: 4px; }
.card-heading h2 { margin: 0; font-size: 18px; }
.online-dot { width: 9px; height: 9px; border-radius: 50%; background: #7da85a; box-shadow: 0 0 0 4px #e5efdc; }
.skin-stage { position: relative; display: grid; place-items: end center; height: 206px; margin: 16px -19px 0; overflow: hidden; background: var(--profile-sky, #a8d1c0); }
.skin-grid { position: absolute; inset: 0; z-index: 1; opacity: .2; background-image: linear-gradient(90deg, transparent 94%, rgba(24,53,42,.38) 95%), linear-gradient(transparent 94%, rgba(24,53,42,.38) 95%); background-size: 24px 24px; }
.profile-backdrop { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.profile-orb { position: absolute; top: 25px; right: 17%; width: 39px; height: 39px; background: var(--profile-orb, #f1d17b); box-shadow: 7px 7px 0 rgba(255,255,255,.2); }
.profile-ridge { position: absolute; right: -8%; bottom: -14px; left: -8%; height: 78px; background: var(--profile-ridge, #3f7559); clip-path: polygon(0 52%, 14% 14%, 28% 54%, 44% 0, 60% 49%, 77% 10%, 100% 50%, 100% 100%, 0 100%); }
.profile-keep { display: none; position: absolute; right: 25%; bottom: 36px; width: 38px; height: 96px; background: #697a78; border: 4px solid #465c5b; clip-path: polygon(0 14%, 18% 14%, 18% 0, 39% 0, 39% 14%, 61% 14%, 61% 0, 82% 0, 82% 14%, 100% 14%, 100% 100%, 0 100%); }
.profile-keep::after { position: absolute; top: 24px; right: 8px; left: 8px; height: 9px; content: ''; background: #dfd59e; box-shadow: 0 24px #dfd59e, 0 48px #dfd59e; }
.skin-stage img { position: relative; z-index: 2; width: auto; max-width: 180px; height: 190px; object-fit: contain; image-rendering: pixelated; }
.skin-stage .skin-viewer { position: absolute; inset: 0; z-index: 2; display: block; width: 100% !important; height: 100% !important; cursor: grab; touch-action: none; }
.skin-stage .skin-viewer:active { cursor: grabbing; }
.skin-stage .skin-viewer[hidden] { display: none !important; }
.skin-stage .skin-fallback { position: relative; z-index: 2; }
.skin-rotate-button { position: absolute; top: 9px; right: 9px; z-index: 3; display: grid; place-items: center; width: 34px; height: 34px; padding: 0; color: var(--ink); background: var(--paper); border: 1px solid var(--line); font-size: 21px; cursor: pointer; }
.skin-rotate-button[hidden] { display: none; }
.skin-rotate-button:disabled { opacity: .55; cursor: default; }
.character-level { display: flex; align-items: center; justify-content: space-between; margin: 11px 0 19px; padding-bottom: 13px; border-bottom: 1px solid var(--line); color: var(--muted); font: 9px var(--pixel); }
.character-level strong { color: var(--ink); font: 800 20px var(--sans); }
.stat-list > .section-kicker { margin-bottom: 10px; }
.stat-row { display: grid; grid-template-columns: 92px 1fr 48px; align-items: center; gap: 8px; min-height: 29px; font-size: 11px; }
.stat-row > span { color: #526258; }
.stat-row strong { text-align: right; font: 500 10px var(--pixel); }
.stat-row strong small { color: var(--green); font-size: 8px; }
.stat-meter { height: 6px; background: #e7ebe3; }
.stat-meter i { display: block; height: 100%; background: var(--green); }
.luck-row { display: flex; align-items: center; justify-content: space-between; margin-top: 13px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12px; font-weight: 800; }
.luck-icon { margin-right: 5px; color: #c68a43; }
.luck-form { display: flex; }
.switch { position: relative; display: inline-block; width: 38px; height: 21px; }
.switch input { width: 0; height: 0; opacity: 0; }
.switch span { position: absolute; inset: 0; background: #cbd1c9; cursor: pointer; transition: .2s; }
.switch span::before { position: absolute; left: 3px; bottom: 3px; width: 15px; height: 15px; content: ''; background: white; transition: .2s; }
.switch input:checked + span { background: var(--green); }
.switch input:checked + span::before { transform: translateX(17px); }
.gear-count, .backpack-heading span { color: var(--muted); font: 9px var(--pixel); }
.gear-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-top: 16px; }
.gear-slot { min-width: 0; padding: 11px; background: #f0f1eb; border: 1px solid #e3e6de; }
.gear-slot-label { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; color: #69776e; font-size: 10px; font-weight: 800; }
.slot-glyph { display: grid; place-items: center; width: 24px; height: 24px; color: var(--green-dark); background: #dce8d7; font: 9px var(--pixel); }
.equipped-item { display: flex; align-items: center; gap: 9px; min-height: 52px; }
.equipped-item img, .item-placeholder { flex: 0 0 38px; width: 38px; height: 38px; object-fit: contain; image-rendering: pixelated; }
.item-placeholder { display: grid; place-items: center; color: #9b7d45; background: #e9e1c9; font-size: 19px; }
.equipped-item strong { display: block; overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.equipped-item p { display: -webkit-box; overflow: hidden; margin: 3px 0 0; color: var(--muted); font-size: 9px; line-height: 1.4; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.empty-slot { display: grid; min-height: 52px; place-items: center; color: #a0a99f; font: 9px var(--pixel); }
.equip-form { display: flex; gap: 5px; margin-top: 8px; }
.equip-form select { min-width: 0; min-height: 31px; padding: 5px 6px; font-size: 9px; }
.equip-form button { flex: 0 0 31px; color: white; background: var(--green); border: 0; cursor: pointer; }
.backpack-heading { display: flex; align-items: center; justify-content: space-between; margin-top: 19px; padding-top: 14px; border-top: 1px solid var(--line); }
.backpack-heading h3 { margin: 0; font-size: 13px; }
.item-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 8px; margin-top: 11px; }
.bag-item { min-width: 0; padding: 8px 5px; text-align: center; background: #f0f1eb; border: 1px solid #e3e6de; }
.bag-item img, .bag-item .item-placeholder { display: grid; width: 40px; height: 40px; margin: 0 auto 6px; object-fit: contain; image-rendering: pixelated; }
.bag-item > span:last-child { display: block; overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.empty-bag { margin: 12px 0 0; color: var(--muted); font-size: 11px; }
.page-footer { padding: 25px 0 4px; color: #879186; font: 9px var(--pixel); text-align: center; }
.page-footer span { padding: 0 8px; color: var(--orange); }
.admin-page { max-width: 1100px; }
.admin-tag { padding: 8px 10px; color: #764c2f; background: #f4dfbe; font: 9px var(--pixel); }
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.admin-section { padding: 20px; background: var(--paper); border: 1px solid var(--line); }
.admin-section h2 { margin-bottom: 15px; font-size: 19px; }
.admin-section hr { margin: 22px 0; border: 0; border-top: 1px solid var(--line); }
.muted { color: var(--muted); font-weight: 500; }
.player-list { grid-column: 1 / -1; }
.player-row { display: flex; justify-content: space-between; gap: 15px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 12px; }
.player-row small { color: var(--muted); font: 9px var(--pixel); }
.chapter-scene { position: relative; height: 190px; overflow: hidden; isolation: isolate; background: #a8d1c0; }
.chapter-scene::before { position: absolute; inset: 0; z-index: -1; content: ''; opacity: .26; background-image: linear-gradient(90deg, transparent 94%, rgba(35,53,44,.25) 95%), linear-gradient(transparent 94%, rgba(35,53,44,.25) 95%); background-size: 32px 32px; }
.chapter-scene::after { position: absolute; right: -5%; bottom: -42px; left: -5%; z-index: -1; height: 118px; content: ''; background: #6f9f83; clip-path: polygon(0 50%, 14% 16%, 29% 52%, 45% 0, 62% 49%, 78% 12%, 100% 52%, 100% 100%, 0 100%); }
.scene-sun { position: absolute; top: 28px; right: 48px; width: 42px; height: 42px; background: #f1d17b; box-shadow: 7px 7px 0 rgba(255,255,255,.22); }
.scene-horizon { position: absolute; right: -5%; bottom: -63px; left: -5%; z-index: 0; height: 105px; background: #3f7559; clip-path: polygon(0 43%, 16% 11%, 33% 52%, 49% 19%, 65% 53%, 80% 0, 100% 48%, 100% 100%, 0 100%); }
.scene-forest { background: #a8d1c0; }
.scene-night { background: #1c2938; }
.scene-night::before { opacity: .72; background-image: radial-gradient(#f3e7ae 1px, transparent 1.5px), radial-gradient(#a7d0cc 1px, transparent 1.5px), linear-gradient(90deg, transparent 94%, rgba(255,255,255,.08) 95%), linear-gradient(transparent 94%, rgba(255,255,255,.08) 95%); background-position: 12px 18px, 70px 46px, 0 0, 0 0; background-size: 83px 67px, 113px 91px, 32px 32px, 32px 32px; }
.scene-night::after { background: #354451; }
.scene-night .scene-sun { top: 27px; right: 43px; width: 38px; height: 38px; background: #e5dfc0; box-shadow: 0 0 0 7px rgba(229,223,192,.12); }
.scene-night .scene-horizon { background: #263945; }
.scene-aurora { background: #315d67; }
.scene-aurora::before { opacity: .85; background-image: linear-gradient(118deg, transparent 25%, rgba(104,209,164,.7) 39%, rgba(104,209,164,.08) 57%, transparent 72%), linear-gradient(68deg, transparent 37%, rgba(115,205,197,.55) 49%, transparent 67%), linear-gradient(90deg, transparent 94%, rgba(255,255,255,.1) 95%), linear-gradient(transparent 94%, rgba(255,255,255,.1) 95%); background-size: auto, auto, 32px 32px, 32px 32px; }
.scene-aurora::after { background: #315047; }
.scene-aurora .scene-sun { top: 32px; right: 52px; width: 32px; height: 32px; background: #f1d17b; }
.scene-aurora .scene-horizon { background: #243f3d; }
.scene-tower { background: #bcc3bd; }
.scene-tower::after { background: #747d7b; }
.scene-tower .scene-sun { top: 29px; right: 54px; width: 43px; height: 43px; background: #e5d9b6; }
.scene-tower .scene-horizon { background: #555e5e; }
.scene-tower .scene-tower { position: absolute; right: 23%; bottom: 39px; z-index: 0; width: 57px; height: 119px; background: repeating-linear-gradient(0deg, #737b7d 0 18px, #89908f 18px 21px); border: 5px solid #535c5e; clip-path: polygon(0 11%, 18% 11%, 18% 0, 38% 0, 38% 11%, 62% 11%, 62% 0, 82% 0, 82% 11%, 100% 11%, 100% 100%, 0 100%); }
.scene-tower .scene-tower::after { position: absolute; top: 25px; right: 12px; left: 12px; height: 12px; content: ''; background: #d1cda7; box-shadow: 0 30px #d1cda7, 0 60px #d1cda7; }
.scene-mesa { background: #dc8758; }
.scene-mesa::before { opacity: .34; background-image: linear-gradient(90deg, transparent 94%, rgba(75,36,33,.32) 95%), linear-gradient(transparent 94%, rgba(75,36,33,.32) 95%); }
.scene-mesa::after { background: #bd5944; }
.scene-mesa .scene-sun { background: #f5d96c; box-shadow: 7px 7px 0 rgba(118,48,42,.24); }
.scene-mesa .scene-horizon { background: #803c43; }
.scene-marsh { background: #4b795f; }
.scene-marsh::before { opacity: .4; background-image: radial-gradient(rgba(210,235,113,.9) 1px, transparent 2px), linear-gradient(90deg, transparent 94%, rgba(25,53,42,.3) 95%), linear-gradient(transparent 94%, rgba(25,53,42,.3) 95%); background-size: 67px 59px, 32px 32px, 32px 32px; }
.scene-marsh::after { background: #315e4d; }
.scene-marsh .scene-sun { background: #d4e86a; box-shadow: 0 0 20px rgba(212,232,106,.55); }
.scene-marsh .scene-horizon { background: #203f3f; }
.scene-frost { background: #92c6d6; }
.scene-frost::before { opacity: .55; background-image: radial-gradient(#fff 1px, transparent 1.8px), linear-gradient(90deg, transparent 94%, rgba(29,75,96,.2) 95%), linear-gradient(transparent 94%, rgba(29,75,96,.2) 95%); background-size: 61px 53px, 32px 32px, 32px 32px; }
.scene-frost::after { background: #639ab1; }
.scene-frost .scene-sun { background: #f2dc9d; box-shadow: 0 0 0 7px rgba(255,255,255,.2); }
.scene-frost .scene-horizon { background: #3b708b; }
.theme-tower .profile-keep { display: block; }
.theme-mesa .profile-keep { display: block; right: 23%; bottom: 35px; width: 48px; height: 83px; background: #9b4638; border: 4px solid #743932; clip-path: polygon(0 38%, 20% 38%, 20% 0, 70% 0, 70% 18%, 100% 18%, 100% 100%, 0 100%); }
.theme-mesa .profile-keep::after { top: 32px; right: 7px; left: 7px; background: #e5a553; box-shadow: 0 22px #e5a553; }
.theme-marsh .profile-keep { display: block; right: 24%; bottom: 32px; width: 19px; height: 95px; background: #d2e85e; border: 0; clip-path: polygon(39% 0, 62% 0, 62% 45%, 100% 29%, 65% 57%, 65% 100%, 38% 100%, 38% 56%, 0 38%, 38% 47%); }
.theme-marsh .profile-keep::after { display: none; }
.theme-frost .profile-keep { display: block; right: 23%; bottom: 34px; width: 66px; height: 87px; background: #f0f7eb; border: 0; clip-path: polygon(0 100%, 38% 23%, 52% 48%, 67% 0, 100% 100%); }
.theme-frost .profile-keep::after { display: none; }
.selected-tag { flex: 0 0 auto; padding: 5px 7px; color: var(--green-dark); background: #e7f0d6; font: 8px var(--pixel); }
.chapter-admin-list { margin-top: 20px; padding-top: 15px; border-top: 1px solid var(--line); }
.chapter-admin-list > .section-kicker { margin-bottom: 8px; }
.chapter-admin-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.chapter-admin-row > div:first-child { display: grid; gap: 4px; min-width: 0; }
.chapter-admin-row strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.chapter-admin-row small { color: var(--muted); font: 8px var(--pixel); }
.chapter-admin-actions, .chapter-admin-actions form { display: flex; align-items: center; gap: 9px; }
.danger-button { color: #a64d3c; }
.danger-button:hover { color: #7d2d22; }
@keyframes rise-in { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 850px) {
    .login-shell { grid-template-columns: 1fr; }
    .login-panel { padding: 48px 0; }
    .login-art { min-height: 360px; }
    .sun { top: 12%; right: 15%; width: 75px; }
    .mountain { height: 74%; }
    .mountain-front { height: 56%; }
    .inventory-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
    .topbar { min-height: 60px; gap: 10px; padding: 0 14px; }
    .topbar .brand-small { font-size: 16px; }
    .brand-small i { display: none; }
    .topbar nav { gap: 12px; }
    .topbar nav a { font-size: 10px; }
    .account > span { display: none; }
    .character-page, .admin-page { padding: 26px 14px 20px; }
    .page-heading h1 { font-size: 27px; }
    .page-heading .eyebrow { max-width: 230px; font-size: 9px; }
    .level-stamp { width: 58px; height: 58px; }
    .level-choice { align-items: stretch; flex-direction: column; gap: 12px; padding: 15px; }
    .choice-form { width: 100%; flex-direction: column; }
    .choice-form .button { width: 100%; }
    .character-card, .gear-card { padding: 15px; }
    .skin-stage { margin-right: -15px; margin-left: -15px; }
    .gear-grid { gap: 7px; }
    .gear-slot { padding: 8px; }
    .gear-slot-label { font-size: 9px; }
    .equipped-item { gap: 6px; }
    .equipped-item img, .equipped-item .item-placeholder { flex-basis: 31px; width: 31px; height: 31px; }
    .admin-grid { grid-template-columns: 1fr; }
    .player-list { grid-column: auto; }
    .setup-box { padding: 27px 22px; }
    .setup-box h1 { font-size: 31px; }
    .notice-bar { margin-right: 14px; margin-left: 14px; }
}