﻿/* styles.css: 誕生日謎解きサイトの華やかなモバイル対応スタイル。 */
:root {
  --bg: #fff5fb;
  --bg-strong: #ffd7ef;
  --card: rgba(255, 255, 255, 0.84);
  --card-strong: linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(255, 241, 249, 0.88));
  --ink: #351b40;
  --muted: #7c6484;
  --pink: #ff4fa0;
  --pink-strong: #ff2e7b;
  --peach: #ffae73;
  --gold: #ffda7f;
  --sky: #8ed3ff;
  --mint: #9cf0cf;
  --line: rgba(103, 48, 85, 0.12);
  --shadow: 0 30px 80px rgba(179, 77, 135, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: "Hiragino Sans", "Yu Gothic", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 219, 110, 0.45), transparent 18%),
    radial-gradient(circle at 88% 12%, rgba(255, 97, 166, 0.25), transparent 16%),
    radial-gradient(circle at 80% 72%, rgba(142, 211, 255, 0.32), transparent 18%),
    linear-gradient(180deg, #fff8fd 0%, #ffe6f4 46%, #ffdced 100%);
}

body::before,
body::after {
  position: fixed;
  inset: auto auto 10% -4%;
  width: 220px;
  height: 220px;
  content: "";
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0));
  filter: blur(10px);
  pointer-events: none;
}

body.access-locked {
  overflow: hidden;
}

body.access-locked .shell,
body.access-locked .background-ribbon,
body.access-locked .spark {
  filter: blur(12px);
  pointer-events: none;
  user-select: none;
}

.access-overlay {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  overflow: hidden;
  background:
    radial-gradient(circle at 15% 20%, rgba(255, 218, 127, 0.75), transparent 24%),
    radial-gradient(circle at 84% 78%, rgba(142, 211, 255, 0.65), transparent 25%),
    linear-gradient(145deg, #351b40, #792b63 48%, #ff5ba7);
  transition: opacity 500ms ease, visibility 500ms ease;
}

.access-overlay::before,
.access-overlay::after {
  position: absolute;
  width: 46vmax;
  height: 46vmax;
  content: "";
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  animation: access-orbit 12s linear infinite;
}

.access-overlay::before {
  top: -24vmax;
  right: -18vmax;
}

.access-overlay::after {
  bottom: -28vmax;
  left: -20vmax;
  animation-direction: reverse;
  animation-duration: 16s;
}

.access-overlay.hidden {
  visibility: hidden;
  opacity: 0;
}

.access-card {
  position: relative;
  z-index: 1;
  width: min(100%, 460px);
  padding: clamp(30px, 7vw, 52px);
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 36px;
  color: #351b40;
  text-align: center;
  background: rgba(255, 255, 255, 0.93);
  box-shadow: 0 30px 90px rgba(29, 8, 38, 0.38);
  backdrop-filter: blur(16px);
}

.access-card h1 {
  margin-bottom: 14px;
  font-size: clamp(2.3rem, 10vw, 4.2rem);
}

.access-keyhole {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  margin: 0 auto 20px;
  border-radius: 50%;
  color: #fff;
  font-size: 1.8rem;
  background: linear-gradient(145deg, var(--pink), var(--peach));
  box-shadow: 0 12px 28px rgba(255, 79, 160, 0.35);
  animation: keyhole-glow 2.4s ease-in-out infinite;
}

.access-copy {
  margin-bottom: 24px;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.8;
}

.access-form {
  display: grid;
  gap: 10px;
  text-align: left;
}

.access-form label {
  color: var(--pink-strong);
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.access-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border: 2px solid rgba(255, 79, 160, 0.22);
  border-radius: 16px;
  background: #fffafd;
}

.access-input-wrap:focus-within {
  border-color: var(--pink);
  box-shadow: 0 0 0 4px rgba(255, 79, 160, 0.13);
}

.access-input-wrap input {
  min-width: 0;
  width: 100%;
  padding: 15px 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  font: inherit;
  font-size: 1.18rem;
  letter-spacing: 0.16em;
  background: transparent;
}

.access-button {
  width: 100%;
  margin-top: 8px;
}

.access-feedback {
  min-height: 1.6em;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.access-feedback.is-error {
  color: #c42362;
}

.access-feedback.is-success {
  color: #148760;
}

.access-confetti span {
  position: absolute;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(1.3rem, 4vw, 2.8rem);
  animation: confetti-float 5s ease-in-out infinite;
}

.access-confetti span:nth-child(1) { top: 12%; left: 12%; }
.access-confetti span:nth-child(2) { top: 18%; right: 13%; animation-delay: 1s; }
.access-confetti span:nth-child(3) { bottom: 12%; left: 16%; animation-delay: 2s; }
.access-confetti span:nth-child(4) { right: 18%; bottom: 15%; animation-delay: 2.8s; }

@keyframes keyhole-glow {
  50% { transform: scale(1.08) rotate(10deg); box-shadow: 0 14px 38px rgba(255, 79, 160, 0.58); }
}

@keyframes confetti-float {
  50% { transform: translateY(-16px) rotate(18deg); }
}

@keyframes access-orbit {
  to { transform: rotate(360deg); }
}

body::after {
  inset: 8% -5% auto auto;
  width: 260px;
  height: 260px;
}

.background-ribbon,
.spark {
  position: fixed;
  pointer-events: none;
  z-index: 0;
}

.background-ribbon {
  width: 46vw;
  height: 16px;
  border-radius: 999px;
  opacity: 0.55;
  filter: blur(0.4px);
}

.ribbon-a {
  top: 100px;
  left: -10vw;
  transform: rotate(-14deg);
  background: linear-gradient(90deg, rgba(255, 79, 160, 0), rgba(255, 79, 160, 0.75), rgba(255, 174, 115, 0));
}

.ribbon-b {
  top: 440px;
  right: -12vw;
  transform: rotate(18deg);
  background: linear-gradient(90deg, rgba(142, 211, 255, 0), rgba(142, 211, 255, 0.8), rgba(156, 240, 207, 0));
}

.spark {
  width: 14px;
  height: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(255, 228, 244, 0.55));
  clip-path: polygon(50% 0%, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0% 50%, 38% 38%);
  animation: twinkle 3.6s ease-in-out infinite;
}

.spark-a {
  top: 140px;
  right: 16vw;
}

.spark-b {
  top: 520px;
  left: 12vw;
  animation-delay: 1.2s;
}

.spark-c {
  top: 780px;
  right: 10vw;
  animation-delay: 2.2s;
}

.shell {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100% - 28px));
  margin: 0 auto;
  padding: 24px 0 72px;
}

.card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 32px;
  background: var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.card::before {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.card-strong {
  background: var(--card-strong);
}

.eyebrow,
.panel-heading h2,
.answer-label,
.prompt-label {
  letter-spacing: 0.14em;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--pink-strong);
  font-size: 0.8rem;
  font-weight: 800;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 16px;
  font-size: clamp(2.8rem, 9vw, 5.4rem);
  line-height: 0.92;
}

h2 {
  margin-bottom: 10px;
  font-size: clamp(1.5rem, 4vw, 2.2rem);
}

.hero {
  display: grid;
  gap: 16px;
}

.hero-copy,
.dashboard-panel,
.mission-nav-panel,
.mission-panel,
.clear-panel {
  padding: 24px 20px;
}

.intro,
.mission-summary,
.mission-prompt,
.hint,
.clear-message {
  line-height: 1.9;
}

.hero-actions,
.action-grid,
.clear-grid,
.stamp-list,
.mission-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.banner-chip,
.mission-place,
.stamp-pill,
.mission-nav-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
}

.hero-actions {
  margin-top: 22px;
}

.hero-copy {
  min-height: 310px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.marquee-wrap {
  overflow: hidden;
  margin: 18px 0;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 79, 160, 0.92), rgba(255, 174, 115, 0.92), rgba(142, 211, 255, 0.92));
  color: #fff;
}

.marquee-track {
  display: flex;
  gap: 28px;
  white-space: nowrap;
  padding: 12px 0;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  animation: marquee 20s linear infinite;
}

.dashboard-grid,
.clear-grid {
  display: grid;
  gap: 16px;
}

.panel-heading {
  margin-bottom: 18px;
}

.route-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.route-list li {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(103, 48, 85, 0.08);
  font-weight: 700;
}

.stamp-pill {
  gap: 8px;
  padding: 12px 16px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 241, 196, 0.85));
  border: 1px solid rgba(255, 191, 75, 0.22);
  font-size: 0.92rem;
}

.stamp-pill::before {
  content: "★";
  color: var(--pink-strong);
}

.stamp-pill.is-empty {
  color: var(--muted);
  font-weight: 600;
}

.mission-nav {
  gap: 10px;
}

.mission-nav-button {
  padding: 12px 14px;
  border: 1px solid rgba(103, 48, 85, 0.12);
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  font-size: 0.86rem;
}

.mission-nav-button.is-active {
  background: linear-gradient(135deg, var(--pink), var(--pink-strong));
  color: #fff;
}

.mission-nav-button.is-locked {
  opacity: 0.45;
}

.mission-nav-button.is-cleared {
  border-color: rgba(255, 191, 75, 0.45);
  box-shadow: inset 0 0 0 1px rgba(255, 191, 75, 0.4);
}

.mission-panel {
  margin-top: 18px;
}

.mission-header {
  display: grid;
  gap: 18px;
  margin-bottom: 18px;
}

.mission-title {
  margin-bottom: 8px;
  font-size: clamp(1.45rem, 5vw, 2.3rem);
  font-weight: 900;
}

.mission-place {
  display: none;
}

.mission-progress-wrap {
  display: none;
}

.mission-place {
  padding: 8px 14px;
  background: rgba(255, 79, 160, 0.12);
  color: var(--pink-strong);
  font-size: 0.82rem;
}

.mission-progress-text {
  display: block;
  margin-bottom: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
}

.mission-progress-bar {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 79, 160, 0.1);
}

.mission-progress-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--pink), var(--peach), var(--gold));
  transition: width 0.45s ease;
}

.mission-banner,
.prompt-card,
.nested-card,
.stage-status-card,
.kasai-stage-card {
  padding: 18px;
  border-radius: 26px;
}

.mission-banner {
  display: none;
  margin-bottom: 16px;
  background: linear-gradient(135deg, rgba(255, 239, 248, 0.96), rgba(255, 246, 223, 0.94));
}

.mission-panel.show-mission-banner .mission-banner {
  display: block;
}

.banner-chip {
  margin-bottom: 12px;
  padding: 8px 12px;
  width: fit-content;
  background: rgba(255, 255, 255, 0.75);
  color: var(--pink-strong);
  font-size: 0.75rem;
}

.mission-banner-stage-meta {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(103, 48, 85, 0.08);
}

.mission-banner-stage-line,
.mission-banner-stage-note {
  margin-bottom: 6px;
  font-weight: 800;
}

.mission-banner-stage-note {
  margin-bottom: 0;
  color: var(--pink-strong);
}

.prompt-card {
  position: relative;
  overflow: hidden;
  margin-bottom: 16px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(236, 251, 255, 0.82));
}

.mission-panel.is-final-stage-question .prompt-card {
  border: 2px solid rgba(255, 174, 115, 0.58);
  background:
    radial-gradient(circle at 92% 18%, rgba(255, 217, 127, 0.42) 0 16%, transparent 16.5%),
    radial-gradient(circle at 8% 84%, rgba(142, 211, 255, 0.3) 0 12%, transparent 12.5%),
    linear-gradient(135deg, #fffdf2, #fff1e8 52%, #effaff);
  box-shadow: 0 12px 28px rgba(255, 146, 102, 0.16);
}

.mission-panel.is-final-stage-question .prompt-card::after {
  position: absolute;
  top: 16px;
  right: 18px;
  content: "FINAL MEMORY WALK";
  color: rgba(197, 106, 71, 0.75);
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.mission-panel.is-final-stage-question .mission-prompt {
  position: relative;
  z-index: 1;
  padding: 10px 8px 4px;
  color: #603a2f;
  font-family: "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-size: clamp(1.08rem, 3.8vw, 1.32rem);
  font-weight: 700;
  line-height: 2;
}

.mission-panel.is-final-stage-question .answer-form {
  padding: 18px;
  border: 1px dashed rgba(197, 106, 71, 0.38);
  border-radius: 22px;
  background: rgba(255, 250, 239, 0.72);
}

.mission-panel.is-final-stage-question .answer-input,
.mission-panel.is-final-stage-question input[type="text"] {
  border-color: rgba(255, 146, 102, 0.46);
  background: #fffdf8;
}

.mission-prompt {
  display: grid;
  gap: 16px;
}

.mission-letter {
  position: relative;
  overflow: hidden;
  padding: 24px 20px 20px;
  border: 1px solid rgba(126, 80, 51, 0.28);
  border-radius: 5px;
  color: #4d3425;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(126, 80, 51, 0.06) 0,
      rgba(126, 80, 51, 0.06) 1px,
      transparent 1px,
      transparent 30px
    ),
    linear-gradient(135deg, #fffdf4, #fff6dc);
  box-shadow: 4px 6px 0 rgba(126, 80, 51, 0.1), 0 10px 18px rgba(99, 61, 36, 0.1);
  transform: rotate(-0.4deg);
}

.mission-letter::before {
  position: absolute;
  top: 0;
  right: 20px;
  left: 20px;
  height: 5px;
  content: "";
  border-radius: 0 0 8px 8px;
  background: rgba(237, 111, 136, 0.48);
}

.mission-letter-2 {
  border-color: rgba(100, 89, 142, 0.3);
  background:
    repeating-linear-gradient(
      0deg,
      rgba(100, 89, 142, 0.055) 0,
      rgba(100, 89, 142, 0.055) 1px,
      transparent 1px,
      transparent 30px
    ),
    linear-gradient(135deg, #fcfbff, #f1efff);
  transform: rotate(0.45deg);
}

.mission-letter-2::before {
  background: rgba(123, 111, 194, 0.45);
}

.mission-letter-label {
  margin-bottom: 12px;
  color: #b25b70;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.mission-letter-body {
  margin-bottom: 0;
  white-space: pre-wrap;
  font-family: "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-size: clamp(0.96rem, 3.5vw, 1.08rem);
  line-height: 1.95;
}

.stage-status-card {
  margin-bottom: 16px;
  background: linear-gradient(135deg, rgba(255, 239, 248, 0.98), rgba(255, 248, 225, 0.96));
}

.stage-status-top {
  display: grid;
  gap: 14px;
}

.stage-intro {
  margin-bottom: 0;
}

.stage-score-card {
  padding: 14px 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.74);
  text-align: center;
}

.stage-score-card span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.stage-score-card strong {
  font-size: 1.1rem;
}

.stage-destination-note {
  margin: 14px 0 0;
  font-weight: 800;
  color: var(--pink-strong);
}

.stage-option-grid {
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
}

.kasai-stage-card {
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 240, 221, 0.92));
}

.kasai-entry-card {
  position: relative;
  overflow: hidden;
  padding: 16px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(103, 48, 85, 0.12);
}

.kasai-entry-icon {
  position: absolute;
  top: 12px;
  right: 14px;
  font-size: 2rem;
  line-height: 1;
  opacity: 0.82;
}

.kasai-theme-ferris-wheel {
  border-color: rgba(93, 156, 225, 0.38);
  background:
    radial-gradient(circle at 90% 0%, rgba(255, 218, 112, 0.75) 0 11%, transparent 11.5%),
    linear-gradient(180deg, #dff5ff 0%, #fbfdff 68%);
}

.kasai-theme-cafe {
  border-color: rgba(164, 103, 61, 0.38);
  background:
    radial-gradient(circle at 91% 10%, rgba(255, 255, 255, 0.8) 0 4%, transparent 4.5%),
    linear-gradient(135deg, #fff0d9, #fffaf2);
}

.kasai-theme-aquarium {
  border-color: rgba(61, 145, 192, 0.42);
  color: #174866;
  background:
    radial-gradient(circle at 8% 24%, rgba(255, 255, 255, 0.65) 0 3%, transparent 3.5%),
    radial-gradient(circle at 16% 12%, rgba(255, 255, 255, 0.5) 0 2%, transparent 2.5%),
    linear-gradient(135deg, #d9f7ff, #effdff 65%, #d6f0ff);
}

.kasai-entry-card h3 {
  margin-bottom: 8px;
  font-size: 1rem;
}

.kasai-entry-display {
  margin-bottom: 8px;
  font-weight: 700;
  line-height: 1.7;
  word-break: break-all;
}

.kasai-mask-char {
  display: inline-block;
  min-width: 1.05em;
  text-align: center;
  margin-right: 0.08em;
}

.kasai-mask-char.is-highlighted {
  border-bottom: 3px solid #ff2e3f;
  padding-bottom: 0.08em;
}

.kasai-entry-meta {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

.kasai-entry-card label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--pink-strong);
}

.stage-option-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 24px;
  border: 1px solid rgba(103, 48, 85, 0.12);
  background: rgba(255, 255, 255, 0.8);
  text-align: left;
}

.photo-quiz-grid .stage-option-card {
  min-height: 100%;
  border-color: rgba(127, 86, 49, 0.23);
  background: linear-gradient(145deg, #fffaf0, #fff);
  box-shadow: 3px 5px 0 rgba(127, 86, 49, 0.1);
}

.photo-frame {
  display: block;
  padding: 8px 8px 26px;
  border: 1px solid rgba(127, 86, 49, 0.22);
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 8px 16px rgba(73, 49, 30, 0.15);
  transform: rotate(-1deg);
}

.photo-quiz-grid .stage-option-card:nth-child(even) .photo-frame {
  transform: rotate(1deg);
}

.stage-option-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 1px;
  filter: saturate(0.94) contrast(1.03);
}

.stage-option-key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--pink), var(--peach));
  color: #fff;
  font-weight: 800;
}

.stage-option-card span:last-child {
  font-weight: 700;
  line-height: 1.6;
}

.prompt-label {
  margin-bottom: 10px;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--pink-strong);
}

.answer-form {
  display: grid;
  gap: 12px;
  margin: 0 0 14px;
}

.answer-label {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--muted);
}

input[type="text"] {
  width: 100%;
  padding: 16px 18px;
  border: 1px solid rgba(103, 48, 85, 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font-size: 1rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

button {
  border: 0;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 800;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

button:hover {
  transform: translateY(-1px);
}

button:disabled {
  opacity: 0.45;
  cursor: default;
  transform: none;
}

.primary-button,
.secondary-button,
.ghost-button {
  padding: 14px 18px;
  border-radius: 999px;
}

.primary-button {
  color: #fff;
  background: linear-gradient(135deg, var(--pink) 0%, var(--pink-strong) 42%, var(--peach) 100%);
  box-shadow: 0 14px 30px rgba(255, 79, 160, 0.28);
}

.secondary-button {
  color: var(--pink-strong);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(255, 233, 243, 0.94));
  border: 1px solid rgba(255, 79, 160, 0.14);
}

.ghost-button {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(103, 48, 85, 0.12);
}

.action-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}

.action-grid-end {
  margin-top: 10px;
  justify-content: flex-end;
}

.hint {
  margin-bottom: 12px;
  padding: 14px 16px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255, 247, 210, 0.95), rgba(255, 237, 247, 0.92));
}

.result-message {
  min-height: 1.8em;
  margin-bottom: 10px;
  font-weight: 800;
}

.result-message.is-success {
  color: #0b8d62;
}

.result-message.is-error {
  color: #c33f61;
}

.success-stamp-card {
  margin-top: 10px;
  padding: 16px 18px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(255, 242, 199, 0.96), rgba(255, 220, 237, 0.92));
  color: var(--ink);
  font-weight: 800;
}

.success-stamp-card strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1.15rem;
}

.clear-panel {
  margin-top: 18px;
  text-align: center;
}

.clear-message {
  max-width: 660px;
  margin: 0 auto 20px;
  font-size: 1.05rem;
}

.nested-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 240, 248, 0.9));
  border: 1px solid rgba(103, 48, 85, 0.08);
  box-shadow: none;
}

.gojuon-table {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.gojuon-cell {
  min-height: 56px;
  padding: 8px 6px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(103, 48, 85, 0.08);
  text-align: center;
}

.gojuon-cell strong {
  display: block;
  margin-bottom: 4px;
}

.celebration-overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(49, 22, 53, 0.36);
  backdrop-filter: blur(4px);
  z-index: 20;
}

.celebration-card {
  position: relative;
  z-index: 2;
  width: min(92vw, 420px);
  padding: 28px 24px;
  border-radius: 28px;
  text-align: center;
  color: #fff;
  background: linear-gradient(145deg, rgba(255, 79, 160, 0.96), rgba(255, 174, 115, 0.95));
  box-shadow: 0 30px 90px rgba(152, 35, 86, 0.38);
  animation: celebrationPop 0.5s ease;
}

.celebration-burst {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.celebration-piece {
  position: absolute;
  top: -24px;
  width: 12px;
  height: 20px;
  border-radius: 999px;
  opacity: 0;
  animation: confettiFall 1.6s ease forwards;
}

.retry-overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(49, 22, 53, 0.42);
  backdrop-filter: blur(6px);
  z-index: 30;
}

.retry-card {
  width: min(92vw, 420px);
  padding: 28px 24px;
  border-radius: 28px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(255, 239, 248, 0.96));
  box-shadow: 0 30px 90px rgba(109, 43, 78, 0.24);
  text-align: center;
}

.retry-card h2 {
  margin-bottom: 12px;
}

.retry-card p {
  margin-bottom: 18px;
  line-height: 1.8;
}

.hidden {
  display: none;
}

@keyframes twinkle {
  0%,
  100% {
    opacity: 0.3;
    transform: scale(0.85);
  }
  50% {
    opacity: 1;
    transform: scale(1.2);
  }
}

@keyframes marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-40%);
  }
}

@keyframes celebrationPop {
  from {
    opacity: 0;
    transform: scale(0.82) translateY(18px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes confettiFall {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) rotate(0deg);
  }
  10% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--drift-x), 110vh, 0) rotate(var(--spin));
  }
}

@media (min-width: 768px) {
  .shell {
    padding-top: 36px;
    padding-bottom: 90px;
  }

  .dashboard-grid,
  .clear-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .action-grid-end .primary-button {
    width: auto;
    min-width: 240px;
  }

  .mission-header {
    grid-template-columns: minmax(0, 1fr) 280px;
    align-items: end;
  }

  .stage-status-top {
    grid-template-columns: minmax(0, 1fr) 230px;
    align-items: start;
  }

  .stage-option-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-copy,
  .dashboard-panel,
  .mission-nav-panel,
  .mission-panel,
  .clear-panel {
    padding: 32px 30px;
  }
}
