/* Chronicle / The Lantern & the Ledger. Presentation only; state comes from the engine. */
:root{color-scheme:dark;--bg:#0b100e;--panel:#111914;--panel2:#18211a;--card:#1b251e;--line:#334035;--line2:#4e5946;--text:#eee9dc;--muted:#afb3a3;--faint:#87917f;--accent:#d4b578;--accent2:#8d774b;--hp:#bf7464;--mp:#759fb3;--xp:#9cab70;--good:#a3b38a;--warn:#cfb17a;--bad:#d08a76}
html body,html body #app{background:#0b100e;color:var(--text);font-family:'Noto Sans KR','Apple SD Gothic Neo',system-ui,sans-serif;letter-spacing:-.015em}
body:before{display:none}
button,input,select{font:inherit}button:disabled{opacity:.5;cursor:default}button:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid #dec289;outline-offset:3px}
.ui-icon{width:23px;height:23px;flex:0 0 23px;display:block}
body .game-shell{grid-template-columns:188px minmax(0,1fr) 364px;grid-template-rows:76px minmax(0,1fr);gap:0;background:#101713}
body .game-shell:before{display:none}
body .topbar{display:flex;height:76px;background:#101713eF;border-color:#67714b45;box-shadow:none;z-index:32}
body .brand{width:188px;flex:0 0 188px;padding:0 20px;border:0;gap:12px;background:none}
body .brand:after{display:none}
body .brand-mark{width:34px;height:40px;border:0;transform:none;background:none;box-shadow:none;color:var(--accent)}
body .brand-mark .ui-icon{width:34px;height:40px;transform:none;stroke-width:1}
body .brand b{font:600 15px Georgia,serif;letter-spacing:.13em;color:#efe0b7;text-shadow:none}
body .brand small{font-size:9px;letter-spacing:.02em;margin-top:6px;color:#a7ad99;white-space:nowrap}
body .location{flex:1;min-width:0;padding:0 22px;gap:10px}
body .location .ui-icon{color:#b7a470;width:19px;height:19px;flex-basis:19px}
body .location strong{font-family:inherit;font-size:13px;font-weight:500;display:block;max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body .top-actions{width:auto;max-width:65%;padding:0 18px;border:0;gap:7px;flex-wrap:wrap;justify-content:flex-end}
body .top-actions .ghost{display:inline-flex;align-items:center;gap:7px;min-height:34px;padding:7px 10px;border-color:#68714a40;background:transparent;font-size:11px;white-space:nowrap}
body .top-actions .ghost:hover{background:#d4b57814;color:#f4e1b9}
body .top-actions .account-chip{background:#20271b;border-color:#4c593b;color:#ddd6bc;font-size:10px;max-width:160px}
body .top-actions #apiStatus{font-size:10px;color:#a5b590;white-space:nowrap}
body .top-actions #apiStatus:before{content:'';display:inline-block;width:5px;height:5px;border-radius:50%;background:#a5b590;margin-right:5px}
body .sidebar{background:#131b15}
body .nav-side{padding:23px 15px 18px;border-right:1px solid #b8a47020;background:linear-gradient(#131c16,#0d1510);overflow-y:auto;scrollbar-width:thin}
body .identity{border-color:#4c5b3c50;padding:0 3px 22px;gap:11px}
body .identity:after{display:none}
body .identity strong{font-size:14px;font-weight:600}
body .identity small{font-size:10px;letter-spacing:0;margin-top:5px}
body .avatar{border-radius:10px;width:40px;height:44px;color:#d4b578;border-color:#8f774640;background:linear-gradient(145deg,#3a3c25,#17231b);box-shadow:none}
.nav-caption{display:block;font-size:10px;color:#8d987f;letter-spacing:.12em;margin:25px 11px 9px}
body .main-nav{gap:5px;margin-top:0}
body .main-nav button{padding:12px 10px;gap:12px;color:#a9b19e;border:1px solid transparent;border-radius:8px;min-height:56px;overflow:visible;font-size:12px}
body .main-nav button .ui-icon,body .main-nav button>svg{width:22px;height:22px;flex:0 0 22px;color:#99a184}
body .main-nav button .nav-label{width:auto;text-align:left;color:inherit}
.nav-label b{font-weight:500;display:block}.nav-label small{display:block;font-size:9px;color:#8c977e;margin-top:4px}
body .main-nav button:after{display:none}
body .main-nav button.active{color:#efdfb7;background:linear-gradient(90deg,#4a462640,#26341f60);box-shadow:none;border-color:#c7a76b40}
body .main-nav button.active .ui-icon{color:#e1c48c}
body .main-nav button:hover{color:#f1e7d0;background:#8c995715}
body .compact-vitals{padding:18px 7px 0;border-top-color:#6c77433a}
.vitals-caption{font:8px Georgia,serif;letter-spacing:.1em;color:#969e7c}
body .vital-line{font-size:11px;margin-top:13px}body .vital-line b{font-variant-numeric:tabular-nums}
body .meter{height:5px;border:0;background:#050b0799;margin-top:7px;box-shadow:none;border-radius:6px}
body .meter span{box-shadow:none;background:linear-gradient(90deg,#63784f,#a7bc87)}
body .meter .hp{background:linear-gradient(90deg,#824d45,#ce8b71);box-shadow:none}
body .meter .mp{background:linear-gradient(90deg,#416879,#87b6c3);box-shadow:none}
body .meter .xp{background:linear-gradient(90deg,#637547,#b4c17a);box-shadow:none}
body .meter .weight,body .meter .quest{background:linear-gradient(90deg,#806c3f,#d5b879);box-shadow:none}
body .story-column{background:radial-gradient(ellipse at 50% 40%,#24332628,transparent 65%),#0d1510;position:relative;min-height:0}
body .story-heading{height:214px;flex:0 0 214px;padding:34px 36px 28px;align-items:flex-end;border:0;position:relative;background:linear-gradient(90deg,#08140ddb,#0e190b55 65%,#101b0820),linear-gradient(0deg,#0d1510 0%,transparent 65%),var(--location-background,url('/assets/ui/chronicle-landscape.webp')) center 52%/cover,url('/assets/ui/chronicle-landscape.webp') center 52%/cover}
body .story-heading:after{left:36px;right:36px;background:linear-gradient(90deg,#c5a66c55,#7f94522a,transparent);opacity:1}
body .story-heading .scene-kicker{font:9px Georgia,serif;letter-spacing:.2em;color:#e1c38f}
body .story-heading h1{font:500 32px/1.3 'Noto Serif KR','Batang',serif;letter-spacing:-.035em;margin:10px 0 15px;color:#fff0d4;text-shadow:0 2px 20px #000}
.scene-meta{display:flex;align-items:center;gap:9px}.scene-meta i{width:3px;height:3px;border-radius:50%;background:#a9b393}
body .scene-meta span{font-size:10px;color:#c1c7b0;letter-spacing:.015em}
body .scene-map-button{display:flex;align-items:center;gap:7px;padding:9px 11px;border-color:#d3c29150;background:#0b180c80;backdrop-filter:blur(6px);color:#e4d8b8;font-size:10px;margin-bottom:2px;white-space:nowrap}
body .scene-map-button .ui-icon{width:18px;height:18px;flex-basis:18px}
body .story-log{padding:29px clamp(22px,4vw,56px) 18px;scrollbar-color:#5f7145 #101b11;scrollbar-width:thin;scroll-behavior:smooth}
body .story-log:before{display:none}
body .message{padding:0 0 0 20px;max-width:850px;margin:0 auto 30px;border:0;border-left:1px solid #7e8c553d;border-radius:0;background:none;box-shadow:none;font-size:14px;line-height:2.05;color:#e0e1d1;white-space:normal;overflow-wrap:anywhere}
body .message:not(.player){background:none;box-shadow:none;border-left-color:#7e8c553d;border-radius:0}
body .message:not(.player):before{content:'';width:5px;height:5px;border-radius:50%;left:-3px;top:4px;background:#cdb37a;box-shadow:0 0 9px #cdb37a40}
body .message .speaker{font:10px Georgia,serif;letter-spacing:.15em;color:#d9bd83;margin-bottom:11px;display:flex;align-items:center}
body .message-text,body .message>div:not(.speaker){white-space:pre-wrap;word-break:normal}
body .message.player{margin:12px auto 30px;padding:16px 20px;max-width:850px;background:#2233217a;border:1px solid #68784a38;border-radius:9px;color:#ccd3bd}
body .message.player .speaker{color:#b8c698;margin-bottom:7px}
body .suggestions{padding:0 27px 12px;gap:8px}
body .suggestions button{padding:9px 12px;background:#17251a;color:#bec8af;border:1px solid #6a804244;font-size:11px;box-shadow:none;border-radius:6px;max-width:100%;overflow-wrap:anywhere}
body .suggestions button:before{content:'↗';color:#c8b47e;margin-right:6px}
body .suggestions button:hover{background:#273622;border-color:#bfa26170;color:#f1e6cb}
body .composer{border:0;background:none;box-shadow:none;padding:0 27px;gap:9px;flex:0 0 auto}
.composer-field{display:flex;align-items:center;flex:1;min-width:0;gap:10px;padding:0 14px;border:1px solid #7f8c5055;border-radius:9px;background:linear-gradient(145deg,#1c2b1b,#182119);box-shadow:0 5px 20px #0002}
.composer-field>.ui-icon{width:19px;height:19px;flex-basis:19px;color:#8f9b79}
body .composer input{padding:16px 0;background:none;border:0;border-radius:0;box-shadow:none;color:#eee6ce;font-size:13px;width:100%}
body .composer input:focus{outline:none;box-shadow:none}.composer-field:focus-within{border-color:#d4b578;box-shadow:0 0 0 2px #c5ab6812}
body .composer button{display:flex;gap:9px;align-items:center;justify-content:center;min-width:86px;padding:0 16px;border:1px solid #e2c78b80;border-radius:8px;background:linear-gradient(135deg,#d4b578,#ad8b4e);color:#1c2618;font-size:12px;font-weight:700;box-shadow:0 5px 20px #0002}
body .composer button:hover{background:linear-gradient(135deg,#e1c68d,#c4a361)}
body .composer button .ui-icon{width:18px;height:18px;flex-basis:18px}
.composer-note{text-align:center;font-size:9px;color:#7e8b73;padding:10px 12px 16px;flex:0 0 auto}
body .authority-notice{margin:0 27px 12px;border-radius:6px;background:#2a301b;border-color:#a3a26840;color:#ddd3ad;line-height:1.7}
body .detail-side{border-left:1px solid #b8a47020;padding:23px 21px;background:linear-gradient(155deg,#172019,#111914);scrollbar-width:thin;scrollbar-color:#586943 #111914}
body .panel-head{border-bottom-color:#8b99523a;padding-bottom:15px;margin-bottom:19px;align-items:center}
body .panel-head:after{display:none}
body .panel-head small{font:9px Georgia,serif;letter-spacing:.15em;color:#b7a879}
body .panel-head h2{font:500 21px/1.4 'Noto Serif KR','Batang',serif;margin:6px 0 0;color:#eee5cc;text-shadow:none}
body .gold{padding:8px 10px;border:1px solid #a88f4b35;border-radius:7px;background:#6a5e2220;color:#e2c585;font:13px Georgia,serif}
body .counter{font:12px Georgia,serif;color:#baa77c}
body .sheet{border:0;border-radius:8px;background:#25322065;box-shadow:none;padding:14px;margin-bottom:14px}
body .sheet:before,body .quest-card:before{display:none}
body .sheet h3{font-size:12px;color:#dbdabf}body .sheet p{font-size:12px;line-height:1.8;color:#b7c0a8;overflow-wrap:anywhere}
body .hero-sheet{height:254px;position:relative;display:block;padding:0;overflow:hidden;border:1px solid #bdac663a;background:#101a12}
.character-art{position:absolute;inset:0;overflow:hidden;background:#142014;opacity:.88}
.character-art img{display:block;width:100%;height:100%;object-fit:cover;object-position:center top}
.character-art::after{content:"";position:absolute;inset:0;background:linear-gradient(0deg,#142014 3%,#14201420 60%);pointer-events:none}
.character-summary{position:absolute;left:20px;right:15px;bottom:19px;z-index:1}
body .hero-sheet h3{font-size:21px;margin-bottom:5px;color:#f5e6be;font-weight:500;text-shadow:0 2px 10px #000}
body .hero-sheet p{margin:0 0 8px;color:#d8d6bb;font-size:11px}
body .hero-sheet span{font:10px Georgia,serif;letter-spacing:.06em;color:#d7b979}
body .stat-grid{gap:8px;border:0;background:none;border-radius:0;margin-bottom:16px;grid-template-columns:repeat(3,minmax(0,1fr))}
body .stat-grid>div{padding:13px 5px 10px;background:#29372155;border:1px solid #77864c2b;border-radius:7px;display:flex;flex-direction:column;align-items:center}
body .stat-grid>div:after{display:none}
body .stat-grid .ui-icon{width:18px;height:18px;color:#afaf78;margin-bottom:7px;flex-basis:18px;opacity:.75}
body .stat-grid span{font-size:10px;color:#b2baa1}
body .stat-grid b{font:500 23px Georgia,serif;color:#eadcc1;margin-top:6px;text-shadow:none}
body .quest-card{position:relative;padding:19px 16px 16px 21px;background:linear-gradient(140deg,#303b245a,#25301f30);border:1px solid #9ea5642b;border-left:2px solid #bba56c70;border-radius:3px 10px 10px 3px;box-shadow:none;overflow-wrap:anywhere}
body .quest-card:hover{transform:none;background:#39452a65}
body .quest-card h3{font-size:14px;line-height:1.6;margin:11px 0 6px;color:#ecdfba;font-weight:500}
body .quest-card p{font-size:12px;color:#b6bea5;line-height:1.9}
body .quest-top{font-size:10px;letter-spacing:.03em;color:#c6b887}
body .quest-objective-list{font-size:11px;line-height:1.8;border-color:#8b99523a}
body .quest-reward-line{font-size:10px;line-height:1.7}
body .npc-directory-filters{background:#23311e60;gap:10px;padding:15px}
body .npc-directory-filters label{font-size:10px;color:#b6bfa4;gap:6px}
body .npc-directory-filters input,body .npc-directory-filters select{border:1px solid #6c7e4544;border-radius:6px;background:#0d180fb0;color:#e1e1ca;min-height:36px;padding:8px;font-size:11px}
body .npc-directory-group h3{font-size:12px;margin-top:22px;color:#d0c498;font-weight:500}
body .relation-card{padding:14px 0;border-color:#7d8c4b30;align-items:start;gap:10px!important}
body .mini-avatar{width:38px;height:43px;border-radius:9px;box-shadow:none;background:linear-gradient(135deg,#445135,#1e2e22);border-color:#98a26944;color:#c2ba81}
body .relation-card b{font-size:13px;color:#e4dfc5}body .relation-card small{font-size:10px;line-height:1.7;color:#afb99d}
body .relation-card p{font-size:11px;line-height:1.8;color:#b5bea5;margin:8px 0;overflow-wrap:anywhere}
body .weight-summary{padding:0 0 21px}body .weight-summary strong{font:24px Georgia,serif;color:#ecdfbf}
body .inventory-item{position:relative;grid-template-columns:43px minmax(0,1fr) auto;gap:10px;padding:17px 0;border-color:#85945535;transition:none;min-width:0}
body .inventory-item:hover{padding-left:0;background:#a2b46808}
body .inventory-item.has-action-draft{grid-template-columns:43px minmax(0,1fr) auto!important}
body .inventory-item>.chronicle-item-qty{grid-column:1;grid-row:2;text-align:center;font-size:10px;color:#b5bd9c}
body .inventory-item>.chronicle-action-draft{grid-column:3;grid-row:2;min-width:46px;padding:7px;font-size:10px;background:#293920;border-color:#99a66144;color:#d7dcba}
body .item-icon{width:43px;height:48px;border-radius:9px;background:radial-gradient(circle at 50% 25%,#6a663c50,transparent 65%),#202f1f;border:1px solid #9a98514d;box-shadow:none;color:#d3bd82}
body [data-rarity="rare"] .item-icon,body .v2-slot[data-rarity="rare"]{border-color:#759fb36b;color:#9fc5d3}
body [data-rarity="epic"] .item-icon,body .v2-slot[data-rarity="epic"]{border-color:#b69db36b;color:#d7b9dd}
body [data-rarity="legendary"] .item-icon,body .v2-slot[data-rarity="legendary"]{border-color:#e1be726b;color:#f1d08b}
body .inventory-item b{font-size:13px;line-height:1.6;font-weight:500;color:#e7dec4}
body .inventory-item small{font-size:10px;line-height:1.8;color:#aebaa0;white-space:normal;overflow-wrap:anywhere}
body .inventory-item p{font-size:11px;line-height:1.9;color:#a4b197;overflow-wrap:anywhere}
body .inventory-item button[data-choice]{padding:6px 9px;font-size:10px;border-color:#a1a46550;background:#2f3c23;color:#dccb9d;margin-top:8px}
body .inventory-item>strong{font-size:11px;color:#bec6aa;text-align:right}
.loadout-stage{position:relative;min-height:470px;border:1px solid #a69c6633;border-radius:12px;overflow:hidden;background:#101a12;margin-bottom:14px}
.loadout-art{position:absolute;inset:0;background:linear-gradient(0deg,#0e170de8,transparent 60%),linear-gradient(90deg,#111c15aa,transparent 50%,#111c15aa),url('/assets/ui/chronicle-traveller.webp') center 12%/cover;opacity:.75}
.loadout-caption{position:relative;text-align:center;display:block;padding:19px 0;font:9px Georgia,serif;letter-spacing:.2em;color:#ccb886}
body .v2-slot-grid{position:relative;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:22px 64px;padding:82px 12px 24px}
body .v2-slot{position:relative;min-height:98px;min-width:0;border:1px solid #baaa6240;border-radius:8px;background:#172618dc;backdrop-filter:blur(4px);padding:12px 10px;color:#e0d6b5}
body .v2-slot .ui-icon{color:#c7b681;width:24px;height:24px;margin:0 0 9px}
body .v2-slot span{font-size:10px;color:#a9b393;margin-bottom:6px}
body .v2-slot b{font-size:11px;line-height:1.65;font-weight:500;overflow-wrap:anywhere}
body .v2-slot small{font-size:9px;line-height:1.7;color:#a5b193;overflow-wrap:anywhere}
.loadout-note{font-size:11px;line-height:1.8;color:#a8b397;text-align:center}
.illustrated-empty{text-align:center;margin:26px 0;padding:26px 17px;position:relative;background:radial-gradient(ellipse,#6a78421c,transparent 72%)}
.illustrated-empty>.ui-icon{width:52px;height:52px;margin:0 auto 21px;color:#b2a974;stroke-width:.8}
.illustrated-empty h3{font-size:14px;font-weight:500;color:#ddd4b5;margin:0 0 12px}.illustrated-empty p{font-size:12px;line-height:1.9;color:#9fae90;margin:0 auto;max-width:280px}
body .npc-service,body .item-discoveries{border-top:1px solid #87974e44;padding-top:16px;margin-top:23px}
body .npc-service h3,body .item-discoveries h3{font-size:13px;font-weight:500;color:#dfd0a7;line-height:1.8}
body .npc-service>small{font-size:10px;color:#a4b090}body .npc-service article,body .item-discoveries article{display:grid;grid-template-columns:1fr auto;gap:7px;align-items:center;padding:13px 0;border-bottom:1px solid #82934a2b;font-size:11px}
body .npc-service article b{font-weight:500;grid-column:1;overflow-wrap:anywhere}body .npc-service article small{grid-column:1;color:#acb598;font-size:10px;line-height:1.8}
body .npc-service article button{grid-column:2;grid-row:1/3;padding:8px;font-size:10px;background:#29391f;color:#dfd1a8;border-color:#a39c5750}
body .material-purchase-request{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;margin:15px 0}
body .material-purchase-request input{min-width:0;border:1px solid #83934c44;background:#0b180dbb;border-radius:6px;color:#e7dfc5;padding:10px;font-size:11px}
body .material-purchase-request button{font-size:10px;padding:8px;background:#354426;color:#dfd1a8}
body .material-purchase-request small{grid-column:1/-1;color:#a6b197;font-size:10px;line-height:1.8}
body .chronil-map-controls{gap:7px}body .chronil-map-controls button{font-size:10px;background:#1d2c1a;border-color:#91a35644;border-radius:5px}
body .chronil-map-viewport{border:1px solid #b4a26870;border-radius:9px;box-shadow:0 8px 24px #0003}
body .chronil-map-expanded{background:#111c14;padding:20px;border:1px solid #c6b57b60;border-radius:12px}
body .chronil-place-detail{background:#25351d;border-color:#92a15640;border-radius:8px}
body .chronil-place-detail p{line-height:1.9}body .chronil-map-legend{font-size:10px;line-height:1.7}
body #chronicleCombatHud{margin:0 27px 14px;background:linear-gradient(120deg,#39251bcc,#1c2817);border:1px solid #c0945960;border-left:3px solid #d48962;border-radius:7px;padding:15px;box-shadow:0 8px 30px #0002}
body #chronicleCombatHud .combat-hud-head b{color:#e4bb86}body #chronicleCombatHud .combat-enemy-main strong{font-size:14px;font-weight:500;color:#f0dbbd}
body .ai-report-button{font:9px system-ui;letter-spacing:0;border-color:#879b4a30;color:#87987a;margin-left:auto}
/* Entry and secondary surfaces use the same art direction; IDs keep existing handlers. */
html body #chronicle-entry-auth,html body #chronicle-character-creation,html body #playModeGate,body .setup-overlay,body .auth-overlay{background:linear-gradient(90deg,#06130be0,#07120c83),url('/assets/ui/chronicle-landscape.webp') center/cover;backdrop-filter:blur(4px)}
html body #chronicle-entry-auth .card,html body #chronicle-character-creation .creation-card,html body #playModeGate .play-mode-card,body .auth-modal,body .setup-card,body .ai-report-card{background:linear-gradient(145deg,#192619f2,#101e15f7);border:1px solid #c2b07470;border-radius:14px;box-shadow:0 28px 90px #0009,inset 0 0 0 4px #ffffff02;color:#eee6ce}
html body #chronicle-entry-auth .card{padding:37px;position:relative;border-top:3px solid #d6b578}
html body #chronicle-entry-auth .card:before{content:'CHRONICLE';display:block;font:17px Georgia,serif;letter-spacing:.22em;color:#d8bd85;margin-bottom:28px}
html body #chronicle-entry-auth h1,html body #chronicle-character-creation h1{font-family:'Noto Serif KR','Batang',serif;font-weight:500}
html body #chronicle-entry-auth p{font-size:13px;color:#b8c2a7;line-height:1.9;margin-bottom:25px}
html body #chronicle-entry-auth label{font-size:12px;color:#c5ceb6}
html body #chronicle-entry-auth input{background:#0e1b11bb;border-color:#9aa25850;border-radius:7px;padding:14px}
html body #chronicle-entry-auth .primary,html body #chronicle-character-creation .primary{background:linear-gradient(135deg,#d5ba81,#ad8d4f);color:#182212;border-color:#d5ba81;box-shadow:0 5px 25px #0002}
html body #chronicle-entry-auth .google{background:#e4e1cd;color:#263223;border-color:#e4e1cd}
html body #chronicle-entry-auth .world,body .world-card{background:#2c3a2355;border-color:#97a16044;padding:15px}
html body #chronicle-character-creation .creation-card{padding:29px}
html body #chronicle-character-creation .creation-section{background:#13221790;border-color:#85995738;border-radius:9px;padding:17px}
html body #chronicle-character-creation .creation-head{padding:12px 15px 21px;border-bottom:1px solid #a5a5613a;background:linear-gradient(90deg,#172319e0,#17231940),url('/assets/ui/chronicle-landscape.webp') center 45%/cover;border-radius:8px}
html body #chronicle-character-creation .creation-mark{transform:none;width:45px;height:50px;border-radius:8px;background:#1e311b80;border-color:#c8b77a70}
html body #chronicle-character-creation .creation-mark span{transform:none}
html body #chronicle-character-creation .race-option{background:#22321b80;border-color:#8d9e5240;padding:15px;border-radius:8px}
html body #chronicle-character-creation .race-option.active{border-color:#d5ba8180;background:#76672b35;color:#ebd8a9}
html body #chronicle-character-creation .race-option span{color:#adb99b;line-height:1.8;font-size:11px}
html body #chronicle-character-creation .stat-cell{background:#2c3c2355;border-color:#9eab5833}
html body #chronicle-character-creation .trait-card{background:#26392060;border-color:#c6ac75}
html body #chronicle-character-creation input{background:#0c1b0eaa;border-color:#91a05550}
html body #chronicle-character-creation p{line-height:1.85;font-size:12px;color:#b4c0a1}
html body #playModeGate .mode-option{background:linear-gradient(140deg,#37452670,#1b2a1b);border-color:#b4b16a44;padding:23px;border-radius:9px}
html body #playModeGate .mode-option b{color:#e2d3ac;font-weight:500}html body #playModeGate .mode-option span{color:#adb99d;line-height:1.8}
body .codex-dialog::backdrop{background:linear-gradient(#08120ddb,#08120de8),url('/assets/ui/chronicle-landscape.webp') center/cover}
body .codex-cover{border-color:#ab8c59;background:radial-gradient(ellipse at 80% 0%,#75824b25,transparent 60%),linear-gradient(105deg,#282d1c,#45432b 38%,#1a2418);box-shadow:0 30px 100px #000a,inset 0 0 0 5px #27291b,inset 0 0 0 6px #8b7a4a}
body .codex-heading{color:#e4d4ad}body .codex-bookmarks button{background:#45452a;color:#dfd0ad;border-color:#9a8e53}
body .codex-bookmarks button.active{background:#7b4935;color:#ffedc7}
body .codex-footer button{background:#2c3220;border-color:#8b8051;color:#e1cf9d}
@media(min-width:1600px){body .game-shell{grid-template-columns:216px minmax(0,1fr) 400px}body .brand{width:216px;flex-basis:216px}body .story-heading{height:250px;flex-basis:250px;padding:40px 48px 32px}body .story-heading h1{font-size:38px}body .story-log{padding:36px 8%}body .message{font-size:15px}body .detail-side{padding:27px}body .hero-sheet{height:285px}}
@media(min-width:901px) and (max-width:1180px){body .game-shell{grid-template-columns:76px minmax(0,1fr) 308px}body .brand{width:auto;flex-basis:76px;justify-content:center;padding:0}body .brand>div{display:none}body .nav-side{padding:21px 9px 15px}body .identity{justify-content:center;padding-bottom:17px}body .identity>div:last-child,body .main-nav .nav-label,body .nav-caption,body .vitals-caption{display:none}body .main-nav{margin-top:19px}body .main-nav button{justify-content:center;padding:12px 0;min-height:49px;font-size:12px}body .compact-vitals .vital-line{display:none}body .compact-vitals .meter{height:5px;margin-top:12px}body .top-actions{max-width:75%;gap:5px}body .location{padding:0 12px}body .detail-side{padding:20px 15px}body .story-heading{padding:26px 24px;flex-basis:195px;height:195px}body .story-heading h1{font-size:28px}body .scene-map-button span{display:none}body .story-log{padding:25px}body .suggestions{padding-left:22px;padding-right:22px}body .composer{padding:0 22px}}
@media(max-width:1300px){body .top-actions #apiStatus{display:none}body .top-actions .wallet-chip{max-width:135px}body .location strong{max-width:100px}}
@media(max-width:900px){body .game-shell{grid-template-columns:1fr;grid-template-rows:64px minmax(0,1fr) 68px;grid-template-areas:'top' 'story' 'mobile'}body .topbar{height:64px;justify-content:space-between}body .brand{width:auto;flex-basis:auto;padding:0 15px;gap:10px}body .brand>div{display:block}body .brand b{font-size:14px}body .brand small{display:none}body .brand-mark{width:29px;height:34px}body .brand-mark .ui-icon{width:29px;height:34px}body .location,body .nav-side,body .detail-side{display:none}body .top-actions{padding:0 12px;max-width:65%;gap:6px;flex-wrap:nowrap}body .top-actions .ghost{display:none}body .top-actions #playModeButton{display:block;font-size:10px;min-height:33px;padding:6px 9px}body .top-actions .account-chip{max-width:94px;font-size:9px;padding:7px 9px}body .top-actions .wallet-chip{display:none}body .story-heading{height:210px;flex-basis:210px;padding:30px 26px 25px}body .story-heading h1{font-size:30px}body .story-heading:after{left:26px;right:26px}body .story-log{padding:26px}body .message{font-size:14px;line-height:1.95}body .scene-map-button{padding:8px}body .scene-map-button span{display:block}body .suggestions{padding:0 20px 11px;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none}body .suggestions button{flex:0 0 auto;white-space:nowrap;max-width:none;padding:10px 12px;font-size:11px}body .composer{padding:0 18px}body .composer input{font-size:16px;padding:15px 0}.composer-note{padding-bottom:13px}body .mobile-tabs{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));background:#142015;border-color:#c3b57435;z-index:35;padding-bottom:env(safe-area-inset-bottom);min-height:68px;box-shadow:0 -6px 20px #0002}body .mobile-tabs button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;color:#a1b090;font-size:9px;background:none;padding:8px 1px;border:0;border-radius:0}body .mobile-tabs button .ui-icon,body .mobile-tabs button>svg{width:22px;height:22px;color:inherit;flex-basis:22px}body .mobile-tabs button>span{font-size:9px;line-height:1}body .mobile-tabs button.active{color:#e0c386;background:#4b51252b;box-shadow:inset 0 2px #d4b578}body .mobile-panel{display:flex;position:absolute;z-index:34;top:64px;bottom:68px;width:min(460px,65%);min-width:0;right:0;transform:translateX(102%);background:#142015;border-color:#8d9d5244;box-shadow:-20px 0 50px #0008}body .mobile-panel.open{transform:translateX(0)}body .mobile-panel-toolbar{padding:10px;background:#18241a;border-color:#8d9d5244}body .panel-switches button{font-size:11px;padding:8px 10px;border-color:#91a05630;border-radius:6px;min-height:35px}body .panel-switches button.active{color:#e6c88b;border-color:#c5ac6b60;background:#65662d30}body .mobile-close{color:#d6c58b;width:36px;height:36px}body .mobile-panel-content{padding:19px 21px 26px}body .mobile-panel-content .panel-head{top:-19px;background:#142015;padding:8px 0 16px}body #chronicleCombatHud{margin:0 20px 11px}body .authority-notice{margin-left:20px;margin-right:20px}}
@media(max-width:600px){body .story-heading{height:177px;flex-basis:177px;padding:24px 20px 21px;background-position:center,center,62% 50%}body .story-heading h1{font-size:27px;margin:10px 0 12px}body .story-heading .scene-kicker{font-size:8px;letter-spacing:.14em}body .scene-meta span{font-size:9px}body .scene-meta span:last-child{max-width:150px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}body .scene-map-button span{display:none}body .story-heading:after{left:20px;right:20px}body .story-log{padding:23px 20px 10px}body .message{font-size:13px;line-height:2;padding-left:15px;margin-bottom:27px}body .message.player{padding:13px 15px}body .composer{padding:0 12px;gap:7px}.composer-field{padding:0 11px;gap:8px}.composer-field>.ui-icon{display:none}body .composer button{min-width:68px;padding:0 12px;gap:6px}body .composer button .ui-icon{width:16px;height:16px;flex-basis:16px}body .suggestions{padding-left:13px;padding-right:13px}body .mobile-panel{width:100%;border-left:0}body .mobile-panel-content{padding:19px 20px 27px}body .hero-sheet{height:270px}body .mobile-tabs button>span{font-size:9px}html body #chronicle-entry-auth{padding:16px}html body #chronicle-entry-auth .card{padding:26px 23px}html body #chronicle-character-creation .creation-card{padding:18px}html body #chronicle-character-creation .creation-layout{grid-template-columns:1fr}html body #chronicle-character-creation .creation-head{padding:10px 7px 16px}body .top-actions .account-chip{max-width:76px}}
@media(max-width:420px){body .brand{padding:0 10px;gap:7px;flex-shrink:0}body .brand b{font-size:12px;letter-spacing:.09em}body .brand-mark,body .brand-mark .ui-icon{width:24px;height:30px}body .top-actions{padding:0 8px;max-width:none;min-width:0;gap:5px}body .top-actions #playModeButton{font-size:9px;padding:6px}body .top-actions .account-chip{max-width:64px;font-size:9px;padding:7px}}
@media(max-height:700px) and (min-width:901px){body .story-heading{height:160px;flex-basis:160px;padding-top:20px;padding-bottom:22px}body .nav-side{padding-top:16px}.nav-caption{margin-top:14px}body .main-nav button{min-height:46px;padding-top:8px;padding-bottom:8px}body .compact-vitals{padding-top:12px}body .vital-line{margin-top:9px}}
@media(max-height:600px) and (max-width:900px){body .story-heading{height:120px;flex-basis:120px;padding-top:15px;padding-bottom:16px}body .story-heading h1{font-size:24px;margin:5px 0 9px}.composer-note{display:none}body .composer{padding-bottom:8px}}
@media(prefers-reduced-motion:reduce){body .story-log{scroll-behavior:auto}body .mobile-panel{transition:none}}
.chronil-minimap{position:absolute;right:28px;top:18px;width:150px;height:115px;padding:0;overflow:hidden;border:1px solid #c6b57b80;border-radius:9px;background:#050706;box-shadow:0 5px 18px #0006;cursor:pointer}
.chronil-minimap svg{display:block;width:100%;height:92px}
.chronil-minimap span{display:block;font-size:10px;line-height:21px;color:#e4d8b8;background:#111c14;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.chronil-world-dialog{width:min(1200px,96vw);max-width:96vw;height:92dvh;max-height:92dvh;padding:18px;border:1px solid #c6b57b80;border-radius:12px;background:#111c14;color:#e4d8b8;overflow:auto}
.chronil-world-dialog::backdrop{background:#000b;backdrop-filter:blur(4px)}
.chronil-world-dialog>header{display:flex;align-items:center;gap:12px;margin-bottom:12px}
.chronil-world-dialog>header h2{margin:0;font-size:20px}.chronil-world-dialog>header span{font-size:12px;color:#a1b090}.chronil-world-dialog>header button{margin-left:auto;min-width:44px;min-height:44px;font-size:24px}
.chronil-world-dialog .chronil-map-viewport{max-height:65dvh}.chronil-world-dialog [data-map-expand]{display:none}
@media(max-width:900px){body .mobile-tabs{grid-template-columns:repeat(6,minmax(0,1fr))}}
@media(max-width:600px){.chronil-minimap{right:16px;top:10px;width:104px;height:76px}.chronil-minimap svg{height:55px}.chronil-minimap span{font-size:9px}.chronil-world-dialog{padding:10px;width:98vw;max-width:98vw;height:94dvh;max-height:94dvh}.chronil-world-dialog>header{flex-wrap:wrap;gap:6px}.chronil-world-dialog>header span{max-width:65%;font-size:10px}body .scene-map-button{margin-bottom:0}}

@media(max-width:600px){body .story-heading>div{max-width:calc(100% - 115px)}body .story-heading .scene-meta span:last-child{display:none}}
@media(max-height:600px) and (max-width:900px){.chronil-minimap{height:70px;width:100px;top:8px}.chronil-minimap svg{height:49px}}

body .composer{padding-bottom:18px}

/* Android portrait: readable story, thumb-sized controls, safe system insets. */
@media (max-width:900px) {
  html body .game-shell {
    --mobile-top:calc(56px + env(safe-area-inset-top,0px));
    --mobile-bottom:calc(64px + env(safe-area-inset-bottom,0px));
    height:var(--mobile-viewport-height,100dvh);min-height:0;
    grid-template-rows:var(--mobile-top) minmax(0,1fr) var(--mobile-bottom);
    padding-left:env(safe-area-inset-left,0px);padding-right:env(safe-area-inset-right,0px);
  }
  html body .topbar {height:var(--mobile-top);padding-top:env(safe-area-inset-top,0px);}
  html body .brand {padding:0 12px;gap:7px;min-width:0;}
  html body .brand b {font-size:12px;letter-spacing:.08em;}
  html body .brand-mark,html body .brand-mark .ui-icon {width:24px;height:28px;}
  html body .top-actions {padding:0 10px 0 0;gap:6px;max-width:none;}
  html body .top-actions .wallet-chip {display:inline-flex;align-items:center;justify-content:center;min-height:44px;max-width:112px;font-size:12px;padding:8px 10px;white-space:nowrap;}
  html body .top-actions #playModeButton {min-height:44px;font-size:11px;padding:8px;}
  html body .story-heading {height:132px;flex:0 0 132px;padding:16px;display:grid;grid-template-columns:minmax(0,1fr) 90px;grid-template-rows:1fr 44px;gap:6px 10px;align-items:center;}
  html body .story-heading>div {max-width:none;grid-column:1;grid-row:1;min-width:0;}
  html body .story-heading h1 {font-size:24px;margin:5px 0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
  html body .story-heading .scene-kicker {font-size:10px;letter-spacing:.06em;}
  html body .story-heading .scene-meta {display:none;}
  html body .story-heading:after {left:16px;right:16px;}
  html body .story-heading [data-open-reading] {grid-column:1;grid-row:2;justify-self:start;min-height:44px;font-size:12px;padding:9px 12px;margin:0;}
  html body .scene-map-button {display:none;}
  html body .chronil-minimap {position:static;grid-column:2;grid-row:1/3;width:90px;height:94px;margin:0;}
  html body .chronil-minimap svg {height:70px;}
  html body .chronil-minimap span {font-size:10px;line-height:22px;}
  html body .story-log {min-height:0;padding:18px 16px 8px;}
  html body .message {padding-left:12px;margin-bottom:24px;}
  html body .message.player {padding:12px 14px;}
  html body .suggestions {padding:4px 12px 8px;gap:8px;flex-shrink:0;}
  html body .suggestions button {min-height:44px;font-size:12px;padding:10px 13px;}
  html body .composer {padding:0 12px 12px;gap:8px;}
  html body .composer-field {padding:0 12px;min-height:48px;}
  html body .composer input {font-size:16px;padding:13px 0;}
  html body .composer button {min-width:64px;min-height:48px;font-size:13px;padding:0 12px;}
  html body .composer-note {display:none;}
  html body .mobile-tabs {min-height:var(--mobile-bottom);padding:0 6px env(safe-area-inset-bottom,0px);gap:2px;}
  html body .mobile-tabs button {min-height:60px;padding:8px 2px;gap:5px;border-radius:8px 8px 0 0;}
  html body .mobile-tabs button>span {font-size:11px;line-height:1.2;}
  html body .mobile-panel {top:var(--mobile-top);bottom:var(--mobile-bottom);width:100%;min-width:0;}
  html body .mobile-panel-toolbar {padding:8px 10px;align-items:flex-start;}
  html body .panel-switches {display:flex;flex:1;min-width:0;overflow-x:auto;flex-wrap:nowrap;gap:6px;}
  html body .panel-switches button {min-height:44px;flex:0 0 auto;padding:10px 12px;font-size:12px;}
  html body .mobile-close {width:44px;height:44px;flex:0 0 44px;}
  html body .mobile-panel-content {padding:16px;}
  html body .mobile-panel-content input,html body .mobile-panel-content select {font-size:16px;min-height:44px;}
  html body .mobile-panel-content button:not(.chronil-place) {min-height:44px;}
  html body .authority-notice {margin:0 12px 8px;}
  html body #chronicle-entry-auth,html body #chronicle-character-creation {padding:max(12px,env(safe-area-inset-top,0px)) 12px max(12px,env(safe-area-inset-bottom,0px));height:var(--mobile-viewport-height,100dvh);box-sizing:border-box;}
  html body #chronicle-entry-auth .card,html body #chronicle-character-creation .creation-card {max-height:100%;width:100%;padding:22px 18px;overflow:auto;overscroll-behavior:contain;}
  html body #chronicle-entry-auth .card:before {font-size:14px;margin-bottom:18px;}
  html body #chronicle-entry-auth h1 {font-size:26px;}
  html body #chronicle-entry-auth p {font-size:13px;line-height:1.65;margin-bottom:16px;}
  html body #chronicle-entry-auth input,html body #chronicle-character-creation input {min-height:48px;font-size:16px;}
  html body #chronicle-entry-auth button,html body #chronicle-character-creation button {min-height:48px;font-size:14px;}
  html body #chronicle-entry-auth .account {flex-wrap:wrap;}
  html body #chronicle-entry-auth .account>div {min-width:0;overflow-wrap:anywhere;}
  html body #chronicle-entry-auth .world {gap:12px;min-height:72px;}
  html body #chronicle-entry-auth .world>span:first-child {min-width:0;overflow-wrap:anywhere;}
  html body #chronicle-entry-auth #ccEntryButton {min-height:44px;max-width:100%;float:none;margin:0 0 12px;width:auto;}
  html body #chronicle-character-creation .creation-layout {grid-template-columns:1fr;}
  html body #chronicle-character-creation .creation-section {padding:14px;}
  html body #chronicle-character-creation .stat-grid {grid-template-columns:repeat(3,minmax(0,1fr));}
  html body #chronicle-character-creation .creation-actions {position:sticky;bottom:-22px;background:#132016;padding:12px 0;margin-bottom:0;z-index:2;}
  html body #ccWalletDialog,html body #readingDialog {width:calc(100vw - 24px);max-height:calc(var(--mobile-viewport-height,100dvh) - 24px);padding:20px 16px;overflow:auto;overscroll-behavior:contain;}
  html body #ccWalletDialog button,html body #readingDialog button,html body #readingDialog select {min-height:44px;font-size:14px;}
  html body #ccWalletDialog .cc-package {gap:12px;min-height:64px;}
  html body #ccWalletDialog .cc-package strong {white-space:nowrap;}
  html body .chronil-world-dialog {width:calc(100vw - 16px);max-width:calc(100vw - 16px);height:calc(var(--mobile-viewport-height,100dvh) - 16px);max-height:calc(var(--mobile-viewport-height,100dvh) - 16px);padding:12px;}
  html body .chronil-world-dialog>header {gap:8px;flex-wrap:wrap;}
  html body .chronil-world-dialog>header span {font-size:11px;}
  html body .chronil-world-dialog .chronil-map-controls button {min-height:44px;font-size:12px;}
  html body .chronil-world-dialog .chronil-map-viewport {max-height:calc(var(--mobile-viewport-height,100dvh) - 200px);}
  html body .chronil-place-detail {overflow-wrap:anywhere;}
}
@media (max-width:380px) {
  html body .brand b {font-size:11px;}
  html body .top-actions #playModeButton {font-size:10px;padding:6px;}
  html body .top-actions .wallet-chip {max-width:96px;padding:7px;}
  html body .mobile-tabs {padding-left:2px;padding-right:2px;}
  html body .mobile-tabs button>span {font-size:10px;}
}
@media (max-width:900px) and (max-height:600px) {
  html body .story-heading {height:96px;flex-basis:96px;padding:8px 12px;grid-template-rows:1fr 44px;gap:0 8px;}
  html body .chronil-minimap {height:78px;width:82px;}
  html body .chronil-minimap svg {height:54px;}
  html body .story-heading h1 {font-size:20px;margin:2px 0;}
}
@media (max-width:900px) {
  html.mobile-keyboard body .game-shell {--mobile-bottom:0px;}
  html.mobile-keyboard body .mobile-tabs,html.mobile-keyboard body .suggestions {display:none;}
  html.mobile-keyboard body .story-heading {height:52px;flex-basis:52px;display:flex;padding:8px 12px;justify-content:space-between;}
  html.mobile-keyboard body .story-heading .scene-kicker,html.mobile-keyboard body .chronil-minimap {display:none;}
  html.mobile-keyboard body .story-heading h1 {font-size:18px;}
  html.mobile-keyboard body .story-heading [data-open-reading] {min-height:36px;padding:6px 10px;}
}
@media (max-width:900px) {
  html body .codex-dialog {width:calc(100vw - 16px);max-width:calc(100vw - 16px);max-height:calc(var(--mobile-viewport-height,100dvh) - 16px);}
  html body .codex-cover {padding:14px 12px 20px;max-height:calc(var(--mobile-viewport-height,100dvh) - 16px);overscroll-behavior:contain;}
  html body .codex-heading button {width:44px;height:44px;flex:0 0 44px;}
  html body .codex-bookmarks {padding-left:0;overflow-x:auto;}
  html body .codex-bookmarks button {flex:0 0 auto;min-height:44px;padding:10px 12px;}
  html body .codex-spread {grid-template-columns:1fr;}
  html body .codex-spread:after {display:none;}
  html body .codex-page {min-height:0;padding:20px 16px;}
  html body .codex-tools input {min-height:44px;font-size:16px;}
  html body .codex-slot {min-height:96px;}
}
@media (max-width:900px) {
  html body #chronicle-entry-auth .card {width:min(520px,100%);}
}
.scene-vitals{display:none}
@media(max-width:900px){
  html body .scene-vitals{display:flex;flex-wrap:wrap;gap:5px 10px;margin-top:4px;font-size:11px;font-variant-numeric:tabular-nums;}
  html body .scene-vitals span{white-space:nowrap;}
  html body .scene-vitals b{font-weight:600;}
  html body .scene-hp{color:#e5a190;}
  html body .scene-mp{color:#9bc6d5;}
  html body .story-heading h1{font-size:22px;margin:3px 0;}
  html.mobile-keyboard body .scene-vitals{display:none;}
  html body #ccWalletDialog .cc-package{flex-wrap:wrap;}
  html body #ccWalletDialog .cc-package>span{min-width:0;overflow-wrap:anywhere;}
}
@media(max-width:420px){
  html body .brand>div{display:none;}
  html body .brand{flex:0 0 44px;padding:0 10px;}
  html body .top-actions{flex:1;min-width:0;justify-content:flex-end;}
  html body .top-actions .account-chip{font-size:11px;min-height:44px;}
  html body .top-actions .wallet-chip{max-width:96px;}
}
@media(max-width:900px) and (max-height:600px){
  html body .story-heading{height:108px;flex-basis:108px;}
  html body .story-heading .scene-kicker{display:none;}
  html.mobile-keyboard body .story-heading{height:52px;flex-basis:52px;}
}
