/* connects_to: existing simulator/index.html inside the Prop Coach iframe.
   Presentation only: the replay engine, local bars and decision arithmetic stay unchanged.
   Palette: Loomi — cream / olive / gold / terracotta / dusty blue */
body.simulator-palette{--paper:#f4f1e8;--ink:#242720;--olive:#3c492c;--sage:#a9b88b;--gold:#e6b64e;--terra:#ba604b;--blue:#99b8cb;--plum:#aa96b8;--line:#ffffff24;background:var(--paper);color:var(--ink)}
body.simulator-palette :is(p,small,label,button,a,summary,dt,dd,li,.stage-top,.stage-top span,.free,.metric span,.chart-head span,.chart-foot,.chart-foot span,.room>span,.room small,.daily,.daily span,.risk-preview,.key-hint,.coach-label,.under,.steps,.steps span,.reset,.details,.fine,.stamp,.report-fine,.nt-public-footer,.nt-public-footer nav){font-size:16px;line-height:1.5}
body.simulator-palette :is(button,a,input,summary):focus-visible{outline:3px solid var(--gold);outline-offset:4px}
body.simulator-palette header :is(a,small){color:#242720}
body.simulator-palette header small{border-color:#b5b3a6}
body.simulator-palette .wordmark{font-size:28px;color:#242720}
body.simulator-palette .wordmark span{color:#527e97}
body.simulator-palette .simulator{background:#20251e;color:var(--paper);border:1px solid #3a4230;box-shadow:inset 0 2px 0 #ffffff30,0 7px 0 #a8aa9e,0 18px 30px #1b241c22}
body.simulator-palette .stage-top{background:#1a1e18;border-color:#3a4230;letter-spacing:.055em;padding:18px 26px}
body.simulator-palette .stage-top b{color:var(--gold)}
body.simulator-palette .stage-top span:last-child{color:#bfc3b5;letter-spacing:0;text-transform:none}
body.simulator-palette .intro{background:radial-gradient(ellipse at 100% 100%,#4a5a38,transparent 70%),var(--olive);padding:32px 28px}
body.simulator-palette .intro::after{background-image:linear-gradient(118deg,transparent 34%,#e6d18a0b 48%,transparent 62%)}
body.simulator-palette .intro h1{font-size:clamp(32px,10cqw,60px);color:var(--paper)}
body.simulator-palette .intro h1 em{color:#efd18a}
body.simulator-palette :is(.intro>p,.intro .free,.intro-note,.kicker){color:#d3d8c9}
body.simulator-palette .free i{background:#c2d59c}
body.simulator-palette .intro .arena-launch{background:linear-gradient(125deg,#2a3420,#4a5a38 60%,#5a6a48);color:#f4f1e8;border-color:#6a7a58;box-shadow:inset 0 1px 0 #ffffff33,inset 0 -2px 0 #1a1e1888,0 5px 0 #242e1e,0 8px 18px #10180e50;font-size:16px;padding:15px 18px;transition:transform .15s,box-shadow .15s}
body.simulator-palette .intro .arena-launch:hover{background:linear-gradient(125deg,#3a4430,#5a6a48 60%,#6a7a58);transform:translateY(-2px);box-shadow:inset 0 1px 0 #ffffff44,0 7px 0 #242e1e,0 12px 22px #10180e60}
body.simulator-palette .intro .arena-launch:active{transform:translateY(2px);box-shadow:inset 0 1px 0 #ffffff22,0 1px 0 #242e1e}
body.simulator-palette .battle-dot{background:#e6b64e;box-shadow:0 0 0 4px #e6b64e16;animation:none}
body.simulator-palette .coach-mark>i{background:linear-gradient(135deg,#f0d395,#dba12b);box-shadow:0 6px 0 #876725,0 9px 14px #16200f66}
body.simulator-palette .coach-mark>i:nth-child(even){background:linear-gradient(135deg,#e4c6b8,#ba604b);box-shadow:0 6px 0 #7a3a2a,0 9px 14px #16200f66}
body.simulator-palette .game{background:#20251e;padding:26px}
body.simulator-palette .metrics{background:#3a4230;border-color:#3a4230;gap:1px;margin-bottom:22px;box-shadow:inset 0 2px 5px #0004}
body.simulator-palette .metric{background:#272e25;padding:14px 16px;min-width:0}
body.simulator-palette .metric span{color:#b5bdac;letter-spacing:0;text-transform:none}
body.simulator-palette .metric strong{color:var(--paper);font-size:27px;font-variant-numeric:tabular-nums;line-height:1.3}
body.simulator-palette .metric:nth-child(2) strong{color:#e6c577}
body.simulator-palette .metric:nth-child(3) strong{color:#acc9dc}
body.simulator-palette .chart-head{align-items:baseline;gap:12px}
body.simulator-palette .chart-head h2{font-size:20px;color:var(--paper)}
body.simulator-palette .chart-head span{color:#b5c1a9;max-width:230px}
body.simulator-palette :is(.bar-ohlc,.replay-date,.chart-foot){color:#b5c1a9;font-size:16px;line-height:1.5;font-variant-numeric:tabular-nums}
body.simulator-palette .chart-foot{gap:12px;flex-wrap:wrap}
body.simulator-palette .market{grid-template-columns:minmax(0,1fr) 116px;gap:18px}
body.simulator-palette svg.chart{height:245px!important;background:#151a13;border:1px solid #3a423066;border-radius:8px;overflow:hidden}
body.simulator-palette .chart text{fill:#aeb9a8;font-size:13px}
body.simulator-palette .chart .gridline{stroke:#ffffff0c}
body.simulator-palette .chart .price-line{stroke:#aac3a0}
body.simulator-palette .chart .entryline{stroke:#a9c9dd}
body.simulator-palette .chart .stopline{stroke:#df957f}
body.simulator-palette .chart .targetline{stroke:#d8bd79}
body.simulator-palette .chart .lastdot{fill:var(--gold);stroke:#20251e}
body.simulator-palette .candle-up{fill:#f4f1e8;stroke:#c8d0ba}
body.simulator-palette .candle-down{fill:#7fa8c0;stroke:#99b8cb}
body.simulator-palette :is(.room>span,.room small){color:#c6ccbd;letter-spacing:0}
body.simulator-palette .room strong{color:#e9eddf;font-size:23px}
body.simulator-palette .room small{text-align:center}
body.simulator-palette .tank{height:160px;width:60px;background:#151a13;border-color:#657250;box-shadow:inset 5px 2px 14px #0006}
body.simulator-palette .tank-fill{background:linear-gradient(90deg,#667d42,#b1bf88 60%,#829754)}
body.simulator-palette .tank-fill[style*="linear-gradient"]{background:linear-gradient(90deg,#8a4a3a,#d4907a)!important}
body.simulator-palette .tank-fill:after{background:#c4cfaa;border-color:#526939}
body.simulator-palette .tank-lines i{background:#e9eddf60}
body.simulator-palette .daily{color:#bcc4b3;gap:14px;flex-wrap:wrap;margin-top:20px}
body.simulator-palette .daily-track{background:#46503f;height:7px;min-width:60px}
body.simulator-palette .daily-track i{background:var(--gold)}
body.simulator-palette .setup{border-color:var(--line);align-items:start;gap:24px}
body.simulator-palette .setup label{color:#d3d8ca}
body.simulator-palette .size-control{gap:16px;margin-top:6px;min-height:40px}
body.simulator-palette .size-control input{accent-color:var(--gold);width:145px;min-height:32px}
body.simulator-palette .size-control output{font-size:23px;color:var(--paper)}
body.simulator-palette .risk-preview{color:#c2caba}
body.simulator-palette .risk-preview strong{color:#e9c473;font-size:23px}
body.simulator-palette .question{font-size:26px;color:var(--paper);line-height:1.3;margin-bottom:18px}
body.simulator-palette .game p.question{font-size:26px;line-height:1.3}
body.simulator-palette .actions{gap:12px;grid-template-columns:repeat(3,minmax(0,1fr))}
body.simulator-palette .trade-key{font-size:18px;min-height:76px;padding:12px 8px;border:1px solid #ddd8c340;border-radius:9px;transition:transform .12s,box-shadow .12s}
body.simulator-palette .buy{background:linear-gradient(#c4cfad,#97aa7e);color:#25331c;box-shadow:inset 0 2px 0 #e4e8d8aa,0 5px 0 #4a5a3a,0 8px 14px #0004}
body.simulator-palette .buy:hover{background:linear-gradient(#d0dab8,#a4b68a);transform:translateY(-2px);box-shadow:inset 0 2px 0 #e4e8d8cc,0 7px 0 #4a5a3a,0 12px 18px #0005}
body.simulator-palette .buy:active{transform:translateY(4px);box-shadow:inset 0 2px 0 #c0c8a8,0 1px 0 #4a5a3a}
body.simulator-palette .sell{background:linear-gradient(#dca18d,#b36550);color:#321e17;box-shadow:inset 0 2px 0 #f0c4b4aa,0 5px 0 #6a3428,0 8px 14px #0004}
body.simulator-palette .sell:hover{background:linear-gradient(#e4b09c,#c07460);transform:translateY(-2px);box-shadow:inset 0 2px 0 #f0c4b4cc,0 7px 0 #6a3428,0 12px 18px #0005}
body.simulator-palette .sell:active{transform:translateY(4px);box-shadow:inset 0 2px 0 #c89884,0 1px 0 #6a3428}
body.simulator-palette .flat{background:linear-gradient(#b8c9d4,#88a5b7);color:#1c303e;box-shadow:inset 0 2px 0 #d4dce4aa,0 5px 0 #4a6070,0 8px 14px #0004}
body.simulator-palette .flat:hover{background:linear-gradient(#c4d4de,#94b0c2);transform:translateY(-2px);box-shadow:inset 0 2px 0 #d4dce4cc,0 7px 0 #4a6070,0 12px 18px #0005}
body.simulator-palette .flat:active{transform:translateY(4px);box-shadow:inset 0 2px 0 #a8b8c4,0 1px 0 #4a6070}
body.simulator-palette .key-hint{font-size:16px;font-weight:400;display:block;margin-top:2px;opacity:.7}
body.simulator-palette .coach-strip{background:#e2ba67;color:#332c1f;grid-template-columns:140px minmax(0,1fr) auto;padding:24px 26px;gap:22px}
body.simulator-palette .coach-label{font-size:16px;letter-spacing:.04em}
.coach-emblem{display:grid;place-items:center;width:42px;height:42px;border:1px solid #c99f4e;border-radius:50%;background:#342f25;color:#ead198;font:500 25px Jost,sans-serif;flex-shrink:0}
body.simulator-palette .coach-copy blockquote{font-size:26px;color:#332c1f;line-height:1.3}
body.simulator-palette .coach-copy p{color:#524832;font-size:16px;line-height:1.55}
body.simulator-palette .next{border:1px solid #453c29;border-radius:50%;width:48px;height:48px;background:#f2d697;font-size:23px;color:#332c1f;box-shadow:0 4px 0 #b78e37;transition:transform .1s,box-shadow .1s;min-width:48px;min-height:48px}
body.simulator-palette .next:hover{background:#f8e0a8;transform:translateY(-1px);box-shadow:0 5px 0 #b78e37}
body.simulator-palette .next:active{transform:translateY(3px);box-shadow:0 1px 0 #b78e37}
body.simulator-palette :is(.under,.fine,.details,.details p,.reset,.nt-public-footer){color:#53564d}
body.simulator-palette .under{gap:20px;flex-wrap:wrap;padding-top:6px}
body.simulator-palette .steps{gap:16px}
body.simulator-palette .steps b{border-color:#b1b3a6;width:28px;height:28px;line-height:26px;flex-shrink:0}
body.simulator-palette .steps .current b{background:#435433;color:#fff;border-color:#435433}
body.simulator-palette .reset{min-height:44px}
body.simulator-palette .details{border-color:#c9cbbf}
body.simulator-palette .details summary{min-height:44px;padding-block:8px;color:#3c5733}
body.simulator-palette .plan-link{color:#3c5733;min-height:44px}
body.simulator-palette .report{background:var(--paper);color:var(--ink);border:1px solid #b1b3a6;border-radius:16px}
body.simulator-palette .report{position:fixed;inset:auto;left:50%;top:var(--report-top,16px);margin:0;transform:translateX(-50%);max-height:var(--report-height,min(85vh,760px))}
body.simulator-palette .report-head{position:sticky;top:0;z-index:2;background:var(--paper);padding:8px 0}
body.simulator-palette .report::backdrop{background:#10180fc9;backdrop-filter:blur(4px)}
body.simulator-palette .close{width:44px;height:44px;font-size:26px;border-color:#abb29e;color:var(--ink)}
body.simulator-palette .stamp{color:#516839;border-color:#516839;background:#e8eede;font-size:16px}
body.simulator-palette .report dl div{border-color:#b3b6a7;font-size:16px}
body.simulator-palette .report :is(p,ol,li,.report-fine){font-size:16px;color:#606b55}
body.simulator-palette .report-buttons :is(button,a),body.simulator-palette.finished .report-action{background:#415132;color:#fff;min-height:44px;font-size:16px;border-radius:7px;box-shadow:0 3px 0 #2a3620;transition:transform .1s,box-shadow .1s}
body.simulator-palette .report-buttons :is(button,a):hover{transform:translateY(-1px);box-shadow:0 4px 0 #2a3620}
body.simulator-palette .report-buttons :is(button,a):active{transform:translateY(2px);box-shadow:0 1px 0 #2a3620}
body.simulator-palette .report-buttons button:nth-child(2){background:#b7c5cd;color:#253640;box-shadow:0 3px 0 #7a8a94}
body.simulator-palette .report-buttons button:nth-child(2):hover{box-shadow:0 4px 0 #7a8a94}
body.simulator-palette .report-buttons button:nth-child(2):active{box-shadow:0 1px 0 #7a8a94}
body.simulator-palette .nt-public-footer{border-color:#c9cbbf}
@media(min-width:741px) and (max-width:1100px){body.simulator-palette .workspace{grid-template-columns:230px minmax(0,1fr)}body.simulator-palette .intro{padding:28px 20px}body.simulator-palette .game{padding:22px 18px}body.simulator-palette .metric{padding:12px 10px}body.simulator-palette .metric strong{font-size:23px}body.simulator-palette .coach-strip{grid-template-columns:1fr auto}body.simulator-palette .coach-label{grid-column:1/-1}}
@media(max-width:740px){body.simulator-palette header{flex-wrap:wrap;gap:14px}body.simulator-palette header nav{gap:18px;flex-wrap:wrap}body.simulator-palette .workspace{background:var(--paper);gap:18px}body.simulator-palette .stage-top{align-items:start;flex-direction:column;gap:5px;padding:18px 20px}body.simulator-palette .stage-top span:last-child{max-width:none;text-align:left}body.simulator-palette .intro{padding:28px 23px 22px}body.simulator-palette .intro h1{font-size:clamp(34px,9vw,52px)}body.simulator-palette .intro .arena-launch{margin:20px 0 10px!important;min-height:50px}body.simulator-palette .game{padding:22px 18px}body.simulator-palette .metrics{grid-template-columns:1fr;gap:1px}body.simulator-palette .metric{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:10px 13px}body.simulator-palette .metric strong{font-size:24px;white-space:nowrap}body.simulator-palette .chart-head{align-items:start;flex-direction:column;gap:4px;margin:16px 0 10px}body.simulator-palette .chart-head span{max-width:none;text-align:left}body.simulator-palette .market{grid-template-columns:1fr;gap:18px}body.simulator-palette svg.chart{height:240px!important}body.simulator-palette .chart text{font-size:24px}body.simulator-palette .room{display:grid;grid-template-columns:minmax(90px,1fr) auto minmax(100px,1fr);gap:8px 16px;align-items:center;border:1px solid #3a423044;border-radius:8px;padding:14px}body.simulator-palette .room>span{text-align:left}body.simulator-palette .room strong{text-align:right}body.simulator-palette .tank{height:68px;width:42px;margin:0;grid-column:2;grid-row:1/3}body.simulator-palette .room small{grid-column:1/-1;grid-row:2;text-align:left;padding-right:70px}body.simulator-palette .tank-lines{inset:5px 0}body.simulator-palette .setup{flex-direction:column;gap:14px;margin-top:22px}body.simulator-palette .risk-preview{text-align:left}body.simulator-palette .size-control input{width:min(200px,60vw)}body.simulator-palette .question{font-size:25px}body.simulator-palette .actions{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}body.simulator-palette .actions .flat{grid-column:1/-1;min-height:64px}body.simulator-palette .coach-strip{grid-template-columns:minmax(0,1fr) auto;padding:22px 20px;gap:16px}body.simulator-palette .coach-label{grid-column:1/-1}body.simulator-palette .coach-copy blockquote{font-size:25px}body.simulator-palette .steps{display:grid;grid-template-columns:1fr;gap:10px}body.simulator-palette .under{align-items:start}body.simulator-palette .report dl div{flex-wrap:wrap;gap:6px}body.simulator-palette .report dd{text-align:left}body.simulator-palette .report-buttons{flex-direction:column}body.simulator-palette .report-buttons :is(button,a){text-align:center}}
@media(max-width:380px){body.simulator-palette .game{padding:20px 14px}body.simulator-palette .room{grid-template-columns:1fr auto;gap:8px 14px}body.simulator-palette .tank{grid-column:2;grid-row:1/4}body.simulator-palette .room strong{grid-row:2;grid-column:1;text-align:left}body.simulator-palette .room small{grid-row:3;grid-column:1;padding:0}}
@media print{body.simulator-palette .report{border:0;box-shadow:none}.report-buttons{display:none!important}}
@media(max-width:740px){body.simulator-palette .tank{grid-row:1}body.simulator-palette .room small{grid-row:2;padding-right:0}}
@media(max-width:380px){body.simulator-palette .tank{grid-row:1/4}body.simulator-palette .room small{grid-row:3}}
@media print{body.simulator-palette .report{position:static;transform:none;max-height:none!important}}
