/* Skeeball 3D menus: brass, walnut and amber glass to match the cabinet art.
   The #ui layer sits exactly over the board canvas and is a size container, so every
   measure is in cqw (a hundredth of the board's width) and scales with it. */

.ui {
  --brass-hi: #f8e7ae;
  --brass: #d6ab58;
  --brass-mid: #a77a33;
  --brass-lo: #6c4818;
  --brass-dk: #3b250c;
  --ink: #2a1806;
  --parchment: #ead7a6;
  --muted: #a88c5c;
  --amber: #ffb54a;
  --amber-hot: #ffe2a0;
  --glow: rgba(255, 170, 60, 0.55);
  position: absolute;
  z-index: 5;
  container-type: size;
  pointer-events: none;
  font-family: 'Cinzel', 'Times New Roman', serif;
  color: var(--parchment);
  -webkit-user-select: none;
  user-select: none;
}
.ui * { box-sizing: border-box; }
.ui button { font: inherit; color: inherit; -webkit-tap-highlight-color: transparent; }

/* ---------- screens */
.ui .scrim {
  position: absolute; inset: 0;
  background: radial-gradient(120% 90% at 50% 40%, rgba(20, 12, 6, 0.55), rgba(6, 4, 2, 0.88));
  backdrop-filter: blur(0.5cqw) saturate(0.85);
  -webkit-backdrop-filter: blur(0.5cqw) saturate(0.85);
  opacity: 0; transition: opacity 0.25s ease;
}
.ui.menu-open .scrim { opacity: 1; pointer-events: auto; }
.ui .screen {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 4cqw;
  opacity: 0; visibility: hidden; transform: translateY(2cqw) scale(0.985);
  transition: opacity 0.25s ease, transform 0.3s cubic-bezier(.2, .8, .2, 1), visibility 0s linear 0.3s;
}
.ui .screen.open {
  opacity: 1; visibility: visible; transform: none; pointer-events: auto;
  transition: opacity 0.25s ease, transform 0.3s cubic-bezier(.2, .8, .2, 1), visibility 0s;
}

/* ---------- the brass frame and walnut panel */
.ui .frame {
  position: relative;
  width: 88cqw; max-height: 100%;
  padding: 1.1cqw;
  border-radius: 2.2cqw;
  background:
    linear-gradient(135deg, var(--brass-hi) 0%, var(--brass) 18%, var(--brass-lo) 42%, var(--brass) 64%, var(--brass-hi) 82%, var(--brass-mid) 100%);
  box-shadow:
    0 3cqw 7cqw rgba(0, 0, 0, 0.75),
    0 0 0 0.25cqw rgba(30, 16, 4, 0.9),
    inset 0 0 0 0.2cqw rgba(255, 240, 200, 0.35);
  display: flex;
}
/* rivets in the frame's corners */
.ui .frame::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  --r: radial-gradient(circle, #fff3c8 0 0.25cqw, #c99b4c 0.35cqw 0.55cqw, #4b300f 0.65cqw 0.75cqw, transparent 0.8cqw);
  background:
    var(--r) 0.15cqw 0.15cqw / 2cqw 2cqw no-repeat,
    var(--r) calc(100% - 0.15cqw) 0.15cqw / 2cqw 2cqw no-repeat,
    var(--r) 0.15cqw calc(100% - 0.15cqw) / 2cqw 2cqw no-repeat,
    var(--r) calc(100% - 0.15cqw) calc(100% - 0.15cqw) / 2cqw 2cqw no-repeat;
}
.ui .panel {
  position: relative;
  width: 100%;
  overflow-y: auto; overflow-x: hidden;
  max-height: calc(100cqh - 10.2cqw);
  scrollbar-width: none;
  padding: 3.4cqw 5cqw 3.6cqw;
  border-radius: 1.4cqw;
  background:
    radial-gradient(110% 60% at 50% 0%, rgba(255, 185, 100, 0.13), transparent 62%),
    radial-gradient(90% 70% at 50% 120%, rgba(0, 0, 0, 0.55), transparent 70%),
    repeating-linear-gradient(93deg, rgba(255, 220, 170, 0.022) 0 0.3cqw, rgba(0, 0, 0, 0.05) 0.3cqw 0.75cqw, rgba(255, 220, 170, 0.015) 0.75cqw 1.4cqw),
    linear-gradient(180deg, #2e1d11 0%, #1e130b 55%, #140c07 100%);
  box-shadow: inset 0 0 0 0.25cqw rgba(0, 0, 0, 0.6), inset 0 0.4cqw 2.4cqw rgba(0, 0, 0, 0.65);
}
.ui .panel::-webkit-scrollbar { display: none; }

/* ---------- headings */
.ui .plaque {
  position: relative;
  text-align: center;
  margin: 0 0 2.4cqw;
}
.ui .title {
  position: relative; z-index: 1;
  margin: 0;
  font-family: 'Cinzel Decorative', 'Cinzel', serif;
  font-weight: 900;
  font-size: 9.2cqw;
  line-height: 1;
  letter-spacing: 0.05em;
  background: linear-gradient(180deg, #fff6d2 0%, #f1d38a 30%, #c8973f 55%, #8d6224 78%, #e8c77c 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0.35cqw 0 rgba(30, 14, 2, 0.9)) drop-shadow(0 0 2cqw rgba(255, 170, 70, 0.35));
}
.ui .heading {
  margin: 0;
  font-family: 'Cinzel Decorative', 'Cinzel', serif;
  font-weight: 900;
  font-size: 7.4cqw;
  letter-spacing: 0.08em;
  line-height: 1.05;
  background: linear-gradient(180deg, #fff6d2 0%, #f1d38a 35%, #b8873a 70%, #e8c77c 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0.3cqw 0 rgba(30, 14, 2, 0.9));
}
.ui .rule {
  display: flex; align-items: center; justify-content: center; gap: 1.6cqw;
  margin: 1.3cqw auto 1cqw; width: 64%;
}
.ui .rule span { flex: 1; height: 0.3cqw; background: linear-gradient(90deg, transparent, var(--brass), transparent); }
.ui .rule i {
  width: 1.6cqw; height: 1.6cqw; transform: rotate(45deg);
  background: linear-gradient(135deg, var(--brass-hi), var(--brass-mid));
  box-shadow: 0 0 1.4cqw var(--glow);
}
.ui .sub {
  margin: 0;
  font-weight: 700; font-size: 2.9cqw; letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--muted);
}

/* gears turning behind the title */
.ui .gear {
  position: absolute; z-index: 0; pointer-events: none;
  color: rgba(214, 171, 88, 0.16);
  animation: ui-spin 26s linear infinite;
}
.ui .gear.g1 { width: 22cqw; height: 22cqw; left: -6cqw; top: -7cqw; }
.ui .gear.g2 { width: 15cqw; height: 15cqw; right: -3cqw; top: 3cqw; animation-direction: reverse; animation-duration: 18s; }
@keyframes ui-spin { to { transform: rotate(360deg); } }

/* ---------- buttons: brass keys */
.ui .btn {
  position: relative;
  display: flex; align-items: center; justify-content: center; gap: 1.6cqw;
  width: 100%;
  margin: 1.8cqw 0 0;
  padding: 2.5cqw 5cqw;
  border: 0.25cqw solid #4a3110;
  border-radius: 1cqw;
  cursor: pointer;
  font-weight: 700; font-size: 3.4cqw; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ink);
  text-shadow: 0 0.15cqw 0 rgba(255, 244, 206, 0.6);
  background: linear-gradient(180deg, #f9e8ad 0%, #dcb366 26%, #ab7e37 64%, #7c5622 100%);
  box-shadow:
    inset 0 0.25cqw 0 rgba(255, 252, 228, 0.85),
    inset 0 -0.45cqw 0 rgba(70, 40, 10, 0.45),
    0 0.6cqw 0 #3a240b,
    0 1.2cqw 2cqw rgba(0, 0, 0, 0.55);
  transition: transform 0.08s ease, box-shadow 0.12s ease, filter 0.12s ease;
}
/* rivets at the key's ends */
.ui .btn::before, .ui .btn::after {
  content: ''; position: absolute; top: 50%; width: 1.3cqw; height: 1.3cqw; margin-top: -0.65cqw; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff6d8, #c99a4c 55%, #5a3a12);
  box-shadow: 0 0.1cqw 0.2cqw rgba(0, 0, 0, 0.6);
}
.ui .btn::before { left: 2cqw; }
.ui .btn::after { right: 2cqw; }
.ui .btn:hover {
  filter: brightness(1.12) saturate(1.1);
  box-shadow:
    inset 0 0.25cqw 0 rgba(255, 252, 228, 0.9),
    inset 0 -0.45cqw 0 rgba(70, 40, 10, 0.45),
    0 0.6cqw 0 #3a240b,
    0 1.2cqw 2cqw rgba(0, 0, 0, 0.55),
    0 0 2.6cqw rgba(255, 180, 80, 0.45);
}
.ui .btn:active, .ui .btn.pressed {
  transform: translateY(0.55cqw);
  filter: brightness(0.92);
  box-shadow:
    inset 0 0.4cqw 0.8cqw rgba(60, 34, 8, 0.55),
    0 0.05cqw 0 #3a240b,
    0 0.4cqw 0.8cqw rgba(0, 0, 0, 0.5);
}
.ui button:focus-visible { outline: 0.5cqw solid var(--amber); outline-offset: 0.5cqw; }
.ui .btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 2.4cqw; }
.ui .btn-row .btn { padding-left: 3cqw; padding-right: 3cqw; font-size: 3cqw; letter-spacing: 0.16em; }

/* the main action: a brass bezel round lit amber glass */
.ui .btn-go {
  position: relative; display: block; width: 100%;
  margin: 2.6cqw 0 0;
  padding: 1.1cqw;
  border: none; border-radius: 1.8cqw;
  cursor: pointer;
  background: linear-gradient(135deg, var(--brass-hi), var(--brass-mid) 35%, var(--brass-lo) 55%, var(--brass) 80%, var(--brass-hi));
  box-shadow: 0 0.8cqw 0 #2f1d08, 0 1.6cqw 3cqw rgba(0, 0, 0, 0.6), inset 0 0 0 0.2cqw rgba(255, 245, 210, 0.4);
  transition: transform 0.08s ease, box-shadow 0.12s ease;
}
.ui .btn-go .glass {
  display: block;
  padding: 2cqw 0 1.8cqw;
  border-radius: 1.1cqw;
  font-family: 'Cinzel Decorative', 'Cinzel', serif;
  font-weight: 900; font-size: 5.8cqw; letter-spacing: 0.3em; text-indent: 0.3em;
  color: var(--amber-hot);
  text-shadow: 0 0 1cqw rgba(255, 190, 90, 0.9), 0 0 3cqw rgba(255, 140, 30, 0.7);
  background:
    radial-gradient(80% 120% at 50% 20%, rgba(255, 170, 70, 0.32), transparent 70%),
    linear-gradient(180deg, #3a1d07 0%, #200f04 60%, #120801 100%);
  box-shadow: inset 0 0.6cqw 1.4cqw rgba(0, 0, 0, 0.75), inset 0 -0.3cqw 1cqw rgba(255, 150, 50, 0.18);
  transition: text-shadow 0.15s ease, background 0.15s ease;
}
.ui .btn-go:hover .glass {
  color: #fff3cf;
  text-shadow: 0 0 1cqw rgba(255, 210, 120, 1), 0 0 3.6cqw rgba(255, 150, 40, 0.95), 0 0 7cqw rgba(255, 120, 20, 0.55);
  background:
    radial-gradient(80% 120% at 50% 20%, rgba(255, 180, 80, 0.5), transparent 72%),
    linear-gradient(180deg, #4a2408 0%, #2a1305 60%, #160902 100%);
}
.ui .btn-go:hover { box-shadow: 0 0.8cqw 0 #2f1d08, 0 1.6cqw 3cqw rgba(0, 0, 0, 0.6), 0 0 4cqw rgba(255, 160, 60, 0.45), inset 0 0 0 0.2cqw rgba(255, 245, 210, 0.5); }
.ui .btn-go:active, .ui .btn-go.pressed {
  transform: translateY(0.7cqw);
  box-shadow: 0 0.1cqw 0 #2f1d08, 0 0.6cqw 1.2cqw rgba(0, 0, 0, 0.6), inset 0 0 0 0.2cqw rgba(255, 245, 210, 0.3);
}
.ui .btn-go:active .glass { text-shadow: 0 0 0.6cqw rgba(255, 210, 120, 1), 0 0 2cqw rgba(255, 150, 40, 0.8); }

/* back to the site: dark leather with a brass edge */
.ui .btn-back {
  display: inline-flex; align-items: center; gap: 1.2cqw;
  padding: 1.3cqw 2.8cqw 1.3cqw 2cqw;
  border: 0.25cqw solid var(--brass-mid);
  border-radius: 5cqw;
  cursor: pointer;
  font-family: 'Cinzel', serif; font-weight: 700; font-size: 2.7cqw; letter-spacing: 0.08em;
  color: var(--parchment);
  background: linear-gradient(180deg, #3a2516, #22150c);
  box-shadow: inset 0 0.2cqw 0 rgba(255, 220, 160, 0.18), 0 0.45cqw 0 #120a04, 0 0.8cqw 1.6cqw rgba(0, 0, 0, 0.5);
  transition: transform 0.08s ease, box-shadow 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}
.ui .btn-back svg { width: 2.6cqw; height: 2.6cqw; }
.ui .btn-back:hover {
  color: var(--amber-hot); border-color: var(--brass-hi);
  box-shadow: inset 0 0.2cqw 0 rgba(255, 220, 160, 0.25), 0 0.45cqw 0 #120a04, 0 0.8cqw 1.6cqw rgba(0, 0, 0, 0.5), 0 0 2cqw rgba(255, 170, 70, 0.35);
}
.ui .btn-back:active { transform: translateY(0.4cqw); box-shadow: inset 0 0.3cqw 0.8cqw rgba(0, 0, 0, 0.6), 0 0.05cqw 0 #120a04; }
.ui .topbar { display: flex; justify-content: space-between; align-items: center; margin: 0 0 2cqw; position: relative; z-index: 2; }

/* small round brass button (the workshop lock) */
.ui .btn-round {
  width: 7cqw; height: 7cqw; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0.25cqw solid #4a3110; border-radius: 50%; cursor: pointer;
  color: var(--ink);
  background: radial-gradient(circle at 35% 30%, #fbecb8, #d3a656 50%, #7a5421);
  box-shadow: 0 0.45cqw 0 #3a240b, 0 0.9cqw 1.6cqw rgba(0, 0, 0, 0.5);
  transition: transform 0.08s ease, filter 0.12s ease, box-shadow 0.12s ease;
}
.ui .btn-round svg { width: 3.4cqw; height: 3.4cqw; }
.ui .btn-round:hover { filter: brightness(1.12); box-shadow: 0 0.45cqw 0 #3a240b, 0 0.9cqw 1.6cqw rgba(0, 0, 0, 0.5), 0 0 2.2cqw rgba(255, 180, 80, 0.5); }
.ui .btn-round:active { transform: translateY(0.4cqw); box-shadow: 0 0.05cqw 0 #3a240b, inset 0 0.3cqw 0.8cqw rgba(60, 34, 8, 0.6); }
.ui .btn-round.on { color: #1d4a1f; }

/* ---------- game cards (mode choice) */
.ui .modes { display: grid; grid-template-columns: 1fr 1fr; gap: 3cqw; margin: 0 0 0.6cqw; }
.ui .mode-card {
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  padding: 3.6cqw 1.6cqw 2.4cqw;
  border: 0.3cqw solid var(--brass-lo);
  border-radius: 1.4cqw;
  cursor: pointer;
  text-align: center;
  background:
    radial-gradient(90% 70% at 50% 0%, rgba(255, 200, 120, 0.08), transparent 70%),
    linear-gradient(180deg, #2a1a0f, #160d07);
  box-shadow: inset 0 0 0 0.25cqw rgba(0, 0, 0, 0.5), inset 0 0.4cqw 1.6cqw rgba(0, 0, 0, 0.6), 0 0.6cqw 1.6cqw rgba(0, 0, 0, 0.45);
  transition: transform 0.12s ease, border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.ui .mode-card .lamp {
  position: absolute; top: 1.4cqw; left: 50%; margin-left: -1.3cqw;
  width: 2.6cqw; height: 2.6cqw; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #6a4a2a, #2a180a 70%);
  box-shadow: inset 0 0 0 0.25cqw #7a5421, 0 0 0 0.15cqw #2a1806;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}
.ui .mode-card .icon { width: 10.5cqw; height: 10.5cqw; margin: 0.6cqw 0 1cqw; color: var(--brass); filter: drop-shadow(0 0.4cqw 0.4cqw rgba(0, 0, 0, 0.6)); }
.ui .mode-card .ball {
  width: 9cqw; height: 9cqw; margin: 1.4cqw 0 1.7cqw; border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #fff0c8 0 4%, #f2bf72 12%, #c4772f 40%, #7a3f12 72%, #2e1404 100%);
  box-shadow: 0 0.8cqw 1.2cqw rgba(0, 0, 0, 0.6), inset -0.8cqw -1cqw 1.6cqw rgba(0, 0, 0, 0.45);
}
.ui .mode-card .mode-name { font-weight: 900; font-size: 3.8cqw; letter-spacing: 0.06em; white-space: nowrap; color: var(--parchment); text-transform: uppercase; }
.ui .mode-card .mode-desc { margin-top: 0.6cqw; font-family: 'IM Fell English', 'Cinzel', serif; font-style: italic; font-size: 2.7cqw; color: var(--muted); line-height: 1.22; min-height: 6.6cqw; }
.ui .mode-card .mode-best {
  margin-top: 1.2cqw; padding: 0.7cqw 2cqw;
  font-family: 'Share Tech Mono', monospace; font-size: 2.9cqw; letter-spacing: 0.12em;
  color: #c9a46a;
  background: #0d0805; border: 0.2cqw solid #4a3110; border-radius: 0.6cqw;
}
.ui .mode-card .mode-best b { color: var(--amber); font-weight: normal; text-shadow: 0 0 1cqw rgba(255, 160, 50, 0.6); }
.ui .mode-card:hover {
  transform: translateY(-0.5cqw);
  border-color: var(--brass);
  box-shadow: inset 0 0 0 0.25cqw rgba(0, 0, 0, 0.5), inset 0 0.4cqw 1.6cqw rgba(0, 0, 0, 0.6), 0 1.2cqw 2.4cqw rgba(0, 0, 0, 0.55), 0 0 2.4cqw rgba(255, 170, 70, 0.25);
}
.ui .mode-card:active { transform: translateY(0.3cqw); box-shadow: inset 0 0.6cqw 2cqw rgba(0, 0, 0, 0.75); }
.ui .mode-card.on {
  border-color: var(--brass-hi);
  background:
    radial-gradient(90% 70% at 50% 0%, rgba(255, 180, 80, 0.22), transparent 72%),
    linear-gradient(180deg, #34200f, #1b0f07);
  box-shadow: inset 0 0 0 0.25cqw rgba(0, 0, 0, 0.4), 0 0 0 0.3cqw rgba(255, 190, 90, 0.25), 0 0 3cqw rgba(255, 160, 60, 0.35), 0 0.8cqw 2cqw rgba(0, 0, 0, 0.5);
}
.ui .mode-card.on .lamp {
  background: radial-gradient(circle at 35% 30%, #fffbe0, #ffcf6a 40%, #ff8a1a 75%, #8a3a00);
  box-shadow: inset 0 0 0 0.25cqw #7a5421, 0 0 1.4cqw 0.4cqw rgba(255, 170, 60, 0.85), 0 0 4cqw rgba(255, 140, 30, 0.5);
}
.ui .mode-card.on .icon { color: var(--brass-hi); }

/* ---------- settings */
.ui .settings {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 3.4cqw; align-items: end;
  margin: 2.6cqw 0 0; padding: 2.2cqw 3cqw 2.6cqw;
  border-radius: 1.2cqw;
  background: rgba(0, 0, 0, 0.32);
  box-shadow: inset 0 0.3cqw 1.2cqw rgba(0, 0, 0, 0.6), inset 0 0 0 0.2cqw rgba(110, 75, 30, 0.45);
}
.ui .setting .label {
  display: flex; justify-content: space-between; align-items: baseline;
  margin: 0 0 1.4cqw;
  font-weight: 700; font-size: 2.4cqw; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted);
}
.ui .setting .label output { font-family: 'Share Tech Mono', monospace; letter-spacing: 0.06em; color: var(--amber); text-shadow: 0 0 1cqw rgba(255, 160, 50, 0.5); }

/* three-way brass switch with a lamp that slides to the choice */
.ui .seg {
  position: relative;
  display: grid; grid-template-columns: repeat(3, 1fr);
  padding: 0.6cqw;
  border-radius: 1cqw;
  background: linear-gradient(180deg, #0c0704, #1a100a);
  box-shadow: inset 0 0.4cqw 1cqw rgba(0, 0, 0, 0.75), 0 0 0 0.25cqw var(--brass-lo), 0 0 0 0.45cqw #22150a;
}
.ui .seg button {
  position: relative; z-index: 1;
  padding: 1.6cqw 0;
  border: none; background: transparent; cursor: pointer;
  font-weight: 700; font-size: 2.4cqw; letter-spacing: 0.1em; text-transform: uppercase;
  color: #8a714a;
  transition: color 0.15s ease, text-shadow 0.15s ease;
}
.ui .seg button:hover { color: var(--parchment); }
.ui .seg button:active { color: var(--brass-hi); transform: translateY(0.2cqw); }
.ui .seg button.on { color: var(--ink); text-shadow: 0 0.12cqw 0 rgba(255, 244, 206, 0.6); }
.ui .seg .slide {
  position: absolute; z-index: 0; top: 0.6cqw; bottom: 0.6cqw; left: 0.6cqw;
  width: calc((100% - 1.2cqw) / 3);
  border-radius: 0.7cqw;
  background: linear-gradient(180deg, #f9e8ad 0%, #dcb366 30%, #a97c36 100%);
  box-shadow: inset 0 0.2cqw 0 rgba(255, 252, 228, 0.85), 0 0 1.8cqw rgba(255, 170, 70, 0.35);
  transition: transform 0.22s cubic-bezier(.3, 1.4, .5, 1);
}
.ui .seg[data-v='med'] .slide { transform: translateX(100%); }
.ui .seg[data-v='high'] .slide { transform: translateX(200%); }

/* brass slider */
.ui .brass-range {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 5cqw; margin: 0;
  background: transparent; cursor: pointer;
}
.ui .brass-range::-webkit-slider-runnable-track {
  height: 1.6cqw; border-radius: 1cqw;
  background: linear-gradient(90deg, rgba(255, 170, 60, 0.55) 0 var(--fill, 50%), #0c0704 var(--fill, 50%));
  box-shadow: inset 0 0.3cqw 0.6cqw rgba(0, 0, 0, 0.8), 0 0 0 0.25cqw var(--brass-lo), 0 0 0 0.45cqw #22150a;
}
.ui .brass-range::-moz-range-track {
  height: 1.6cqw; border-radius: 1cqw; background: #0c0704;
  box-shadow: inset 0 0.3cqw 0.6cqw rgba(0, 0, 0, 0.8), 0 0 0 0.25cqw var(--brass-lo);
}
.ui .brass-range::-moz-range-progress { height: 1.6cqw; border-radius: 1cqw; background: rgba(255, 170, 60, 0.55); }
.ui .brass-range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 5.2cqw; height: 5.2cqw; margin-top: -1.8cqw; border-radius: 50%;
  border: 0.25cqw solid #4a3110;
  background:
    repeating-conic-gradient(from 0deg, rgba(60, 35, 10, 0.35) 0 6deg, transparent 6deg 18deg),
    radial-gradient(circle at 35% 30%, #fff3c8, #d6a957 50%, #7a5421);
  box-shadow: 0 0.4cqw 0 #3a240b, 0 0.8cqw 1.4cqw rgba(0, 0, 0, 0.55);
  transition: transform 0.1s ease, box-shadow 0.12s ease;
}
.ui .brass-range::-moz-range-thumb {
  width: 5.2cqw; height: 5.2cqw; border-radius: 50%; border: 0.25cqw solid #4a3110;
  background: radial-gradient(circle at 35% 30%, #fff3c8, #d6a957 50%, #7a5421);
  box-shadow: 0 0.4cqw 0 #3a240b, 0 0.8cqw 1.4cqw rgba(0, 0, 0, 0.55);
}
.ui .brass-range:hover::-webkit-slider-thumb { box-shadow: 0 0.4cqw 0 #3a240b, 0 0.8cqw 1.4cqw rgba(0, 0, 0, 0.55), 0 0 2cqw rgba(255, 180, 80, 0.6); }
.ui .brass-range:active::-webkit-slider-thumb { transform: scale(0.92) translateY(0.2cqw); box-shadow: 0 0.1cqw 0 #3a240b, 0 0 2.4cqw rgba(255, 180, 80, 0.75); }
.ui .brass-range:hover::-moz-range-thumb { box-shadow: 0 0.4cqw 0 #3a240b, 0 0 2cqw rgba(255, 180, 80, 0.6); }
.ui .brass-range:focus-visible { outline: none; }
.ui .brass-range:focus-visible::-webkit-slider-thumb { outline: 0.5cqw solid var(--amber); outline-offset: 0.3cqw; }

.ui .foot { display: flex; justify-content: center; align-items: center; gap: 3cqw; margin-top: 3cqw; }

/* ---------- game over: the score in amber glass */
.ui .result-label { margin: 2.6cqw 0 1.4cqw; text-align: center; font-weight: 700; font-size: 2.9cqw; letter-spacing: 0.32em; text-transform: uppercase; color: var(--muted); }
.ui .score-digits { display: flex; justify-content: center; gap: 1.4cqw; }
.ui .score-digits span {
  width: 13cqw; height: 18cqw;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Share Tech Mono', monospace; font-size: 13cqw; line-height: 1;
  color: #ffc56a;
  text-shadow: 0 0 1cqw rgba(255, 170, 60, 1), 0 0 3cqw rgba(255, 120, 20, 0.85);
  background: radial-gradient(80% 70% at 50% 40%, rgba(255, 140, 40, 0.18), transparent 70%), linear-gradient(180deg, #1c0e05, #0a0502);
  border-radius: 1cqw;
  box-shadow: inset 0 0.6cqw 1.6cqw rgba(0, 0, 0, 0.85), 0 0 0 0.35cqw var(--brass-mid), 0 0 0 0.6cqw #22150a, 0 0.8cqw 1.6cqw rgba(0, 0, 0, 0.5);
}
.ui .score-digits span.dim { color: rgba(255, 170, 70, 0.18); text-shadow: none; }
.ui .best-line { margin: 2.4cqw 0 0; text-align: center; font-family: 'Share Tech Mono', monospace; font-size: 3cqw; letter-spacing: 0.14em; color: #c9a46a; }
.ui .best-line b { color: var(--amber); font-weight: normal; }
.ui .ribbon {
  display: none;
  margin: 2.6cqw auto 0; width: max-content;
  padding: 1cqw 5cqw;
  font-family: 'Cinzel Decorative', serif; font-weight: 900; font-size: 3.6cqw; letter-spacing: 0.22em;
  color: #2a0e02;
  background: linear-gradient(180deg, #ffd27a, #ff9a2e 55%, #c75a0e);
  clip-path: polygon(0 0, 100% 0, 95% 50%, 100% 100%, 0 100%, 5% 50%);
  box-shadow: 0 0 3cqw rgba(255, 140, 30, 0.6);
  animation: ui-ribbon 1.6s ease-in-out infinite;
}
.ui .ribbon.show { display: block; }
@keyframes ui-ribbon { 50% { filter: brightness(1.25); transform: scale(1.04); } }

/* ---------- workshop PIN pad */
.ui .pin-display {
  margin: 2.4cqw auto 2.6cqw; width: 62%;
  padding: 2.2cqw 0;
  text-align: center; letter-spacing: 0.6em; text-indent: 0.6em;
  font-family: 'Share Tech Mono', monospace; font-size: 6cqw; color: var(--amber);
  text-shadow: 0 0 1.4cqw rgba(255, 160, 50, 0.7);
  background: #0a0603; border-radius: 1cqw;
  box-shadow: inset 0 0.5cqw 1.2cqw rgba(0, 0, 0, 0.85), 0 0 0 0.3cqw var(--brass-mid);
}
.ui .pin-msg { min-height: 3.4cqw; margin: 0; text-align: center; font-size: 2.6cqw; letter-spacing: 0.2em; color: #e2754a; }
.ui .pin-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2cqw; width: 70%; margin: 0 auto; }
.ui .pin-grid .btn { margin: 0; padding: 2.6cqw 0; font-family: 'Share Tech Mono', monospace; font-size: 5cqw; letter-spacing: 0; }
.ui .pin-grid .btn::before, .ui .pin-grid .btn::after { display: none; }
.ui .toggle-row { display: flex; justify-content: space-between; align-items: center; gap: 3cqw; }

/* ---------- in-play controls */
.ui .gear-btn {
  position: absolute; top: 2.6cqw; right: 2.6cqw;
  width: 11cqw; height: 11cqw; padding: 0;
  border: none; border-radius: 50%; background: none; cursor: pointer;
  pointer-events: auto;
  filter: drop-shadow(0 0.6cqw 0.8cqw rgba(0, 0, 0, 0.6));
  transition: opacity 0.2s ease, transform 0.1s ease;
}
.ui .gear-btn svg.cog { position: absolute; inset: 0; width: 100%; height: 100%; color: var(--brass); transition: transform 0.5s ease, color 0.15s ease; }
.ui .gear-btn .face {
  position: absolute; inset: 22%; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; gap: 13%;
  background: radial-gradient(circle at 35% 30%, #4a2c12, #1c0f05 70%);
  box-shadow: inset 0 0 0 0.3cqw var(--brass-lo), inset 0 0.5cqw 1cqw rgba(0, 0, 0, 0.7);
}
.ui .gear-btn .face i { width: 13%; height: 42%; border-radius: 0.3cqw; background: var(--amber); box-shadow: 0 0 1.2cqw rgba(255, 160, 50, 0.9); }
.ui .gear-btn:hover svg.cog { transform: rotate(40deg); color: var(--brass-hi); }
.ui .gear-btn:active { transform: translateY(0.4cqw) scale(0.96); }
.ui.menu-open .gear-btn, .ui.no-pause .gear-btn { opacity: 0; pointer-events: none; }

.ui .hud-msg {
  position: absolute; left: 0; right: 0; top: 40%;
  text-align: center;
  font-family: 'Cinzel Decorative', serif; font-weight: 900; font-size: 13cqw; letter-spacing: 0.12em;
  color: #ffe0a0;
  text-shadow: 0 0 2cqw rgba(255, 160, 50, 0.9), 0 0.6cqw 0 #3a1a04, 0 0 6cqw rgba(255, 120, 20, 0.6);
  opacity: 0; transform: scale(1.4);
  transition: opacity 0.2s ease, transform 0.35s cubic-bezier(.2, 1.6, .4, 1);
}
.ui .hud-msg.show { opacity: 1; transform: none; }
