:root {
  --ink: #1c2b33;
  --paper: #f7f3ea;
  --accent: #e85d4c;
  --accent-deep: #c94434;
  --teal: #1a4a5c;
  --teal-soft: #2f6f82;
  --gold: #f0c75e;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --font-display: "Zen Maru Gothic", "M PLUS Rounded 1c", sans-serif;
  --font-body: "M PLUS Rounded 1c", "Zen Maru Gothic", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--teal);
  touch-action: none;
  user-select: none;
}

#app {
  position: relative;
  width: 100%;
  height: 100%;
  height: 100dvh;
  max-width: 480px;
  margin: 0 auto;
  overflow: hidden;
}

.screen {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  padding: calc(20px + var(--safe-top)) 20px calc(20px + var(--safe-bottom));
}

.screen.active {
  display: flex;
  animation: fade-in 0.35s ease;
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== Top ===== */
#screen-top {
  justify-content: center;
  align-items: center;
  padding-top: calc(56px + var(--safe-top));
}

.top-bg {
  position: absolute;
  inset: 0;
  background-color: #8ec8e8;
  background-image: url("/assets/bg-top.png");
  background-size: cover;
  background-position: center;
}

.top-ribbon {
  position: absolute;
  top: calc(10px + var(--safe-top));
  left: 0;
  right: 0;
  z-index: 3;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.top-ribbon-text {
  position: relative;
  display: inline-block;
  max-width: calc(100% - 28px);
  padding: 10px 28px;
  background: linear-gradient(180deg, #ff5a5a 0%, #e03333 55%, #c72222 100%);
  color: #fff;
  font-family: var(--font-display);
  font-size: clamp(0.85rem, 3.6vw, 1.05rem);
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1.35;
  text-align: center;
  box-shadow:
    0 4px 0 #9e1a1a,
    0 8px 18px rgba(120, 20, 20, 0.28);
  clip-path: polygon(
    12px 0,
    calc(100% - 12px) 0,
    100% 50%,
    calc(100% - 12px) 100%,
    12px 100%,
    0 50%
  );
}

.top-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 45% at 50% 42%, rgba(255, 250, 235, 0.55), transparent 70%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, transparent 30%, rgba(40, 70, 50, 0.18) 100%);
  pointer-events: none;
}

.top-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin: 0;
  padding: 0 8px;
  text-align: center;
  color: #2a4a3a;
}

.top-start-btn {
  width: min(100%, 280px);
  margin-top: 22px;
  font-size: 1.1rem;
  animation: pulse-hint 1.8s ease-in-out infinite;
}

.ranking-icon-btn {
  position: absolute;
  left: 50%;
  bottom: calc(28px + var(--safe-bottom));
  z-index: 2;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 72px;
  padding: 10px 14px;
  border: none;
  border-radius: 18px;
  background: rgba(255, 250, 235, 0.82);
  color: #c4871a;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  cursor: pointer;
  backdrop-filter: blur(6px);
  box-shadow: 0 6px 16px rgba(40, 70, 50, 0.18);
  transition: transform 0.12s ease, background 0.12s ease;
}

.ranking-icon-btn svg {
  width: 36px;
  height: 36px;
}

.ranking-icon-btn:active {
  transform: translateX(-50%) scale(0.96);
  background: rgba(255, 250, 235, 0.95);
}

/* ===== Ranking ===== */
#screen-ranking {
  background: linear-gradient(180deg, #f7f3ea 0%, #e8dfd0 100%);
  gap: 14px;
}

.ranking-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 2px 2px 8px;
}

.ranking-empty {
  margin: auto;
  text-align: center;
  opacity: 0.6;
  font-weight: 700;
}

.ranking-row {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
}

.ranking-row.rank-1 {
  background: linear-gradient(90deg, rgba(240, 199, 94, 0.45), rgba(255, 255, 255, 0.85));
}

.ranking-row.rank-2 {
  background: linear-gradient(90deg, rgba(180, 196, 210, 0.5), rgba(255, 255, 255, 0.85));
}

.ranking-row.rank-3 {
  background: linear-gradient(90deg, rgba(214, 164, 120, 0.4), rgba(255, 255, 255, 0.85));
}

.ranking-rank {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 900;
  text-align: center;
  color: var(--teal);
}

.ranking-row.rank-1 .ranking-rank {
  color: #b8860b;
}

.ranking-name {
  font-weight: 800;
  font-size: 1.05rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-meta {
  margin: 2px 0 0;
  font-size: 0.75rem;
  font-weight: 600;
  opacity: 0.55;
}

.ranking-score {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--accent);
}

.brand-sub {
  margin: 0 0 8px;
  font-size: 0.95rem;
  letter-spacing: 0.35em;
  opacity: 0.9;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
}

.brand {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 16vw, 5.5rem);
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1;
  color: #1f4d3a;
  text-shadow:
    0 3px 0 rgba(255, 255, 255, 0.75),
    0 8px 18px rgba(80, 120, 70, 0.25);
  animation: brand-bob 2.4s ease-in-out infinite;
}

@keyframes brand-bob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

.top-desc {
  margin: 22px auto 0;
  max-width: 18em;
  padding: 10px 14px;
  border-radius: 16px;
  background: rgba(255, 250, 235, 0.88);
  color: #2a4a3a;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.55;
  letter-spacing: 0.04em;
  box-shadow: 0 6px 16px rgba(40, 70, 50, 0.12);
}

@keyframes pulse-hint {
  0%,
  100% {
    transform: translateY(0);
    box-shadow: 0 6px 0 var(--accent-deep);
  }
  50% {
    transform: translateY(-2px);
    box-shadow: 0 8px 0 var(--accent-deep);
  }
}

/* ===== Character select (Switch-like) ===== */
#screen-character,
#screen-select,
#screen-result {
  /* .screen の position:absolute + inset:0 を維持して全画面にする */
  overflow: hidden;
  isolation: isolate;
  background-color: #7eb8a0;
}

#screen-character::before,
#screen-select::before,
#screen-result::before {
  content: "";
  position: absolute;
  inset: -100px;
  z-index: 0;
  background: url("/assets/bg-top.png") center / cover no-repeat;
  filter: blur(64px) saturate(1.05) brightness(1.05);
  transform: scale(1.35);
  pointer-events: none;
}

#screen-character::after,
#screen-select::after,
#screen-result::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

#screen-character::after {
  background: rgba(24, 52, 48, 0.38);
}

#screen-select::after,
#screen-result::after {
  background: rgba(247, 243, 234, 0.52);
}

#screen-character > *,
#screen-select > *,
#screen-result > * {
  position: relative;
  z-index: 1;
}

#screen-character {
  gap: 12px;
  color: var(--paper);
}

#screen-character .screen-header h2,
#screen-character .screen-header p {
  color: var(--paper);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

#screen-character .screen-header p {
  opacity: 0.85;
}

.character-stage {
  position: relative;
  flex: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-height: 0;
  padding-bottom: 8px;
  overflow: hidden;
}

.stage-floor {
  position: absolute;
  left: -10%;
  right: -10%;
  bottom: 12%;
  height: 42%;
  background:
    radial-gradient(ellipse 70% 35% at 50% 0%, rgba(255, 255, 255, 0.18), transparent 70%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(0, 0, 0, 0.25));
  border-radius: 50%;
  transform: perspective(400px) rotateX(58deg);
  pointer-events: none;
}

.character-row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  width: 100%;
  height: 100%;
  padding: 0 4px 18px;
}

.character-slot {
  position: relative;
  flex: 1;
  max-width: 140px;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 0 2px 0;
  border: none;
  background: transparent;
  color: inherit;
  font-family: inherit;
  cursor: pointer;
}

.character-spotlight {
  position: absolute;
  left: 50%;
  bottom: 18%;
  width: 86%;
  height: 72%;
  transform: translateX(-50%);
  background: radial-gradient(
    ellipse 55% 70% at 50% 100%,
    rgba(255, 236, 170, 0.55),
    rgba(255, 236, 170, 0.08) 55%,
    transparent 72%
  );
  opacity: 0.25;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.character-slot.selected .character-spotlight {
  opacity: 1;
}

.character-figure {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 110px;
  transform-origin: 50% 92%;
  filter: drop-shadow(0 10px 12px rgba(0, 0, 0, 0.35));
  transition: transform 0.2s ease, filter 0.2s ease, opacity 0.2s ease;
  opacity: 0.78;
  transform: scale(0.92);
}

.character-slot.selected .character-figure {
  opacity: 1;
  transform: scale(1.12);
  filter: drop-shadow(0 14px 16px rgba(0, 0, 0, 0.4));
}

.character-dance {
  transform-origin: 50% 92%;
  border-radius: 50%;
  overflow: hidden;
  background: #fff;
  aspect-ratio: 1;
}

.character-dance img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.dance-a {
  animation: dance-bounce 0.55s ease-in-out infinite;
}

.dance-b {
  animation: dance-sway 0.7s ease-in-out infinite;
}

.dance-c {
  animation: dance-shimmy 0.62s ease-in-out infinite;
}

.character-slot.selected .dance-a {
  animation-duration: 0.42s;
}

.character-slot.selected .dance-b {
  animation-duration: 0.5s;
}

.character-slot.selected .dance-c {
  animation-duration: 0.45s;
}

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

@keyframes dance-sway {
  0%,
  100% {
    transform: translateY(0) rotate(4deg) scaleX(1);
  }
  25% {
    transform: translateY(-6px) rotate(-5deg) scaleX(1.02);
  }
  75% {
    transform: translateY(-4px) rotate(6deg) scaleX(0.98);
  }
}

@keyframes dance-shimmy {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  20% {
    transform: translateY(-8px) rotate(-6deg);
  }
  40% {
    transform: translateY(-2px) rotate(5deg);
  }
  60% {
    transform: translateY(-10px) rotate(-3deg);
  }
  80% {
    transform: translateY(-3px) rotate(4deg);
  }
}

.character-label {
  position: relative;
  z-index: 1;
  min-width: 0;
  max-width: 100%;
  padding: 6px 8px;
  border-radius: 999px;
  background: rgba(28, 43, 51, 0.55);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.25;
  text-align: center;
  white-space: normal;
  transition: background 0.2s ease, color 0.2s ease;
}

.character-slot.selected .character-label {
  background: var(--gold);
  color: var(--ink);
}

/* ===== Situation select ===== */
#screen-select {
  gap: 16px;
  color: var(--ink);
}

#screen-select .screen-header h2,
#screen-select .screen-header p {
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.55);
}

.screen-header {
  text-align: center;
}

.screen-header h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 900;
}

.screen-header p {
  margin: 6px 0 0;
  opacity: 0.7;
}

.situation-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  flex: 1;
  align-content: center;
}

.situation-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border: 3px solid transparent;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.55);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.situation-card:active {
  transform: scale(0.97);
}

.situation-card.selected {
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 8px 20px rgba(28, 43, 51, 0.12);
}

.situation-thumb {
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  background-size: cover;
  background-position: center;
}

.situation-thumb.living {
  background-image: url("/assets/bg-living.png");
}

.situation-thumb.washitsu {
  background-image: url("/assets/bg-washitsu.png");
}

.situation-thumb.bedroom {
  background-image: url("/assets/bg-bedroom.png");
}

.situation-thumb.onsen {
  background-image: url("/assets/bg-onsen.png");
}

/* ===== Ready (pre-start) ===== */
#screen-ready {
  padding: 0;
}

.ready-bg {
  position: absolute;
  inset: 0;
  background-color: #1a4a5c;
  background-size: cover;
  background-position: center;
}

.ready-bg.living {
  background-image: url("/assets/bg-living.png");
}

.ready-bg.washitsu {
  background-image: url("/assets/bg-washitsu.png");
}

.ready-bg.bedroom {
  background-image: url("/assets/bg-bedroom.png");
}

.ready-bg.onsen {
  background-image: url("/assets/bg-onsen.png");
}

.ready-overlay {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: calc(24px + var(--safe-top)) 24px calc(28px + var(--safe-bottom));
  background: rgba(28, 43, 51, 0.42);
}

.ready-label {
  margin: 0;
  color: var(--paper);
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.ready-steoto {
  width: min(46vw, 190px);
  height: min(46vw, 190px);
  object-fit: cover;
  object-position: center top;
  border-radius: 50%;
  background: #fff;
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.35));
  animation: ready-bob 1.2s ease-in-out infinite;
}

@keyframes ready-bob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

.ready-situation {
  margin: 0;
  padding: 6px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  font-weight: 800;
  letter-spacing: 0.06em;
}

.ready-howto {
  margin: 0;
  max-width: 22em;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 250, 235, 0.92);
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.6;
  letter-spacing: 0.02em;
  text-align: center;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.ready-start {
  width: min(100%, 280px);
  margin-top: 4px;
  font-size: 1.35rem;
  padding: 18px 24px;
}

.btn {
  display: block;
  width: 100%;
  padding: 16px 20px;
  border: none;
  border-radius: 999px;
  font-family: inherit;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: transform 0.12s ease, opacity 0.12s ease;
}

.btn:active:not(:disabled) {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn.primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 6px 0 var(--accent-deep);
}

.btn.primary:active:not(:disabled) {
  box-shadow: 0 2px 0 var(--accent-deep);
  transform: translateY(4px);
}

/* ===== Game ===== */
#screen-game {
  padding: 0;
}

.game-bg {
  position: absolute;
  inset: 0;
  background-color: #1a4a5c;
  background-size: cover;
  background-position: center;
}

.game-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(28, 43, 51, 0.18) 0%,
    transparent 28%,
    transparent 68%,
    rgba(28, 43, 51, 0.22) 100%
  );
  pointer-events: none;
}

.game-bg.living {
  background-image: url("/assets/bg-living.png");
}

.game-bg.washitsu {
  background-image: url("/assets/bg-washitsu.png");
}

.game-bg.bedroom {
  background-image: url("/assets/bg-bedroom.png");
}

.game-bg.onsen {
  background-image: url("/assets/bg-onsen.png");
}

.game-hud {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  padding: calc(14px + var(--safe-top)) 16px 0;
}

.hud-item {
  min-width: 88px;
  padding: 8px 14px;
  border-radius: 14px;
  background: rgba(28, 43, 51, 0.72);
  color: #fff;
  text-align: center;
  backdrop-filter: blur(6px);
}

.hud-label {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  opacity: 0.75;
}

#timer,
#score {
  display: block;
  margin-top: 2px;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 900;
}

.rub-area {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  touch-action: none;
}

.steoto {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.1s ease;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.28));
}

.steoto.talking {
  animation: steoto-talk 0.25s ease-in-out infinite;
}

.steoto.rubbed {
  transform: scale(1.06) rotate(-2deg);
}

@keyframes steoto-talk {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

.steoto-img {
  display: block;
  width: min(56vw, 240px);
  height: min(56vw, 240px);
  object-fit: cover;
  object-position: center top;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.steoto-name {
  margin: 8px 0 0;
  padding: 4px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
}

.speech-bubble {
  position: absolute;
  top: 18%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  padding: 14px 22px;
  border-radius: 22px;
  background: #fff;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
  white-space: nowrap;
  animation: bubble-pop 0.25s ease;
}

.speech-bubble::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -12px;
  margin-left: -10px;
  border: 12px solid transparent;
  border-top-color: #fff;
  border-bottom: 0;
}

.speech-bubble.hidden {
  display: none;
}

@keyframes bubble-pop {
  from {
    opacity: 0;
    transform: translateX(-50%) scale(0.7);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) scale(1);
  }
}

.rub-hint {
  position: absolute;
  bottom: calc(28px + var(--safe-bottom));
  margin: 0;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(28, 43, 51, 0.65);
  color: #fff;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
}

.score-pop {
  position: absolute;
  pointer-events: none;
  color: var(--gold);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.4rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
  animation: score-fly 0.6s ease forwards;
  z-index: 4;
}

.score-pop.penalty {
  color: #ff3b30;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.45);
}

.yopi-bubble {
  position: absolute;
  z-index: 5;
  pointer-events: none;
  padding: 8px 12px;
  border-radius: 16px;
  background: #fff8e8;
  color: #c94434;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  white-space: nowrap;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
  animation: yopi-pop 0.7s ease forwards;
}

.yopi-bubble::after {
  content: "";
  position: absolute;
  left: 14px;
  bottom: -8px;
  border: 8px solid transparent;
  border-top-color: #fff8e8;
  border-bottom: 0;
}

@keyframes yopi-pop {
  0% {
    opacity: 0;
    transform: translateY(6px) scale(0.7);
  }
  20% {
    opacity: 1;
    transform: translateY(0) scale(1.05);
  }
  100% {
    opacity: 0;
    transform: translateY(-36px) scale(1);
  }
}

@keyframes score-fly {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(-40px) scale(1.2);
  }
}

/* ===== Result ===== */
#screen-result {
  justify-content: center;
}

.result-card {
  width: 100%;
  padding: 28px 22px;
  border-radius: 24px;
  background: rgba(247, 243, 234, 0.96);
  text-align: center;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
}

.result-card h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 900;
}

.result-score-label {
  margin: 18px 0 0;
  opacity: 0.65;
}

.final-score {
  margin: 4px 0 24px;
  font-family: var(--font-display);
  font-size: 4rem;
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
}

.score-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
}

.score-form label {
  font-weight: 700;
  font-size: 0.9rem;
}

.score-form input {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #d5cbb8;
  border-radius: 12px;
  font-family: inherit;
  font-size: 1.1rem;
  background: #fff;
  touch-action: manipulation;
}

.score-form input:focus {
  outline: none;
  border-color: var(--teal-soft);
}

.save-message {
  margin: 14px 0 0;
  font-size: 0.95rem;
  color: var(--teal);
  font-weight: 700;
}
