/* Guidance occupies its own space. Modal cards stay inside the dialog's top layer. */
#guideHome{max-width:1122px;margin:16px auto;padding:0 20px}
#guideHome:empty,#guideHome:has(>[hidden]){display:none}
.game-guide{color:#10334b;background:#fff;border:2px solid #367b83;border-radius:20px;box-shadow:0 8px 24px #062d5114;overflow:hidden;font-size:1rem;line-height:1.5;overflow-wrap:anywhere}
.game-guide[hidden]{display:none!important}
.game-guide [hidden]{display:none!important}
.guide-header{display:flex;justify-content:space-between;gap:12px;align-items:start;background:#082e4c;color:#fff;padding:16px}
.guide-identity{display:flex;gap:12px;align-items:center}.guide-identity strong{display:block;font-size:1.05rem}.guide-eyebrow{font-size:.875rem;letter-spacing:.08em;color:#a7e8e2}.guide-symbol{display:grid;place-items:center;flex:none;width:44px;height:44px;border-radius:12px;background:#ffc64c;color:#082e4c;font-size:1.5rem;font-weight:900}
.guide-portrait{width:130px;height:130px;object-fit:contain;flex:none;border-radius:12px}
.game-guide button{background:#fff;color:#10334b;border:1px solid #648797;min-height:44px;padding:9px 12px;font-size:.9375rem;line-height:1.3}
.guide-header>button{flex:none;font-size:1.5rem;min-width:44px}.game-guide button:hover{background:#e3f4f3;color:#082e4c}.game-guide button:focus-visible{outline:3px solid #ba7400;outline-offset:2px}
.guide-content{padding:18px;display:grid;gap:14px}.guide-context,.guide-progress{color:#486071;font-size:.875rem}.guide-speech{position:relative;background:#eef7f7;border-radius:4px 16px 16px;padding:16px;display:grid;gap:10px}.guide-speech h2{font-size:1.25rem;line-height:1.25}.guide-speech p{font-size:1rem;line-height:1.55}.guide-content nav,.guide-content footer{display:flex;flex-wrap:wrap;gap:8px}.guide-content nav button{flex:1}.guide-content footer{border-top:1px solid #c7dddd;padding-top:12px}.guide-content footer button{font-size:.875rem;flex:1}.game-guide .guide-primary{background:#005b62;color:#fff;border-color:#005b62}.game-guide .guide-primary:hover{background:#00444a;color:#fff}.guide-highlight{outline:4px solid #bc7800!important;outline-offset:4px!important;scroll-margin-block:32px}
.guide-in-dialog{margin:12px 16px;max-height:48dvh;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
.dialog-head:has(>[data-guide-open]){flex-wrap:wrap}.dialog-head>[data-guide-open]{font-size:.875rem;line-height:1.3}
@media(min-width:1480px){body.guide-open{padding-right:360px}body.guide-open .toolbar{padding-inline:20px}#guideHome{margin:0;padding:0}.game-guide:not(.guide-in-dialog){position:fixed;right:18px;top:20px;width:330px;max-height:calc(100dvh - 40px);overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable;z-index:8}}
@media(max-width:600px){#guideHome{padding:0 12px}.guide-content{padding:12px}.guide-speech{padding:12px}.guide-in-dialog{margin:10px;max-height:42dvh}.guide-header{padding:12px}}
@media(prefers-reduced-motion:reduce){.game-guide *{animation:none!important;transition:none!important}.guide-highlight{scroll-behavior:auto!important}}
@media print{#guideHome,.game-guide,[data-guide-open]{display:none!important}body.guide-open{padding-right:0}}
.game-guide .tutor-character{border:0;background:transparent;color:white;text-align:left;padding:0;min-width:0;flex:1}.game-guide .tutor-character:hover{background:#174764;color:#fff}.tutor-tabs{display:flex;gap:5px;padding:10px;border-bottom:1px solid #c7dddd;flex-wrap:wrap}.tutor-tabs button{flex:1;font-size:.875rem}.tutor-tabs button[aria-pressed=true]{background:#005b62;color:#fff}.tutor-pane{padding:16px;display:grid;gap:14px;max-height:70dvh;overflow:auto;overscroll-behavior:contain}.tutor-pane[hidden],.guide-content[hidden]{display:none!important}.tutor-pane label{display:grid;gap:6px;font-weight:700;font-size:.9375rem}.tutor-pane select,.tutor-pane input,.tutor-pane textarea{width:100%;min-width:0;background:#fff;color:#10334b;font:inherit;border:1px solid #648797;border-radius:8px;padding:10px}.tutor-pane article{display:grid;gap:12px}.tutor-pane h3{font-size:1.2rem;line-height:1.3}.tutor-objective{background:#edf7f7;padding:12px;border-radius:8px}.tutor-pane details{border:1px solid #bad1d5;padding:12px;border-radius:8px}.tutor-pane summary{cursor:pointer;font-weight:700;min-height:36px}.tutor-pane details p{margin-top:12px}.tutor-disclosure,.tutor-pane small{font-size:.875rem;color:#405b6e}.tutor-status{padding:10px;background:#fff4d6;color:#604000;border-radius:8px;font-size:.9375rem}.tutor-log{max-height:44dvh;overflow:auto;display:grid;gap:12px;overscroll-behavior:contain}.tutor-log:empty{display:none}.tutor-message{padding:12px;border-radius:12px;background:#edf7f7;white-space:pre-wrap;overflow-wrap:anywhere}.tutor-message.user{background:#e8eef6}.tutor-message strong,.tutor-message span{display:block}.tutor-message strong{font-size:.875rem;margin-bottom:8px}.tutor-pane form{display:grid;gap:10px}.game-guide[data-tutor-state=thinking] .guide-symbol{background:#a7e8e2}
