/* ==========================================================================
   Defuse It! — styles. Theme tokens and shared components come from
   shared/style.css.

   The bomb is drawn, not photographed: a brushed-metal case, tilted back a
   little, with screws, recessed bays, glossy plastic and glass that lights
   up. It turns over (a real 3D flip) to show its back. The manual is paper.
   ========================================================================== */

.df { --metal-hi: #6b7780; --metal: #48525a; --metal-lo: #2b3237; --bay: #1b2125; --led-red: #ff4d3d; --led-green: #51e07a; display: grid; gap: .9rem; max-width: 30rem; margin-inline: auto; padding-block: .75rem 2rem; }
.df-title { font-size: clamp(1.5rem, 6.5vw, 2rem); text-align: center; }
.df-top { display: flex; align-items: center; gap: .6rem; }
.df-note { font-size: 1.02rem; font-weight: 700; text-align: center; }
.df-center-btn { justify-self: center; }
.df-big-note { font-size: 1.3rem; font-weight: 900; text-align: center; }
.df-who { font-weight: 800; text-align: center; }

/* ---------- Menu ---------- */

.df-menu { display: grid; gap: .5rem; }
.df-tagline { font-size: 1.1rem; font-weight: 800; text-align: center; }
.df-art { display: flex; align-items: center; justify-content: center; gap: 1rem; padding: .6rem 0 .3rem; }
.df-art__bomb { position: relative; width: 9.5rem; height: 6.2rem; background: linear-gradient(160deg, #6b7780, #3a434a 55%, #2b3237); border: 3px solid var(--line); border-radius: 16px; box-shadow: inset 0 2px 0 rgb(255 255 255 / .25), 0 6px 0 var(--line); rotate: -4deg; }
.df-art__clock { position: absolute; top: .5rem; left: .6rem; padding: .05rem .4rem; font: 900 1.05rem/1.2 ui-monospace, monospace; color: #ff4d3d; background: #120707; border: 2px solid var(--line); border-radius: 6px; text-shadow: 0 0 6px #ff4d3d; }
.df-art__wire { position: absolute; left: .6rem; width: 5.2rem; height: 6px; border: 2px solid var(--line); border-radius: 6px; }
.df-art__wire--r { top: 2.6rem; background: #e03131; rotate: 3deg; }
.df-art__wire--b { top: 3.5rem; background: #1c7ed6; rotate: -2deg; }
.df-art__wire--y { top: 4.4rem; background: #fcc419; rotate: 1deg; }
.df-art__btn { position: absolute; right: .6rem; top: 1.9rem; width: 2.6rem; height: 2.6rem; background: radial-gradient(circle at 35% 30%, #ff8a80, #e03131 50%, #8a1010); border: 2.5px solid var(--line); border-radius: 50%; box-shadow: 0 4px 0 #5c0b0b; }
.df-art__book { font-size: 2.8rem; rotate: 8deg; }

.df-settings { display: grid; gap: .4rem; }
.choices { display: grid; gap: .5rem; }
.choices--row { grid-auto-flow: column; grid-auto-columns: 1fr; }
.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.choice span { display: flex; align-items: center; justify-content: center; min-height: var(--tap); padding: .4rem .5rem; font-weight: 800; text-align: center; background: var(--surface); border: 3px solid var(--line); border-radius: 14px 16px 13px 17px; }
.choice input:checked + span { background: var(--sun); color: var(--ink); box-shadow: 0 3px 0 var(--line); }
.choice input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }

.howto { max-width: 30rem; margin: 1.5rem auto 0; padding: .25rem 1rem; }
.howto summary { min-height: var(--tap); display: flex; align-items: center; font-weight: 800; cursor: pointer; }
.howto ol { display: grid; gap: .5rem; padding: 0 0 1rem; padding-inline-start: 1.4rem; list-style: decimal; }
.host--small .host__teta { width: 76px; }
.host--small .bubble { padding: .65rem .9rem; font-weight: 700; }

/* ---------- The bar: clock, mistakes, modules ---------- */

.df-hud { position: sticky; top: .4rem; z-index: 5; display: flex; align-items: center; gap: .8rem; padding: .55rem .7rem; color: #e9eef1; background: linear-gradient(#262d32, #15191c); border: 3px solid var(--line); border-radius: 18px; box-shadow: inset 0 1px 0 rgb(255 255 255 / .15), 0 5px 0 var(--line); }
.df-clock { display: grid; padding: .1rem .55rem; background: #120707; border: 3px solid #05090c; border-radius: 10px; box-shadow: inset 0 0 12px rgb(0 0 0 / .9); }
.df-clock > * { grid-area: 1 / 1; font: 900 2.1rem/1.1 ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .04em; text-align: end; direction: ltr; }
.df-clock__ghost { color: rgb(255 77 61 / .1); }
.df-clock__digits { color: var(--led-red); text-shadow: 0 0 8px rgb(255 77 61 / .8); }
.df-hud.is-hurry .df-clock__digits { animation: df-blink 1s steps(2) infinite; }
@keyframes df-blink { 50% { opacity: .55; } }
.df-hud__side { display: grid; gap: .3rem; flex: 1; min-width: 0; }
.df-strikes { display: flex; gap: .35rem; }
.df-strike { width: 1.15rem; height: 1.15rem; background: radial-gradient(circle at 35% 30%, #4a2222, #1a0b0b); border: 2px solid #05090c; border-radius: 50%; }
.df-strike.is-on { background: radial-gradient(circle at 35% 30%, #ffb3ab, #ff3b2f 50%, #a30f05); box-shadow: 0 0 10px #ff3b2f; }
.df-chips { display: flex; flex-wrap: wrap; gap: .25rem; }
.df-chip { display: grid; place-items: center; width: 1.85rem; height: 1.85rem; font-size: 1rem; background: #2f373d; border: 2px solid #05090c; border-radius: 8px; }
.df-chip.is-done { background: #1f5a33; box-shadow: 0 0 0 2px var(--led-green) inset; filter: saturate(.6); }
.df-chips--big { justify-content: center; }
.df-chips--big .df-chip { width: 2.6rem; height: 2.6rem; font-size: 1.5rem; }
.df-hud__count { font-weight: 800; color: #aab4ba; }

/* ---------- The case, and its 3D turn ---------- */

.df-turn { font-weight: 900; }
.df-bomb { perspective: 1600px; padding: .4rem 0 3rem; } /* the tilt pushes the bottom out: room for it */
.df-bomb__inner { display: grid; transform-origin: 50% 0; transform: rotateX(7deg); transition: transform .8s cubic-bezier(.3, 1.25, .4, 1); }
.df-bomb.is-flipped .df-bomb__inner { transform: rotateX(7deg) rotateY(180deg); }
/* Real 3D only while it turns: a 3D scene breaks tapping in some browsers, so at rest it is flat, with only the face on show. */
.df-bomb.is-turning .df-bomb__inner { transform-style: preserve-3d; }
.df-bomb:not(.is-turning):not(.is-flipped) .df-case--back,
.df-bomb.is-flipped:not(.is-turning) .df-case--front { visibility: hidden; }
.df-bomb.is-flipped:not(.is-turning) .df-case--back { backface-visibility: visible; } /* flat, it is turned twice: the right way round */
.df-case {
  position: relative;
  grid-area: 1 / 1;
  align-self: stretch; /* both faces as tall as the taller one: the same box, front and back */
  display: grid;
  gap: .9rem;
  padding: 1.6rem .9rem 1.4rem;
  background:
    repeating-linear-gradient(90deg, rgb(255 255 255 / .025) 0 2px, transparent 2px 5px),
    linear-gradient(160deg, var(--metal-hi), var(--metal) 40%, var(--metal-lo));
  border: 3px solid #05090c;
  border-radius: 28px;
  box-shadow: inset 0 3px 0 rgb(255 255 255 / .25), inset 0 -7px 0 rgb(0 0 0 / .35), 0 10px 0 #05090c, 0 26px 30px rgb(0 0 0 / .45);
  backface-visibility: hidden;
}
.df-case--back { transform: rotateY(180deg); min-height: 30rem; grid-template-rows: auto auto 1fr auto; }
.df-screw { position: absolute; width: 16px; height: 16px; background: radial-gradient(circle at 35% 30%, #e4e9ec, #8e989e 60%, #4f575c); border: 2px solid #05090c; border-radius: 50%; }
.df-screw::after { content: ""; position: absolute; inset: 50% 2px auto; height: 2px; translate: 0 -50%; background: #3a4146; rotate: 35deg; }
.df-screw--tl { top: 8px; left: 8px; }
.df-screw--tr { top: 8px; right: 8px; }
.df-screw--bl { bottom: 8px; left: 8px; }
.df-screw--br { bottom: 8px; right: 8px; }

.df-bays { display: grid; gap: .9rem; }
.df-bay { position: relative; display: grid; gap: .5rem; padding: .55rem .7rem .8rem; background: linear-gradient(#20272c, var(--bay)); border: 2.5px solid #05090c; border-radius: 18px; box-shadow: inset 0 5px 12px rgb(0 0 0 / .65), inset 0 -1px 0 rgb(255 255 255 / .08), 0 1px 0 rgb(255 255 255 / .14); }
.df-bay__plate { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.df-bay__name { font-size: .8rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; color: #9aa6ad; text-shadow: 0 1px 0 rgb(0 0 0 / .7); }
.df-bay__led { width: 14px; height: 14px; background: radial-gradient(circle at 35% 30%, #ffb3ab, var(--led-red) 50%, #8a1209); border: 2px solid #05090c; border-radius: 50%; box-shadow: 0 0 9px var(--led-red); }
.df-bay.is-solved .df-bay__led { background: radial-gradient(circle at 35% 30%, #c9ffd6, var(--led-green) 50%, #13762f); box-shadow: 0 0 10px var(--led-green); }
.df-bay.is-solved .df-bay__body { opacity: .5; filter: saturate(.5); pointer-events: none; }
.df-bay__stamp { position: absolute; inset: 50% auto auto 50%; translate: -50% -40%; display: grid; place-items: center; width: 4.2rem; height: 4.2rem; font-size: 2.4rem; font-weight: 900; color: #fff; background: #2f9e44; border: 4px solid #05090c; border-radius: 50%; box-shadow: 0 5px 0 #05090c; rotate: -12deg; animation: df-stamp .35s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes df-stamp { from { scale: 2; opacity: 0; } }
.df-bay__body { display: grid; justify-items: center; }

/* ---------- 1. Wires ---------- */

.df-wires { width: 100%; max-width: 21rem; height: auto; overflow: visible; }
.df-wires__post { fill: #59636a; stroke: #05090c; stroke-width: 3; }
.df-wires__screw { fill: #c9d1d6; stroke: #05090c; stroke-width: 2.5; }
.df-wire__edge { fill: none; stroke: #05090c; stroke-width: 13; stroke-linecap: round; }
.df-wire { fill: none; stroke-width: 8.5; stroke-linecap: round; }
.df-wire__shine { fill: none; stroke: rgb(255 255 255 / .45); stroke-width: 2.2; stroke-linecap: round; }
.df-wire__copper { fill: #f08c00; stroke: #05090c; stroke-width: 1.5; }
.df-wire__hit { fill: none; stroke: transparent; stroke-width: 30; pointer-events: stroke; cursor: pointer; }

/* ---------- 2. The button ---------- */

.df-button { display: flex; align-items: center; justify-content: center; gap: 1.4rem; padding: .4rem 0; }
.df-bigbtn__bezel { display: grid; place-items: center; width: 9.4rem; height: 9.4rem; background: radial-gradient(circle at 35% 30%, #c3ccd1, #6f7a80 55%, #3b4348); border: 3px solid #05090c; border-radius: 50%; box-shadow: inset 0 -6px 10px rgb(0 0 0 / .45), inset 0 4px 6px rgb(255 255 255 / .35), 0 6px 0 #05090c; }
.df-bigbtn {
  --c1: #ff9e94; --c2: #e03131; --c3: #7c0d0d;
  display: grid;
  place-items: center;
  width: 7.4rem;
  height: 7.4rem;
  padding: 0;
  background: radial-gradient(circle at 35% 28%, var(--c1), var(--c2) 48%, var(--c3));
  border: 3px solid #05090c;
  border-radius: 50%;
  box-shadow: 0 9px 0 var(--c3), 0 12px 0 #05090c, 0 16px 18px rgb(0 0 0 / .5), inset 0 -8px 12px rgb(0 0 0 / .25), inset 0 7px 9px rgb(255 255 255 / .4);
  translate: 0 -7px;
  cursor: pointer;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  transition: translate .06s, box-shadow .06s;
}
.df-bigbtn.is-down { translate: 0 0; box-shadow: 0 2px 0 var(--c3), 0 5px 0 #05090c, inset 0 -4px 8px rgb(0 0 0 / .3), inset 0 5px 8px rgb(255 255 255 / .3); }
.df-bigbtn--blue { --c1: #a5d8ff; --c2: #1c7ed6; --c3: #0b3d6e; }
.df-bigbtn--yellow { --c1: #fff3bf; --c2: #fcc419; --c3: #8a6400; }
.df-bigbtn--white { --c1: #ffffff; --c2: #dde3e7; --c3: #7d878d; }
.df-bigbtn__label { font: 900 1rem/1 system-ui, sans-serif; letter-spacing: .04em; color: #fff; text-shadow: 0 2px 0 rgb(0 0 0 / .45); direction: ltr; }
.df-bigbtn--yellow .df-bigbtn__label, .df-bigbtn--white .df-bigbtn__label { color: #1a1208; text-shadow: 0 1px 0 rgb(255 255 255 / .6); }
.df-strip { display: flex; align-items: flex-end; width: 1.9rem; height: 9rem; padding: 3px; background: linear-gradient(90deg, #0b0d0e, #23292d 50%, #0b0d0e); border: 3px solid #05090c; border-radius: 12px; box-shadow: inset 0 0 10px #000; }
.df-strip i { width: 100%; height: 100%; border-radius: 8px; background: rgb(255 255 255 / .04); }
.df-strip.is-on i { animation: df-glow 1.2s ease-in-out infinite; }
.df-strip--blue i { background: #339af0; box-shadow: 0 0 16px #339af0; }
.df-strip--white i { background: #f8f9fa; box-shadow: 0 0 16px #f8f9fa; }
.df-strip--yellow i { background: #ffd43b; box-shadow: 0 0 16px #ffd43b; }
.df-strip--red i { background: #ff6b6b; box-shadow: 0 0 16px #ff6b6b; }
@keyframes df-glow { 50% { filter: brightness(1.35); } }

/* ---------- 3. Symbol keys ---------- */

.df-keys { display: grid; grid-template-columns: repeat(2, 5.6rem); gap: 1.1rem 1.3rem; padding: .5rem 0 .8rem; }
.df-key { position: relative; display: grid; place-items: center; height: 5.6rem; padding: 0; background: linear-gradient(170deg, #fbf5e6, #d9ceb4); border: 3px solid #05090c; border-radius: 16px; box-shadow: 0 8px 0 #8b8068, 0 11px 0 #05090c, inset 0 2px 0 #fff; translate: 0 -6px; cursor: pointer; touch-action: manipulation; transition: translate .06s, box-shadow .06s; }
.df-key:active:not(:disabled), .df-key.is-pressed { translate: 0 0; box-shadow: 0 2px 0 #8b8068, 0 5px 0 #05090c, inset 0 2px 0 #fff; }
.df-key__sym { font-size: 2.6rem; line-height: 1; }
.df-key__led { position: absolute; top: 6px; left: 50%; translate: -50% 0; width: 1.6rem; height: 6px; background: #3b3b3b; border: 1.5px solid #05090c; border-radius: 3px; }
.df-key.is-pressed .df-key__led { background: var(--led-green); box-shadow: 0 0 8px var(--led-green); }

/* ---------- 4. Coloured lights ---------- */

.df-simon { display: grid; justify-items: center; gap: .6rem; padding: .3rem 0; }
.df-simon__pads { display: grid; grid-template-columns: repeat(2, 5.2rem); gap: .7rem; padding: .7rem; background: radial-gradient(circle, #2c3338, #121619); border: 3px solid #05090c; border-radius: 50%; rotate: 45deg; }
.df-pad { width: 5.2rem; height: 5.2rem; padding: 0; border: 3px solid #05090c; border-radius: 14px; box-shadow: inset 0 6px 8px rgb(255 255 255 / .25), inset 0 -6px 10px rgb(0 0 0 / .35); filter: brightness(.45) saturate(.8); cursor: pointer; touch-action: manipulation; transition: filter .08s; }
.df-pad--red { background: radial-gradient(circle at 35% 30%, #ffa8a8, #e03131 60%, #7c0d0d); }
.df-pad--blue { background: radial-gradient(circle at 35% 30%, #a5d8ff, #1c7ed6 60%, #0b3d6e); }
.df-pad--green { background: radial-gradient(circle at 35% 30%, #b2f2bb, #2f9e44 60%, #0f4d1d); }
.df-pad--yellow { background: radial-gradient(circle at 35% 30%, #fff3bf, #fcc419 60%, #8a6400); }
.df-pad.is-flash, .df-pad.is-lit { filter: brightness(1.25) saturate(1.1); box-shadow: 0 0 22px 6px rgb(255 255 255 / .35), inset 0 6px 8px rgb(255 255 255 / .35); }
.df-simon__progress { display: flex; gap: .3rem; margin-top: .7rem; }
.df-simon__progress span { width: .8rem; height: .8rem; background: #2d3438; border: 2px solid #05090c; border-radius: 50%; }
.df-simon__progress span.is-on { background: var(--led-green); box-shadow: 0 0 6px var(--led-green); }

/* ---------- 5. The maze ---------- */

.df-maze { display: grid; grid-template-columns: 3rem auto 3rem; grid-template-areas: ". up ." "left lcd right" ". down ."; align-items: center; justify-items: center; gap: .45rem; }
.df-lcd { grid-area: lcd; display: grid; grid-template-columns: repeat(6, 2.15rem); grid-template-rows: repeat(6, 2.15rem); padding: .4rem; background: radial-gradient(circle at 40% 30%, #1d4a31, #0b2316); border: 5px solid #05090c; border-radius: 10px; box-shadow: inset 0 0 14px rgb(0 0 0 / .8), 0 0 0 3px #59636a; }
.df-lcd__cell { position: relative; display: grid; place-items: center; }
.df-lcd__cell::before { content: ""; width: 4px; height: 4px; background: rgb(111 220 140 / .35); border-radius: 50%; }
.df-lcd__cell.is-marker::after { content: ""; position: absolute; inset: 15%; border: 2.5px solid #6fdc8c; border-radius: 50%; box-shadow: 0 0 6px #6fdc8c; }
.df-lcd__dot { position: absolute; inset: 26%; background: #fff; border-radius: 50%; box-shadow: 0 0 10px #fff; }
.df-lcd__goal { position: absolute; inset: 22%; background: #ff6b6b; clip-path: polygon(50% 0, 100% 100%, 0 100%); filter: drop-shadow(0 0 4px #ff6b6b); }
.df-arrow { display: grid; place-items: center; width: 2.9rem; height: 2.9rem; padding: 0; font-size: 1.1rem; color: #e9eef1; background: linear-gradient(#5b666d, #343c41); border: 2.5px solid #05090c; border-radius: 12px; box-shadow: 0 5px 0 #05090c, inset 0 2px 0 rgb(255 255 255 / .25); translate: 0 -3px; cursor: pointer; touch-action: manipulation; }
.df-arrow:active { translate: 0 1px; box-shadow: 0 1px 0 #05090c; }
.df-arrow--up { grid-area: up; }
.df-arrow--down { grid-area: down; }
.df-arrow--left { grid-area: left; }
.df-arrow--right { grid-area: right; }
html[dir="rtl"] .df-maze { direction: ltr; }

/* ---------- 6. Switches ---------- */

.df-switches { display: grid; justify-items: center; gap: .8rem; padding: .2rem 0; }
.df-lights { display: flex; gap: 1rem; padding: .4rem .8rem; background: #15191c; border: 2.5px solid #05090c; border-radius: 999px; direction: ltr; }
.df-light { width: 1.7rem; height: 1.7rem; border: 2.5px solid #05090c; border-radius: 50%; }
.df-light--red { background: radial-gradient(circle at 35% 30%, #ffd0cc, #ff3b2f 55%, #8a1209); box-shadow: 0 0 12px #ff3b2f; }
.df-light--green { background: radial-gradient(circle at 35% 30%, #d3f9d8, #40c057 55%, #13762f); box-shadow: 0 0 12px #40c057; }
.df-light--blue { background: radial-gradient(circle at 35% 30%, #d0ebff, #339af0 55%, #0b3d6e); box-shadow: 0 0 12px #339af0; }
.df-light--yellow { background: radial-gradient(circle at 35% 30%, #fff9db, #ffd43b 55%, #8a6400); box-shadow: 0 0 12px #ffd43b; }
.df-toggles { display: flex; gap: .9rem; direction: ltr; }
.df-toggle { position: relative; width: 3.6rem; height: 6rem; padding: 0; background: linear-gradient(#59636a, #343c41); border: 2.5px solid #05090c; border-radius: 12px; box-shadow: inset 0 2px 0 rgb(255 255 255 / .2), 0 4px 0 #05090c; cursor: pointer; touch-action: manipulation; }
.df-toggle__plate { position: absolute; inset: 50% auto auto 50%; width: 2.1rem; height: 2.1rem; translate: -50% -50%; background: radial-gradient(circle at 35% 30%, #d7dde1, #7b858b 60%, #3e464b); border: 2px solid #05090c; border-radius: 50%; }
.df-toggle__lever { position: absolute; left: 50%; top: 50%; width: .75rem; height: 2.4rem; translate: -50% 0; transform-origin: 50% 0; rotate: 0deg; background: linear-gradient(90deg, #8e989e, #f1f3f5 45%, #8e989e); border: 2px solid #05090c; border-radius: 6px; transition: rotate .15s cubic-bezier(.3, 1.6, .5, 1); }
.df-toggle__lever::after { content: ""; position: absolute; left: 50%; bottom: -.45rem; width: 1.2rem; height: 1.2rem; translate: -50% 0; background: radial-gradient(circle at 35% 30%, #fff, #adb5bd 60%, #5c646a); border: 2px solid #05090c; border-radius: 50%; }
.df-toggle.is-up .df-toggle__lever { rotate: 180deg; }
.df-hazard { padding: .5rem 1.6rem; background: repeating-linear-gradient(-45deg, #fcc419 0 12px, #1a1a1a 12px 24px); border: 3px solid #05090c; border-radius: 12px; box-shadow: 0 5px 0 #05090c; cursor: pointer; }
.df-hazard span { display: inline-block; padding: .15rem .6rem; font: 900 1.05rem/1.2 system-ui, sans-serif; letter-spacing: .12em; color: #1a1a1a; background: #fcc419; border: 2px solid #05090c; border-radius: 6px; }
.df-hazard:active { translate: 0 3px; box-shadow: 0 2px 0 #05090c; }

/* ---------- 7. Password wheels ---------- */

.df-wheels { display: grid; justify-items: center; gap: .8rem; }
.df-wheels__row { display: flex; gap: .7rem; direction: ltr; }
.df-wheel { display: grid; justify-items: center; gap: .3rem; }
.df-wheel__drum { display: grid; grid-template-rows: 1.6rem 3.4rem 1.6rem; align-items: center; justify-items: center; width: 4.4rem; overflow: hidden; background: linear-gradient(#1b1f22 0%, #9ea7ad 14%, #f8f9fa 50%, #9ea7ad 86%, #1b1f22 100%); border: 3px solid #05090c; border-radius: 10px; box-shadow: inset 0 0 0 3px rgb(0 0 0 / .15); }
.df-wheel__face { font-size: 2.5rem; line-height: 1; }
.df-wheel__side { font-size: 1.5rem; line-height: 1; opacity: .35; scale: 1 .6; }
.df-wheel__btn { width: 3rem; height: 1.9rem; padding: 0; font-size: .85rem; color: #e9eef1; background: linear-gradient(#5b666d, #343c41); border: 2.5px solid #05090c; border-radius: 8px; box-shadow: 0 3px 0 #05090c; cursor: pointer; touch-action: manipulation; }
.df-wheel__btn:active { translate: 0 2px; box-shadow: 0 1px 0 #05090c; }
.df-metal-btn { min-width: 8rem; padding: .55rem 1.2rem; font: 900 1.05rem/1 system-ui, sans-serif; letter-spacing: .12em; color: #1a1f22; background: linear-gradient(#f1f3f5, #a7b0b6); border: 3px solid #05090c; border-radius: 12px; box-shadow: 0 5px 0 #05090c, inset 0 2px 0 #fff; cursor: pointer; }
.df-metal-btn:active { translate: 0 3px; box-shadow: 0 2px 0 #05090c; }

/* ---------- 8. The blinking light ---------- */

.df-blink { display: grid; justify-items: center; gap: .8rem; }
.df-bulb__socket { display: grid; place-items: center; width: 6rem; height: 6rem; background: radial-gradient(circle at 35% 30%, #c3ccd1, #5f6a70 60%, #2f363a); border: 3px solid #05090c; border-radius: 50%; }
.df-bulb { width: 4.2rem; height: 4.2rem; background: radial-gradient(circle at 35% 30%, #6b5a2a, #3a2e10 60%, #1e1706); border: 3px solid #05090c; border-radius: 50%; transition: background .05s, box-shadow .05s; }
.df-bulb.is-on { background: radial-gradient(circle at 35% 30%, #fffbe6, #ffd43b 45%, #f08c00); box-shadow: 0 0 26px 8px rgb(255 212 59 / .6); }
.df-radio { display: flex; align-items: center; gap: .7rem; direction: ltr; }
.df-radio__screen { display: grid; justify-items: center; min-width: 5.2rem; padding: .25rem .6rem; color: #8ce99a; background: radial-gradient(circle at 40% 30%, #1d4a31, #0b2316); border: 3px solid #05090c; border-radius: 8px; box-shadow: inset 0 0 10px #000; text-shadow: 0 0 6px #51cf66; }
.df-radio__screen small { font: 800 .7rem/1 ui-monospace, monospace; letter-spacing: .15em; }
.df-radio__screen b { font: 900 2rem/1.1 ui-monospace, monospace; }
.df-knob { width: 3.1rem; height: 3.1rem; padding: 0; font-size: 1rem; color: #1a1f22; background: radial-gradient(circle at 35% 30%, #f8f9fa, #9aa4aa 60%, #4f575c); border: 3px solid #05090c; border-radius: 50%; box-shadow: 0 4px 0 #05090c; cursor: pointer; touch-action: manipulation; }
.df-knob:active { translate: 0 2px; box-shadow: 0 2px 0 #05090c; }

/* ---------- The back of the bomb ---------- */

.df-label { justify-self: center; display: grid; justify-items: center; gap: .15rem; width: min(100%, 17rem); padding: .6rem 1rem .5rem; color: #1a1208; background: linear-gradient(170deg, #fff4c2, #f6dc7a); border: 3px solid #05090c; border-radius: 8px; box-shadow: 0 5px 0 #05090c; rotate: -1.5deg; }
.df-label small { font: 900 .8rem/1 system-ui, sans-serif; letter-spacing: .25em; }
.df-label__serial { font: 900 2.1rem/1.1 ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .12em; direction: ltr; }
.df-label__barcode { width: 85%; height: 1.4rem; background: repeating-linear-gradient(90deg, #1a1208 0 2px, transparent 2px 4px, #1a1208 4px 7px, transparent 7px 9px, #1a1208 9px 10px, transparent 10px 13px); }
.df-backrow { display: grid; grid-template-columns: 1fr auto; gap: 1rem; align-items: center; }
.df-batteries { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .45rem; padding: .7rem; min-height: 6.5rem; background: #1b2125; border: 2.5px solid #05090c; border-radius: 14px; box-shadow: inset 0 4px 10px rgb(0 0 0 / .6); }
.df-batteries small { flex-basis: 100%; font-weight: 900; color: #e9eef1; }
.df-batteries__none { color: #9aa6ad; font-weight: 800; }
.df-battery { position: relative; width: 1.6rem; height: 3.8rem; background: linear-gradient(90deg, #111 0%, #444 40%, #111 100%); border: 2.5px solid #05090c; border-radius: 6px; }
.df-battery::before { content: ""; position: absolute; top: -7px; left: 50%; width: .6rem; height: 6px; translate: -50% 0; background: #c9d1d6; border: 2px solid #05090c; border-radius: 2px; }
.df-battery i { position: absolute; inset: 0 0 auto; height: 38%; background: linear-gradient(90deg, #b8860b, #ffd43b 45%, #b8860b); border-bottom: 2px solid #05090c; border-radius: 3px 3px 0 0; }
.df-sticker { display: grid; justify-items: center; gap: .2rem; }
.df-sticker span { display: grid; place-items: center; width: 5.4rem; height: 5.4rem; font-size: 3rem; background: #fff; border: 3px solid #05090c; border-radius: 50%; box-shadow: 0 4px 0 #05090c; rotate: 10deg; clip-path: polygon(0 0, 100% 0, 100% 78%, 78% 100%, 0 100%); }
.df-sticker small { font-weight: 900; color: #e9eef1; }
/* The vent keeps its own size, centred in the room the front leaves. */
.df-backmid { display: grid; place-items: center; min-height: 8rem; }
.df-vents { display: grid; gap: .5rem; width: 78%; padding: .9rem 1.1rem; background: linear-gradient(#20272c, #171c20); border: 2.5px solid #05090c; border-radius: 16px; box-shadow: inset 0 4px 10px rgb(0 0 0 / .6), 0 1px 0 rgb(255 255 255 / .14); }
.df-warning { justify-self: center; padding: .35rem; background: repeating-linear-gradient(-45deg, #fcc419 0 10px, #1a1a1a 10px 20px); border: 2.5px solid #05090c; border-radius: 10px; box-shadow: 0 4px 0 #05090c; }
.df-warning span { display: block; padding: .2rem .8rem; font: 900 .9rem/1.2 system-ui, sans-serif; letter-spacing: .14em; color: #1a1a1a; background: #fcc419; border: 2px solid #05090c; border-radius: 6px; direction: ltr; }
.df-vents i { height: .5rem; background: #121619; border-radius: 999px; box-shadow: inset 0 2px 3px #000, 0 1px 0 rgb(255 255 255 / .15); }

/* ---------- The manual ---------- */

.df-tabs { display: flex; flex-wrap: wrap; gap: .35rem; }
.df-tab { padding: .45rem .7rem; font: inherit; font-weight: 800; color: var(--ink); background: #e7dcc2; border: 2.5px solid var(--line); border-radius: 12px 12px 4px 4px; cursor: pointer; }
.df-tab.is-on { background: #fffdf6; box-shadow: 0 3px 0 var(--line); }
.df-book { display: grid; gap: .6rem; padding: 1rem; color: #1a1208; background: repeating-linear-gradient(transparent 0 1.85rem, rgb(16 80 111 / .07) 1.85rem calc(1.85rem + 1px)), #fffdf6; border: 3px solid var(--line); border-radius: 6px 18px 18px 6px; box-shadow: -6px 0 0 #c9b88f, -9px 0 0 var(--line), 0 6px 0 var(--line); }
.df-book__head { display: flex; justify-content: space-between; padding-bottom: .4rem; font-weight: 900; color: #6d6252; border-bottom: 2.5px dashed #cfc4ad; }
.df-page { display: grid; gap: .7rem; }
.df-page__title { font-size: 1.45rem; }
.df-page__ask { padding: .5rem .7rem; font-weight: 700; background: #ffe3dc; border: 2px solid #cf3a27; border-radius: 10px; }
.df-page__ask b { color: #cf3a27; }
.df-page__intro { font-weight: 700; line-height: 1.4; }
.df-page__back { padding: .5rem .7rem; background: #fff4c2; border: 2px dashed #b38a2d; border-radius: 10px; font-weight: 700; }
.df-page__back p { margin-top: .2rem; }
.df-rules { display: grid; gap: .3rem; }
.df-rules h3 { font-size: 1.08rem; color: #10506f; }
.df-rules ol, .df-rules ul { display: grid; gap: .3rem; padding-inline-start: 1.3rem; font-weight: 700; }
.df-rules ol { list-style: decimal; }
.df-rules--list { padding-inline-start: 1.3rem; list-style: decimal; display: grid; gap: .35rem; font-weight: 700; }
.df-dot { display: inline-block; width: 1.05rem; height: 1.05rem; vertical-align: -.15rem; border: 2px solid #1a1208; border-radius: 50%; }
.df-dot--red { background: #e03131; }
.df-dot--blue { background: #1c7ed6; }
.df-dot--yellow { background: #fcc419; }
.df-dot--white { background: #fff; }
.df-dot--black { background: #2b2d2f; }
.df-dot--green { background: #37b24d; }
.df-columns { display: grid; grid-template-columns: repeat(6, 1fr); gap: .3rem; }
.df-column { display: grid; gap: .1rem; padding: .3rem 0; font-size: 1.45rem; text-align: center; list-style: none; background: #fff; border: 2px solid #cfc4ad; border-radius: 10px; }
.df-table { width: 100%; border-collapse: collapse; font-weight: 800; }
.df-table th, .df-table td { padding: .35rem .3rem; text-align: center; border: 1.5px solid #cfc4ad; }
.df-table thead th { background: #f3ead4; }
.df-table tbody th { font-size: .82rem; text-align: start; }
.df-table--switch td:first-child { display: flex; gap: .3rem; justify-content: center; direction: ltr; }
.df-arrows { direction: ltr; letter-spacing: .15em; font-size: 1.2rem; }
.df-arrows .is-up { color: #2f9e44; }
.df-arrows .is-down { color: #cf3a27; }
.df-passwords { display: grid; grid-template-columns: repeat(3, 1fr); gap: .35rem; list-style: none; font-size: 1.4rem; text-align: center; direction: ltr; }
.df-passwords li { padding: .25rem 0; background: #fff; border: 2px solid #cfc4ad; border-radius: 10px; }
.df-morse { display: flex; justify-content: center; gap: .3rem; direction: ltr; }
.df-morse span { height: .55rem; background: #1a1208; border-radius: 999px; }
.df-morse .is-short { width: .55rem; }
.df-morse .is-long { width: 1.6rem; }
.df-table--blink td:last-child { font-size: 1.15rem; }
.df-mazes { display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; direction: ltr; }
.df-mazebox { padding: .35rem; background: #fff; border: 2px solid #cfc4ad; border-radius: 10px; }
.df-mgrid { display: grid; grid-template-columns: repeat(6, 1fr); aspect-ratio: 1; border: 2.5px solid #1a1208; }
.df-mcell { position: relative; border: 1px dotted rgb(26 18 8 / .15); }
.df-mcell.w-up { border-top: 2px solid #1a1208; }
.df-mcell.w-down { border-bottom: 2px solid #1a1208; }
.df-mcell.w-left { border-left: 2px solid #1a1208; }
.df-mcell.w-right { border-right: 2px solid #1a1208; }
.df-mcell.is-marker::after { content: ""; position: absolute; inset: 18%; border: 2.5px solid #2f9e44; border-radius: 50%; }

/* ---------- Before, between, after ---------- */

.df-role { display: grid; gap: .4rem; padding: 1rem; text-align: center; }
.df-role h2 { font-size: 1.35rem; }
.df-role--holder { background: #ffe3dc; color: #1a1208; }
.df-role--reader { background: #fff4c2; color: #1a1208; }
.df-role__pages { font-weight: 700; }
.df-countdown { font-size: 1.2rem; font-weight: 800; text-align: center; }
.df-countdown b { font: 900 1.6rem ui-monospace, monospace; color: var(--tomato); }
.df-stamp { display: grid; place-items: center; padding: 1.4rem 0; }
.df-stamp span { padding: .4rem 1.2rem; font-size: clamp(2rem, 10vw, 2.8rem); font-weight: 900; color: #2f9e44; border: 6px solid #2f9e44; border-radius: 16px; rotate: -6deg; animation: df-stamp .4s cubic-bezier(.2, 1.6, .4, 1); }
.df-boom { display: grid; justify-items: center; gap: .3rem; padding: 1.2rem 0 .4rem; }
.df-boom__word { font-size: clamp(2.6rem, 14vw, 3.8rem); font-weight: 900; color: #ff6b3d; text-shadow: 0 4px 0 var(--line), 0 0 30px rgb(255 107 61 / .6); animation: df-shake .5s; }
.df-boom p { font-weight: 800; }

.df.is-shaking { animation: df-shake .45s; }
@keyframes df-shake { 20%, 60% { translate: -8px 0; } 40%, 80% { translate: 8px 0; } }
.df-flash { position: fixed; inset: 0; z-index: 50; pointer-events: none; }
.df-flash--strike { background: rgb(255 59 47 / .35); animation: df-fade .5s forwards; }
.df-flash--boom { background: radial-gradient(circle, #fff 0%, #ffd43b 30%, #ff6b3d 60%, rgb(0 0 0 / 0) 100%); animation: df-fade 1.4s forwards; }
@keyframes df-fade { to { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .df-bomb__inner { transition: none; }
  .df.is-shaking, .df-boom__word, .df-bay__stamp, .df-stamp span, .df-strip.is-on i, .df-hud.is-hurry .df-clock__digits { animation: none; }
}
