/* TriCity Tycoon: the Winner's Finale + results card (finale-1128, public/finale.js). Own file so it never collides with
 * theme.css / shapes.css work on other branches. Plates are chamfered or notched (clip-path), never rounded pills. */
#endScreen.fx-end { --gold: #f2b632; --gold2: #ffd76a; --gold3: #fff1b8; --ink: #f7efd9; --hero: var(--font-hero, 'Lilita One', Fredoka, sans-serif); --ui: Nunito, system-ui, sans-serif;
  position: fixed; inset: 0; z-index: 6000; overflow: hidden; background: #070b22; color: var(--ink); font-family: var(--ui); -webkit-font-smoothing: antialiased; touch-action: manipulation; }
.fx-end * { box-sizing: border-box; }

/* ---------- the stage: the winning city at night (real board art), moved by a camera */
.fx-scene { position: absolute; inset: 0; overflow: hidden; }
.fx-layer { position: absolute; inset: 0; }
.fx-world { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }
.fx-board { position: absolute; inset: 0; width: 100%; height: 100%; user-select: none; }
.fx-own { position: absolute; border-radius: 50%; mix-blend-mode: screen; transform: translate(-50%, -50%); opacity: 0; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--c) 55%, #fff) 0%, var(--c) 40%, color-mix(in srgb, var(--c) 40%, transparent) 64%, transparent); }
.fx-bld { position: absolute; pointer-events: none; }
.fx-bld img { display: block; width: 100%; height: 100%; filter: drop-shadow(0 6px 4px rgba(0,0,0,.45)); }
.fx-sky { position: absolute; left: 0; right: 0; top: 0; pointer-events: none; mix-blend-mode: screen; opacity: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 226, 150, 0) 38%, rgba(255, 226, 150, .7) 48%, rgba(255, 240, 200, .85) 50%, rgba(255, 226, 150, .7) 52%, transparent 62%) 0 0 / 300% 100% no-repeat;
  -webkit-mask: linear-gradient(#000 0 70%, transparent); mask: linear-gradient(#000 0 70%, transparent); }
.fx-skyglow { position: absolute; left: 5%; right: 5%; top: -6%; border-radius: 50%; opacity: 0; pointer-events: none; mix-blend-mode: screen; background: radial-gradient(closest-side, rgba(255, 210, 120, .5), transparent); }
.fx-night { position: absolute; inset: 0; opacity: 0; pointer-events: none; background: radial-gradient(ellipse 70% 60% at 50% 45%, rgba(6, 9, 30, .15), rgba(4, 6, 20, .85) 100%), rgba(6, 10, 34, .35); }
.fx-flash { position: absolute; inset: 0; opacity: 0; pointer-events: none; background: radial-gradient(circle at 50% 40%, #fff6d8, rgba(255, 214, 120, .6) 40%, transparent 75%); }
.fx-beam { position: absolute; top: -10vh; width: 30vmin; height: 140vh; transform-origin: 50% 0; pointer-events: none; mix-blend-mode: screen; opacity: 0;
  background: linear-gradient(180deg, rgba(255, 244, 214, .5), rgba(255, 230, 170, .2) 60%, rgba(255, 230, 170, 0)); clip-path: polygon(44% 0, 56% 0, 100% 100%, 0 100%); }
.fx-beam.l { left: calc(12vw - 15vmin); } .fx-beam.r { right: calc(12vw - 15vmin); }
.fx-pool { position: absolute; border-radius: 50%; transform: translate(-50%, -50%); opacity: 0; pointer-events: none; mix-blend-mode: screen; background: radial-gradient(closest-side, rgba(255, 238, 190, .75), rgba(255, 220, 150, .2) 70%, transparent); }
.fx-rays { position: absolute; width: 150vmax; aspect-ratio: 1; transform: translate(-50%, -50%); pointer-events: none; opacity: 0; mix-blend-mode: screen;
  background: repeating-conic-gradient(from 0deg, rgba(255, 220, 130, .26) 0 6deg, transparent 6deg 15deg); -webkit-mask: radial-gradient(closest-side, #000 8%, transparent 70%); mask: radial-gradient(closest-side, #000 8%, transparent 70%); }
/* finale2-1128 (no radius): the stage apron is a chamfered plate - a brass edge (gold over bronze) above the navy floor, drawn as
   three clipped layers instead of a rounded top; the warm glow is a drop-shadow so the clip does not cut it */
.fx-stagefloor { position: absolute; left: -5vw; right: -5vw; bottom: -2px; opacity: 0; border-radius: 0; filter: drop-shadow(0 -18px 30px rgba(255, 200, 90, .16));
  --ch: polygon(56px 0, calc(100% - 56px) 0, 100% 40px, 100% 100%, 0 100%, 0 40px); }
.fx-stagefloor::before, .fx-stagefloor::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; clip-path: var(--ch); border-radius: 0; }
.fx-stagefloor::before { top: 0; background: linear-gradient(180deg, #ffd76a 0 2px, #8a5a12 2px); }
.fx-stagefloor::after { top: 6px; background: linear-gradient(180deg, rgba(22, 34, 66, .97), rgba(10, 12, 34, .99) 50%); }

/* ---------- tokens + their name plates (notched plates, no pills) */
.fx-tok { position: absolute; transform: translate(-50%, -100%); transform-origin: 50% 100%; opacity: 0; }
.fx-tok img { display: block; width: 100%; user-select: none; filter: drop-shadow(0 10px 8px rgba(0,0,0,.6)); }
.fx-tok.me img { filter: drop-shadow(0 0 6px color-mix(in srgb, var(--pc) 80%, #fff)) drop-shadow(0 10px 8px rgba(0,0,0,.6)); }
.fx-tag { position: absolute; left: 50%; top: calc(100% + 6px); transform: translateX(-50%); transform-origin: 50% 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  padding: 3px 10px 4px; font: 400 clamp(12px, 3.2vw, 15px)/1.25 var(--hero); letter-spacing: .02em; color: #fff;
  background: rgba(10, 14, 40, .86); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--pc) 75%, #fff);
  clip-path: polygon(7px 0, calc(100% - 7px) 0, 100% 50%, calc(100% - 7px) 100%, 7px 100%, 0 50%); }
.fx-l .fx-tag { font-size: clamp(13px, 1.3vw, 19px); }
.fx-podtok { opacity: 0; }

/* ---------- the gold plinth */
.fx-plinth { position: absolute; transform: translateX(-50%); transform-origin: 50% 100%; opacity: 0;
  background: linear-gradient(90deg, #6e4208, #f6c33a 22%, #fff1b8 34%, #e9b02a 50%, #8a5a12 78%, #5e3a08); box-shadow: 0 0 60px rgba(255, 200, 90, .4), inset 0 3px 0 #fff3c4;
  clip-path: polygon(0 10px, 10px 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%); }
.fx-plinth.tie { background: linear-gradient(90deg, #6e4208, #f6c33a 25%, #fff1b8 40%, #e9b02a 55%, #8a5a12 85%); }
.fx-plinth b { position: absolute; left: 0; right: 0; top: 14px; text-align: center; font: 400 calc(var(--ts) * .55) var(--hero); color: #1c0e00; text-shadow: 0 2px 0 #fff3c4; }

/* ---------- Bix (canon poses, only scaled; never mirrored, never redrawn) */
.fx-bix { position: absolute; transform-origin: 50% 100%; pointer-events: none; }
.fx-pose { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); height: 100%; opacity: 0; user-select: none; filter: drop-shadow(0 14px 12px rgba(0,0,0,.5)); }
.fx-bshadow { position: absolute; left: 12%; right: 12%; bottom: -3%; height: 8%; border-radius: 50%; opacity: 0; background: radial-gradient(closest-side, rgba(0,0,0,.55), transparent); }
.fx-slip { position: absolute; transform: translate(-50%, -50%); opacity: 0; pointer-events: none; background: linear-gradient(180deg, #fffdf4, #f4e7c4); box-shadow: inset 0 0 0 2px #e3a521, 0 6px 14px rgba(0,0,0,.35);
  clip-path: polygon(6px 0, calc(100% - 6px) 0, 100% 6px, 100% calc(100% - 6px), calc(100% - 6px) 100%, 6px 100%, 0 calc(100% - 6px), 0 6px); }
.fx-slip i { position: absolute; left: 18%; right: 18%; top: 38%; height: 10%; background: #e3a521; opacity: .55; }
.fx-say { position: absolute; padding: 10px 14px; border-radius: 0; color: #1d2436; font: 900 clamp(14px, 3.9vw, 17px)/1.2 var(--ui); opacity: 0; width: max-content; isolation: isolate;
  filter: drop-shadow(0 8px 10px rgba(0,0,0,.4)); }
/* finale2-1128 (no radius): Bix's speech plate is a chamfered cream plate with the gold keyline, drawn 9-slice so the corners stay crisp at any size */
.fx-say::before { content: ''; position: absolute; inset: 0; z-index: -1; border: 9px solid transparent; border-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30'%3E%3Cpolygon points='1,8 8,1 22,1 29,8 29,22 22,29 8,29 1,22' fill='%23fffaf0' stroke='%23f2b632' stroke-width='2'/%3E%3C/svg%3E") 9 fill / 9px stretch; }
.fx-say.right { transform-origin: 0 30%; } .fx-say.right::after { content: ''; position: absolute; left: -9px; top: 16px; border: 9px solid transparent; border-right-color: #fffaf0; border-left: 0; }
.fx-say.up { transform-origin: 0 100%; font-size: clamp(15px, 1.5vw, 22px); } .fx-say.up::after { content: ''; position: absolute; left: 26px; bottom: -10px; border: 10px solid transparent; border-top-color: #fffaf0; border-bottom: 0; }
.fx-fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

/* ---------- the name card */
.fx-name { position: absolute; left: 50%; transform: translateX(-50%); text-align: center; width: min(92vw, 980px); opacity: 0; pointer-events: none; overflow: hidden; }
.fx-kick { display: inline-block; padding: 6px 28px 8px; font: 400 clamp(13px, 1.7vw, 22px) var(--hero); letter-spacing: .16em; color: #3b1d00;
  background: linear-gradient(180deg, #fff0a8, #f6c33a 50%, #d48a12); clip-path: polygon(14px 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 14px 100%, 0 50%); }
.fx-name h1 { margin: 6px 0 0; padding: 0 6px; font: 400 clamp(40px, 7.2vw, 104px)/1.05 var(--hero); letter-spacing: .01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: linear-gradient(180deg, #fffbe6 8%, #ffd45a 52%, #f29a17 92%); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 3px 0 #8a4a06) drop-shadow(0 8px 14px rgba(0,0,0,.6)); }
.fx-name h1.long { font-size: clamp(28px, 5vw, 76px); }
.fx-namesub { margin-top: 6px; font: 800 clamp(12px, 1.3vw, 18px) var(--ui); color: #fff3d6; letter-spacing: .05em;
  /* finale3-1128: the line sits straight on the lit city; the winner's set-colour glows (Champagne, Sage, Rose Quartz) are lighter than
     the old piece-colour ones, so a soft night halo keeps it >= 4.5:1 (was 4.47 at 360 over the fireworks) */
  text-shadow: 0 1px 3px #000, 0 0 6px rgba(4, 6, 20, .9), 0 0 14px rgba(4, 6, 20, .75); }
.fx-p .fx-name h1 { font-size: clamp(34px, 11vw, 52px); } .fx-p .fx-name h1.long { font-size: clamp(24px, 7.2vw, 34px); }
.fx-p .fx-kick { font-size: 13px; padding: 5px 22px 6px; }
.fx-skip { position: absolute; right: max(12px, env(safe-area-inset-right)); top: max(10px, env(safe-area-inset-top)); min-width: 88px; min-height: 44px; padding: 0 18px; border: 0; cursor: pointer;
  background: rgba(8, 12, 36, .72); color: #ffe9a8; font: 900 15px var(--ui); letter-spacing: .04em; box-shadow: inset 0 0 0 1.5px rgba(255, 214, 120, .55);
  clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 8px, 100% calc(100% - 8px), calc(100% - 8px) 100%, 8px 100%, 0 calc(100% - 8px), 0 8px); }
.fx-skip small { opacity: .75; font-weight: 800; font-size: 16px; }
.fx-skip:focus-visible { outline: 2px solid #ffe9a8; outline-offset: 2px; }

/* ---------- the results card */
.fx-cardwrap { position: absolute; inset: 0; display: grid; place-items: center; padding: max(14px, env(safe-area-inset-top)) 18px max(14px, env(safe-area-inset-bottom)); opacity: 0; pointer-events: none;
  background: radial-gradient(ellipse 80% 70% at 50% 40%, rgba(6, 10, 24, .55), rgba(3, 5, 12, .92)); }
.fx-cardwrap.live { pointer-events: auto; }
.fx-rc { position: relative; width: min(1180px, 100%); max-height: 100%; overflow-y: auto; overscroll-behavior: contain; padding: 22px 30px 20px;
  background: var(--shpat, linear-gradient(transparent, transparent)), var(--sh); box-shadow: 0 30px 80px rgba(0,0,0,.6), inset 0 0 0 2px var(--rimc), inset 0 0 0 4px rgba(0, 0, 0, .35), inset 0 0 0 5px var(--rimc2);
  clip-path: polygon(18px 0, calc(100% - 18px) 0, 100% 18px, 100% calc(100% - 18px), calc(100% - 18px) 100%, 18px 100%, 0 calc(100% - 18px), 0 18px); }
.fx-rc:focus { outline: none; }
.fx-rc-head, .fx-rc-body, .fx-actrow, .fx-more { position: relative; z-index: 1; }
.fx-rc-head { text-align: center; padding-top: 10px; }
/* the winning city's skyline (art/dest crop of its board painting) behind the head, fading into the shell */
.fx-rc-art { position: absolute; left: 5px; right: 5px; top: 5px; height: 210px; z-index: 0; pointer-events: none; background-size: cover; background-position: center 42%; filter: saturate(.95) brightness(.8);
  -webkit-mask: linear-gradient(180deg, #000 30%, rgba(0, 0, 0, .55) 62%, transparent 100%); mask: linear-gradient(180deg, #000 30%, rgba(0, 0, 0, .55) 62%, transparent 100%); }
.fx-rc-art::after { content: ''; position: absolute; inset: -1px; background: linear-gradient(180deg, color-mix(in srgb, var(--shtop) 48%, transparent), color-mix(in srgb, var(--shtop) 70%, transparent) 70%); }
.fx-cityplate { position: absolute; left: 50%; top: -10px; transform: translateX(-50%); z-index: 2; white-space: nowrap; padding: 3px 18px 4px; font: 400 11px/1 var(--hero); letter-spacing: .3em; text-indent: .3em; text-transform: uppercase; color: var(--cp-ink); background: var(--cp-bg); box-shadow: var(--cp-sh);
  text-shadow: var(--cp-ts, none); clip-path: polygon(7px 0, calc(100% - 7px) 0, 100% 7px, 100% calc(100% - 7px), calc(100% - 7px) 100%, 7px 100%, 0 calc(100% - 7px), 0 7px); }
.fx-ribbon { display: inline-block; padding: 5px 26px 7px; font: 400 15px var(--hero); letter-spacing: .14em; color: var(--rb-ink, #3b1d00); background: var(--rb-bg, linear-gradient(180deg, #fff0a8, #f6c33a 50%, #d48a12));
  clip-path: polygon(12px 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 12px 100%, 0 50%); }
.fx-title { margin: 6px 0 0; font: 400 clamp(30px, 4.2vw, 54px)/1.05 var(--hero); background: linear-gradient(180deg, #fffbe6 10%, #ffd45a 55%, #f29a17 90%); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 2px 0 #7a3f06); }
.fx-rc.lose .fx-title { background: linear-gradient(180deg, #ffffff 10%, #d9e1f2 55%, #9aa7c4 90%); -webkit-background-clip: text; background-clip: text; filter: drop-shadow(0 2px 0 #39425e); }
.fx-sub { margin-top: 4px; font: 800 14px/1.35 var(--ui); color: var(--ink2); letter-spacing: .02em; text-shadow: 0 1px 3px rgba(0, 0, 0, .8); }
.fx-rc-body { display: grid; grid-template-columns: 1.05fr 1fr; gap: 26px; margin-top: 14px; align-items: start; }
.fx-podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; align-items: end; gap: 10px; height: 300px; padding: 0 4px; }
.fx-podium.n2 { grid-template-columns: 1fr 1.15fr; } .fx-podium.n1 { grid-template-columns: 1fr; width: 50%; margin: 0 auto; }
.fx-pd { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; }
.fx-pd-top { display: flex; flex-direction: column; align-items: center; width: 100%; min-width: 0; }
.fx-pt { width: 70%; max-width: 116px; user-select: none; filter: drop-shadow(0 8px 8px rgba(0,0,0,.55)); }
.fx-pd.s1 .fx-pt { width: 84%; max-width: 150px; }
.fx-pd.me .fx-pt { filter: drop-shadow(0 0 0 transparent) drop-shadow(0 0 8px #8fe6ff) drop-shadow(0 8px 8px rgba(0,0,0,.55)); }
.fx-pn { margin-top: 6px; font: 400 17px/1.15 var(--hero); text-align: center; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fx-pd.me .fx-pn { color: #8fe6ff; }
.fx-pw { font: 400 15px var(--hero); color: #ffe07a; }
.fx-pd.out .fx-pw { color: #cfc8b8; }
.fx-step { width: 100%; margin-top: 8px; display: grid; place-items: start center; padding-top: 6px; font: 400 30px var(--hero); color: #3b1d00; transform-origin: 50% 100%;
  box-shadow: inset 0 2px 0 rgba(255,255,255,.5), 0 10px 20px rgba(0,0,0,.35); clip-path: polygon(0 8px, 8px 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%); }
.fx-pd.s1 .fx-step { height: 92px; background: linear-gradient(180deg, #fff1b8, #f6c33a 40%, #d08e18); color: #2a1600; }   /* finale2-1128: ink >= 4.5:1 down the whole step */
.fx-pd.s2 .fx-step { height: 64px; background: linear-gradient(180deg, #ffffff, #c9d1e4 40%, #9ca6bc); color: #1a1f2c; }
.fx-pd.s3 .fx-step { height: 46px; background: linear-gradient(180deg, #ffe0c2, #dc955a 40%, #b06a32); color: #1f0c02; }
.fx-rc.tie .fx-pd.p1 .fx-step { height: 92px; background: linear-gradient(180deg, #fff1b8, #f6c33a 40%, #d08e18); color: #2a1600; }
.fx-pd[data-case] { cursor: pointer; }
.fx-rest { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.fx-rest li { display: grid; grid-template-columns: 32px 34px 1fr auto; gap: 8px; align-items: center; min-height: 44px; padding: 5px 12px 5px 6px; background: var(--plate); box-shadow: inset 0 0 0 1px var(--plate-rim); font: 400 16px var(--hero);
  clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 8px, 100% calc(100% - 8px), calc(100% - 8px) 100%, 8px 100%, 0 calc(100% - 8px), 0 8px); }
.fx-rest li .rk { display: grid; place-items: center; width: 30px; height: 30px; background: var(--rk-bg); color: var(--rk-ink); font-weight: 400; clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.fx-rest li img { width: 34px; } .fx-rest li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fx-rest li em { font-style: normal; color: #ffe07a; } .fx-rest li.out em { color: #cfc8b8; } .fx-rest li.me span { color: #8fe6ff; }
.fx-youbar { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 10px 14px; background: linear-gradient(90deg, rgba(201, 209, 228, .18), rgba(8, 12, 36, .4)); box-shadow: inset 0 0 0 1px rgba(201, 209, 228, .45);
  clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 10px, 100% calc(100% - 10px), calc(100% - 10px) 100%, 10px 100%, 0 calc(100% - 10px), 0 10px); }
.fx-youbar .rk { flex: none; width: 44px; height: 44px; display: grid; place-items: center; font: 400 22px var(--hero); color: #1a1f2c; background: radial-gradient(circle at 35% 30%, #fff, #dfe3ec 55%, #a9b0bf); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.fx-youbar b { font: 400 20px var(--hero); } .fx-youbar small { display: block; font: 700 12.5px var(--ui); color: var(--ink2); }
.fx-worth { margin-top: 12px; display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; padding: 12px 16px; background: var(--plate); box-shadow: inset 0 0 0 1.5px var(--brass), inset 0 0 0 3px rgba(0, 0, 0, .3), inset 0 0 0 4px rgba(255, 233, 160, .25);
  clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 10px, 100% calc(100% - 10px), calc(100% - 10px) 100%, 10px 100%, 0 calc(100% - 10px), 0 10px); }
.fx-lbl { font: 900 12px var(--ui); letter-spacing: .1em; text-transform: uppercase; color: var(--lbl); }
.fx-big { font: 400 clamp(34px, 4vw, 52px)/1.05 var(--hero); color: #fff1b8; text-shadow: 0 2px 0 #8a5a12, 0 0 24px rgba(255, 200, 80, .4); font-variant-numeric: tabular-nums; white-space: nowrap; }
.fx-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.fx-chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.fx-chip { display: inline-flex; align-items: baseline; gap: 4px; padding: 6px 12px; background: linear-gradient(180deg, rgba(255, 220, 140, .2), rgba(120, 78, 18, .28)); box-shadow: inset 0 0 0 1.5px var(--brass); font: 800 13px var(--ui); color: #fbf1dc; white-space: nowrap;
  clip-path: polygon(6px 0, calc(100% - 6px) 0, 100% 50%, calc(100% - 6px) 100%, 6px 100%, 0 50%); }
.fx-chip b { font: 400 16px var(--hero); color: #fff1b8; } .fx-chip small { font: inherit; }
.fx-sec { margin-bottom: 14px; }
.fx-sec h4 { margin: 0 0 8px; font: 900 12px var(--ui); letter-spacing: .12em; text-transform: uppercase; color: var(--lbl); display: flex; align-items: center; gap: 8px; }
.fx-sec h4::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, var(--acc), transparent); }
.fx-medals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.fx-medal { display: flex; flex-direction: column; align-items: center; text-align: center; perspective: 500px; min-width: 0; }
.fx-coin { position: relative; width: 80px; height: 80px; transform-style: preserve-3d; }
.fx-coin > * { position: absolute; inset: 0; backface-visibility: hidden; border-radius: 50%; }
.fx-coin .face { display: grid; place-items: center; background: radial-gradient(circle at 35% 28%, #fff6c8, #f2b632 55%, #a46a12); box-shadow: 0 0 0 3px #ffe9a0, 0 0 0 6px #8a5410, 0 6px 14px rgba(0,0,0,.5); }
.fx-coin .face svg { width: 46%; height: 46%; }
.fx-coin .face .fx-sym { width: 88%; height: 88%; display: block; filter: drop-shadow(0 1px 1px rgba(0,0,0,.45)); }   /* celebrate-1129: brass & enamel face inside the same rim */
.fx-coin .back { transform: rotateY(180deg); background: radial-gradient(circle at 35% 28%, #9a7226, #5a3c10 60%, #2e1e06); box-shadow: 0 0 0 3px #c9963a, 0 0 0 6px #5e3a08; display: grid; place-items: center; color: #ffe3a0; font: 400 26px var(--hero); }
.fx-medal.lock .face { filter: saturate(.35) brightness(.5); box-shadow: 0 0 0 3px #a77a2a, 0 0 0 6px #4a2e08, 0 6px 14px rgba(0,0,0,.5); }
.fx-medal.crest .face { background: none; box-shadow: none; border-radius: 0; } .fx-medal.crest .face img { width: 100%; height: 100%; object-fit: contain; }
.fx-medal b { margin-top: 8px; font: 900 14px var(--ui); color: #fff; } .fx-medal small { font: 700 11.5px/1.25 var(--ui); color: var(--lbl); }
.fx-medal em { margin-top: 3px; font: 900 10.5px var(--ui); font-style: normal; letter-spacing: .1em; color: #ffd76a; text-transform: uppercase; } .fx-medal.lock em { color: var(--lbl); }
.fx-trophies { display: flex; gap: 8px; flex-wrap: wrap; }
.fx-tro { display: flex; align-items: center; gap: 9px; min-height: 52px; padding: 5px 12px 5px 6px; background: var(--plate); box-shadow: inset 0 0 0 1px var(--plate-rim); min-width: 0;
  clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 8px, 100% calc(100% - 8px), calc(100% - 8px) 100%, 8px 100%, 0 calc(100% - 8px), 0 8px); }
.fx-tro-art { flex: none; width: 44px; height: 44px; display: grid; place-items: center; } .fx-tro-art img, .fx-tro-art svg { width: 44px; height: 44px; object-fit: contain; }
.fx-tro b { display: block; font: 900 13px var(--ui); } .fx-tro small { font: 700 11px var(--ui); color: var(--lbl); }
.fx-actrow { display: flex; gap: 10px; justify-content: center; margin-top: 14px; flex-wrap: wrap; }
.fx-acts, .fx-acts2 { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.fx-btn { min-height: 48px; border: 0; padding: 0 26px; font: 400 19px var(--hero); letter-spacing: .02em; color: #3b1d00; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: linear-gradient(180deg, #fff0a8, #f6c33a 45%, #d48a12); box-shadow: inset 0 -4px 0 #8a5410, inset 0 2px 0 rgba(255,255,255,.6);
  clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 10px, 100% calc(100% - 10px), calc(100% - 10px) 100%, 10px 100%, 0 calc(100% - 10px), 0 10px); }
.fx-btn.glass { color: var(--b2-ink); background: var(--b2-bg); box-shadow: inset 0 -4px 0 var(--b2-edge), inset 0 0 0 1.5px var(--b2-rim); }
.fx-btn.wait { opacity: .65; cursor: default; }
.fx-btn.ghost { color: var(--gh-ink); background: var(--gh-bg); box-shadow: inset 0 0 0 1.5px var(--gh-rim); font-size: 16px; padding: 0 18px; }
.fx-btn.link { min-height: 44px; background: none; box-shadow: none; font: 800 14px var(--ui); color: var(--lbl); text-decoration: underline; text-underline-offset: 3px; padding: 0 12px; clip-path: none; }
.fx-btn svg { width: 18px; height: 18px; }
.fx-btn:focus-visible { outline: 3px solid #8fe6ff; outline-offset: 2px; }
.fx-more { display: flex; justify-content: center; gap: 6px; margin-top: 4px; flex-wrap: wrap; }

/* ---------- the winner's city (Anton 2026-11-28 09:09 "that purple is bothering me, custom TriCity"): the card takes the materials
   of the city the game was won in. Shell walnut or deep navy, never purple; colours from the board art and theme.css. */
#endScreen.fx-end { --brass: #d9a441;
  /* Goldspire (default): deep navy, emerald plates, gold leaf and cream marble */
  --sh: radial-gradient(120% 45% at 50% 0%, rgba(22, 120, 84, .22), transparent 70%), linear-gradient(172deg, #132a4c, #0b1b36 55%, #07101f);
  --shtop: #112644; --shend: #08111f; --rimc: #e2b84a; --rimc2: rgba(255, 241, 184, .35);
  --plate: linear-gradient(180deg, rgba(16, 84, 62, .82), rgba(9, 48, 37, .9)); --plate-rim: rgba(226, 184, 74, .45);
  --acc: rgba(226, 184, 74, .7); --lbl: #f1dfa8; --ink2: #f3ead2; --rk-bg: #0f5a42; --rk-ink: #fff1b8;
  --b2-bg: linear-gradient(180deg, #176c4d, #0b4231); --b2-ink: #fff1b8; --b2-edge: #062a1e; --b2-rim: rgba(255, 214, 120, .6);
  --gh-ink: #f3e3b3; --gh-bg: rgba(16, 84, 62, .28); --gh-rim: rgba(226, 184, 74, .55);
  --cp-ink: #0b4632; --cp-bg: linear-gradient(118deg, transparent 36%, rgba(120, 110, 95, .28) 38%, transparent 41%), linear-gradient(64deg, transparent 62%, rgba(120, 110, 95, .18) 63.5%, transparent 66%), linear-gradient(180deg, #fffcf4, #e9dfc8);
  --cp-sh: inset 0 0 0 1.5px #c9a23a, inset 0 0 0 3px #fff6d0; }
#endScreen.fx-end[data-city="ironbrook"] { --brass: #e0a060;
  --sh: linear-gradient(172deg, #4b2617, #2e160c 55%, #1c0e07);
  --shpat: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='32'%3E%3Cg fill='none' stroke='%23000' stroke-opacity='.28' stroke-width='2'%3E%3Cpath d='M0 1H64M0 17H64M16 1V17M48 17V32'/%3E%3C/g%3E%3C/svg%3E");
  --shtop: #45230f; --shend: #1f0f08; --rimc: #d98a4c; --rimc2: rgba(255, 210, 170, .32);
  --plate: linear-gradient(180deg, rgba(62, 66, 73, .94), rgba(35, 38, 43, .96)); --plate-rim: rgba(224, 160, 96, .5);
  --acc: rgba(232, 150, 90, .75); --lbl: #f4d3b4; --ink2: #f6e2cf; --rk-bg: #6a3a18; --rk-ink: #ffe2c4;
  --b2-bg: linear-gradient(180deg, #5b626c, #2d3138); --b2-ink: #ffe2c4; --b2-edge: #141619; --b2-rim: rgba(232, 150, 90, .7);
  --gh-ink: #f6dcc4; --gh-bg: rgba(40, 44, 50, .45); --gh-rim: rgba(224, 140, 80, .6);
  --rb-bg: linear-gradient(180deg, #ffe0c0, #ec9c5c 50%, #c27236); --rb-ink: #2a1206;
  --cp-ink: #ffdcb8; --cp-bg: radial-gradient(circle at 8px 50%, #f0b98a 0 2px, #5a3418 2.6px, transparent 3.2px), radial-gradient(circle at calc(100% - 8px) 50%, #f0b98a 0 2px, #5a3418 2.6px, transparent 3.2px), linear-gradient(180deg, #5d636c, #2f3339);
  --cp-sh: inset 0 0 0 1.5px #c27236, inset 0 2px 0 rgba(255, 255, 255, .14); }
#endScreen.fx-end[data-city="nexus"] { --brass: #d9a441;
  --sh: radial-gradient(120% 45% at 50% 0%, rgba(70, 216, 255, .16), transparent 70%), linear-gradient(172deg, #0a1f42, #061430 55%, #030a1c);
  --shpat: repeating-linear-gradient(0deg, rgba(95, 243, 255, .04) 0 1px, transparent 1px 4px);
  --shtop: #0a1e40; --shend: #040c20; --rimc: #46d8ff; --rimc2: rgba(184, 249, 255, .35);
  --plate: linear-gradient(180deg, rgba(14, 48, 86, .88), rgba(6, 24, 50, .92)); --plate-rim: rgba(95, 243, 255, .45);
  --acc: rgba(95, 243, 255, .7); --lbl: #a9f1ff; --ink2: #dcf7ff; --rk-bg: #0c4466; --rk-ink: #c8f8ff;
  --b2-bg: linear-gradient(180deg, #14607f, #0a304d); --b2-ink: #e6fbff; --b2-edge: #031827; --b2-rim: rgba(95, 243, 255, .7);
  --gh-ink: #c8f6ff; --gh-bg: rgba(95, 243, 255, .07); --gh-rim: rgba(95, 243, 255, .5);
  --rb-bg: linear-gradient(180deg, #e2fdff, #6fefff 50%, #2bb8d8); --rb-ink: #031c2a;
  --cp-ink: #9ff7ff; --cp-ts: 0 0 6px rgba(95, 243, 255, .65); --cp-bg: repeating-linear-gradient(0deg, rgba(95, 243, 255, .08) 0 1px, transparent 1px 3px), linear-gradient(180deg, rgba(22, 76, 118, .95), rgba(6, 26, 56, .97));
  --cp-sh: inset 0 0 0 1.5px #46d8ff, inset 0 0 10px rgba(70, 216, 255, .35); }
/* the podium in the city's materials (places keep their gold / silver / bronze read) */
[data-city="goldspire"] .fx-pd .fx-step::after, [data-city="ironbrook"] .fx-pd .fx-step::after, [data-city="nexus"] .fx-pd .fx-step::after { content: ''; position: absolute; inset: 0; pointer-events: none; }
.fx-step { position: relative; }
.fx-step .rk { position: relative; z-index: 1; }
[data-city="goldspire"] .fx-pd .fx-step::after { background: linear-gradient(112deg, transparent 22%, rgba(120, 100, 70, .1) 23%, transparent 25%, transparent 61%, rgba(120, 100, 70, .08) 62%, transparent 63.5%), linear-gradient(28deg, transparent 70%, rgba(255, 255, 255, .22) 71%, transparent 73%); box-shadow: inset 0 3px 0 #fff6d0, inset 0 5px 0 #c9a23a; }
[data-city="goldspire"] .fx-pd.s2 .fx-step { background: linear-gradient(180deg, #fffcf4, #e9dfc8 45%, #b9ab8c); color: #3a2a0c; }
[data-city="ironbrook"] .fx-pd .fx-step::after { background: radial-gradient(circle at 12px 14px, #ffe0c0 0 2px, #4a2a12 2.8px, transparent 3.4px), radial-gradient(circle at calc(100% - 12px) 14px, #ffe0c0 0 2px, #4a2a12 2.8px, transparent 3.4px); box-shadow: inset 0 4px 0 #c27236; }
[data-city="ironbrook"] .fx-pd.s2 .fx-step { background: linear-gradient(180deg, #eef0f2, #a9aeb5 40%, #5b6169); color: #1d2026; }
[data-city="ironbrook"] .fx-pd.s3 .fx-step { background: linear-gradient(180deg, #ffd6b0, #d07c40 40%, #7a4016); color: #2a1206; }
[data-city="nexus"] .fx-pd .fx-step { background: linear-gradient(180deg, rgba(30, 90, 140, .92), rgba(8, 30, 62, .96)) !important; }
[data-city="nexus"] .fx-pd .fx-step::after { background: repeating-linear-gradient(0deg, rgba(95, 243, 255, .07) 0 1px, transparent 1px 4px); box-shadow: inset 0 0 0 2px var(--tier), inset 0 0 18px color-mix(in srgb, var(--tier) 45%, transparent); }
[data-city="nexus"] .fx-pd.s1 .fx-step { --tier: #ffd76a; color: #ffe27a; } [data-city="nexus"] .fx-pd.s2 .fx-step { --tier: #dfe8f5; color: #eef4ff; } [data-city="nexus"] .fx-pd.s3 .fx-step { --tier: #f0a062; color: #ffcb9c; }
[data-city="nexus"] .fx-pd .fx-step .rk { text-shadow: 0 0 10px color-mix(in srgb, var(--tier) 70%, transparent); }
[data-city="nexus"] .fx-rc.tie .fx-pd.p1 .fx-step { --tier: #ffd76a; color: #ffe27a; }

/* ---------- phone: one column, scrolls; Play again + Share stay in a bar at the bottom */
.fx-p .fx-cardwrap { padding: max(10px, env(safe-area-inset-top)) 10px max(10px, env(safe-area-inset-bottom)); }
.fx-p .fx-rc { height: 100%; padding: 16px 14px 0; }
.fx-p .fx-rc-art { height: 168px; }
.fx-p .fx-title { font-size: clamp(26px, 8vw, 34px); }
.fx-p .fx-ribbon { font-size: 12px; letter-spacing: .1em; padding: 5px 20px 6px; }
.fx-p .fx-sub { font-size: 12.5px; }
.fx-p .fx-rc-body { grid-template-columns: 1fr; gap: 12px; margin-top: 8px; }
.fx-p .fx-podium { height: 220px; gap: 8px; }
.fx-p .fx-pn { font-size: 14px; } .fx-p .fx-pw { font-size: 13px; }
.fx-p .fx-pd.s1 .fx-step { height: 70px; } .fx-p .fx-pd.s2 .fx-step { height: 48px; } .fx-p .fx-pd.s3 .fx-step { height: 34px; }
.fx-p .fx-rc.tie .fx-pd.p1 .fx-step { height: 70px; }
.fx-p .fx-pd.s2 .fx-step, .fx-p .fx-pd.s3 .fx-step { font-size: 24px; padding-top: 3px; }
.fx-p .fx-worth { grid-template-columns: 1fr; gap: 8px; text-align: center; padding: 10px; }
.fx-p .fx-chips { justify-content: center; }
.fx-p .fx-coin { width: 60px; height: 60px; } .fx-p .fx-medal small { display: none; }
.fx-p .fx-trophies { display: grid; grid-template-columns: 1fr 1fr; }
.fx-p .fx-tro small { display: block; }
.fx-p .fx-actrow { display: flex; flex-direction: column-reverse; gap: 8px; margin-top: -2988px; pointer-events: none; }
/* an invisible, click-through spacer at the top of the row (::after lands on top in column-reverse) so the sticky Play again /
   Share bar always has room inside its row to stay pinned to the bottom of the card, however long the card above it is */
.fx-p .fx-actrow::after { content: ''; flex: none; height: 3000px; margin-bottom: -8px; }
.fx-p .fx-actrow > * { pointer-events: auto; }
.fx-p .fx-acts2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fx-p .fx-acts { position: sticky; bottom: 0; z-index: 2; margin: 0 -14px; padding: 12px 12px max(14px, env(safe-area-inset-bottom)); background: linear-gradient(180deg, color-mix(in srgb, var(--shend) 0%, transparent), color-mix(in srgb, var(--shend) 97%, transparent) 24%); display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fx-p .fx-acts .fx-btn, .fx-p .fx-acts2 .fx-btn { padding: 0 8px; font-size: 17px; }
.fx-p .fx-acts2 .fx-btn.ghost { font-size: 15px; }
.fx-p .fx-more { padding-bottom: 6px; }

@media (min-width: 1100px) and (min-height: 760px) {
  .fx-rc { padding: 26px 40px 22px; } .fx-title { font-size: 58px; } .fx-rc-head { padding-top: 15px; } .fx-cityplate { font-size: 14px; padding: 4px 24px 5px; top: -12px; } .fx-sub { font-size: 15px; } .fx-ribbon { font-size: 17px; }
  .fx-podium { height: 330px; } .fx-pn { font-size: 20px; } .fx-pw { font-size: 18px; } .fx-pt { max-width: 136px; } .fx-pd.s1 .fx-pt { max-width: 166px; }
  .fx-coin { width: 94px; height: 94px; } .fx-medal b { font-size: 16px; } .fx-medal small { font-size: 13px; }
  .fx-tro-art, .fx-tro-art img, .fx-tro-art svg { width: 54px; height: 54px; } .fx-tro b { font-size: 15px; } .fx-tro small { font-size: 12.5px; }
  .fx-sec { margin-bottom: 18px; } .fx-big { font-size: 56px; } .fx-chip { font-size: 14px; }
  .fx-btn { font-size: 21px; padding: 0 30px; min-height: 54px; }
}
@media (prefers-reduced-motion: reduce) { .fx-end * { scroll-behavior: auto !important; } }
