#coach { --mint:#93ead5; --ink:#eaf5f3; --dim:#a3b8bb; position:fixed; z-index:20; left:18px; bottom:calc(var(--game-scale, 1) * 134px); font:14px/1.5 system-ui,sans-serif; color:var(--ink); pointer-events:none; }
#coach[hidden] { display:none; }
#astrabot-avatar-home{position:fixed;left:calc(37vw - 24px);bottom:calc(var(--game-scale,1) * 138px + 45px);z-index:52;border:0;padding:0;background:transparent;cursor:pointer}
#astrabot-avatar-home[hidden]{display:none}#astrabot-avatar-home .astrabot-avatar{width:48px;height:54px}
#astrabot-avatar-home:focus-visible{outline:2px solid #93ead5;border-radius:12px}
#astrabot-enable { position:fixed; z-index:45; right:calc(var(--game-scale,1) * 226px); top:calc(var(--game-scale,1) * 17px); width:calc(var(--game-scale,1) * 166px); height:calc(var(--game-scale,1) * 36px); display:flex; align-items:center; justify-content:center; gap:calc(var(--game-scale,1) * 9px); padding:0 8px; border:1px solid #537c7b; border-radius:6px; background:#102b36; color:#e7f5ee; font:600 calc(var(--game-scale,1) * 12px)/1 system-ui,sans-serif; cursor:pointer; }
#astrabot-enable:hover { background:#1a3b45; }
#astrabot-enable:focus-visible { outline:2px solid #a8f4da; outline-offset:3px; }
.astrabot-toggle-state { color:#9de8d0; font-weight:400; }
.astrabot-toggle-track { position:relative; width:calc(var(--game-scale,1) * 28px); height:calc(var(--game-scale,1) * 16px); border-radius:12px; background:#81ddc2; flex:none; }
.astrabot-toggle-track::after { content:""; position:absolute; width:calc(var(--game-scale,1) * 10px); height:calc(var(--game-scale,1) * 10px); left:calc(var(--game-scale,1) * 15px); top:calc(var(--game-scale,1) * 3px); border-radius:50%; background:#12352f; }
#astrabot-enable[aria-checked="false"] { border-color:#53616b; background:#192a34; color:#bfcad0; }
#astrabot-enable[aria-checked="false"] .astrabot-toggle-state { color:#9cadb7; }
#astrabot-enable[aria-checked="false"] .astrabot-toggle-track { background:#607680; }
#astrabot-enable[aria-checked="false"] .astrabot-toggle-track::after { left:calc(var(--game-scale,1) * 3px); background:#d3dfe1; }
#coach [hidden] { display:none!important; }
#coach button,#coach input { font:inherit; }
#coach button { cursor:pointer; }
.coach-button-art { width:20px; height:20px; object-fit:contain; flex:none; }
.coach-actions button,#coach-ask,#coach-close { display:inline-flex; align-items:center; justify-content:center; gap:6px; }
#coach-close .coach-button-art { width:17px; height:17px; }
#coach button:focus-visible,#coach input:focus-visible { outline:2px solid var(--mint); outline-offset:4px; }
#coach-launcher { pointer-events:auto; display:flex; align-items:center; gap:9px; padding:0; background:none; color:var(--ink); border:0; text-align:left; }
.astrabot-avatar { display:block; width:70px; height:76px; overflow:visible; filter:drop-shadow(0 8px 13px #0008); flex-shrink:0; }
.astrabot-float { animation:astrabot-hover 5s ease-in-out infinite; transform-origin:center; }
.astrabot-eye { animation:astrabot-blink 7s infinite; transform-box:fill-box; transform-origin:center; }
.coach-teaser { max-width:195px; padding:8px 13px; border:1px solid #99ead52b; border-radius:12px 12px 12px 2px; background:#122830ed; box-shadow:0 5px 25px #0003; }
.coach-teaser strong { display:block; color:var(--mint); font-size:10px; letter-spacing:.13em; }
.coach-teaser span { display:block; font-size:12px; line-height:1.4; }
#coach-panel { position:absolute; bottom:82px; left:0; width:min(320px,calc(100vw - 36px)); border:1px solid #9be8d53d; border-radius:18px; background:linear-gradient(145deg,#17313af7,#0d202bf7 70%); box-shadow:0 16px 55px #0007; backdrop-filter:blur(16px); transform:translateY(15px) translateX(-12px); opacity:0; visibility:hidden; pointer-events:none; transition:transform .24s ease,opacity .24s ease,visibility .24s; max-height:calc(100vh - 245px); overflow:auto; }
#coach[data-open="true"] #coach-panel { transform:translate(0); opacity:1; visibility:visible; pointer-events:auto; }
#coach[data-open="true"] .coach-teaser { display:block; }
.coach-header { display:flex; align-items:center; justify-content:space-between; padding:12px 16px 10px; border-bottom:1px solid #d2fff015; }
.coach-name { font-size:16px; font-weight:650; letter-spacing:.01em; }
.coach-role { margin-left:7px; color:var(--dim); font-size:11px; }
#coach-close { border:0; background:#c7eee90c; color:#b9ced0; width:29px; height:29px; border-radius:50%; font-size:21px!important; line-height:1; }
#coach-close:hover { background:#c7eee924; }
.coach-body { padding:12px 16px 14px; min-height:0; overflow-y:auto; overscroll-behavior:contain; scrollbar-width:thin; scrollbar-color:#648f8a transparent; }
.coach-controls { padding:9px 16px 10px; border-top:1px solid #d2fff015; flex-shrink:0; }
#coach-panel { display:flex; flex-direction:column; overflow:hidden; }
.coach-header,.coach-footer { flex-shrink:0; }
.coach-source { font-size:10px; text-transform:uppercase; letter-spacing:.08em; color:var(--mint); display:flex; align-items:center; gap:6px; }
.coach-source::before { content:""; width:5px; height:5px; background:currentColor; border-radius:50%; }
#coach-provenance { width:fit-content; max-width:100%; margin-top:6px; padding:4px 7px; border:1px solid #8ee7ce40; border-radius:5px; background:#061b2466; color:#93c9bd; font:600 8px/1.35 ui-monospace,SFMono-Regular,Menlo,monospace; letter-spacing:.035em; }
#coach-sight { margin:9px 0 6px; padding:7px 9px; border-left:3px solid #9cf0d5; border-radius:0 6px 6px 0; background:#8ee7ce0c; color:#d7f8ed; font-size:11px; line-height:1.45; }
#coach-title { margin:7px 0 5px!important; font-size:12px!important; line-height:1.4; letter-spacing:0!important; font-weight:500; color:#a9c3c1; }
#coach-primary { margin:5px 0 10px; font-size:19px; font-weight:650; line-height:1.35; color:#f0fff4; }
#coach-details { margin-top:8px; border-top:1px solid #d2fff015; padding-top:8px; }
#coach-details summary { cursor:pointer; color:#a5cabc; font-size:11px; width:fit-content; }
#coach-details summary:focus-visible { outline:2px solid var(--mint); outline-offset:3px; }
#coach-copy { margin:8px 0!important; color:#bccdce!important; font-size:12px!important; }
#coach-observation { margin:8px 0!important; font-size:11px!important; color:#86adad!important; border-left:2px solid #8cd8c860; padding-left:8px; }
#coach-steps { list-style:none; padding:0; margin:8px 0 0; display:grid; gap:8px; }
#coach-steps li { font-size:12px; line-height:1.5; color:#cadad3; }
.coach-actions { display:flex; gap:8px; }
.coach-actions button { border-radius:8px; padding:7px 12px; border:1px solid #8acabb30; background:transparent; color:#b6d1d1; font-size:12px!important; }
.coach-actions button:first-child { background:var(--mint); color:#12332e; border-color:transparent; font-weight:650!important; }
.coach-actions button:disabled { opacity:.5; cursor:default; }
.coach-task { display:flex; justify-content:center; align-items:center; gap:7px; width:100%; margin-top:8px; padding:6px 10px; border:1px solid #eecb8e38; border-radius:8px; background:#eecb8e09; color:#ead6b3; font-size:11px!important; }
.coach-task:hover { background:#eecb8e18; border-color:#eecb8e75; }
.coach-proactive { display:flex; justify-content:center; align-items:center; width:100%; margin-top:8px; padding:8px 10px; border:1px solid #9cf0d56b; border-radius:8px; background:#8ee7ce1a; color:#dffff4; font-size:11px!important; font-weight:650!important; }
.coach-proactive::before { content:"→"; margin-right:7px; color:#aaffdf; }
.coach-proactive:hover { background:#8ee7ce2c; border-color:#9cf0d5; }
.coach-ablation { width:100%; margin-top:6px; padding:6px 9px; border:1px dashed #ffd28b66; border-radius:7px; background:#ffd28b0a; color:#ffe3b2; font-size:10px!important; }
#coach-comparison { margin:6px 0 0; padding:6px 8px; border-left:2px solid #ffd28b; background:#ffd28b0a; color:#ffe4b9; font:600 9px/1.4 ui-monospace,SFMono-Regular,Menlo,monospace; }
#coach-form { display:flex; gap:6px; margin-top:13px; padding-top:12px; border-top:1px solid #d2fff015; }
#coach-question { flex:1; min-width:0; border:1px solid #98dac629; background:#061b2466; color:#eaf5f3; border-radius:7px; padding:8px 9px; font-size:12px!important; }
#coach-question::placeholder { color:#78989e; }
#coach-ask { border:0; border-radius:7px; background:#29434a; color:#b5ded4; padding:0 10px; font-size:12px!important; }
.coach-footer { padding:9px 16px 10px; border-top:1px solid #d2fff015; display:flex; align-items:center; justify-content:space-between; gap:12px; color:#8babad; font-size:10px; }
.coach-footer label { display:flex; align-items:center; gap:5px; cursor:pointer; }
#coach-live { accent-color:#87dcc7; margin:0; }
#coach-status { text-align:right; max-width:190px; }
#coach-spotlight { position:fixed; width:56px; height:56px; z-index:22; pointer-events:none; font:600 13px/1.35 system-ui,sans-serif; }
#coach-spotlight[hidden],#coach-spotlight [hidden] { display:none!important; }
.coach-crosshair { width:56px; height:56px; overflow:visible; filter:drop-shadow(0 1px 4px #000b); }
.coach-crosshair-shadow { fill:none; stroke:#03111c; stroke-width:8; stroke-linecap:round; }
.coach-crosshair-arms { fill:none; stroke:#ecffcb; stroke-width:4; stroke-linecap:round; animation:astrabot-cue 1.8s ease-in-out infinite; }
#coach-spotlight[data-kind="offscreen"] .coach-crosshair { display:none; }
#coach-evidence-box { position:fixed; z-index:21; box-sizing:border-box; min-width:18px; min-height:18px; pointer-events:none; border:2px solid #95ffd1; border-radius:5px; background:#95ffd10a; box-shadow:0 0 0 1px #061822cc,inset 0 0 18px #70ffd21a,0 0 18px #70ffd24d; animation:astrabot-evidence 1.8s ease-in-out infinite; }
#coach-evidence-box[hidden] { display:none!important; }
#coach-evidence-label { position:absolute; left:-2px; top:-24px; max-width:260px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; padding:3px 6px; border:1px solid #95ffd1; border-radius:4px; background:#061c25f2; color:#dffff2; font:700 9px/1.4 ui-monospace,SFMono-Regular,Menlo,monospace; letter-spacing:.06em; }
#coach-evidence-box[data-grounding="missed"],#coach-evidence-box[data-grounding="unavailable"] { border-color:#ffd28b; border-style:dashed; box-shadow:0 0 0 1px #061822cc,inset 0 0 18px #ffd28b12,0 0 14px #ffd28b35; }
#coach-evidence-box[data-grounding="missed"] #coach-evidence-label,#coach-evidence-box[data-grounding="unavailable"] #coach-evidence-label { border-color:#ffd28b; color:#ffe7bd; }
.coach-cue-hint { position:fixed; display:flex; align-items:center; gap:8px; width:max-content; max-width:min(310px,calc(100vw - 16px)); box-sizing:border-box; padding:7px 8px 7px 11px; border:1px solid #d6ffc2; border-radius:8px; background:#071f2af7; color:#f2ffeb; box-shadow:0 3px 0 #0005,0 4px 15px #0005; }
#coach-cue-text { min-width:0; }
#coach-cue-close,#coach-cue-focus { pointer-events:auto; flex:none; border:0; border-radius:5px; font:inherit; cursor:pointer; }
#coach-cue-close { width:24px; height:24px; padding:0; background:#e5f6ed12; color:#c3ded6; font-size:18px; font-weight:400; }
#coach-cue-focus { padding:6px 8px; background:#d6f5b5; color:#10231e; font-size:11px; }
#coach-cue-close:hover,#coach-cue-close:focus-visible,#coach-cue-focus:hover,#coach-cue-focus:focus-visible { outline:2px solid #d6ffc2; outline-offset:2px; }
@keyframes astrabot-cue { 0%,100% { stroke:#ecffcb; } 50% { stroke:#fff; } }
@keyframes astrabot-evidence { 0%,100% { opacity:.82; } 50% { opacity:1; } }
@keyframes astrabot-hover { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-3px)} }
@keyframes astrabot-blink { 0%,43%,47%,100%{transform:scaleY(1)} 45%{transform:scaleY(.12)} }
.coach-dock { display:flex; align-items:flex-end; gap:8px; pointer-events:auto; }
#coach{bottom:calc(var(--game-scale,1) * 138px + 62px)}
.coach-dock .coach-teaser { width:265px; max-width:calc(100vw - 128px); padding:12px 14px; }
.coach-dock .coach-teaser strong { margin-bottom:5px; }
.coach-dock-actions { display:flex; flex-wrap:wrap; gap:6px; margin-top:10px; }
.coach-dock-actions button:not(#coach-offer-dismiss) { border:1px solid #9ae8ce70; border-radius:7px; padding:7px 10px; font-size:12px!important; font-weight:650!important; background:#a4efd5; color:#102e2b; cursor:pointer; }
.coach-dock-actions #coach-task-quick { background:#24434b; color:#dbf9ee; border-color:#648e88; }
#coach-task-quick:only-child { background:#a4efd5; color:#102e2b; }
#coach-offer-dismiss { padding:2px 6px; border:0; background:transparent; color:#a8c6c3; margin-left:auto; }
#coach-thinking { margin-top:5px; color:#ffe0a3; font-size:12px; }
#coach-panel { bottom:145px; max-height:calc(100vh - 310px); }
#coach[data-thinking="true"] .astrabot-float { animation:astrabot-think 1.5s ease-in-out infinite; }
#coach[data-thinking="true"] .astrabot-eye { animation:astrabot-look 1.5s ease-in-out infinite; }
.astra-dots { display:inline-flex!important; flex-direction:row; gap:4px; margin-left:5px; vertical-align:middle; }
.astra-dots i { display:inline-block; width:4px; height:4px; border-radius:50%; background:currentColor; animation:astrabot-dot 1.2s ease-in-out infinite; }
.astra-dots i:nth-child(2) { animation-delay:.16s; }.astra-dots i:nth-child(3) { animation-delay:.32s; }
@keyframes astrabot-think { 0%,100% { transform:translateY(0) rotate(-5deg); } 50% { transform:translateY(-5px) rotate(5deg); } }
@keyframes astrabot-look { 0%,100% { transform:translateX(-2px); } 50% { transform:translateX(2px) scaleY(.8); } }
@keyframes astrabot-dot { 0%,70%,100% { transform:translateY(0); opacity:.4; } 35% { transform:translateY(-4px); opacity:1; } }
#coach{width:min(400px,calc(100vw - 36px));padding:10px;border:1px solid #63867d;border-radius:12px;background:#102a32f5;box-sizing:border-box}
#coach .coach-dock{align-items:center}#coach .coach-teaser{padding:0 4px;background:none;border:0;box-shadow:none;width:auto;max-width:none;flex:1}
#coach .astrabot-avatar{width:48px;height:54px}#coach .coach-header{display:none}
#coach #coach-panel{display:none;position:static;width:100%;max-height:35vh;overflow:auto;transform:none;opacity:1;visibility:visible;margin-top:10px;border:0;border-top:1px solid #63867d;border-radius:0;box-shadow:none;background:none}
#coach[data-open="true"] #coach-panel{display:block}
@media (max-height:650px) { #coach-panel{bottom:64px;max-height:calc(100vh - 195px)} .astrabot-avatar{width:54px;height:58px} .coach-body{padding:11px 15px} #coach-steps{gap:6px} #coach-form{margin-top:8px;padding-top:8px} }
@media (max-height:650px) { #coach-panel { bottom:125px; max-height:calc(100vh - 235px); } .coach-dock .coach-teaser { padding:8px 10px; } }
@media (prefers-reduced-motion:reduce) { #coach-panel,.coach-teaser { transition:none; } .astrabot-float,.astrabot-eye,.coach-crosshair-arms,#coach-evidence-box,#coach[data-thinking="true"] .astrabot-float,#coach[data-thinking="true"] .astrabot-eye,.astra-dots i { animation:none; } }
