/* Chapter I. These surfaces extend the shared HUD; gameplay stays on the server. */
.class-glyph{width:64px;height:64px;fill:var(--class-color,#d7b16a);overflow:visible;filter:drop-shadow(0 3px 4px #081018aa)}
.class-glyph .glyph-aura{fill:var(--class-color,#d7b16a);opacity:.09}.class-glyph .glyph-line{fill:none;stroke:#f5edcd;stroke-width:1.5;stroke-linecap:round;opacity:.85}.class-glyph .glyph-light{fill:#faefd3}.class-glyph .glyph-outline{fill:none;stroke:var(--class-color,#d7b16a);stroke-width:1;opacity:.55}.class-glyph .glyph-orbit{fill:none;stroke:#f0e3bd;stroke-width:1.4;stroke-dasharray:20 7;opacity:.65}.class-glyph.is-compact{width:45px;height:45px}
.start-card{width:408px;padding:26px 28px}.start-card .panel-heading{margin-bottom:13px}.start-card>p{margin-bottom:18px}.origin-fieldset{padding:0;border:0;margin:20px 0 0;min-width:0}.origin-fieldset legend{font-size:11px;color:#c5cbb2;margin:0 0 10px}.origin-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px}.origin-choice{position:relative;display:flex!important;flex-direction:column;align-items:center;border:1px solid #6981735c;background:linear-gradient(145deg,#31434877,#132830dd);padding:10px 2px 9px;cursor:pointer;transition:background .16s,border-color .16s;min-width:0;margin:0!important;border-radius:3px}.origin-choice input{position:absolute;inset:0;opacity:0;cursor:pointer;margin:0;width:100%;height:100%}.origin-choice:focus-within{outline:2px solid #e3c183;outline-offset:3px}.origin-choice .class-glyph{width:43px;height:43px}.origin-choice strong{font-size:11px;font-weight:550;color:#e2dec7;margin-top:6px}.origin-choice>span{font-size:8px;color:#9caeaa;margin-top:4px}.origin-choice.is-selected{border-color:var(--class-color);background:linear-gradient(145deg,#66796855,#223631cc);box-shadow:inset 0 0 13px #f0de9912}.origin-choice.is-selected strong{color:var(--class-color)}.start-card .origin-description{margin:13px 0 17px;min-height:47px;font-size:11px;line-height:1.8;color:#c1cdbf}.start-card small{font-size:9px;line-height:1.9;margin-top:14px}.chapter-route{display:flex;align-items:center;gap:10px;color:#b3bca8;font-size:10px;margin-top:33px}.chapter-route i{width:20px;height:1px;background:#ab956266}
.class-shortcut{display:inline-flex;align-items:center;padding:2px 0;background:none;border:0;border-bottom:1px dotted #bba06b70;color:#c6b583;font:inherit;max-width:100%;cursor:pointer}.class-shortcut>span{max-width:106px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.class-shortcut:hover{color:#f0d6a0}.player-card>div>span{display:flex;align-items:center;gap:7px}.player-card .crest .class-glyph{width:40px;height:45px}
.panel-tabs{display:grid;grid-template-columns:repeat(5,minmax(0,1fr))}.panel-tabs button{justify-content:center;min-width:0;padding-left:4px;padding-right:4px}.skill>svg.class-glyph{width:100%;height:100%;padding:6px 5px 14px}.skill>span{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;max-width:100%;padding:0 2px;box-sizing:border-box}
.discipline-summary{display:flex;align-items:center;gap:18px;padding:7px 0 20px;border-bottom:1px solid #8a9c7552}.discipline-summary>.class-glyph{flex-shrink:0;width:76px;height:76px}.discipline-summary h3{font:25px Georgia,"AppleMyungjo",serif;color:var(--class-color);margin:7px 0 5px}.discipline-summary p{margin:0;font-size:12px}.discipline-passive{font-size:12px!important;padding:14px 16px;background:#304a434d;border-left:2px solid #b49a63;margin:18px 0 26px!important;line-height:1.9!important}.discipline-skills{display:grid;gap:9px;margin:14px 0 27px}.discipline-skills article{display:flex;align-items:flex-start;gap:13px;background:#1226308c;border:1px solid #8b9f7229;padding:14px;border-radius:3px}.discipline-skills .class-glyph{flex:0 0 45px}.discipline-skills h4{font-size:13px;color:#e1dcc1;margin:0 0 7px;display:flex;align-items:center;gap:9px}.discipline-skills h4 kbd{display:inline-flex;justify-content:center;min-width:24px;padding:3px 5px;font-size:10px;background:#314849;border:1px solid #70876c70;border-radius:2px;color:#dec594}.discipline-skills p{margin:0 0 7px;font-size:11px;line-height:1.8}.discipline-skills small{color:#a8bdd0;font-size:10px}.advancement-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:15px}.advancement-card{border:1px solid #7d8c624d;background:linear-gradient(135deg,#2d424390,#172b32c9);padding:19px 16px;display:flex;flex-direction:column}.advancement-card.is-selected{border-color:#d5b570;background:linear-gradient(135deg,#66754e55,#243831)}.advancement-card h4{font:17px Georgia,"AppleMyungjo",serif;color:#e6d2a3;margin:10px 0 7px}.advancement-card p{font-size:11px;margin:0 0 16px;line-height:1.9;flex:1}.advancement-card button{width:100%;font-size:11px;min-height:44px;padding:10px}.advancement-card button:disabled{cursor:default;opacity:.52}.class-training-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:7px;margin-top:13px}.class-training{background:#233b3d99;border:1px solid #6e8a6755;padding:10px 2px;min-height:105px;display:flex;align-items:center;flex-direction:column;border-radius:3px}.class-training strong{font-size:11px;color:#dccfb1;margin-top:5px}.class-training small{font-size:9px;color:#9eafa2;margin-top:6px}.class-training:disabled{opacity:.65;cursor:default}.class-training.is-selected{border-color:var(--class-color);opacity:1}.class-training:not(:disabled):hover{border-color:var(--class-color);background:#40524a}
.quest-region{font-size:10px;color:#b6ae8d}.quest-dialogue{margin:10px 0 15px;padding:12px 14px;font-size:12px;line-height:1.95;border-left:2px solid #c0a167;background:#162b3299;color:#d1d7c7}.quest-card-footer{flex-wrap:wrap;gap:10px}.quest-track-button{margin-left:auto;padding:8px 10px;min-height:36px;font-size:10px;border:1px solid #93a57852;border-radius:2px}.quest-track-button[aria-pressed="true"]{color:#e0c485;border-color:#c5aa64;background:#3c473a}.journal-chapter{margin-top:18px;border-top:1px solid #8b9b7445}.journal-chapter>summary{font-size:12px;color:#c2c7ac;cursor:pointer;padding:16px 1px;list-style-position:inside}.journal-chapter .journal-card{margin-top:10px}.dialog-actions{flex-wrap:wrap;align-items:center;gap:8px}.dialog-actions button{font-size:11px;min-height:44px}.portrait .class-glyph{padding:6px;box-sizing:border-box}
.atlas-heading h3{font:23px Georgia,"AppleMyungjo",serif;color:#dcc796;margin:8px 0}.atlas-heading p{font-size:12px!important;line-height:1.8!important}.atlas-regions{display:flex;flex-wrap:wrap;gap:5px;margin:15px 0 14px}.atlas-regions button{font-size:10px;color:#b9c7bc;padding:9px 11px;background:#203940;border:1px solid #6e886e66;border-radius:2px;min-height:38px}.atlas-regions button.active{background:#536151;color:#f0dfb5;border-color:#b4a36c}.modal-map{display:block;max-width:100%;width:100%;height:auto;border:1px solid #8ca17a55;border-radius:3px;box-shadow:inset 0 0 25px #06141c}.atlas-legend{display:flex;flex-wrap:wrap;gap:16px;font-size:10px;color:#bac5b5;margin:13px 0 16px}.atlas-legend span{display:flex;align-items:center;gap:6px}.atlas-legend i{display:inline-block;width:7px;height:7px;border-radius:50%;background:#fff3ce}.atlas-legend .map-npc{background:#edc977}.atlas-legend .map-enemy{background:#d17862}.atlas-legend .map-objective{background:#f1d995;border-radius:0;transform:rotate(45deg)}.atlas-services{display:grid;grid-template-columns:1fr 1fr;gap:7px}.atlas-services>div{padding:11px 12px;background:#152d3699;border:1px solid #8d9d7433;display:grid;grid-template-columns:1fr auto;gap:5px}.atlas-services strong{font-size:11px;color:#dacfac;font-weight:500}.atlas-services span{grid-column:1;grid-row:2;font-size:10px;color:#a4b7ab}.atlas-services small{grid-column:2;grid-row:1;font-size:10px;color:#a6c3c4}
@media(max-width:850px){.start-card{width:360px;padding:24px}.chapter-route{display:none}.start-brand .tagline{font-size:12px}.class-shortcut>span{max-width:75px}.panel-tabs button{font-size:10px;gap:5px}.class-training-grid{gap:5px}.discipline-skills article{padding:12px}}
@media(max-width:650px){.start-screen{overflow-y:auto;flex-direction:column;align-items:center;justify-content:flex-start;padding:26px 16px 34px;gap:20px;height:100dvh;box-sizing:border-box}.start-brand{padding:0!important;flex-shrink:0;text-align:center}.start-brand .sigil{display:none}.start-brand>p:first-of-type{font-size:9px;margin:5px 0 10px}.start-brand h1{font-size:30px;line-height:1;letter-spacing:4px}.start-brand h1 br{display:none}.start-brand h1 span{margin-left:8px}.start-brand h2{font-size:17px;margin:12px 0 7px}.start-brand .tagline{display:none}.start-card{width:min(390px,100%);padding:20px 18px;box-sizing:border-box}.start-card .panel-heading{font-size:18px}.start-card>p{font-size:11px;margin-bottom:14px}.start-card>input{padding:10px}.origin-fieldset{margin-top:16px}.origin-grid{gap:4px}.origin-choice{padding:8px 1px}.origin-choice .class-glyph{width:39px;height:39px}.origin-choice strong{font-size:10px}.origin-choice>span{font-size:8px}.start-card .origin-description{font-size:10px;min-height:38px;margin:10px 0 13px}.start-card small{font-size:9px;margin-top:12px}.start-foot{position:static;flex-shrink:0;font-size:9px;line-height:1.6}.class-shortcut{font-size:8px;padding:1px 0}.class-shortcut>span{max-width:60px}.player-card>div>span{gap:4px}.panel-tabs button{font-size:9px;gap:3px;min-height:42px}.panel-tabs button svg{width:12px;height:12px}.discipline-summary{gap:13px}.discipline-summary>.class-glyph{width:59px;height:59px}.discipline-summary h3{font-size:21px}.discipline-summary p{font-size:10px}.discipline-passive{font-size:11px!important;padding:12px}.discipline-skills article{gap:10px;padding:11px}.discipline-skills .class-glyph{flex-basis:36px;width:36px;height:36px}.discipline-skills h4{font-size:12px}.discipline-skills p{font-size:10px}.advancement-grid{gap:8px}.advancement-card{padding:14px 12px}.advancement-card h4{font-size:15px;line-height:1.5}.advancement-card p{font-size:10px}.advancement-card button{font-size:10px;padding:8px 3px;min-height:44px}.class-training .class-glyph{width:36px;height:36px}.class-training{min-height:91px}.class-training strong{font-size:10px}.class-training small{font-size:8px}.quest-dialogue{font-size:11px}.quest-track-button{min-height:40px}.atlas-regions{gap:4px}.atlas-regions button{padding:8px;min-height:40px;font-size:9px}.atlas-services{gap:5px}.atlas-services>div{padding:10px 8px}.atlas-services strong{font-size:10px}.atlas-services span{font-size:9px}.atlas-heading h3{font-size:20px}.atlas-heading p{font-size:11px!important}.atlas-legend{gap:11px;font-size:9px}}
@media(max-height:660px) and (min-width:651px){.start-screen{overflow-y:auto;padding-top:20px;padding-bottom:20px}.start-card{padding:18px 24px}.start-card .origin-description{margin-bottom:12px;min-height:35px}.start-card small{margin-top:10px}.start-foot{display:none}.start-brand h1{font-size:60px}.start-brand .sigil{display:none}}
@media(prefers-reduced-motion:reduce){.origin-choice{transition:none}}

/* Creation and resume are separate intents. Both retain a visible way back. */
.start-screen{overflow-y:auto}.start-card{max-height:calc(100dvh - 70px);overflow-y:auto;scrollbar-width:thin}
.start-modes{display:flex;gap:6px;margin:4px 0 18px;padding:4px;background:#0b1d24b3;border:1px solid #7a906440;border-radius:4px}
.start-modes button{flex:1;min-height:44px;padding:8px 5px;border:1px solid transparent;border-radius:3px;background:transparent;color:#a9bbb1;font-size:11px}
.start-modes button[aria-pressed="true"]{color:#efdbad;border-color:#b39d635c;background:#4f604a5c}
.start-card button:disabled{opacity:.5;cursor:wait}.start-card button:focus-visible,.start-demo-link:focus-visible{outline:2px solid #f0d099;outline-offset:3px}
.start-card .start-intro{font-size:11px;color:#b9c9bb;line-height:1.8;margin:0 0 17px}
#name-input{display:block;box-sizing:border-box;width:100%;background:#08131aba;border:1px solid #62746c;padding:12px;color:#efe8d5;user-select:text;font-size:13px;min-height:44px}
.guest-list{display:grid;gap:8px;max-height:310px;overflow-y:auto;padding:3px;scrollbar-width:thin}
.guest-choice{display:flex;align-items:center;gap:10px;min-height:76px;width:100%;padding:12px 10px;text-align:left;border:1px solid #72907666;border-radius:3px;background:linear-gradient(130deg,#344b4666,#142931);color:#d8dec7}
.guest-choice:hover{border-color:#dfc286;background:#395047}.guest-choice>.class-glyph{width:40px;height:40px;flex-shrink:0}
.guest-choice>span{display:grid;gap:6px;min-width:0;flex:1}.guest-choice strong{font-size:12px;overflow-wrap:anywhere}.guest-choice small{color:#a4bcb1;font-size:10px;line-height:1.5;text-align:left;margin:0}.guest-choice b{font-size:10px;font-weight:500;color:#e3c68d;white-space:nowrap}
.start-card .guest-hint{font-size:10px;color:#9eafa2;line-height:1.8;margin:12px 0 0}
.start-card .start-status{font-size:11px;line-height:1.8;padding:10px 12px;background:#3e392850;border:1px solid #b29a6c66;color:#ebd4a6;margin:14px 0 0}
#start-cancel{width:100%;margin-top:8px;min-height:44px;font-size:11px}
.start-demo-link{display:block;text-align:center;padding:14px 0 0;min-height:44px;box-sizing:border-box;color:#c2b58d;font-size:10px}
#guest-storage-note{padding-top:14px;border-top:1px solid #82957633;line-height:1.8}#guest-storage-note.is-warning{color:#edc78c}
@media(max-width:650px){.start-card{max-height:none;overflow:visible;flex-shrink:0}.start-screen{align-items:center}.guest-list{max-height:290px}.start-modes{margin-bottom:15px}.start-card .start-intro{font-size:10px;margin-bottom:14px}.guest-choice{min-height:72px;gap:8px;padding:10px 8px}.guest-choice>.class-glyph{width:34px;height:34px}.guest-choice strong{font-size:11px}.guest-choice b{font-size:9px}}
@media(max-height:660px) and (min-width:651px){.start-screen{align-items:flex-start}.start-card{max-height:none;overflow:visible}.start-brand{position:sticky;top:30px}}

/* One painted vector family, from the 32px crest to the full skill reference. */
.class-glyph.glyph-painted{fill:none;filter:drop-shadow(0 1px 1.5px #06121aaa)}
.glyph-painted-art{paint-order:normal}
.skill>svg.class-glyph.glyph-painted{padding:3px 3px 12px}
.origin-choice .glyph-painted{width:46px;height:46px}
.discipline-summary>.glyph-painted{width:80px;height:80px}
.discipline-skills article{gap:15px;padding:15px;background:linear-gradient(115deg,#243b414f,#10252fbc);border-color:#85968238;box-shadow:inset 1px 0 #c6b88030}
.discipline-skills .class-glyph.glyph-painted{width:54px;height:54px;flex-basis:54px}
.discipline-skills h4{font-size:14px;line-height:1.5}.discipline-skills p{color:#c5d0c5}.discipline-skills small{color:#abc5ce;letter-spacing:.2px}

/* The atlas is a projection of the same world features as the 3D scene. */
.atlas-heading{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:4px 14px}
.atlas-heading>div{min-width:0}.atlas-heading .eyebrow{font-size:9px;letter-spacing:1.8px;color:#9db8b4}
.atlas-heading h3{font-size:25px;margin:7px 0;color:#f0dbad}.atlas-heading>p{width:100%;margin:5px 0 0;color:#b8c9c2}
.atlas-level{flex-shrink:0;display:inline-flex;padding:7px 10px;border:1px solid #b7a87944;color:#dbd8b4;font-size:11px;background:#b4a4760b;letter-spacing:.3px}
.atlas-regions{gap:5px;margin:17px 0 12px}.atlas-regions button{flex:1 1 82px;min-height:44px;padding:9px 7px;font-size:11px;line-height:1.5;color:#cbd8d0;background:linear-gradient(#233d43,#193137);border-color:#5a78745c;transition:background .15s,border-color .15s}
.atlas-regions button:hover{background:#344c48;border-color:#a29f76}.atlas-regions button.active{color:#fff0c6;background:linear-gradient(#69715b,#465748);border-color:#cfb97c;box-shadow:inset 0 0 0 1px #ddd1a220}
.atlas-regions button:focus-visible{outline:2px solid #f1d995;outline-offset:3px}
.atlas-map-frame{border:1px solid #a1966766;background:#122730;box-shadow:0 8px 26px #04101745;overflow:hidden}
.atlas-map-caption,.atlas-map-destination{display:flex;align-items:center;gap:8px;min-height:34px;padding:7px 12px;font-size:11px;line-height:1.5;box-sizing:border-box;background:linear-gradient(90deg,#254047,#18323b);color:#d4ddca}
.atlas-map-caption{border-bottom:1px solid #798d7740;justify-content:space-between;flex-wrap:wrap}.atlas-map-caption>span:last-child{color:#a6c1bd;font-size:10px;letter-spacing:1px}
.atlas-map-caption i{display:inline-block;width:5px;height:5px;margin-right:5px;border-radius:50%;background:#d7e8ca;box-shadow:0 0 5px #d7e8ca4d}
.modal .atlas-map-frame canvas.modal-map{width:100%;max-width:100%;height:clamp(350px,42vw,480px);aspect-ratio:auto;display:block;border:0;border-radius:0;box-shadow:none}
.modal .atlas-map-frame[data-map-view="world"] canvas.modal-map{height:clamp(480px,46vw,570px)}
.atlas-map-destination{border-top:1px solid #798d7740;color:#eddaad;min-height:35px}.atlas-map-destination>[data-map-destination]{min-width:0;flex:1;overflow-wrap:anywhere}.atlas-map-destination>small{color:#adc3be;font-size:10px;flex-shrink:0}
.atlas-target-diamond{display:inline-block;width:6px;height:6px;flex:0 0 6px;background:#f1d995;transform:rotate(45deg);box-shadow:0 0 0 3px #f1d99519}
.atlas-legend{gap:10px 16px;padding:11px 0;margin:0 0 10px;border-bottom:1px solid #7894872c;font-size:11px;line-height:1.6;color:#c7d6cc}
.atlas-legend i{width:7px;height:7px;box-shadow:0 0 0 2px #0c222a}.atlas-legend .map-player{clip-path:polygon(50% 0,100% 100%,50% 70%,0 100%);border-radius:0}.atlas-legend .map-npc{border:1px solid #ebce87;background:#132831}.atlas-legend .map-safe{background:#6f9f872b;border:1px solid #b1d3ac;box-shadow:none}.atlas-legend .map-enemy{background:#bd7867}
.atlas-map-frame>.atlas-legend{margin:0;padding:6px 8px;gap:4px 10px;border-bottom:1px solid #78948740;background:#142d36}
.atlas-map-frame>.atlas-map-destination{border-top:0;border-bottom:1px solid #798d7740}
.modal .atlas-description{font-size:12px!important;line-height:1.8!important;color:#b8c9c2;margin:10px 0 14px}
.atlas-services{gap:8px}.atlas-services>div{position:relative;display:grid;grid-template-columns:1fr auto;gap:5px;padding:12px 12px 12px 13px;background:linear-gradient(115deg,#24404850,#152c34b8);border-color:#91a38931;border-left:2px solid var(--service-color,#c1b68b)}
.atlas-services .atlas-service-tag{grid-column:1;grid-row:1;font-size:11px;letter-spacing:.3px;color:var(--service-color,#ccb888)}
.atlas-services strong{grid-column:1;grid-row:2;font-size:12px;font-weight:550;color:#e7dfc1}
.atlas-services .atlas-service-role{grid-column:1/-1;grid-row:3;color:#b9cfc4;font-size:11px;line-height:1.6}
.atlas-services small{grid-column:2;grid-row:1/3;align-self:center;font-size:11px;color:#b7d0d1;font-variant-numeric:tabular-nums}
.atlas-footnote{font-size:11px!important;color:#adc7c0!important;line-height:1.8!important;margin-top:14px!important}
.atlas-route-notes{margin:8px 0 0;border:1px solid #87a38b35;background:#10293270}.atlas-route-notes>summary{cursor:pointer;padding:13px 12px;min-height:44px;box-sizing:border-box;font-size:12px;color:#e0d5b7;line-height:1.6}.atlas-route-notes>summary:focus-visible{outline:2px solid #f1d995;outline-offset:2px}.atlas-route-notes ol{margin:0;padding:0 12px 14px 32px;display:grid;gap:14px}.atlas-route-notes li{padding-left:2px;color:#b4cdc1;font-size:12px;line-height:1.65}.atlas-route-notes strong{display:block;color:#e2d6b4;font-size:13px;font-weight:550}.atlas-route-notes small{margin-left:7px;color:#bcd2c9;font-size:11px}.atlas-route-notes span{display:block;margin-top:5px;color:#cbd2bc}.atlas-route-notes p{margin:4px 0 0!important;font-size:12px!important;color:#b4d0c5}
@media(max-width:650px){
  .origin-choice .glyph-painted{width:40px;height:40px}.discipline-summary>.glyph-painted{width:64px;height:64px}
  .discipline-skills article{gap:11px;padding:12px}.discipline-skills .class-glyph.glyph-painted{width:43px;height:43px;flex-basis:43px}.discipline-skills h4{font-size:12px}
  .modal:has(.atlas-map-frame){padding-top:12px;padding-bottom:12px}
  .modal:has(.atlas-map-frame) .modal-head{top:-12px;margin:0 0 6px;padding:0 0 6px}
  .atlas-heading h3{font-size:22px;line-height:1.25;margin:4px 0}.atlas-heading .eyebrow{display:block;font-size:8px;line-height:12px;letter-spacing:1.2px}.atlas-level{padding:6px 8px}
  .atlas-regions{display:grid;grid-template-columns:repeat(6,minmax(44px,1fr));gap:3px;margin:6px 0}
  .atlas-regions button{min-width:44px;min-height:44px;padding:4px 1px;line-height:1.45;word-break:keep-all;overflow-wrap:normal}
  .modal .atlas-map-frame canvas.modal-map{height:380px}.modal .atlas-map-frame[data-map-view="world"] canvas.modal-map{height:clamp(430px,calc(100dvh - 364px),480px)}
  .atlas-map-caption,.atlas-map-destination{padding:5px 9px}.atlas-map-caption{min-height:30px}.atlas-map-destination{min-height:32px}.atlas-map-caption>span:last-child,.atlas-map-destination>small{letter-spacing:0}
  .modal .atlas-description{font-size:11px!important}
  .atlas-legend{gap:10px 12px}.atlas-services>div{padding:10px 9px;gap:4px}.atlas-services strong{font-size:12px}
}
@media(max-width:340px){.atlas-regions{grid-template-columns:repeat(3,minmax(44px,1fr))}}
@media(prefers-reduced-motion:reduce){.atlas-regions button{transition:none}}
