/* Haunted Mansion (id "mansion", premium): a spooky old house on a misty hill under a blue moonlit night, any time of year (a dark
   theme). Lamps up the path, an iron gate, a graveyard, lights coming and going in the windows, friendly ghosts and bats. The app:
   claret velvet buttons in carved dark wood with tarnished brass corners, damask-wallpapered cards under a picture rail, Head to Head
   tiles hung as gilt portraits with a candle on each, an iron railing along the dark-panelled bottom bar.
   The scene is SCENES.mansion in theme-mansion.js; its style items use the code "hm". */

:root {
  /* the damask on the wallpaper */
  --hm-damask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 56'%3E%3Cg fill='%23f3dc9a' fill-opacity='.075'%3E%3Cpath d='M20 3c3 7 11 9 11 17s-7 11-11 15c-4-4-11-7-11-15S17 10 20 3z'/%3E%3Cpath d='M20 37c2 4 6 5 6 9s-3 6-6 8c-3-2-6-4-6-8s4-5 6-9z'/%3E%3Cpath d='M0 20c3 2 6 6 0 12M40 20c-3 2-6 6 0 12'/%3E%3Ccircle cx='0' cy='50' r='2.400'/%3E%3Ccircle cx='40' cy='50' r='2.400'/%3E%3Ccircle cx='20' cy='0' r='1.600'/%3E%3C/g%3E%3Cpath d='M20 9v22M14 20h12' stroke='%23f3dc9a' stroke-opacity='.06' stroke-width='1.200'/%3E%3C/svg%3E");
  /* a dark-wood picture rail across the top of a card, brass rosettes and a little nameplate */
  --hm-rail: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 16'%3E%3Cpath d='M3 4h114l2 4-2 4H3l-2-4z' fill='%234a3328' stroke='%231b1033' stroke-width='1.400' stroke-linejoin='round'/%3E%3Cpath d='M6 7h108' stroke='%237a5644' stroke-width='1.200'/%3E%3Cpath d='M6 10h108' stroke='%232e1e18' stroke-width='1'/%3E%3Cg fill='%23c9a24a' stroke='%231b1033' stroke-width='1'%3E%3Ccircle cx='9' cy='8' r='4.200'/%3E%3Ccircle cx='111' cy='8' r='4.200'/%3E%3Crect x='47' y='1.500' width='26' height='13' rx='3'/%3E%3C/g%3E%3Cg fill='%23f3dc9a'%3E%3Ccircle cx='7.800' cy='6.800' r='1.400'/%3E%3Ccircle cx='109.800' cy='6.800' r='1.400'/%3E%3C/g%3E%3Cpath d='M51 6h18M51 10h18' stroke='%237a5a22' stroke-width='1.100'/%3E%3C/svg%3E");
  /* the iron railing with brass spear tips along the top of the bottom bar */
  --hm-ridge: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 96 18'%3E%3Cpath d='M0 16.500h96M0 9h96' stroke='%231b1033' stroke-width='2.800'/%3E%3Cpath d='M0 16.500h96M0 9h96' stroke='%234b4566' stroke-width='1.100'/%3E%3Cpath d='M6 18V5' stroke='%231b1033' stroke-width='2.600'/%3E%3Cpath d='M6 18V5.500' stroke='%234b4566' stroke-width='1'/%3E%3Cpath d='M6 .600l2.400 4.400h-4.800z' fill='%23c9a24a' stroke='%231b1033' stroke-width='.900' stroke-linejoin='round'/%3E%3Cpath d='M18 18V5' stroke='%231b1033' stroke-width='2.600'/%3E%3Cpath d='M18 18V5.500' stroke='%234b4566' stroke-width='1'/%3E%3Cpath d='M18 .600l2.400 4.400h-4.800z' fill='%23c9a24a' stroke='%231b1033' stroke-width='.900' stroke-linejoin='round'/%3E%3Cpath d='M30 18V5' stroke='%231b1033' stroke-width='2.600'/%3E%3Cpath d='M30 18V5.500' stroke='%234b4566' stroke-width='1'/%3E%3Cpath d='M30 .600l2.400 4.400h-4.800z' fill='%23c9a24a' stroke='%231b1033' stroke-width='.900' stroke-linejoin='round'/%3E%3Cpath d='M42 18V5' stroke='%231b1033' stroke-width='2.600'/%3E%3Cpath d='M42 18V5.500' stroke='%234b4566' stroke-width='1'/%3E%3Cpath d='M42 .600l2.400 4.400h-4.800z' fill='%23c9a24a' stroke='%231b1033' stroke-width='.900' stroke-linejoin='round'/%3E%3Cpath d='M54 18V5' stroke='%231b1033' stroke-width='2.600'/%3E%3Cpath d='M54 18V5.500' stroke='%234b4566' stroke-width='1'/%3E%3Cpath d='M54 .600l2.400 4.400h-4.800z' fill='%23c9a24a' stroke='%231b1033' stroke-width='.900' stroke-linejoin='round'/%3E%3Cpath d='M66 18V5' stroke='%231b1033' stroke-width='2.600'/%3E%3Cpath d='M66 18V5.500' stroke='%234b4566' stroke-width='1'/%3E%3Cpath d='M66 .600l2.400 4.400h-4.800z' fill='%23c9a24a' stroke='%231b1033' stroke-width='.900' stroke-linejoin='round'/%3E%3Cpath d='M78 18V5' stroke='%231b1033' stroke-width='2.600'/%3E%3Cpath d='M78 18V5.500' stroke='%234b4566' stroke-width='1'/%3E%3Cpath d='M78 .600l2.400 4.400h-4.800z' fill='%23c9a24a' stroke='%231b1033' stroke-width='.900' stroke-linejoin='round'/%3E%3Cpath d='M90 18V5' stroke='%231b1033' stroke-width='2.600'/%3E%3Cpath d='M90 18V5.500' stroke='%234b4566' stroke-width='1'/%3E%3Cpath d='M90 .600l2.400 4.400h-4.800z' fill='%23c9a24a' stroke='%231b1033' stroke-width='.900' stroke-linejoin='round'/%3E%3Cpath d='M9 15q0-4 3-4t3 3' fill='none' stroke='%231b1033' stroke-width='2.200'/%3E%3Cpath d='M9 15q0-4 3-4t3 3' fill='none' stroke='%234b4566' stroke-width='.900'/%3E%3Cpath d='M21 15q0-4 3-4t3 3' fill='none' stroke='%231b1033' stroke-width='2.200'/%3E%3Cpath d='M21 15q0-4 3-4t3 3' fill='none' stroke='%234b4566' stroke-width='.900'/%3E%3Cpath d='M33 15q0-4 3-4t3 3' fill='none' stroke='%231b1033' stroke-width='2.200'/%3E%3Cpath d='M33 15q0-4 3-4t3 3' fill='none' stroke='%234b4566' stroke-width='.900'/%3E%3Cpath d='M45 15q0-4 3-4t3 3' fill='none' stroke='%231b1033' stroke-width='2.200'/%3E%3Cpath d='M45 15q0-4 3-4t3 3' fill='none' stroke='%234b4566' stroke-width='.900'/%3E%3Cpath d='M57 15q0-4 3-4t3 3' fill='none' stroke='%231b1033' stroke-width='2.200'/%3E%3Cpath d='M57 15q0-4 3-4t3 3' fill='none' stroke='%234b4566' stroke-width='.900'/%3E%3Cpath d='M69 15q0-4 3-4t3 3' fill='none' stroke='%231b1033' stroke-width='2.200'/%3E%3Cpath d='M69 15q0-4 3-4t3 3' fill='none' stroke='%234b4566' stroke-width='.900'/%3E%3Cpath d='M81 15q0-4 3-4t3 3' fill='none' stroke='%231b1033' stroke-width='2.200'/%3E%3Cpath d='M81 15q0-4 3-4t3 3' fill='none' stroke='%234b4566' stroke-width='.900'/%3E%3Cpath d='M93 15q0-4 3-4t3 3' fill='none' stroke='%231b1033' stroke-width='2.200'/%3E%3Cpath d='M93 15q0-4 3-4t3 3' fill='none' stroke='%234b4566' stroke-width='.900'/%3E%3C/svg%3E");
  /* a candle in a brass dish (a topic tile's top right) */
  --hm-crest: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 36'%3E%3Cpath d='M13 2q5 6 0 11-5-5 0-11z' fill='%23ffc94a' stroke='%231b1033' stroke-width='1.300' stroke-linejoin='round'/%3E%3Cpath d='M13 6q2 3 0 5-2-2 0-5z' fill='%23fff4c8'/%3E%3Cpath d='M8 14h10v14H8z' fill='%23f3ead6' stroke='%231b1033' stroke-width='1.400' stroke-linejoin='round'/%3E%3Cpath d='M8 16q2 3 3 0M15 16q1 4 3 1' fill='none' stroke='%23d8cbb0' stroke-width='1.200'/%3E%3Cpath d='M2 30q11-5 22 0l-3 4H5z' fill='%23c9a24a' stroke='%231b1033' stroke-width='1.400' stroke-linejoin='round'/%3E%3Cpath d='M6 30q7-2.400 14 0' fill='none' stroke='%23f3dc9a' stroke-width='1.100'/%3E%3C/svg%3E");
  /* brass corner brackets on a main button, and the glint on them */
  --hm-corners-a: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cg transform=''%3E%3Cpath d='M3 15V6q0-3 3-3h9' fill='none' stroke='%231b1033' stroke-width='4.400' stroke-linecap='round'/%3E%3Cpath d='M3 15V6q0-3 3-3h9' fill='none' stroke='%23c9a24a' stroke-width='2.200' stroke-linecap='round'/%3E%3Ccircle cx='9.500' cy='9.500' r='3' fill='%23c9a24a' stroke='%231b1033' stroke-width='1.200'/%3E%3C/g%3E%3Cg transform='translate(40 0) scale(-1 1)'%3E%3Cpath d='M3 15V6q0-3 3-3h9' fill='none' stroke='%231b1033' stroke-width='4.400' stroke-linecap='round'/%3E%3Cpath d='M3 15V6q0-3 3-3h9' fill='none' stroke='%23c9a24a' stroke-width='2.200' stroke-linecap='round'/%3E%3Ccircle cx='9.500' cy='9.500' r='3' fill='%23c9a24a' stroke='%231b1033' stroke-width='1.200'/%3E%3C/g%3E%3Cg transform='translate(0 40) scale(1 -1)'%3E%3Cpath d='M3 15V6q0-3 3-3h9' fill='none' stroke='%231b1033' stroke-width='4.400' stroke-linecap='round'/%3E%3Cpath d='M3 15V6q0-3 3-3h9' fill='none' stroke='%23c9a24a' stroke-width='2.200' stroke-linecap='round'/%3E%3Ccircle cx='9.500' cy='9.500' r='3' fill='%23c9a24a' stroke='%231b1033' stroke-width='1.200'/%3E%3C/g%3E%3Cg transform='translate(40 40) scale(-1 -1)'%3E%3Cpath d='M3 15V6q0-3 3-3h9' fill='none' stroke='%231b1033' stroke-width='4.400' stroke-linecap='round'/%3E%3Cpath d='M3 15V6q0-3 3-3h9' fill='none' stroke='%23c9a24a' stroke-width='2.200' stroke-linecap='round'/%3E%3Ccircle cx='9.500' cy='9.500' r='3' fill='%23c9a24a' stroke='%231b1033' stroke-width='1.200'/%3E%3C/g%3E%3C/svg%3E");
  --hm-corners-b: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cg transform=''%3E%3Ccircle cx='8.600' cy='8.600' r='1.100' fill='%23fff6d6'/%3E%3Cpath d='M5.500 3.200h4' stroke='%23fff6d6' stroke-width='1' stroke-linecap='round'/%3E%3C/g%3E%3Cg transform='translate(40 0) scale(-1 1)'%3E%3Ccircle cx='8.600' cy='8.600' r='1.100' fill='%23fff6d6'/%3E%3Cpath d='M5.500 3.200h4' stroke='%23fff6d6' stroke-width='1' stroke-linecap='round'/%3E%3C/g%3E%3Cg transform='translate(0 40) scale(1 -1)'%3E%3Ccircle cx='8.600' cy='8.600' r='1.100' fill='%23fff6d6'/%3E%3Cpath d='M5.500 3.200h4' stroke='%23fff6d6' stroke-width='1' stroke-linecap='round'/%3E%3C/g%3E%3Cg transform='translate(40 40) scale(-1 -1)'%3E%3Ccircle cx='8.600' cy='8.600' r='1.100' fill='%23fff6d6'/%3E%3Cpath d='M5.500 3.200h4' stroke='%23fff6d6' stroke-width='1' stroke-linecap='round'/%3E%3C/g%3E%3C/svg%3E");
}

/* ---- colours ---- */
[data-theme="mansion"] {
  --bg-0: #0a0f26; --bg-1: #111a3a; --bg-2: #1a254e;
  --card: rgba(50, 22, 38, .96); --card-2: rgba(243, 220, 154, .09); --panel-edge: rgba(201, 162, 74, .6);
  --ink: #f3ead6; --ink-dim: #c9c0d8; --on-hot: #ffffff;
  --hot: #9a2f45; --cool: #2f6f8a; --amber: #d9a441; --gold: #c9a24a; --good: #6fd08c; --bad: #ff6b6b; --seen: #9cc8ff;
  --title-1: #f3ead6; --title-2: #e8c46a;
  --mine: rgba(154, 47, 69, .34); --mine-edge: rgba(201, 162, 74, .7); --fact-bg: rgba(47, 111, 138, .2); --fact-edge: rgba(156, 200, 255, .4);
  --shadow: 0 8px 24px rgba(4, 6, 20, .6);
  --scrim: rgba(6, 8, 24, .7); --off: rgba(243, 234, 214, .18); --press: rgba(0, 0, 0, .32);
  /* the portraits' painted grounds */
  --s-general: #9a2f45; --s-geography: #2f7a6a; --s-history: #8a5a2a; --s-science: #2f5f9a;
  --s-nature: #3f7a3a; --s-music: #6e3a8a; --s-film_tv: #4a4a9a; --s-sport: #b07a1a;
  --s-arts_lit: #8a2f5f; --s-food: #a8522a; --s-tech_games: #2a7088; --s-words: #4f6a3a;
  /* bottom-bar icon colours (look3d.js TAB_ICONS): moonlit blue, claret, ivy, brass, slate, ivory, candle, oak */
  --tb-blue-1: #b4ccff; --tb-blue-2: #2f5f9a; --tb-pink-1: #f2b0c0; --tb-pink-2: #9a2f45; --tb-green-1: #b8e0b0; --tb-green-2: #3f7a3a;
  --tb-gold-1: #f6e0a0; --tb-gold-2: #b8913e; --tb-purple-1: #d4cce8; --tb-purple-2: #5f5a78; --tb-red-1: #f4a8a8; --tb-red-2: #9a2f45;
  --tb-cream-1: #fff6e0; --tb-cream-2: #d8c8a4; --tb-orange-1: #ffd88a; --tb-orange-2: #d0902a; --tb-brown-1: #9a7458; --tb-brown-2: #4a3328;
}
[data-theme="mansion"] #splash { background: linear-gradient(#070c22, #16285a 46%, #2c4a86 60%, #1e3333); }

/* ---- the scene ---- */
[data-theme="mansion"] #stage-bg { background: #111a3a; }
.hm-scene { position: absolute; inset: 0; overflow: hidden; --b: calc(var(--tabh) + env(safe-area-inset-bottom)); pointer-events: none; }
.hm-scene img { display: block; -webkit-user-drag: none; }
.hm-sky { position: absolute; inset: 0; background: radial-gradient(60% 34% at 50% 50%, rgba(120, 150, 220, .35), transparent 70%), linear-gradient(#060b20, #0e1a40 26%, #203a74 46%, #35538e 52%, #1e3333 53%); }
.hm-stars { position: absolute; inset: 0 0 50% 0; }
.hm-stars i { position: absolute; border-radius: 50%; background: #fff; box-shadow: 0 0 4px rgba(200, 220, 255, .9); animation: hm-twinkle 5s ease-in-out infinite; }
@keyframes hm-twinkle { 0%, 100% { opacity: .9; } 50% { opacity: .25; } }
/* one sheet in world units, as tall as the space above the bottom bar, centred; every piece is placed in it by percent */
.hm-world { position: absolute; left: 50%; bottom: var(--b); height: calc(100% - var(--b)); aspect-ratio: 880 / 660; transform: translateX(-50%); }
.hm-world > * { position: absolute; }
.hm-layer { max-width: none; }
.hm-ground { position: absolute; left: 0; right: 0; bottom: 0; height: var(--b); background: linear-gradient(#22383a, #152626); }
/* the moon: pale and big, its seas faint, a cold halo round it */
.hm-moon { border-radius: 50%; background: radial-gradient(circle at 38% 36%, #ffffff, #eef2ff 40%, #ccd8f6 72%, #b4c4ea);
  box-shadow: 0 0 24px 8px rgba(210, 222, 255, .5), 0 0 90px 40px rgba(130, 160, 235, .28); }
.hm-moon b { position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(18% 15% at 34% 56%, rgba(150, 165, 205, .45), transparent 70%), radial-gradient(12% 11% at 62% 30%, rgba(150, 165, 205, .4), transparent 70%), radial-gradient(22% 18% at 64% 66%, rgba(160, 175, 215, .35), transparent 70%); }
/* clouds and mist: two copies of a strip, sliding for ever */
.hm-drift { left: -60%; width: 440%; overflow: hidden; }
.hm-drift i { position: absolute; inset: 0; background-repeat: repeat-x; background-size: 50% 100%; animation: hm-slide 210s linear infinite; }
.hm-drift.b i { animation-duration: 140s; }
.hm-mist i { animation-duration: 95s; }
.hm-mist.b { opacity: .75; }
.hm-mist.b i { animation-duration: 64s; animation-direction: reverse; }
@keyframes hm-slide { to { transform: translateX(-50%); } }
/* the lights: windows on most of the night with a stutter now and then, a room lit and left, the lamps and candles flickering */
.hm-glow { max-width: none; will-change: opacity; }
.hm-glow.a { animation: hm-on 11s linear infinite; }
.hm-glow.b { animation: hm-room 17s ease-in-out infinite; }
.hm-glow.c { animation: hm-flicker 2.600s steps(1) infinite; }
@keyframes hm-on { 0%, 44%, 60%, 100% { opacity: 1; } 47% { opacity: .3; } 49% { opacity: .9; } 52% { opacity: .35; } }
@keyframes hm-room { 0%, 100% { opacity: 0; } 12%, 52% { opacity: 1; } 62% { opacity: 0; } }
@keyframes hm-flicker { 0% { opacity: .92; } 18% { opacity: 1; } 33% { opacity: .8; } 49% { opacity: .97; } 68% { opacity: .86; } 84% { opacity: 1; } }
/* a picture strip of N frames, played by steps: the ghosts' float, the bats' wings */
.hm-reel { background-repeat: no-repeat; background-size: calc(var(--n) * 100%) 100%; animation: hm-reel var(--t, 1s) steps(var(--n), jump-none) infinite; }
@keyframes hm-reel { from { background-position-x: 0%; } to { background-position-x: 100%; } }
/* everything that moves about: the script places it, in world units */
.hm-mover { left: 0; top: 0; will-change: transform, opacity; }
.hm-mover i { display: block; width: 100%; height: 100%; }
.hm-ghost i { filter: drop-shadow(0 0 6px rgba(190, 210, 255, .65)); }

/* ---- the app ---- */
/* no stage spotlights here: the light is the moon */
[data-theme="mansion"] .hbeam { display: none; }
/* the title: "Party" in old ivory, the second word in tarnished brass, with a thick dark edge */
[data-theme="mansion"] .logo .l1 { color: #f3ead6; text-shadow: 0 0 2px #1b1033, 0 2px 0 #2a1a2a, 0 3px 10px rgba(140, 170, 240, .45); }
[data-theme="mansion"] .logo .l2 { color: transparent; background: linear-gradient(180deg, #fff1c0 12%, #e8c46a 46%, #b8913e 54%, #6b4e1e 100%); -webkit-background-clip: text; background-clip: text;
  filter: drop-shadow(1.2px 0 0 #1b1033) drop-shadow(-1.2px 0 0 #1b1033) drop-shadow(0 1.2px 0 #1b1033) drop-shadow(0 -1.2px 0 #1b1033) drop-shadow(0 3px 0 #2a1a12); }
[data-theme="mansion"] :is(.logo .beta, .codechip, .bigcode, .me .pts, .pl .sc, .stat b, .rank .pt, .crumb, .agree a, .linkbtn) { color: #e8c46a; }

/* main buttons: claret velvet in a carved dark-wood frame, a brass bracket at each corner */
[data-theme="mansion"] .btn:not(.ghost):not(.small) { position: relative; overflow: visible; }
:root[data-theme="mansion"] .btn:not(.ghost) { border-radius: 9px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, 0) 42%, rgba(20, 6, 14, .3)), repeating-linear-gradient(90deg, rgba(0, 0, 0, .07) 0 2px, transparent 2px 5px), var(--hot);
  box-shadow: inset 0 0 0 1.500px #c9a24a, inset 0 0 0 5px #4a3328, inset 0 0 0 6.500px #c9a24a, inset 0 0 0 7.500px rgba(27, 16, 51, .6), 0 5px 0 #2a1a12, 0 12px 18px -6px rgba(0, 0, 0, .6); }
[data-theme="mansion"] .btn:not(.ghost):not(.small)::before, [data-theme="mansion"] .btn:not(.ghost):not(.small)::after {
  content: ''; position: absolute; inset: 1px; z-index: 2; pointer-events: none; box-sizing: border-box; background: none;
  border: 11px solid transparent; border-image: var(--hm-corners-a) 40% / 11px no-repeat; border-radius: 0; }
[data-theme="mansion"] .btn:not(.ghost):not(.small)::after { border-image-source: var(--hm-corners-b); animation: hm-glint 4.800s ease-in-out infinite; }
@keyframes hm-glint { 50% { opacity: .3; } }

/* cards: damask wallpaper in a brass-lined frame, a dark-wood picture rail across the top */
[data-theme="mansion"] .panel { position: relative; margin-top: .6rem; }
:root[data-theme="mansion"] :is(.panel, .sheetbox) { background: var(--hm-damask) 0 0 / 40px 56px, radial-gradient(90% 60% at 50% 0, rgba(255, 220, 160, .1), transparent 72%), radial-gradient(80% 60% at 50% 120%, rgba(0, 0, 0, .3), transparent 70%), var(--card);
  box-shadow: inset 0 0 0 1.500px #c9a24a, inset 0 0 0 4.500px #3a2820, inset 0 0 0 5.500px rgba(201, 162, 74, .55), 0 12px 24px -10px rgba(0, 0, 0, .7); }
[data-theme="mansion"] .panel::before { content: ''; position: absolute; left: 6%; right: 6%; top: -.55rem; height: 1rem; pointer-events: none; z-index: 1;
  background: var(--hm-rail) center / 100% 100% no-repeat; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .45)); }

/* Head to Head tiles: gilt portraits, each its own painted ground with an oval glow, a candle burning on the frame's corner */
[data-theme="mansion"] .topic { position: relative; overflow: visible; border: 0; border-radius: 8px;
  background: radial-gradient(56% 64% at 50% 44%, color-mix(in srgb, var(--sc) 66%, #fff4d6), var(--sc) 58%, color-mix(in srgb, var(--sc) 52%, #0e0814));
  box-shadow: inset 0 0 0 2px #1b1033, inset 0 0 0 5px #c9a24a, inset 0 0 0 6.500px #6b4e1e, inset 0 0 0 8px #1b1033, inset 0 0 16px 8px rgba(10, 4, 16, .4), 0 4px 0 #2a1a12, 0 9px 14px -6px rgba(0, 0, 0, .6); }
[data-theme="mansion"] .topic::after { content: ''; position: absolute; top: -.35rem; right: .35rem; width: 1.05rem; height: 1.45rem; pointer-events: none; background: var(--hm-crest) center / contain no-repeat; filter: drop-shadow(0 0 5px rgba(255, 200, 100, .55)); }
[data-theme="mansion"] .topic span, [data-theme="mansion"] .topic small { text-shadow: 0 1px 3px rgba(10, 4, 16, .85); }

/* the bottom bar: dark oak panelling under a brass rail, the iron railing along its top, the home button lit like a candle */
[data-theme="mansion"] #tabbar { overflow: visible; background: repeating-linear-gradient(90deg, rgba(0, 0, 0, .38) 0 2px, rgba(255, 220, 170, .06) 2px 3px, transparent 3px 4.6rem), linear-gradient(180deg, #4a3328, #3a2820 55%, #261a14); border-top: 2px solid #1b1033; box-shadow: inset 0 3px 0 #c9a24a, inset 0 4px 0 rgba(27, 16, 51, .7), 0 -8px 22px -8px rgba(0, 0, 0, .7); }
[data-theme="mansion"] #tabbar::before { content: ''; position: absolute; left: 0; right: 0; top: -16px; height: 17px; pointer-events: none; background: var(--hm-ridge) 0 0 / 88px 16px repeat-x; }
[data-theme="mansion"] #tabbar button.homebtn::before { background: linear-gradient(180deg, #4a3328, #3a2820); box-shadow: 0 -2px 0 #1b1033, 0 0 0 2px #c9a24a inset, 0 -4px 16px rgba(255, 200, 110, .6); }
[data-theme="mansion"] #tabbar button { color: #f3ead6; text-shadow: 0 1px 2px rgba(10, 4, 16, .9); }
[data-theme="mansion"] #tabbar button.on { color: #ffd27a; }

/* ---- Haunted Mansion style items (code "hm") ---- */
/* the win celebration: friendly ghosts, bats and candles tumbling down (style-bundles.js draws them) */
.confetti.fx-hm i { position: absolute; top: -12%; width: calc(2.4rem * var(--s, 1)); height: auto; background: none; animation: fall 3.600s linear infinite; }
/* chat bubble "Haunted Portrait": damask wallpaper in a double brass frame */
html body .bubble.bub-hm.bub-hm { position: relative; color: #f3ead6; border: 3px double #c9a24a; border-radius: 10px;
  background: var(--hm-damask) 0 0 / 26px 36px, radial-gradient(80% 90% at 50% 40%, #4a2238, #2a1220); box-shadow: 0 0 0 1.500px #1b1033, inset 0 0 10px rgba(0, 0, 0, .5); }
html body .bubble.bub-hm.bub-hm small { color: #d8c8a8; opacity: 1; }

/* answer buttons "Brass Nameplates": the answer's colour inside a polished brass plate, a screw at each end */
body.btns-hm .abtn, .btns-hm-demo { position: relative; overflow: visible !important; color: #fff !important; text-shadow: 0 1px 2px rgba(10, 4, 16, .85) !important; border: 2px solid #1b1033 !important; border-radius: 12px !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, .18), rgba(255, 255, 255, 0) 45%, rgba(10, 4, 16, .26)), var(--c) !important;
  box-shadow: inset 0 0 0 3px #e8c46a, inset 0 0 0 4.500px #8a6a2a, inset 0 0 0 5.500px rgba(27, 16, 51, .5), 0 5px 0 #2a1a12, 0 10px 14px -6px rgba(0, 0, 0, .55) !important; }
body.btns-hm .abtn::before, .btns-hm-demo::before { content: ''; position: absolute; inset: 0; width: auto; height: auto; z-index: 2; border: 0; border-radius: 0; opacity: 1; pointer-events: none;
  background: radial-gradient(circle at 12px 50%, #fff1c0 0 1.500px, #c9a24a 2px 3.500px, #1b1033 4px 4.600px, transparent 5px), radial-gradient(circle at calc(100% - 12px) 50%, #fff1c0 0 1.500px, #c9a24a 2px 3.500px, #1b1033 4px 4.600px, transparent 5px); }
body.btns-hm .abtn::after { content: none; }
body.btns-hm .abtn:active { transform: translateY(4px); box-shadow: inset 0 0 0 3px #e8c46a, 0 1px 0 #2a1a12 !important; }
.btns-hm-demo { --c: #9a2f45; }

@media (prefers-reduced-motion: reduce) {
  [data-theme="mansion"] .hm-scene *, [data-theme="mansion"] .btn::after { animation: none !important; }
}
