/* WC-UI-02: Word Connect presentation from the owner's reference PNG "Word Connect with clean ivory background" (2026-11-13).
   Word Connect page only (/games/word-connect/), scoped to body[data-wc-ui]. Loaded after the game's own styles.css.
   Presentation only: no gameplay, state, scoring or keyboard change. Glass effects are CSS gradients, inset shadows and
   pointer-transparent pseudo-elements; the PNG is a visual reference only and is not used on the page.
   Key positions and hit areas come from the game's own transform (rotate/translate by tile index). Sizes per breakpoint are
   chosen so 4-7 keys never overlap each other or the centre New board button.
   Motion: one idle shine loop on the letter keys, paused while letters are selected or the wheel is busy, off under
   prefers-reduced-motion (the game's styles.css also stops all animation there). */
body[data-wc-ui] {
  --wcu-ivory: #FBF2EB;
  --wcu-ink: #2A0B22;
  --wcu-muted: #5E3A52;
  --wcu-rasp: #E0115F;
  --wcu-rasp-deep: #8A1043;
  --wcu-rasp-grad: linear-gradient(180deg, #FB5A98 0%, #E8196A 52%, #C90E57 100%);
  --wcu-plum: #3A0C2A;
  --wcu-cell: #8F3A97;
  --wcu-focus: #6C3BFF;
  --wcu-rim: 9px;          /* frame glass band */
  --wcu-glow: 6px;         /* outer frame glow (kept below the side margin so it never clips) */
  --wcu-wheel: 216px;
  --wcu-wheel-rim: 6px;
  --wcu-key: 50px;
  --wcu-center-w: 76px;
  --wcu-center-h: 56px;
  --wcu-cell-size: 30px;
  /* Bright bevel for ivory glass surfaces (panels, pills). */
  --wcu-panel-bevel: inset 0 2px 0 #FFFFFF, inset 0 0 0 1px rgba(255, 255, 255, 0.75), inset 0 -2px 0 rgba(226, 178, 160, 0.5);
  /* Warm ivory glass panel: white reflection in the upper-left corner, warm peach glow in the lower-right corner, inset depth. */
  /* WC-UI-04: thick warm ivory glass (result board + desktop input panel). Upper-left white sheen, ivory body warming to
     peach at the lower edge. */
  --wcu-panel-bg:
    radial-gradient(60% 46% at 4% 2%, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0) 100%),
    radial-gradient(52% 40% at 98% 100%, rgba(255, 210, 188, 0.55) 0%, rgba(255, 210, 188, 0) 100%),
    radial-gradient(36% 22% at 96% 4%, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0) 70%, rgba(252, 214, 196, 0.45) 100%),
    linear-gradient(165deg, #FFFBF6 0%, #FFF4EC 55%, #FDEBE3 100%);
  /* Thick glass: bright top bevel, white rim, a wide translucent edge band (glass thickness), soft peach lower edge,
     slight lift off the frame. */
  --wcu-panel-shadow:
    inset 0 2.5px 0 #FFFFFF,                               /* bright top bevel */
    inset 0 0 0 1.5px rgba(255, 255, 255, 0.92),           /* white rim */
    inset 0 0 0 4px rgba(255, 255, 255, 0.38),             /* WC-UI-05: brighter outer half of the glass edge */
    inset 0 0 0 9px rgba(255, 255, 255, 0.34),             /* thicker translucent glass edge band (inset, inside the bounds) */
    inset 0 0 0 10px rgba(236, 172, 156, 0.2),             /* faint warm line on the band's inner edge = visible thickness */
    inset 0 9px 12px -9px rgba(255, 255, 255, 1),          /* inner bevel glow under the top */
    inset 0 5px 12px -6px rgba(196, 118, 100, 0.16),       /* warm depth below the bevel */
    inset 0 -3px 0 rgba(242, 178, 152, 0.62),              /* soft peach lower edge */
    inset 0 -14px 16px -12px rgba(248, 176, 146, 0.42),    /* peach glow above the lower edge */
    0 1px 0 rgba(255, 255, 255, 0.95), 0 0 0 1px rgba(236, 160, 176, 0.28),
    0 2px 0 rgba(232, 180, 168, 0.55), 0 14px 24px -18px rgba(150, 60, 50, 0.45);
  background: radial-gradient(1100px 520px at 50% -12%, #FFF7F1 0%, rgba(255, 247, 241, 0) 70%), var(--wcu-ivory);
  background-attachment: scroll;
  color: var(--wcu-ink);
}

/* Clean ivory surface: the decorative orbs would cross the frame, so they are not shown on this page. */
body[data-wc-ui] .ambient { display: none; }

/* ---------- Raised raspberry glass frame: deep raspberry outer edge, pink glass band, bright white inner rim ---------- */
body[data-wc-ui] .game {
  width: min(calc(100% - 16px), 520px);
  min-height: 0;
  margin: 12px auto 24px;
  padding: 14px 12px 16px;
  gap: 10px;
  border: var(--wcu-rim) solid transparent;
  border-radius: clamp(28px, 7vw, 44px);
  /* padding-box: warm peach-ivory glass, lighter at the upper left and blushing toward the edges;
     border-box: saturated raspberry glass band, lit at the top. */
  background:
    radial-gradient(120% 60% at 22% 4%, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0) 58%) padding-box,
    radial-gradient(140% 100% at 50% 40%, rgba(255, 238, 228, 0) 55%, rgba(250, 196, 214, 0.55) 100%) padding-box,
    linear-gradient(180deg, #FFEEE4 0%, #FDE5DC 50%, #FCDDDD 100%) padding-box,
    /* light pink glass band between the deep raspberry outer edge and the white inner rim */
    linear-gradient(100deg, rgba(255, 255, 255, 0) calc(var(--wcu-fs) - 16%), rgba(232, 22, 106, 0.9) calc(var(--wcu-fs) - 5%), rgba(255, 255, 255, 0.98) var(--wcu-fs), rgba(232, 22, 106, 0.9) calc(var(--wcu-fs) + 5%), rgba(255, 255, 255, 0) calc(var(--wcu-fs) + 16%)) border-box,
    linear-gradient(180deg, rgba(255, 236, 244, 0.95) 0%, rgba(252, 196, 220, 0.9) 30%, rgba(246, 160, 198, 0.9) 66%, rgba(236, 116, 172, 0.92) 100%) border-box;
  /* Layered glass bevel: bright white inner edge, a thin raspberry line inside it, a raspberry outer edge and a darker
     raspberry underside (offset shadows below the frame). */
  box-shadow:
    inset 0 0 0 3px rgba(255, 255, 255, 0.98),       /* bright white inner edge */
    inset 0 0 0 4.5px rgba(232, 40, 118, 0.65),       /* thin raspberry line inside the rim */
    inset 0 10px 18px -6px rgba(214, 40, 110, 0.14),  /* inset depth under the top band */
    inset 0 -6px 12px -6px rgba(255, 255, 255, 0.7),
    0 0 0 1.5px #F24C92,                              /* layered raspberry edge: bright outer line */
    0 0 0 3px #C80F5A,                                /* deep raspberry edge */
    0 0 0 4px rgba(255, 255, 255, 0.5),
    0 3px 0 2px #A20C4B,                              /* darker raspberry underside */
    0 0 var(--wcu-glow) rgba(245, 60, 135, 0.45),
    0 22px 40px -28px rgba(150, 20, 80, 0.6);
}
/* Curved highlight on the top of the glass band. */
body[data-wc-ui] .game::before {
  content: "";
  position: absolute;
  top: calc(var(--wcu-rim) * -1 + 2px);
  left: 12%;
  right: 12%;
  height: calc(var(--wcu-rim) * 0.45);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0));
  -webkit-mask: linear-gradient(90deg, transparent 0%, #000 22%, #000 78%, transparent 100%);
  mask: linear-gradient(90deg, transparent 0%, #000 22%, #000 78%, transparent 100%);
  pointer-events: none;
}

/* Short reflection on the lower glass band, right side. */
body[data-wc-ui] .game::after {
  content: "";
  position: absolute;
  bottom: calc(var(--wcu-rim) * -1 + 1px);
  right: 14%;
  width: 22%;
  height: calc(var(--wcu-rim) * 0.4);
  border-radius: 999px;
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0));
  pointer-events: none;
}

/* ---------- Header ---------- */
body[data-wc-ui] .eyebrow { color: var(--wcu-rasp); letter-spacing: 0.24em; font-size: clamp(0.7rem, 2.6vw, 0.95rem); }
body[data-wc-ui] #game-title { color: var(--wcu-ink); font-size: clamp(1.9rem, 9.4vw, 2.5rem); font-weight: 900; line-height: 1.05; letter-spacing: -0.02em; text-shadow: 0 1px 0 #FFFFFF; }
body[data-wc-ui] .header-meta { margin-top: 6px; gap: 4px 12px; }
body[data-wc-ui] .mode-badge {
  border: 1.5px solid rgba(255, 255, 255, 0.95);
  background: linear-gradient(180deg, #FFF4F8, #FBE1EB);
  color: #D3105F;
  font-size: 0.9rem;
  box-shadow: inset 0 1px 0 #FFFFFF, 0 1px 0 #F0C2D3;
}
body[data-wc-ui] .demo-note { color: var(--wcu-muted); }
body[data-wc-ui] .no-points { color: #6E2D8F; }
body[data-wc-ui] .progress .no-points { font-size: inherit; font-weight: 600; }

/* ---------- Round pill (New board now lives in the wheel centre) ---------- */
body[data-wc-ui] .toolbar { width: 100%; }
/* WC-UI-04: raised translucent ivory glass pill. The frame tints through the body; a glossy upper band (::before) sits
   behind the round buttons. */
body[data-wc-ui] .round-picker {
  position: relative;
  isolation: isolate;
  width: 100%;
  justify-content: space-between;
  gap: 0;
  padding: 3px 6px;
  border: 1.5px solid rgba(255, 255, 255, 0.95);
  border-radius: 999px;
  background:
    radial-gradient(70% 120% at 50% 118%, rgba(250, 196, 176, 0.38) 0%, rgba(250, 196, 176, 0) 70%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, rgba(255, 249, 245, 0.8) 48%, rgba(252, 236, 230, 0.78) 100%);
  -webkit-backdrop-filter: blur(6px) saturate(1.1);
  backdrop-filter: blur(6px) saturate(1.1);
  box-shadow:
    inset 0 2.5px 0 #FFFFFF,                               /* bright top bevel */
    inset 0 0 0 1.5px rgba(255, 255, 255, 0.85),
    inset 0 0 0 5px rgba(255, 255, 255, 0.36),             /* WC-UI-05: thicker translucent glass edge band */
    inset 0 0 0 6px rgba(236, 172, 156, 0.18),             /* faint warm inner edge of the band */
    inset 0 -3px 0 rgba(240, 180, 160, 0.55),              /* peach lower bevel */
    inset 0 -10px 12px -9px rgba(246, 172, 150, 0.4),
    0 1px 0 rgba(255, 255, 255, 0.9),
    0 0 0 1px rgba(236, 160, 176, 0.3),
    0 3px 0 rgba(226, 170, 170, 0.85),                     /* raised lip */
    0 4.5px 0 rgba(196, 120, 130, 0.35),
    0 12px 20px -14px rgba(150, 20, 80, 0.5);
}
body[data-wc-ui] .round-picker::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 3px;
  left: 3%;
  right: 3%;
  height: 46%;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.25) 100%);
  -webkit-mask: linear-gradient(90deg, transparent 0%, #000 10%, #000 90%, transparent 100%);
  mask: linear-gradient(90deg, transparent 0%, #000 10%, #000 90%, transparent 100%);
  pointer-events: none;
}
/* WC-UI-05: short bright curved reflections on the pill's upper-left and lower-right ends, behind the round buttons. */
body[data-wc-ui] .round-picker::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 3px;
  border: 3px solid #FFFFFF;
  border-radius: 999px;
  /* WC-UI-06: subtle warm peach tint directly behind each arc (inside the same corner mask), glow via box-shadow. */
  background:
    radial-gradient(60px 44px at 14px 8px, rgba(246, 180, 150, 0.42) 0%, rgba(246, 180, 150, 0.2) 50%, rgba(246, 180, 150, 0) 100%),
    radial-gradient(46px 34px at calc(100% - 12px) calc(100% - 6px), rgba(246, 180, 150, 0.38) 0%, rgba(246, 180, 150, 0.18) 50%, rgba(246, 180, 150, 0) 100%);
  box-shadow: 0 0 3px 0.5px rgba(255, 255, 255, 1), inset 0 0 2px rgba(255, 255, 255, 0.9);
  -webkit-mask:
    radial-gradient(52px 40px at 0 0, #000 0%, #000 45%, transparent 100%),
    radial-gradient(40px 30px at 100% 100%, #000 0%, #000 40%, transparent 100%);
  mask:
    radial-gradient(52px 40px at 0 0, #000 0%, #000 45%, transparent 100%),
    radial-gradient(40px 30px at 100% 100%, #000 0%, #000 40%, transparent 100%);
  pointer-events: none;
}
body[data-wc-ui] .round-legend { color: var(--wcu-ink); font-weight: 800; padding: 0 4px 0 6px; line-height: 44px; }
body[data-wc-ui] .segment span { color: var(--wcu-ink); border-radius: 14px; font-size: 1.05rem; }
body[data-wc-ui] .segment input:checked + span {
  border: 1.5px solid rgba(255, 210, 228, 0.9);
  background: radial-gradient(120% 60% at 50% 0%, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0) 62%), var(--wcu-rasp-grad);
  color: #FFFFFF;
  text-shadow: 0 1px 1px rgba(90, 0, 35, 0.4);
  box-shadow: inset 0 -2px 0 rgba(120, 0, 45, 0.3), 0 3px 0 #9E0F4A, 0 6px 10px -6px rgba(158, 15, 74, 0.7);
}
body[data-wc-ui] .segment input:focus-visible + span { box-shadow: none; outline: 3px solid var(--wcu-focus); outline-offset: 2px; }

/* ---------- Progress ---------- */
body[data-wc-ui] .progress { gap: 2px 0; align-items: baseline; }
body[data-wc-ui] .progress p { font-size: clamp(0.875rem, 2.6vw, 1.05rem); font-weight: 800; padding: 0 12px; }
body[data-wc-ui] .found { color: var(--wcu-rasp); }
body[data-wc-ui] .practice-score { color: var(--wcu-ink); border-left: 2px solid #F0A3BF; }

/* ---------- Warm ivory inset panels ---------- */
body[data-wc-ui] .slots {
  position: relative;
  isolation: isolate;
  gap: 6px;
  padding: 12px 10px;
  border: 1.5px solid rgba(255, 255, 255, 0.95);
  border-radius: 22px;
  background: var(--wcu-panel-bg);
  box-shadow: var(--wcu-panel-shadow);
}
/* WC-UI-04: short curved corner reflections on the glass panels: a white arc that follows the inner corner radius, masked
   to the corner. z-index -1 inside the isolated panel = above the panel surface, behind every cell, label and button. */
body[data-wc-ui] .slots::before,
body[data-wc-ui] .slots::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 4px;
  border: 0 solid #FFFFFF;
  border-radius: 17px;
  /* WC-UI-06: glow via box-shadow (not filter) so the peach tint behind each arc stays warm. */
  box-shadow: 0 0 3px 0.5px rgba(255, 255, 255, 1), inset 0 0 2px rgba(255, 255, 255, 0.9);
  pointer-events: none;
}
body[data-wc-ui] .slots::before {
  border-top-width: 3.5px;
  border-left-width: 3.5px;
  background: radial-gradient(72px 72px at 0 0, rgba(246, 180, 150, 0.42) 0%, rgba(246, 180, 150, 0.2) 50%, rgba(246, 180, 150, 0) 100%);
  -webkit-mask: radial-gradient(76px 76px at 0 0, #000 0%, #000 48%, transparent 100%);
  mask: radial-gradient(76px 76px at 0 0, #000 0%, #000 48%, transparent 100%);
}
body[data-wc-ui] .slots::after {
  border-right-width: 3px;
  border-bottom-width: 3px;
  background: radial-gradient(50px 50px at 100% 100%, rgba(246, 180, 150, 0.38) 0%, rgba(246, 180, 150, 0.18) 50%, rgba(246, 180, 150, 0) 100%);
  -webkit-mask: radial-gradient(52px 52px at 100% 100%, #000 0%, #000 44%, transparent 100%);
  mask: radial-gradient(52px 52px at 100% 100%, #000 0%, #000 44%, transparent 100%);
}
body[data-wc-ui] .slot-row { gap: 5px; }
body[data-wc-ui] .cell {
  width: var(--wcu-cell-size);
  height: var(--wcu-cell-size);
  border: 2px solid var(--wcu-cell);
  border-radius: 9px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.85), rgba(255, 245, 248, 0.55));
  color: var(--wcu-ink);
  font-size: calc(var(--wcu-cell-size) * 0.5);
  box-shadow: inset 0 1px 0 #FFFFFF;
}
/* Found (teal) and revealed (slate) keep the game's existing semantic colours from styles.css. */

/* ---------- Word display ("Tap letters") ---------- */
/* Smaller toast lane than the game default: a toast may grow upward over the puzzle panel's lower edge, never over controls. */
body[data-wc-ui] .play-area { --wc-toast-lane: 1.5rem; gap: 6px; padding-top: var(--wc-toast-lane); }
body[data-wc-ui] .word-display {
  min-width: 132px;
  min-height: 38px;
  padding: 3px 20px;
  border: 1.5px solid rgba(255, 255, 255, 0.95);
  border-radius: 999px;
  background: linear-gradient(180deg, #FFFFFF 0%, #FFF5F3 60%, #FBEAEA 100%);
  box-shadow: var(--wcu-panel-bevel), 0 2px 0 rgba(230, 190, 200, 0.8);
  color: var(--wcu-ink);
}
body[data-wc-ui] .word-display.empty::before { color: var(--wcu-ink); font-size: 1.05rem; font-weight: 800; }

/* ---------- Pink glass letter wheel ----------
   The glass disc, its rim and both reflections are drawn on the wrapper's own pseudo-elements: a purely decorative layer
   (z-index 0, no pointer events) painted BEHIND the #wheel element (z-index 1, transparent, holds every letter key) and the
   centred New board button (z-index 2). No reflection is drawn over a key face or label. */
body[data-wc-ui] .wc-wheel-wrap {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  width: var(--wcu-wheel);
  height: var(--wcu-wheel);
}
body[data-wc-ui] .wc-wheel-wrap > * { grid-area: 1 / 1; }
body[data-wc-ui] .wc-wheel-wrap::before,
body[data-wc-ui] .wc-wheel-wrap::after {
  content: "";
  grid-area: 1 / 1;
  z-index: 0;
  border-radius: 50%;
  pointer-events: none;
}
/* Glass disc: thin translucent bevel (lit at the upper left, darker underside), crisp white inner highlight, pink curved interior. */
body[data-wc-ui] .wc-wheel-wrap::before {
  width: 100%;
  height: 100%;
  border: var(--wcu-wheel-rim) solid transparent;
  background:
    radial-gradient(circle at 42% 38%, #FDD9E8 0%, #FBBCD6 28%, #F59BC3 56%, #EE78AE 82%, #E7609F 100%) padding-box,
    /* thin translucent glass bevel: pale at the upper left, raspberry underneath; the page shows faintly through it */
    linear-gradient(150deg, rgba(255, 214, 232, 0.75) 0%, rgba(249, 150, 194, 0.7) 34%, rgba(236, 84, 148, 0.75) 70%, rgba(208, 30, 104, 0.85) 100%) border-box;
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.98),          /* crisp white inner highlight on the rim's inner edge */
    inset 0 0 0 3.5px rgba(255, 214, 232, 0.55),
    inset 0 -20px 26px -14px rgba(196, 20, 92, 0.45),   /* curvature: deeper pink along the lower inside */
    0 0 0 1px rgba(214, 26, 102, 0.85),                  /* thin raspberry outer edge */
    0 0 0 2.5px rgba(255, 255, 255, 0.6),
    0 5px 0 -1px rgba(150, 10, 66, 0.35),                /* darker underside */
    0 20px 30px -18px rgba(140, 16, 72, 0.65),
    0 10px 12px -6px rgba(150, 70, 50, 0.3),             /* WC-UI-04: soft warm contact shadow on the glass panel */
    0 16px 22px -14px rgba(120, 50, 40, 0.28),
    inset 0 0 calc(var(--wcu-g) * 14px) calc(var(--wcu-g) * 3px) rgba(255, 255, 255, calc(var(--wcu-g) * 0.9)),   /* entrance: rim highlight */
    0 0 calc(var(--wcu-g) * 16px) calc(var(--wcu-g) * 3px) rgba(255, 96, 166, calc(var(--wcu-g) * 0.85));
}
/* Two short, bright curved reflections just inside the bevel (upper left longer, lower right shorter), behind the keys.
   One ring, rotated -45deg: its top border becomes the upper-left arc, its bottom border the lower-right arc; a conic mask
   shortens and feathers both. */
body[data-wc-ui] .wc-wheel-wrap::after {
  width: calc(100% - 2 * var(--wcu-wheel-rim) - 7px);
  height: calc(100% - 2 * var(--wcu-wheel-rim) - 7px);
  box-sizing: border-box;
  border-style: solid;
  border-color: #FFFFFF transparent rgba(255, 255, 255, 0.95);
  border-width: calc(var(--wcu-wheel) * 0.036) 0 calc(var(--wcu-wheel) * 0.022);
  rotate: -45deg;
  filter: blur(0.4px) drop-shadow(0 0 2px rgba(255, 255, 255, 0.9));
  -webkit-mask: conic-gradient(#000 0deg 20deg, transparent 34deg 165deg, #000 172deg 188deg, transparent 195deg 326deg, #000 340deg 360deg);
  mask: conic-gradient(#000 0deg 20deg, transparent 34deg 165deg, #000 172deg 188deg, transparent 195deg 326deg, #000 340deg 360deg);
}
/* The game element itself only positions the keys: transparent, no rim of its own. */
body[data-wc-ui] .wheel {
  --size: var(--wcu-wheel);
  /* Tiles are centred on the wheel; the radius puts each key's outer edge on the wheel's outer edge, as in the reference. */
  --r: calc(var(--wcu-wheel) / 2 - var(--wcu-key) / 2);
  z-index: 1;
  background: none;
  box-shadow: none;
}

/* ---------- Golden glass letter keys: separate raised buttons ---------- */
/* Each key is its own stacking context (positioned, z-index 1), so the idle shine (::after, z-index -1) paints over the key's
   background but under its letter. */
body[data-wc-ui] .wheel-tile {
  z-index: 1;
  width: var(--wcu-key);
  height: var(--wcu-key);
  margin: calc(var(--wcu-key) / -2) 0 0 calc(var(--wcu-key) / -2);
  overflow: hidden;
  border: 1.5px solid #B4650A;
  border-radius: calc(var(--wcu-key) * 0.3);
  background:
    radial-gradient(110% 52% at 50% 2%, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.6) 42%, rgba(255, 255, 255, 0) 66%),   /* curved top bevel */
    radial-gradient(80% 40% at 50% 104%, rgba(255, 196, 60, 0.9) 0%, rgba(255, 196, 60, 0) 100%),                                  /* warm light in the lower glass */
    linear-gradient(180deg, #FFF4BC 0%, #FFDE66 30%, #FDC632 58%, #F4AA1C 82%, #E59310 100%);
  color: #3A1430;
  font-size: calc(var(--wcu-key) * 0.5);
  text-shadow: 0 1px 0 rgba(255, 246, 210, 0.95);
  box-shadow:
    inset 0 2.5px 0 rgba(255, 255, 255, 0.95),        /* bright top bevel */
    inset 0 0 0 2px rgba(255, 246, 214, 0.85),        /* rounded glass edge */
    inset 0 -5px 0 rgba(222, 128, 6, 0.75),           /* warm amber lower edge */
    inset 0 -9px 10px -6px rgba(170, 80, 0, 0.35),
    0 0 0 2px rgba(255, 238, 246, 0.85),              /* thin pale halo: separates each key from the pink glass */
    0 5px 0 #B06505,                                  /* raised amber underside */
    0 6.5px 0 #7E4603,
    0 12px 14px -7px rgba(90, 20, 30, 0.6);
}
body[data-wc-ui] .wheel-tile.used {
  border-color: var(--wcu-rasp-deep);
  background: radial-gradient(110% 52% at 50% 2%, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 64%), var(--wcu-rasp-grad);
  color: #FFFFFF;
  text-shadow: 0 1px 1px rgba(60, 0, 25, 0.5);
  box-shadow: inset 0 2px 0 rgba(255, 220, 236, 0.8), inset 0 0 0 2px rgba(255, 200, 222, 0.6), inset 0 -5px 0 rgba(110, 0, 40, 0.35),
    0 0 0 2px rgba(255, 238, 246, 0.85), 0 4px 0 #7A0F3B, 0 9px 12px -7px rgba(70, 0, 30, 0.6);
}
/* Disabled (busy or board finished): still clearly inactive, but opaque, so the rim and reflections never show through a key face. */
body[data-wc-ui] .wheel-tile:disabled {
  opacity: 1;
  filter: saturate(0.35) brightness(1.03) contrast(0.88);
}
body[data-wc-ui] .wheel-tile:focus-visible,
body[data-wc-ui] .game .btn:focus-visible { outline: 3px solid var(--wcu-focus); outline-offset: 3px; }

/* Idle shine: a soft light band sweeps each key in turn (staggered), behind the letter. Never moves or resizes the key. */
body[data-wc-ui] .wheel-tile::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(110deg, rgba(255, 255, 255, 0) 40%, rgba(255, 255, 255, 0.55) 50%, rgba(255, 255, 255, 0) 60%) no-repeat;
  background-size: 300% 100%;
  background-position: 100% 0;
  animation: wcu-shine 5.2s ease-in-out infinite;
  animation-delay: calc(var(--wcu-k, 0) * 0.42s + 0.6s);
}
body[data-wc-ui] .wheel-tile:nth-child(2) { --wcu-k: 1; }
body[data-wc-ui] .wheel-tile:nth-child(3) { --wcu-k: 2; }
body[data-wc-ui] .wheel-tile:nth-child(4) { --wcu-k: 3; }
body[data-wc-ui] .wheel-tile:nth-child(5) { --wcu-k: 4; }
body[data-wc-ui] .wheel-tile:nth-child(6) { --wcu-k: 5; }
body[data-wc-ui] .wheel-tile:nth-child(7) { --wcu-k: 6; }
body[data-wc-ui] .wheel-tile:nth-child(n + 8) { --wcu-k: 7; }
@keyframes wcu-shine {
  0% { background-position: 100% 0; }
  20% { background-position: 0% 0; }
  100% { background-position: 0% 0; }
}
/* Pause (and hide) the shine while a word is being built, while a key is pressed and while the board is busy/over. */
body[data-wc-ui] .wheel:has(.wheel-tile.used) .wheel-tile::after,
body[data-wc-ui] .wheel:active .wheel-tile::after,
body[data-wc-ui] .wheel-tile:disabled::after {
  animation-play-state: paused;
  opacity: 0;
}

/* ---------- Liquid Glass entrance (WC-UI-03): plays once, about 700 ms ----------
   Trigger: the same moment as the page's existing entrance, i.e. when the game host is first shown (after the age gate,
   or at load if the board is already rendered). It is a CSS animation on the persistent <main class="game">, so New
   board, Shuffle, round changes and key re-renders never replay it. No script, no overlay, no delay: the board is
   visible and playable from the first frame and nothing moves (only colours, shadows and gradient positions change).
   One timeline value --wcu-t (0 -> 1) drives every layer; keys re-created mid-entrance inherit the current value instead of
   restarting. At rest --wcu-t is 0, which puts every entrance layer off-band / transparent.
     0-295 ms   raspberry shine sweeps along the glass frame
     175-455 ms soft highlight on the wheel rim
     250-610 ms staggered gold shimmer across the letter keys (behind the letters)
   It replaces, for this first reveal only, the two older entrances that would otherwise stack with it: the shared
   site-motion header rise and the game's first-board key/cell pop-in (which scales keys). Later boards keep the game's
   own pop-in unchanged. */
@property --wcu-t { syntax: "<number>"; inherits: true; initial-value: 0; }
body[data-wc-ui] .game {
  --wcu-fs: calc(-25% + clamp(0, var(--wcu-t) / 0.42, 1) * 150%);                               /* frame shine position */
  --wcu-g: clamp(0, 1 - max(var(--wcu-t) - 0.45, 0.45 - var(--wcu-t)) * 5, 1);                 /* rim highlight, peak at 315 ms */
  --wcu-quiet: clamp(0, var(--wcu-t) * 1000, 1);                                                 /* 1 while the entrance plays */
  animation: wcu-entrance 700ms linear 1;
}
@keyframes wcu-entrance { from { --wcu-t: 0.001; } to { --wcu-t: 1; } }
/* Shared header rise is not stacked on this page: the glass entrance is the one entrance. */
body[data-wc-ui] main.game > .game-header > .eyebrow,
body[data-wc-ui] main.game > .game-header > #game-title,
body[data-wc-ui] main.game > .game-header > .header-meta { animation: none; }
/* The game's pop-in keeps its timing, but has no effect while the entrance plays (keys and cells stay put and visible). */
body[data-wc-ui] .wheel.entering .wheel-tile,
body[data-wc-ui] .slots.entering .slot-row { animation-name: wcu-enter-pop; }
@keyframes wcu-enter-pop {
  from { opacity: var(--wcu-quiet); scale: calc(0.6 + 0.4 * var(--wcu-quiet)); }
  to { opacity: 1; scale: 1; }
}
/* Gold shimmer: one band per key, staggered by key order (--wcu-k), drawn behind the letter. Separate from the idle shine. */
body[data-wc-ui] .wheel-tile::before {
  --wcu-u: clamp(0, (var(--wcu-t) - 0.36 - var(--wcu-k, 0) * 0.045) / 0.2, 1);
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(115deg, rgba(255, 246, 200, 0) 38%, rgba(255, 236, 150, 0.95) 46%, rgba(255, 255, 255, 1) 50%, rgba(255, 236, 150, 0.95) 54%, rgba(255, 246, 200, 0) 62%) no-repeat;
  background-size: 300% 100%;
  background-position: calc((1 - var(--wcu-u)) * 100%) 0;
}

/* ---------- New board, in the wheel centre ---------- */
body[data-wc-ui] .wc-new-board {
  position: relative;
  z-index: 2;
  width: var(--wcu-center-w);
  min-height: var(--wcu-center-h);
  padding: 3px 5px;
  border: 3px solid var(--wcu-rasp-deep);
  border-radius: calc(var(--wcu-center-h) * 0.32);
  background: radial-gradient(120% 60% at 50% 0%, #FFFFFF 0%, rgba(255, 255, 255, 0) 70%), linear-gradient(180deg, #FFFBF8 0%, #FBE9EF 100%);
  color: var(--wcu-ink);
  font-size: calc(var(--wcu-center-h) * 0.28);
  font-weight: 900;
  line-height: 1.08;
  text-align: center;
  white-space: normal;
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.9), inset 0 -3px 0 rgba(200, 150, 170, 0.45), 0 3px 0 #5E0A2D, 0 10px 18px -10px rgba(80, 10, 40, 0.6);
}

/* ---------- Glossy dark plum action tray ---------- */
body[data-wc-ui] .actions {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  width: 100%;
  padding: 7px;
  border: 1.5px solid #7A2A5E;
  border-radius: 26px;
  background: linear-gradient(180deg, #6A1E50 0%, #4A1234 40%, var(--wcu-plum) 70%, #280619 100%);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.3),     /* top glass bevel */
    inset 0 0 0 1px rgba(255, 255, 255, 0.07),
    inset 0 -4px 0 rgba(0, 0, 0, 0.3),          /* lower bevel */
    0 4px 0 #22051A,
    0 14px 24px -16px rgba(42, 7, 32, 0.8);
}
body[data-wc-ui] .actions::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 18px;
  right: 18px;
  height: 42%;
  border-radius: 999px / 100%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0));
  pointer-events: none;
}
body[data-wc-ui] .actions .btn {
  position: relative;
  min-height: 46px;
  padding: 0 6px;
  border-radius: 999px;
  font-size: clamp(0.95rem, 3.6vw, 1.1rem);
}
body[data-wc-ui] .actions .btn-secondary {
  border: 1.5px solid rgba(255, 255, 255, 0.95);
  background: radial-gradient(120% 60% at 50% 0%, #FFFFFF 0%, rgba(255, 255, 255, 0) 70%), linear-gradient(180deg, #FFFFFF 0%, #F6EBEF 100%);
  color: var(--wcu-ink);
  box-shadow: inset 0 -3px 0 rgba(190, 150, 170, 0.45), 0 3px 0 #B898AB;
}
body[data-wc-ui] .actions .btn-primary {
  border: 1.5px solid rgba(255, 196, 220, 0.9);
  background: radial-gradient(120% 60% at 50% 0%, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0) 64%), var(--wcu-rasp-grad);
  color: #FFFFFF;
  text-shadow: 0 1px 1px rgba(90, 0, 35, 0.45);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25), inset 0 -3px 0 rgba(110, 0, 40, 0.4), 0 3px 0 #860C40, 0 6px 12px -6px rgba(230, 30, 110, 0.6);
}
body[data-wc-ui] .actions .btn:disabled { border-color: rgba(255, 255, 255, 0.25); background: #6B4560; color: #E9D9E3; text-shadow: none; box-shadow: none; }

/* ---------- Extras (bonus words, Reveal) ---------- */
body[data-wc-ui] .extras { gap: 4px 10px; }
body[data-wc-ui] .bonus { color: var(--wcu-ink); font-size: 0.8125rem; }
body[data-wc-ui] .btn-ghost { min-height: 44px; padding: 0 14px; border-color: #C07A9E; color: var(--wcu-muted); background: rgba(255, 255, 255, 0.5); }

/* ---------- Sizes ---------- */
@media (max-width: 599px) {
  /* Mobile: "(no ranked points)" moves under the score instead of the divider starting a new line. */
  body[data-wc-ui] .practice-score .no-points { display: block; text-align: center; }
}
@media (max-width: 379px) {
  /* 320px: six 44px round buttons stay on one line; 8px side margin leaves room for the glow. */
  body[data-wc-ui] .round-legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); padding: 0; }
  body[data-wc-ui] .round-picker { padding: 2px 3px; }
  body[data-wc-ui] .game { --wcu-rim: 7px; margin: 8px auto 16px; padding: 12px 7px 14px; }
  body[data-wc-ui] .progress p { padding: 0 7px; }
}
@media (min-width: 380px) {
  body[data-wc-ui] { --wcu-wheel: 230px; --wcu-wheel-rim: 7px; --wcu-key: 54px; --wcu-center-w: 80px; --wcu-center-h: 60px; --wcu-cell-size: 32px; }
}
/* Tablet: compact single column, as in the reference tablet panel. */
@media (min-width: 600px) {
  body[data-wc-ui] { --wcu-rim: 11px; --wcu-glow: 12px; --wcu-wheel: 280px; --wcu-wheel-rim: 8px; --wcu-key: 70px; --wcu-center-w: 92px; --wcu-center-h: 70px; --wcu-cell-size: 42px; }
  body[data-wc-ui] .game { width: min(calc(100% - 48px), 540px); margin-top: 18px; padding: 20px 20px 22px; gap: 12px; }
  body[data-wc-ui] #game-title { font-size: 2.9rem; }
  body[data-wc-ui] .header-meta { margin-top: 8px; }
  body[data-wc-ui] .round-picker { padding: 4px 12px; }
  body[data-wc-ui] .segment span { min-width: 48px; min-height: 48px; font-size: 1.15rem; }
  body[data-wc-ui] .round-legend { line-height: 48px; }
  body[data-wc-ui] .slots { padding: 16px 14px; gap: 7px; }
  body[data-wc-ui] .slot-row { gap: 6px; }
  body[data-wc-ui] .actions { padding: 8px; }
  body[data-wc-ui] .actions .btn { min-height: 52px; font-size: 1.15rem; }
}
/* Desktop: compact board. Puzzle panel on the left spans the full height; the wheel panel and the tray on the right line up
   with it (tray bottom = panel bottom). Bonus words and Reveal sit inside the bottom of the puzzle panel. */
@media (min-width: 960px) {
  /* Height-aware: the whole board (title to Clear/Shuffle/Submit) fits below the site bar at 100% zoom on short laptop
     viewports (e.g. 1536x738); on tall screens the values grow back to the full size. Nothing is scaled, clipped or hidden. */
  body[data-wc-ui] {
    --wcu-rim: clamp(9px, 1.4vh, 14px); --wcu-glow: 12px;
    --wcu-wheel: clamp(208px, calc(100vh - 530px), 296px); --wcu-wheel-rim: 8px;
    --wcu-key: clamp(52px, calc(var(--wcu-wheel) * 0.25), 70px);
    --wcu-center-w: calc(var(--wcu-wheel) * 0.34); --wcu-center-h: calc(var(--wcu-wheel) * 0.26);
    --wcu-cell-size: clamp(40px, 6.6vh, 54px);
  }
  body[data-wc-ui] .game {
    display: grid;
    grid-template-columns: minmax(0, 1.19fr) minmax(0, 1fr);
    grid-template-areas: "head head" "tools tools" "prog prog" "slots play" "slots acts";
    grid-template-rows: auto auto auto 1fr auto;
    align-items: start;
    justify-items: center;
    gap: clamp(6px, 1vh, 14px) 20px;
    width: min(calc(100% - 64px), 940px);
    margin-top: clamp(6px, 1vh, 24px);
    padding: clamp(8px, 1.4vh, 30px) 26px clamp(10px, 1.6vh, 30px);
  }
  body[data-wc-ui] .game-header { grid-area: head; }
  body[data-wc-ui] #game-title { font-size: clamp(2.4rem, 6.2vh, 3.7rem); }
  body[data-wc-ui] .eyebrow { font-size: clamp(0.85rem, 1.9vh, 1.05rem); letter-spacing: 0.26em; }
  body[data-wc-ui] .header-meta { margin-top: clamp(2px, 1vh, 12px); gap: 6px 18px; }
  body[data-wc-ui] .mode-badge { padding: clamp(1px, 0.5vh, 4px) 16px; font-size: 1rem; }
  body[data-wc-ui] .demo-note { font-size: 1.05rem; }
  body[data-wc-ui] .toolbar { grid-area: tools; }
  body[data-wc-ui] .round-picker { width: 86%; margin: 0 auto; padding: clamp(3px, 0.6vh, 7px) 7% clamp(3px, 0.6vh, 7px) 9%; }
  body[data-wc-ui] .round-legend { font-size: 1.3rem; line-height: clamp(46px, 6.6vh, 60px); padding-right: 10px; }
  body[data-wc-ui] .segment span { min-width: clamp(46px, 6.6vh, 60px); min-height: clamp(46px, 6.6vh, 60px); font-size: 1.5rem; border-radius: 16px; }
  body[data-wc-ui] .progress { grid-area: prog; }
  body[data-wc-ui] .progress p { font-size: clamp(1.05rem, 2.5vh, 1.3rem); padding: 0 16px; }
  body[data-wc-ui] .progress { margin-bottom: clamp(10px, 1.6vh, 14px); }   /* room for "Tap letters" on the wheel panel's top edge */
  body[data-wc-ui] .slots {
    grid-area: slots;
    width: 100%;
    align-self: stretch;
    justify-content: center;
    gap: clamp(6px, 1vh, 9px);
    padding: 18px 18px 72px;   /* bottom room for the bonus/Reveal row inside the panel */
  }
  body[data-wc-ui] .slot-row { gap: clamp(6px, 1vh, 9px); }
  /* Larger boards (five to seven words) use smaller cells so the panel keeps the board height where possible. */
  body[data-wc-ui] .slots:has(.slot-row:nth-child(5)) { --wcu-cell-size: clamp(30px, 4.6vh, 46px); padding-bottom: 64px; }
  body[data-wc-ui] .slots:has(.slot-row:nth-child(6)) { --wcu-cell-size: clamp(28px, 4.2vh, 42px); }
  body[data-wc-ui] .slots:has(.slot-row:nth-child(7)) { --wcu-cell-size: clamp(26px, 3.8vh, 40px); gap: 4px; }
  body[data-wc-ui] .slots:has(.slot-row:nth-child(7)) .slot-row { gap: 4px; }
  body[data-wc-ui] .cell { border-radius: 14px; border-width: 2.5px; }
  /* Relative offset (not margin) so the bonus row never makes the last grid row taller than the tray. */
  body[data-wc-ui] .extras { grid-row: 5; grid-column: 1; align-self: end; position: relative; z-index: 1; top: -18px; }
  /* "Tap letters" sits on the panel's top edge, as in the reference. The toast lane moves above the panel (lane 0), so a toast
     can briefly cover the progress line but never the word display, wheel or controls. */
  body[data-wc-ui] .play-area {
    grid-area: play;
    align-self: stretch;
    --wc-toast-lane: 0px;
    gap: 4px;
    padding: 0 12px clamp(20px, 3.2vh, 30px);
    border: 1.5px solid rgba(255, 255, 255, 0.95);
    border-radius: 22px;
    background: var(--wcu-panel-bg);
    box-shadow: var(--wcu-panel-shadow);
    isolation: isolate;   /* desktop only: lets the reflections sit behind the content; the toast still paints above the puzzle panel */
  }
  /* WC-UI-04: same thick-glass corner reflections as the result board. Both upper corners (the tray covers the lower edge). */
  body[data-wc-ui] .play-area::before,
  body[data-wc-ui] .play-area::after {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 4px;
    border: 0 solid #FFFFFF;
    border-radius: 17px;
    box-shadow: 0 0 3px 0.5px rgba(255, 255, 255, 1), inset 0 0 2px rgba(255, 255, 255, 0.9);   /* WC-UI-06: glow keeps the tint warm */
    pointer-events: none;
  }
  body[data-wc-ui] .play-area::before {
    border-top-width: 3.5px;
    border-left-width: 3.5px;
    background: radial-gradient(72px 72px at 0 0, rgba(246, 180, 150, 0.42) 0%, rgba(246, 180, 150, 0.2) 50%, rgba(246, 180, 150, 0) 100%);
    -webkit-mask: radial-gradient(76px 76px at 0 0, #000 0%, #000 48%, transparent 100%);
    mask: radial-gradient(76px 76px at 0 0, #000 0%, #000 48%, transparent 100%);
  }
  body[data-wc-ui] .play-area::after {
    border-top-width: 3px;
    border-right-width: 3px;
    background: radial-gradient(50px 50px at 100% 0, rgba(246, 180, 150, 0.38) 0%, rgba(246, 180, 150, 0.18) 50%, rgba(246, 180, 150, 0) 100%);
    -webkit-mask: radial-gradient(52px 52px at 100% 0, #000 0%, #000 44%, transparent 100%);
    mask: radial-gradient(52px 52px at 100% 0, #000 0%, #000 44%, transparent 100%);
  }
  body[data-wc-ui] .play-area .word-display { margin-top: -20px; min-height: 40px; }
  body[data-wc-ui] .word-display.empty::before { font-size: 1.15rem; }
  /* The tray overlaps the bottom of the wheel panel, as in the reference. */
  body[data-wc-ui] .actions { grid-area: acts; align-self: end; width: 100%; margin-top: calc(-1 * clamp(28px, 4.4vh, 34px)); padding: 7px; }
  body[data-wc-ui] .actions .btn { min-height: clamp(46px, 6.6vh, 54px); font-size: 1.2rem; }
}

@media (prefers-reduced-motion: reduce) {
  body[data-wc-ui] .wheel-tile::after { display: none; animation: none; }
  body[data-wc-ui] .game { animation: none; }
  body[data-wc-ui] .wheel-tile::before { display: none; }
}
