/* The first mate speaks from the chart-side desk. Controls remain reachable. */
#first-mate{position:absolute;z-index:9;right:22px;top:var(--guidance-top,435px);width:284px;max-height:max(175px,calc(100dvh - var(--guidance-top,435px) - 228px));overflow:auto;padding:12px;border:1px solid #8b774c;background:linear-gradient(120deg,#253129f5,#0d1914f5);box-shadow:inset 0 0 0 3px #101a1390,0 7px 24px #0008;scrollbar-color:#8a7548 #111d16;font:12px/1.5 system-ui;color:#c5ccb4;scrollbar-width:thin}
#first-mate[hidden]{display:none}
#first-mate header{display:flex;gap:6px;align-items:center;padding-bottom:8px;border-bottom:1px solid #71614080;position:sticky;top:-12px;background:#17241df5;z-index:1}
#first-mate header>div{flex:1;min-width:0}#first-mate header strong{display:block;font:15px Georgia;color:#e0cea0;margin-top:4px}#first-mate header .smallcaps{font-size:8px;letter-spacing:.14em}
#first-mate button{font:11px/1.4 system-ui;padding:7px 8px;min-height:30px;white-space:normal;text-align:left}
#first-mate button:focus-visible{outline:2px solid #ffe294;outline-offset:3px}
#first-mate header button{font-size:10px;padding:5px;flex:none}#first-mate header button:last-child{font-size:18px;padding:1px 7px}
.guidance-suggestions{display:grid;gap:6px;margin-top:10px}.guidance-suggestions button{display:flex;justify-content:space-between;gap:10px;align-items:center;border-color:#746642;background:linear-gradient(100deg,#313e2e,#18261e)}.guidance-suggestions button>span{color:#e1d4ad}.guidance-suggestions button>small{max-width:76px;flex:none;font-size:9px;color:#b5ba9e;text-align:right}
.guidance-library{margin-top:8px}.guidance-library>p{font-size:11px}.guidance-section-label{font-size:9px!important;letter-spacing:.1em;text-transform:uppercase;color:#d8bc7f;margin-top:16px}
.guidance-modes{display:flex;gap:4px;flex-wrap:wrap}.guidance-modes button{flex:1;font-size:10px!important}.guidance-modes [aria-pressed="true"]{background:#6b5130;color:#fff2c5;border-color:#c2a265}
#first-mate .guidance-lesson{display:grid;grid-template-columns:1fr auto;width:100%;gap:3px;margin:5px 0;background:#203025}.guidance-lesson>span{color:#e0cda1}.guidance-lesson small{font-size:9px;color:#acb69f}.guidance-lesson small:last-child{grid-column:1/-1}
.guidance-tutorial,.guidance-explanation{margin-top:12px;border-left:2px solid #bda360;padding:3px 0 5px 10px}.guidance-tutorial h3{font:18px Georgia;color:#e9d5a2;margin:6px 0}.guidance-tutorial p,.guidance-explanation p{font-size:12px;line-height:1.6;margin:8px 0}.guidance-tutorial>small,.guidance-explanation>small{display:block;font-size:10px;color:#afb99f;margin:8px 0}.guidance-buttons{display:flex;gap:5px;flex-wrap:wrap}.guidance-buttons .primary{flex:1}.guidance-quiet{font-size:10px!important;color:#aab89e!important}button.guidance-quiet{background:none!important;border:0!important;padding-left:0!important}
.guidance-history{font-size:10px;color:#a3ae92;margin-top:12px;border-top:1px solid #695a3b60;padding-top:8px}.guidance-history summary{cursor:pointer}.guidance-history ol{list-style:none;padding:0;margin:7px 0;max-height:130px;overflow:auto}.guidance-history li{padding:6px 0;border-bottom:1px solid #56604740}
.guidance-emergency{border:1px solid #b58051;background:#55301e80;padding:10px;margin-top:12px;color:#edd5b5}.guidance-emergency>strong{font:14px Georgia}.guidance-emergency p{font-size:11px}.guidance-emergency>button{width:100%;background:#805335!important;color:#fff0c1}.guidance-emergency>small{display:block;font-size:9px;margin-top:7px;color:#d0b995}
.guidance-target{outline:2px solid #f2d879!important;outline-offset:4px!important;box-shadow:0 0 9px #f2d87970,inset 0 0 12px #e5c86f20!important;animation:guidance-glow 1.9s ease-in-out infinite;scroll-margin:25px}
.guidance-panel-instruction{border-left:2px solid #d5b868;background:#443e223f;padding:10px 15px;margin:0 0 20px}.guidance-panel-instruction .smallcaps{font-size:9px;color:#d5b868}.guidance-panel-instruction p{font:13px/1.65 system-ui!important;color:#e5d4aa!important;margin:6px 0 10px!important}.guidance-panel-instruction button{font:11px system-ui;background:#51452b}
@keyframes guidance-glow{50%{outline-color:#fff0b5;box-shadow:0 0 19px #f2d879a0,inset 0 0 14px #e5c86f35}}
.machinery-open #first-mate{right:385px;top:104px;max-height:calc(100dvh - 336px)}
@media(prefers-reduced-motion:reduce){.guidance-target{animation:none;box-shadow:none!important}}
@media(max-width:1100px){#first-mate{width:246px;right:12px;font-size:11px;padding:10px}.machinery-open #first-mate{right:343px;width:234px}}
@media(max-width:760px){#first-mate{width:218px;top:var(--guidance-top,340px);max-height:calc(100dvh - var(--guidance-top,340px) - 248px);min-height:48px;right:10px;padding:8px}#first-mate header{top:-8px}#first-mate header strong{font-size:12px}#first-mate header button{font-size:9px}.guidance-tutorial h3{font-size:15px}.guidance-tutorial p{font-size:11px}.machinery-open #first-mate{right:auto;left:8px;top:85px;width:calc(100vw - 338px);min-width:130px;max-width:190px;max-height:calc(100dvh - 340px)}.machinery-open #first-mate header{flex-wrap:wrap}.machinery-open #first-mate header>div{flex-basis:100%}.machinery-open #first-mate .guidance-suggestions{display:none}}
@media(max-width:520px){#first-mate{width:184px;right:8px}.machinery-open #first-mate{top:auto;bottom:253px;left:8px;right:8px;width:auto;max-width:none;min-width:0;max-height:125px;background:#13211af7}.machinery-open #first-mate header{display:none}.machinery-open #first-mate .guidance-tutorial{margin-top:2px}.machinery-open #first-mate .guidance-explanation{margin-top:2px}.machinery-open #first-mate .guidance-buttons{display:none}}
@media(max-width:760px){#first-mate.guidance-library-open{top:84px;left:12px;right:12px;width:auto;max-height:calc(100dvh - 342px);background:#14241afa}#first-mate.guidance-library-open header{display:flex;flex-wrap:nowrap}#first-mate.guidance-library-open header>div{flex-basis:auto}}
