/* Game presentation. All scores and milestones come from validated game data. */
:root { --portal-mode-training: #9ce9f1; --portal-mode-challenge: #ff9bac; --portal-mode-computer: #ffd190; }
.promo-poster { border-color: #385c72; background: radial-gradient(ellipse at 93% 10%, #19526680, transparent 62%), linear-gradient(125deg, #0a1c2b, #102b3b); }
.poster-content { position: relative; }
.poster-content .poster-pill { border-color: #538d9e; color: #b0eff0; background: #143c49; letter-spacing: .04em; }
.launch-route { border-top: 3px solid #6ea1b6; }
.launch-route-keyboard { border-top-color: #a9e792; background: linear-gradient(140deg, #1b3a36, #112b38); }
.launch-route-keyboard .route-caption { color: #c7e9af; }
.launch-route-keyboard .primary-action { background: #b5ec9f; border-color: #b5ec9f; color: #132c24; }
.launch-route .route-caption { font-weight: 700; letter-spacing: .04em; }
.launch-route button { transition: background-color .15s, border-color .15s; }
.control-hints kbd { border-bottom: 3px solid #5a8094; border-radius: 6px; background: #173447; }
.portal-result-panel { --result-accent: var(--portal-mode-training); scroll-margin-top: calc(var(--portal-header-height, 90px) + 16px); max-height: none; overflow: visible; margin-top: 18px; padding: clamp(18px, 2.4vw, 30px); border: 1px solid #3d6276; border-top: 3px solid var(--result-accent); border-radius: 16px; background: radial-gradient(ellipse at 100% 0, #17425566, transparent 58%), #0c2230; }
.portal-result-panel[data-kind="challenge"] { --result-accent: var(--portal-mode-challenge); }
.portal-result-panel[data-kind="computer-challenge"] { --result-accent: var(--portal-mode-computer); }
.result-heading { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.result-kicker { color: var(--result-accent); font-size: 13px; font-weight: 700; letter-spacing: .06em; }
.result-heading h3 { margin: 0; font-size: 16px; font-weight: 500; color: #b8cedb; }
.result-hero { display: grid; grid-template-columns: minmax(170px, .7fr) minmax(0, 2fr); align-items: center; gap: 28px; margin: 24px 0; }
.result-score-block { min-width: 0; padding: 8px 24px 8px 0; border: 0; border-right: 1px solid #355769; border-radius: 0; background: transparent; text-align: left; }
#portal-result-score { display: block; color: var(--result-accent); font-size: clamp(48px, 5.4vw, 80px); font-weight: 800; line-height: 1.05; letter-spacing: -.025em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
#portal-result-unit { display: block; margin-top: 6px; font-size: 16px; color: #c5dbe5; }
.result-overview { min-width: 0; }
#portal-result-mode { margin: 0 0 14px; font-size: clamp(20px, 2.2vw, 28px); line-height: 1.4; font-weight: 650; color: #f0f7fb; overflow-wrap: anywhere; }
.result-badges { display: flex; gap: 8px; flex-wrap: wrap; list-style: none; padding: 0; margin: 0; }
.result-badges:empty { display: none; }
.result-overview:has(.result-badges:empty) #portal-result-mode { margin-bottom: 0; }
.result-badges li { padding: 6px 10px; border: 1px solid #3a6072; border-radius: 6px; color: var(--result-accent); background: #102f3d; font-size: 14px; font-weight: 600; }
.result-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin: 0 0 18px; border: 1px solid #355365; border-radius: 10px; background: #091d2a; }
.result-stats > div { min-width: 0; padding: 14px 18px; border: 0; border-radius: 0; background: transparent; }
.result-stats dt { font-size: 13px; color: #b4ccda; line-height: 1.5; }
.result-stats dd { margin: 6px 0 0; color: #f1f7fb; font-size: clamp(17px, 1.8vw, 23px); font-weight: 700; line-height: 1.4; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.result-accessible-summary { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.portal-result-panel .result-next { margin: 0 0 16px; border-left: 2px solid var(--result-accent); padding: 12px 16px; color: #d1e1e9; background: #102a39; font-size: 15px; line-height: 1.7; }
.portal-result-panel .portal-result-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.portal-result-actions button { min-height: 44px; padding: 10px 16px; border: 1px solid #4b788a; border-radius: 8px; color: #ddf5f9; background: #153647; font-size: 15px; transition: background-color 140ms ease-out, border-color 140ms ease-out; }
.portal-result-actions button:not(:disabled):hover { border-color: #9ce9f1; background: #204858; }
.portal-result-actions button:not(:disabled):active { background: #2b5a6c; transition: none; }
.portal-result-panel .result-details { margin-top: 18px; border-top: 1px solid #344f60; padding-top: 10px; }
.result-details > summary { min-height: 44px; display: list-item; align-content: center; color: #bed4e1; cursor: pointer; }
@media (min-width: 1200px) { .result-stats > div + div { border-left: 1px solid #355365; } }
@media (max-width: 760px) {
  .result-hero { grid-template-columns: minmax(100px, .6fr) minmax(0, 1fr); gap: 16px; }
  .result-stats { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .result-stats > div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
  .result-stats dd { margin: 0; text-align: right; }
  .result-heading { gap: 8px; }
}
@media (max-width: 420px) {
  .result-hero { grid-template-columns: minmax(0, 1fr); }
  .result-score-block { display: flex; gap: 12px; align-items: baseline; justify-content: center; }
  #portal-result-unit { margin: 0; }
}
@media (prefers-reduced-motion: reduce) { .launch-route button, .portal-result-actions button { transition: none; } }
@media (prefers-reduced-transparency: reduce) { .portal-result-panel { background: #0c2230; } }
@media (prefers-contrast: more) {
  .portal-result-panel, .result-stats, .portal-result-panel .result-next { background: #061725; border-color: #bfd9e8; }
  .result-score-block, .result-stats > div + div, .result-badges li, .portal-result-panel .result-details, .portal-result-actions button { border-color: #bfd9e8; }
  .result-heading h3, .result-stats dt, .result-details > summary { color: #edf7fc; }
}

.unity-stage:fullscreen .portal-result-panel, .unity-stage.is-fallback-fullscreen .portal-result-panel { max-height: 42dvh; overflow: auto; }

/* Arena / match-rule selector (portal-competition.mjs) */
.competition-summary{margin-top:14px;padding:8px 14px;border:1px solid rgba(120,200,255,.45);border-radius:999px;background:rgba(6,20,34,.78);color:#dff3ff;font:inherit;font-size:.9rem;cursor:pointer;max-width:100%;text-align:left}
.competition-summary:hover,.competition-summary:focus-visible{border-color:#7fd3ff;outline:none;background:rgba(10,32,52,.9)}
.competition-dialog{max-width:760px;max-height:min(86vh,900px);overflow:auto}
.competition-note,.competition-scope{font-size:.88rem;opacity:.9;line-height:1.55}
.competition-group{border:1px solid rgba(255,255,255,.14);border-radius:10px;margin:12px 0;padding:8px 12px}
.competition-group legend{padding:0 6px;font-weight:700}
.competition-option{display:flex;gap:10px;align-items:flex-start;padding:8px 4px;border-bottom:1px solid rgba(255,255,255,.08);cursor:pointer}
.competition-option:last-child{border-bottom:0}
.competition-option input{margin-top:4px;flex:none}
.competition-option span{display:flex;flex-direction:column;gap:3px;min-width:0}
.competition-option small{font-size:.8rem;line-height:1.5;opacity:.88;overflow-wrap:anywhere}
.competition-option em{font-size:.75rem;font-style:normal;opacity:.7}
@media (max-width:480px){.competition-dialog{padding:16px 14px}.competition-option small{font-size:.76rem}}
