/* Toy Town (id "toytown", premium): a bright toy town on a playroom floor, as if the toys had come to life, for all ages (a light
   app of painted wood and plastic bricks over a sunny playroom). Honey floorboards and a braided rug, crayon roads, a wooden
   track with a wind-up train going round it, building-block houses under a rainbow painted on the wall, a jack-in-the-box,
   a rocking horse, spinning tops, a toy car and toy soldiers on the march, balloons drifting up. The app: cream painted-wood
   cards with a row of bricks clicked along the top, buttons as glossy bricks with studs on top, topic tiles as painted wooden
   blocks with a balloon tied on, a beech shelf for the bottom bar with bricks along it. No Christmas, no snow, no elves.
   The scene is SCENES.toytown in theme-toytown.js; its style items use the code "tt". */

:root {
  /* painted wood */
  --tt-wood: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 60'%3E%3Crect width='60' height='60' fill='%23fff7e6'/%3E%3Cg fill='none' stroke='%23e9cfa0' stroke-opacity='.55' stroke-width='.8'%3E%3Cpath d='M0 6q15 3 30 0t30 0'/%3E%3Cpath d='M0 19q20-4 34 1t26-1'/%3E%3Cpath d='M0 31q12 3 26 0t34 1'/%3E%3Cpath d='M0 44q18-3 31 1t29-2'/%3E%3Cpath d='M0 55q14 2 28 0t32 0'/%3E%3C/g%3E%3Cellipse cx='42' cy='25' rx='4' ry='1.600' fill='none' stroke='%23e2c08c' stroke-opacity='.5' stroke-width='.7'/%3E%3C/svg%3E");
  /* across a card's top: bricks clicked together */
  --tt-band: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 18'%3E%3Crect x='6.85' y='3.24' width='4.8' height='3.84' rx='.7' fill='%23e8332a' stroke='%231b1033' stroke-width='.9'/%3E%3Cpath d='M7.93 4.2h1.68' stroke='%23ff8a80' stroke-width='.8' stroke-linecap='round'/%3E%3Crect x='21.35' y='3.24' width='4.8' height='3.84' rx='.7' fill='%23e8332a' stroke='%231b1033' stroke-width='.9'/%3E%3Cpath d='M22.43 4.2h1.68' stroke='%23ff8a80' stroke-width='.8' stroke-linecap='round'/%3E%3Crect x='2' y='6' width='29' height='11' rx='1.6' fill='%23e8332a' stroke='%231b1033' stroke-width='1.1'/%3E%3Cpath d='M3.6 7.3h25.8' stroke='%23ff8a80' stroke-width='1' stroke-linecap='round'/%3E%3Cpath d='M3.4 15.9h26.2' stroke='%23a81c16' stroke-width='1.2' stroke-linecap='round'/%3E%3Crect x='35.85' y='3.24' width='4.8' height='3.84' rx='.7' fill='%23ffc61a' stroke='%231b1033' stroke-width='.9'/%3E%3Cpath d='M36.93 4.2h1.68' stroke='%23fff0a0' stroke-width='.8' stroke-linecap='round'/%3E%3Crect x='50.35' y='3.24' width='4.8' height='3.84' rx='.7' fill='%23ffc61a' stroke='%231b1033' stroke-width='.9'/%3E%3Cpath d='M51.43 4.2h1.68' stroke='%23fff0a0' stroke-width='.8' stroke-linecap='round'/%3E%3Crect x='31' y='6' width='29' height='11' rx='1.6' fill='%23ffc61a' stroke='%231b1033' stroke-width='1.1'/%3E%3Cpath d='M32.6 7.3h25.8' stroke='%23fff0a0' stroke-width='1' stroke-linecap='round'/%3E%3Cpath d='M32.4 15.9h26.2' stroke='%23c98f00' stroke-width='1.2' stroke-linecap='round'/%3E%3Crect x='64.85' y='3.24' width='4.8' height='3.84' rx='.7' fill='%232a6fdb' stroke='%231b1033' stroke-width='.9'/%3E%3Cpath d='M65.93 4.2h1.68' stroke='%238fc0ff' stroke-width='.8' stroke-linecap='round'/%3E%3Crect x='79.35' y='3.24' width='4.8' height='3.84' rx='.7' fill='%232a6fdb' stroke='%231b1033' stroke-width='.9'/%3E%3Cpath d='M80.43 4.2h1.68' stroke='%238fc0ff' stroke-width='.8' stroke-linecap='round'/%3E%3Crect x='60' y='6' width='29' height='11' rx='1.6' fill='%232a6fdb' stroke='%231b1033' stroke-width='1.1'/%3E%3Cpath d='M61.6 7.3h25.8' stroke='%238fc0ff' stroke-width='1' stroke-linecap='round'/%3E%3Cpath d='M61.4 15.9h26.2' stroke='%231a4ea8' stroke-width='1.2' stroke-linecap='round'/%3E%3Crect x='93.85' y='3.24' width='4.8' height='3.84' rx='.7' fill='%232fae4e' stroke='%231b1033' stroke-width='.9'/%3E%3Cpath d='M94.93 4.2h1.68' stroke='%239ee6a8' stroke-width='.8' stroke-linecap='round'/%3E%3Crect x='108.35' y='3.24' width='4.8' height='3.84' rx='.7' fill='%232fae4e' stroke='%231b1033' stroke-width='.9'/%3E%3Cpath d='M109.43 4.2h1.68' stroke='%239ee6a8' stroke-width='.8' stroke-linecap='round'/%3E%3Crect x='89' y='6' width='29' height='11' rx='1.6' fill='%232fae4e' stroke='%231b1033' stroke-width='1.1'/%3E%3Cpath d='M90.6 7.3h25.8' stroke='%239ee6a8' stroke-width='1' stroke-linecap='round'/%3E%3Cpath d='M90.4 15.9h26.2' stroke='%231c7a34' stroke-width='1.2' stroke-linecap='round'/%3E%3C/svg%3E");
  /* along the top of the bottom bar: a row of bricks */
  --tt-ridge: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 96 16'%3E%3Crect x='3.8' y='2.47' width='4.4' height='3.52' rx='.7' fill='%23e8332a' stroke='%231b1033' stroke-width='.9'/%3E%3Cpath d='M4.79 3.35h1.54' stroke='%23ff8a80' stroke-width='.8' stroke-linecap='round'/%3E%3Crect x='15.8' y='2.47' width='4.4' height='3.52' rx='.7' fill='%23e8332a' stroke='%231b1033' stroke-width='.9'/%3E%3Cpath d='M16.79 3.35h1.54' stroke='%23ff8a80' stroke-width='.8' stroke-linecap='round'/%3E%3Crect x='0' y='5' width='24' height='11' rx='1.6' fill='%23e8332a' stroke='%231b1033' stroke-width='1.1'/%3E%3Cpath d='M1.6 6.3h20.8' stroke='%23ff8a80' stroke-width='1' stroke-linecap='round'/%3E%3Cpath d='M1.4 14.9h21.2' stroke='%23a81c16' stroke-width='1.2' stroke-linecap='round'/%3E%3Crect x='27.8' y='2.47' width='4.4' height='3.52' rx='.7' fill='%23ffc61a' stroke='%231b1033' stroke-width='.9'/%3E%3Cpath d='M28.79 3.35h1.54' stroke='%23fff0a0' stroke-width='.8' stroke-linecap='round'/%3E%3Crect x='39.8' y='2.47' width='4.4' height='3.52' rx='.7' fill='%23ffc61a' stroke='%231b1033' stroke-width='.9'/%3E%3Cpath d='M40.79 3.35h1.54' stroke='%23fff0a0' stroke-width='.8' stroke-linecap='round'/%3E%3Crect x='24' y='5' width='24' height='11' rx='1.6' fill='%23ffc61a' stroke='%231b1033' stroke-width='1.1'/%3E%3Cpath d='M25.6 6.3h20.8' stroke='%23fff0a0' stroke-width='1' stroke-linecap='round'/%3E%3Cpath d='M25.4 14.9h21.2' stroke='%23c98f00' stroke-width='1.2' stroke-linecap='round'/%3E%3Crect x='51.8' y='2.47' width='4.4' height='3.52' rx='.7' fill='%232fae4e' stroke='%231b1033' stroke-width='.9'/%3E%3Cpath d='M52.79 3.35h1.54' stroke='%239ee6a8' stroke-width='.8' stroke-linecap='round'/%3E%3Crect x='63.8' y='2.47' width='4.4' height='3.52' rx='.7' fill='%232fae4e' stroke='%231b1033' stroke-width='.9'/%3E%3Cpath d='M64.79 3.35h1.54' stroke='%239ee6a8' stroke-width='.8' stroke-linecap='round'/%3E%3Crect x='48' y='5' width='24' height='11' rx='1.6' fill='%232fae4e' stroke='%231b1033' stroke-width='1.1'/%3E%3Cpath d='M49.6 6.3h20.8' stroke='%239ee6a8' stroke-width='1' stroke-linecap='round'/%3E%3Cpath d='M49.4 14.9h21.2' stroke='%231c7a34' stroke-width='1.2' stroke-linecap='round'/%3E%3Crect x='75.8' y='2.47' width='4.4' height='3.52' rx='.7' fill='%232a6fdb' stroke='%231b1033' stroke-width='.9'/%3E%3Cpath d='M76.79 3.35h1.54' stroke='%238fc0ff' stroke-width='.8' stroke-linecap='round'/%3E%3Crect x='87.8' y='2.47' width='4.4' height='3.52' rx='.7' fill='%232a6fdb' stroke='%231b1033' stroke-width='.9'/%3E%3Cpath d='M88.79 3.35h1.54' stroke='%238fc0ff' stroke-width='.8' stroke-linecap='round'/%3E%3Crect x='72' y='5' width='24' height='11' rx='1.6' fill='%232a6fdb' stroke='%231b1033' stroke-width='1.1'/%3E%3Cpath d='M73.6 6.3h20.8' stroke='%238fc0ff' stroke-width='1' stroke-linecap='round'/%3E%3Cpath d='M73.4 14.9h21.2' stroke='%231a4ea8' stroke-width='1.2' stroke-linecap='round'/%3E%3C/svg%3E");
  /* a balloon on its string (a topic tile's top right) */
  --tt-crest: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 36'%3E%3Cpath d='M13 22q-3 4 0 7t0 6' fill='none' stroke='%231b1033' stroke-width='1.100' stroke-linecap='round'/%3E%3Cellipse cx='13' cy='11' rx='9' ry='10.400' fill='%23e8332a' stroke='%231b1033' stroke-width='1.400'/%3E%3Cpath d='M10.600 21h4.800l-2.400 2.800z' fill='%23e8332a' stroke='%231b1033' stroke-width='1.100' stroke-linejoin='round'/%3E%3Cellipse cx='9.200' cy='7' rx='2.400' ry='3.600' fill='%23ffffff' fill-opacity='.65' transform='rotate(-20 9.200 7)'/%3E%3C/svg%3E");
  /* a wind-up key (the Wooden Block bubble) */
  --tt-key: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 22'%3E%3Cpath d='M2 11h10' stroke='%231b1033' stroke-width='5' stroke-linecap='round'/%3E%3Cpath d='M2 11h10' stroke='%23d9dde6' stroke-width='2.400' stroke-linecap='round'/%3E%3Cpath d='M12 11q0-9 8-9 8 0 8 9t-8 9q-8 0-8-9z' fill='%23ffc61a' stroke='%231b1033' stroke-width='1.400'/%3E%3Ccircle cx='20' cy='11' r='3.400' fill='%23fff6d0' stroke='%231b1033' stroke-width='1.100'/%3E%3C/svg%3E");
}

/* ---- colours ---- */
[data-theme="toytown"] {
  --bg-0: #f3dfbd; --bg-1: #fbeed4; --bg-2: #fff8ea;
  --card: rgba(255, 249, 236, .97); --card-2: rgba(184, 133, 74, .13); --panel-edge: #d9a865;
  --ink: #2b2140; --ink-dim: #6c5f78; --on-hot: #ffffff;
  --hot: #e8332a; --cool: #2a6fdb; --amber: #ff8a1f; --gold: #ffc61a; --good: #2fae4e; --bad: #d1262e; --seen: #2a6fdb;
  --title-1: #2b2140; --title-2: #e8332a;
  --mine: #fff0b0; --mine-edge: #ffc61a; --fact-bg: #e6f0ff; --fact-edge: #9fc0f0;
  --shadow: 0 1px 2px rgba(43, 33, 64, .1), 0 6px 14px rgba(120, 80, 30, .18);
  --scrim: rgba(43, 33, 64, .45); --off: #e6d5b4; --press: #f0dfc0;
  /* the topic blocks' paint */
  --s-general: #e8332a; --s-geography: #1f9a6a; --s-history: #c8782a; --s-science: #2a6fdb;
  --s-nature: #2fae4e; --s-music: #8a4fd8; --s-film_tv: #4a56c8; --s-sport: #ff8a1f;
  --s-arts_lit: #e0408a; --s-food: #e05a2a; --s-tech_games: #13a0c0; --s-words: #7a9a1a;
  /* the light-theme fixes theme-3d.css and app.css give the light themes */
  --d3: .2;
  --r-common: #6a6252; --r-uncommon: #2c7a34; --r-rare: #1f55b8;
  --r-epic: #7030b0; --r-legendary: #b4620a; --r-mythic: #4b5468;
  /* bottom-bar icon colours (look3d.js TAB_ICONS): toy blue, red, green, yellow, purple, red, cream, orange, beech */
  --tb-blue-1: #9fc8ff; --tb-blue-2: #2a6fdb; --tb-pink-1: #ffb0b4; --tb-pink-2: #e8332a; --tb-green-1: #b8f0b8; --tb-green-2: #2fae4e;
  --tb-gold-1: #fff0a0; --tb-gold-2: #e8a800; --tb-purple-1: #dcc8ff; --tb-purple-2: #8a4fd8; --tb-red-1: #ffa8a0; --tb-red-2: #c81e26;
  --tb-cream-1: #ffffff; --tb-cream-2: #f0dcb4; --tb-orange-1: #ffd08a; --tb-orange-2: #ff8a1f; --tb-brown-1: #f0cf98; --tb-brown-2: #b8854a;
}
[data-theme="toytown"] #splash { background: linear-gradient(#fff6e2, #fbe7b8 52%, #e6b47a 53%, #c98e52); }

/* ---- the scene ---- */
[data-theme="toytown"] #stage-bg { background: #fff3d8; }
.tt-scene { position: absolute; inset: 0; overflow: hidden; --b: calc(var(--tabh) + env(safe-area-inset-bottom)); pointer-events: none; }
.tt-scene img { display: block; -webkit-user-drag: none; }
/* past the sides of the picture on a wide screen: the same wallpaper, the skirting board, the floorboards */
.tt-room { position: absolute; inset: 0;
  background: linear-gradient(transparent calc((100% - var(--b)) * .535), #fbfbf6 0 calc((100% - var(--b)) * .555), #e3b072 0),
    repeating-linear-gradient(90deg, #cdebdf 0 22px, #fff6dc 22px 50px, #ffeaa6 50px 60px, #fff6dc 60px 100px); }
/* one sheet in world units, as tall as the space above the bottom bar, centred; every piece is placed in it by percent */
.tt-world { position: absolute; left: 50%; bottom: var(--b); height: calc(100% - var(--b)); aspect-ratio: 880 / 660; transform: translateX(-50%); }
.tt-world > * { position: absolute; }
.tt-layer { max-width: none; }
/* a picture strip of N frames, played by steps */
.tt-reel { display: block; width: 100%; height: 100%; background-repeat: no-repeat; background-size: calc(var(--n) * 100%) 100%; animation: tt-reel var(--t, 1s) steps(var(--n), jump-none) infinite; }
@keyframes tt-reel { from { background-position-x: 0%; } to { background-position-x: 100%; } }
/* the rocking horse rocks back and forth */
.tt-horse { animation-direction: alternate; }
/* the jack-in-the-box: shut a while, the lid flies up and he springs out, wobbles, waits, and is pushed back in */
.tt-jack { animation: tt-jack var(--t, 7s) steps(1, end) infinite; }
@keyframes tt-jack { 0% { background-position-x: 0%; } 38% { background-position-x: 14.29%; } 40% { background-position-x: 28.57%; } 42% { background-position-x: 42.86%; }
  45% { background-position-x: 57.14%; } 48% { background-position-x: 71.43%; } 51% { background-position-x: 85.71%; } 54% { background-position-x: 100%; }
  64% { background-position-x: 85.71%; } 66% { background-position-x: 100%; } 82% { background-position-x: 28.57%; } 84% { background-position-x: 14.29%; } 86%, 100% { background-position-x: 0%; } }
/* the things that travel are placed by theme-toytown.js each frame; the train's and the car's pictures picked by heading */
.tt-mover { left: 0; top: 0; will-change: transform; }
.tt-mover > i { display: block; width: 100%; height: 100%; background-repeat: no-repeat; }
.tt-train > i { background-size: 1600% 100%; animation: tt-chug .36s steps(2, jump-none) infinite; }
@keyframes tt-chug { 50% { transform: translateY(-2.5%); } }
.tt-car > i { background-size: 100% 100%; }
.tt-mover::before { content: ''; position: absolute; left: 16%; right: 16%; bottom: -4%; height: 14%; border-radius: 50%; background: rgba(90, 50, 10, .25); z-index: -1; }
.tt-top::before { left: 22%; right: 22%; bottom: -3%; }
/* the window's sunbeam across the room, dust glinting in it */
.tt-beam { inset: 0; overflow: hidden; background: linear-gradient(112deg, transparent 18%, rgba(255, 249, 220, .3) 30%, rgba(255, 249, 220, .12) 40%, transparent 50%); mix-blend-mode: screen; }
.tt-beam i { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #fffbe8; opacity: 0; animation: tt-mote 12s linear infinite; }
@keyframes tt-mote { 0% { opacity: 0; transform: translate(0, 0); } 20% { opacity: .9; } 80% { opacity: .7; } 100% { opacity: 0; transform: translate(40px, 60px); } }
/* balloons drifting up past everything, swaying on their strings */
.tt-rise { top: 0; height: 100%; animation: tt-rise 34s linear infinite; }
@keyframes tt-rise { from { transform: translateY(0); } to { transform: translateY(-135%); } }
.tt-sway { position: absolute; left: 0; bottom: -32%; width: 100%; background-repeat: no-repeat; background-size: 300% 100%; transform-origin: 50% 40%; animation: tt-sway 4.6s ease-in-out infinite alternate; }
@keyframes tt-sway { from { transform: translateX(-12%) rotate(-5deg); } to { transform: translateX(12%) rotate(5deg); } }

/* ---- the app ---- */
/* no stage spotlights here: it's a sunny playroom */
[data-theme="toytown"] .hbeam { display: none; }
/* the title: "Party" in pillar-box red, the second word in toy blue, both with a white edge, a dark line and a blocky shadow */
[data-theme="toytown"] .logo .l1 { color: #e8332a; text-shadow: 0 0 0 #fff, 1.5px 1.5px 0 #fff, -1.5px 1.5px 0 #fff, 1.5px -1.5px 0 #fff, -1.5px -1.5px 0 #fff, 0 4px 0 #1b1033, 3px 6px 0 rgba(43, 33, 64, .25); }
[data-theme="toytown"] .logo .l2 { color: #2a6fdb; text-shadow: 1.5px 1.5px 0 #fff, -1.5px 1.5px 0 #fff, 1.5px -1.5px 0 #fff, -1.5px -1.5px 0 #fff, 0 4px 0 #1b1033, 3px 6px 0 rgba(43, 33, 64, .25); }
[data-theme="toytown"] :is(.codechip, .bigcode, .me .pts, .pl .sc, .stat b, .rank .pt) { color: #e8332a; }
[data-theme="toytown"] :is(.crumb, .agree a, .linkbtn) { color: #2a6fdb; }

/* main buttons: a glossy plastic brick in the button's colour, a row of studs along its top, a darker underside */
[data-theme="toytown"] .btn:not(.ghost) { position: relative; overflow: visible; }
:root[data-theme="toytown"] .btn:not(.ghost) { border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .38), rgba(255, 255, 255, .06) 40%, rgba(0, 0, 0, .12)), var(--hot);
  box-shadow: inset 0 0 0 2px #1b1033, inset 0 3px 0 2px rgba(255, 255, 255, .35), inset 0 -4px 0 2px rgba(0, 0, 0, .14), 0 5px 0 color-mix(in srgb, var(--hot) 55%, #1b1033), 0 11px 16px -6px rgba(60, 30, 0, .4); }
[data-theme="toytown"] .btn:not(.ghost):not(.small)::before { content: ''; position: absolute; left: 9%; right: 9%; top: -7px; height: 9px; z-index: -1; pointer-events: none;
  background: radial-gradient(circle at 50% 38%, rgba(255, 255, 255, .7) 0 1.5px, transparent 2px) 0 0 / 26px 9px space,
    radial-gradient(closest-side, var(--hot) 0 82%, #1b1033 86% 100%, transparent 100%) 0 0 / 26px 9px space;
  border-radius: 3px; }
[data-theme="toytown"] .btn:not(.ghost):not(.small)::after { content: ''; position: absolute; left: 10px; top: 5px; width: 22%; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .55); pointer-events: none; animation: tt-glint 3.800s ease-in-out infinite; }
@keyframes tt-glint { 50% { opacity: .35; } }
/* (the 3D buttons have their own studs) */
html.art3d[data-theme="toytown"] .btn:not(.ghost):not(.small)::before { display: none; }
[data-theme="toytown"] .btn.ghost { background: linear-gradient(rgba(255, 255, 255, .5), rgba(255, 255, 255, 0)), var(--tt-wood) 0 0 / 60px 60px; box-shadow: inset 0 0 0 2px #c99a5e, 0 3px 0 #c99a5e; color: var(--ink); }

/* cards: cream painted wood in a yellow-painted frame, the board's thickness under it, a row of bricks clicked along the top */
[data-theme="toytown"] .panel { position: relative; margin-top: .7rem; }
:root[data-theme="toytown"] :is(.panel, .sheetbox) { background: linear-gradient(170deg, rgba(255, 255, 255, .5), transparent 45%), var(--tt-wood) 0 0 / 60px 60px, var(--card);
  box-shadow: inset 0 0 0 2px #1b1033, inset 0 0 0 5.5px #ffc61a, inset 0 0 0 7px rgba(150, 100, 0, .25), 0 5px 0 #c9945a, 0 6.5px 0 #1b1033, 0 14px 22px -10px rgba(90, 50, 10, .45); }
[data-theme="toytown"] .panel::before { content: ''; position: absolute; left: 8%; right: 8%; top: -.62rem; height: 1.05rem; pointer-events: none; z-index: 1;
  background: var(--tt-band) center / 100% 100% no-repeat; filter: drop-shadow(0 2px 1px rgba(80, 40, 0, .3)); }

/* topic tiles: painted wooden blocks, each its own colour, rounded and bevelled, the wood showing at the edge, a balloon tied on */
[data-theme="toytown"] .topic { position: relative; overflow: visible; border: 0; border-radius: 12px;
  background: linear-gradient(160deg, rgba(255, 255, 255, .34), rgba(255, 255, 255, 0) 38%, rgba(0, 0, 0, .14)), var(--sc);
  box-shadow: inset 0 0 0 2px #1b1033, inset 3px 3px 0 2px rgba(255, 255, 255, .28), inset -3px -4px 0 2px rgba(0, 0, 0, .16), 0 5px 0 #b8854a, 0 6.5px 0 #1b1033, 0 10px 14px -6px rgba(90, 50, 10, .4); }
[data-theme="toytown"] .topic::after { content: ''; position: absolute; top: -.85rem; right: .2rem; width: 1.15rem; height: 1.6rem; pointer-events: none; background: var(--tt-crest) center / contain no-repeat;
  filter: drop-shadow(0 2px 1px rgba(80, 40, 0, .3)); animation: tt-bob 3.2s ease-in-out infinite; transform-origin: 50% 100%; }
[data-theme="toytown"] .topic:nth-child(3n+2)::after { filter: hue-rotate(200deg) drop-shadow(0 2px 1px rgba(80, 40, 0, .3)); animation-delay: -1.1s; }
[data-theme="toytown"] .topic:nth-child(3n)::after { filter: hue-rotate(50deg) saturate(1.3) drop-shadow(0 2px 1px rgba(80, 40, 0, .3)); animation-delay: -2.2s; }
@keyframes tt-bob { 50% { transform: translateY(-3px) rotate(4deg); } }
[data-theme="toytown"] .topic span, [data-theme="toytown"] .topic small { color: #fff; text-shadow: 0 1px 0 #1b1033, 0 1px 3px rgba(0, 0, 0, .6); }

/* the bottom bar: a beech shelf, a row of bricks along its top, the home button a red brick */
[data-theme="toytown"] #tabbar { overflow: visible; background: linear-gradient(180deg, rgba(255, 255, 255, .35), rgba(0, 0, 0, .08)), var(--tt-wood) 0 0 / 60px 60px, #f2d5a2;
  border-top: 2px solid #1b1033; box-shadow: inset 0 3px 0 rgba(255, 255, 255, .5), 0 -8px 20px -8px rgba(90, 50, 10, .35); }
[data-theme="toytown"] #tabbar::before { content: ''; position: absolute; left: 0; right: 0; top: -15px; height: 16px; pointer-events: none; background: var(--tt-ridge) 0 0 / 96px 16px repeat-x; }
[data-theme="toytown"] #tabbar button.homebtn::before { background: linear-gradient(180deg, #ff6a5a, #c81e26); box-shadow: 0 -2px 0 #1b1033, 0 0 0 2px #ffffff inset, 0 -4px 14px rgba(232, 51, 42, .45); }
[data-theme="toytown"] #tabbar button { color: #4a3420; text-shadow: 0 1px 0 rgba(255, 255, 255, .7); }
[data-theme="toytown"] #tabbar button.on { color: #e8332a; }

/* ---- Toy Town style items (code "tt") ---- */
/* the win celebration: building bricks and balloons tumbling down (style-bundles.js draws them) */
.confetti.fx-tt i { position: absolute; top: -12%; width: calc(2.3rem * var(--s, 1)); height: auto; background: none; animation: fall 3.3s linear infinite; }
/* chat bubble "Wooden Block": a cream beech block, rounded, its painted edge, a wind-up key in its side */
html body .bubble.bub-tt.bub-tt { position: relative; color: #2b2140; border: 2px solid #1b1033; border-radius: 10px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .55), transparent 50%), var(--tt-wood) 0 0 / 60px 60px, #fff3dc;
  box-shadow: inset 0 0 0 3px #2a6fdb, inset 0 0 0 4px rgba(27, 16, 51, .3), 0 3px 0 #c9945a; font-weight: 800; overflow: visible; }
html body .bubble.bub-tt.bub-tt::after { content: ''; position: absolute; right: -1.15rem; top: 50%; width: 1.25rem; height: .95rem; margin-top: -.47rem; background: var(--tt-key) center / contain no-repeat; pointer-events: none; }
html body .bubble.bub-tt.bub-tt small { color: #2a6fdb; opacity: 1; }

/* answer buttons "Building Bricks": the answer's colour as a glossy brick, a row of studs on top, a darker underside */
body.btns-tt .abtn, .btns-tt-demo { position: relative; overflow: visible !important; color: #fff !important; text-shadow: 0 1px 0 #1b1033, 0 1px 3px rgba(0, 0, 0, .5) !important; border: 2px solid #1b1033 !important; border-radius: 7px !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, .36), rgba(255, 255, 255, .05) 42%, rgba(0, 0, 0, .12)), var(--c) !important;
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, .35), inset 0 -4px 0 rgba(0, 0, 0, .14), 0 5px 0 color-mix(in srgb, var(--c) 55%, #1b1033), 0 10px 14px -6px rgba(60, 30, 0, .4) !important; }
body.btns-tt .abtn::before, .btns-tt-demo::before { content: ''; position: absolute; left: 8%; right: 8%; top: -8px; bottom: auto; width: auto; height: 8px; z-index: -1; border: 0; border-radius: 3px; opacity: 1; pointer-events: none;
  background: radial-gradient(circle at 50% 38%, rgba(255, 255, 255, .7) 0 1.4px, transparent 1.9px) 0 0 / 24px 8px space,
    radial-gradient(closest-side, var(--c) 0 80%, #1b1033 85% 100%, transparent 100%) 0 0 / 24px 8px space; }
body.btns-tt .abtn::after { content: none; }
body.btns-tt .abtn:active { transform: translateY(4px); box-shadow: inset 0 3px 0 rgba(255, 255, 255, .3), 0 1px 0 #1b1033 !important; }
.btns-tt-demo { --c: #e8332a; }

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

/* Home labels: dark on the light playroom wallpaper (white was hard to read) */
:root[data-theme="toytown"] .hub .hbub b { color: var(--ink); -webkit-text-stroke: 0; text-shadow: 0 1px 0 rgba(255,255,255,.7); }
