:root {
  --pink-50: #fff4f8;
  --pink-100: #ffe3ed;
  --pink-300: #ffafca;
  --pink-500: #ff6d9f;
  --pink-600: #ed4f8a;
  --blue-100: #dff5ff;
  --blue-300: #85d7ff;
  --blue-500: #36a9ee;
  --blue-600: #1689d0;
  --ink: #27354f;
  --muted: #6a7790;
  --white: #fff;
  --shadow: 0 24px 70px rgb(71 106 155 / 18%);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  font-family:
    "Hiragino Maru Gothic ProN", "Yu Gothic", "Meiryo", system-ui, sans-serif;
  background:
    radial-gradient(circle at 10% 10%, rgb(255 255 255 / 92%) 0 4%, transparent 22%),
    linear-gradient(135deg, #fff7fa 0%, #edfaff 58%, #f8f3ff 100%);
}

button {
  color: inherit;
  font: inherit;
}

button,
canvas {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible {
  outline: 4px solid rgb(40 160 230 / 35%);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.app-shell {
  position: relative;
  min-height: 100svh;
}

.screen {
  display: none;
  min-height: 100svh;
}

.screen.is-active {
  display: flex;
}

.title-screen {
  position: relative;
  align-items: center;
  justify-content: center;
  padding: max(24px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right))
    max(24px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  isolation: isolate;
}

.title-screen::before,
.title-screen::after {
  position: fixed;
  z-index: -2;
  border-radius: 50%;
  content: "";
  filter: blur(2px);
}

.title-screen::before {
  top: -18vw;
  left: -16vw;
  width: 50vw;
  height: 50vw;
  background: rgb(255 183 208 / 26%);
}

.title-screen::after {
  right: -18vw;
  bottom: -26vw;
  width: 58vw;
  height: 58vw;
  background: rgb(96 205 255 / 24%);
}

.bubble-field i {
  position: fixed;
  z-index: -1;
  width: 30px;
  height: 30px;
  border: 3px solid rgb(95 196 244 / 22%);
  border-radius: 50%;
  box-shadow: inset 4px 4px 0 rgb(255 255 255 / 72%);
  animation: drift 7s ease-in-out infinite;
}

.bubble-field i:nth-child(1) {
  top: 12%;
  left: 6%;
}

.bubble-field i:nth-child(2) {
  top: 70%;
  left: 12%;
  width: 54px;
  height: 54px;
  animation-delay: -2s;
}

.bubble-field i:nth-child(3) {
  top: 8%;
  right: 14%;
  width: 42px;
  height: 42px;
  animation-delay: -4s;
}

.bubble-field i:nth-child(4) {
  right: 5%;
  bottom: 17%;
  width: 24px;
  height: 24px;
  animation-delay: -1s;
}

.bubble-field i:nth-child(5) {
  bottom: 7%;
  left: 42%;
  width: 20px;
  height: 20px;
  animation-delay: -3s;
}

.bubble-field i:nth-child(6) {
  top: 42%;
  right: 2%;
  width: 72px;
  height: 72px;
  animation-delay: -5s;
}

@keyframes drift {
  0%,
  100% {
    transform: translateY(0) rotate(0);
  }
  50% {
    transform: translateY(-24px) rotate(10deg);
  }
}

.title-card {
  display: grid;
  grid-template-columns: minmax(330px, 0.93fr) minmax(360px, 1.07fr);
  width: min(1080px, 100%);
  min-height: min(710px, calc(100svh - 76px));
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / 90%);
  border-radius: 46px;
  background: rgb(255 255 255 / 76%);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.title-copy {
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(36px, 6vw, 78px);
}

.eyebrow {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--pink-600);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.eyebrow::before {
  width: 22px;
  height: 3px;
  border-radius: 999px;
  background: currentColor;
  content: "";
}

.title-logo {
  width: min(390px, 100%);
  height: auto;
  margin-left: -10px;
  object-fit: contain;
}

.title-lead {
  max-width: 420px;
  margin: 20px 0 30px;
  color: #4d5c75;
  font-size: clamp(1rem, 2vw, 1.18rem);
  font-weight: 700;
  line-height: 1.8;
}

.title-actions,
.result-actions,
.dialog-actions {
  display: grid;
  gap: 12px;
}

.primary-button,
.secondary-button {
  min-height: 58px;
  padding: 13px 24px;
  border-radius: 999px;
  font-weight: 900;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    filter 160ms ease;
}

.primary-button {
  border: 2px solid #ff8ab3;
  color: var(--white);
  background: linear-gradient(180deg, #ff91b6 0%, #ff5b94 100%);
  box-shadow:
    inset 0 2px 0 rgb(255 255 255 / 55%),
    0 10px 24px rgb(238 79 139 / 28%);
}

.secondary-button {
  border: 2px solid #8bd8fa;
  color: #167bbb;
  background: linear-gradient(180deg, #f9fdff 0%, #def5ff 100%);
  box-shadow: inset 0 2px 0 #fff;
}

.primary-button:hover,
.secondary-button:hover {
  filter: brightness(1.04);
  transform: translateY(-2px);
}

.primary-button:active,
.secondary-button:active {
  transform: translateY(1px);
}

.button-icon {
  display: inline-grid;
  width: 28px;
  height: 28px;
  margin-right: 9px;
  place-items: center;
  border-radius: 50%;
  color: var(--pink-600);
  background: #fff;
}

.title-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid #ddecf4;
}

.best-score {
  display: flex;
  flex-direction: column;
}

.best-score span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.best-score strong {
  color: var(--blue-600);
  font-size: 1.55rem;
  font-variant-numeric: tabular-nums;
}

.icon-button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  gap: 8px;
  padding: 8px 15px;
  border: 1px solid #d5e8f1;
  border-radius: 999px;
  color: #52627a;
  background: #fff;
  cursor: pointer;
}

.sound-icon {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--blue-500);
  font-weight: 900;
}

.title-visual {
  position: relative;
  display: flex;
  min-height: 560px;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgb(255 255 255 / 20%), transparent 42%),
    repeating-linear-gradient(
      0deg,
      rgb(255 255 255 / 15%) 0 2px,
      transparent 2px 48px
    ),
    linear-gradient(150deg, #ffc7da, #ffdce7 46%, #b9eaff 100%);
}

.title-visual::after {
  position: absolute;
  right: -12%;
  bottom: -8%;
  left: -12%;
  height: 31%;
  border-radius: 50% 50% 0 0;
  background: rgb(255 255 255 / 50%);
  content: "";
  filter: blur(1px);
}

.character-glow {
  position: absolute;
  top: 12%;
  left: 50%;
  width: min(420px, 78%);
  aspect-ratio: 1;
  border: 2px solid rgb(255 255 255 / 60%);
  border-radius: 50%;
  background: rgb(255 255 255 / 28%);
  box-shadow:
    0 0 0 24px rgb(255 255 255 / 10%),
    0 0 70px rgb(255 255 255 / 55%);
  transform: translateX(-50%);
}

.title-character {
  z-index: 2;
  width: min(420px, 82%);
  max-height: 86%;
  object-fit: contain;
  filter: drop-shadow(0 25px 18px rgb(78 85 139 / 18%));
  animation: character-float 3.2s ease-in-out infinite;
  transform-origin: center bottom;
}

@keyframes character-float {
  0%,
  100% {
    transform: translateY(2px) rotate(-0.5deg);
  }
  50% {
    transform: translateY(-10px) rotate(0.5deg);
  }
}

.title-splash,
.title-bubble {
  position: absolute;
  z-index: 3;
  object-fit: contain;
  pointer-events: none;
}

.splash-one {
  right: 5%;
  bottom: 15%;
  width: 150px;
  transform: rotate(-16deg);
}

.bubble-one {
  top: 12%;
  right: 6%;
  width: 120px;
}

.bubble-two {
  bottom: 23%;
  left: 2%;
  width: 95px;
  transform: rotate(20deg);
}

.wash-badge {
  position: absolute;
  z-index: 4;
  top: 40px;
  left: 30px;
  display: grid;
  width: 92px;
  height: 92px;
  place-content: center;
  border: 3px solid #fff;
  border-radius: 50%;
  color: #fff;
  background: var(--pink-500);
  box-shadow: 0 10px 30px rgb(224 74 126 / 22%);
  font-size: 1rem;
  font-weight: 900;
  text-align: center;
  transform: rotate(-8deg);
}

.wash-badge small {
  display: block;
  font-size: 0.64rem;
  letter-spacing: 0.06em;
}

.version {
  position: absolute;
  right: 22px;
  bottom: 8px;
  margin: 0;
  color: #8894a8;
  font-size: 0.68rem;
}

.game-screen {
  flex-direction: column;
  padding: max(10px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right))
    max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  background:
    radial-gradient(circle at 50% -20%, #fff 0 14%, transparent 44%),
    linear-gradient(180deg, #eefaff 0%, #fef6fa 100%);
}

.game-hud {
  z-index: 5;
  display: grid;
  grid-template-columns: 130px 108px minmax(130px, 1fr) minmax(130px, 1fr) auto;
  width: min(1180px, 100%);
  align-items: center;
  gap: 10px;
  margin: 0 auto 8px;
}

.hud-brand {
  display: grid;
  height: 66px;
  place-items: center;
  overflow: hidden;
  border-radius: 20px;
  background: rgb(255 255 255 / 88%);
  box-shadow: 0 8px 24px rgb(50 114 153 / 10%);
}

.hud-brand img {
  width: 110px;
  max-height: 55px;
  object-fit: contain;
}

.hud-item {
  min-height: 66px;
  border: 1px solid #fff;
  border-radius: 20px;
  background: rgb(255 255 255 / 90%);
  box-shadow: 0 8px 24px rgb(50 114 153 / 10%);
}

.timer-card {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 3px;
}

.timer-card span,
.timer-card small {
  color: #7b8799;
  font-size: 0.72rem;
  font-weight: 800;
}

.timer-card strong {
  color: var(--pink-600);
  font-size: 2.1rem;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.timer-card.is-warning {
  animation: timer-warning 0.7s ease-in-out infinite alternate;
}

@keyframes timer-warning {
  to {
    border-color: #ff7b91;
    background: #fff0f3;
    transform: scale(1.02);
  }
}

.hud-gauge {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 10px 15px;
}

.hud-gauge-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 7px;
  font-size: 0.75rem;
  font-weight: 900;
}

.hud-gauge-label strong {
  color: var(--blue-600);
  font-variant-numeric: tabular-nums;
}

.meter {
  height: 13px;
  overflow: hidden;
  border-radius: 999px;
  background: #eaf0f4;
  box-shadow: inset 0 1px 4px rgb(64 82 113 / 18%);
}

.meter i {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  transition: width 160ms linear;
}

.dirt-meter i {
  width: 100%;
  background: linear-gradient(90deg, #a96f4b, #8a4f31);
}

.foam-meter i {
  background: linear-gradient(90deg, #99e4ff, #fff);
  box-shadow: inset 0 0 0 2px #78d4f8;
}

.hud-actions {
  display: flex;
  gap: 8px;
}

.round-button {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 3px solid #fff;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(180deg, #67c9fa, #269add);
  box-shadow: 0 8px 18px rgb(26 132 196 / 24%);
  font-size: 1.2rem;
  font-weight: 900;
  cursor: pointer;
}

.step-banner {
  z-index: 4;
  display: grid;
  grid-template-columns: auto auto 1fr;
  width: min(820px, calc(100% - 24px));
  min-height: 46px;
  align-items: center;
  gap: 10px;
  margin: 0 auto -18px;
  padding: 8px 16px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: linear-gradient(100deg, #ffebf2, #fff 45%, #e3f7ff);
  box-shadow: 0 8px 25px rgb(83 117 151 / 13%);
}

.step-banner span {
  padding: 5px 10px;
  border-radius: 999px;
  color: #fff;
  background: var(--pink-500);
  font-size: 0.7rem;
  font-weight: 900;
}

.step-banner strong {
  font-size: 0.95rem;
}

.step-banner small {
  color: var(--muted);
  font-weight: 700;
}

.game-stage {
  position: relative;
  display: grid;
  width: auto;
  height: min(calc(100svh - 210px), calc((100vw - 24px) * 0.5625), 664px);
  aspect-ratio: 16 / 9;
  flex: 0 1 auto;
  align-items: center;
  justify-items: center;
  margin: 0 auto;
  overflow: hidden;
  border: 4px solid #fff;
  border-radius: 34px;
  background: #dff6ff;
  box-shadow: 0 18px 44px rgb(46 122 169 / 16%);
}

#game-canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  user-select: none;
  cursor: crosshair;
}

.ready-count {
  position: absolute;
  top: 50%;
  left: 50%;
  padding: 14px 24px;
  border: 4px solid #fff;
  border-radius: 999px;
  color: #fff;
  background: var(--pink-500);
  box-shadow: 0 16px 40px rgb(230 78 132 / 28%);
  font-size: clamp(1.6rem, 5vw, 3.6rem);
  font-weight: 1000;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.8);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.ready-count.is-visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.tool-dock {
  z-index: 6;
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 220px));
  justify-content: center;
  gap: 12px;
  margin-top: -23px;
  padding: 0 14px;
}

.tool-button {
  display: grid;
  grid-template-columns: 64px 1fr;
  min-height: 76px;
  align-items: center;
  gap: 9px;
  padding: 7px 16px 7px 8px;
  border: 3px solid #fff;
  border-radius: 24px;
  color: var(--ink);
  background: linear-gradient(180deg, #fff, #e8f8ff);
  box-shadow: 0 10px 24px rgb(45 125 173 / 17%);
  text-align: left;
  cursor: pointer;
  transition:
    transform 150ms ease,
    border-color 150ms ease,
    background 150ms ease;
}

.tool-button:hover {
  transform: translateY(-3px);
}

.tool-button.is-selected {
  border-color: var(--pink-300);
  background: linear-gradient(180deg, #fff5f8, #ffe7f0);
  transform: translateY(-5px);
}

.tool-button.is-needed {
  animation: needed-tool 0.85s ease-in-out infinite alternate;
}

@keyframes needed-tool {
  to {
    box-shadow: 0 8px 30px rgb(255 101 155 / 35%);
  }
}

.tool-image {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 18px;
  background: rgb(255 255 255 / 82%);
}

.tool-image img {
  max-width: 48px;
  max-height: 52px;
  object-fit: contain;
}

.tool-button strong,
.tool-button small {
  display: block;
}

.tool-button strong {
  font-size: 0.98rem;
}

.tool-button small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.67rem;
  font-weight: 700;
}

.result-screen {
  align-items: center;
  justify-content: center;
  padding: max(24px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right))
    max(24px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  background:
    radial-gradient(circle at 50% 30%, #fff 0 8%, transparent 38%),
    linear-gradient(145deg, #fff1f6, #e8f8ff);
}

.result-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(340px, 1.15fr);
  width: min(900px, 100%);
  min-height: 570px;
  align-items: center;
  overflow: hidden;
  border: 4px solid #fff;
  border-radius: 42px;
  background: rgb(255 255 255 / 84%);
  box-shadow: var(--shadow);
}

.result-card.is-fail {
  background: linear-gradient(145deg, rgb(255 255 255 / 90%), rgb(239 242 255 / 94%));
}

.result-burst {
  position: absolute;
  left: 25%;
  width: 440px;
  height: 440px;
  border-radius: 50%;
  background: repeating-conic-gradient(
    from 0deg,
    rgb(255 205 89 / 23%) 0deg 8deg,
    transparent 8deg 18deg
  );
  transform: translateX(-50%);
}

#result-character {
  z-index: 1;
  width: 88%;
  max-height: 430px;
  justify-self: center;
  object-fit: contain;
  filter: drop-shadow(0 18px 16px rgb(85 93 141 / 16%));
  animation: result-pop 600ms cubic-bezier(0.18, 0.89, 0.33, 1.35) both;
}

@keyframes result-pop {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.82);
  }
}

.result-copy {
  z-index: 2;
  padding: 45px 60px 45px 24px;
}

.result-copy h2 {
  margin: 0;
  color: var(--pink-600);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  line-height: 1;
  text-shadow: 0 4px 0 #fff;
}

.result-copy > p {
  color: #59667a;
  font-weight: 800;
}

.result-stars {
  margin: 14px 0 8px;
  color: #ffbd2e;
  font-size: 2.5rem;
  letter-spacing: 0.08em;
  text-shadow:
    0 2px 0 #e38524,
    0 4px 12px rgb(243 157 28 / 22%);
}

.score-panel {
  position: relative;
  display: flex;
  min-height: 95px;
  flex-direction: column;
  justify-content: center;
  padding: 12px 20px;
  border: 2px solid #ccecfb;
  border-radius: 22px;
  background: linear-gradient(135deg, #f9fdff, #e9f8ff);
}

.score-panel span {
  color: var(--blue-600);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.score-panel strong {
  color: #3653a1;
  font-size: 2.35rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.05;
}

.score-panel em {
  position: absolute;
  top: -11px;
  right: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #fff;
  background: var(--pink-500);
  font-size: 0.67rem;
  font-style: normal;
  font-weight: 900;
}

.result-detail {
  min-height: 1.5em;
  color: var(--muted) !important;
  font-size: 0.78rem;
}

.result-actions {
  grid-template-columns: 1fr 1fr;
  margin-top: 20px;
}

.game-dialog {
  width: min(760px, calc(100% - 28px));
  padding: 0;
  border: 0;
  border-radius: 34px;
  color: var(--ink);
  background: transparent;
  box-shadow: var(--shadow);
}

.game-dialog::backdrop {
  background: rgb(33 49 75 / 48%);
  backdrop-filter: blur(8px);
}

.dialog-content {
  position: relative;
  display: grid;
  grid-template-columns: 220px 1fr;
  align-items: center;
  gap: 22px;
  padding: 34px;
  border: 3px solid #fff;
  border-radius: 34px;
  background: linear-gradient(140deg, #fff7fa, #ecf9ff);
}

.dialog-content > img {
  width: 100%;
  max-height: 380px;
  object-fit: contain;
}

.dialog-content h2 {
  margin: 0 0 10px;
  color: var(--pink-600);
  font-size: 2rem;
}

.dialog-content p {
  color: #52617a;
  font-weight: 700;
  line-height: 1.7;
}

.dialog-content ol {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding: 0;
  list-style: none;
}

.dialog-content li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
  font-weight: 800;
}

.dialog-content li span {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--blue-500);
  font-size: 0.72rem;
}

.dialog-note {
  font-size: 0.76rem;
}

.dialog-close {
  position: absolute;
  z-index: 2;
  top: 16px;
  right: 16px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: var(--pink-500);
  font-size: 1.3rem;
  cursor: pointer;
}

.pause-dialog {
  width: min(650px, calc(100% - 28px));
}

.pause-dialog .dialog-actions {
  grid-template-columns: 1fr 1fr;
}

@media (max-width: 800px) {
  .title-card {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .title-copy {
    order: 2;
    padding: 26px 24px 32px;
  }

  .title-visual {
    min-height: 320px;
  }

  .title-character {
    width: min(280px, 70%);
  }

  .title-logo {
    width: min(320px, 85%);
  }

  .title-lead {
    margin: 10px 0 20px;
    font-size: 0.95rem;
  }

  .wash-badge {
    top: 20px;
    left: 18px;
    width: 72px;
    height: 72px;
    font-size: 0.8rem;
  }

  .game-hud {
    grid-template-columns: 74px 1fr 1fr auto;
  }

  .hud-brand {
    display: none;
  }

  .timer-card {
    min-height: 56px;
  }

  .timer-card strong {
    font-size: 1.6rem;
  }

  .hud-item {
    min-height: 56px;
  }

  .hud-gauge {
    padding: 8px 10px;
  }

  .hud-gauge-label span {
    display: none;
  }

  .hud-gauge-label::before {
    color: var(--muted);
    font-size: 0.65rem;
    content: "汚れ";
  }

  .hud-gauge:nth-of-type(4) .hud-gauge-label::before {
    content: "泡";
  }

  .round-button {
    width: 42px;
    height: 42px;
    border-width: 2px;
  }

  .hud-actions {
    flex-direction: column;
    gap: 3px;
  }

  .step-banner {
    grid-template-columns: auto 1fr;
    margin-bottom: -12px;
  }

  .step-banner small {
    display: none;
  }

  .game-stage {
    border-radius: 24px;
  }

  .tool-dock {
    position: sticky;
    bottom: max(0px, env(safe-area-inset-bottom));
    grid-template-columns: repeat(3, 1fr);
    width: 100%;
    gap: 6px;
    margin-top: -16px;
    padding: 0 2px;
  }

  .tool-button {
    grid-template-columns: 42px 1fr;
    min-height: 64px;
    gap: 3px;
    padding: 5px 7px;
    border-radius: 19px;
  }

  .tool-image {
    width: 40px;
    height: 48px;
  }

  .tool-image img {
    max-width: 35px;
    max-height: 40px;
  }

  .tool-button strong {
    font-size: 0.8rem;
  }

  .tool-button small {
    font-size: 0.53rem;
  }

  .result-card {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 18px;
  }

  #result-character {
    width: 180px;
    height: 210px;
  }

  .result-copy {
    margin-top: -26px;
    padding: 20px 26px 34px;
    text-align: center;
  }

  .result-copy .eyebrow {
    margin-inline: auto;
  }

  .result-copy h2 {
    font-size: 2.7rem;
  }

  .result-stars {
    font-size: 2rem;
  }

  .dialog-content {
    grid-template-columns: 100px 1fr;
    gap: 12px;
    padding: 26px 20px;
  }

  .dialog-content ol {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .title-screen {
    align-items: flex-start;
    padding: 10px;
  }

  .title-card {
    border-radius: 30px;
  }

  .title-visual {
    min-height: 260px;
  }

  .title-copy {
    padding: 20px 18px 24px;
  }

  .eyebrow {
    font-size: 0.66rem;
  }

  .title-logo {
    width: 270px;
  }

  .title-meta {
    margin-top: 17px;
    padding-top: 16px;
  }

  .sound-label {
    display: none;
  }

  .game-screen {
    padding-inline: 5px;
  }

  .game-hud {
    grid-template-columns: 58px 1fr 1fr 40px;
    gap: 4px;
  }

  .timer-card span,
  .timer-card small {
    display: none;
  }

  .timer-card strong {
    font-size: 1.45rem;
  }

  .hud-gauge-label {
    margin-bottom: 4px;
  }

  .hud-gauge {
    padding: 6px;
  }

  .hud-actions .round-button:last-child {
    display: none;
  }

  .step-banner {
    min-height: 40px;
    padding: 6px 9px;
  }

  .step-banner strong {
    font-size: 0.78rem;
  }

  .game-stage {
    border-width: 3px;
  }

  .tool-button {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .tool-button small {
    display: none;
  }

  .tool-image {
    height: 35px;
  }

  .tool-image img {
    max-height: 34px;
  }

  .result-actions,
  .pause-dialog .dialog-actions {
    grid-template-columns: 1fr;
  }

  .dialog-content {
    display: block;
    max-height: 90svh;
    overflow-y: auto;
  }

  .dialog-content > img {
    float: left;
    width: 90px;
    margin: 20px 12px 8px 0;
  }
}

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