/* ==========================================================================
   Theme v2 Skin System (FE-THEME-03..07)
   Each skin block below ONLY sets custom properties. Component rules further
   down consume these tokens; Tailwind's slate/amber/indigo/purple/emerald/rose
   and white colours are remapped to the --tw-* channels via tailwind.config.
   ========================================================================== */

/* --- Graphite (Free default, FE-THEME-07) --- */
:root,
[data-theme="graphite"] {
  color-scheme: dark;
  --font-display: 'Manrope', 'Inter', system-ui, sans-serif;
  --font-digits: 'Inter', system-ui, sans-serif;
  --font-ui: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Tailwind palette channels (R G B) */
  --tw-white: 255 255 255;
  --tw-slate-50: 247 248 250;
  --tw-slate-100: 238 240 243;
  --tw-slate-200: 221 225 231;
  --tw-slate-300: 201 207 216;
  --tw-slate-400: 154 163 174;
  --tw-slate-500: 107 116 128;
  --tw-slate-600: 74 81 92;
  --tw-slate-700: 51 57 67;
  --tw-slate-800: 37 42 51;
  --tw-slate-900: 23 26 32;
  --tw-slate-950: 15 17 21;
  --tw-amber-50: 255 251 235;
  --tw-amber-100: 255 243 196;
  --tw-amber-200: 255 229 143;
  --tw-amber-300: 255 216 102;
  --tw-amber-400: 255 203 71;
  --tw-amber-500: 255 197 61;
  --tw-amber-600: 232 169 31;
  --tw-amber-700: 185 132 16;
  --tw-amber-800: 138 98 12;
  --tw-amber-900: 92 65 10;
  --tw-amber-950: 51 36 5;
  --tw-second-50: 243 245 248;
  --tw-second-100: 227 232 239;
  --tw-second-200: 200 209 222;
  --tw-second-300: 169 182 200;
  --tw-second-400: 135 150 173;
  --tw-second-500: 107 122 146;
  --tw-second-600: 85 98 119;
  --tw-second-700: 66 76 92;
  --tw-second-800: 47 54 66;
  --tw-second-900: 32 37 45;
  --tw-second-950: 20 23 28;
  --tw-emerald-50: 236 253 245;
  --tw-emerald-100: 209 250 229;
  --tw-emerald-200: 167 243 208;
  --tw-emerald-300: 110 231 183;
  --tw-emerald-400: 52 211 153;
  --tw-emerald-500: 16 185 129;
  --tw-emerald-600: 5 150 105;
  --tw-emerald-700: 4 120 87;
  --tw-emerald-800: 6 95 70;
  --tw-emerald-900: 6 78 59;
  --tw-emerald-950: 2 44 34;
  --tw-rose-50: 255 241 242;
  --tw-rose-100: 255 228 230;
  --tw-rose-200: 254 205 211;
  --tw-rose-300: 253 164 175;
  --tw-rose-400: 251 113 133;
  --tw-rose-500: 244 63 94;
  --tw-rose-600: 225 29 72;
  --tw-rose-700: 190 18 60;
  --tw-rose-800: 159 18 57;
  --tw-rose-900: 136 19 55;
  --tw-rose-950: 76 5 25;

  /* Canvas */
  --theme-canvas-bg: #0f1115;
  --theme-canvas-text: #eef0f3;
  --theme-canvas-muted: #9aa3ae;
  --theme-border-subtle: #252a33;
  --theme-border-strong: #3a404b;
  --theme-canvas-glow: linear-gradient(180deg, #14171c 0%, rgba(15, 17, 21, 0) 360px);
  --theme-canvas-vignette: linear-gradient(transparent, transparent);
  --theme-canvas-pattern: none;
  --theme-pattern-size: auto;
  --theme-brand-text: #eef0f3;
  --theme-brand-glow: none;
  --theme-ornament: none;
  --theme-ornament-height: 0px;
  --theme-ornament-size: auto;

  /* Surfaces */
  --theme-surface-card: #171a20;
  --theme-surface-header: rgba(15, 17, 21, 0.92);
  --theme-surface-well: #0f1115;
  --theme-surface-interactive: #20242c;
  --theme-surface-interactive-hover: #2a2f38;

  /* Accent: single solid sunflower, no gradients or glows */
  --theme-accent-gold: #ffc53d;
  --theme-accent-gold-text: #ffd866;
  --theme-accent-primary: #ffc53d;
  --theme-accent-gradient: linear-gradient(#ffc53d, #ffc53d);
  --theme-accent-cta: #ffc53d;
  --theme-accent-cta-hover: #ffd866;
  --theme-accent-cta-text: #1a1405;
  --theme-accent-cta-shadow: none;
  --theme-accent-special-cta: #ffc53d;
  --theme-accent-special-cta-text: #1a1405;
  --theme-accent-pill-bg: rgba(255, 197, 61, 0.12);
  --theme-accent-pill-border: rgba(255, 197, 61, 0.35);
  --theme-accent-pill-text: #ffd866;
  --theme-card-special-bg: rgba(255, 197, 61, 0.06);
  --theme-card-special-border: rgba(255, 197, 61, 0.55);
  --theme-card-special-glow: none;
  --theme-countdown-bg: #ffc53d;

  /* Ticket material: clean white card with hairline grid */
  --theme-ticket-container-bg: #171a20;
  --theme-ticket-sheet-bg: #fafaf7;
  --theme-torn-sheet-bg: #fafaf7;
  --theme-ticket-sheet-image: none;
  --theme-ticket-border: #e4e4de;
  --theme-ticket-border-width: 1px;
  --theme-ticket-outline: none;
  --theme-ticket-radius: 12px;
  --theme-ticket-padding: 8px;
  --theme-ticket-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  --theme-cell-empty-bg: #f1f1ec;
  --theme-cell-empty-border: transparent;
  --theme-cell-empty-border-width: 1px;
  --theme-cell-empty-border-style: solid;
  --theme-cell-empty-image: none;
  --theme-cell-empty-opacity: 1;
  --theme-cell-bg: #ffffff;
  --theme-cell-text: #111318;
  --theme-cell-border: #e4e4de;
  --theme-cell-border-width: 1px;
  --theme-cell-radius: 6px;
  --theme-cell-shadow: none;
  --theme-cell-hover-border: #ffc53d;

  /* Stamp: solid accent dot */
  --theme-stamp-bg: radial-gradient(circle closest-side, #ffc53d 0 86%, rgba(255, 197, 61, 0) 90%), #ffffff;
  --theme-stamp-text: #1a1405;
  --theme-stamp-contrast-bg: #ffc53d;
  --theme-stamp-border: #e4e4de;
  --theme-stamp-shadow: inset 0 0 0 1px rgba(26, 20, 5, 0.06);
  --theme-stamp-check-color: rgba(26, 20, 5, 0.55);

  /* Caller: progress ring (drawn / 90) */
  --theme-caller-card-bg: #171a20;
  --theme-caller-ball-bg: #0f1115;
  --theme-caller-ball-border: conic-gradient(#ffc53d calc(var(--caller-progress, 0) * 1%), #2a2f38 0);
  --theme-caller-ball-padding: 5px;
  --theme-caller-ball-radius: 50%;
  --theme-caller-ball-shadow: none;
  --theme-caller-inner-radius: 50%;
  --theme-caller-inner-shadow: none;
  --theme-caller-highlight: none;
  --theme-caller-frame: none;
  --theme-caller-display-padding: 0;
  --theme-caller-num-color: #eef0f3;
  --theme-caller-num-shadow: none;
  --theme-caller-num-scale: 1;
  --theme-caller-glow: transparent;

  /* Master board: quiet tiles, accent ring on latest */
  --theme-board-cell-bg: transparent;
  --theme-board-cell-border: #20242c;
  --theme-board-cell-text: #5c6470;
  --theme-board-called-bg: #2a2f38;
  --theme-board-called-text: #eef0f3;
  --theme-board-called-border: #3a404b;
  --theme-board-called-shadow: none;
  --theme-board-called-scale: 1;
  --theme-board-radius: 6px;
  --theme-board-latest-ring: #ffc53d;
  --theme-board-pulse: rgba(255, 197, 61, 0.55);
}

/* --- Royal Palace (Pro, FE-THEME-04) --- */
[data-theme="palace"] {
  color-scheme: dark;
  --font-display: 'Cinzel', Georgia, serif;
  --font-digits: 'Cinzel', Georgia, serif;
  --font-ui: 'Mulish', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --tw-white: 255 248 231;
  --tw-slate-50: 253 246 230;
  --tw-slate-100: 247 234 208;
  --tw-slate-200: 238 220 182;
  --tw-slate-300: 226 201 156;
  --tw-slate-400: 201 171 130;
  --tw-slate-500: 156 127 102;
  --tw-slate-600: 122 74 79;
  --tw-slate-700: 94 38 51;
  --tw-slate-800: 74 21 36;
  --tw-slate-900: 53 12 24;
  --tw-slate-950: 36 8 15;
  --tw-amber-50: 253 248 231;
  --tw-amber-100: 249 238 198;
  --tw-amber-200: 243 221 148;
  --tw-amber-300: 240 210 122;
  --tw-amber-400: 230 196 106;
  --tw-amber-500: 201 162 39;
  --tw-amber-600: 168 134 28;
  --tw-amber-700: 135 106 21;
  --tw-amber-800: 101 79 16;
  --tw-amber-900: 68 53 11;
  --tw-amber-950: 42 32 6;
  --tw-second-50: 239 251 245;
  --tw-second-100: 212 243 227;
  --tw-second-200: 169 229 199;
  --tw-second-300: 125 211 168;
  --tw-second-400: 79 184 138;
  --tw-second-500: 47 158 111;
  --tw-second-600: 35 128 90;
  --tw-second-700: 29 100 72;
  --tw-second-800: 23 77 56;
  --tw-second-900: 16 54 42;
  --tw-second-950: 10 34 25;

  --theme-canvas-bg: #24080f;
  --theme-canvas-text: #f7ead0;
  --theme-canvas-muted: #c9ab82;
  --theme-border-subtle: rgba(201, 162, 39, 0.35);
  --theme-border-strong: #c9a227;
  --theme-canvas-glow: radial-gradient(ellipse at 50% -5%, rgba(201, 162, 39, 0.2) 0%, rgba(36, 8, 15, 0) 55%);
  --theme-canvas-vignette: radial-gradient(ellipse at 50% 30%, transparent 45%, rgba(20, 4, 8, 0.6) 100%);
  --theme-canvas-pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Cpath d='M20 2 L38 20 L20 38 L2 20 Z' fill='none' stroke='%23c9a227' stroke-opacity='0.11'/%3E%3Ccircle cx='20' cy='20' r='3.5' fill='none' stroke='%23c9a227' stroke-opacity='0.15'/%3E%3Ccircle cx='0' cy='0' r='3.5' fill='none' stroke='%23c9a227' stroke-opacity='0.15'/%3E%3Ccircle cx='40' cy='40' r='3.5' fill='none' stroke='%23c9a227' stroke-opacity='0.15'/%3E%3C/svg%3E");
  --theme-pattern-size: 40px 40px;
  --theme-brand-text: #f0d27a;
  --theme-brand-glow: drop-shadow(0 0 12px rgba(255, 215, 0, 0.45));
  --theme-ornament: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='24' viewBox='0 0 48 24'%3E%3Cpath d='M0 3 Q12 10 24 3 T48 3' fill='none' stroke='%23c9a227' stroke-width='1.2'/%3E%3Cline x1='12' y1='6.5' x2='12' y2='10' stroke='%23c9a227' stroke-width='0.8'/%3E%3Ccircle cx='12' cy='13' r='3.6' fill='%23f59e0b'/%3E%3Ccircle cx='12' cy='13' r='1.8' fill='%23fcd34d'/%3E%3Ccircle cx='12' cy='19.5' r='3' fill='%23ea7a0c'/%3E%3Cpath d='M36 4 C33 9 33 13 36 17 C39 13 39 9 36 4 Z' fill='%232f7d4f'/%3E%3C/svg%3E") repeat-x;
  --theme-ornament-height: 24px;
  --theme-ornament-size: 48px 24px;

  --theme-surface-card: #3a0e1a;
  --theme-surface-header: rgba(36, 8, 15, 0.94);
  --theme-surface-well: #2a0a12;
  --theme-surface-interactive: #4a1524;
  --theme-surface-interactive-hover: #5e2633;

  --theme-accent-gold: #c9a227;
  --theme-accent-gold-text: #f0d27a;
  --theme-accent-primary: #c9a227;
  --theme-accent-gradient: linear-gradient(180deg, #f3d784, #c9a227 55%, #a07c18);
  --theme-accent-cta: linear-gradient(180deg, #f3d784, #c9a227 55%, #a07c18);
  --theme-accent-cta-hover: linear-gradient(180deg, #f7e2a0, #d4ad35 55%, #a8861c);
  --theme-accent-cta-text: #2a0a12;
  --theme-accent-cta-shadow: 0 2px 0 #7a5a12;
  --theme-accent-special-cta: linear-gradient(180deg, #f3d784, #c9a227 55%, #a07c18);
  --theme-accent-special-cta-text: #2a0a12;
  --theme-accent-pill-bg: rgba(201, 162, 39, 0.14);
  --theme-accent-pill-border: rgba(201, 162, 39, 0.5);
  --theme-accent-pill-text: #f0d27a;
  --theme-card-special-bg: linear-gradient(180deg, rgba(201, 162, 39, 0.14), rgba(58, 14, 26, 0.95));
  --theme-card-special-border: #c9a227;
  --theme-card-special-glow: 0 0 0 1px rgba(201, 162, 39, 0.25);
  --theme-countdown-bg: linear-gradient(90deg, #a07c18, #f0d27a);

  --theme-ticket-container-bg: #3a0e1a;
  --theme-ticket-sheet-bg: #fbf3e0;
  --theme-torn-sheet-bg: #fbf3e0;
  --theme-ticket-sheet-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='8' viewBox='0 0 20 8'%3E%3Cpath d='M4 7 C1 7 1 2 5 1.5 C8 1 9 4 7 5 C5.5 5.6 5 4.2 6 3.6' fill='none' stroke='%23b8891f' stroke-width='0.9'/%3E%3Ccircle cx='14' cy='4' r='1.2' fill='%23b8891f'/%3E%3C/svg%3E") left 12px top 7px / 20px 8px repeat-x, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='8' viewBox='0 0 20 8'%3E%3Cpath d='M4 7 C1 7 1 2 5 1.5 C8 1 9 4 7 5 C5.5 5.6 5 4.2 6 3.6' fill='none' stroke='%23b8891f' stroke-width='0.9'/%3E%3Ccircle cx='14' cy='4' r='1.2' fill='%23b8891f'/%3E%3C/svg%3E") left 12px bottom 7px / 20px 8px repeat-x;
  --theme-ticket-border: #c9a227;
  --theme-ticket-border-width: 2px;
  --theme-ticket-outline: 1px solid #c9a227;
  --theme-ticket-radius: 6px;
  --theme-ticket-padding: 20px 10px;
  --theme-ticket-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
  --theme-cell-empty-bg: #f3e6c4;
  --theme-cell-empty-border: #ead8aa;
  --theme-cell-empty-border-width: 1px;
  --theme-cell-empty-border-style: solid;
  --theme-cell-empty-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cg fill='none' stroke='%23b8891f' stroke-opacity='0.45' stroke-width='0.9'%3E%3Ccircle cx='20' cy='20' r='13'/%3E%3Ccircle cx='20' cy='20' r='4'/%3E%3Cpath d='M20 7 C23 13 23 16 20 20 C17 16 17 13 20 7Z M20 33 C23 27 23 24 20 20 C17 24 17 27 20 33Z M7 20 C13 17 16 17 20 20 C16 23 13 23 7 20Z M33 20 C27 17 24 17 20 20 C24 23 27 23 33 20Z'/%3E%3C/g%3E%3C/svg%3E") center / 72% no-repeat;
  --theme-cell-empty-opacity: 1;
  --theme-cell-bg: #fffaf0;
  --theme-cell-text: #5a0f1f;
  --theme-cell-border: #e3cf9f;
  --theme-cell-border-width: 1px;
  --theme-cell-radius: 3px;
  --theme-cell-shadow: inset 0 0 0 1px #ffffff;
  --theme-cell-hover-border: #c9a227;

  /* Stamp: vermilion ink dauber with irregular edge */
  --theme-stamp-bg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cdefs%3E%3CradialGradient id='g' cx='40%25' cy='35%25'%3E%3Cstop offset='0' stop-color='%23f0532f'/%3E%3Cstop offset='0.6' stop-color='%23d42a1e'/%3E%3Cstop offset='1' stop-color='%23a31616'/%3E%3C/radialGradient%3E%3C/defs%3E%3Cpath fill='url(%23g)' d='M50 6 C64 5 78 12 87 24 C95 35 96 50 93 62 C90 76 80 88 66 93 C54 97 40 96 29 90 C17 84 8 72 6 58 C4 45 7 31 16 21 C25 11 37 7 50 6 Z M92 28 l5 -3 l-2 5 Z M8 78 l-5 3 l3 -5 Z'/%3E%3C/svg%3E") center / 94% auto no-repeat, #fffaf0;
  --theme-stamp-text: #fff8e7;
  --theme-stamp-contrast-bg: #a31616;
  --theme-stamp-border: #e3cf9f;
  --theme-stamp-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
  --theme-stamp-check-color: #f0d27a;

  /* Caller: embossed gold medallion inside a jharokha arch */
  --theme-caller-card-bg: linear-gradient(180deg, #43101e, #330b17);
  --theme-caller-ball-bg: radial-gradient(circle at 35% 30%, #fff4cc 0%, #f0cf6f 30%, #c9a227 65%, #8d6a14 100%);
  --theme-caller-ball-border: repeating-conic-gradient(#a87c1a 0 5deg, #ecca6c 5deg 10deg);
  --theme-caller-ball-padding: 7px;
  --theme-caller-ball-radius: 50%;
  --theme-caller-ball-shadow: 0 0 0 2px #7a5a12, 0 10px 24px rgba(0, 0, 0, 0.5);
  --theme-caller-inner-radius: 50%;
  --theme-caller-inner-shadow: inset 0 2px 3px rgba(255, 255, 255, 0.6), inset 0 -3px 6px rgba(0, 0, 0, 0.35);
  --theme-caller-highlight: none;
  --theme-caller-frame: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 112 132' preserveAspectRatio='none'%3E%3Cpath d='M6 132 V66 C6 40 22 24 38 20 C44 10 50 5 56 1 C62 5 68 10 74 20 C90 24 106 40 106 66 V132' fill='%232a0a12' fill-opacity='0.55' stroke='%23c9a227' stroke-width='1.6'/%3E%3Cpath d='M14 132 V68 C14 46 28 32 42 28 C47 19 52 14 56 11 C60 14 65 19 70 28 C84 32 98 46 98 68 V132' fill='none' stroke='%23c9a227' stroke-opacity='0.5' stroke-width='0.8'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  --theme-caller-frame-inset: 0 -10px -4px -10px;
  --theme-caller-display-padding: 22px 0 0;
  --theme-caller-num-color: #4a0d18;
  --theme-caller-num-shadow: 0 1px 0 rgba(255, 240, 200, 0.7);
  --theme-caller-num-scale: 0.85;
  --theme-caller-glow: transparent;

  --theme-board-cell-bg: rgba(255, 255, 255, 0.03);
  --theme-board-cell-border: rgba(201, 162, 39, 0.15);
  --theme-board-cell-text: #a8845c;
  --theme-board-called-bg: radial-gradient(circle at 35% 30%, #fff1c2, #e9c766 40%, #b8891f 85%);
  --theme-board-called-text: #4a0d18;
  --theme-board-called-border: #a8861c;
  --theme-board-called-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  --theme-board-called-scale: 1;
  --theme-board-radius: 50%;
  --theme-board-latest-ring: #e0442f;
  --theme-board-pulse: rgba(224, 68, 47, 0.6);
}

/* --- Classic Housie Hall (Pro, light, FE-THEME-05) --- */
[data-theme="classic"] {
  color-scheme: light;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-digits: 'Libre Baskerville', Georgia, serif;
  --font-ui: 'Work Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Inverted scale: low numbers are high-contrast ink, high numbers are paper */
  --tw-white: 46 26 18;
  --tw-slate-50: 31 20 16;
  --tw-slate-100: 46 26 18;
  --tw-slate-200: 59 42 30;
  --tw-slate-300: 74 54 40;
  --tw-slate-400: 107 84 68;
  --tw-slate-500: 125 102 84;
  --tw-slate-600: 184 166 132;
  --tw-slate-700: 217 201 166;
  --tw-slate-800: 236 226 203;
  --tw-slate-900: 251 246 234;
  --tw-slate-950: 243 234 214;
  --tw-amber-50: 61 13 13;
  --tw-amber-100: 74 16 16;
  --tw-amber-200: 92 21 21;
  --tw-amber-300: 110 26 26;
  --tw-amber-400: 122 31 31;
  --tw-amber-500: 122 31 31;
  --tw-amber-600: 143 42 42;
  --tw-amber-700: 163 58 58;
  --tw-amber-800: 236 210 210;
  --tw-amber-900: 245 227 227;
  --tw-amber-950: 250 240 240;
  --tw-second-50: 5 46 51;
  --tw-second-100: 7 57 63;
  --tw-second-200: 10 74 81;
  --tw-second-300: 13 89 96;
  --tw-second-400: 15 94 102;
  --tw-second-500: 15 94 102;
  --tw-second-600: 21 122 133;
  --tw-second-700: 42 154 165;
  --tw-second-800: 207 233 235;
  --tw-second-900: 227 243 244;
  --tw-second-950: 241 249 250;
  --tw-emerald-50: 2 44 34;
  --tw-emerald-100: 6 78 59;
  --tw-emerald-200: 6 95 70;
  --tw-emerald-300: 6 95 70;
  --tw-emerald-400: 4 120 87;
  --tw-emerald-500: 16 185 129;
  --tw-emerald-600: 5 150 105;
  --tw-emerald-700: 4 120 87;
  --tw-emerald-800: 167 243 208;
  --tw-emerald-900: 209 250 229;
  --tw-emerald-950: 236 253 245;
  --tw-rose-50: 76 5 25;
  --tw-rose-100: 136 19 55;
  --tw-rose-200: 159 18 57;
  --tw-rose-300: 190 18 60;
  --tw-rose-400: 190 18 60;
  --tw-rose-500: 244 63 94;
  --tw-rose-600: 225 29 72;
  --tw-rose-700: 190 18 60;
  --tw-rose-800: 254 205 211;
  --tw-rose-900: 255 228 230;
  --tw-rose-950: 255 241 242;

  --theme-canvas-bg: #f3ead6;
  --theme-canvas-text: #2e1a12;
  --theme-canvas-muted: #6b5444;
  --theme-border-subtle: #d9c9a6;
  --theme-border-strong: #7a1f1f;
  --theme-canvas-glow: linear-gradient(transparent, transparent);
  --theme-canvas-vignette: radial-gradient(ellipse at 50% 30%, transparent 55%, rgba(120, 90, 50, 0.12) 100%);
  --theme-canvas-pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.35 0 0 0 0 0.25 0 0 0 0 0.15 0 0 0 0.09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --theme-pattern-size: 160px 160px;
  --theme-brand-text: #7a1f1f;
  --theme-brand-glow: none;
  --theme-ornament: linear-gradient(#7a1f1f, #7a1f1f) top / 100% 2px no-repeat, linear-gradient(#7a1f1f, #7a1f1f) bottom / 100% 1px no-repeat;
  --theme-ornament-height: 6px;
  --theme-ornament-size: auto;

  --theme-surface-card: #fbf6ea;
  --theme-surface-header: rgba(251, 246, 234, 0.95);
  --theme-surface-well: #f3ead6;
  --theme-surface-interactive: #ece2cb;
  --theme-surface-interactive-hover: #e2d5b8;

  --theme-accent-gold: #7a1f1f;
  --theme-accent-gold-text: #7a1f1f;
  --theme-accent-primary: #7a1f1f;
  --theme-accent-gradient: linear-gradient(180deg, #8a2626, #6e1a1a);
  --theme-accent-cta: linear-gradient(180deg, #8a2626, #6e1a1a);
  --theme-accent-cta-hover: linear-gradient(180deg, #9b3030, #7a1f1f);
  --theme-accent-cta-text: #fbf6ea;
  --theme-accent-cta-shadow: 0 2px 6px rgba(122, 31, 31, 0.25);
  --theme-accent-special-cta: linear-gradient(180deg, #8a2626, #6e1a1a);
  --theme-accent-special-cta-text: #fbf6ea;
  --theme-accent-pill-bg: rgba(122, 31, 31, 0.08);
  --theme-accent-pill-border: rgba(122, 31, 31, 0.35);
  --theme-accent-pill-text: #7a1f1f;
  --theme-card-special-bg: #fdf3e6;
  --theme-card-special-border: #7a1f1f;
  --theme-card-special-glow: none;
  --theme-countdown-bg: #0f5e66;

  /* Ticket material: printed booklet with ruled grid */
  --theme-ticket-container-bg: #fbf6ea;
  --theme-ticket-sheet-bg: #fffdf6;
  --theme-torn-sheet-bg: #fffdf6;
  --theme-ticket-sheet-image: none;
  --theme-ticket-border: #2b2118;
  --theme-ticket-border-width: 1px;
  --theme-ticket-outline: none;
  --theme-ticket-radius: 2px;
  --theme-ticket-padding: 6px;
  --theme-ticket-shadow: 0 2px 0 #e4d6b8, 0 8px 18px rgba(80, 50, 20, 0.12);
  --theme-grid-gap: 1px;
  --theme-grid-line: #2b2118;
  --theme-grid-border: 1px solid #2b2118;
  --theme-row-gap: -1px;
  --theme-cell-empty-bg: #fffdf6;
  --theme-cell-empty-border: transparent;
  --theme-cell-empty-border-width: 0;
  --theme-cell-empty-border-style: solid;
  --theme-cell-empty-image: repeating-linear-gradient(45deg, rgba(43, 33, 24, 0.09) 0 1.5px, transparent 1.5px 6px);
  --theme-cell-empty-opacity: 1;
  --theme-cell-bg: #fffdf6;
  --theme-cell-text: #1f1410;
  --theme-cell-border: transparent;
  --theme-cell-border-width: 0;
  --theme-cell-radius: 0;
  --theme-cell-shadow: none;
  --theme-cell-hover-border: #7a1f1f;

  /* Stamp: translucent rubber ink circle */
  --theme-stamp-bg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath fill='%23b02030' fill-opacity='0.55' d='M50 6 C64 5 78 12 87 24 C95 35 96 50 93 62 C90 76 80 88 66 93 C54 97 40 96 29 90 C17 84 8 72 6 58 C4 45 7 31 16 21 C25 11 37 7 50 6 Z'/%3E%3Ccircle cx='50' cy='50' r='32' fill='none' stroke='%23fffdf6' stroke-opacity='0.22' stroke-width='5'/%3E%3C/svg%3E") center / 92% auto no-repeat, #fffdf6;
  --theme-stamp-text: #1f1410;
  --theme-stamp-contrast-bg: #fffdf6;
  --theme-stamp-border: transparent;
  --theme-stamp-shadow: inset 0 0 0 1px rgba(43, 33, 24, 0.05);
  --theme-stamp-check-color: #7a1f1f;

  /* Caller: ivory bingo ball with teal band */
  --theme-caller-card-bg: #fbf6ea;
  --theme-caller-ball-bg: #fffdf6;
  --theme-caller-ball-border: radial-gradient(circle at 32% 28%, #ffffff 0%, #f7efdc 45%, #d6c39a 100%);
  --theme-caller-ball-padding: 16%;
  --theme-caller-ball-radius: 50%;
  --theme-caller-ball-shadow: 0 8px 16px rgba(59, 31, 20, 0.22);
  --theme-caller-inner-radius: 50%;
  --theme-caller-inner-shadow: 0 0 0 6px #0f5e66, inset 0 1px 3px rgba(0, 0, 0, 0.15);
  --theme-caller-highlight: none;
  --theme-caller-frame: none;
  --theme-caller-display-padding: 0;
  --theme-caller-num-color: #1f1410;
  --theme-caller-num-shadow: none;
  --theme-caller-num-scale: 0.56;
  --theme-caller-glow: transparent;

  --theme-board-cell-bg: transparent;
  --theme-board-cell-border: #e4d6b8;
  --theme-board-cell-text: #8a7360;
  --theme-board-called-bg: radial-gradient(circle, rgba(176, 32, 48, 0.5) 0 62%, rgba(176, 32, 48, 0) 64%);
  --theme-board-called-text: #1f1410;
  --theme-board-called-border: #d9c9a6;
  --theme-board-called-shadow: none;
  --theme-board-called-scale: 1;
  --theme-board-radius: 50%;
  --theme-board-latest-ring: #0f5e66;
  --theme-board-pulse: rgba(15, 94, 102, 0.5);
}

/* --- Party Night (Pro, FE-THEME-06) --- */
[data-theme="party"] {
  color-scheme: dark;
  --font-display: 'Fredoka', 'Nunito', system-ui, sans-serif;
  --font-digits: 'Fredoka', 'Nunito', system-ui, sans-serif;
  --font-ui: 'Nunito', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --tw-white: 255 255 255;
  --tw-slate-50: 248 247 255;
  --tw-slate-100: 239 238 255;
  --tw-slate-200: 220 217 255;
  --tw-slate-300: 199 195 255;
  --tw-slate-400: 167 162 230;
  --tw-slate-500: 122 116 196;
  --tw-slate-600: 86 80 166;
  --tw-slate-700: 58 52 138;
  --tw-slate-800: 42 37 112;
  --tw-slate-900: 30 26 90;
  --tw-slate-950: 20 18 58;
  --tw-amber-50: 255 240 246;
  --tw-amber-100: 255 214 232;
  --tw-amber-200: 255 173 208;
  --tw-amber-300: 255 133 184;
  --tw-amber-400: 255 92 157;
  --tw-amber-500: 255 61 139;
  --tw-amber-600: 224 24 111;
  --tw-amber-700: 179 15 87;
  --tw-amber-800: 134 11 65;
  --tw-amber-900: 92 7 45;
  --tw-amber-950: 51 4 26;
  --tw-second-50: 236 254 255;
  --tw-second-100: 207 250 254;
  --tw-second-200: 165 243 252;
  --tw-second-300: 103 232 249;
  --tw-second-400: 34 211 238;
  --tw-second-500: 6 182 212;
  --tw-second-600: 8 145 178;
  --tw-second-700: 14 116 144;
  --tw-second-800: 21 94 117;
  --tw-second-900: 22 78 99;
  --tw-second-950: 8 51 68;

  --theme-canvas-bg: #14123a;
  --theme-canvas-text: #ffffff;
  --theme-canvas-muted: #c7c3ff;
  --theme-border-subtle: rgba(255, 255, 255, 0.1);
  --theme-border-strong: #ff3d8b;
  --theme-canvas-glow: radial-gradient(circle at 12% 0%, rgba(255, 61, 139, 0.28), transparent 45%);
  --theme-canvas-vignette: radial-gradient(circle at 92% 20%, rgba(34, 211, 238, 0.2), transparent 40%);
  --theme-canvas-pattern: none;
  --theme-pattern-size: auto;
  --theme-brand-text: #ffffff;
  --theme-brand-glow: drop-shadow(0 0 14px rgba(244, 63, 94, 0.5));
  --theme-ornament: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='16' viewBox='0 0 64 16'%3E%3Crect x='4' y='4' width='6' height='3' rx='1' fill='%23ff3d8b' transform='rotate(-20 7 5)'/%3E%3Crect x='20' y='9' width='6' height='3' rx='1' fill='%23ffd23f' transform='rotate(25 23 10)'/%3E%3Ccircle cx='34' cy='5' r='2' fill='%2322d3ee'/%3E%3Crect x='44' y='8' width='6' height='3' rx='1' fill='%2322d3ee' transform='rotate(-35 47 9)'/%3E%3Ccircle cx='58' cy='11' r='2' fill='%23ff3d8b'/%3E%3C/svg%3E") repeat-x;
  --theme-ornament-height: 16px;
  --theme-ornament-size: 64px 16px;

  --theme-surface-card: #221e5c;
  --theme-surface-header: rgba(20, 18, 58, 0.94);
  --theme-surface-well: #1b1850;
  --theme-surface-interactive: #2a2570;
  --theme-surface-interactive-hover: #3a348a;

  --theme-accent-gold: #ff3d8b;
  --theme-accent-gold-text: #ffd23f;
  --theme-accent-primary: #ff3d8b;
  --theme-accent-gradient: linear-gradient(180deg, #d81b60, #b71250);
  --theme-accent-cta: linear-gradient(180deg, #d81b60, #b71250);
  --theme-accent-cta-hover: linear-gradient(180deg, #e91e63, #c2185b);
  --theme-accent-cta-text: #ffffff;
  --theme-accent-cta-shadow: 0 4px 0 #880e4f;
  --theme-accent-special-cta: linear-gradient(180deg, #ffe066, #ffd23f);
  --theme-accent-special-cta-text: #14123a;
  --theme-accent-pill-bg: rgba(255, 210, 63, 0.14);
  --theme-accent-pill-border: rgba(255, 210, 63, 0.45);
  --theme-accent-pill-text: #ffd23f;
  --theme-card-special-bg: linear-gradient(135deg, rgba(255, 61, 139, 0.16), rgba(34, 30, 92, 0.95));
  --theme-card-special-border: #ff3d8b;
  --theme-card-special-glow: 0 0 18px rgba(255, 61, 139, 0.25);
  --theme-countdown-bg: linear-gradient(90deg, #ff3d8b, #ffd23f, #22d3ee);

  /* Ticket material: glossy card with gradient rim */
  --theme-ticket-container-bg: #221e5c;
  --theme-ticket-sheet-bg: #2b2670;
  --theme-torn-sheet-bg: #fbf6ea;
  --theme-torn-sheet-border: #8b5cf6;
  --theme-torn-cell-border: #c4b5fd;
  --theme-torn-empty-border: #ddd6fe;
  --theme-ticket-sheet-image: linear-gradient(#2b2670, #2b2670) padding-box, linear-gradient(120deg, #ff3d8b, #ffd23f, #22d3ee) border-box;
  --theme-ticket-border: transparent;
  --theme-ticket-border-width: 3px;
  --theme-ticket-outline: none;
  --theme-ticket-radius: 20px;
  --theme-ticket-padding: 10px;
  --theme-ticket-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
  --theme-cell-empty-bg: rgba(255, 255, 255, 0.07);
  --theme-cell-empty-border: transparent;
  --theme-cell-empty-border-width: 0;
  --theme-cell-empty-border-style: solid;
  --theme-cell-empty-image: none;
  --theme-cell-empty-opacity: 1;
  --theme-cell-bg: #ffffff;
  --theme-cell-text: #14123a;
  --theme-cell-border: transparent;
  --theme-cell-border-width: 0;
  --theme-cell-radius: 10px;
  --theme-cell-shadow: 0 3px 0 #b9b3ff;
  --theme-cell-hover-border: #ffd23f;

  /* Stamp: sticker */
  --theme-stamp-bg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ccircle cx='50' cy='54' r='43' fill='%23000000' fill-opacity='0.22'/%3E%3Ccircle cx='50' cy='50' r='43' fill='%23ffd23f' stroke='%23ffffff' stroke-width='6'/%3E%3Cellipse cx='36' cy='32' rx='13' ry='7' fill='%23ffffff' fill-opacity='0.55' transform='rotate(-30 36 32)'/%3E%3C/svg%3E") center / 94% auto no-repeat, #ffffff;
  --theme-stamp-text: #14123a;
  --theme-stamp-contrast-bg: #ffd23f;
  --theme-stamp-border: transparent;
  --theme-stamp-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4), 0 3px 0 #b9b3ff;
  --theme-stamp-check-color: #e0186f;

  /* Caller: glossy lottery ball */
  --theme-caller-card-bg: #221e5c;
  --theme-caller-ball-bg: #ffffff;
  --theme-caller-ball-border: radial-gradient(circle at 30% 25%, #ffd0e3 0%, #ff5c9d 28%, #e11d74 62%, #7d0a3f 100%);
  --theme-caller-ball-padding: 17%;
  --theme-caller-ball-radius: 50%;
  --theme-caller-ball-shadow: 0 12px 26px rgba(255, 61, 139, 0.45);
  --theme-caller-inner-radius: 50%;
  --theme-caller-inner-shadow: inset 0 -2px 4px rgba(20, 18, 58, 0.15);
  --theme-caller-highlight: rgba(255, 255, 255, 0.55);
  --theme-caller-frame: none;
  --theme-caller-display-padding: 0;
  --theme-caller-num-color: #14123a;
  --theme-caller-num-shadow: none;
  --theme-caller-num-scale: 0.68;
  --theme-caller-glow: transparent;

  --theme-board-cell-bg: rgba(255, 255, 255, 0.05);
  --theme-board-cell-border: transparent;
  --theme-board-cell-text: #8f8ad6;
  --theme-board-called-bg: radial-gradient(circle at 35% 30%, #ffffff 0 10%, #ff5c9d 40%, #e0186f 100%);
  --theme-board-called-text: #14123a;
  --theme-board-called-border: transparent;
  --theme-board-called-shadow: 0 2px 0 #9d0f4d;
  --theme-board-called-scale: 1;
  --theme-board-radius: 50%;
  --theme-board-latest-ring: #ffd23f;
  --theme-board-pulse: rgba(255, 210, 63, 0.6);

  /* Decade Balls (FE-THEME-08): Colour-coded master board balls */
  --theme-board-decade-0: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.75) 0 12%, #ff3d8b 42%);
  --theme-board-decade-1: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.75) 0 12%, #ffd23f 42%);
  --theme-board-decade-2: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.75) 0 12%, #22d3ee 42%);
  --theme-board-decade-3: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.75) 0 12%, #a78bfa 42%);
  --theme-board-decade-4: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.75) 0 12%, #34d399 42%);
  --theme-board-decade-5: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.75) 0 12%, #fb923c 42%);
  --theme-board-decade-6: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.75) 0 12%, #f472b6 42%);
  --theme-board-decade-7: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.75) 0 12%, #60a5fa 42%);
  --theme-board-decade-8: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.75) 0 12%, #facc15 42%);
}

