:root{font-family:system-ui,-apple-system,"Segoe UI",sans-serif;color:#eef4f8;background:#10161b;color-scheme:dark}*{box-sizing:border-box}body{margin:0;background:#10161b}.app-shell{width:min(1180px,calc(100% - 24px));margin:0 auto;padding:22px 0 48px}.test-header{display:flex;justify-content:space-between;gap:20px;align-items:flex-start}.build-line{font-size:12px;letter-spacing:.08em;color:#9fb2bf}.test-header h1{margin:5px 0 6px;font-size:28px}.test-header p{margin:0;color:#b9c6cf;max-width:820px;line-height:1.55}.small-link{color:#cdefff;text-decoration:none;border:1px solid #41525d;border-radius:9px;padding:9px 11px;white-space:nowrap}.status-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:16px 0}.status-grid>div,.control-panel,.review-guide,.pitch-card,.choice-panel,.checkpoint-grid article,.log-panel,.developer-panel{background:#182128;border:1px solid #2b3942;border-radius:12px}.status-grid>div{padding:10px 12px;min-width:0}.status-grid span,.step-label,.checkpoint-grid span{display:block;font-size:11px;color:#8fa2ae;margin-bottom:4px}.status-grid strong{font-size:13px;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ok{color:#8de4b1}.control-panel{display:flex;gap:10px;align-items:end;padding:12px;margin-bottom:10px;flex-wrap:wrap}.control-panel label{font-size:12px;color:#aebdc7;display:grid;gap:4px}.control-panel select,button{font:inherit}select,button{background:#202c34;color:#edf5f9;border:1px solid #42525d;border-radius:8px;padding:9px 11px}button{cursor:pointer}button:hover{border-color:#7192a4}button.active{background:#35546a;border-color:#7cb4d3}.secondary{background:#172027}.speed-control{display:flex;gap:5px;align-items:center}.speed-control span{font-size:12px;color:#aebdc7;margin-right:3px}.review-guide{padding:13px 15px;margin-bottom:10px;display:grid;grid-template-columns:1.25fr 1fr;gap:16px}.review-guide strong{font-size:16px}.review-guide p{margin:4px 0 0;color:#bcc8d0;line-height:1.45;font-size:13px}.normal-rule{font-size:12px;color:#b8c7cf;line-height:1.5;border-left:2px solid #5689a8;padding-left:12px}.normal-rule b{display:block;color:#e4f2f8;margin-bottom:2px}.pitch-card{overflow:hidden}.pitch-card canvas{display:block;width:100%;height:auto;aspect-ratio:105/68;background:#315b37;touch-action:manipulation}.pitch-footer{display:flex;justify-content:space-between;gap:12px;padding:9px 12px;color:#afc0ca;font-size:12px}.choice-panel{padding:14px;margin-top:10px}.choice-head,.panel-head{display:flex;justify-content:space-between;align-items:center;gap:10px}.choice-head strong{display:block}.choice-buttons{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}.choice-buttons button{min-width:150px;text-align:left;padding:11px 13px}.choice-buttons button b{display:block;font-size:14px}.choice-buttons button small{display:block;color:#aebdc7;margin-top:3px;white-space:normal}.choice-buttons button:disabled{opacity:.45;cursor:default}.choice-note{font-size:12px;color:#9fb0bb;margin:10px 0 0}.checkpoint-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:10px}.checkpoint-grid article{padding:12px}.checkpoint-grid strong{font-size:14px;display:block}.checkpoint-grid small{color:#9fb0bb;display:block;margin-top:5px;line-height:1.35}.log-panel{padding:13px;margin-top:10px}.event-log{font-size:12px;color:#b8c5ce;line-height:1.55;margin-top:9px;max-height:180px;overflow:auto}.event-line{padding:3px 0;border-bottom:1px solid #26343c}.developer-panel{padding:11px 13px;margin-top:10px}.developer-panel summary{cursor:pointer;font-size:13px;font-weight:650}.developer-panel p{font-size:12px;color:#9dafba;line-height:1.5}.distribution-result{margin-top:10px;font-size:12px;overflow:auto}.distribution-result table{width:100%;border-collapse:collapse}.distribution-result th,.distribution-result td{padding:7px;border-bottom:1px solid #2b3942;text-align:left;white-space:nowrap}
@media(max-width:760px){.app-shell{width:min(100% - 12px,1180px);padding-top:10px}.test-header{display:block}.test-header h1{font-size:21px}.test-header .small-link{display:inline-block;margin-top:10px}.status-grid{grid-template-columns:repeat(2,1fr)}.review-guide{grid-template-columns:1fr}.control-panel{align-items:stretch}.control-panel label{width:100%}.speed-control{width:100%}.pitch-card canvas{min-height:230px;object-fit:contain}.choice-buttons{display:grid;grid-template-columns:1fr}.choice-buttons button{width:100%;min-width:0}.checkpoint-grid{grid-template-columns:1fr}.pitch-footer{display:grid}.choice-head{align-items:flex-start}.choice-note{line-height:1.45}}
.hero-scoreboard{display:flex;align-items:center;justify-content:center;gap:12px;padding:8px 12px;background:#10181e;border-top:1px solid #2b3942;font-size:13px}.hero-scoreboard b{font-size:18px}.hero-scoreboard strong{min-width:34px}.choice-family{display:inline-flex;align-items:center;padding:0 5px;color:#8fa2ae;font-size:11px;font-weight:700;letter-spacing:.04em}.muted{color:#9fb0bb;font-size:12px}
/* STEP40 V0.2 — replay/result/debug UX */
.choice-tools{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:10px}.choice-buttons button.choice-option{position:relative;text-align:center;overflow:visible}.choice-buttons button.choice-option b{font-size:14px}.choice-buttons button.choice-option::after{content:attr(data-tooltip);position:absolute;left:0;bottom:calc(100% + 8px);z-index:40;width:min(330px,82vw);padding:10px 11px;border:1px solid #617783;border-radius:9px;background:#0e171c;color:#eaf3f7;font-size:12px;font-weight:400;line-height:1.5;white-space:pre-line;text-align:left;box-shadow:0 8px 24px rgba(0,0,0,.35);opacity:0;visibility:hidden;transform:translateY(4px);transition:opacity .12s ease,transform .12s ease;pointer-events:none}.choice-buttons button.choice-option:hover::after,.choice-buttons button.choice-option:focus-visible::after,.choice-buttons button.choice-option.tooltip-open::after{opacity:1;visibility:visible;transform:translateY(0)}
.result-panel{background:#182128;border:1px solid #2b3942;border-radius:12px;padding:14px;margin-top:10px}.result-panel .panel-head>div{min-width:0}.result-panel strong{display:block;font-size:15px}.result-panel p{margin:8px 0;color:#d3dde3;font-size:13px;line-height:1.55}.result-events{font-size:12px;color:#9fb0bb;display:grid;gap:3px}.result-event{border-top:1px solid #28363e;padding-top:5px}.debug-controls{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.inline-check{font-size:12px;color:#b9c8d0;display:flex;align-items:center;gap:6px}.inline-check input{accent-color:auto}.debug-summary{white-space:pre-wrap;overflow:auto;max-height:180px;padding:9px;background:#10181e;border:1px solid #293840;border-radius:8px;color:#abc1cc;font-size:11px;line-height:1.45}.replay-badge{display:inline-flex;align-items:center;padding:2px 7px;border:1px solid #52758a;border-radius:999px;color:#cdefff;font-size:11px}.searching-badge{color:#9ed5ef}.result-badge{color:#bce8c9}
@media(max-width:760px){.choice-tools{display:grid}.choice-buttons button.choice-option::after{position:fixed;left:50%;bottom:18px;transform:translate(-50%,6px);width:calc(100vw - 28px)}.choice-buttons button.choice-option:hover::after{opacity:0;visibility:hidden}.choice-buttons button.choice-option.tooltip-open::after,.choice-buttons button.choice-option:focus-visible::after{opacity:1;visibility:visible;transform:translate(-50%,0)}.debug-controls{display:grid}.debug-controls button{width:100%}}

/* STEP40 V0.4 — explicit user-choice receipt, post-result replay, scene history */
.choice-receipt{display:flex;align-items:center;gap:9px;padding:7px 12px;background:#111b21;border-top:1px solid #2b3942;font-size:12px}
.choice-receipt span{color:#8fa2ae}.choice-receipt strong{color:#e8f3f8;font-size:13px}
.result-choice{margin-top:9px;padding:8px 10px;border:1px solid #3b5260;border-radius:8px;background:#111a20;color:#d8edf7;font-size:12px;font-weight:700}
.result-tools{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:11px}
.scene-history{display:grid;gap:7px;margin-top:9px}.scene-row{display:grid;grid-template-columns:minmax(180px,1fr) auto;gap:8px;align-items:center;padding:8px 9px;border:1px solid #2a3942;border-radius:9px;background:#131c22}
.scene-row-main{min-width:0}.scene-row-main strong{display:block;font-size:12px}.scene-row-main small{display:block;color:#94a9b5;margin-top:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.scene-actions{display:flex;gap:5px;flex-wrap:wrap;justify-content:flex-end}.scene-actions button{padding:6px 8px;font-size:11px}
.event-line.user-choice-event{color:#d5f2ff;font-weight:700;border-left:2px solid #79b9d6;padding-left:7px}
@media(max-width:760px){.result-tools{display:grid}.result-tools button{width:100%}.scene-row{grid-template-columns:1fr}.scene-actions{justify-content:flex-start}.scene-actions button{flex:1}}

/* STEP71-A — unmistakable goal awareness + protagonist facing cone */
.pitch-stage{position:relative;overflow:hidden}.pitch-stage canvas{display:block;width:100%;height:auto;aspect-ratio:105/68}.goal-alert{position:absolute;left:50%;top:50%;transform:translate(-50%,-46%) scale(.96);width:min(520px,82%);padding:18px 22px;border:2px solid rgba(255,255,255,.85);border-radius:14px;background:rgba(8,16,21,.92);box-shadow:0 16px 46px rgba(0,0,0,.5);text-align:center;opacity:0;transition:opacity .16s ease,transform .16s ease;z-index:20;pointer-events:none}.goal-alert.show{opacity:1;transform:translate(-50%,-50%) scale(1)}.goal-alert strong{display:block;font-size:22px;letter-spacing:.03em}.goal-alert b{display:block;font-size:32px;margin:6px 0}.goal-alert span{display:block;font-size:13px;color:#d5e1e7}.goal-alert.scored{outline:3px solid rgba(164,255,196,.16)}.goal-alert.conceded{outline:3px solid rgba(255,176,176,.18)}.goal-score-pulse{animation:goalScorePulse .45s ease-in-out 0s 4 alternate}@keyframes goalScorePulse{from{transform:scale(1)}to{transform:scale(1.28)}}
@media(max-width:760px){.goal-alert{width:86%;padding:14px 16px}.goal-alert strong{font-size:17px}.goal-alert b{font-size:26px}}


/* STEP73 / TT-0.39 — unified collapsed developer info + mobile match-first flow */
.developer-info{margin:0 0 8px;border:1px solid #2b3942;border-radius:10px;background:#151f26;color:#cbd9e0}
.developer-info summary{display:flex;align-items:center;gap:7px;width:max-content;margin-left:auto;padding:8px 10px;cursor:pointer;font-size:12px;font-weight:700;list-style:none;user-select:none}
.developer-info summary::-webkit-details-marker{display:none}
.developer-info-icon{display:grid;place-items:center;width:20px;height:20px;border:1px solid #52646f;border-radius:50%;font-size:11px;font-weight:800;color:#e5f1f6}
.developer-info-body{padding:10px 12px 12px;border-top:1px solid #2b3942}
.developer-info-body p{margin:7px 0 0;font-size:12px;line-height:1.5;color:#aebfc8}
.developer-info-body .build-line{padding:0}
.developer-status{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin-top:9px}
.developer-status span{padding:7px 8px;border:1px solid #2b3942;border-radius:8px;background:#182128;font-size:11px;color:#93a6b2}
.developer-status strong{display:block;margin-top:3px;color:#e2edf2;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.developer-status strong.ok{color:#8de4b1}
.hero-commentary{min-height:38px;display:flex;align-items:center;padding:8px 12px;border-top:1px solid #2b3942;background:#131c22;color:#dce8ee;font-size:13px;line-height:1.35;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@media(max-width:760px){
  .app-shell{width:100%;padding:6px 6px 34px}
  .developer-info{margin-bottom:6px;border-radius:9px}
  .developer-info summary{padding:7px 9px;font-size:11px}
  .developer-info-body{padding:8px 9px 9px}
  .developer-info-body p{font-size:11px;line-height:1.45}
  .developer-status{grid-template-columns:1fr 1fr;gap:5px}
  .developer-status span{padding:6px 7px;font-size:10px}
  .developer-status strong{font-size:11px}
  .control-panel{display:grid;grid-template-columns:1fr 1fr;gap:6px;align-items:stretch;padding:7px;margin:0 0 6px;border-radius:9px}
  .control-panel label{width:auto;font-size:11px;gap:2px}
  .control-panel select,.control-panel button{width:100%;min-width:0;padding:8px 7px;font-size:12px}
  .pitch-card{border-radius:9px}
  .pitch-card canvas,.pitch-stage canvas{min-height:0;aspect-ratio:105/68}
  .hero-scoreboard{padding:7px 8px;gap:7px;font-size:11px}
  .hero-scoreboard b{font-size:16px}.hero-scoreboard strong{min-width:30px}
  .hero-commentary{min-height:34px;padding:7px 9px;font-size:12px}
  .pitch-footer,.choice-receipt{display:none!important}
  .choice-panel{margin-top:6px;padding:9px;border-radius:9px;scroll-margin-top:6px}
  .choice-head strong{font-size:13px}.choice-tools{margin-top:7px;gap:5px}
  .choice-tools .muted{display:none}
  .choice-tools button{padding:7px 8px;font-size:11px}
  .choice-buttons{gap:5px;margin-top:8px}
  .choice-buttons button.choice-option{padding:10px 8px;min-height:44px}
  .choice-buttons button.choice-option b{font-size:13px}
  .choice-family{padding:2px 3px;font-size:10px}
  .result-panel{margin-top:6px;padding:9px}
  .log-panel,.developer-panel{margin-top:7px}
}
