:root {
  --ink: #54445f;
  --ink-soft: #817187;
  --cream: #fffaf2;
  --pink: #f18eb5;
  --pink-dark: #d86f9a;
  --mint: #a9dfcf;
  --lavender: #c9baf1;
  --yellow: #ffe38f;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --time-progress: 1;
}

* { box-sizing: border-box; }

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  color: var(--ink);
  background: #efc9da;
  font-family: "Jua", sans-serif;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

button,
a { font: inherit; -webkit-tap-highlight-color: transparent; }
button { color: inherit; cursor: pointer; }
[hidden] { display: none !important; }

.app,
.intro,
.game { width: 100%; height: 100vh; height: 100dvh; }

.background-hearts { position: fixed; z-index: 1; inset: 0; overflow: hidden; pointer-events: none; }
.background-heart { position: absolute; bottom: -10vh; color: var(--float-color); font-family: "Gaegu", cursive; font-size: var(--float-size); opacity: 0; text-shadow: 0 2px 8px rgba(255,255,255,.45); animation: heartFloat var(--float-duration) linear infinite; }

.intro {
  display: grid;
  overflow-y: auto;
  padding: calc(18px + var(--safe-top)) 16px calc(18px + var(--safe-bottom));
  place-items: center;
  touch-action: pan-y;
  background:
    radial-gradient(circle at 16% 17%, rgba(255,255,255,.74) 0 4px, transparent 5px),
    radial-gradient(circle at 82% 24%, rgba(255,255,255,.58) 0 6px, transparent 7px),
    radial-gradient(circle at 71% 82%, rgba(255,255,255,.55) 0 3px, transparent 4px),
    linear-gradient(145deg, #f8cedd, #ded4fa 48%, #cfeee3);
  background-size: 90px 90px, 130px 130px, 74px 74px, auto;
}

.intro-card,
.result-card {
  width: min(500px, 100%);
  padding: 24px clamp(18px, 5vw, 32px);
  text-align: center;
  border: 3px solid rgba(255,255,255,.83);
  border-radius: 32px;
  background: rgba(255,250,244,.93);
  box-shadow: 0 22px 55px rgba(103,70,101,.24);
  backdrop-filter: blur(12px);
}
.intro-card { position: relative; z-index: 2; }

.eyebrow,
.result-eyebrow {
  margin: 0;
  color: #9a6d8c;
  font-family: "Gaegu", cursive;
  font-size: clamp(18px, 5vw, 22px);
  font-weight: 700;
}

.intro-bomb { position: relative; width: 90px; height: 70px; margin: 5px auto 0; }
.intro-bomb__body { position: absolute; left: 8px; bottom: -3px; font-size: 68px; line-height: 1; filter: drop-shadow(0 7px 5px rgba(80,57,85,.2)); }
.intro-bomb__spark { position: absolute; z-index: 2; top: 0; right: 3px; color: #ffb747; font-size: 27px; animation: twinkle .8s ease-in-out infinite alternate; }
.intro-bomb__heart { position: absolute; z-index: 3; left: 32px; bottom: 13px; color: #ffb8d2; font-size: 26px; font-weight: 700; }

.intro h1 {
  margin: 5px 0 0;
  font-family: "Gaegu", cursive;
  font-size: clamp(34px, 9vw, 48px);
  line-height: .94;
  letter-spacing: -.045em;
  text-shadow: 0 3px 0 #fff;
}

.intro-story { margin: 12px 0 16px; color: #6e6077; font-family: "Gaegu", cursive; font-size: 20px; font-weight: 700; line-height: 1.3; }

.difficulty-picker { display: grid; margin: 0 0 13px; padding: 0; border: 0; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.difficulty-picker legend { width: 100%; margin-bottom: 7px; color: var(--ink-soft); font-family: "Gaegu", cursive; font-size: 17px; font-weight: 700; }
.difficulty-picker label { position: relative; min-width: 0; cursor: pointer; }
.difficulty-picker input { position: absolute; opacity: 0; pointer-events: none; }
.difficulty-picker span { display: flex; height: 58px; min-height: 0; padding: 6px 9px; flex-direction: column; justify-content: center; border: 2px solid #eadde9; border-radius: 16px; background: rgba(255,255,255,.72); transition: transform .16s ease, border-color .16s ease, background .16s ease; }
.difficulty-picker b { font-size: 15px; line-height: 1.15; }
.difficulty-picker small { margin-top: 2px; color: var(--ink-soft); font-family: "Gaegu", cursive; font-size: 13px; font-weight: 700; line-height: 1.2; white-space: nowrap; }
.difficulty-picker input:checked + span { border-color: #ed91b4; background: linear-gradient(135deg,#ffe1ec,#eee7ff); box-shadow: 0 4px 12px rgba(210,111,153,.16); transform: translateY(-2px); }
.difficulty-picker input:focus-visible + span { outline: 3px solid rgba(92,126,213,.4); outline-offset: 2px; }

.intro-rules { display: flex; margin-bottom: 15px; flex-wrap: wrap; justify-content: center; gap: 5px 12px; color: #7b697e; font-family: "Gaegu", cursive; font-size: 14px; font-weight: 700; }

.jelly-button,
.soft-button {
  min-height: 49px;
  padding: 12px 20px;
  border: 0;
  border-radius: 18px;
  transition: transform .15s ease, filter .15s ease;
}

.jelly-button { color: #543f62; background: linear-gradient(135deg,#ffd5e5,#cfc2ff 57%,#ffe2a5); box-shadow: 0 7px 0 #aa91cf, 0 13px 22px rgba(91,65,112,.2); }
.soft-button { border: 2px solid #e8dce8; background: #fffaf5; }
.jelly-button:active,
.soft-button:active { transform: translateY(4px) scale(.98); }
.intro-card > .jelly-button { width: 100%; font-size: 18px; }
.home-link { display: inline-block; margin-top: 18px; color: #766982; touch-action: manipulation; }

.game { overflow: hidden; background: linear-gradient(160deg,#f7c9d9 0 24%,#ded6f7 58%,#cfeadf); }
.game-shell { position: relative; z-index: 2; width: min(100%, 680px); height: 100%; margin: 0 auto; padding: calc(10px + var(--safe-top)) 12px calc(82px + var(--safe-bottom)); overflow-x: hidden; overflow-y: auto; touch-action: pan-y; scrollbar-width: none; }
.game-shell::-webkit-scrollbar { display: none; }

.game-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.title-button { display: flex; min-width: 0; padding: 4px 9px; flex-direction: column; align-items: flex-start; border: 0; background: transparent; text-align: left; touch-action: manipulation; }
.title-button small { color: #886f8d; font-family: "Gaegu", cursive; font-size: 15px; font-weight: 700; line-height: 1; }
.title-button strong { font-family: "Gaegu", cursive; font-size: 25px; line-height: 1; letter-spacing: -.04em; }
.title-button.is-debug { color: #bf5887; text-shadow: 0 0 12px rgba(255,255,255,.8); }
.timer-card { display: flex; min-width: 105px; padding: 7px 12px; flex-direction: column; align-items: center; border: 2px solid rgba(255,255,255,.82); border-radius: 17px; background: rgba(255,250,245,.91); box-shadow: 0 6px 16px rgba(91,68,99,.15); }
.timer-card span { color: var(--ink-soft); font-family: "Gaegu", cursive; font-size: 12px; font-weight: 700; }
.timer-card strong { font-size: 22px; line-height: 1; font-variant-numeric: tabular-nums; }
.timer-card.is-urgent { color: #d64b6f; animation: urgent .65s ease-in-out infinite alternate; }
.timer-track { height: 7px; margin: 7px 2px 10px; overflow: hidden; border: 1px solid rgba(255,255,255,.75); border-radius: 99px; background: rgba(95,75,104,.2); }
.timer-track i { display: block; width: calc(var(--time-progress) * 100%); height: 100%; border-radius: inherit; background: linear-gradient(90deg,#ef779d,#ffd978 52%,#83d6bd); transition: width .12s linear; }

.mission-card { display: flex; padding: 10px 13px; align-items: center; justify-content: space-between; gap: 10px; border: 2px dashed rgba(153,112,142,.35); border-radius: 18px; background: rgba(255,250,245,.68); }
.mission-heading { display: flex; align-items: center; gap: 10px; }
.mission-heading > div { min-width: 82px; }
.mission-heading p { margin: 0; color: #b8678d; font-size: 10px; letter-spacing: .12em; }
.mission-heading strong { display: block; font-size: 14px; white-space: nowrap; }
.mission-card > p { max-width: 220px; margin: 0; color: #76687c; font-family: "Gaegu", cursive; font-size: 13px; font-weight: 700; text-align: right; }
.cut-progress { padding: 4px 8px; border-radius: 99px; color: #7a5e7d; background: #fff; font-size: 12px; white-space: nowrap; }

.toy-bomb { position: relative; margin-top: 9px; padding: 14px 13px 10px; border: 4px solid #fff0e8; border-radius: 27px; background: linear-gradient(145deg,#e8a4bf,#cf92ba); box-shadow: inset 0 -9px 0 rgba(139,76,118,.17), 0 13px 25px rgba(96,66,99,.22); }
.toy-bomb::before,
.toy-bomb::after { content: ""; position: absolute; top: 38%; width: 12px; height: 42%; border: 4px solid #fff0e8; background: #c889af; }
.toy-bomb::before { left: -14px; border-radius: 10px 0 0 10px; }
.toy-bomb::after { right: -14px; border-radius: 0 10px 10px 0; }
.bomb-top { position: absolute; top: -9px; left: 50%; display: flex; gap: 22px; transform: translateX(-50%); }
.bomb-top i { width: 10px; height: 10px; border: 3px solid #fff2e9; border-radius: 50%; background: #9d6d96; box-shadow: 0 2px 3px rgba(80,47,75,.25); }

.bomb-shape { position: relative; height: 106px; margin: 5px auto -2px; }
.bomb-sphere { position: absolute; z-index: 2; bottom: 5px; left: 50%; display: grid; width: 88px; height: 88px; place-items: center; border: 5px solid #fce4ea; border-radius: 50%; background: radial-gradient(circle at 32% 24%,#806783 0 9%,#4e4058 35%,#2f2940 75%); box-shadow: inset -8px -10px 0 rgba(16,13,29,.22), inset 8px 7px 0 rgba(255,255,255,.08), 0 8px 10px rgba(57,36,58,.3); transform: translateX(-50%); }
.bomb-sphere b { position: relative; z-index: 2; color: #ffb8d1; font-family: "Gaegu",cursive; font-size: 38px; line-height: 1; text-shadow: 0 0 9px rgba(255,166,205,.65); }
.bomb-sphere__shine { position: absolute; top: 13px; left: 16px; width: 21px; height: 12px; border-radius: 50%; background: rgba(255,255,255,.38); filter: blur(1px); transform: rotate(-25deg); }
.bomb-fuse { position: absolute; z-index: 1; top: 2px; left: calc(50% + 24px); width: 46px; height: 56px; border: 6px solid #6b5363; border-bottom: 0; border-left-color: transparent; border-radius: 0 32px 0 0; transform: rotate(13deg); }
.bomb-fuse::before { content: ""; position: absolute; top: -11px; right: -9px; width: 16px; height: 16px; border: 3px solid #ffefd0; border-radius: 50%; background: #ffae4a; box-shadow: 0 0 12px #ffbb4f; }
.bomb-fuse i { position: absolute; top: -3px; right: 0; width: 7px; height: 7px; border-radius: 50%; background: #fff4a9; animation: fuseBlink .7s ease-in-out infinite alternate; }
.bomb-foot { position: absolute; z-index: 1; bottom: 0; width: 29px; height: 13px; border: 3px solid #fce4ea; border-radius: 7px 7px 4px 4px; background: #8f648c; box-shadow: 0 3px 3px rgba(57,36,58,.2); }
.bomb-foot--left { left: calc(50% - 48px); }
.bomb-foot--right { right: calc(50% - 48px); }

.bomb-face { display: flex; min-height: 54px; padding: 8px 10px; align-items: center; justify-content: space-between; gap: 9px; border: 2px solid rgba(255,242,232,.72); border-radius: 13px; background: linear-gradient(180deg,rgba(102,72,105,.78),rgba(75,59,82,.88)); box-shadow: inset 0 2px 5px rgba(255,255,255,.13), 0 4px 8px rgba(62,38,61,.22); }
.bomb-warning { display: flex; min-width: 0; align-items: center; gap: 8px; color: #fff5df; }
.bomb-warning__icon { display: grid; width: 28px; height: 28px; flex: 0 0 28px; place-items: center; border-radius: 7px; color: #5f4b25; background: #ffd570; font-size: 18px; }
.bomb-warning div { display: flex; min-width: 0; flex-direction: column; }
.bomb-warning b { overflow: hidden; font-family: monospace; font-size: clamp(9px,2.8vw,12px); letter-spacing: .05em; text-overflow: ellipsis; white-space: nowrap; }
.bomb-warning small { margin-top: 3px; color: #ead9e2; font-family: "Gaegu",cursive; font-size: 13px; font-weight: 700; white-space: nowrap; }
.armed-indicator { display: flex; min-width: 50px; padding-left: 5px; flex-direction: column; align-items: center; color: #ffb7bd; font-family: monospace; font-size: 8px; letter-spacing: .08em; }
.armed-indicator i { width: 13px; height: 13px; margin-bottom: 4px; border: 2px solid #ffdce0; border-radius: 50%; background: #f04f61; box-shadow: 0 0 9px #ff536e; animation: armedBlink .75s ease-in-out infinite alternate; }
.armed-indicator.is-safe { color: #adf0c5; }
.armed-indicator.is-safe i { background: #70df9a; box-shadow: 0 0 9px #70df9a; animation: none; }
.armed-indicator.is-alert { color: #ffd17e; }
.armed-indicator.is-alert i { background: #ffae46; box-shadow: 0 0 9px #ffae46; }

.lcd-panel { position: relative; padding: 12px 12px 10px; border: 5px solid #5c5364; border-radius: 15px; background: #d9f0bd; box-shadow: inset 0 0 0 2px #94aa7b, inset 0 0 18px rgba(81,112,70,.18); }
.lcd-panel::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .2; background: repeating-linear-gradient(0deg,transparent 0 3px,rgba(80,108,65,.16) 3px 4px); }
.lcd-label { position: relative; z-index: 1; display: flex; justify-content: space-between; color: #526548; font-family: monospace; font-size: 10px; letter-spacing: .06em; }
.lcd-label b { font-weight: 700; }
.hint-list { position: relative; z-index: 1; display: grid; max-height: 142px; margin: 8px 0 0; padding: 0; overflow-y: auto; list-style: none; gap: 4px; scrollbar-color: #80946d transparent; scrollbar-width: thin; }
.hint-list li { display: flex; min-height: 23px; align-items: center; color: #334530; font-family: "Gaegu", cursive; font-size: clamp(15px,4.3vw,18px); font-weight: 700; line-height: 1.15; }
.hint-list li::before { content: "▸"; margin-right: 6px; font-family: monospace; font-size: 12px; }
.debug-answer { position: relative; z-index: 1; display: flex; margin-top: 8px; padding: 6px 8px; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 9px; border: 1px dashed #627657; border-radius: 7px; color: #40553a; font-family: monospace; }
.debug-answer span { font-size: 9px; }
.debug-answer strong { font-family: "Gaegu", cursive; font-size: 15px; }

.wire-board { position: relative; margin-top: 10px; padding: 9px 10px 6px; overflow: hidden; border: 3px solid rgba(255,244,234,.8); border-radius: 18px; background: #7b7180; box-shadow: inset 0 5px 14px rgba(55,42,61,.28); }
.wire-board::before { content: ""; position: absolute; top: 0; right: 0; left: 0; height: 5px; opacity: .65; background: repeating-linear-gradient(135deg,#f9d56f 0 8px,#504653 8px 16px); }
.wire-board__label { display: flex; margin-bottom: 4px; align-items: center; justify-content: space-between; color: #f9eefa; font-family: monospace; font-size: 10px; font-weight: 700; letter-spacing: .03em; }
.wire-board__label b { color: #ffe6ac; font-family: "Gaegu",cursive; font-size: 13px; letter-spacing: 0; }
.wire-list { display: grid; gap: 2px; }
.wire-button { position: relative; display: flex; width: 100%; height: clamp(36px, 5.4vh, 48px); padding: 0 5px; align-items: center; border: 0; background: transparent; touch-action: manipulation; }
.wire-button::before,
.wire-button::after { content: ""; position: absolute; top: 50%; z-index: 2; width: 11px; height: 17px; border: 3px solid #bbb1b8; background: #eee5e7; transform: translateY(-50%); }
.wire-button::before { left: 0; border-radius: 4px 0 0 4px; }
.wire-button::after { right: 0; border-radius: 0 4px 4px 0; }
.wire-line { position: relative; z-index: 1; display: block; width: 100%; height: 13px; border: 3px solid rgba(80,49,58,.27); border-radius: 99px; background: var(--wire-color); box-shadow: inset 0 3px 2px rgba(255,255,255,.38), 0 3px 3px rgba(42,30,46,.25); transition: transform .18s ease, opacity .18s ease; }
.wire-line::after { content: ""; position: absolute; top: 50%; left: 50%; width: 24px; height: 28px; border: 2px solid rgba(255,255,255,.55); border-radius: 7px; background: var(--wire-color); transform: translate(-50%,-50%); box-shadow: inset 0 3px 5px rgba(255,255,255,.35), 0 2px 4px rgba(46,33,49,.2); }
.wire-name { position: absolute; z-index: 4; top: 50%; left: 50%; color: var(--wire-text, #fff); font-family: "Gaegu", cursive; font-size: 14px; font-weight: 700; text-shadow: 0 1px 2px rgba(46,31,47,.5); transform: translate(-50%,-50%); }
.wire-button:active:not(:disabled) .wire-line { transform: scaleX(.96); }
.wire-button:focus-visible { outline: 3px solid #fff2a8; outline-offset: 1px; border-radius: 8px; }
.wire-button.is-cut .wire-line { opacity: .33; transform: scaleX(.43); }
.wire-button.is-cut .wire-line::after { opacity: 0; }
.wire-button.is-cut .wire-name { color: #ddd4dc; text-decoration: line-through; text-shadow: none; }
.wire-button.is-cut::before,
.wire-button.is-cut::after { opacity: .45; }
.wire-button.is-wrong { animation: wireWrong .38s ease; }

.bomb-stickers { display: flex; height: 19px; padding: 4px 8px 0; align-items: center; justify-content: space-between; color: #fff1bd; font-size: 12px; }
.bomb-stickers span:nth-child(2) { padding: 2px 8px; border-radius: 99px; color: #a25f80; background: rgba(255,246,214,.75); font-family: monospace; font-size: 8px; letter-spacing: .08em; }
.status-message { min-height: 24px; margin: 9px 4px 0; color: #6e5573; font-family: "Gaegu", cursive; font-size: 17px; font-weight: 700; text-align: center; }

.bottom-menu { position: fixed; z-index: 30; bottom: calc(8px + var(--safe-bottom)); left: 50%; display: grid; width: min(calc(100% - 24px), 500px); padding: 7px; grid-template-columns: repeat(3,1fr); gap: 6px; border: 2px solid rgba(255,255,255,.84); border-radius: 21px; background: rgba(255,250,246,.91); box-shadow: 0 10px 28px rgba(83,60,91,.24); backdrop-filter: blur(12px); transform: translateX(-50%); }
.bottom-menu button,
.bottom-menu a { display: flex; min-height: 43px; padding: 5px; flex-direction: column; align-items: center; justify-content: center; gap: 1px; color: #6c5e76; border: 0; border-radius: 14px; background: transparent; font-size: 11px; text-decoration: none; touch-action: manipulation; }
.bottom-menu span { font-size: 20px; line-height: 1; }
.bottom-menu button:active,
.bottom-menu a:active { background: #f3e8f1; transform: scale(.95); }

.overlay { position: fixed; z-index: 80; inset: 0; display: grid; padding: calc(18px + var(--safe-top)) 16px calc(18px + var(--safe-bottom)); overflow-y: auto; place-items: center; background: rgba(71,51,75,.48); backdrop-filter: blur(8px); touch-action: pan-y; }
.result-card { position: relative; max-width: 410px; overflow: hidden; }
.result-card.is-success { background: linear-gradient(160deg,#fffaf2,#ffe2ed 58%,#e9e2ff); }
.result-card.is-failure { background: linear-gradient(160deg,#fffaf2,#eee6ef); }
.result-visual { display: grid; min-height: 132px; place-items: center; font-size: 78px; line-height: 1.2; filter: drop-shadow(0 9px 7px rgba(78,55,80,.18)); }
.result-card.is-failure .result-visual { animation: giftOpen .7s ease both; }
.result-eyebrow { margin-top: 4px; }
.result-card h2 { margin: 1px 0 8px; font-family: "Gaegu", cursive; font-size: clamp(29px,8vw,39px); line-height: 1; }
.result-note { margin: 12px 0 20px; padding: 8px 12px 10px; border: 2px solid #f4c2d7; border-radius: 15px; background: rgba(255,255,255,.72); transform: rotate(-1deg); }
.result-note > span { color: #a8758c; font-family: "Gaegu", cursive; font-size: 14px; font-weight: 700; }
.result-message { min-height: 35px; margin: 1px 0 0; color: #b3537e; font-family: "Gaegu", cursive; font-size: clamp(22px,6vw,28px); font-weight: 700; }
.result-card.is-failure .result-message { color: #78687d; }
.result-card.is-failure .result-note { border-color: #e2d8e1; }
.result-card .jelly-button,
.result-card .soft-button { display: block; width: 100%; margin-top: 10px; }

.gift-visual { position: relative; width: 152px; height: 132px; }
.gift-glow { position: absolute; inset: 20px 5px 0; border-radius: 50%; background: radial-gradient(circle,rgba(255,215,152,.82),transparent 68%); filter: blur(8px); }
.gift-box,
.gift-lid { position: absolute; z-index: 2; left: 50%; border: 3px solid #b9517d; background: linear-gradient(135deg,#f58db5,#e56f9f); box-shadow: inset 0 5px 0 rgba(255,255,255,.28), 0 8px 10px rgba(105,60,95,.2); transform: translateX(-50%); }
.gift-box { bottom: 8px; width: 104px; height: 70px; border-radius: 7px 7px 12px 12px; }
.gift-box::before,
.gift-lid::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 17px; background: #ffe28d; transform: translateX(-50%); box-shadow: inset 2px 0 rgba(255,255,255,.35), inset -2px 0 rgba(186,111,91,.18); }
.gift-lid { bottom: 70px; width: 119px; height: 24px; border-radius: 7px; transform-origin: 17% 95%; }
.gift-lid::after { content: ""; position: absolute; top: -16px; left: 50%; width: 28px; height: 24px; border: 5px solid #ffe28d; border-bottom: 0; border-radius: 18px 18px 0 0; transform: translateX(-50%) rotate(-7deg); }
.gift-note-pop { position: absolute; z-index: 1; bottom: 57px; left: 50%; display: grid; width: 53px; height: 45px; place-items: center; border: 2px solid #e9a8bd; border-radius: 7px 7px 4px 4px; color: #d36f96; background: #fffaf0; font-size: 29px; transform: translateX(-50%); }
.gift-spark { position: absolute; z-index: 4; color: #ffca63; font-size: 24px; opacity: 0; }
.gift-spark--one { top: 3px; left: 23px; }
.gift-spark--two { top: 25px; right: 19px; font-size: 17px; }
.result-card.is-success .gift-lid { animation: giftLidOpen .72s .18s cubic-bezier(.2,1.3,.45,1) both; }
.result-card.is-success .gift-note-pop { animation: giftNotePop .85s .38s cubic-bezier(.2,1.25,.45,1) both; }
.result-card.is-success .gift-spark { animation: giftSpark .8s .52s ease-out both; }

.toast { position: fixed; z-index: 100; top: calc(16px + var(--safe-top)); left: 50%; max-width: calc(100% - 32px); padding: 9px 15px; border: 2px solid rgba(255,255,255,.83); border-radius: 99px; opacity: 0; color: #624d6d; background: rgba(255,250,246,.95); font-family: "Gaegu", cursive; font-size: 15px; font-weight: 700; pointer-events: none; box-shadow: 0 8px 20px rgba(83,59,90,.2); transform: translate(-50%,-14px); transition: opacity .2s ease, transform .2s ease; }
.toast.is-show { opacity: 1; transform: translate(-50%,0); }
.heart-layer { position: fixed; z-index: 90; inset: 0; overflow: hidden; pointer-events: none; }
.flying-heart { position: absolute; bottom: -35px; color: var(--heart-color); font-size: var(--heart-size); animation: heartFly var(--heart-duration) ease-out forwards; }

@keyframes twinkle { to { opacity: .45; transform: scale(.72) rotate(20deg); } }
@keyframes urgent { to { transform: scale(1.035); box-shadow: 0 7px 20px rgba(213,70,105,.31); } }
@keyframes armedBlink { to { opacity: .35; transform: scale(.8); } }
@keyframes wireWrong { 25%,75% { transform: translateX(-6px); } 50% { transform: translateX(6px); } }
@keyframes giftOpen { 0% { transform: scale(.6) rotate(-9deg); } 55% { transform: scale(1.18) rotate(6deg); } 100% { transform: scale(1) rotate(0); } }
@keyframes giftLidOpen { 0% { transform: translateX(-50%) rotate(0); } 100% { transform: translateX(-50%) translate(-13px,-24px) rotate(-19deg); } }
@keyframes giftNotePop { 0% { opacity: 0; transform: translate(-50%,22px) scale(.7); } 65% { opacity: 1; transform: translate(-50%,-22px) scale(1.05); } 100% { opacity: 1; transform: translate(-50%,-15px) scale(1); } }
@keyframes giftSpark { 0% { opacity: 0; transform: scale(.4) rotate(-20deg); } 55% { opacity: 1; transform: scale(1.2) rotate(10deg); } 100% { opacity: .75; transform: scale(1) rotate(0); } }
@keyframes heartFly { 0% { opacity: 0; transform: translate3d(0,0,0) rotate(0); } 12% { opacity: 1; } 100% { opacity: 0; transform: translate3d(var(--heart-x),-105vh,0) rotate(var(--heart-r)); } }
@keyframes heartFloat { 0% { opacity: 0; transform: translate3d(0,0,0) rotate(-7deg); } 10% { opacity: .64; } 28% { transform: translate3d(-18px,-27vh,0) rotate(7deg); } 50% { transform: translate3d(16px,-53vh,0) rotate(-6deg); } 72% { transform: translate3d(-13px,-80vh,0) rotate(8deg); } 90% { opacity: .54; } 100% { opacity: 0; transform: translate3d(14px,-119vh,0) rotate(-4deg); } }

@media (min-width: 560px) and (min-height: 760px) {
  .game-shell { padding-inline: 20px; }
  .hint-list { max-height: 175px; }
  .wire-button { height: 48px; }
}

@media (max-width: 359px) {
  .game-shell { padding-inline: 9px; }
  .mission-card > p { display: none; }
  .toy-bomb { padding-inline: 10px; }
  .hint-list li { font-size: 14px; }
  .intro-card { padding-inline: 15px; }
}

@media (max-height: 700px) {
  .intro-card { padding-block: 17px; }
  .intro-bomb { height: 56px; transform: scale(.82); transform-origin: center bottom; }
  .intro-story { margin-block: 8px 11px; }
  .difficulty-picker span { height: 52px; }
  .game-shell { padding-top: calc(6px + var(--safe-top)); }
  .mission-card { padding-block: 7px; }
  .hint-list { max-height: 112px; }
  .wire-button { height: 34px; }
  .toy-bomb { margin-top: 6px; padding-top: 11px; }
  .status-message { margin-top: 5px; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
