:root{--ink:#eff0df;--gold:#d8bb7d;--muted:#a7b5b3;--glass:rgba(14,29,32,.83);--line:rgba(224,199,141,.23)}*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden;background:#101b21;color:var(--ink);font-family:Arial,'Apple SD Gothic Neo','Malgun Gothic',sans-serif;font-size:14px;user-select:none;-webkit-user-select:none}button,select{font:inherit}button{color:inherit;cursor:pointer;touch-action:manipulation}button:focus-visible,select:focus-visible{outline:2px solid #efdaaa;outline-offset:4px}button:disabled{cursor:default;opacity:.45}#world{display:block;width:100%;height:100%;touch-action:none}.hidden{display:none!important}.vignette{position:fixed;inset:0;pointer-events:none;box-shadow:inset 0 0 160px 35px #03101566;background:linear-gradient(0deg,#06111488,transparent 22%,transparent 78%,#06111466)}#hud{position:fixed;inset:0;pointer-events:none}button,select{pointer-events:auto}.topbar{position:absolute;inset:0 0 auto;display:flex;justify-content:space-between;align-items:center;padding:25px 32px;background:linear-gradient(#09171899,transparent)}.identity{display:flex;align-items:center;gap:16px}.seal{font:45px Georgia;color:var(--gold)}.eyebrow{font-size:9px;letter-spacing:2.6px;font-weight:600;color:var(--muted)}.identity h1{font-size:19px;letter-spacing:4px;margin:5px 0 0;font-weight:400}.divider{height:30px;width:1px;background:var(--line);margin:0 5px}.location{font-size:12px;color:#dedcca}.location small{display:block;font-size:10px;color:var(--muted);margin-top:7px}.top-actions{display:flex;align-items:center;gap:10px}.saved{font-size:10px;color:#adbcb4;margin-right:12px}.icon-button{width:35px;height:35px;border:1px solid var(--line);border-radius:50%;background:#14242888;color:var(--gold);font-size:19px}.icon-button:hover{background:#334440}.panel{background:linear-gradient(140deg,rgba(23,40,41,.88),rgba(11,24,28,.78));border:1px solid var(--line);box-shadow:0 12px 45px #0002;backdrop-filter:blur(14px)}.quest{position:absolute;top:115px;left:32px;width:252px;padding:22px;border-radius:3px}.quest h2{font-size:15px;font-weight:500;margin:12px 0 9px}.quest p{font-size:10px;color:var(--muted);margin:0 0 24px}.progress-line{display:flex;justify-content:space-between;align-items:center;font-size:11px}.progress-line strong{font:21px Georgia;color:var(--gold)}.progress-line small{font:12px Arial;color:var(--muted)}.progress-track{height:3px;background:#c4b27e25;margin:12px 0 17px}.progress-track i{display:block;width:0;height:100%;background:var(--gold);box-shadow:0 0 9px #e2bf7555;transition:width .6s}.category{display:flex;gap:10px;align-items:center;padding:8px 0;font-size:11px}.category .cat-symbol{font-size:18px;width:23px;text-align:center}.category .count{margin-left:auto;color:var(--muted);font-size:10px}.category.done .count{color:var(--gold)}.chapter-note{position:absolute;right:32px;top:125px;text-align:right;font-size:11px;line-height:1.8;color:#d1d8ccbb}.chapter-note>span{display:block;color:var(--gold);font-size:24px;margin-bottom:7px}.chapter-note small{font-size:10px;color:#a4b5b3}#crosshair{position:absolute;top:50%;left:50%;width:21px;height:21px;border:1px solid #f8e7c966;border-radius:50%;transform:translate(-50%,-50%);transition:.2s}#crosshair i{position:absolute;top:8px;left:8px;width:3px;height:3px;border-radius:100%;background:#fff2d5}#crosshair.active{border-color:#efd292;box-shadow:0 0 18px #e1bb5866;transform:translate(-50%,-50%) scale(1.3)}.target{position:absolute;left:50%;top:calc(50% + 30px);transform:translateX(-50%);text-align:center;text-shadow:0 2px 6px #000;min-width:260px}.target span{display:block;font-size:13px;color:#f4e7c8}.target small{display:block;font-size:10px;color:#cfdbce;margin-top:8px}#toast{position:absolute;top:24%;left:50%;transform:translate(-50%,-6px);padding:12px 23px;border:1px solid var(--line);background:#102326e8;border-radius:3px;font-size:12px;color:#ead3a0;opacity:0;transition:.3s;max-width:70%;text-align:center}#toast.visible{opacity:1;transform:translate(-50%,0)}.inventory{position:absolute;bottom:110px;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:13px;padding:12px 18px;border-radius:3px;font-size:11px;min-width:245px}.inventory-icon{font-size:28px;color:var(--gold)}.inventory .eyebrow{font-size:8px;letter-spacing:1.8px;display:block;margin-bottom:5px}.inventory strong{font-size:11px;font-weight:400;color:var(--gold);margin-left:10px}#held-types{display:flex;gap:5px;margin-left:auto}#held-types span{font-size:12px;padding:3px;border-bottom:2px solid currentColor}.spellbar{position:absolute;bottom:29px;left:50%;transform:translateX(-50%);display:flex;gap:9px}.spell{position:relative;display:flex;align-items:center;text-align:left;gap:11px;background:linear-gradient(140deg,#1f3536e6,#13262be8);border:1px solid var(--line);padding:13px 19px 13px 13px;border-radius:4px;min-width:164px;overflow:hidden;transition:background .2s,transform .2s}.spell:hover{background:#354b44;transform:translateY(-2px)}.spell strong{display:block;font-size:12px;font-weight:500;letter-spacing:.3px}.spell small{display:block;font-size:9px;margin-top:5px;color:var(--muted)}kbd{font:9px Arial;border:1px solid #d7c08a44;border-radius:3px;padding:3px 4px;color:#d4cba9;white-space:nowrap}.spell kbd{position:absolute;top:5px;left:5px;font-size:8px;padding:1px 3px;border:0;color:#9da59a}.spell-glyph{font:30px Georgia;color:var(--gold);width:30px;text-align:center}.nova{border-color:#a892624d;min-width:216px;background:linear-gradient(125deg,#4b4630c9,#182a2fe8)}#cooldown-fill{position:absolute;bottom:0;left:0;height:2px;background:#ddbf7d;width:100%;transition:width .15s}.desktop-help{position:absolute;left:30px;bottom:26px;display:flex;gap:13px;font-size:9px;color:#a8b7b3;max-width:270px;flex-wrap:wrap;line-height:1.8}.desktop-help kbd{margin-right:4px}#joystick,.look-hint{display:none}#spell-flash{position:fixed;inset:0;pointer-events:none;background:radial-gradient(ellipse at 50% 60%,#c9e9d000,#ddca7966);opacity:0;z-index:4;transition:opacity .4s}.overlay{position:fixed;inset:0;z-index:10}.welcome{background:#101c22}.welcome-art{position:absolute;inset:0;background:url('assets/lumen-library.jpg') center center/cover no-repeat;animation:slow-drift 30s ease-in-out infinite alternate}.welcome-shade{position:absolute;inset:0;background:linear-gradient(90deg,#061116f2 0%,#08151cbd 29%,#07131b26 65%),linear-gradient(0deg,#041116c9,transparent 20%)}.welcome-content{position:absolute;top:50%;left:9%;transform:translateY(-50%);max-width:460px}.gold{color:var(--gold)}.title-ornament{color:#c8ae74;font-size:14px;letter-spacing:5px;margin:27px 0 18px}.welcome h1{font:clamp(64px,7vw,104px)/.94 Georgia,'Times New Roman',serif;letter-spacing:-4px;margin:0;color:#eee3c9;font-weight:400}.welcome h1 em{font-weight:400;font-style:italic;color:#dec38d}.welcome h2{font-size:19px;letter-spacing:10px;font-weight:400;margin:23px 0}.welcome p{font-size:13px;line-height:2;color:#c5d0c9;margin:24px 0}.primary{background:#d9c18b;color:#172426;border:1px solid #f2dbaa;min-height:49px;width:100%;padding:14px 22px;text-align:left;font-size:12px;letter-spacing:.8px;transition:.2s}.primary:hover{background:#efdab0;box-shadow:0 0 30px #dec18526}.primary span{float:right;font-size:17px}.welcome .primary{max-width:292px}.welcome-meta{font-size:9px;margin-top:18px;letter-spacing:.5px;color:#acbdb8}.welcome-meta i{margin:0 8px;color:var(--gold)}#load-status{font-size:9px;color:var(--gold);margin-top:12px}.art-caption{position:absolute;right:5%;bottom:14%;text-align:right}.art-caption span{font-size:9px;letter-spacing:2px;color:var(--gold)}.art-caption p{font-size:12px;color:#e0decb}.welcome-footer{position:absolute;bottom:26px;left:5%;right:5%;display:flex;justify-content:space-between;letter-spacing:2px;font-size:8px;color:#aebcb5}.modal-overlay{background:#051216b8;backdrop-filter:blur(8px);display:flex;align-items:center;justify-content:center;padding:20px}.modal{width:420px;padding:35px;border-radius:5px;text-align:center;max-height:94dvh;overflow:auto}.modal h2{font-size:27px;font-weight:400;color:#e7d6ad;margin:15px 0}.modal p{font-size:12px;color:var(--muted);line-height:1.9}.instructions{margin:25px 0;text-align:left}.instructions>div{display:flex;gap:16px;margin:20px 0;font-size:11px;line-height:1.8}.instructions b{font:24px Georgia;color:var(--gold)}.instructions strong{font-weight:400;color:#e1cc9a}.instructions small{display:block;color:var(--muted);font-size:10px}.settings{display:flex;align-items:center;justify-content:space-between;border-top:1px solid var(--line);padding:14px 0 20px;font-size:11px;color:var(--muted)}select{background:#142b2e;color:#d4d7c8;border:1px solid var(--line);padding:5px;margin-left:8px}.text-button{background:none;border:0;padding:12px;font-size:11px;color:var(--gold)}.muted{color:var(--muted);font-size:10px;margin-top:8px}.completion-seal{font-size:70px;color:var(--gold);margin-bottom:20px}.result{display:flex;justify-content:space-around;margin:25px 0 30px;padding:20px 0;border-block:1px solid var(--line);font-size:10px;color:var(--muted)}.result strong{display:block;font:27px Georgia;color:var(--gold);margin-top:12px}.result small{font:11px Arial}#rotate{display:none}#reset-confirm{border-top:1px solid var(--line);margin-top:10px}.touch .desktop-help{display:none}.touch #joystick{display:block;pointer-events:auto;position:absolute;bottom:29px;left:36px;width:100px;height:100px;border:1px solid #e4d2a538;border-radius:50%;background:#14282a33;touch-action:none}.touch #stick{display:block;position:absolute;left:28px;top:28px;width:42px;height:42px;border:1px solid #e7d6a666;border-radius:50%;background:#bdc4a52b;box-shadow:0 0 25px #d6d8ad11}.touch .look-hint{display:block;position:absolute;right:25px;top:50%;font-size:9px;color:#c4c9b066;writing-mode:vertical-rl}.touch kbd{display:none}.touch .spellbar{left:auto;right:20px;transform:none}.touch .inventory{bottom:115px;left:auto;right:20px;transform:none}.touch .spell{min-width:120px;padding:10px}.touch .nova{min-width:160px}@keyframes slow-drift{from{transform:scale(1)}to{transform:scale(1.055)}}@media(max-width:1100px){.desktop-help{max-width:165px;font-size:8px;gap:6px}.quest{width:222px;padding:18px}.quest h2{font-size:13px}.spell{min-width:148px;padding:12px}.nova{min-width:195px}.topbar{padding:20px 24px}.quest{left:24px;top:100px}.chapter-note{right:24px}}@media(max-height:620px){.topbar{padding:12px 22px}.seal{font-size:31px}.identity h1{font-size:15px}.identity .eyebrow{font-size:7px}.quest{top:73px;left:22px;width:198px;padding:13px}.quest .eyebrow{font-size:7px}.quest h2{font-size:12px;margin:8px 0}.quest p{font-size:9px;margin-bottom:12px}.category{padding:4px 0;font-size:10px}.progress-track{margin:7px 0}.chapter-note{display:none}.spellbar{bottom:18px}.spell{padding:10px;min-width:140px}.spell-glyph{font-size:24px;width:24px}.spell strong{font-size:11px}.spell small{font-size:8px}.inventory{bottom:89px;padding:8px 13px}.touch .inventory{bottom:84px}.touch .spell{min-width:118px}.touch .nova{min-width:163px}.touch #joystick{width:86px;height:86px;bottom:23px;left:25px}.touch #stick{left:21px;top:21px}.welcome-content{left:8%;}.welcome h1{font-size:61px}.title-ornament{margin:13px 0;font-size:10px}.welcome h2{font-size:13px;margin:15px 0;letter-spacing:7px}.welcome p{font-size:10px;line-height:1.8;margin:15px 0}.welcome .primary{min-height:40px;padding:10px 18px;width:230px}.welcome-meta{margin-top:10px;font-size:8px}.welcome-footer{bottom:15px}.art-caption{bottom:17%}.modal{padding:20px;max-width:520px;width:520px}.modal h2{font-size:22px;margin:8px}.instructions{display:flex;gap:18px;margin:12px 0}.instructions>div{display:block;flex:1;margin:5px 0;font-size:10px}.instructions b{display:block;margin-bottom:5px}.settings{padding:8px 0}.completion-seal{font-size:40px;margin-bottom:5px}.result{margin:15px 0;padding:12px}.saved{display:none}.target{top:calc(50% + 24px)}.desktop-help{bottom:20px;max-width:130px}}@media(max-width:600px) and (orientation:portrait){.topbar{padding:16px}.location,.divider,.saved{display:none}.quest{top:90px;left:16px;width:190px}.chapter-note{display:none}.touch .spellbar{right:12px;left:12px;bottom:15px;gap:5px}.touch .spell{min-width:0;flex:1;padding:11px 7px;gap:5px}.touch .spell strong{font-size:10px}.touch .spell small{font-size:7px}.touch .spell-glyph{font-size:22px;width:20px}.touch .inventory{bottom:93px;right:14px;min-width:170px;padding:8px}.touch #joystick{bottom:102px;left:20px;width:86px;height:86px}.touch #stick{left:21px;top:21px}.welcome-content{left:9%;top:47%}.welcome h1{font-size:76px}.welcome-art{background-position:61% center}.welcome-shade{background:linear-gradient(90deg,#07151ddd,#07151d55),linear-gradient(0deg,#07151de6,transparent)}.art-caption{display:none}.welcome-footer{font-size:6px;letter-spacing:1px}.welcome-meta{font-size:8px}#rotate{position:fixed;inset:0;z-index:30;background:#101f27f5;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:20px;text-align:center;padding:30px}#rotate span{font-size:70px;color:var(--gold)}#rotate strong{font-size:15px;font-weight:400}#rotate small{font-size:11px;color:var(--muted)}#rotate button{background:none;border:1px solid var(--line);padding:12px 25px;color:var(--gold);margin-top:12px}}

.spell.charging { background: linear-gradient(125deg, #26302ac9, #182a2fe8); }
.touch .icon-button { width: 42px; height: 42px; }
@media (max-height: 620px) {
  .touch .quest { width: 184px; padding: 12px; }
  .touch .quest p { display: none; }
  .touch .quest h2 { margin-bottom: 12px; font-size: 11px; }
  .touch .category { padding: 3px 0; }
  .touch .quest .eyebrow { letter-spacing: 1.5px; }
}

#shelf-progress { border-top:1px solid var(--line);margin-top:9px;padding-top:12px;font-size:10px;color:var(--gold); }
#held-destination { display:block;color:#bcccbe;font-size:10px;margin-top:7px; }
.inventory { min-width:340px; }
.inventory .text-button { padding:8px;font-size:10px;border-left:1px solid var(--line); }
.castle-radar { position:absolute;right:30px;top:108px;padding:10px;width:145px;text-align:center;border-radius:3px; }
.castle-radar canvas { display:block;width:100%;height:166px; }
.castle-radar>span { display:block;font-size:10px;color:var(--gold);margin:8px 0; }
.castle-radar small { display:block;font-size:8px;color:#aabcb4;line-height:1.5; }
.map-sheet { width:900px;max-height:94dvh;background:#d7c59b;color:#453c2e;padding:24px;border:3px double #8e7650;box-shadow:0 20px 100px #0009; }
.map-sheet>header { display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #80674655;padding-bottom:12px; }
.map-sheet .eyebrow { color:#836949; }.map-sheet h2 { font:28px Georgia,serif;letter-spacing:4px;margin:9px 0 0; }
.map-sheet .icon-button { background:#80674622;color:#55412c;border-color:#80674666; }
.map-body { display:flex;max-height:calc(94dvh - 120px);gap:22px; }
.map-body canvas { display:block;min-width:0;width:58%;object-fit:contain; }
.map-body aside { width:42%;overflow:auto;padding:10px 0; }.map-body aside>p { font-size:13px;line-height:1.8; }
.map-room { display:flex;gap:9px;align-items:center;border-bottom:1px solid #826c482c;padding:9px 0;font-size:12px; }.map-room small { display:block;font-size:9px;color:#7b694d;margin-top:5px; }.map-room em { margin-left:auto;font:10px Georgia; }.map-body aside>small { display:block;font-size:9px;line-height:1.7;color:#826c48;margin-top:20px; }
@media(max-height:620px){.castle-radar{top:75px;right:22px;width:100px;padding:7px}.castle-radar canvas{height:100px}.castle-radar>span{font-size:8px;margin:5px 0}.castle-radar small{font-size:7px}#shelf-progress{font-size:8px;padding-top:7px;margin-top:5px}.inventory{bottom:88px;min-width:310px;padding:7px 12px}#held-destination{font-size:8px;margin-top:5px}.touch .quest{width:178px;padding:10px}.touch .quest .category{padding:2px 0}.touch .quest h2{margin:7px 0 10px}.map-sheet{padding:14px;width:800px}.map-sheet h2{font-size:19px;margin:5px 0 0}.map-sheet>header{padding-bottom:8px}.map-body{max-height:calc(94dvh - 89px)}.map-body canvas{width:52%}.map-body aside{width:48%;padding:0}.map-body aside>p{display:none}.map-room{padding:5px 0;font-size:10px}.map-room small{font-size:8px;margin-top:3px}.map-body aside>small{font-size:8px;margin-top:10px}}
@media(max-width:600px) and (orientation:portrait){.castle-radar{display:none}.inventory{min-width:280px}.touch .inventory{bottom:93px}.map-body aside{display:none}.map-body canvas{width:100%;max-height:75vh}.map-sheet h2{font-size:21px}}
@media(max-height:620px){.touch .target{top:calc(44% + 20px)}.touch .inventory{min-width:290px}.touch #held-destination{max-width:200px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}}
.map-body canvas{min-height:0;max-height:calc(94dvh - 120px)}
@media(max-height:620px){.map-body canvas{max-height:calc(94dvh - 89px)}}
@media(max-height:620px){.touch .target{top:calc(50% + 20px);min-width:200px;max-width:230px}.touch .target span{font-size:11px}.touch .target small{font-size:9px}}
/* Research grimoire */
.research-sheet{width:min(880px,94vw);max-height:92dvh;overflow:auto;padding:28px;background:linear-gradient(135deg,#142e32f5,#111e24fc);border:1px solid #9c8055;border-radius:16px;box-shadow:0 25px 100px #0009}.research-sheet header{display:flex;justify-content:space-between;align-items:center}.research-sheet h2{font:30px Georgia,serif;color:#e6cb92;margin:8px 0 20px}.research-wallet{display:flex;justify-content:space-between;align-items:center;gap:15px;padding:14px 0;border-block:1px solid #b99d6233}.research-wallet strong{font:30px Georgia;color:#edd9a4;margin-left:10px}.research-wallet small,.research-sheet footer{color:#a7b9b6;font-size:12px}#skill-tree{display:grid;grid-template-columns:repeat(3,1fr);gap:22px;margin:24px 0}.skill-branch{text-align:center}.skill-emblem{font-size:32px;color:#dfc588}.skill-branch h3{color:#f2e3bd;font-size:17px;margin:8px}.skill-branch p{font-size:11px;color:#aebebb;min-height:28px}.skill-nodes{display:flex;flex-direction:column;align-items:center}.skill-node{width:100%;display:grid;grid-template-columns:32px 1fr;text-align:left;align-items:center;gap:3px 8px;border:1px solid #c8ad70;background:#284a48;color:#f0dbab;padding:12px;border-radius:8px;cursor:pointer}.skill-node b{grid-row:span 2;text-align:center;font:24px Georgia}.skill-node span{font-size:13px}.skill-node small{font-size:10px;color:#c4c7b6}.skill-node:disabled{opacity:.5;cursor:default}.skill-node.learned{opacity:1;background:#2f5144;border-color:#85b599}.branch-line{color:#a99059;height:23px}.research-sheet footer{display:flex;justify-content:space-between;gap:15px}.inventory #cycle-book{white-space:nowrap}.top-actions #skills-toggle{color:#e2c687;white-space:nowrap}
@media(max-height:600px){.research-sheet{padding:14px 22px}.research-sheet h2{font-size:23px;margin:4px 0 8px}.research-wallet{padding:5px 0}.research-wallet strong{font-size:22px}#skill-tree{margin:10px 0;gap:20px}.skill-emblem{font-size:23px}.skill-branch h3{margin:3px}.skill-branch p{min-height:0;margin:5px 0}.skill-node{padding:7px}.branch-line{height:15px}.research-sheet footer{font-size:10px}.top-actions .saved{display:none}}
@media(max-width:540px){#skill-tree{grid-template-columns:1fr}.research-wallet{align-items:flex-start;flex-direction:column}.research-sheet footer span{display:none}}

.destination-card{padding:14px;margin-bottom:14px;border:1px solid #a86532;background:#b97c2220;color:#713d23;font-weight:700;line-height:1.8}.map-room.destination{background:#b87f2530;outline:2px solid #a86b32;border-radius:5px}#mini-destination{display:block;color:#efcf85;font-size:10px;line-height:1.4;max-width:180px}.castle-radar{height:auto}@media(max-height:600px){#mini-destination{font-size:8px;max-width:110px}.destination-card{padding:6px;font-size:11px;margin-bottom:5px}}
