.game-result-dialog{padding:0!important;border:0!important;border-radius:24px!important;background:transparent!important;color:#223a30;width:min(430px,calc(100vw - 24px));max-width:430px;max-height:calc(100dvh - 32px);overflow:auto;box-shadow:0 24px 90px #10231c40}
.game-result-dialog::backdrop{background:#101f27a6;backdrop-filter:blur(5px)}
.game-result-card{--result-accent:#2a644e;--result-soft:#edf5eb;position:relative;isolation:isolate;box-sizing:border-box;width:100%;max-width:430px;margin:auto;padding:24px 22px 18px;border:1px solid #dfe6dd;border-radius:24px;background:#fff;color:#223a30;box-shadow:0 16px 52px #14291f20;text-align:center;font-family:"Noto Sans KR","Apple SD Gothic Neo","Malgun Gothic",sans-serif;overflow:hidden;line-height:1.5;color-scheme:light}
.game-result-card *, .game-result-card *::before,.game-result-card *::after{box-sizing:border-box}
.game-result-card[data-result-outcome="record"],.game-result-card[data-result-outcome="gold-gain"]{--result-accent:#a77519;--result-soft:#fff2cb}
.game-result-card[data-result-outcome="failure"],.game-result-card[data-result-outcome="gold-loss"]{--result-accent:#627a9a;--result-soft:#edf1f8}
.game-result-card[data-result-outcome="draw"],.game-result-card[data-result-outcome="complete"],.game-result-card[data-result-outcome="score"],.game-result-card[data-result-outcome="gold-even"]{--result-accent:#627868;--result-soft:#eff3ec}
.game-result-content{position:relative;z-index:2}
.game-result-icon{display:grid;place-items:center;width:76px;height:76px;margin:0 auto 12px;border-radius:25px;color:var(--result-accent);background:var(--result-soft)}
.game-result-icon svg{width:56px;height:56px}
.game-result-icon-star{fill:#f7cd64;stroke-width:1.6}
.game-result-icon-tear{fill:#93c3e7;stroke:#93c3e7;stroke-width:1}
.game-result-card h2.game-result-title{margin:0 0 8px;padding:0;font-size:27px;font-weight:800;letter-spacing:-.04em;line-height:1.3;color:#223a30}
.game-result-card .game-result-metric{min-height:0;margin:0;font-size:18px;font-weight:750;line-height:1.45;white-space:pre-line;overflow-wrap:anywhere;color:#2a644e}
.game-result-card .game-result-metric:empty{display:none}
.game-result-card .game-result-metric>p,.game-result-card .game-result-metric>div{margin:0}
.game-result-card .game-result-encouragement{margin:7px 0 0;font-size:14px;line-height:1.5;color:#667467;white-space:pre-line}
.game-result-card [hidden]{display:none!important}
.game-result-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:22px;align-items:stretch}
.game-result-navigation,
.game-result-actions > .game-result-navigation {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-column: 1 / -1;
  align-items: stretch;
  gap: 8px;
}
.game-result-navigation > button { min-width: 0; }
dialog.game-exit-dialog {
  box-sizing: border-box;
  width: min(360px, calc(100vw - 32px));
  margin: auto;
  padding: 22px;
  border: 1px solid var(--line, #dfe4df);
  border-radius: 16px;
  background: var(--surface, #fff);
  color: var(--ink, #223a30);
}
.game-exit-dialog::backdrop { background: rgba(17, 28, 23, .58); }
.game-exit-dialog p { margin: 0 0 18px; white-space: pre-line; text-align: center; }
.game-exit-dialog button { min-height: 44px; padding: 8px; border: 1px solid #cdd8cf; border-radius: 10px; background: #edf3ef; color: #223a30; font: inherit; cursor: pointer; }
.game-exit-dialog [data-exit-stay] { background: var(--accent, #245a48); color: var(--on-accent, #fff); }
.game-result-actions:empty{display:none}
.game-result-actions>:only-child{grid-column:1/-1}
.game-result-actions:has(>:nth-child(2):last-child){grid-template-columns:repeat(2,minmax(0,1fr))}
.game-result-actions>div,.game-result-actions>section{grid-column:1/-1}
.game-result-actions button,.game-result-actions a,.game-result-card .game-result-extra button{min-height:44px;max-width:100%;margin:0;padding:10px 8px;border:1px solid #dfe6dd;border-radius:14px;background:#edf5eb;color:#223a30;font:inherit;font-size:14px;font-weight:750;line-height:1.4;text-decoration:none;cursor:pointer;white-space:normal;overflow-wrap:anywhere;touch-action:manipulation}
.game-result-actions button:hover:not(:disabled),.game-result-card .game-result-extra button:hover:not(:disabled){background:#e0eddf}
.game-result-actions button:disabled,.game-result-card .game-result-extra button:disabled{opacity:.43;cursor:default;box-shadow:none}
.game-result-card button:focus-visible,.game-result-card a:focus-visible,.game-result-card .game-result-copy input:focus-visible{outline:3px solid #2a644e;outline-offset:3px}
.game-result-card .game-result-extra{margin-top:10px;font-size:13px;line-height:1.5;color:#788279;overflow-wrap:anywhere}
.game-result-card .game-result-extra:empty{display:none}
.game-result-card .game-result-extra p{margin:5px 0;font:inherit;color:inherit}
.game-result-card button.game-result-share{display:flex;justify-content:center;align-items:center;gap:8px;width:100%;min-height:46px;margin:12px 0 0;padding:11px 14px;border:0;border-radius:13px;background:var(--result-accent);color:#fff;font:inherit;font-size:15px;font-weight:800;line-height:1.5;cursor:pointer;box-shadow:none;touch-action:manipulation}
.game-result-social{display:flex;align-items:stretch;justify-content:center;gap:7px;margin-top:12px;flex-wrap:wrap}
.game-result-card .game-result-social button.game-result-share{flex:1 1 115px;width:auto;margin:0;font-size:14px;padding:10px}
.game-result-card a.game-result-monthly-link{display:flex;align-items:center;justify-content:center;flex:1 1 120px;min-height:46px;padding:9px 8px;border:1px solid #b9cdbb;border-radius:14px;background:#edf5eb;color:#2a644e;font-size:13px;font-weight:800;text-decoration:none;line-height:1.35}
.game-result-card a.game-result-monthly-link:hover,.game-entry-monthly-link:hover{filter:brightness(.97)}
.game-entry-monthly-links{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:8px;margin:10px auto 0;width:100%;max-width:430px;justify-content:center}
.game-entry-monthly-link{display:flex;align-items:center;justify-content:center;flex:1 1 135px;min-height:44px;padding:10px 13px;border:1px solid #b9cdbb;border-radius:14px;background:#edf5eb;color:#2a644e;font-size:13px;font-weight:800;text-decoration:none;text-align:center;line-height:1.4}
.game-entry-monthly-link:focus-visible{outline:3px solid #2a644e;outline-offset:3px}
/* Outcome colors still communicate wins and records; regular wins use the selected arcade theme. */
:root[data-world-theme]:not([data-theme=dark]) .game-result-card[data-result-outcome="success"]{--result-accent:var(--accent,#2a644e);--result-soft:var(--accent-soft,#edf5eb)}
:root[data-world-theme]:not([data-theme=dark]) .game-entry-monthly-link,:root[data-world-theme]:not([data-theme=dark]) .game-result-card a.game-result-monthly-link{background:var(--accent-soft,#edf5eb);color:var(--accent-ink,#2a644e);border-color:color-mix(in srgb,var(--accent,#2a644e) 30%,#dfe6dd)}
.game-result-share svg{width:18px;height:18px;flex-shrink:0}
.game-result-share:hover{filter:brightness(1.06)}
.game-result-share:disabled{opacity:.65;cursor:wait}
.game-result-card .game-result-share-status{margin:8px 0 0;font-size:12px;color:#697c6c;line-height:1.5}
.game-result-card .game-result-share-status:empty{display:none}
.game-result-card .game-result-copy{margin-top:12px;text-align:left;font-size:12px;color:#697c6c}
.game-result-card .game-result-copy label{display:block;font-weight:700}
.game-result-card .game-result-copy input{width:100%;margin-top:4px;padding:10px;border:1px solid #d9e2d7;border-radius:10px;background:#fff;color:#304d3c;font:inherit;user-select:text}
.game-result-card .game-result-copy p{margin:5px 0 0}
.game-result-effects{position:absolute;z-index:1;inset:0;overflow:hidden;pointer-events:none!important;border-radius:inherit}
.game-result-effects *{position:absolute;display:block;pointer-events:none!important;will-change:transform,opacity}
.game-result-confetti{left:var(--x);top:-12px;width:7px;height:12px;border-radius:2px;background:var(--color);opacity:0;animation:game-result-confetti 2.9s var(--delay) cubic-bezier(.2,.5,.5,1) both}
.game-result-confetti:nth-child(3n){height:7px;border-radius:50%}
.game-result-spark{left:var(--x);top:var(--y);width:4px;height:15px;background:var(--color);border-radius:5px;opacity:0;animation:game-result-firework 1.25s var(--delay) ease-out both}
.game-result-light{left:var(--x);bottom:-30%;width:42%;height:155%;background:linear-gradient(0deg,#f7db813b,transparent 88%);clip-path:polygon(48% 100%,0 0,100% 0,52% 100%);transform-origin:50% 100%;opacity:0;animation:game-result-light 2.8s var(--delay) ease-in-out both}
.game-result-tear{left:var(--x);top:12%;width:7px;height:12px;border-radius:60% 40% 65% 40%;background:#a9c5df88;opacity:0;animation:game-result-tear 1.9s var(--delay) ease-in both}
.is-celebrating .game-result-icon{animation:game-result-pop .65s cubic-bezier(.2,.7,.25,1.3) both}
.is-sad .game-result-icon{animation:game-result-sad 1.4s ease both}
@keyframes game-result-pop{0%{transform:scale(.65) rotate(-7deg);opacity:.3}65%{transform:scale(1.08) rotate(3deg)}100%{transform:scale(1) rotate(0);opacity:1}}
@keyframes game-result-confetti{0%{transform:translate3d(0,-12px,0) rotate(0);opacity:0}10%{opacity:.85}80%{opacity:.7}100%{transform:translate3d(var(--drift),560px,0) rotate(var(--turn));opacity:0}}
@keyframes game-result-firework{0%{transform:rotate(var(--angle)) translateY(0) scale(.2);opacity:0}20%{opacity:.8}100%{transform:rotate(var(--angle)) translateY(-76px) scale(.35);opacity:0}}
@keyframes game-result-light{0%,100%{opacity:0;transform:rotate(calc(var(--angle) - 8deg))}35%,65%{opacity:.7;transform:rotate(calc(var(--angle) + 8deg))}}
@keyframes game-result-tear{0%{opacity:0;transform:translateY(0) rotate(-15deg)}20%{opacity:.65}100%{opacity:0;transform:translateY(180px) rotate(-15deg)}}
@keyframes game-result-sad{0%{transform:translateY(-5px) rotate(0)}50%{transform:translateY(4px) rotate(-5deg)}100%{transform:translateY(1px) rotate(-2deg)}}
@media(max-width:380px){.game-result-card{padding:20px 15px 15px;border-radius:22px}.game-result-icon{width:66px;height:66px;margin-bottom:10px}.game-result-icon svg{width:49px;height:49px}.game-result-card h2.game-result-title{font-size:26px}.game-result-card .game-result-metric{font-size:16px}.game-result-actions{gap:6px;margin-top:18px}.game-result-actions button,.game-result-actions a{font-size:13px;padding:9px 6px}}
@media(max-height:520px){.game-result-card{padding-top:14px;padding-bottom:12px}.game-result-icon{width:48px;height:48px;margin-bottom:6px;border-radius:16px}.game-result-icon svg{width:39px;height:39px}.game-result-card h2.game-result-title{font-size:24px}.game-result-actions{margin-top:12px}}
@media(prefers-reduced-motion:reduce){.game-result-card *{animation:none!important;transition:none!important}.game-result-effects{display:none}}
