/* The match finale: one full screen. The canvas sits above the skyline and below the words, so the bloom covers
   the city while the words wait, then the words come in over a clear sky. */
:root body #result-modal.has-city{position:fixed;inset:var(--app-top,0px) 0 auto;width:100%;height:var(--app-height,100dvh);max-width:none;max-height:none;margin:0;padding:0;border:0;border-radius:0;background:var(--paper);color:var(--ink);box-shadow:none;overflow:hidden auto;overscroll-behavior:contain;animation:szf-in .32s ease-out both}
/* Older embedded browsers use the same full viewport, not the generic inset dialog fallback. */
:root body #result-modal.has-city.qb-dialog-fallback{inset:var(--app-top,0px) 0 auto!important;width:100%!important;height:var(--app-height,100dvh)!important;max-height:none!important;margin:0!important;overflow:hidden auto;box-shadow:none!important}
:root body #result-modal.has-city::backdrop{background:var(--paper);backdrop-filter:none}
@keyframes szf-in{from{opacity:0}}
:root body #result-modal.has-city .result-sheet{position:relative;min-height:100%;max-height:none;flex:none;animation:none;transform:none;display:flex;flex-direction:column;background:transparent;border:0;border-radius:0;box-shadow:none;overflow:visible;padding-bottom:env(safe-area-inset-bottom)}
:root body #result-modal.has-city .result-head{position:absolute;top:env(safe-area-inset-top);right:env(safe-area-inset-right);left:auto;z-index:4;padding:8px 10px;background:transparent;border:0}
:root body #result-modal.has-city .result-head button{width:44px;height:44px;border-radius:50%;color:var(--muted);background:transparent}
:root body #result-modal.has-city #result-kicker{display:none}
:root body #result-modal.has-city #bloom-result{position:static;flex:1;display:flex;flex-direction:column;padding:0;background:transparent}
.szf{flex:1;display:flex;flex-direction:column;align-items:center;width:100%;padding:calc(48px + env(safe-area-inset-top)) 16px 0;text-align:center;overflow:hidden}
.szf-canvas{position:absolute;inset:0;width:100%;height:100%;display:block;pointer-events:none;z-index:2}
.szf-head{position:relative;z-index:3;max-width:680px}
.szf-title{display:flex;flex-wrap:wrap;justify-content:center;align-items:baseline;gap:0 .1em;margin:2px 0 0;font-size:clamp(42px,12.5vw,84px);line-height:1.1;letter-spacing:-.04em;color:var(--ink);outline:none}
.szf-title span{font-size:.46em;font-weight:600;letter-spacing:-.02em;overflow-wrap:anywhere}
.szf-title strong{font-weight:750;color:var(--red-text);white-space:nowrap}
.szf[data-winner=rival] .szf-title strong{color:var(--gold-text)}
.szf-facts{display:flex;flex-wrap:wrap;justify-content:center;gap:2px 16px;margin-top:10px;font-size:13px;line-height:1.6;color:var(--muted)}
.szf-facts b{font-family:"SZ Rank",var(--rank-font,inherit);font-weight:800;font-size:16px;color:var(--ink);letter-spacing:0}
.szf-sky{flex:1 1 auto;width:100%;min-height:clamp(118px,25vh,330px)}
/* The skyline is drawn wider than a phone so its quiet margins fall outside the screen; nothing of the art is cut. */
.szf-city{position:relative;z-index:1;flex:none;width:128%;max-width:1000px;margin:0 -14%;pointer-events:none}
.szf-city .fc-bloom-stage{width:100%;max-width:none;aspect-ratio:64/25}
.szf-vine{position:relative;z-index:3;flex:none;width:100%;max-width:560px;margin-top:2px}
.szf-more{position:relative;z-index:3;display:flex;justify-content:center;gap:20px;margin:0}
.szf-more button{min-height:40px;padding:8px 2px;border:0;background:transparent;color:var(--ink);font:inherit;font-size:13px;font-weight:600;text-decoration:underline;text-decoration-color:var(--line);text-underline-offset:4px;cursor:pointer}
:root body #result-modal.has-city .result-actions{position:relative;z-index:3;width:100%;max-width:520px;margin:0 auto;padding:4px 16px 14px;background:transparent;border:0;display:grid;grid-template-columns:1fr 1fr;gap:8px}
:root body #result-modal.has-city .result-actions button{min-height:48px}
:root body #result-modal.has-city #result-share{background:var(--panel);text-decoration:none;color:var(--ink);border-radius:var(--r,8px)}
:root body #result-modal.has-city #result-review{grid-column:1/-1;min-height:40px}
/* The headline follows the clearing sky; the actions wait for the city to settle. */
.szf:not([data-caption=visible]) .szf-head>*,.szf:not([data-phase=settled]) .szf-more{opacity:0;transform:translateY(10px);transition:none}
:root body #result-modal.has-city:has(.szf:not([data-phase=settled])) .result-actions{opacity:0;transform:translateY(10px);pointer-events:none;transition:none}
.szf[data-caption=visible] .szf-head>*,.szf[data-phase=settled] .szf-more,:root body #result-modal.has-city:has(.szf[data-phase=settled]) .result-actions{transition:opacity .5s ease,transform .6s cubic-bezier(.2,.8,.2,1)}
.szf[data-caption=visible] .szf-title{transition-delay:0s}.szf[data-caption=visible] .szf-facts{transition-delay:.18s}.szf[data-phase=settled] .szf-more{transition-delay:.38s}
:root body #result-modal.has-city:has(.szf[data-phase=settled]) .result-actions{transition-delay:.42s}
@media(min-width:761px){.szf{padding-top:40px}.szf-title{font-size:clamp(52px,5.4vw,76px)}.szf-city{width:min(100%,calc((100dvh - 520px) * 2.56),900px);min-width:min(100%,520px);margin:0}.szf-sky{min-height:clamp(130px,22vh,340px)}}
@media(max-height:700px) and (max-width:760px){.szf{padding-top:calc(40px + env(safe-area-inset-top))}.szf-title{font-size:clamp(36px,11vw,60px)}.szf-sky{min-height:96px}.szf-more button{min-height:36px}}
@media(prefers-reduced-motion:reduce){:root body #result-modal.has-city{animation:none}.szf :is(.szf-head>*,.szf-vine,.szf-more),:root body #result-modal.has-city .result-actions{transition:none!important}}
