/* "What's inside your Christmas snow globe?" (docs/christmas-snow-globe/DIRECTORS-SCRIPT.md, option B): a midnight velvet
   room with fairy-light bokeh, the crystal globe as the hero of every screen, gold accents, a frosted night panel.
   Shared look (buttons, share block, bubbles, loader): core.css. Pictures carry their own sizes; CSS places them. */
.xm-globe {
  --velvet: #1A1433; --velvet2: #2A1F4E; --velvet3: #120D24; --glow: #FFD98A; --frost: rgba(255,255,255,.08);
  --glass-rim: rgba(255,255,255,.55); --gold-hi: #FFF1B8; --rose: #FF8FB8;
}
/* the engine's characters (core.js character()): every game's stylesheet carries these */
.xm-char { position: relative; flex: none; transform-origin: 50% 100%; }
.xm-char img { display: block; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 6px 6px rgba(0,0,0,.28)); -webkit-user-drag: none; user-select: none; }
.xm-char img.is-art { object-position: 50% 100%; transform-origin: 50% 100%; animation: xm-breathe 2.8s ease-in-out infinite; }
.xm-char.is-mirrored { scale: -1 1; }
@keyframes xm-breathe { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.018, .982); } }
@media (prefers-reduced-motion: reduce) { .xm-char img.is-art { animation: none; } }
.xm-hat { position: absolute; z-index: 1; height: auto; pointer-events: none; filter: drop-shadow(0 2px 2px rgba(0,0,0,.25)); }
.xm-globe .xm-stage { background: radial-gradient(130% 70% at 50% 10%, var(--velvet2) 0%, var(--velvet) 46%, var(--velvet3) 100%); }
.xm-globe .xm-stage::before { opacity: .35; }

/* ── the room: velvet, a window of falling snow, warm bokeh lights ─────────────────────────────────────────────── */
.sg-room { position: relative; flex: none; overflow: hidden; display: flex; flex-direction: column; align-items: center;
  min-height: 380px; height: 58vh; height: 58dvh; padding: calc(12px + env(safe-area-inset-top)) 14px 0;
  background:
    radial-gradient(60% 34% at 50% 58%, rgba(255,200,120,.22), rgba(255,200,120,0) 70%),
    radial-gradient(120% 80% at 50% 0%, #3A2A6A 0%, #24194A 45%, #150F2C 100%); }
.sg-room.is-tall { height: 66vh; height: 66dvh; min-height: 430px; }
.sg-room.is-full { height: auto; min-height: 100vh; min-height: 100dvh; }
.sg-room > .xm-top { position: relative; z-index: 6; width: 100%; }
/* the window behind: a cold blue pane with a soft frame, snow falling past it */
.sg-window { position: absolute; left: 50%; top: 9%; width: min(78%, 330px); aspect-ratio: 3 / 3.4; translate: -50% 0; border-radius: 48% 48% 10px 10px / 30% 30% 10px 10px;
  background: radial-gradient(70% 60% at 50% 30%, #5B7BC4 0%, #33478A 55%, #1E2A5A 100%);
  box-shadow: inset 0 0 0 7px rgba(255,236,200,.13), inset 0 0 40px rgba(0,0,0,.45), 0 0 60px rgba(120,150,255,.18); opacity: .62; overflow: hidden; }
.sg-window::before, .sg-window::after { content: ''; position: absolute; background: rgba(255,236,200,.13); }
.sg-window::before { left: 50%; top: 0; bottom: 0; width: 6px; translate: -50% 0; }
.sg-window::after { top: 46%; left: 0; right: 0; height: 6px; }
.sg-window .xm-snow { z-index: 1; }
/* the table the globe stands on: dark polished wood catching the glow */
.sg-table { position: absolute; left: -10%; right: -10%; bottom: 0; height: 22%; border-radius: 50% 50% 0 0 / 30% 30% 0 0;
  background: radial-gradient(60% 90% at 50% 0%, #5A3A2E 0%, #3A231C 45%, #1E120F 100%); box-shadow: inset 0 6px 18px rgba(255,190,120,.16); }
/* bokeh: soft out-of-focus fairy lights drifting slowly */
.sg-bokeh { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.sg-bokeh i { position: absolute; border-radius: 50%; filter: blur(1.5px); opacity: .0; animation: sg-bokeh 7s ease-in-out infinite; mix-blend-mode: screen; }
@keyframes sg-bokeh { 0%, 100% { opacity: .0; transform: translateY(6px) scale(.9); } 40%, 60% { opacity: var(--o, .55); transform: none; } }

/* ── the globe ──────────────────────────────────────────────────────────────────────────────────────────────── */
.sg-globe { position: relative; z-index: 3; width: var(--g, 240px); margin: auto auto 6%; flex: none; touch-action: manipulation;
  -webkit-user-select: none; user-select: none; cursor: pointer; }
.sg-globe.is-still { cursor: default; }
.sg-float { position: relative; animation: sg-float 5.5s ease-in-out infinite; }
@keyframes sg-float { 0%, 100% { transform: translateY(0) rotate(-.6deg); } 50% { transform: translateY(-6px) rotate(.6deg); } }
.sg-shadow { position: absolute; left: 6%; right: 6%; bottom: -5%; height: 12%; border-radius: 50%; background: radial-gradient(closest-side, rgba(0,0,0,.6), rgba(0,0,0,0)); }
.sg-halo { position: absolute; left: -16%; right: -16%; top: -12%; aspect-ratio: 1; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(255,226,150,.34), rgba(255,226,150,.08) 60%, rgba(255,226,150,0)); transition: opacity .6s; }
.sg-sphere { position: relative; z-index: 2; width: 100%; aspect-ratio: 1; border-radius: 50%; overflow: hidden; isolation: isolate;
  box-shadow: 0 0 0 2px rgba(255,255,255,.22), 0 18px 40px rgba(0,0,0,.45), inset 0 -18px 40px rgba(20,30,80,.35); transform: translateZ(0); }
.sg-world { position: absolute; inset: 0; border-radius: 50%; overflow: hidden; }
.sg-world > svg, .sg-world > img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: cover; }
.sg-flakes { position: absolute; inset: 0; z-index: 3; width: 100%; height: 100%; pointer-events: none; }
/* the glass: a soft rim, a big curved window reflection, a small hot spot, a cool edge tint */
.sg-glass { position: absolute; inset: 0; z-index: 5; border-radius: 50%; pointer-events: none;
  background:
    radial-gradient(18% 12% at 30% 22%, rgba(255,255,255,.9), rgba(255,255,255,0) 70%),
    radial-gradient(60% 60% at 32% 28%, rgba(255,255,255,.22), rgba(255,255,255,0) 60%),
    radial-gradient(closest-side, rgba(255,255,255,0) 78%, rgba(200,225,255,.22) 92%, rgba(255,255,255,.55) 100%);
  box-shadow: inset 0 0 0 1.5px var(--glass-rim), inset -10px -14px 30px rgba(120,160,255,.18), inset 10px 8px 24px rgba(255,255,255,.12); }
.sg-glass::before { content: ''; position: absolute; left: 13%; top: 12%; width: 30%; height: 46%; border-radius: 50%;
  border-left: 5px solid rgba(255,255,255,.5); border-top: 2px solid rgba(255,255,255,.18); rotate: 18deg; filter: blur(.6px); }
.sg-glass::after { content: ''; position: absolute; right: 14%; bottom: 16%; width: 16%; height: 10%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255,255,255,.45), rgba(255,255,255,0)); rotate: -30deg; }
/* the light sweeping across the glass now and then */
.sg-shine { position: absolute; inset: 0; z-index: 6; border-radius: 50%; overflow: hidden; pointer-events: none; }
.sg-shine::before { content: ''; position: absolute; top: -20%; bottom: -20%; width: 24%; left: -40%; rotate: 20deg;
  background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,.38), rgba(255,255,255,0)); animation: sg-shine 6.5s ease-in-out infinite 1.2s; }
@keyframes sg-shine { 0%, 72% { left: -40%; } 92%, 100% { left: 130%; } }
/* the wish inside: a golden glow resting in the snow */
.sg-wishglow { position: absolute; z-index: 4; left: 50%; top: 68%; width: 52%; aspect-ratio: 1; translate: -50% -50%; border-radius: 50%; pointer-events: none; opacity: 0;
  background: radial-gradient(closest-side, rgba(255,250,220,1), rgba(255,220,120,.8) 35%, rgba(255,190,80,0)); mix-blend-mode: screen; transition: opacity .8s; }
.sg-globe.is-wish .sg-wishglow { opacity: 1; animation: sg-pulse 2.4s ease-in-out infinite; }
@keyframes sg-pulse { 50% { transform: scale(1.18); opacity: .8; } }
.sg-wishglow i { position: absolute; inset: 30%; display: flex; align-items: center; justify-content: center; font-size: calc(var(--g, 240px) * .13); font-style: normal; filter: drop-shadow(0 0 6px rgba(255,240,190,1)); }
/* the empty globe (no scene yet): misty glass with a question mark of light */
.sg-mist { position: absolute; inset: 0; z-index: 1; display: flex; align-items: center; justify-content: center; border-radius: 50%;
  background: radial-gradient(60% 60% at 50% 40%, #6C83C8 0%, #3B4C8E 55%, #232D60 100%); color: rgba(255,255,255,.75);
  font: 800 calc(var(--g, 240px) * .3)/1 var(--title); text-shadow: 0 0 24px rgba(200,220,255,.8); transition: opacity .5s; }
.sg-mist span { animation: sg-breathe 2.6s ease-in-out infinite; }
@keyframes sg-breathe { 50% { opacity: .55; transform: scale(.94); } }
/* the cracks (drawn in code, one path per tap) */
.sg-cracks { position: absolute; inset: 0; z-index: 7; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.sg-cracks path { fill: none; stroke: #fff; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 2px rgba(170,210,255,.95)); }
.sg-cracks path.is-new { animation: sg-crack .22s ease-out both; }
@keyframes sg-crack { from { stroke-dashoffset: var(--len, 200); } to { stroke-dashoffset: 0; } }
.sg-globe.is-cracking .sg-sphere { box-shadow: 0 0 0 2px rgba(255,255,255,.3), 0 0 calc(10px + var(--heat, 0) * 40px) rgba(255,226,150,calc(.2 + var(--heat, 0) * .6)), 0 18px 40px rgba(0,0,0,.45); }
/* light leaking through the cracks as they spread */
.sg-leak { position: absolute; inset: 0; z-index: 4; border-radius: 50%; pointer-events: none; opacity: var(--heat, 0);
  background: radial-gradient(closest-side, rgba(255,242,200,.75), rgba(255,210,120,.25) 55%, rgba(255,210,120,0)); mix-blend-mode: screen; transition: opacity .2s; }
/* the base: an SVG plinth; the plate's name is real text over it */
.sg-base { position: relative; z-index: 1; width: 86%; margin: -11% auto 0; }
.sg-base svg { display: block; width: 100%; height: auto; overflow: visible; }
.sg-plate { position: absolute; left: 50%; top: 52%; width: 56%; translate: -50% -50%; text-align: center; font: 800 calc(var(--g, 240px) * .052)/1.1 var(--title);
  color: #5A3A12; text-shadow: 0 1px 0 rgba(255,255,255,.45); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: .2px; }
.sg-base[data-base="wood"] .sg-plate { color: #FFE8B8; text-shadow: 0 1px 0 rgba(0,0,0,.4); }
.sg-base[data-base="crystal"] .sg-plate { color: #2F5C86; text-shadow: 0 1px 0 rgba(255,255,255,.7); }
.sg-base[data-base="pastel"] .sg-plate { color: #8A3B66; }
.sg-base.is-new { animation: sg-base-in .55s cubic-bezier(.2,1.3,.4,1) both; }
@keyframes sg-base-in { from { transform: translateY(26px) scaleY(.8); opacity: 0; } }
.sg-world.is-new { animation: sg-world-in .6s cubic-bezier(.2,1.2,.4,1) both; }
@keyframes sg-world-in { from { transform: scale(1.25); opacity: 0; filter: blur(6px); } }
/* burst: the globe is gone, the light floods out */
.sg-globe.is-burst .sg-sphere, .sg-globe.is-burst .sg-glass { visibility: hidden; }
.sg-flood { position: absolute; z-index: 30; inset: 0; pointer-events: none; background: radial-gradient(closest-side, rgba(255,250,230,1), rgba(255,226,160,.7) 40%, rgba(255,210,120,0));
  animation: sg-flood 1.4s ease-out forwards; }
@keyframes sg-flood { 0% { opacity: 0; transform: scale(.3); } 14% { opacity: 1; } 100% { opacity: 0; transform: scale(2.4); } }
.sg-shards { position: absolute; inset: 0; z-index: 29; width: 100%; height: 100%; pointer-events: none; }

/* ── titles and words on the room ───────────────────────────────────────────────────────────────────────────── */
.sg-title { position: relative; z-index: 5; margin-top: 6px; }
.sg-title .xm-logo-top { font-size: clamp(19px, 6vw, 25px); }
.sg-title .xm-logo-main { font-size: clamp(30px, 10.2vw, 46px); color: var(--gold-hi); text-shadow: 0 0 24px rgba(255,214,110,.55); }
.sg-headline { position: relative; z-index: 5; margin: 8px 6px 0; text-align: center; font: 800 clamp(21px, 6.4vw, 27px)/1.15 var(--title); color: #fff;
  text-shadow: 0 2px 10px rgba(0,0,0,.45); text-wrap: balance; }
.sg-headline .xm-name { color: var(--gold-hi); }
.sg-lead { position: relative; z-index: 5; margin: 6px 10px 0; text-align: center; font-weight: 800; font-size: 16px; color: #E7DDFF; text-shadow: 0 1px 6px rgba(0,0,0,.4); }
.sg-host { position: absolute; z-index: 4; bottom: 4%; inset-inline-end: 2%; }
.sg-host.is-left { inset-inline-end: auto; inset-inline-start: 2%; }
.sg-room .xm-say { z-index: 8; }

/* ── the panel: frosted midnight glass, a gold hairline, snow on its edge ───────────────────────────────────── */
.xm-globe .xm-scene.is-staged { padding: 0; gap: 0; }
.xm-globe .xm-play { position: relative; z-index: 12; flex: 1 0 auto; margin-top: -26px; padding: 26px 16px calc(20px + env(safe-area-inset-bottom));
  border-radius: 28px 28px 0 0; display: flex; flex-direction: column; gap: 14px;
  background: linear-gradient(180deg, rgba(44,34,86,.97) 0%, rgba(26,20,52,.98) 60%, #140F2A 100%); color: #fff;
  box-shadow: 0 -12px 30px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,226,150,.45); transition: transform .55s cubic-bezier(.2,1.2,.4,1); }
.xm-globe .xm-play.is-hidden { position: absolute; left: 0; right: 0; bottom: 0; transform: translateY(calc(100% + 40px)); }
.xm-globe .xm-play .xm-sub { color: #D9D0F5; font-size: 16px; }
.xm-globe .xm-play .xm-small { color: #A99FD0; }
.xm-globe .xm-play .xm-h2 { color: #fff; font-size: clamp(22px, 6.6vw, 27px); }
.xm-globe .xm-play .xm-label { color: #fff; }
.xm-globe .xm-play .xm-error { color: #FFB4C8; }
.xm-globe .xm-play .xm-error:empty { min-height: 0; margin-top: -10px; }
.xm-globe .xm-play .xm-link { color: #CFC5F2; }
.xm-globe .xm-play .xm-btn.is-ghost { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.35); box-shadow: 0 4px 0 rgba(0,0,0,.35); }
.xm-globe .xm-play .xm-input { border-color: rgba(255,226,150,.5); }
.xm-globe .xm-play .xm-name { color: var(--gold-hi); }
.xm-globe .xm-btn.is-gold { background: linear-gradient(180deg, #FFF0B0 0%, #FFD45A 50%, #EFB52A 100%); box-shadow: 0 6px 0 #A9780E, 0 0 24px rgba(255,214,110,.35), 0 12px 22px rgba(0,0,0,.35); }
.sg-snowedge { position: absolute; left: 0; right: 0; top: -9px; height: 18px; pointer-events: none;
  background: radial-gradient(14px 10px at 8% 60%, #fff 60%, transparent 62%), radial-gradient(18px 11px at 22% 55%, #fff 60%, transparent 62%),
    radial-gradient(12px 9px at 37% 62%, #fff 60%, transparent 62%), radial-gradient(20px 12px at 53% 55%, #fff 60%, transparent 62%),
    radial-gradient(13px 9px at 68% 62%, #fff 60%, transparent 62%), radial-gradient(18px 11px at 83% 56%, #fff 60%, transparent 62%),
    radial-gradient(12px 9px at 95% 62%, #fff 60%, transparent 62%); opacity: .92; filter: drop-shadow(0 2px 2px rgba(0,0,0,.2)); }
.xm-steps { margin: 4px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.xm-step { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--frost); border: 2px solid rgba(255,255,255,.1);
  font-weight: 700; font-size: 15px; line-height: 1.35; color: #CFC5F2; }
.xm-step strong { color: #fff; }
.xm-step-n { flex: none; display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(180deg, #FFE27F, #EFB52A); color: var(--ink); font: 800 16px/1 var(--title); box-shadow: 0 3px 0 #A9780E; }

/* step dots of the build */
.sg-stepdots { display: flex; justify-content: center; gap: 7px; }
.sg-stepdots i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.22); transition: background .3s, width .3s; }
.sg-stepdots i.is-on { width: 24px; border-radius: 5px; background: var(--gold); }
.sg-stepdots i.is-done { background: var(--gold); }

/* the choice cards (scene, fall, base, wish) */
.sg-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.sg-choices.is-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sg-choice { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 6px; min-width: 0; padding: 9px 6px 10px;
  border: 2.5px solid rgba(255,255,255,.14); border-radius: 18px; background: rgba(255,255,255,.07); color: #fff; cursor: pointer;
  font: 800 clamp(12.5px, 3.7vw, 15px)/1.15 var(--title); text-align: center; transition: border-color .2s, background .2s, transform .15s, box-shadow .2s; }
.sg-choice > span:last-child { overflow-wrap: normal; word-break: normal; hyphens: auto; }   /* never "Christm|as" (QA 24 Nov) */
.sg-choice:active { transform: scale(.96); }
.sg-choice.is-picked { border-color: var(--gold); background: rgba(255,211,77,.16); box-shadow: 0 0 0 3px rgba(255,211,77,.22), 0 0 22px rgba(255,211,77,.25); }
.sg-choice.is-picked::after { content: '✓'; position: absolute; top: -8px; inset-inline-end: -6px; width: 24px; height: 24px; border-radius: 50%; background: var(--gold); color: var(--ink);
  font: 800 14px/24px var(--title); box-shadow: 0 2px 0 #A9780E; }
.sg-thumb { position: relative; width: 100%; max-width: 86px; aspect-ratio: 1; border-radius: 50%; overflow: hidden; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.4), 0 4px 10px rgba(0,0,0,.35); }
.sg-thumb > svg, .sg-thumb > img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: cover; }
.sg-thumb::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(22% 14% at 30% 24%, rgba(255,255,255,.8), rgba(255,255,255,0) 70%); }
.sg-thumb.is-fall { background: radial-gradient(70% 70% at 50% 35%, #4E62A8, #263368); }
.sg-thumb.is-fall b { position: absolute; font-size: 15px; line-height: 1; font-weight: 400; filter: drop-shadow(0 0 4px rgba(255,255,255,.6)); }
.sg-thumb.is-base { border-radius: 14px; background: radial-gradient(80% 80% at 50% 30%, #3A2E66, #1E1840); aspect-ratio: 1.25; }
.sg-thumb.is-base svg { inset: 14% 8% auto; width: 84%; height: auto; }
.sg-thumb.is-base::after { display: none; }
.sg-wishcard { flex-direction: row; justify-content: flex-start; gap: 10px; padding: 12px 12px; text-align: start; font-size: clamp(14px, 4.2vw, 16px); min-height: 58px; }
.sg-wishcard b { flex: none; font-size: 26px; line-height: 1; filter: drop-shadow(0 2px 4px rgba(0,0,0,.3)); }
.sg-wishcard > span { flex: 1 1 auto; min-width: 0; }
.sg-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.sg-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 6px 13px; border: 2px solid rgba(255,255,255,.18); border-radius: 99px;
  background: rgba(255,255,255,.07); color: #fff; font: 800 14.5px/1.1 var(--title); cursor: pointer; transition: transform .15s, background .2s, border-color .2s; }
.sg-chip:active { transform: scale(.95); }
.sg-chip.is-picked { background: rgba(255,211,77,.2); border-color: var(--gold); }
.sg-chips.is-sent .sg-chip:not(.is-picked) { opacity: .35; pointer-events: none; }

/* the smash: the counter dots and the hint */
.sg-smashbar { position: relative; z-index: 6; display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 8px; }
.sg-dots10 { display: flex; gap: 6px; }
.sg-dots10 i { width: 12px; height: 12px; border-radius: 50%; border: 2px solid rgba(255,255,255,.5); transition: background .15s, transform .15s, border-color .15s; }
.sg-dots10 i.is-on { background: var(--gold); border-color: var(--gold); transform: scale(1.15); box-shadow: 0 0 10px rgba(255,211,77,.8); }
.sg-hint { font: 800 clamp(18px, 5.6vw, 22px)/1.15 var(--title); color: #fff; text-align: center; text-shadow: 0 2px 10px rgba(0,0,0,.5); }
.sg-hint.is-pop { animation: sg-hint .35s cubic-bezier(.2,1.4,.4,1); }
@keyframes sg-hint { from { transform: scale(1.3); } }
.sg-finger { position: absolute; z-index: 9; left: 58%; top: 52%; font-size: 42px; pointer-events: none; animation: sg-finger 1.3s ease-in-out infinite; filter: drop-shadow(0 4px 6px rgba(0,0,0,.4)); }
@keyframes sg-finger { 0%, 100% { transform: translate(0, 0) scale(1); } 45% { transform: translate(-10px, -12px) scale(.92); } 55% { transform: translate(-10px, -12px) scale(.86); } }
.sg-tapfx { position: absolute; z-index: 9; width: 70px; height: 70px; margin: -35px 0 0 -35px; border-radius: 50%; pointer-events: none;
  border: 3px solid rgba(255,255,255,.8); animation: sg-tapfx .45s ease-out forwards; }
@keyframes sg-tapfx { from { transform: scale(.3); opacity: 1; } to { transform: scale(1.3); opacity: 0; } }

/* ── the wish card that flies out ───────────────────────────────────────────────────────────────────────────── */
.sg-card { position: relative; z-index: 31; width: min(88%, 340px); margin: 0 auto; padding: 22px 18px 18px; border-radius: 24px; text-align: center; color: #3A2A1A;
  background: linear-gradient(180deg, #FFFDF6 0%, #FFF3D8 100%); border: 3px solid #F3C75A;
  box-shadow: 0 0 0 6px rgba(255,236,170,.35), 0 0 50px rgba(255,214,110,.55), 0 22px 40px rgba(0,0,0,.45); }
.sg-card::before { content: ''; position: absolute; inset: 7px; border: 1.5px dashed rgba(201,154,18,.45); border-radius: 18px; pointer-events: none; }
.sg-card-merry { font: 800 clamp(20px, 6.2vw, 26px)/1.1 var(--title); color: #B42B29; text-wrap: balance; }
.sg-card-merry .xm-name { color: #B42B29; }
/* the New Year fireworks around and over the card for ~3 s (globe.js fireworks(), 26 Nov 2026) */
.sg-fireworks { position: absolute; inset: 0; z-index: 40; width: 100%; height: 100%; pointer-events: none; }
.sg-card-for { margin-top: 10px; font: 800 13px/1.2 var(--title); letter-spacing: 1.2px; text-transform: uppercase; color: #B98A1C; }
.sg-card-emoji { margin: 8px 0 4px; font-size: 54px; line-height: 1; filter: drop-shadow(0 6px 10px rgba(0,0,0,.18)); }
.sg-card-line { font: 800 clamp(18px, 5.4vw, 22px)/1.25 var(--hand); color: #3A2A1A; text-wrap: balance; }
.sg-card-from { margin-top: 10px; font: 800 17px/1.2 var(--hand); color: #8A5A18; }
.sg-card.is-in { animation: sg-card-in .9s cubic-bezier(.16,1.25,.3,1) both; }
@keyframes sg-card-in { 0% { transform: translateY(120px) scale(.2) rotate(-12deg); opacity: 0; } 60% { opacity: 1; } 100% { transform: none; } }
.sg-reveal { position: absolute; inset: 0; z-index: 31; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 60px 12px 20px; }
.sg-scene-burst .sg-room { overflow: visible; }
.sg-scene-burst .sg-host { z-index: 32; bottom: 2%; }
/* short screens: the card keeps clear of the panel */
@media (max-height: 720px) { .sg-card { padding: 16px 14px 14px; } .sg-card-emoji { font-size: 42px; margin: 4px 0 2px; } .sg-card-line { font-size: 18px; } .sg-reveal { padding-top: 50px; } }

/* the creator's wall of wishes back */
.sg-wall { display: flex; flex-direction: column; gap: 8px; }
.sg-wallrow { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 16px; background: rgba(255,255,255,.07); border: 1.5px solid rgba(255,255,255,.12); }
.sg-wallrow b { flex: none; font-size: 24px; line-height: 1; }
.sg-wallrow > span { flex: 1 1 auto; min-width: 0; font-weight: 800; font-size: 15px; color: #E7DDFF; overflow-wrap: anywhere; }
.sg-wallrow strong { color: var(--gold-hi); font-family: var(--title); }
.sg-wallrow.is-new { animation: sg-wallnew 1.2s ease-out both; }
@keyframes sg-wallnew { 0% { background: rgba(255,211,77,.35); } 100% { background: rgba(255,255,255,.07); } }
.sg-count { text-align: center; font: 800 16px/1.3 var(--title); color: var(--gold-hi); }
.xm-delete .xm-row { display: flex; gap: 10px; }
.xm-delete .xm-row > .xm-btn { flex: 1 1 0; min-width: 0; padding-inline: 10px; font-size: 16px; }

/* the fairy that carries the wish into the globe: a glowing star of light */
.sg-fairy { position: fixed; z-index: 80; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, #fff, rgba(255,232,150,.9) 40%, rgba(255,200,90,0)); box-shadow: 0 0 22px 8px rgba(255,214,110,.6); }
.sg-fairy::after { content: '✦'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 20px; }

/* ── copied engine pieces in this game's colours: who cards, the language field and drawer ─────────────────── */
.xm-who { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.xm-who-card { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 8px 10px; border: 3px solid rgba(255,255,255,.16); border-radius: 20px;
  background: rgba(255,255,255,.07); color: #fff; font: 800 18px/1 var(--title); cursor: pointer; transition: border-color .2s, background .2s, transform .15s; }
.xm-who-card .xm-char { margin: 8px 0 8px; }
.xm-who-card > span { position: relative; }
.xm-who-card.is-picked { border-color: var(--gold); background: rgba(255,211,77,.16); box-shadow: 0 0 0 3px rgba(255,211,77,.25), 0 10px 24px rgba(0,0,0,.25); }
.xm-who-card:active { transform: scale(.97); }
.xm-sheet { position: fixed; inset: 0; z-index: 70; display: flex; align-items: flex-end; justify-content: center; background: rgba(10,8,28,.62); }
.xm-sheet-panel { width: 100%; max-width: 480px; max-height: 88vh; overflow: auto; padding: 16px 16px calc(24px + env(safe-area-inset-bottom)); border-radius: 26px 26px 0 0;
  background: var(--paper); color: var(--ink); }
.xm-sheet-panel::before { content: ''; display: block; width: 44px; height: 5px; margin: -6px auto 12px; border-radius: 3px; background: #DCCFB8; }
.xm-sheet-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.xm-sheet-head > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.xm-sheet-head .xm-h2 { font-size: clamp(19px, 5.6vw, 24px); overflow-wrap: anywhere; color: var(--ink); }
.xm-sheet-close { flex: none; align-self: flex-start; width: 40px; height: 40px; border: 0; border-radius: 50%; background: #EFE6D6; color: var(--ink); font: 800 24px/1 var(--title); cursor: pointer; }
.xm-langfield { display: flex; align-items: center; gap: 10px; width: 100%; height: 50px; margin: 0; padding: 0 6px 0 14px; border-radius: 18px;
  background: rgba(255,255,255,.08); border: 2px solid rgba(255,255,255,.3); color: #fff; cursor: pointer; text-align: start; font: 800 17px/1.1 var(--title); }
.xm-langfield:active { translate: 0 2px; }
.xm-langfield:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.xm-langfield-globe { flex: none; font-size: 22px; line-height: 1; }
.xm-langfield b { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.6; padding-top: 1px; }
.xm-langfield-arrow { flex: none; position: relative; width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(180deg, #FFE27F, #EFB52A); }
.xm-langfield-arrow::after { content: ''; position: absolute; left: 50%; top: 44%; width: 9px; height: 9px; border: solid var(--ink); border-width: 0 3px 3px 0; border-radius: 1px;
  translate: -50% -50%; rotate: 45deg; }
.xm-sheet-panel.is-langs .xm-sheet-head { align-items: center; }
.xm-langlist { display: flex; flex-direction: column; }
.xm-langlist a { display: block; padding: 13px 12px; border-bottom: 1px solid #EFE6D6; border-radius: 12px; text-align: center; text-decoration: none; color: var(--ink); font: 800 18px/1.25 var(--title); }
.xm-langlist a:last-child { border-bottom: 0; }
.xm-langlist a.is-now { background: #FFE3E1; color: var(--red-d); }
.xm-langlist a.is-now::after { content: ' ✓'; }

/* small phones: the globe and the room shrink with the screen, the panel keeps every button reachable */
@media (max-height: 640px) { .sg-room { min-height: 330px; } .sg-room.is-tall { min-height: 380px; } }
@media (max-width: 340px) { .sg-choices { gap: 8px; } .sg-choice { padding: 8px 4px 9px; } .sg-thumb { max-width: 74px; } }
@media (prefers-reduced-motion: reduce) {
  .sg-float, .sg-shine::before, .sg-bokeh i, .sg-mist span, .sg-finger, .sg-globe.is-wish .sg-wishglow { animation: none; }
  .sg-bokeh i { opacity: var(--o, .45); }
}

/* ── the painted art (tools/christmas/prepare_globe_art.py, sg-*): it carries its own glass, light and depth ───── */
.sg-room.is-painted { background: #120D24; }
.sg-room-pic { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 82%; pointer-events: none; }
.sg-room.is-painted::after { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(12,8,30,.72) 0%, rgba(12,8,30,.18) 26%, rgba(12,8,30,0) 50%, rgba(12,8,30,.25) 100%); }
/* only the shot's own layout pieces are in the flow (layered over the painting); every effect added on a tap
   (sparkles, tap rings, bubbles, shards, confetti) keeps its own absolute position, so nothing ever shifts */
.sg-room.is-painted > .xm-top, .sg-room.is-painted > .sg-title, .sg-room.is-painted > .sg-head, .sg-room.is-painted > .sg-globe,
.sg-room.is-painted > .sg-headline, .sg-room.is-painted > .sg-lead, .sg-room.is-painted > .sg-smashbar, .sg-room.is-painted > .sg-dock { position: relative; z-index: 2; }
.sg-room.is-painted > .sg-host, .sg-room.is-painted > .xm-say, .sg-room.is-painted > .sg-reveal { position: absolute; }
.sg-room.is-painted > .sg-bokeh, .sg-room.is-painted > .xm-snow { position: absolute; z-index: 1; }
.sg-room.is-painted .sg-bokeh i { opacity: 0; --o: .35; }
.sg-globe.is-painted .sg-sphere { box-shadow: 0 22px 40px rgba(0,0,0,.55), 0 0 40px rgba(255,214,140,.18); }
.sg-globe.is-painted .sg-glass { display: none; }
.sg-globe.is-painted .sg-shine::before { opacity: .55; }
.sg-globe.is-painted .sg-world > img { object-fit: cover; }
.sg-globe.is-painted .sg-flakes { opacity: .9; }
.sg-base-pic { display: block; width: 100%; height: auto; filter: drop-shadow(0 14px 16px rgba(0,0,0,.5)); }
.sg-globe.is-painted .sg-base { width: 90%; margin-top: -17%; }
.sg-globe.is-painted .sg-base .sg-plate { top: 59%; width: 30%; color: #3A2610; text-shadow: 0 1px 0 rgba(255,255,255,.55); font-size: calc(var(--g, 240px) * .046 * var(--fit, 1)); }
.sg-globe.is-painted .sg-base[data-base="wood"] .sg-plate { color: #3A2610; text-shadow: 0 1px 0 rgba(255,240,200,.5); }
.sg-globe.is-painted .sg-base[data-base="pastel"] .sg-plate { top: 61%; }
.sg-globe.is-painted .sg-base[data-base="crystal"] .sg-plate { top: 58%; color: #23405E; }
.sg-globe.is-painted .sg-shadow { bottom: -3%; }
.sg-globe.is-painted .sg-wishglow { width: 40%; top: 66%; }
.sg-wishglow .sg-wishicon { width: 70%; height: auto; filter: drop-shadow(0 0 8px rgba(255,240,190,.95)); }
.sg-wishicon { display: block; flex: none; height: auto; object-fit: contain; }
.sg-thumb.is-base img { position: absolute; inset: 10% 6%; width: 88%; height: 80%; object-fit: contain; }
.sg-thumb.is-fall { background: radial-gradient(70% 70% at 50% 35%, #3E4F94, #1C2554); }
.sg-wishcard .sg-wishicon { width: 38px; }
.sg-chip .sg-wishicon { width: 24px; }
.sg-wallrow .sg-wishicon { width: 30px; }
.sg-card-emoji .sg-wishicon { width: 84px; margin: 0 auto; }
/* the painted card: its own gold-foil border; the words sit inside it */
.sg-card.is-painted { width: min(80%, 300px); aspect-ratio: 672 / 900; padding: 15% 13% 13%; background: none; border: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; box-shadow: none; filter: drop-shadow(0 0 30px rgba(255,214,110,.5)) drop-shadow(0 20px 30px rgba(0,0,0,.45)); }
.sg-card.is-painted::before { display: none; }
.sg-card-pic { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; border-radius: 14px; }
.sg-card.is-painted { isolation: isolate; }
.sg-card.is-painted .sg-card-merry { font-size: clamp(17px, 5.2vw, 22px); }
.sg-card.is-painted .sg-card-for { margin-top: 6px; font-size: 11px; }
.sg-card.is-painted .sg-card-line { font-size: clamp(15px, 4.6vw, 19px); }
.sg-card.is-painted .sg-card-from { margin-top: 6px; font-size: 15px; }
.sg-thumb.is-fall .sg-flakes { z-index: 2; }
.sg-globe.is-painted .sg-base .sg-plate { font-size: calc(var(--g, 240px) * .052 * var(--fit, 1)); color: #2A1A08; }
@media (max-height: 760px) { .sg-card.is-painted { width: min(66%, 250px); } .sg-scene-burst .sg-reveal { padding-top: 54px; justify-content: flex-start; } }

/* ── motion: film cuts, a drifting camera, depth, light (owner 22 Nov: "filmy, premium, real") ──────────────────── */
.sg-cut { position: fixed; inset: 0; z-index: 200; pointer-events: none; opacity: 0; background: radial-gradient(120% 90% at 50% 45%, #1A1236 0%, #07050F 70%); }
.sg-cut.is-white { background: radial-gradient(90% 70% at 50% 45%, #FFFFFF 0%, #FFF4D6 55%, #FFE2A0 100%); }
/* the painted room breathes: a slow camera drift (Ken Burns), never during the smash (the camera is pushed there) */
.sg-room-pic { animation: sg-drift 26s ease-in-out infinite alternate; transform-origin: 50% 70%; will-change: transform; }
@keyframes sg-drift { from { transform: scale(1.04) translate(-1.2%, 0); } to { transform: scale(1.12) translate(1.2%, -1.5%); } }
.sg-room.is-full .sg-room-pic { animation: none; transform: scale(1.04); transition: transform .4s cubic-bezier(.2,1.2,.4,1); }
/* snow close to the lens, in front of everything: big, soft, out of focus (depth) */
.sg-room.is-painted > .sg-near { position: absolute; inset: 0; z-index: 9; pointer-events: none; overflow: hidden; }
.sg-near i { position: absolute; top: -20px; border-radius: 50%; background: rgba(255,255,255,.85); filter: blur(1.8px); opacity: .7;
  animation: xm-snowfall linear infinite; will-change: transform; }
/* the warm candle glow behind the globe, slowly breathing */
.sg-halo { animation: sg-halo 4.5s ease-in-out infinite; }
@keyframes sg-halo { 50% { opacity: .65; transform: scale(1.06); } }
/* the flurry inside the glass when the world changes */
.sg-swirl { position: absolute; inset: -10%; z-index: 4; border-radius: 50%; pointer-events: none; mix-blend-mode: screen;
  background: conic-gradient(from 0deg, rgba(255,255,255,0), rgba(255,255,255,.85) 12%, rgba(255,255,255,0) 26%, rgba(220,235,255,.7) 40%, rgba(255,255,255,0) 55%,
    rgba(255,255,255,.8) 70%, rgba(255,255,255,0) 85%); filter: blur(10px); }
/* the ring of light where a wish lands */
.sg-ripple { position: absolute; z-index: 6; left: 50%; top: 66%; width: 70%; aspect-ratio: 1; border-radius: 50%; pointer-events: none;
  border: 3px solid rgba(255,236,170,.95); box-shadow: 0 0 24px rgba(255,214,110,.9), inset 0 0 24px rgba(255,214,110,.6); }
/* the gold glint running across a base that has just been set down (masked to the base's own picture) */
.sg-glint { position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: 0; -webkit-mask-size: 100% 100%; mask-size: 100% 100%;
  background: linear-gradient(105deg, rgba(255,255,255,0) 30%, rgba(255,250,225,.9) 45%, rgba(255,255,255,0) 60%) no-repeat; background-size: 250% 100%;
  mix-blend-mode: screen; }
.sg-base.is-glinting .sg-glint { animation: sg-glint 1.2s .45s cubic-bezier(.4,0,.2,1) both; }
@keyframes sg-glint { 0% { background-position: 120% 0; opacity: 1; } 100% { background-position: -60% 0; opacity: 1; } }
/* the wish flying into the globe and its trail of gold */
.sg-flying { position: fixed !important; z-index: 120; margin: 0; pointer-events: none; filter: drop-shadow(0 0 14px rgba(255,220,130,.95)); }
.sg-trail { position: fixed; z-index: 119; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, #fff, #FFE27F 50%, rgba(255,210,100,0)); box-shadow: 0 0 10px rgba(255,214,110,.9); }
/* the smash: the edges of the frame closing in */
.sg-vignette { position: absolute; inset: 0; z-index: 8; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(70% 60% at 50% 48%, rgba(0,0,0,0) 40%, rgba(5,3,15,.88) 100%); }
.sg-room.is-painted > .sg-vignette { position: absolute; z-index: 8; }
/* the card: born out of the light, a soft still warm glow behind it (the turning rays went: owner 27 Nov, they did
   not look premium), then floating */
.sg-cardglow { position: absolute; left: 50%; top: 46%; width: 150%; aspect-ratio: 1; translate: -50% -50%; z-index: 0; pointer-events: none; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255,226,160,.30), rgba(255,200,120,.12) 45%, rgba(255,200,120,0) 72%);
  animation: sg-cardglow-in 1.6s ease-out both; }
@keyframes sg-cardglow-in { from { opacity: 0; scale: .5; } }
.sg-reveal .sg-card { z-index: 1; }
.sg-card.is-floating { animation: sg-card-float 5s ease-in-out infinite; }
@keyframes sg-card-float { 0%, 100% { transform: translateY(0) rotate(-.6deg); } 50% { transform: translateY(-7px) rotate(.6deg); } }
@media (prefers-reduced-motion: reduce) {
  .sg-room-pic, .sg-halo, .sg-cardglow, .sg-card.is-floating, .sg-near i { animation: none; }
  .sg-near { display: none; }
}
.sg-page { display: flex; flex-direction: column; gap: 14px; }
.sg-room.is-painted > .sg-smashbar { z-index: 10; } .sg-smashbar { filter: drop-shadow(0 2px 6px rgba(0,0,0,.6)); }
/* the card always fits the room (by its height too) and its words scale with the card itself */
.sg-card.is-painted { width: min(70%, 280px, calc((max(430px, 66dvh) - 96px) * .746)); container-type: inline-size; }
@supports (width: 1cqw) {
  .sg-card.is-painted .sg-card-merry { font-size: 12.5cqw; }
  .sg-card.is-painted .sg-card-for { font-size: 5.8cqw; margin-top: 3cqw; }
  .sg-card.is-painted .sg-card-emoji .sg-wishicon { width: 42cqw; }
  .sg-card.is-painted .sg-card-emoji { margin: 2cqw 0 1cqw; }
  .sg-card.is-painted .sg-card-line { font-size: 10.8cqw; }
  .sg-card.is-painted .sg-card-from { font-size: 8.4cqw; margin-top: 3cqw; }
}

/* ═══ THE LUXURY LAYER (owner 22 Nov: "still lacks premium design end to end") ═══════════════════════════════════
   One look everywhere: velvet night, gold foil, glass. Serif titles (Cormorant Garamond), a script for names (Great
   Vibes), gold hairlines instead of boxes, gold-foil buttons with a light sweep. Overrides the engine's playful look. */
.xm-globe {
  --serif: 'Cormorant Garamond', 'Playfair Display', Georgia, serif; --script: 'Great Vibes', 'Cormorant Garamond', cursive;
  --foil: linear-gradient(180deg, #FFF6D2 0%, #F7D98A 26%, #D9A441 52%, #F4D584 74%, #B8862F 100%);
  --hair: rgba(233,199,122,.42); --cream: #FFF3D6; --soft-cream: #D8CBEB;
}
/* titles: gold-foil serif with a script line above, no cartoon outline */
.xm-globe .sg-title { gap: 2px; }
.xm-globe .sg-title .xm-logo-top { font-family: var(--script); font-weight: 400; font-size: clamp(27px, 8.4vw, 38px); color: var(--cream);
  -webkit-text-stroke: 0; rotate: 0deg; text-shadow: 0 2px 14px rgba(0,0,0,.7); line-height: 1.1; }
.xm-globe .sg-title .xm-logo-main { font-family: var(--serif); font-weight: 700; font-size: clamp(33px, 10.4vw, 48px); line-height: 1; letter-spacing: .3px;
  -webkit-text-stroke: 0; background: var(--foil); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none;
  filter: drop-shadow(0 2px 0 rgba(90,55,10,.65)) drop-shadow(0 8px 22px rgba(0,0,0,.6)); padding: 0 4px; }
.xm-globe .xm-boot-main, .xm-globe .xm-loader .xm-logo-main { font-family: var(--serif); -webkit-text-stroke: 0; color: #F6D98A; }
.xm-globe .xm-loader .xm-logo-top { font-family: var(--script); -webkit-text-stroke: 0; rotate: 0deg; }
.xm-globe .xm-loader { background: radial-gradient(120% 70% at 50% 40%, #2E1F4F, #0C0818 75%); }
/* names: written in gold script, no scribble underline */
.xm-globe .xm-name { background: none; font-family: var(--script); font-weight: 400; font-size: 1.32em; line-height: .9; color: #F6D98A; padding: 0 .06em; }
.xm-globe .sg-card .xm-name { color: #9E1F1D; }
/* the headline over the room */
.xm-globe .sg-headline { font-family: var(--serif); font-weight: 700; font-size: clamp(24px, 7.4vw, 31px); color: var(--cream); letter-spacing: .2px; text-shadow: 0 2px 16px rgba(0,0,0,.75); }
.xm-globe .sg-lead { font-family: var(--serif); font-style: italic; font-weight: 600; font-size: 19px; color: #F3E3BF; }
/* the panel: deep velvet, a gold filigree crowning its edge, a hairline of light */
.xm-globe .xm-play { padding-top: 36px; border-radius: 30px 30px 0 0;
  background: radial-gradient(130% 55% at 50% 0%, #34235A 0%, #20163F 42%, #120C26 100%);
  box-shadow: 0 -20px 44px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,225,150,.6), inset 0 0 0 1px rgba(255,214,140,.10); }
.xm-globe .sg-snowedge { top: -15px; height: 30px; opacity: 1; filter: drop-shadow(0 2px 6px rgba(0,0,0,.6));
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 30'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' x2='1'%3E%3Cstop offset='0' stop-color='%23E9C46A' stop-opacity='0'/%3E%3Cstop offset='.5' stop-color='%23F6DE96'/%3E%3Cstop offset='1' stop-color='%23E9C46A' stop-opacity='0'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M6 15H116M184 15H294' stroke='url(%23g)' stroke-width='1.3'/%3E%3Cpath d='M116 15c8-9 16-9 21-2-6-3-11 0-11 4M184 15c-8-9-16-9-21-2 6-3 11 0 11 4M116 15c8 9 16 9 21 2-6 3-11 0-11-4M184 15c-8 9-16 9-21 2 6 3 11 0 11-4' fill='none' stroke='%23F2D27E' stroke-width='1.5' stroke-linecap='round'/%3E%3Cpath d='M150 2l5.5 13-5.5 13-5.5-13z' fill='%23F6DE96'/%3E%3Ccircle cx='150' cy='15' r='2.3' fill='%23fff'/%3E%3C/svg%3E") center / 300px 30px no-repeat; }
.xm-globe .xm-play .xm-h2 { font-family: var(--serif); font-weight: 700; font-size: clamp(25px, 7.4vw, 31px); line-height: 1.08; color: var(--cream); letter-spacing: .2px; }
.xm-globe .xm-play .xm-sub { color: var(--soft-cream); font-weight: 600; font-size: 16px; line-height: 1.45; }
.xm-globe .xm-play .xm-small { color: #A99CC9; font-weight: 600; }
.xm-globe .xm-play .xm-label { font-family: var(--serif); font-weight: 700; font-size: 14px; letter-spacing: 2.2px; text-transform: uppercase; color: #E9C77A; }
.xm-globe .xm-play .xm-link { color: #D9C9A0; font-family: var(--serif); font-style: italic; font-weight: 600; font-size: 17px; text-decoration-color: rgba(233,199,122,.5); }
/* fields: dark glass, a gold hairline, gold caret */
.xm-globe .xm-play .xm-input { background: rgba(255,255,255,.06); border: 1px solid var(--hair); border-radius: 16px; color: var(--cream); caret-color: #F2D27E;
  font: 700 21px/1 'Nunito', sans-serif; box-shadow: inset 0 1px 0 rgba(255,255,255,.07), inset 0 -10px 20px rgba(0,0,0,.18); }
.xm-globe .xm-play .xm-input::placeholder { color: rgba(255,240,210,.38); }
.xm-globe .xm-play .xm-input:focus { border-color: #F2D27E; box-shadow: 0 0 0 3px rgba(242,210,126,.18), inset 0 1px 0 rgba(255,255,255,.07); }
/* the main button: gold foil, engraved ink, a light sweeping across it now and then */
.xm-globe .xm-btn.is-gold { overflow: hidden; border: 1px solid rgba(255,244,210,.9); border-radius: 18px; min-height: 58px;
  background: linear-gradient(180deg, #FFF3C4 0%, #F3D17E 34%, #D9A13C 70%, #EBC062 100%); color: #3A2408;
  font: 700 22px/1.1 var(--serif); letter-spacing: .5px; text-shadow: 0 1px 0 rgba(255,246,218,.75);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.75), inset 0 -4px 10px rgba(120,70,10,.35), 0 10px 26px rgba(0,0,0,.5), 0 0 30px rgba(255,200,100,.28); }
.xm-globe .xm-btn.is-gold::after { content: ''; position: absolute; top: -20%; bottom: -20%; left: -40%; width: 30%; transform: skewX(-20deg); pointer-events: none;
  background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,.65), rgba(255,255,255,0)); animation: sg-btn-shine 4.2s ease-in-out infinite 1s; }
@keyframes sg-btn-shine { 0%, 70% { left: -40%; } 100% { left: 130%; } }
.xm-globe .xm-btn.is-gold:active { transform: translateY(2px); box-shadow: inset 0 1px 0 rgba(255,255,255,.6), inset 0 -2px 6px rgba(120,70,10,.35), 0 4px 12px rgba(0,0,0,.45); }
.xm-globe .xm-btn.is-gold[disabled] { opacity: .5; filter: saturate(.6); }
.xm-globe .xm-btn.is-ghost, .xm-globe .xm-play .xm-btn.is-ghost { background: rgba(255,255,255,.04); border: 1px solid var(--hair); color: var(--cream);
  font: 700 19px/1.1 var(--serif); box-shadow: none; }
.xm-globe .xm-btn:not(.is-gold):not(.is-ghost):not(.xm-share-main) { background: linear-gradient(180deg, #B8322F, #8E1F1D); border: 1px solid rgba(255,200,180,.4);
  font-family: var(--serif); font-weight: 700; box-shadow: 0 8px 20px rgba(0,0,0,.45); text-shadow: none; }
/* choice cards: glass tiles with a gold hairline; the pick glows gold with a foil medallion */
.xm-globe .sg-choice, .xm-globe .xm-who-card { background: linear-gradient(180deg, rgba(255,255,255,.075), rgba(255,255,255,.02)); border: 1px solid rgba(233,199,122,.26);
  border-radius: 20px; box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 10px 20px rgba(0,0,0,.3); color: #FBEFD6; font-family: var(--serif); font-weight: 700;
  font-size: clamp(15px, 4.4vw, 17px); letter-spacing: .2px; }
.xm-globe .sg-choice.is-picked, .xm-globe .xm-who-card.is-picked { border-color: #F2D27E;
  background: radial-gradient(120% 120% at 50% 0%, rgba(255,214,120,.22), rgba(255,214,120,.04));
  box-shadow: 0 0 0 1px #F2D27E, 0 0 26px rgba(255,200,100,.35), inset 0 1px 0 rgba(255,255,255,.12); }
.xm-globe .sg-choice.is-picked::after { background: var(--foil); color: #3A2408; box-shadow: 0 2px 8px rgba(0,0,0,.45); border: 1px solid rgba(255,246,218,.9); }
.xm-globe .sg-thumb { box-shadow: 0 0 0 1.5px rgba(242,210,126,.55), 0 6px 14px rgba(0,0,0,.45); }
.xm-globe .sg-thumb.is-base { box-shadow: none; background: radial-gradient(80% 70% at 50% 35%, rgba(255,214,140,.14), rgba(0,0,0,0)); }
.xm-globe .sg-wishcard { font-size: clamp(15px, 4.4vw, 17px); line-height: 1.1; }
/* step marks: little gold diamonds */
.xm-globe .sg-stepdots { gap: 10px; }
.xm-globe .sg-stepdots i { width: 8px; height: 8px; border-radius: 1px; rotate: 45deg; background: rgba(242,210,126,.22); }
.xm-globe .sg-stepdots i.is-done { width: 8px; background: #D9B262; }
.xm-globe .sg-stepdots i.is-on { width: 11px; height: 11px; background: var(--foil); box-shadow: 0 0 12px rgba(255,214,120,.8); }
/* the landing's three steps: no boxes, gold numerals on hairlines */
.xm-globe .xm-steps { gap: 0; margin-top: 8px; }
.xm-globe .xm-step { background: none; border: 0; border-top: 1px solid rgba(233,199,122,.16); border-radius: 0; padding: 14px 4px; color: #BFB2DA; font-size: 15px; }
.xm-globe .xm-step strong { font-family: var(--serif); font-size: 18px; color: var(--cream); }
.xm-globe .xm-step-n { width: 38px; height: 38px; background: none; border: 1px solid rgba(233,199,122,.55); color: #F2D27E; box-shadow: none;
  font: 700 22px/1 var(--serif); }
/* captions over the room: frosted glass, gold hairline, serif italic (never a comic bubble) */
.xm-globe .sg-room .xm-say.is-under { background: rgba(16,10,34,.6); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid rgba(233,199,122,.55); border-radius: 16px; color: var(--cream); font: italic 600 20px/1.25 var(--serif);
  box-shadow: 0 12px 30px rgba(0,0,0,.45); padding: 10px 16px; }
.xm-globe .sg-room .xm-say.is-under .xm-name { color: #F6D98A; }
/* the docked sound and language buttons: dark glass with a gold rim */
.xm-globe .xm-sound, .xm-globe .xm-lang { background: rgba(20,12,40,.55); border: 1px solid rgba(233,199,122,.65); }
.xm-globe .xm-site.is-logo { background: rgba(255,250,240,.9); box-shadow: 0 4px 14px rgba(0,0,0,.4); height: 34px; }
.xm-globe .xm-site-logo { height: 26px; }
/* the share screen in the same gold and glass */
.xm-globe .xm-linkrow { background: rgba(255,255,255,.06); border: 1px solid var(--hair); box-shadow: none; }
.xm-globe .xm-linkrow-url { color: var(--cream); }
.xm-globe .xm-linkrow-ico { color: #F2D27E; }
.xm-globe .xm-copy { background: var(--foil); color: #3A2408; font-family: var(--serif); font-size: 17px; }
.xm-globe .xm-share-main { border-radius: 18px; font-family: var(--serif); font-weight: 700; font-size: 21px; border: 1px solid rgba(255,255,255,.35); }
.xm-globe .xm-sharetile { background: rgba(255,255,255,.06); color: #FBEFD6; border: 1px solid rgba(233,199,122,.22); box-shadow: none; font-weight: 700; }
.xm-globe .xm-sharetile:active { translate: 0 1px; box-shadow: none; }
/* the wish-back chips and the wall of wishes */
.xm-globe .sg-chip { background: rgba(255,255,255,.06); border: 1px solid rgba(233,199,122,.3); font: 700 16px/1.1 var(--serif); color: #FBEFD6; }
.xm-globe .sg-chip.is-picked { border-color: #F2D27E; background: rgba(255,214,120,.18); box-shadow: 0 0 18px rgba(255,200,100,.3); }
.xm-globe .sg-wallrow { background: rgba(255,255,255,.05); border: 1px solid rgba(233,199,122,.22); }
.xm-globe .sg-wallrow > span { font-family: var(--serif); font-size: 17px; color: var(--soft-cream); }
.xm-globe .sg-wallrow strong { font-family: var(--script); font-weight: 400; font-size: 1.35em; color: #F6D98A; }
.xm-globe .sg-count { font-family: var(--serif); font-style: italic; font-size: 19px; color: #F3E3BF; }
/* the smash words */
.xm-globe .sg-hint { font: italic 700 clamp(22px, 6.6vw, 27px)/1.15 var(--serif); color: var(--cream); text-shadow: 0 2px 14px rgba(0,0,0,.8); }
.xm-globe .sg-dots10 { gap: 9px; }
.xm-globe .sg-dots10 i { width: 9px; height: 9px; border-radius: 1px; rotate: 45deg; border: 1px solid rgba(242,210,126,.7); }
.xm-globe .sg-dots10 i.is-on { background: var(--foil); border-color: #FFF2C8; box-shadow: 0 0 12px rgba(255,214,120,.95); transform: scale(1.15); }
.xm-globe .sg-finger { font-size: 38px; }
/* the premium 3D cast (sg-{cat|bear}-{pose}): alive with breath and a little sway */
.sg-cast { display: block; height: var(--h, 120px); width: auto; filter: drop-shadow(0 12px 14px rgba(0,0,0,.5)); transform-origin: 50% 100%; animation: sg-breathe 3.2s ease-in-out infinite; }
.sg-cast.is-cheer { animation: sg-cheer 1.1s cubic-bezier(.3,0,.3,1) infinite; }
@keyframes sg-breathe { 0%, 100% { transform: scale(1, 1) rotate(0); } 50% { transform: scale(1.02, .985) rotate(.8deg); } }
@keyframes sg-cheer { 0%, 100% { transform: translateY(0) scale(1, 1); } 30% { transform: translateY(0) scale(1.04, .94); } 60% { transform: translateY(-12%) scale(.97, 1.04); } }
.xm-globe .xm-who-card .sg-cast { margin: 6px 0 6px; }
@media (prefers-reduced-motion: reduce) { .sg-cast, .xm-globe .xm-btn.is-gold::after { animation: none; } }
/* the globe before anything is chosen: frosted crystal, a gold question glowing inside */
.sg-fogged { filter: blur(7px) saturate(.6) brightness(1.1); transform: scale(1.06); }
.sg-globe.is-painted .sg-mist { background: radial-gradient(62% 62% at 50% 42%, rgba(240,245,255,.62), rgba(205,218,248,.38) 58%, rgba(170,190,235,.12) 100%);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); color: #FFF6DE; font: italic 700 calc(var(--g, 240px) * .34)/1 var(--serif);
  text-shadow: 0 0 18px rgba(255,214,140,.95), 0 0 44px rgba(255,200,110,.7); }
.sg-globe.is-painted .sg-mist + .sg-flakes { opacity: .7; }
/* the card's words in the same luxury type: serif greeting and wish, the sender signing in script */
.xm-globe .sg-card-merry { font-family: var(--serif); font-weight: 700; color: #9E1F1D; }
.xm-globe .sg-card-for { font-family: var(--serif); letter-spacing: 2px; color: #A9791A; }
.xm-globe .sg-card-line { font-family: var(--serif); font-style: italic; font-weight: 700; color: #3A2410; line-height: 1.15; }
.xm-globe .sg-card-from { font-family: var(--script); font-weight: 400; color: #8A5A18; font-size: 1.5em; }
@supports (width: 1cqw) { .xm-globe .sg-card.is-painted .sg-card-from { font-size: 12cqw; } .xm-globe .sg-card.is-painted .sg-card-line { font-size: 11.6cqw; } }

/* ═══ THE CINEMA LAYOUT (owner 22 Nov, after studying the reference: one full-screen painted shot per step) ═════
   Landing, name, build, wish and the invitation are each ONE screen: the question at the head, the globe as the
   hero, the controls floating at the foot over the scene. No panel, no scrolling during play. */
.sg-room.is-stage { height: 100vh; height: 100dvh; min-height: 580px; padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
.sg-room.is-stage.is-painted::after { background: linear-gradient(180deg, rgba(12,8,30,.72) 0%, rgba(12,8,30,.14) 22%, rgba(12,8,30,0) 42%,
  rgba(14,8,26,.45) 66%, rgba(10,6,22,.92) 100%); }
/* the build steps: the room drifts out of focus so the globe owns the frame */
.sg-room.is-focus .sg-room-pic { filter: blur(7px) brightness(.78) saturate(1.1); }
.sg-room.is-stage > .sg-globe { margin: auto; }
.sg-head { text-align: center; padding: 2px 10px 0; }
.sg-kicker { font: italic 600 16px/1.2 var(--serif); color: #E9C77A; letter-spacing: .6px; min-height: 19px; }
.sg-question { margin: 2px 0 0; font: 700 clamp(25px, 7.6vw, 32px)/1.08 var(--serif); color: var(--cream); text-shadow: 0 2px 16px rgba(0,0,0,.8); text-wrap: balance; }
.sg-dock { position: relative; z-index: 12; width: 100%; max-width: 440px; margin: 0 auto; display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
.sg-dock > .sg-page { display: flex; flex-direction: column; gap: 10px; }
.sg-footnote { margin: 0; text-align: center; font: italic 600 15px/1.3 var(--serif); color: #E7D8B6; text-shadow: 0 1px 8px rgba(0,0,0,.8); }
.sg-dock .xm-error:empty { display: none; }
.sg-dock .xm-input { background: rgba(20,12,34,.55); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border: 1px solid rgba(233,199,122,.55);
  border-radius: 16px; color: var(--cream); caret-color: #F2D27E; font: 700 20px/1 'Nunito', sans-serif; text-align: center; min-height: 54px; }
.sg-dock .xm-input::placeholder { color: rgba(255,240,210,.5); }
.sg-dock .xm-input:focus { border-color: #F2D27E; box-shadow: 0 0 0 3px rgba(242,210,126,.2); }
/* the caption naming the pick: warm frosted glass with a gold hairline */
.sg-caption { align-self: center; width: min(100%, 320px); padding: 8px 18px 9px; border-radius: 16px; text-align: center;
  background: linear-gradient(180deg, rgba(70,36,40,.62), rgba(40,20,32,.62)); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border: 1px solid rgba(233,199,122,.5); box-shadow: 0 10px 26px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,236,190,.18); }
.sg-caption b { display: block; font: 700 20px/1.15 var(--serif); color: var(--cream); }
.sg-caption span { display: block; margin-top: 2px; font: italic 600 14px/1.3 var(--serif); color: #DCC8A0; }
/* the options: round medallions in one row (the reference's swatches), their names small under them */
.sg-dock .sg-choices { display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); gap: 6px; justify-items: center; align-items: start; }
.sg-dock .sg-choices.is-wishes { gap: 10px 8px; }
.xm-globe .sg-dock .sg-choice { width: 100%; max-width: 66px; padding: 0; gap: 5px; background: none; border: 0; box-shadow: none; border-radius: 0; }
.xm-globe .sg-dock .sg-choice::after { display: none; }
.sg-dock .sg-choice > span:last-child { font: 700 12.5px/1.12 var(--serif); color: #E7D8B6; text-shadow: 0 1px 6px rgba(0,0,0,.9); }
.sg-dock .sg-choice.is-picked > span:last-child { color: #F6D98A; }
.xm-globe .sg-dock .sg-thumb { width: 100%; max-width: 58px; box-shadow: 0 0 0 1px rgba(242,210,126,.45), 0 8px 16px rgba(0,0,0,.55); transition: box-shadow .25s, transform .25s; }
.xm-globe .sg-dock .sg-choice.is-picked .sg-thumb { box-shadow: 0 0 0 2px #F6D98A, 0 0 0 5px rgba(246,217,138,.22), 0 0 22px rgba(255,200,100,.75); transform: translateY(-3px) scale(1.06); }
.xm-globe .sg-dock .sg-thumb.is-base { background: radial-gradient(circle at 50% 35%, rgba(90,60,110,.8), rgba(24,14,40,.9)); border-radius: 50%; aspect-ratio: 1; }
.xm-globe .sg-dock .sg-thumb.is-base img { inset: 18% 10%; width: 80%; height: 64%; }
.sg-dock .sg-wishcard > span { display: none; }
.xm-globe .sg-dock .sg-wishcard .sg-wishicon { width: 100%; max-width: 60px; aspect-ratio: 1; padding: 11px; border-radius: 50%;
  background: radial-gradient(circle at 35% 28%, rgba(255,255,255,.2), rgba(70,40,80,.75) 55%, rgba(26,14,40,.9));
  box-shadow: 0 0 0 1px rgba(242,210,126,.45), 0 8px 16px rgba(0,0,0,.55); transition: box-shadow .25s, transform .25s; }
.xm-globe .sg-dock .sg-wishcard.is-picked .sg-wishicon { box-shadow: 0 0 0 2px #F6D98A, 0 0 0 5px rgba(246,217,138,.22), 0 0 22px rgba(255,200,100,.75); transform: translateY(-3px) scale(1.06); }
/* the name step's two portraits: compact glass pills */
.sg-dock .sg-whos { gap: 10px; }
.xm-globe .sg-dock .xm-who-card { flex-direction: row; justify-content: center; gap: 8px; padding: 4px 10px 4px 6px; min-height: 64px; border-radius: 40px;
  background: rgba(20,12,34,.55); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); font-size: 18px; }
.xm-globe .sg-dock .xm-who-card .sg-castbox { flex: none; }
.xm-globe .sg-dock .xm-who-card .sg-cast { margin: 0; }
/* the cast stands beside the globe, part of the same shot */
.sg-globe > .sg-castbox.sg-host, .sg-globe > .xm-char.sg-host { position: absolute; z-index: 4; bottom: 0; right: -24%; left: auto; }
.sg-globe > .sg-castbox.sg-host.is-left { right: auto; left: -24%; }
/* the cracks: fine lines of light with a glitter of gold, not chalk strokes */
.sg-cracks path { stroke: rgba(255,252,240,.95); filter: drop-shadow(0 0 1.5px rgba(255,236,180,1)) drop-shadow(0 0 4px rgba(255,214,130,.8)); }
.sg-cracks circle { fill: #FFF6D8; filter: drop-shadow(0 0 4px rgba(255,220,140,1)); }
/* the shatter: curved pieces of the painted globe, the light in the middle, gold dust */
.sg-piece { position: absolute; z-index: 28; pointer-events: none; background-size: cover; background-position: center; will-change: transform, opacity; }
.sg-piece-glint { position: absolute; inset: 0; background: linear-gradient(125deg, rgba(255,255,255,0) 35%, rgba(255,255,255,.55) 48%, rgba(255,255,255,0) 60%); mix-blend-mode: screen; }
.sg-core { position: absolute; z-index: 27; border-radius: 50%; pointer-events: none; transform: translate(-50%, -50%); mix-blend-mode: screen;
  background: radial-gradient(closest-side, #FFFFFF 0%, rgba(255,247,220,.96) 22%, rgba(255,220,140,.6) 50%, rgba(255,200,100,0) 100%); }
.sg-shards { z-index: 29; }
@media (max-height: 640px) { .sg-question { font-size: 23px; } .sg-kicker { font-size: 14px; } .xm-globe .sg-dock .sg-thumb { max-width: 50px; } .sg-caption b { font-size: 18px; } }
.sg-room.is-painted > .sg-dock { z-index: 12; } .sg-room.is-painted > .sg-head { z-index: 5; }

/* ═══ CONTINUITY + THE WARM CHRISTMAS PALETTE (owner 22 Nov: "everything in sync, nothing suddenly appearing
   somewhere else" · "the purple scheme is not premium") ══════════════════════════════════════════════════════════ */
/* the shatter's pieces, light and dust float over the shot (the painted room's rule put them in the page flow) */
.sg-room.is-painted > .sg-piece, .sg-room.is-painted > .sg-core, .sg-room.is-painted > .sg-shards, .sg-room.is-painted > .sg-tapfx,
.sg-room.is-painted > .sg-flood { position: absolute; }
.sg-room.is-painted > .sg-piece { z-index: 28; } .sg-room.is-painted > .sg-core { z-index: 27; } .sg-room.is-painted > .sg-shards { z-index: 29; }
/* a new shot never slides the whole page in: every element arrives by itself, the room stays where it is */
.xm-globe .xm-scene { animation: none; }
/* the room's slow camera drift continues across shots (js sets one shared clock) and its focus eases, never snaps */
.sg-room-pic { transition: filter 1.1s cubic-bezier(.3,0,.2,1), transform .4s cubic-bezier(.2,1.2,.4,1); }

/* the palette: wine red, burnished brown glass, gold and cream (no purple, no navy) */
.xm-globe { --cream: #FFF1DC; --soft-cream: #EAD6C2; --hair: rgba(233,196,120,.5); }
.xm-globe .xm-stage, .xm-globe body { background: radial-gradient(130% 70% at 50% 10%, #4A1712 0%, #2A0B08 50%, #160605 100%); }
html:has(body.xm-globe), body.xm-globe { background: #160605; }
.sg-room.is-painted { background: #1E0907; }
.sg-room.is-painted::after { background: linear-gradient(180deg, rgba(28,8,6,.7) 0%, rgba(28,8,6,.12) 24%, rgba(28,8,6,0) 48%, rgba(28,8,6,.3) 100%); }
.sg-room.is-stage.is-painted::after { background: linear-gradient(180deg, rgba(28,8,6,.72) 0%, rgba(28,8,6,.14) 22%, rgba(28,8,6,0) 42%,
  rgba(34,10,7,.5) 66%, rgba(22,6,4,.94) 100%); }
.sg-room.is-focus .sg-room-pic { filter: blur(7px) brightness(.8) saturate(1.15) sepia(.12); }
.sg-cut { background: radial-gradient(120% 90% at 50% 45%, #3A100C 0%, #0E0303 70%); }
.xm-globe .xm-loader { background: radial-gradient(120% 70% at 50% 40%, #4A1712, #120403 75%); }
/* the panel under the creator's page and the card: deep wine velvet */
.xm-globe .xm-play { background: radial-gradient(130% 55% at 50% 0%, #5A1E17 0%, #34100C 44%, #1A0706 100%);
  box-shadow: 0 -20px 44px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,214,150,.6), inset 0 0 0 1px rgba(255,200,140,.10); }
.xm-globe .xm-play .xm-sub { color: var(--soft-cream); }
.xm-globe .xm-play .xm-small { color: #CDB09A; }
/* glass in warm brown: captions, fields, cards, chips, share tiles */
.sg-caption { background: linear-gradient(180deg, rgba(96,40,28,.7), rgba(52,18,12,.7)); border-color: rgba(233,196,120,.55); }
.sg-caption span { color: #E2C9A4; }
.sg-dock .xm-input, .xm-globe .xm-play .xm-input { background: rgba(48,16,10,.6); border-color: rgba(233,196,120,.6); }
.xm-globe .sg-dock .xm-who-card { background: rgba(48,16,10,.6); }
.xm-globe .sg-choice, .xm-globe .xm-who-card { background: linear-gradient(180deg, rgba(120,52,36,.35), rgba(50,16,10,.35)); border-color: rgba(233,196,120,.3); }
.xm-globe .sg-choice.is-picked, .xm-globe .xm-who-card.is-picked { background: radial-gradient(120% 120% at 50% 0%, rgba(255,200,110,.28), rgba(120,40,20,.2)); }
.xm-globe .sg-dock .sg-wishcard .sg-wishicon { background: radial-gradient(circle at 35% 28%, rgba(255,235,210,.25), rgba(110,40,28,.8) 55%, rgba(40,12,8,.94)); }
.xm-globe .sg-dock .sg-thumb.is-base { background: radial-gradient(circle at 50% 35%, rgba(130,60,40,.85), rgba(40,12,8,.94)); }
.xm-globe .sg-chip, .xm-globe .xm-sharetile, .xm-globe .xm-linkrow, .xm-globe .sg-wallrow { background: rgba(110,44,30,.28); border-color: rgba(233,196,120,.3); }
.xm-globe .sg-room .xm-say.is-under { background: rgba(48,16,10,.62); }
.xm-globe .xm-sound, .xm-globe .xm-lang { background: rgba(48,16,10,.6); border-color: rgba(233,196,120,.7); color: #F6D98A; }
/* the main button: red velvet with a gold rim and gold sparkles, as a Christmas card's seal */
.xm-globe .xm-btn.is-gold { background: linear-gradient(180deg, #DE4F40 0%, #B8281F 46%, #8E1611 100%); color: #FFF3DE;
  border: 2px solid #E9C46A; text-shadow: 0 1px 0 rgba(80,8,4,.6), 0 0 12px rgba(255,190,140,.35);
  box-shadow: inset 0 1px 0 rgba(255,210,190,.55), inset 0 -5px 12px rgba(70,6,4,.45), 0 0 0 1px rgba(110,54,10,.7), 0 12px 28px rgba(0,0,0,.55), 0 0 26px rgba(235,150,80,.3); }
/* the label keeps clear of the ✦ (22 + 11 px): core's fitButtons measures inside this padding, so a long label shrinks
   instead of running under the sparkle ("✦Send it to my friends" on a 320 px phone, Chrome QA 26 Nov) */
.xm-globe .xm-btn.is-gold { padding-left: 38px; padding-right: 38px; }
/* "Next ➜" in Arabic: the arrow points forward, i.e. to the left (globe.js nextLabel, Chrome QA 26 Nov) */
[dir="rtl"] .xm-globe .sg-arrow { display: inline-block; transform: scaleX(-1); }
.xm-globe .xm-btn.is-gold::before { content: '✦'; position: absolute; left: 22px; top: 50%; translate: 0 -50%; color: #F6D98A; font-size: 13px; text-shadow: 0 0 8px rgba(255,214,130,.9); }
.xm-globe .xm-btn.is-gold:active { box-shadow: inset 0 1px 0 rgba(255,210,190,.4), inset 0 -2px 6px rgba(70,6,4,.45), 0 4px 12px rgba(0,0,0,.45); }
.xm-globe .xm-btn.is-gold[disabled] { opacity: .55; filter: saturate(.7) brightness(.9); }
.xm-globe .xm-copy { background: linear-gradient(180deg, #F6DB93, #D9A441); }
/* the smash shot: the camera is pushed by the taps (no drift); after the card lands the shot glides shorter */
.sg-room.is-smashing .sg-room-pic { animation: none; transform: scale(1.04); }
.sg-room.is-stage { transition: height 1s cubic-bezier(.3,0,.2,1), min-height 1s cubic-bezier(.3,0,.2,1); }
.sg-room.is-stage.is-settled { height: 68vh; height: 68dvh; min-height: 460px; }
.sg-scene-burst .sg-reveal { padding-top: 66px; justify-content: center; }
.sg-room.is-stage.is-painted > .sg-reveal { position: absolute; }
/* ── no layout shift, ever (owner: "lots of layout shift when tapping the globe"; measured with the browser's own
   layout-shift detector): light sweeps move by transform only; the title's space is reserved before its fonts load;
   a change of globe size glides instead of jumping ─────────────────────────────────────────────────────────────── */
.sg-shine::before { left: -40%; animation: sg-shine-t 6.5s ease-in-out infinite 1.2s; }
@keyframes sg-shine-t { 0%, 72% { transform: translateX(0); } 92%, 100% { transform: translateX(710%); } }
.xm-globe .xm-btn.is-gold::after { left: -40%; animation: sg-btn-shine-t 4.2s ease-in-out infinite 1s; }
@keyframes sg-btn-shine-t { 0%, 70% { transform: skewX(-20deg) translateX(0); } 100% { transform: skewX(-20deg) translateX(580%); } }
.xm-globe .sg-title { height: 132px; justify-content: center; flex: none; }
.xm-globe .sg-head { min-height: 64px; flex: none; }
@property --g { syntax: '<length>'; inherits: true; initial-value: 240px; }
.sg-globe { transition: --g .7s cubic-bezier(.3,0,.2,1); }
/* every base in one fixed frame (their pictures differ in height): changing the base never moves the globe */
.xm-globe .sg-base { aspect-ratio: 900 / 560; display: flex; align-items: flex-end; justify-content: center; }
.xm-globe .sg-base > .sg-base-pic, .xm-globe .sg-base > svg { width: 100%; height: 100%; object-fit: contain; object-position: 50% 100%; }
/* the first size of a new globe is set at once; only later changes glide */
.sg-globe { transition: none; }
.sg-globe.is-sized { transition: --g .7s cubic-bezier(.3,0,.2,1); }
/* the studio's floating controls keep the height of its tallest step: the globe holds still from step to step */
.sg-room.is-studio > .sg-dock { min-height: 296px; justify-content: flex-end; }
.sg-room.is-studio > .sg-dock > .sg-page { justify-content: flex-end; }
/* words that appear later have their place kept */
.sg-hint { min-height: 1.2em; white-space: nowrap; }
.xm-globe .xm-play [role="status"].xm-small { min-height: 1.4em; }
/* the opened globe: the glass is gone, the miniature world stands on its base, lit from within */
.sg-openworld { position: absolute; left: 0; top: 0; z-index: 3; width: 100%; height: auto; aspect-ratio: 1; pointer-events: none; }
.sg-globe.is-open .sg-sphere { visibility: hidden; }
.sg-piece.is-glass { mix-blend-mode: screen; background-size: cover; }
.sg-piece.is-glass .sg-piece-glint { opacity: .6; }
/* "turn your sound on": a small glass pill under the title, as the reference shows it */
.sg-soundhint { display: flex; justify-content: center; margin-top: 4px; }
.sg-soundhint span { padding: 6px 14px; border-radius: 99px; background: rgba(40,12,8,.55); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border: 1px solid rgba(233,196,120,.45); color: #F3E2C4; font: italic 600 14px/1.2 var(--serif); letter-spacing: .3px; }
.sg-room.is-painted > .sg-soundhint { position: relative; z-index: 3; }
/* the creator's first screen: the send button and the preview link float under the globe */
.sg-dock .sg-trylink { align-self: center; margin: -2px 0 0; padding: 4px 10px; }
.sg-herocount:empty { display: none; }
/* budget phones: the same look with far less work (no drifting full-screen blur, no glass blur, no near snow) */
.sg-lite .sg-room-pic { animation: none !important; }
.sg-lite .sg-room.is-focus .sg-room-pic { filter: brightness(.72) saturate(1.1); }
.sg-lite .sg-near, .sg-lite .sg-bokeh { display: none; }
.sg-lite .sg-caption, .sg-lite .sg-dock .xm-input, .sg-lite .sg-dock .xm-who-card, .sg-lite .sg-soundhint span,
.sg-lite .xm-say, .sg-lite .xm-sound, .sg-lite .xm-lang { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
.sg-lite .sg-caption { background: rgba(70,26,18,.92); }

/* QA 24 Nov 2026 (320/360 px): six scene names in one row - a smaller label so a word fits its column */
@media (max-width: 380px) { .sg-dock .sg-choice > span:last-child { font-size: 11.5px; letter-spacing: -.1px; } }
@media (max-width: 340px) { .sg-dock .sg-choice > span:last-child { font-size: 10.5px; } }
/* QA 24 Nov 2026: short phones (320x568). The stage's 580 px floor was taller than the screen: the main button fell
   below the edge and the step title rode into the logo. Fit the screen exactly, a little tighter. */
@media (max-height: 600px) {
  .sg-room.is-stage { min-height: 0; padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
  .sg-question { font-size: 21px; } .sg-kicker { font-size: 13px; min-height: 16px; }
  .sg-dock { gap: 8px; }
  .xm-globe .sg-dock .xm-who-card { min-height: 54px; }
  .xm-globe .sg-dock .sg-thumb { max-width: 44px; }
}
/* QA 24 Nov 2026: the creator's page - the wishes panel's gold ornament (top -15 px) sat over "See what your friends
   see" and the wish count at the foot of the stage: keep the stage's last line clear of it; a full 30 px tap target */
.is-mine > .sg-room.is-stage { padding-bottom: calc(50px + env(safe-area-inset-bottom)); }   /* the panel rises 26 px over the stage + its ornament 15 px */
.sg-dock .sg-trylink { padding: 7px 12px; }
/* QA 24 Nov 2026: the four "what falls inside" choices looked alike - the scene dims behind the bigger falling things */
.sg-thumb.is-fall > svg, .sg-thumb.is-fall > img, .sg-thumb.is-fall > picture { filter: brightness(.5) saturate(.85); }
@media (max-height: 600px) { .xm-globe .sg-dock .xm-input { min-height: 46px; padding-top: 8px; padding-bottom: 8px; } }
/* the stage's wish count repeats the panel's just below: on a short phone (two lines at 320 px) it gives way */
@media (max-height: 600px) { .sg-herocount { display: none; } }
/* QA 24 Nov 2026 (Chrome, 320 px landing): the globe is smaller there and the character covered a third of it */
@media (max-width: 340px) {
  .sg-globe > .sg-castbox.sg-host, .sg-globe > .xm-char.sg-host { right: -38%; }
  .sg-globe > .sg-castbox.sg-host.is-left { right: auto; left: -38%; }
}
/* QA 24 Nov 2026 (Chrome): a picked choice in the dock showed a square tint behind its round picture - the gold ring on
   the picture is the only mark */
.xm-globe .sg-dock .sg-choice.is-picked, .xm-globe .sg-dock .sg-choice:focus-visible { background: none; border: 0; box-shadow: none; }
.xm-globe .sg-dock .sg-choice { -webkit-tap-highlight-color: transparent; outline: none; }
/* QA 24 Nov 2026 (owner: every stand must fit its globe, nothing patched): the name sits in the middle of each stand's
   own plaque, measured on the pictures - gold 59 %, wood 60 %, pastel 61 %, crystal 58 % of the stand's height */
.sg-globe.is-painted .sg-base[data-base="wood"] .sg-plate { top: 60%; }

/* ═══ The Christmas greeting (owner, 24 Nov 2026: "the perfect Christmas greetings tool") ═══════════════════════════ */
/* step 5: a ready greeting (cycled with "Another one") or the creator's own words */
.sg-greet .sg-greet-text { display: block; font: italic 600 clamp(17px, 5vw, 20px)/1.25 var(--serif); color: #FBEFD6; text-wrap: balance; min-height: 2.5em; }
.sg-greet > span { margin-top: 4px; }
.sg-ownbox { display: flex; flex-direction: column; gap: 4px; }
.xm-globe .sg-note { min-height: 86px; resize: none; text-align: center; font: italic 600 18px/1.3 var(--serif); color: #FBEFD6; padding: 10px 12px; }
/* an own greeting runs in its own writing direction: English typed on the Arabic page read "!and a happy new year
   ahead" (full QA 28 Nov); Arabic on any page stays right-to-left */
.xm-globe .sg-note, .sg-card-greeting { unicode-bidi: plaintext; }
.sg-note-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 18px; }
.sg-note-foot .xm-error { margin: 0; text-align: start; font-size: 13px; }
.sg-note-count { flex: none; font: 600 12px/1 var(--serif); color: rgba(233,199,122,.75); }
.sg-note-count.is-over { color: #FF8A80; }
.sg-greet-row { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; }
.sg-greet-row .xm-link { padding: 7px 6px; font: 700 15px/1.2 var(--serif); color: #F3E3BF; }
@media (max-height: 600px) { .xm-globe .sg-note { min-height: 70px; font-size: 16px; } .sg-greet .sg-greet-text { font-size: 16px; } }
/* on the card: under the wish, smaller and in elegant italic; the wish icon makes room */
.sg-card-greeting { margin-top: 6px; font: italic 600 calc(16px * var(--fit, 1))/1.28 var(--serif); color: #5A3412; text-wrap: balance; overflow-wrap: anywhere; }
@supports (width: 1cqw) {
  /* measured in Chrome (320/360/390): the card had ~80 px free above and below - the words use the card */
  .sg-card.is-painted.has-greeting .sg-card-merry { font-size: 14cqw; }
  .sg-card.is-painted.has-greeting .sg-card-greeting { font-size: calc(13.2cqw * var(--fit, 1)); margin-top: 3.5cqw; line-height: 1.26; }
  .sg-card.is-painted.has-greeting .sg-card-emoji { margin: 3.5cqw 0 1cqw; }
  .sg-card.is-painted.has-greeting .sg-card-emoji .sg-wishicon { width: 19cqw; }
  .sg-card.is-painted.has-greeting .sg-card-line { font-size: 8.6cqw; opacity: .9; }
  .sg-card.is-painted.has-greeting .sg-card-from { margin-top: 2.5cqw; font-size: 10cqw; }
}
.sg-card-greeting { color: #6E2414; }
.sg-ownbox[hidden], .sg-greet[hidden], .sg-greet-row .xm-link[hidden] { display: none; }   /* one of the two at a time */
.sg-note-foot .xm-error { font: italic 700 14px/1.25 var(--serif); color: #FFB4A8; }

/* ── twelve scenes (24 Nov): one swipeable row instead of a squeezed grid; ~5.4 showing, the edges fade so the next
   scene visibly peeks in; snap to each globe; no scrollbar. RTL scrolls the other way by itself. ── */
.sg-dock .sg-choices.is-scroll { display: grid; grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: calc((100% - 4 * 8px) / 5.4);
  gap: 8px; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scroll-padding-inline: 10px;
  padding: 6px 10px 4px; margin-inline: -10px; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 26px), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 26px), transparent 100%); }
.sg-dock .sg-choices.is-scroll::-webkit-scrollbar { display: none; }
.sg-dock .sg-choices.is-scroll .sg-choice { scroll-snap-align: start; max-width: none; }
.sg-dock .sg-choices.is-scroll .sg-choice > span:last-child { min-height: 2.24em; }

/* ── the ball styles (24 Nov): a glass finish over the painted glass (its black is see-through by `screen`) and a
   topper on the crown, drawn in the same square as the sphere so it sits on the glass at every globe size ── */
.sg-ballfx { position: absolute; inset: 0; z-index: 5; border-radius: 50%; overflow: hidden; pointer-events: none; mix-blend-mode: screen; }
.sg-ballfx:empty { display: none; }
.sg-ballfx > img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.sg-crown, .sg-glasscrown { position: absolute; left: 0; top: 0; width: 100%; aspect-ratio: 1; z-index: 3; pointer-events: none; }
.sg-topper { position: absolute; left: 50%; transform: translate(-50%, 0); height: auto; display: block; filter: drop-shadow(0 4px 6px rgba(0,0,0,.45)); }
.sg-topper[data-k="cap"] { width: 34%; bottom: 95%; }            /* the filigree cap's rim rests on the glass */
.sg-topper[data-k="crown"] { width: 30%; bottom: 95.5%; }
.sg-topper[data-k="bow"] { width: 20%; top: -9%; }               /* the knot on the crown, the tails down the glass */
/* the room a topper takes above the glass (TOPPER_ROOM in globe.js), so the globe is centred with it */
.sg-globe[data-topper="cap"], .sg-globe[data-topper="crown"] { padding-top: calc(var(--g, 240px) * .27); }
.sg-globe[data-topper="bow"] { padding-top: calc(var(--g, 240px) * .1); }
.sg-globe.is-open .sg-ballfx { visibility: hidden; }
/* the choice thumbnail: the creator's scene in that ball, the topper above it (not clipped by the round thumb) */
.sg-thumb.is-glass, .xm-globe .sg-dock .sg-thumb.is-glass { overflow: visible; border-radius: 0; background: none; box-shadow: none; }
.sg-thumb.is-glass::after { display: none; }
.sg-glassball { position: absolute; left: 9%; right: 9%; top: 18%; aspect-ratio: 1; border-radius: 50%; overflow: hidden; isolation: isolate;
  background: radial-gradient(70% 70% at 50% 35%, #3E4F94, #1C2554); box-shadow: 0 0 0 1px rgba(242,210,126,.45), 0 8px 16px rgba(0,0,0,.55); }
.sg-glassball > img, .sg-glassball > svg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sg-glasscrown { left: 9%; top: 18%; width: 82%; }
.xm-globe .sg-dock .sg-choice.is-picked .sg-thumb.is-glass { box-shadow: none; }
.xm-globe .sg-dock .sg-choice.is-picked .sg-glassball { box-shadow: 0 0 0 2px #F6D98A, 0 0 0 5px rgba(246,217,138,.22), 0 0 22px rgba(255,200,100,.75); }

/* ── the last step (24 Nov): the card design + the song; two compact rows in the dock ── */
.sg-dock .sg-choices.is-cards, .sg-dock .sg-choices.is-songs { gap: 6px; }
.sg-dock .sg-choices.is-songs { margin-top: 2px; }
.xm-globe .sg-dock .sg-thumb.is-card { aspect-ratio: 3 / 4; max-width: 42px; border-radius: 5px; overflow: hidden; }
.xm-globe .sg-dock .sg-thumb.is-card::after { display: none; }
.sg-thumb.is-card > img { object-fit: cover; }
.xm-globe .sg-dock .sg-thumb.is-song { max-width: 44px; display: grid; place-items: center; background: radial-gradient(circle at 50% 35%, rgba(140,70,60,.9), rgba(50,14,10,.95)); }
.sg-thumb.is-song > b { font-size: 21px; line-height: 1; font-weight: 400; filter: drop-shadow(0 2px 4px rgba(0,0,0,.5)); }
.xm-globe .sg-dock .sg-choice.is-picked .sg-thumb.is-song > b { animation: sg-note-bob 1.2s ease-in-out infinite; }
@keyframes sg-note-bob { 0%, 100% { transform: translateY(0) rotate(-6deg); } 50% { transform: translateY(-2px) rotate(6deg); } }
.sg-finish > span { font-style: italic; }
@media (prefers-reduced-motion: reduce) { .xm-globe .sg-dock .sg-choice.is-picked .sg-thumb.is-song > b { animation: none; } }
@media (max-height: 640px) { .xm-globe .sg-dock .sg-thumb.is-card { max-width: 36px; } .xm-globe .sg-dock .sg-thumb.is-song { max-width: 38px; } .sg-thumb.is-song > b { font-size: 18px; } }
/* the card designs: the words take each card's own colours (the classic gold-holly card keeps the rules above) */
.xm-globe .sg-card[data-card="midnight"] .sg-card-merry, .xm-globe .sg-card[data-card="midnight"] .sg-card-merry .xm-name { color: #F2D58A; }
.xm-globe .sg-card[data-card="midnight"] .sg-card-greeting, .xm-globe .sg-card[data-card="midnight"] .sg-card-line { color: #EEF2FF; }
.xm-globe .sg-card[data-card="midnight"] .sg-card-for, .xm-globe .sg-card[data-card="midnight"] .sg-card-from { color: #C9D6F2; }
.xm-globe .sg-card[data-card="rustic"] .sg-card-merry, .xm-globe .sg-card[data-card="rustic"] .sg-card-merry .xm-name { color: #FFE2A0; }
.xm-globe .sg-card[data-card="rustic"] .sg-card-greeting, .xm-globe .sg-card[data-card="rustic"] .sg-card-line { color: #FFF4E2; }
.xm-globe .sg-card[data-card="rustic"] .sg-card-for, .xm-globe .sg-card[data-card="rustic"] .sg-card-from { color: #F6CF94; }
.xm-globe .sg-card[data-card="midnight"] > div, .xm-globe .sg-card[data-card="rustic"] > div { text-shadow: 0 1px 6px rgba(0,0,0,.45); }
.xm-globe .sg-card[data-card="cute"] .sg-card-merry, .xm-globe .sg-card[data-card="cute"] .sg-card-merry .xm-name { color: #D2386E; }
.xm-globe .sg-card[data-card="cute"] .sg-card-greeting, .xm-globe .sg-card[data-card="cute"] .sg-card-line { color: #5C2E1E; }
.xm-globe .sg-card[data-card="cute"] .sg-card-for, .xm-globe .sg-card[data-card="cute"] .sg-card-from { color: #2E8A6E; }
/* the rustic card's pine border is the thickest: its words keep to the red paper (QA 24 Nov: "Merry Christmas" touched
   the branches at 320 px); the cute card's candy border a little more than the classic */
.sg-card.is-painted[data-card="rustic"] { padding: 19% 17% 16%; }
.sg-card.is-painted[data-card="cute"] { padding: 16% 15% 14%; }
/* the swipe strip clips its overflow: room above and below for the picked globe's lift and glow, which is a little
   tighter here, so it never shows as a cut-off square (Chrome QA 24 Nov, 320 px) */
.sg-dock .sg-choices.is-scroll { padding-top: 12px; padding-bottom: 8px; margin-top: -6px; margin-bottom: -4px; }
.xm-globe .sg-dock .sg-choices.is-scroll .sg-choice.is-picked .sg-thumb { box-shadow: 0 0 0 2px #F6D98A, 0 0 0 4px rgba(246,217,138,.22), 0 0 10px rgba(255,200,100,.7); }
/* the studio panel takes only what its step needs (Chrome QA 24 Nov: the fixed 296 px held ~80 px of empty space on the
   one-row steps, so on 320/360 phones the globe sat at its smallest size); the globe eases bigger/smaller between steps
   (its --g transition), the buttons stay anchored at the bottom */
.sg-room.is-studio > .sg-dock { min-height: 0; margin-top: auto; }

/* ── premium pass 2 (25 Nov 2026): the friend's wish back, its sent seal, the creator's wall of wishes ───────────── */
/* the wish back: the same round gold medallions the creator chose from, names under them, four to a row */
.sg-backwishes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 6px; justify-items: center; margin: 6px auto 2px; max-width: 380px; }
.sg-backwishes[hidden], .sg-sentseal[hidden] { display: none; }
.sg-backwish { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; max-width: 84px; padding: 0; border: 0; background: none; color: inherit; cursor: pointer;
  -webkit-tap-highlight-color: transparent; transition: opacity .45s, transform .45s cubic-bezier(.3,0,.2,1), filter .45s; }
.sg-medal { display: grid; place-items: center; width: 100%; max-width: 62px; aspect-ratio: 1; border-radius: 50%; padding: 12px;
  background: radial-gradient(circle at 35% 28%, rgba(255,235,210,.25), rgba(110,40,28,.8) 55%, rgba(40,12,8,.94));
  box-shadow: 0 0 0 1px rgba(242,210,126,.55), 0 0 0 4px rgba(242,210,126,.08), 0 8px 16px rgba(0,0,0,.55); transition: box-shadow .25s, transform .25s; }
.sg-medal .sg-wishicon, .sg-medal > b { width: 100%; font-size: 28px; line-height: 1; text-align: center; filter: drop-shadow(0 2px 4px rgba(0,0,0,.4)); }
.sg-backlabel { font: 700 13.5px/1.12 var(--serif, Georgia, serif); color: #E7D8B6; text-align: center; text-wrap: balance; overflow-wrap: anywhere; text-shadow: 0 1px 6px rgba(0,0,0,.9); }
.sg-backwish:active .sg-medal { transform: scale(.92); }
@media (hover: hover) { .sg-backwish:hover .sg-medal { box-shadow: 0 0 0 1.5px #F6D98A, 0 0 16px rgba(255,200,100,.45), 0 8px 16px rgba(0,0,0,.55); transform: translateY(-2px); } }
.sg-backwish.is-picked .sg-medal { box-shadow: 0 0 0 2px #F6D98A, 0 0 0 6px rgba(246,217,138,.22), 0 0 26px rgba(255,200,100,.85); transform: translateY(-4px) scale(1.1); }
.sg-backwish.is-picked .sg-backlabel { color: #F6D98A; }
/* sending: the others sink away, the chosen one rises before the seal takes its place */
.sg-backwishes.is-sent .sg-backwish:not(.is-picked) { opacity: 0; transform: translateY(14px) scale(.8); filter: blur(3px); pointer-events: none; }
.sg-backwishes.is-sent .sg-backwish.is-picked { transform: var(--sg-to, translate(0, 0)) scale(1.12); }
/* the seal: one big glowing medallion, gold rays turning slowly behind it, the wish's name and who will see it */
.sg-sentseal { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 10px auto 4px; padding: 26px 12px 16px; max-width: 340px; text-align: center;
  border-radius: 22px; border: 1px solid rgba(233,196,120,.45); background: radial-gradient(120% 90% at 50% 0%, rgba(255,205,120,.2), rgba(90,30,18,.25) 60%, transparent);
  box-shadow: inset 0 0 0 4px rgba(233,196,120,.06); overflow: hidden; }
.sg-sealmedal { position: relative; display: grid; place-items: center; width: 108px; height: 108px; border-radius: 50%; padding: 22px;
  background: radial-gradient(circle at 35% 28%, rgba(255,240,215,.35), rgba(130,48,30,.85) 55%, rgba(44,12,8,.95));
  box-shadow: 0 0 0 2px #F6D98A, 0 0 0 7px rgba(246,217,138,.18), 0 0 40px rgba(255,200,100,.7), 0 12px 22px rgba(0,0,0,.6); }
.sg-sealmedal .sg-wishicon, .sg-sealmedal > b { position: relative; z-index: 1; width: 100%; font-size: 52px; line-height: 1; text-align: center; filter: drop-shadow(0 0 10px rgba(255,236,180,.8)); }
.sg-sealrays { position: absolute; inset: -30px; border-radius: 50%; z-index: -1; pointer-events: none; opacity: .75;
  background: repeating-conic-gradient(from 0deg, rgba(255,222,140,.55) 0deg 5deg, transparent 5deg 22.5deg);
  -webkit-mask: radial-gradient(circle, transparent 52px, #000 56px, transparent 84px); mask: radial-gradient(circle, transparent 52px, #000 56px, transparent 84px);
  animation: sg-rays 14s linear infinite; }
.sg-sealmedal { isolation: isolate; }
@keyframes sg-rays { to { transform: rotate(360deg); } }
.sg-sealname { margin-top: 18px; font: 700 22px/1.15 var(--serif, Georgia, serif); color: #F6D98A; text-shadow: 0 0 18px rgba(255,200,100,.45); }
.sg-sealtext { margin: 0; font: italic 600 16px/1.3 var(--serif, Georgia, serif); color: var(--cream, #FFF1DC); text-wrap: balance; }
.sg-sentseal.is-new { animation: sg-sealin .9s cubic-bezier(.2,1.3,.4,1) both; }
.sg-sentseal.is-new .sg-sealmedal { animation: sg-sealstamp .9s cubic-bezier(.2,1.4,.4,1) both; }
@keyframes sg-sealin { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes sg-sealstamp { 0% { transform: scale(.3) rotate(-30deg); filter: brightness(2.2); } 60% { transform: scale(1.12) rotate(4deg); } 100% { transform: none; filter: none; } }

/* the creator's wall: every wish back is a little ornament hanging on a gold cap, two to a row */
.xm-globe .sg-count { display: flex; align-items: center; justify-content: center; gap: 10px; }
.xm-globe .sg-count { text-wrap: balance; }
.xm-globe .sg-count::before, .xm-globe .sg-count::after { content: ''; flex: 0 0 clamp(14px, 6vw, 46px); height: 1px; background: linear-gradient(90deg, transparent, rgba(242,210,126,.7)); }
.xm-globe .sg-count::after { background: linear-gradient(90deg, rgba(242,210,126,.7), transparent); }
.sg-wall:has(.sg-wallcard) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 10px; }
.sg-wall > .sg-more, .sg-wall > .xm-dots { grid-column: 1 / -1; }
.sg-wallcard { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; padding: 36px 8px 12px; margin-top: 26px; text-align: center;
  border-radius: 20px; border: 1px solid rgba(233,196,120,.38); background: radial-gradient(120% 80% at 50% 0%, rgba(255,205,120,.14), rgba(90,30,18,.3) 70%); box-shadow: 0 10px 20px rgba(0,0,0,.35); }
/* the round ornament half above the card, on its gold cap */
.sg-ornament { position: absolute; top: -26px; left: 50%; margin-left: -26px; display: grid; place-items: center; width: 52px; height: 52px; padding: 10px; border-radius: 50%;
  background: radial-gradient(circle at 35% 28%, rgba(255,240,215,.35), rgba(130,48,30,.88) 55%, rgba(44,12,8,.96));
  box-shadow: 0 0 0 1.5px #F2D27E, 0 0 16px rgba(255,200,100,.4), 0 6px 12px rgba(0,0,0,.5); transform-origin: 50% -10px; animation: sg-swing 4.5s ease-in-out infinite; }
.sg-ornament::before { content: ''; position: absolute; left: 50%; top: -8px; width: 14px; height: 9px; margin-left: -7px; border-radius: 3px 3px 2px 2px;
  background: linear-gradient(180deg, #FFF0B8, #C9962E); box-shadow: 0 1px 2px rgba(0,0,0,.4); }
.sg-wallcard:nth-child(2n) .sg-ornament { animation-delay: -2.2s; }
@keyframes sg-swing { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } }
.sg-ornament .sg-wishicon, .sg-ornament > b { width: 100%; font-size: 24px; line-height: 1; text-align: center; }
.xm-globe .sg-wallcard strong { display: block; max-width: 100%; font: 400 clamp(22px, 6.4vw, 27px)/1.1 var(--script, cursive); color: #F6D98A; overflow-wrap: anywhere; text-wrap: balance; }
.sg-wallcard > span:last-child { font: italic 600 14.5px/1.2 var(--serif, Georgia, serif); color: var(--soft-cream, #EAD6C2); text-wrap: balance; }
.sg-wallcard.is-new { animation: sg-wallnew2 1.6s ease-out both; }
@keyframes sg-wallnew2 { 0% { box-shadow: 0 0 0 2px #F6D98A, 0 0 34px rgba(255,200,100,.8); } 100% { box-shadow: 0 10px 20px rgba(0,0,0,.35); } }
/* nothing back yet: three empty ornament rings waiting */
.sg-wallempty { display: flex; justify-content: center; gap: 16px; margin: 4px 0 8px; }
.sg-wallempty i { width: 44px; height: 44px; border-radius: 50%; border: 1.5px dashed rgba(242,210,126,.55); background: radial-gradient(circle, rgba(255,210,130,.1), transparent 70%);
  animation: sg-swing 4.5s ease-in-out infinite; transform-origin: 50% -12px; }
.sg-wallempty i:nth-child(2) { animation-delay: -1.5s; margin-top: 8px; }
.sg-wallempty i:nth-child(3) { animation-delay: -3s; }
/* titles never leave one word alone on the last line */
.xm-globe .sg-title .xm-logo-main, .xm-globe .xm-h2 { text-wrap: balance; }
@media (prefers-reduced-motion: reduce) {
  .sg-sealrays, .sg-ornament, .sg-wallempty i { animation: none; }
  .sg-sentseal.is-new, .sg-sentseal.is-new .sg-sealmedal { animation: none; }
}
/* CJK: the script font has no Han/kana/hangul letters - they fall back to the system serif (Mincho/Myeongjo/Song), never
   to a generic 'cursive' font (phase 6, 25 Nov 2026) */
:lang(ja) .xm-globe, :lang(ko) .xm-globe, :lang(zh) .xm-globe, .xm-globe:lang(ja), .xm-globe:lang(ko), .xm-globe:lang(zh) { --script: 'Great Vibes', 'Cormorant Garamond', serif; }
/* the card headline in Chinese, Japanese and Korean: smaller by its width (--mfit from globe.js) and never broken inside
   a word like メリークリスマス (only after its comma) */
@supports (width: 1cqw) {
  .xm-globe .sg-card.is-painted .sg-card-merry { font-size: calc(12.5cqw * var(--mfit, 1)); }
  .xm-globe .sg-card.is-painted.has-greeting .sg-card-merry { font-size: calc(14cqw * var(--mfit, 1)); }
}
:lang(ja) .xm-globe .sg-card-merry, :lang(zh) .xm-globe .sg-card-merry { word-break: keep-all; overflow-wrap: anywhere; }
:lang(ja) .xm-globe .sg-card-greeting, :lang(zh) .xm-globe .sg-card-greeting, :lang(ja) .xm-globe .sg-card-line, :lang(zh) .xm-globe .sg-card-line { line-break: strict; }
/* option and wish labels: a long single word (it "Divertimento", de compounds) is hyphenated in the page's language
   instead of being cut at any letter; a little smaller on the narrowest phones (phase 6 sweep, 25 Nov 2026) */
.sg-backlabel, .sg-dock .sg-choice > span:last-child { overflow-wrap: break-word; word-break: normal; -webkit-hyphens: auto; hyphens: auto; }
.sg-backlabel { font-size: clamp(12px, 3.75vw, 13.5px); }
:lang(ja) .sg-backlabel, :lang(zh) .sg-backlabel, :lang(ja) .sg-dock .sg-choice > span:last-child, :lang(zh) .sg-dock .sg-choice > span:last-child { word-break: normal; line-break: strict; }
/* Korean breaks only between words (core.css :lang(ko) keep-all) - the label rule above must not undo that */
:lang(ko) .sg-backlabel, :lang(ko) .sg-dock .sg-choice > span:last-child { word-break: keep-all; }
/* Thai: "สุขสันต์วันคริสต์มาส" is one run without spaces and the Thai font is wide - the card headline a step smaller */
@supports (width: 1cqw) {
  :lang(th) .xm-globe .sg-card.is-painted .sg-card-merry { font-size: calc(10.5cqw * var(--mfit, 1)); }
  :lang(th) .xm-globe .sg-card.is-painted.has-greeting .sg-card-merry { font-size: calc(11.5cqw * var(--mfit, 1)); }
}
/* the label never grows wider than its button (a centred flex child takes its text's width otherwise), so the wrap and
   hyphen rules above actually apply - de "Kuschelhütte", ta "சந்தோஷமும்" */
.sg-backlabel, .sg-dock .sg-choice > span:last-child { max-width: 100%; box-sizing: border-box; }
/* Tamil: the title's letters are tall and wide in its Baloo font - a step smaller so the globe keeps its room */
:lang(ta) .xm-globe .sg-title .xm-logo-main { font-size: clamp(26px, 8.4vw, 38px) !important; }
:lang(ta) .xm-globe .sg-title .xm-logo-top { font-size: clamp(19px, 6vw, 26px) !important; }
/* Tamil option and wish labels: its letters run wide - one step smaller so a word breaks less often */
:lang(ta) .sg-backlabel, :lang(ta) .sg-dock .sg-choice > span:last-child { font-size: 10.5px !important; line-height: 1.15; }
/* the wall: a lone wish (one back, or the last of an odd number) sits in the middle, not stuck to the left (QA 25 Nov) */
.sg-wall > .sg-wallcard:last-child:nth-child(odd), .sg-wall > .sg-wallcard:nth-last-child(2):nth-child(odd):has(+ .sg-more) {
  grid-column: 1 / -1; justify-self: center; width: calc(50% - 5px); }
.sg-sendwait { margin: 8px auto 0; max-width: 320px; text-align: center; font: italic 600 14.5px/1.3 var(--serif, Georgia, serif); color: #E7D8B6; text-wrap: balance; }
/* the smash hint may take two lines where the language is long (Tamil at 360 ran off the screen) - QA 25 Nov */
.xm-globe .sg-hint { white-space: normal; text-wrap: balance; max-width: calc(100vw - 32px); margin-inline: auto; }
:lang(ta) .xm-globe .sg-hint { font-size: clamp(17px, 5.2vw, 21px); }
/* song labels: the whole grid cell, never broken inside a song name (O Tannenbaum) */
.sg-dock .sg-choices.is-songs .sg-choice { max-width: none; }
.sg-dock .sg-choices.is-songs .sg-choice > span:last-child { -webkit-hyphens: manual; hyphens: manual; overflow-wrap: normal; }

/* ═══ Premium pass 3 (owner, 25 Nov 2026, on a phone: name not centred on the base, cursive names hard to read) ═══ */
/* the painted stand sits in a box of its own true shape (sized by globe.js), so the plate and glint are on the picture */
.sg-base-in { position: relative; flex: none; margin: 0 auto; }
.sg-base-in > .sg-base-pic { width: 100%; height: 100%; object-fit: fill; }
/* the engraving: centred however long the name is, sized by measuring (globe.js fitPlate), crisp dark letters */
.sg-plate { display: flex; justify-content: center; text-overflow: clip; letter-spacing: 0; }
.sg-globe.is-painted .sg-base .sg-plate { width: 32%; font-weight: 800; line-height: 1; text-shadow: 0 1px 0 rgba(255,246,220,.7); }
/* names: an upright bold serif (Cormorant Garamond 700, no slant - owner 25 Nov: italic still read as cursive) instead of the thin script - readable at phone sizes; the script
   stays only on the title's small top line */
.xm-globe .xm-name { font-family: var(--serif); font-style: normal; font-weight: 700; font-size: 1.08em; line-height: 1; padding: 0 .04em; letter-spacing: .2px; }
.xm-globe .sg-wallrow strong { font-family: var(--serif); font-style: normal; font-weight: 700; font-size: 1.12em; }
.xm-globe .sg-card-from { font-family: var(--serif); font-style: normal; font-weight: 700; font-size: 1.2em; }
@supports (width: 1cqw) { .xm-globe .sg-card.is-painted .sg-card-from { font-size: 9.6cqw; } }
.xm-globe .sg-wallcard strong { font: normal 700 clamp(19px, 5.4vw, 23px)/1.15 var(--serif); }
/* names in Chinese, Japanese and Korean: the serif has no such letters - the page's own font, bold, no slant */
:lang(ja) .xm-globe .xm-name, :lang(ko) .xm-globe .xm-name, :lang(zh) .xm-globe .xm-name { font-style: normal; }
/* a long two-word name on two lines (globe.js fitPlate), both centred on the plaque */
.sg-plate.is-two { flex-direction: column; align-items: center; line-height: 1.05; }
/* the stand's gold shine runs right after it lands, quicker (owner 25 Nov: option taps felt slow) */
.sg-base.is-glinting .sg-glint { animation-duration: .8s; animation-delay: .22s; }

/* ═══ The shorter flow (owner, 25 Nov 2026): 4 steps, one main choice each, its partner as small chips under it ═══ */
.sg-subrow { display: flex; justify-content: center; gap: 6px; flex-wrap: nowrap; margin-top: -2px; }
.sg-subchip { display: inline-flex; align-items: center; gap: 5px; min-width: 0; min-height: 34px; padding: 4px 10px 4px 7px; border-radius: 999px;
  border: 1px solid rgba(233,199,122,.35); background: rgba(20,10,8,.42); color: #EADBB8; font: 700 13px/1 var(--serif, Georgia, serif);
  white-space: nowrap; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: border-color .2s, background .2s, transform .15s; }
.sg-subchip:active { transform: scale(.95); }
.sg-subchip.is-picked { border-color: #F2D58A; background: linear-gradient(180deg, rgba(242,213,138,.28), rgba(150,100,30,.28)); color: #FFF3D6; box-shadow: 0 0 0 1px rgba(242,213,138,.45), 0 0 12px rgba(242,213,138,.25); }
.sg-subchip > b { font-size: 15px; line-height: 1; text-shadow: 0 0 6px rgba(0,0,0,.6); }
.sg-subchip > .sg-subpic { width: 30px; height: auto; flex: none; }
.sg-subchip > span { overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 380px) { .sg-subrow { gap: 4px; } .sg-subchip { padding: 4px 7px 4px 5px; font-size: 12px; gap: 3px; } .sg-subchip > .sg-subpic { width: 24px; } }
/* the wish step carries the greeting: the wish's name, then the greeting on the card under it */
.sg-caption.is-merged .sg-greet-text { min-height: 0; margin-top: 3px; font-size: clamp(15px, 4.4vw, 17px); }
.sg-caption.is-merged .sg-greet-text[hidden], .sg-choices[hidden], .sg-greet-row[hidden] { display: none; }
.sg-globe.is-painted .sg-base .sg-plate.is-two { line-height: 1.12; }   /* the two lines never touch */
/* chips never cut a word (QA 25 Nov, Tamil + Arabic at 320): whole labels, room for tall scripts, a second row only
   when a language needs it */
.sg-subrow { flex-wrap: wrap; row-gap: 6px; }
.sg-subchip { flex: 0 1 auto; line-height: 1.25; }
.sg-subchip > span { overflow: visible; text-overflow: clip; line-height: 1.25; padding-block: 1px; }
:lang(ta) .sg-subchip, :lang(ml) .sg-subchip { font-size: 12px; }
/* small and short phones (QA 25 Nov 2026, 320x568: the taller panels covered the globe) */
.sg-subrow { flex-wrap: nowrap; }
.sg-subrow.is-icons { gap: 8px; }
.sg-subrow.is-icons .sg-subchip { padding: 4px 9px; min-width: 44px; justify-content: center; }
.sg-subrow.is-icons .sg-subchip > span { display: none; }
.sg-subrow.is-icons .sg-subchip > b { font-size: 18px; }
.sg-subrow.is-icons .sg-subchip > .sg-subpic { width: 34px; }

.sg-greet-row { row-gap: 0; column-gap: 14px; }
@media (max-height: 700px) {
  .xm-globe .sg-dock .sg-choices.is-wishes { gap: 6px 8px; }
  .xm-globe .sg-dock .sg-wishcard .sg-wishicon { max-width: 46px; padding: 8px; }
  .sg-room.is-studio .sg-caption:not(.is-merged):not(.sg-finish) > span { display: none; }   /* the hint line only; the song name stays */
  .sg-greet-row .xm-link { padding: 4px 6px; font-size: 14px; }
}
.sg-greet-row .xm-link { min-height: 32px; display: inline-flex; align-items: center; }
@media (max-height: 700px) {
  .sg-caption.is-merged { padding-top: 7px; padding-bottom: 7px; }
  .sg-caption.is-merged .sg-greet-text { font-size: 14.5px; margin-top: 1px; }
  .xm-globe .sg-dock .sg-wishcard .sg-wishicon { max-width: 42px; padding: 7px; }
  .sg-greet-row .xm-link { min-height: 30px; padding: 0 6px; }
}
@media (max-height: 700px) {
  .xm-globe .sg-dock .sg-choices.is-wishes .sg-wishcard { min-height: 0; padding: 2px 0; }

}
@media (max-width: 380px) {   /* Tamil's two greeting links side by side on a small phone (they wrapped, QA 25 Nov) */
  :lang(ta) .sg-greet-row { column-gap: 6px; flex-wrap: nowrap; }
  :lang(ta) .sg-greet-row .xm-link { font-size: 12.5px; padding: 0 3px; white-space: nowrap; }
}
/* Japanese / Chinese picker labels break only between words (globe.js pickLabel puts <wbr> there): "クリスマス|列車",
   never "クリスマ|ス列車" (Chrome QA 26 Nov); a single word wider than the label still breaks rather than spilling out */
.xm-globe .sg-choice > span.sg-words:last-child { word-break: keep-all; overflow-wrap: anywhere; line-break: strict; }
/* the card in Japanese / Chinese: the same word breaks (globe.js wordBreaks) for the headline, greeting and wish line,
   so a line never starts with "、" nor ends in "メリークリスマ|ス！" (Chrome QA 26 Nov, 320 px; the card scales, so every size) */
.xm-globe .sg-card .sg-words { word-break: keep-all; overflow-wrap: anywhere; line-break: strict; }
/* the song labels' "never broken inside a song name" rule is more specific: give their word-broken (ja/zh) form the same
   safety net, so one long word still breaks instead of spilling out (independent review 26 Nov) */
.xm-globe .sg-dock .sg-choices.is-songs .sg-choice > span.sg-words:last-child { overflow-wrap: anywhere; }
/* the smash shot shakes the whole room (a transform) on every tap: in Arabic its overflow on the left let the page slide
   3 px sideways with each tap (premium pass 26 Nov, layout-shift detector); clip, not hidden, so nothing becomes a scroller */
.xm-globe .xm-scene.is-smash { overflow-x: clip; }

/* ── 27 Nov 2026, owner's phone test ──────────────────────────────────────────────────────────────────────────────
   (1) the landing's demo globes changed every 4 s and the globe jumped up to 23 px (a topper takes room above the glass,
   the box grew or shrank at once): the showcase keeps the tallest topper's room all the time (.is-roomy), and anywhere a
   ball is picked that room now glides instead of jumping */
.sg-globe.is-sized { transition: --g .7s cubic-bezier(.3,0,.2,1), padding-top .5s cubic-bezier(.3,0,.2,1); }
.sg-globe.is-roomy { padding-top: calc(var(--g, 240px) * .27); }
/* (2) the smash: what to do is clear at once - a hand on a dark glass disc in the middle of the ball, gold rings
   spreading from its tip on every press, the line above glowing and beating with it until the first tap */
.xm-globe .sg-finger.is-badge { left: 50%; top: 56%; width: 66px; height: 66px; margin: -33px 0 0 -33px; font-size: 0; display: grid; place-items: center;
  border-radius: 50%; background: radial-gradient(circle at 50% 40%, rgba(40,22,52,.72), rgba(14,8,24,.82)); box-shadow: 0 0 0 2px rgba(246,217,138,.9), 0 0 22px rgba(255,214,120,.6), 0 6px 16px rgba(0,0,0,.55);
  animation: sg-badge 1.3s ease-in-out infinite; filter: none; }
.sg-finger-hand { font-size: 36px; line-height: 1; translate: 3px 4px; filter: drop-shadow(0 2px 3px rgba(0,0,0,.5)); }
.sg-finger-ring { position: absolute; inset: 0; border-radius: 50%; border: 3px solid rgba(255,226,140,.95); opacity: 0; animation: sg-badge-ring 1.3s ease-out infinite; }
.sg-finger-ring.is-late { animation-delay: .18s; border-width: 2px; }
@keyframes sg-badge { 0%, 35%, 100% { transform: scale(1); } 48% { transform: scale(.86); } 62% { transform: scale(1.04); } }
@keyframes sg-badge-ring { 0%, 44% { transform: scale(.9); opacity: 0; } 50% { opacity: .95; } 100% { transform: scale(2.1); opacity: 0; } }
.xm-globe .sg-hint.is-call { color: var(--gold-hi); text-shadow: 0 0 18px rgba(255,214,110,.75), 0 2px 10px rgba(0,0,0,.8);
  animation: sg-call 1.3s ease-in-out infinite; }
@keyframes sg-call { 0%, 35%, 100% { transform: scale(1); } 48% { transform: scale(1.06); } }
@media (prefers-reduced-motion: reduce) { .xm-globe .sg-finger.is-badge, .sg-finger-ring, .xm-globe .sg-hint.is-call { animation: none; } .sg-finger-ring { opacity: .6; } }
/* the smash line's box holds the tallest of its three lines (globe.js smash): a shorter line sits in its middle */
.xm-globe .sg-smashbar .sg-hint { display: flex; align-items: center; justify-content: center; }

/* ── the wish card, sized by the card itself (owner 29 Nov: "the message on the card too small ... never hides or
   overflows the card in any language, custom message too") ─────────────────────────────────────────────────────
   The padding used to be a percentage of the SCREEN (CSS % padding follows the parent), so on a 360 px phone 94 of the
   card's 236 px were margin and the words had a 142 px column at 12.7 px. Now the card is larger, its margins follow the
   painted frame (a share of the card's own width, --cw), the words get premium sizes in card units (cqw) and globe.js
   fitCard() shrinks them all together (--cs, never below .6) until every line sits inside the frame. */
.xm-globe .sg-card.is-painted.is-fit { --cw: min(84vw, 330px, calc((max(460px, 68dvh) - 112px) * .746));   /* the settled stage (68dvh, min 460) less the top bar and the panel's overlap */ width: var(--cw);
  padding: calc(var(--cw) * .15) calc(var(--cw) * .17) calc(var(--cw) * .13); }
.xm-globe .sg-card.is-painted.is-fit[data-card="rustic"] { padding: calc(var(--cw) * .25) calc(var(--cw) * .26) calc(var(--cw) * .25); --cs0: 1.3; }   /* a narrower column: letters start 30 % bigger, fitCard shrinks them only when needed */   /* its clear centre is smaller (oranges, pinecones; balloons in the New Year one) */
.xm-globe .sg-card.is-painted.is-fit[data-card="cute"] { padding: calc(var(--cw) * .16) calc(var(--cw) * .18) calc(var(--cw) * .14); }
.xm-globe .sg-card.is-painted.is-fit > div { max-width: 100%; white-space: normal; text-wrap: balance; }   /* long lines wrap into two even lines, clear of the frame's ornaments */
.xm-globe .sg-card.is-painted.is-fit { height: calc(var(--cw) * 900 / 672); aspect-ratio: auto; min-height: 0; }   /* locked to the painting: long words shrink (fitCard), never stretch the card (stress test 29 Nov) */
.xm-globe .sg-card.is-painted.is-fit > div { flex: none; }
@supports (width: 1cqw) {
  .xm-globe .sg-card.is-painted.is-fit .sg-card-merry { font-size: calc(12cqw * var(--mfit, 1) * var(--cs, 1)); line-height: 1.12; }
  .xm-globe .sg-card.is-painted.is-fit .sg-card-for { font-size: calc(5.4cqw * var(--cs, 1)); margin-top: calc(3cqw * var(--cs, 1)); }
  .xm-globe .sg-card.is-painted.is-fit .sg-card-emoji { margin: calc(3cqw * var(--cs, 1)) 0 calc(1.5cqw * var(--cs, 1)); }
  .xm-globe .sg-card.is-painted.is-fit .sg-card-emoji .sg-wishicon { width: calc(34cqw * var(--cs, 1)); }
  .xm-globe .sg-card.is-painted.is-fit .sg-card-line { font-size: calc(10.6cqw * var(--cs, 1)); line-height: 1.18; }
  .xm-globe .sg-card.is-painted.is-fit .sg-card-from { font-size: calc(9.4cqw * var(--cs, 1)); margin-top: calc(3cqw * var(--cs, 1)); }
  /* with the creator's greeting: the greeting leads, the wish line follows a step smaller */
  .xm-globe .sg-card.is-painted.is-fit.has-greeting .sg-card-merry { font-size: calc(11cqw * var(--mfit, 1) * var(--cs, 1)); }
  .xm-globe .sg-card.is-painted.is-fit.has-greeting .sg-card-greeting { font-size: calc(12.4cqw * var(--fit, 1) * var(--cs, 1)); margin-top: calc(3.5cqw * var(--cs, 1)); line-height: 1.24; }
  .xm-globe .sg-card.is-painted.is-fit.has-greeting .sg-card-emoji { margin: calc(3.5cqw * var(--cs, 1)) 0 calc(1cqw * var(--cs, 1)); }
  .xm-globe .sg-card.is-painted.is-fit.has-greeting .sg-card-emoji .sg-wishicon { width: calc(17cqw * var(--cs, 1)); }
  .xm-globe .sg-card.is-painted.is-fit.has-greeting .sg-card-line { font-size: calc(9.6cqw * var(--cs, 1)); opacity: .92; }
  .xm-globe .sg-card.is-painted.is-fit.has-greeting .sg-card-from { font-size: calc(9.2cqw * var(--cs, 1)); margin-top: calc(2.5cqw * var(--cs, 1)); }
  /* Thai: a wide font and one run without spaces in the headline */
  :lang(th) .xm-globe .sg-card.is-painted.is-fit .sg-card-merry { font-size: calc(9.8cqw * var(--mfit, 1) * var(--cs, 1)); }
  :lang(th) .xm-globe .sg-card.is-painted.is-fit.has-greeting .sg-card-merry { font-size: calc(9cqw * var(--mfit, 1) * var(--cs, 1)); }
}
