/* Battle result card in the same visual system as the other panels (UI_CONSISTENCY_RULES.md):
 * slate panel, one gold main button, underline tabs, segmented side switch, calm empty state. */
html.pixel-ui038 #result .result-card,#result .result-card{border:2px solid var(--c-line,#3E4F5C)!important;border-image:none!important;border-radius:8px!important;
 background:var(--c-panel,#1E2933)!important;box-shadow:0 16px 48px rgba(0,0,0,.55)!important;color:var(--c-text,#ECE6D6);letter-spacing:0}
#result .result-card *{letter-spacing:0!important}
/* Left column: outcome first, then rewards, then the next step. */
#result .result-card>small{font-size:12px!important;color:var(--c-text-2,#A9B3BA)!important;text-transform:none}
#result .result-card>h1{font-size:40px!important;line-height:1.1!important;margin:4px 0 2px!important;color:var(--c-ok,#79C27D)!important;text-shadow:0 3px 0 rgba(0,0,0,.45)!important}
#result .result-card>h1[data-outcome=lose]{color:var(--c-danger,#EA7A6B)!important}#result .result-card>h1[data-outcome=draw]{color:var(--c-text,#ECE6D6)!important}
#result .result-card>p{color:var(--c-text-2,#A9B3BA)!important;font-size:13px!important}
#result .result-card .result-reward{display:flex;flex-direction:column;gap:6px;margin-top:10px!important;padding:10px 12px;border-radius:6px;background:rgba(20,28,36,.55)}
#result .result-card .result-reward .reward-item254{display:grid!important;grid-template-columns:32px 1fr auto;align-items:center;gap:10px}
#result .result-card .result-reward .reward-icon254{width:28px!important;height:28px!important}
#result .result-card .result-reward strong{font-size:20px!important;color:var(--c-accent,#E3B04B)!important;text-align:right}
#result .result-card .result-reward-note{font-size:12px!important;color:var(--c-text-2,#A9B3BA)!important;text-align:left!important;margin-top:6px}
/* Main action: the single gold button. Close: small neutral square. */
#result .result-card>button.primary{height:48px!important;border:2px solid #FFF0B8!important;border-image:none!important;border-radius:6px!important;
 background:linear-gradient(180deg,#F0C060,#D9A23F)!important;color:var(--c-accent-ink,#1A1408)!important;font-size:16px!important;text-shadow:none!important;box-shadow:0 2px 0 #6b4c16,0 0 12px rgba(227,176,75,.3)!important}
#result .result-card>button.close{width:36px!important;height:36px!important;border:1px solid #5B7385!important;border-image:none!important;border-radius:6px!important;
 background:linear-gradient(180deg,#3A4E5E,#26343F)!important;color:var(--c-text,#ECE6D6)!important;outline:none!important;box-shadow:none!important}
/* Right side: underline tabs + segmented switch + list. */
#result .result-card>div:has(.result-tabs060){border:0!important;border-radius:6px!important;background:rgba(20,28,36,.45)!important;padding:4px 12px 12px!important}
#result .result-tabs060{background:none!important;border-bottom:1px solid var(--c-line,#3E4F5C)!important;gap:4px!important;padding:0!important}
#result .result-tabs060 button{border:0!important;border-image:none!important;border-bottom:3px solid transparent!important;border-radius:0!important;background:none!important;box-shadow:none!important;color:var(--c-text-2,#A9B3BA)!important;filter:none!important;padding:10px 14px!important;height:auto!important}
#result .result-tabs060 button:is(.active,[aria-selected=true],[aria-pressed=true]){color:var(--c-text,#ECE6D6)!important;border-bottom-color:var(--c-accent,#E3B04B)!important}
#result .stats-sides060{display:inline-flex!important;gap:0!important;border:1px solid #5B7385;border-radius:6px;overflow:hidden}
#result .stats-sides060 button{border:0!important;border-image:none!important;border-radius:0!important;background:#26343F!important;box-shadow:none!important;color:var(--c-text-2,#A9B3BA)!important;padding:0 16px!important}
#result .stats-sides060 button+button{border-left:1px solid #5B7385!important}
#result .stats-sides060 button:is(.active,[aria-pressed=true],[aria-selected=true]){background:#3A4E5E!important;color:var(--c-text,#ECE6D6)!important;box-shadow:inset 0 -3px 0 var(--c-accent,#E3B04B)!important}
#result .stats-toolbar060 select{border:1px solid #5B7385!important;border-image:none!important;border-radius:6px!important;background:#26343F!important;color:var(--c-text,#ECE6D6)!important}
#result .stats-note060{color:var(--c-text-2,#A9B3BA)!important;font-size:12px!important;text-align:left!important}
#result .stats-empty060{display:grid;place-items:center;min-height:160px;color:var(--c-text-2,#A9B3BA)!important;border:1px dashed var(--c-line,#3E4F5C);border-radius:6px}

/* ---------- Result hero (20261018b): outcome glow, key numbers, XP progress, staged reveal ---------- */
#result.release-result .result-card{grid-template-rows:auto auto auto auto auto auto minmax(0,1fr) auto auto auto auto!important;row-gap:0!important;column-gap:18px!important;padding:16px!important;position:relative;overflow:hidden}
#result.release-result #resultMode{grid-row:1!important;text-align:center}
#result.release-result #resultTitle{grid-row:2!important;text-align:center}
#result.release-result #resultReason{grid-row:3!important;text-align:center;margin:0 0 10px!important}
#result.release-result .result-kpi1018{grid-column:1;grid-row:4}
#result.release-result #resultReward{grid-row:5!important;align-self:start!important}
#result.release-result #resultRewardNote{grid-row:6!important;align-self:start!important}
#result.release-result #resultUpgrade{grid-column:1;grid-row:8!important;margin-top:8px}
#result.release-result #resultRetry129{grid-column:1;grid-row:9!important;margin-top:8px}
#result.release-result #resultChest044{grid-column:1;grid-row:10!important;margin-top:8px;height:40px}
#result.release-result #again{grid-column:1;grid-row:11!important;margin-top:8px}
#result.release-result #backHome{grid-column:1;grid-row:12}
#result.release-result #resultTable043{grid-row:1 / -1!important}
#result .result-card>*:not(.close){position:relative;z-index:1}
#result .result-card::before{content:'';position:absolute;left:0;top:0;width:var(--hero-w1018,38%);height:62%;z-index:0;pointer-events:none;
 background:radial-gradient(ellipse 70% 55% at 50% 18%,var(--hero-glow1018,rgba(121,194,125,.28)),transparent 70%)}
#result .result-card::after{content:'';position:absolute;left:var(--hero-x1019,19%);top:var(--hero-y1019,96px);width:var(--hero-size1019,280px);height:var(--hero-size1019,280px);transform:translate(-50%,-50%);z-index:0;pointer-events:none;opacity:0;
 background:repeating-conic-gradient(var(--hero-ray1018,rgba(255,226,140,.10)) 0 6deg,transparent 6deg 18deg);-webkit-mask:radial-gradient(circle,#000 6%,transparent 50%);mask:radial-gradient(circle,#000 6%,transparent 50%)}
#result .result-card[data-outcome=win]::after{opacity:1;animation:result-rays1018 24s linear infinite}
#result .result-card[data-outcome=lose]{--hero-glow1018:rgba(234,122,107,.22)}
#result .result-card[data-outcome=draw]{--hero-glow1018:rgba(169,179,186,.18)}
#result .result-card[data-outcome=win]>h1{color:#F4D27A!important;text-shadow:0 3px 0 #6b4c16,0 0 18px rgba(244,210,122,.55)!important}
#result .result-card[data-outcome=lose]>h1{color:var(--c-danger,#EA7A6B)!important;text-shadow:0 3px 0 #4a1e18,0 0 14px rgba(234,122,107,.35)!important}
#result .result-card>h1{font-size:48px!important;animation:result-pop1018 .55s cubic-bezier(.2,.9,.3,1.3) both}
#result .result-card>h1::before,#result .result-card>h1::after{content:'';display:inline-block;width:34px;height:2px;vertical-align:middle;margin:0 12px;background:linear-gradient(90deg,transparent,currentColor);opacity:.7}
#result .result-card>h1::after{background:linear-gradient(270deg,transparent,currentColor)}
/* Key numbers: three tiles in a row */
.result-kpi1018{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin:0 0 8px;animation:result-up1018 .45s .25s ease-out both}
.result-kpi1018>div{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;padding:8px 4px;border-radius:6px;background:rgba(20,28,36,.55);border:1px solid rgba(62,79,92,.8)}
.result-kpi1018 b{font-size:20px;line-height:1;color:var(--c-text,#ECE6D6)}
.result-kpi1018 small{font-size:11px;color:var(--c-text-2,#A9B3BA)}
#result .result-card .result-reward{animation:result-up1018 .45s .4s ease-out both}
/* XP progress under the reward note */
.result-xp1018{grid-column:1;display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:8px;margin-top:8px;font-size:12px;color:var(--c-text-2,#A9B3BA);animation:result-up1018 .45s .55s ease-out both}
.result-xp1018 b{color:var(--c-info,#72AEDB)}
.result-xp1018 i{position:relative;display:block;height:8px;border-radius:4px;background:#0f161d;border:1px solid var(--c-line,#3E4F5C);overflow:hidden}
.result-xp1018 i>span{position:absolute;inset:0 auto 0 0;width:var(--xp,0%);background:linear-gradient(90deg,#4F8FBF,#8CC6EE);transition:width 1s .7s ease-out}
#result .result-card #resultRewardNote.has-xp1018{display:none!important}
@keyframes result-pop1018{0%{opacity:0;transform:scale(1.8)}60%{opacity:1;transform:scale(.94)}100%{transform:none}}
@keyframes result-up1018{0%{opacity:0;transform:translateY(10px)}100%{opacity:1;transform:none}}
@keyframes result-rays1018{to{transform:translate(-50%,-50%) rotate(360deg)}}
@media (max-height:450px){
 #result.release-result .result-card{padding:10px!important;column-gap:12px!important}
 #result .result-card>h1{font-size:30px!important;margin:0!important}
 #result .result-card>h1::before,#result .result-card>h1::after{width:18px;margin:0 8px}
 #result.release-result #resultReason{margin:0 0 6px!important;font-size:11px!important}
 .result-kpi1018{margin-bottom:6px}.result-kpi1018>div{padding:4px 2px}.result-kpi1018 b{font-size:15px}.result-kpi1018 small{font-size:10px}
 #result .result-card .result-reward{padding:6px 10px;gap:2px}#result .result-card .result-reward strong{font-size:16px!important}#result .result-card .result-reward .reward-icon254{width:22px!important;height:22px!important}
 .result-xp1018{margin-top:5px;font-size:11px}
 #result.release-result #again{height:40px!important}
 #result .result-card::after{top:var(--hero-y1019,60px)}
}
@media (prefers-reduced-motion:reduce){#result .result-card>h1,.result-kpi1018,#result .result-card .result-reward,.result-xp1018,#result .result-card::after{animation:none!important}}

.result-xp1018 em{grid-column:1 / -1;font-style:normal;font-size:11px;color:var(--c-text-2,#A9B3BA)}
.result-xp1018 em[hidden]{display:none}
#result.release-result #resultTable043{background:var(--c-panel,#1E2933)!important}
/* Summary table: header in the panel tone, my side blue, enemy red, leading value highlighted */
#result .summary060 .result-row043{border-bottom:1px solid rgba(62,79,92,.6)!important;background:none!important}
#result .summary060 .result-row043:nth-child(even):not(.result-head043){background:rgba(38,51,63,.35)!important}
#result .summary060 .result-head043{background:var(--c-panel-2,#26333F)!important;border-bottom:2px solid var(--c-line,#3E4F5C)!important;border-radius:4px 4px 0 0}
#result .summary060 .result-head043>span{color:var(--c-text-2,#A9B3BA)!important}
#result .summary060 .result-head043>span:nth-child(2){color:var(--c-info,#72AEDB)!important}
#result .summary060 .result-head043>span:nth-child(3){color:var(--c-danger,#EA7A6B)!important}
#result .summary060 .result-row043>strong{color:var(--c-text-2,#A9B3BA)!important;font-weight:400}
#result .summary060 .result-row043>strong.lead1018{color:var(--c-text,#ECE6D6)!important;font-weight:700}
#result .summary060 .result-row043>strong.lead1018::after{content:' ▲';font-size:.7em;color:var(--c-ok,#79C27D)}

/* Clip rotating decoration to the card without changing its scrollable children. */
#result.release-result .result-card{isolation:isolate;overflow:hidden;clip-path:inset(0 round 8px)}

/* Compact results: one metric per unit; quiet surfaces instead of metallic frames. */
html.pixel-ui038 body #result.release-result .result-card{border:1px solid #52645f!important;box-shadow:0 16px 48px #0006!important;background:#1d2b2c!important;border-radius:14px!important}
html body #result .result-card::before,html body #result .result-card::after,html body #result .result-card>h1::before,html body #result .result-card>h1::after{display:none!important}
html body #result .result-card>h1{animation:none!important;text-shadow:none!important;color:#e8d69e!important}
html body #result .result-card .result-reward{box-shadow:none!important;background:#243536!important;border:0!important;animation:none!important}
html body #result .result-card .result-reward .reward-item254{grid-template-columns:28px minmax(0,1fr)!important}
html body #result .result-card .reward-label260{display:none!important}
/* main result button (다음 → 로비 · 대전 로비로 · 같은 방으로): same gold button as the lobby — gold line, raised, presses in */
html body #result.release-result .result-card #again{background:linear-gradient(180deg,#F0C060,#D9A23F)!important;border:1px solid #FFE7A0!important;border-image:none!important;border-radius:8px!important;box-shadow:inset 0 1px 0 rgba(255,250,220,.55),0 3px 0 #6b4c16!important;color:#1A1408!important;text-shadow:0 1px 0 rgba(255,240,200,.45)!important;font-weight:800!important;letter-spacing:.02em;min-height:40px!important;height:44px!important;padding:0 12px!important;white-space:nowrap!important;overflow:hidden;text-overflow:ellipsis;translate:none!important;transform:none!important;transition:transform .08s ease-out,box-shadow .08s ease-out!important}
html body #result.release-result .result-card #again::before,html body #result.release-result .result-card #again::after{display:none!important}
html body #result.release-result .result-card #again:hover{filter:brightness(1.06)}
html body #result.release-result .result-card #again:not(:disabled):active{transform:translateY(2px)!important;box-shadow:inset 0 2px 3px rgba(0,0,0,.3)!important}
html body #result.release-result #resultTable043{background:transparent!important;padding-top:0!important}
html body #result .result-tabs060 button{font-size:13px!important;padding:8px 10px!important}
html body #result .stats-toolbar060{margin:10px 0 6px;gap:8px;flex-wrap:nowrap}
html body #result .stats-toolbar060 select{min-width:100px;max-width:46%;min-height:34px;font-size:12px!important}
html body #result .stats-sides060{min-width:0;border-color:#52645f}
html body #result .stats-sides060 button{padding:0 8px!important;min-height:34px;white-space:nowrap}
html body #result .unit-stat060{padding:10px 2px;align-items:center;border-bottom:1px solid #354747}
html body #result .stat-portrait060{border:0;background:transparent;border-radius:8px;overflow:hidden}
html body #result .stat-title060{align-items:center;font-size:13px;gap:8px}
html body #result .stat-title060 strong{font-weight:500;overflow-wrap:anywhere}
html body #result .stat-title060 b{color:#e5dcc5;font-weight:600}
html body #result .stat-bar060{height:4px;border-radius:2px;overflow:hidden;background:#132426;margin:7px 0 0}
html body #result .stat-bar060 span{background:#7cab9a}
html body #result .summary060 .result-row043>strong.lead1018::after{content:none}
html body #result .summary060 .result-row043{padding-top:10px;padding-bottom:10px}
html body #result .result-xp1018{animation:none!important}
@media(max-height:450px){html body #result .result-card>h1{font-size:30px!important}html body #result .result-card .result-reward{margin-top:6px!important}html body #result .stats-toolbar060{margin:6px 0}html body #result .unit-stat060{padding:7px 2px}html body #result .summary060 .result-row043{padding-top:6px;padding-bottom:6px}}

html body #result.release-result .result-xp1018{grid-row:6!important;margin-top:10px}

/* ---------- 2026-10-19: result screen refinements ---------- */
/* level first: level card sits right under the title, rewards below it */
html body #result.release-result .result-xp1018{grid-row:4!important;margin:4px 0 8px!important;padding:8px 10px;border-radius:8px;background:#22313a;border:1px solid #3E4F5C;gap:4px 10px!important;grid-template-columns:auto 1fr auto!important}
html body #result.release-result .result-xp1018>b{font-size:20px;line-height:1;color:#F4D27A!important;text-shadow:0 2px 0 #3a2a10}
html body #result.release-result .result-xp1018>small{font-size:11px;color:#A9B3BA}
html body #result.release-result .result-xp1018>i{height:10px!important}
html body #result.release-result .result-xp1018>.gain1019{grid-column:1 / -1;justify-self:start;font-size:12px;color:#8CC6EE;font-weight:700}
html body #result.release-result .result-xp1018.levelup1019>b::after{content:' UP';font-size:11px;color:#1A1408;background:#F4D27A;border-radius:6px;padding:1px 5px;margin-left:6px;vertical-align:3px;text-shadow:none}
html body #result.release-result #resultReward{grid-row:5!important}
html body #result.release-result #resultReward .zero1019{display:none!important}
html body #result.release-result #resultReward.empty1019{display:none!important}
/* empty statistics rows are filtered out */
html body #result .summary060 .result-row043.zero1019{display:none!important}
/* stats: tab bar + toolbar stay fixed at the top of the panel; only the list below scrolls (nothing slides over the rows) */
html body #result.release-result #resultTable043{display:flex!important;flex-direction:column!important;overflow:hidden!important;min-height:0}
html body #result.release-result #resultTable043>.result-tabs060{position:static!important;flex:none;background:transparent!important}
html body #result.release-result #resultTable043>.summary060:not([hidden]){flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain}
html body #result.release-result #resultTable043>.details060:not([hidden]){flex:1 1 auto;min-height:0;display:flex!important;flex-direction:column}
html body #result.release-result #resultTable043>.details060>.stats-toolbar060{flex:none}
html body #result.release-result #resultTable043>.details060>.unit-stats060{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain}
/* win halo: centred on the title (JS sets the centre from the title box), so it never drifts sideways with screen size */
html body #result.release-result .result-card[data-outcome=win]::after{display:block!important;content:'';position:absolute;left:var(--halo-x1019,50%)!important;top:var(--halo-y1019,60px)!important;
 width:var(--halo-s1019,280px)!important;height:var(--halo-s1019,280px)!important;transform:translate(-50%,-50%);opacity:.9;z-index:0;pointer-events:none;
 background:repeating-conic-gradient(rgba(255,226,140,.12) 0 6deg,transparent 6deg 18deg);-webkit-mask:radial-gradient(circle,#000 8%,transparent 62%);mask:radial-gradient(circle,#000 8%,transparent 62%);
 animation:result-rays1018 24s linear infinite}
@media (prefers-reduced-motion:reduce){html body #result.release-result .result-card[data-outcome=win]::after{animation:none!important}}
/* 2026-10-20 · unit tab ("캐릭터별 기여"): side switch on top, metric filter row under it (same height, frame and font), unit level next to the name */
html body #result .stats-toolbar060{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:6px!important;flex-wrap:nowrap!important}
html body #result .stats-sides060{display:flex!important;width:100%}
html body #result .stats-sides060 button{flex:1 1 0!important;min-width:0}
html body #result .stats-metrics1020{display:flex;gap:6px;width:100%;margin:0;padding:0}
html body #result .stats-metrics1020[hidden]{display:none!important}
html body #result .stats-metrics1020 button{flex:1 1 0;min-width:0;height:30px;min-height:30px!important;padding:0 6px!important;margin:0!important;border:1px solid #3E4F5C!important;border-image:none!important;border-radius:999px!important;
 background:#1E2933!important;box-shadow:none!important;color:#A9B3BA!important;font:inherit;font-size:12px!important;line-height:28px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-shadow:none!important;translate:none!important;transform:none!important;cursor:pointer}
html body #result .stats-metrics1020 button::before,html body #result .stats-metrics1020 button::after{display:none!important}
html body #result .stats-metrics1020 button[aria-pressed=true]{background:linear-gradient(180deg,#3A4E5E,#26343F)!important;border-color:#E3B04B!important;color:#F4D27A!important}
html body #result .stats-metrics1020 button:focus-visible{outline:2px solid #fff0b8;outline-offset:1px}
html body #result .stat-name1020{display:flex;align-items:baseline;gap:6px;min-width:0}
html body #result .stat-name1020 strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;overflow-wrap:normal!important}
html body #result .stat-lv1020{flex:none;font-style:normal;font-size:11px;font-weight:700;color:#F0C060;font-variant-numeric:tabular-nums;letter-spacing:.02em}
html body #result .stat-portrait060:not(:has(img)){background:#26343F!important;border:1px solid #3E4F5C!important;border-radius:8px;color:#A9B3BA;font-size:10px;line-height:1.2;text-align:center}
@media(max-width:720px){html body #result .stats-metrics1020 button{font-size:11px!important;padding:0 4px!important}}
html body #result.release-result.result060 #roomReturn053{grid-column:1!important;grid-row:10!important;align-self:end!important;margin:8px 0 0!important;font-size:11px!important;line-height:1.4;color:#A9B3BA;text-align:center}
