:root {
  --ink: #15364a;
  --sea: #2f8ba9;
  --sky: #d9eff3;
  --paper: #fff8ec;
  --sand: #eadcc5;
  --red: #b5332d;
  --red-dark: #7c211f;
  --text: #1f2629;
  --muted: #68757a;
  --line: rgba(21, 54, 74, 0.16);
  --shadow: 0 22px 70px rgba(21, 54, 74, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--paper);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  background:
    linear-gradient(110deg, rgba(217, 239, 243, 0.9), transparent 36%),
    linear-gradient(245deg, rgba(181, 51, 45, 0.12), transparent 40%),
    var(--paper);
  user-select: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.copy-mark {
  position: fixed;
  right: 22px;
  bottom: 18px;
  z-index: 50;
  color: rgba(21, 54, 74, 0.11);
  font-family: Arial, sans-serif;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.18em;
  pointer-events: none;
  user-select: none;
}

.copy-mark.is-enhanced {
  color: rgba(21, 54, 74, 0.18);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.is-protected-content .story-copy,
.is-protected-content .scene-text,
.is-protected-content .mei-letter-body,
.is-protected-content .culture-panel {
  user-select: none;
  -webkit-user-select: none;
}

.is-protected-content img {
  -webkit-user-drag: none;
  user-drag: none;
}

body.is-locked {
  overflow: hidden;
}

.access-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background:
    linear-gradient(115deg, rgba(217, 239, 243, 0.94), rgba(255, 248, 236, 0.9)),
    var(--paper);
}

.access-screen.is-hidden {
  display: none;
}

.intro-screen {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 22px;
  background:
    linear-gradient(120deg, rgba(255, 248, 236, 0.96), rgba(217, 239, 243, 0.92)),
    var(--paper);
}

.intro-screen.is-hidden {
  display: none;
}

.access-card {
  width: min(430px, 100%);
  max-height: calc(100vh - 32px);
  padding: 22px;
  overflow-y: auto;
  background: rgba(255, 248, 236, 0.94);
  border: 1px solid rgba(21, 54, 74, 0.18);
  border-radius: 8px;
  box-shadow: var(--shadow);
  text-align: center;
}

.intro-card {
  width: min(560px, 100%);
  display: grid;
  gap: 16px;
  justify-items: center;
  padding: 30px;
  border: 1px solid rgba(21, 54, 74, 0.18);
  border-radius: 8px;
  background: rgba(255, 248, 236, 0.92);
  box-shadow: var(--shadow);
  text-align: center;
}

.intro-card img {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid rgba(181, 51, 45, 0.26);
}

.intro-card h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(38px, 7vw, 66px);
  line-height: 1;
}

.intro-card p:not(.kicker) {
  max-width: 390px;
  margin: 0;
  color: #314249;
  font-size: 18px;
  line-height: 1.45;
}

.intro-itinerary {
  width: min(370px, 100%);
  border: 1px solid rgba(21, 54, 74, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 14px 28px rgba(21, 54, 74, 0.1);
}

.intro-copy {
  display: grid;
  gap: 10px;
}

.intro-copy p {
  opacity: 0;
  transform: translateY(8px);
  animation: introFade 520ms ease forwards;
}

.intro-copy p:nth-child(2) {
  animation-delay: 180ms;
}

.intro-copy p:nth-child(3) {
  animation-delay: 360ms;
}

.intro-card .primary-button {
  animation: introFade 520ms ease 520ms forwards;
  opacity: 0;
}

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

.access-card img {
  width: 58px;
  height: 58px;
  margin-bottom: 8px;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid rgba(181, 51, 45, 0.26);
}

.access-card h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(34px, 7vw, 52px);
  line-height: 1;
}

.access-copy {
  margin: 10px auto 14px;
  max-width: 340px;
  color: #314249;
  font-size: 16px;
  line-height: 1.38;
}

.login-form {
  display: grid;
  gap: 9px;
  text-align: left;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 12px 0 12px;
}

.auth-tab {
  min-height: 40px;
  border: 1px solid rgba(132, 28, 26, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font-family: Arial, sans-serif;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
}

.auth-tab.is-active {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
  box-shadow: 0 10px 24px rgba(183, 49, 45, 0.18);
}

.auth-status {
  min-height: 22px;
  margin: 8px 0 0;
  color: #5f6a70;
  font-size: 0.94rem;
  line-height: 1.35;
}

.login-form label.is-muted {
  opacity: 0.72;
}

.login-form label {
  display: grid;
  gap: 4px;
  color: var(--ink);
  font-family: Arial, sans-serif;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.login-form input {
  height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(21, 54, 74, 0.2);
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  outline: none;
  text-transform: none;
  letter-spacing: 0;
}

.login-form input:focus {
  border-color: var(--sea);
  box-shadow: 0 0 0 3px rgba(47, 139, 169, 0.15);
}

.contact-link {
  display: inline-block;
  margin-top: 16px;
  color: var(--red-dark);
  font-family: Arial, sans-serif;
  font-size: 13px;
  font-weight: 900;
}

.legal-links {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 10px;
  font-family: Arial, sans-serif;
  font-size: 12px;
  font-weight: 800;
}

.legal-links a {
  color: #5f6a70;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px clamp(16px, 3vw, 34px);
  background: rgba(255, 248, 236, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand img {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid rgba(181, 51, 45, 0.26);
}

.brand p,
.kicker {
  margin: 0 0 6px;
  color: var(--red);
  font-family: Arial, sans-serif;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.brand h1,
.story-card h2,
.passport-cover h2,
.stamp-dialog h2 {
  margin: 0;
  color: var(--ink);
  line-height: 1.04;
  letter-spacing: 0;
}

.brand h1 {
  font-size: clamp(26px, 3.4vw, 42px);
}

.header-actions,
.story-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.traveler-summary {
  min-height: 54px;
  min-width: 210px;
  display: grid;
  align-content: center;
  gap: 2px;
  padding: 8px 14px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(21, 54, 74, 0.15);
  border-radius: 8px;
}

.traveler-summary span,
.traveler-summary strong,
.traveler-summary small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.traveler-summary span {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.05;
}

.traveler-summary strong,
.traveler-summary small {
  font-family: Arial, sans-serif;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.traveler-summary strong {
  color: var(--red);
}

.traveler-summary small {
  color: var(--muted);
}

.layout {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 18px clamp(14px, 3vw, 34px) 32px;
}

.map-card,
.story-card,
.passport-card {
  background: rgba(255, 248, 236, 0.84);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.map-card {
  padding: 16px;
}

.map-drawer,
.passport-drawer {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
}

.map-drawer.is-open,
.passport-drawer.is-open {
  display: block;
}

.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(21, 54, 74, 0.28);
  backdrop-filter: blur(4px);
}

.map-drawer .map-card {
  position: absolute;
  top: 88px;
  right: clamp(14px, 3vw, 34px);
  width: min(380px, calc(100% - 28px));
  max-height: calc(100vh - 112px);
  overflow: auto;
  background: rgba(255, 248, 236, 0.97);
}

.passport-drawer .passport-card {
  position: absolute;
  top: 88px;
  right: clamp(14px, 3vw, 34px);
  width: min(420px, calc(100% - 28px));
  max-height: calc(100vh - 112px);
  overflow: auto;
  background: rgba(255, 248, 236, 0.97);
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.drawer-head .kicker {
  margin: 0;
}

.day-list {
  display: grid;
  gap: 9px;
}

.day-card {
  width: 100%;
  min-height: 72px;
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 10px;
  align-items: center;
  padding: 9px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(21, 54, 74, 0.13);
  border-radius: 7px;
  text-align: left;
}

.day-card:disabled {
  cursor: not-allowed;
  opacity: 0.72;
}

.day-card.is-active {
  color: #fff;
  background: var(--red);
  border-color: var(--red);
}

.day-card.is-complete .day-number {
  color: #fff;
  background: var(--red);
}

.day-card.is-locked {
  opacity: 0.62;
}

.day-card.is-locked .day-status {
  color: var(--red-dark);
}

.day-card.is-active .day-number {
  color: var(--red);
  background: #fff;
}

.day-number {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--ink);
  background: var(--sky);
  font-family: Arial, sans-serif;
  font-weight: 900;
}

.day-title,
.day-status {
  display: block;
  font-family: Arial, sans-serif;
}

.day-title {
  font-size: 13px;
  font-weight: 900;
  line-height: 1.2;
}

.day-status {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.day-card.is-active .day-status {
  color: rgba(255, 255, 255, 0.8);
}

.stage {
  min-width: 0;
  display: grid;
  gap: 0;
}

.scene-card {
  display: grid;
  grid-template-columns: 1fr;
  background: rgba(255, 248, 236, 0.72);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.stage-image {
  position: relative;
  overflow: hidden;
  background: #efe7d8;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.stage-image img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
  min-height: 0;
  max-height: min(72vh, 840px);
  margin: 0 auto;
  display: block;
  object-fit: contain;
  object-position: center center;
}

.stage-image img[hidden] {
  display: none;
}

.scene-card.is-video-mode {
  grid-template-columns: 1fr;
}

.scene-card.is-video-mode .stage-image {
  min-height: calc(100vh - 132px);
  background: #071923;
}

.scene-card.is-video-mode .weather-card {
  opacity: 0.82;
}

.stage-image.is-video-finished img {
  animation: sceneReveal 520ms ease both;
}

.scene-hotspots {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  z-index: 4;
  pointer-events: none;
}

.scene-hotspots[hidden] {
  display: none;
}

.image-hotspot {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  max-width: 128px;
  padding: 5px 9px 5px 5px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 999px;
  color: #fff;
  background: rgba(21, 54, 74, 0.72);
  box-shadow: 0 10px 24px rgba(21, 54, 74, 0.18);
  backdrop-filter: blur(8px);
  pointer-events: auto;
  transform: translate(-50%, -50%);
  animation: hotspotPulse 2.6s ease-in-out infinite;
}

.image-hotspot span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  color: var(--red);
  background: #fff;
  font-family: Arial, sans-serif;
  font-size: 12px;
  font-weight: 900;
}

.image-hotspot strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #fff;
  font-family: Arial, sans-serif;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.image-hotspot.is-selected {
  background: var(--red);
  animation: none;
}

.image-hotspot.is-visited {
  background: rgba(181, 51, 45, 0.82);
}

@keyframes hotspotPulse {
  0%, 100% {
    box-shadow: 0 10px 24px rgba(21, 54, 74, 0.18);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(181, 51, 45, 0.08), 0 10px 24px rgba(21, 54, 74, 0.18);
  }
}

@keyframes budgetPulse {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-2px);
  }
}

.detail-card {
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 5;
  width: min(320px, calc(100% - 36px));
  max-height: min(72vh, 520px);
  overflow: auto;
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid rgba(21, 54, 74, 0.16);
  border-radius: 8px;
  background: rgba(255, 248, 236, 0.96);
  box-shadow: 0 16px 30px rgba(21, 54, 74, 0.2);
}

.detail-card[hidden] {
  display: none;
}

.detail-card h3,
.guide-dialogue p {
  margin: 0;
}

.detail-card h3 {
  color: var(--ink);
  font-size: 24px;
  line-height: 1.1;
}

.detail-card p:not(.kicker) {
  color: #314249;
  font-size: 15px;
  line-height: 1.5;
}

.detail-fact {
  padding-top: 8px;
  border-top: 1px solid rgba(21, 54, 74, 0.1);
}

.guide-panel {
  position: fixed;
  left: clamp(14px, 2vw, 28px);
  bottom: 18px;
  z-index: 70;
  width: min(520px, calc(100% - 28px));
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 14px;
  align-items: end;
}

.guide-panel[hidden] {
  display: none;
}

.guide-panel.is-visible {
  animation: guideFade 240ms ease both;
}

.guide-panel img {
  width: 100%;
  max-height: 280px;
  object-fit: contain;
  object-position: bottom center;
  filter: drop-shadow(0 14px 22px rgba(21, 54, 74, 0.18));
}

.guide-dialogue {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid rgba(21, 54, 74, 0.14);
  border-radius: 14px 14px 14px 4px;
  background: rgba(255, 248, 236, 0.97);
  box-shadow: 0 18px 32px rgba(21, 54, 74, 0.18);
}

.guide-dialogue #guideText {
  min-height: 88px;
  color: #314249;
  font-size: 17px;
  line-height: 1.55;
}

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

@keyframes sceneReveal {
  from {
    filter: blur(8px);
    opacity: 0.1;
    transform: scale(1.02);
  }
  to {
    filter: blur(0);
    opacity: 1;
    transform: scale(1);
  }
}

.stage-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(21, 54, 74, 0.16), transparent 26%);
  pointer-events: none;
}

.stage-image.effect-water::after {
  background:
    linear-gradient(0deg, rgba(21, 54, 74, 0.18), transparent 28%),
    repeating-linear-gradient(100deg, transparent 0 18px, rgba(255, 255, 255, 0.08) 19px 21px, transparent 22px 46px);
  animation: waterShimmer 5.8s ease-in-out infinite;
}

.stage-image.effect-water img {
  animation: waterImageBreath 7s ease-in-out infinite;
}

.stage-image.effect-steam::after {
  background:
    radial-gradient(ellipse at 50% 62%, rgba(255, 255, 255, 0.56), transparent 30%),
    radial-gradient(ellipse at 42% 52%, rgba(255, 255, 255, 0.32), transparent 24%),
    radial-gradient(ellipse at 60% 48%, rgba(255, 255, 255, 0.2), transparent 22%),
    linear-gradient(0deg, rgba(21, 54, 74, 0.1), transparent 30%);
  animation: steamDrift 3.8s ease-in-out infinite;
}

.stage-image.effect-steam img {
  animation: steamImageWarmth 6s ease-in-out infinite;
}

.stage-image.effect-lanterns::after {
  background:
    radial-gradient(circle at 78% 20%, rgba(255, 179, 92, 0.34), transparent 16%),
    radial-gradient(circle at 88% 24%, rgba(255, 179, 92, 0.26), transparent 12%),
    radial-gradient(circle at 70% 16%, rgba(255, 179, 92, 0.22), transparent 10%),
    linear-gradient(0deg, rgba(21, 54, 74, 0.16), transparent 26%);
  animation: lanternFloat 4.4s ease-in-out infinite;
}

.stage-image.effect-hanabi::after {
  background:
    radial-gradient(circle at 22% 18%, rgba(255, 196, 92, 0.34), transparent 12%),
    radial-gradient(circle at 48% 12%, rgba(255, 120, 72, 0.28), transparent 10%),
    radial-gradient(circle at 72% 20%, rgba(255, 214, 120, 0.24), transparent 11%),
    radial-gradient(circle at 36% 28%, rgba(255, 255, 255, 0.16), transparent 8%),
    linear-gradient(0deg, rgba(21, 54, 74, 0.14), transparent 28%);
  animation: hanabiPulse 2.8s ease-in-out infinite;
}

.stage-image.effect-hanabi img {
  animation: hanabiImageGlow 3.6s ease-in-out infinite;
}

.stage-image.is-landscape-finale {
  aspect-ratio: 16 / 9;
  min-height: min(62vh, 560px);
}

.stage-image.is-landscape-finale img {
  object-fit: cover;
  object-position: center;
}

.stage-image::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--media-mask-bottom, 0px);
  background: #efe7d8;
  pointer-events: none;
}

@keyframes waterShimmer {
  0%, 100% {
    opacity: 0.72;
    transform: translateX(0);
  }
  50% {
    opacity: 0.94;
    transform: translateX(12px);
  }
}

@keyframes waterImageBreath {
  0%, 100% {
    filter: saturate(1);
  }
  50% {
    filter: saturate(1.08) brightness(1.02);
  }
}

@keyframes steamDrift {
  0%, 100% {
    opacity: 0.54;
    transform: translateY(10px) scale(0.98);
  }
  50% {
    opacity: 0.86;
    transform: translateY(-12px) scale(1.03);
  }
}

@keyframes steamImageWarmth {
  0%, 100% {
    filter: saturate(1.02);
  }
  50% {
    filter: saturate(1.1) brightness(1.03);
  }
}

.video-overlay {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: grid;
  place-items: center;
  background: rgba(7, 25, 35, 0.92);
}

.video-overlay[hidden] {
  display: none;
}

.video-shell {
  position: relative;
  width: min(1100px, calc(100vw - 40px));
}

.video-player {
  width: 100%;
  max-height: calc(100vh - 40px);
  background: #071923;
  object-fit: contain;
}

.video-watermark-mask {
  position: absolute;
  right: 18px;
  bottom: 42px;
  width: min(220px, 24vw);
  height: 34px;
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(7, 25, 35, 0.15), rgba(7, 25, 35, 0.84)),
    rgba(7, 25, 35, 0.78);
  box-shadow: 0 0 24px rgba(7, 25, 35, 0.38);
  backdrop-filter: blur(8px);
  pointer-events: none;
}

.weather-card {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 2;
  min-width: 148px;
  padding: 9px 11px;
  color: #fff;
  background: rgba(21, 54, 74, 0.54);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  backdrop-filter: blur(10px);
}

.weather-card span,
.weather-card small {
  display: block;
  font-family: Arial, sans-serif;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.weather-card span,
.weather-card small {
  font-size: 9px;
}

.weather-card strong {
  display: block;
  margin: 3px 0;
  font-size: 22px;
  line-height: 1;
}

.weather-card.is-budget-card {
  background:
    linear-gradient(135deg, rgba(21, 54, 74, 0.8), rgba(181, 51, 45, 0.66));
  box-shadow: 0 12px 28px rgba(181, 51, 45, 0.18);
  animation: budgetPulse 1600ms ease-in-out infinite;
}

.story-card {
  display: grid;
  align-content: start;
  gap: 16px;
  padding: clamp(20px, 2.7vw, 34px);
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: rgba(255, 248, 236, 0.9);
}

.progress-line {
  display: flex;
  gap: 7px;
  margin-bottom: 2px;
}

.scene-dot {
  width: 100%;
  height: 5px;
  border-radius: 99px;
  background: rgba(21, 54, 74, 0.14);
}

.scene-dot.is-done,
.scene-dot.is-active {
  background: var(--red);
}

.story-card h2 {
  max-width: 980px;
  font-size: clamp(34px, 3.8vw, 54px);
}

.scene-text {
  max-width: 920px;
  margin: 16px 0 0;
  color: #314249;
  font-size: clamp(19px, 1.9vw, 24px);
  line-height: 1.68;
}

.story-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: start;
}

.story-body.no-culture {
  grid-template-columns: 1fr;
}

.culture-panel {
  max-width: 520px;
  padding: 14px 0 0;
  border-top: 2px solid rgba(181, 51, 45, 0.22);
  border-left: 0;
}

.culture-button {
  width: 100%;
  min-height: 38px;
  color: var(--red-dark);
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(181, 51, 45, 0.2);
  border-radius: 7px;
  font-family: Arial, sans-serif;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.culture-panel p {
  display: none;
  margin: 12px 0 0;
  color: #405057;
  font-size: 17px;
  line-height: 1.58;
  white-space: pre-line;
}

.culture-panel.is-open p {
  display: block;
}

.interaction {
  min-height: 0;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  max-width: 980px;
}

.interaction:empty {
  display: none;
}

.choice-grid,
.hotspot-grid,
.check-grid,
.memory-options {
  display: grid;
  gap: 8px;
}

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

.hotspot-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.check-grid,
.memory-options {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.visual-choice-grid,
.product-grid,
.word-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
}

.product-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.visual-choice-card,
.word-card {
  min-height: 100%;
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(21, 54, 74, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--ink);
  text-align: left;
  font-family: Arial, sans-serif;
  box-shadow: 0 10px 22px rgba(21, 54, 74, 0.06);
}

.visual-choice-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  padding: 10px;
  object-fit: contain;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.72);
}

.visual-choice-card .fact-note {
  padding: 8px 10px;
  border-radius: 6px;
  background: rgba(181, 51, 45, 0.06);
  color: #5a4a43;
  font-size: 13px;
  line-height: 1.45;
}

.visual-choice-card strong,
.word-card strong {
  font-size: 18px;
  line-height: 1.28;
}

.visual-choice-card em {
  color: var(--red-dark);
  font-family: Arial, sans-serif;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.visual-choice-card span,
.word-card span {
  color: #46565d;
  font-size: 15px;
  line-height: 1.5;
}

.visual-choice-card .choice-origin {
  padding-top: 8px;
  border-top: 1px solid rgba(21, 54, 74, 0.1);
  color: var(--ink);
  font-family: Arial, sans-serif;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

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

.word-actions .ghost-button,
.word-actions .primary-button {
  min-height: 40px;
}

.visual-choice-card.is-selected,
.word-card.is-selected {
  border-color: var(--red);
  background: rgba(181, 51, 45, 0.08);
}

.phrase-practice {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: start;
  padding: 14px;
  border: 1px solid rgba(181, 51, 45, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
}

.phrase-copy {
  display: grid;
  gap: 8px;
}

.phrase-line {
  display: grid;
  grid-template-columns: minmax(110px, auto) 1fr;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid rgba(21, 54, 74, 0.08);
}

.phrase-copy strong {
  color: var(--ink);
  font-size: 24px;
  line-height: 1.1;
  word-break: keep-all;
}

.phrase-copy span {
  color: #405057;
  font-size: 14px;
  font-weight: 700;
}

.phrase-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-start;
}

.phrase-actions .text-button,
.phrase-actions .ghost-button,
.phrase-actions .primary-button {
  width: auto;
  min-height: 38px;
  margin: 0;
  padding: 0 12px;
}

.recorded-audio {
  width: 100%;
  grid-column: 1 / -1;
}

.cooking-card {
  display: grid;
  gap: 10px;
}

.cooking-step {
  display: grid;
  gap: 9px;
  padding: 13px;
  border: 1px solid rgba(21, 54, 74, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
}

.cooking-step.is-done {
  border-color: rgba(181, 51, 45, 0.28);
  background: rgba(181, 51, 45, 0.06);
}

.cooking-step-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  font-family: Arial, sans-serif;
}

.cooking-step-head strong {
  color: var(--ink);
  font-size: 15px;
  font-weight: 900;
}

.cooking-step-head span {
  color: var(--red-dark);
  font-size: 12px;
  font-weight: 900;
}

.cooking-step p {
  margin: 0;
  color: #3c4d54;
  font-size: 15px;
  line-height: 1.45;
}

.cooking-gesture-pad {
  min-height: 154px;
  border: 1px dashed rgba(21, 54, 74, 0.28);
  border-radius: 8px;
  background:
    radial-gradient(circle at 18% 50%, rgba(181, 51, 45, 0.12), transparent 28%),
    rgba(255, 255, 255, 0.58);
  display: grid;
  grid-template-columns: 42px 1fr;
  grid-template-rows: auto auto minmax(92px, 1fr);
  gap: 4px 12px;
  align-items: start;
  padding: 12px;
  cursor: grab;
  touch-action: none;
  user-select: none;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.cooking-gesture-pad:focus-visible {
  outline: 3px solid rgba(181, 51, 45, 0.3);
  outline-offset: 2px;
}

.cooking-gesture-pad.is-active {
  cursor: grabbing;
  transform: scale(0.99);
  border-color: rgba(181, 51, 45, 0.58);
  background: rgba(181, 51, 45, 0.1);
}

.cooking-gesture-pad.is-done {
  cursor: default;
  border-style: solid;
  border-color: rgba(181, 51, 45, 0.34);
  background: rgba(181, 51, 45, 0.08);
}

.cooking-gesture-pad.is-waiting {
  cursor: wait;
  opacity: 0.78;
}

.gesture-icon {
  grid-row: 1 / 3;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff8ec;
  color: var(--red-dark);
  font-family: Georgia, serif;
  font-size: 24px;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(181, 51, 45, 0.16);
}

.cooking-gesture-pad strong {
  color: var(--ink);
  font-size: 15px;
  font-weight: 900;
}

.cooking-gesture-pad small {
  color: #5d6a6f;
  font-size: 13px;
  line-height: 1.35;
}

.gesture-progress {
  font-weight: 700;
  color: #8c3b34;
}

.cooking-workspace {
  grid-column: 1 / -1;
  position: relative;
  min-height: 94px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(21, 54, 74, 0.1);
  background:
    linear-gradient(180deg, rgba(255, 249, 240, 0.92), rgba(240, 229, 206, 0.92)),
    repeating-linear-gradient(90deg, rgba(111, 84, 54, 0.06) 0 16px, transparent 16px 32px);
  --hold: 0%;
}

.workspace-scene,
.workspace-trail {
  position: absolute;
  inset: 0;
}

.workspace-hand {
  position: absolute;
  left: 24px;
  top: 24px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  font-size: 22px;
  filter: drop-shadow(0 3px 6px rgba(21, 54, 74, 0.22));
  pointer-events: none;
}

.workspace-trail .trail-dot {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(43, 57, 61, 0.28);
  transform: translate(-50%, -50%);
}

.prop-board,
.prop-cucumber,
.prop-slices,
.prop-knife,
.prop-bowl,
.prop-sauce,
.prop-whisk,
.prop-clock,
.prop-sprinkle {
  position: absolute;
}

.prop-board {
  inset: 18px 16px 18px 16px;
  border-radius: 10px;
  background: linear-gradient(180deg, #e4c89b, #d6b383);
  box-shadow: inset 0 0 0 1px rgba(121, 83, 43, 0.18);
}

.prop-cucumber {
  left: 24px;
  top: 38px;
  width: 116px;
  height: 20px;
  border-radius: 999px;
  background: linear-gradient(180deg, #5f8c44, #477133);
}

.prop-slices {
  right: 34px;
  top: 33px;
  width: 58px;
  height: 30px;
}

.prop-slices .slice-piece {
  position: absolute;
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, rgba(239, 255, 226, 0.95) 0 4px, rgba(181, 217, 165, 0.92) 4px 7px, #5c8743 7px 100%);
  box-shadow: 0 3px 6px rgba(21, 54, 74, 0.12);
}

.prop-knife {
  left: 54px;
  top: 62px;
  width: 42px;
  height: 10px;
  border-radius: 3px;
  background: linear-gradient(90deg, #5a3d2d 0 12px, #cfd6d8 12px 100%);
}

.prop-bowl {
  left: 50%;
  top: 54%;
  width: 116px;
  height: 56px;
  transform: translate(-50%, -50%);
  border-radius: 0 0 58px 58px;
  background: linear-gradient(180deg, #e9f1f2, #c3d4d8);
  box-shadow: inset 0 -6px 0 rgba(90, 111, 120, 0.18);
}

.prop-bowl.is-resting::after {
  content: "";
  position: absolute;
  inset: -16px 16px auto 16px;
  height: 24px;
  border-radius: 50%;
  border: 3px solid rgba(181, 51, 45, 0.18);
  clip-path: inset(0 0 45% 0);
}

.prop-bowl.is-breathing::after {
  animation: bowl-rest 1.1s ease-in-out infinite;
}

.prop-sauce {
  left: 50%;
  top: 45%;
  width: 82px;
  height: 28px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background:
    repeating-radial-gradient(circle at 50% 50%, rgba(255,255,255,0.28) 0 4px, transparent 4px calc(8px + var(--swirl) * 1px)),
    radial-gradient(circle at 45% 35%, #f6f0d8, #d4b26f);
  opacity: calc(0.76 + var(--mix) * 0.24);
}

.prop-whisk {
  left: 50%;
  top: 48%;
  width: 44px;
  height: 6px;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  background: linear-gradient(90deg, #6d4d39 0 20px, #e8d7ba 20px 100%);
}

.prop-clock {
  right: 18px;
  top: 18px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background:
    conic-gradient(rgba(181, 51, 45, 0.68) 0 var(--hold), rgba(255,255,255,0.55) var(--hold) 100%);
  box-shadow: inset 0 0 0 4px rgba(255,255,255,0.8);
}

.prop-sprinkle {
  left: 50%;
  top: 26px;
  width: 100px;
  height: 52px;
  transform: translateX(-50%);
}

.prop-sprinkle .grain {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  transform: scale(calc(0.9 + var(--drop) * 0.4));
}

.prop-sprinkle.is-salt .grain {
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 0 1px rgba(180, 190, 198, 0.18);
}

.prop-sprinkle.is-sesame .grain {
  background: rgba(43, 57, 61, 0.82);
}

@keyframes bowl-rest {
  0%,
  100% {
    opacity: 0.45;
    transform: translateY(0);
  }
  50% {
    opacity: 1;
    transform: translateY(-2px);
  }
}

.mei-advice,
.fact-note {
  padding: 12px 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
}

.mei-advice {
  color: #314249;
  border-left: 3px solid var(--red);
  font-size: 16px;
  line-height: 1.5;
}

.word-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.word-actions .text-button,
.word-actions .primary-button {
  width: auto;
  min-height: 36px;
  margin: 0;
  padding: 0 12px;
}

.timed-confirm-card {
  gap: 12px;
}

.ticket-purchase-card {
  display: grid;
  gap: 14px;
}

.ticket-group {
  display: grid;
  gap: 8px;
}

.ticket-group > strong,
.ticket-summary > strong {
  color: var(--ink);
  font-size: 16px;
}

.ticket-summary {
  display: grid;
  gap: 6px;
  padding: 14px;
  border-radius: 8px;
  border: 1px solid rgba(21, 54, 74, 0.12);
  background: rgba(255, 255, 255, 0.66);
}

.ticket-summary p {
  margin: 0;
  color: #314249;
  font-size: 14px;
  line-height: 1.45;
}

.pedal-ride-card {
  display: grid;
  gap: 14px;
}

.pedal-scene {
  position: relative;
  min-height: 180px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(21, 54, 74, 0.14);
  background: linear-gradient(180deg, #8dd0ff 0 54%, #f4efe1 54% 100%);
}

.pedal-hills,
.pedal-sea,
.pedal-road,
.pedal-road-line,
.pedal-bar {
  position: absolute;
}

.pedal-hills {
  inset: 34px 0 auto 0;
  height: 68px;
  background:
    radial-gradient(circle at 12% 100%, #86b272 0 40px, transparent 41px),
    radial-gradient(circle at 28% 100%, #6c9b63 0 56px, transparent 57px),
    radial-gradient(circle at 52% 100%, #88b86f 0 44px, transparent 45px),
    radial-gradient(circle at 76% 100%, #6f9f67 0 62px, transparent 63px);
}

.pedal-sea {
  left: calc(58% - var(--ride-progress) * 0.18);
  right: 0;
  top: 82px;
  height: 40px;
  background: linear-gradient(180deg, #6ed0e8, #52a8d4);
  transition: left 220ms ease;
}

.pedal-road {
  left: 35%;
  right: 18%;
  bottom: -24px;
  height: 132px;
  background: linear-gradient(180deg, #9da5aa, #72797d);
  clip-path: polygon(36% 0, 72% 0, 100% 100%, 0 100%);
}

.pedal-road-line {
  left: 52%;
  bottom: 0;
  width: 5px;
  height: 94px;
  background:
    repeating-linear-gradient(180deg, rgba(255,255,255,0.95) 0 12px, transparent 12px 24px);
  transform: translateX(-50%);
  opacity: 0.84;
}

.pedal-scene.is-riding .pedal-road-line {
  animation: pedal-road 0.38s linear infinite;
}

.pedal-bar {
  left: 50%;
  bottom: 18px;
  width: 210px;
  height: 70px;
  border: 6px solid #d4d7d8;
  border-bottom: 0;
  border-radius: 180px 180px 0 0;
  transform: translateX(-50%);
  box-shadow: inset 0 6px 0 rgba(110, 120, 126, 0.3);
}

.pedal-steps {
  display: grid;
  gap: 8px;
}

.pedal-step {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(21, 54, 74, 0.12);
  color: #44555b;
  font-size: 14px;
}

.pedal-step.is-current {
  border-color: rgba(181, 51, 45, 0.32);
  background: rgba(181, 51, 45, 0.08);
  color: var(--ink);
  font-weight: 700;
}

.pedal-step.is-done {
  border-color: rgba(36, 116, 89, 0.26);
  background: rgba(36, 116, 89, 0.08);
}

.pedal-button {
  justify-self: start;
}

.kingyo-card {
  display: grid;
  gap: 14px;
}

.kingyo-pond {
  position: relative;
  min-height: 320px;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(21, 54, 74, 0.14);
  cursor: grab;
  touch-action: none;
  background:
    radial-gradient(ellipse at 50% 52%, rgba(255, 255, 255, 0.55), transparent 18%),
    radial-gradient(ellipse at 50% 56%, rgba(46, 145, 180, 0.18), transparent 42%),
    linear-gradient(180deg, #d8f4ff 0%, #a8ddf0 100%);
}

.kingyo-pond::before {
  content: "";
  position: absolute;
  inset: 18px;
  border: 2px solid rgba(255, 255, 255, 0.42);
  border-radius: 48% 52% 45% 55% / 42% 44% 56% 58%;
  box-shadow:
    inset 0 0 0 10px rgba(255, 255, 255, 0.1),
    0 18px 30px rgba(21, 54, 74, 0.1);
  pointer-events: none;
}

.kingyo-pond.is-dragging {
  cursor: grabbing;
}

.kingyo-net {
  position: absolute;
  left: 50%;
  top: 76%;
  z-index: 4;
  width: 104px;
  transform: translate(-50%, -50%);
  opacity: 0.98;
  pointer-events: none;
}

.kingyo-net img {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 8px 16px rgba(21, 54, 74, 0.18));
}

.kingyo-fish {
  position: absolute;
  z-index: 2;
  width: 96px;
  height: 72px;
  transform: translate(-50%, -50%);
  animation: kingyo-swim var(--duration, 4.8s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
  pointer-events: none;
}

.kingyo-fish img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 8px 10px rgba(21, 54, 74, 0.16));
}

.kingyo-pond.is-finished .kingyo-fish {
  opacity: 0.6;
}

@keyframes kingyo-swim {
  0%, 100% {
    transform: translate(-50%, -50%) translate(0, 0) rotate(-4deg);
  }
  50% {
    transform: translate(-50%, -50%) translate(var(--dx, 10px), var(--dy, 6px)) rotate(4deg);
  }
}

@keyframes lanternFloat {
  0%, 100% {
    opacity: 0.35;
    transform: translateY(0);
  }
  50% {
    opacity: 0.8;
    transform: translateY(-8px);
  }
}

@keyframes hanabiPulse {
  0%, 100% {
    opacity: 0.72;
    filter: brightness(1);
  }
  35% {
    opacity: 1;
    filter: brightness(1.08);
  }
  70% {
    opacity: 0.86;
    filter: brightness(1.02);
  }
}

@keyframes hanabiImageGlow {
  0%, 100% {
    filter: saturate(1) brightness(1);
  }
  50% {
    filter: saturate(1.08) brightness(1.04);
  }
}

@keyframes pedal-road {
  from {
    transform: translateX(-50%) translateY(0);
  }
  to {
    transform: translateX(-50%) translateY(24px);
  }
}

.receipt-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(21, 54, 74, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.receipt-card ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.receipt-card li,
.receipt-card strong {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-family: Arial, sans-serif;
}

.receipt-card small,
.fact-note {
  color: #526169;
  font-size: 13px;
  line-height: 1.45;
}

.receipt-card strong {
  font-size: 18px;
}

.receipt-card .primary-button {
  width: fit-content;
  min-height: 40px;
  margin-top: 4px;
  padding: 0 16px;
}

.budget-meter {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(181, 51, 45, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 248, 236, 0.95), rgba(255, 255, 255, 0.74));
}

.budget-meter-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  font-family: Arial, sans-serif;
}

.budget-meter-head span,
.budget-meter small {
  color: #58656a;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.budget-meter-head strong {
  color: var(--ink);
  font-size: 17px;
  white-space: nowrap;
}

.budget-meter-track {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(21, 54, 74, 0.12);
}

.budget-meter-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--red), #e2a15c);
  transition: width 420ms ease;
}

.souvenir-card {
  border-color: rgba(181, 51, 45, 0.24);
  background:
    linear-gradient(135deg, rgba(255, 248, 236, 0.95), rgba(255, 255, 255, 0.72));
}

.day7-rewards {
  display: grid;
  gap: 16px;
}

.reward-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
}

.reward-card {
  min-height: 150px;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 16px;
  border: 1px solid rgba(21, 54, 74, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.84), rgba(255, 248, 236, 0.76));
  color: var(--ink);
  text-align: left;
  box-shadow: 0 12px 24px rgba(21, 54, 74, 0.07);
}

.reward-card strong {
  font-size: 18px;
  line-height: 1.25;
}

.reward-card span {
  color: #46565d;
  font-size: 14px;
  line-height: 1.5;
}

.reward-card small {
  align-self: end;
  color: var(--red-dark);
  font-family: Arial, sans-serif;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.review-form {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(181, 51, 45, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
}

.reward-intro,
.review-heading {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid rgba(21, 54, 74, 0.12);
  border-radius: 8px;
  background: rgba(255, 248, 236, 0.72);
}

.reward-intro p,
.review-heading h3 {
  margin: 0;
}

.review-heading h3 {
  color: var(--ink);
  font-size: 21px;
}

.review-form label {
  display: grid;
  gap: 6px;
  color: var(--ink);
  font-family: Arial, sans-serif;
  font-size: 13px;
  font-weight: 900;
}

.review-form input,
.review-form select,
.review-form textarea {
  width: 100%;
  border: 1px solid rgba(21, 54, 74, 0.18);
  border-radius: 7px;
  padding: 11px 12px;
  background: rgba(255, 248, 236, 0.78);
  color: var(--ink);
  font: 15px/1.45 Arial, sans-serif;
}

.review-consent {
  grid-template-columns: auto 1fr;
  align-items: center;
  font-weight: 700;
}

.review-consent input {
  width: auto;
}

.fact-note {
  border: 1px solid rgba(181, 51, 45, 0.12);
}

.resource-needed {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px dashed rgba(181, 51, 45, 0.42);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
}

.resource-needed strong {
  color: var(--ink);
  font-size: 18px;
}

.resource-needed p:not(.kicker) {
  margin: 0;
  color: #405057;
  line-height: 1.45;
}

.resource-needed ul {
  margin: 0;
  padding-left: 18px;
  color: #526169;
}

.choice-button,
.hotspot-button,
.check-button,
.memory-button {
  min-height: 38px;
  padding: 9px 11px;
  border-radius: 999px;
  border: 1px solid rgba(21, 54, 74, 0.14);
  background: rgba(255, 255, 255, 0.48);
  color: var(--ink);
  text-align: center;
  font-family: Arial, sans-serif;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
}

.interaction-note {
  margin: 12px 0 0;
  color: #405057;
  font-size: 19px;
  line-height: 1.64;
}

.dialogue-card {
  display: grid;
  gap: 6px;
  padding: 0 0 0 13px;
  background: transparent;
  border-left: 2px solid rgba(181, 51, 45, 0.25);
  border-radius: 0;
}

.dialogue-card strong {
  color: var(--red-dark);
  font-family: Arial, sans-serif;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.choice-button.is-selected,
.hotspot-button.is-selected,
.check-button.is-selected,
.memory-button.is-selected {
  color: #fff;
  background: var(--red);
  border-color: var(--red);
}

.response-field {
  display: grid;
  gap: 9px;
}

.response-field textarea {
  min-height: 112px;
  width: 100%;
  resize: vertical;
  padding: 12px;
  border: 1px solid rgba(21, 54, 74, 0.18);
  border-radius: 7px;
  outline: none;
}

.journal-composer {
  margin-top: 12px;
}

.journal-composer .text-button {
  width: auto;
  min-height: 0;
  justify-self: start;
  margin-top: 0;
  padding: 0;
  color: var(--red-dark);
  border: 0;
  background: transparent;
}

.journal-composer .primary-button {
  justify-self: start;
  min-height: 38px;
}

.journal-composer textarea[hidden],
.journal-composer button[hidden] {
  display: none;
}

.primary-button,
.ghost-button,
.icon-button,
.text-button {
  min-height: 42px;
  border-radius: 7px;
  font-family: Arial, sans-serif;
  font-size: 13px;
  font-weight: 900;
  transition: transform 150ms ease, opacity 150ms ease;
}

.primary-button:hover,
.ghost-button:hover,
.icon-button:hover,
.text-button:hover {
  transform: translateY(-1px);
}

.primary-button {
  padding: 0 18px;
  color: #fff;
  background: var(--red);
  border: 1px solid var(--red);
  box-shadow: 0 12px 26px rgba(181, 51, 45, 0.24);
}

.ghost-button,
.icon-button {
  color: var(--ink);
  background: #fff;
  border: 1px solid rgba(21, 54, 74, 0.17);
}

.ghost-button {
  padding: 0 15px;
}

.icon-button {
  width: 42px;
  padding: 0;
}

.text-button {
  width: 100%;
  margin-top: 10px;
  color: var(--muted);
  background: transparent;
  border: 1px dashed rgba(21, 54, 74, 0.2);
}

.story-actions {
  justify-content: space-between;
}

.story-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
}

.passport-card {
  padding: 14px;
}

.passport-cover {
  min-height: 112px;
  display: grid;
  align-content: space-between;
  padding: 16px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(21, 54, 74, 0.96), rgba(47, 139, 169, 0.86)),
    var(--ink);
  border-radius: 7px;
}

.passport-cover p,
.passport-cover span {
  margin: 0;
  font-family: Arial, sans-serif;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.passport-cover h2 {
  color: #fff;
  font-size: 28px;
}

.passport-email {
  margin: 0;
  overflow-wrap: anywhere;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
}

.profile-details {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 12px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(21, 54, 74, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
}

.profile-avatar {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-family: Arial, sans-serif;
  font-size: 18px;
  font-weight: 900;
}

.profile-facts {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.profile-facts div {
  display: grid;
  gap: 2px;
}

.profile-facts span {
  color: var(--muted);
  font-family: Arial, sans-serif;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.profile-facts strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.2;
}

.stamp-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 14px;
}

.stamp {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 8px;
  border: 1px dashed rgba(21, 54, 74, 0.24);
  background: rgba(255, 255, 255, 0.46);
  color: rgba(21, 54, 74, 0.42);
  text-align: left;
  font-family: Arial, sans-serif;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.stamp.is-earned {
  color: var(--red-dark);
  border-color: var(--red);
  background: rgba(181, 51, 45, 0.08);
  transform: none;
}

.journal-card {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(21, 54, 74, 0.14);
}

.journal-entries {
  display: grid;
  gap: 10px;
}

.journal-empty,
.journal-entry {
  margin: 0;
  padding: 12px;
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid rgba(21, 54, 74, 0.12);
  border-radius: 7px;
}

.journal-empty {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.journal-entry strong,
.journal-entry span {
  display: block;
  font-family: Arial, sans-serif;
}

.journal-entry strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

/* TOAST NOTIFICATIONS */
#toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--paper);
  padding: 12px 24px;
  border-radius: 4px;
  font-size: 14px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
  z-index: 1000;
}

#toast.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.journal-entry span {
  margin: 3px 0 8px;
  color: var(--red);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.journal-entry p {
  margin: 0;
  color: #314249;
  font-size: 15px;
  line-height: 1.45;
}

.stamp-dialog {
  width: min(460px, calc(100% - 28px));
  border: 1px solid rgba(21, 54, 74, 0.18);
  border-radius: 8px;
  padding: 24px;
  color: var(--text);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.stamp-dialog::backdrop {
  background: rgba(21, 54, 74, 0.38);
  backdrop-filter: blur(4px);
}

.stamp-dialog h2 {
  margin-bottom: 12px;
  font-size: 38px;
}

.stamp-dialog p:not(.kicker) {
  line-height: 1.55;
}

.stamp-animation {
  width: 126px;
  height: 126px;
  display: grid;
  place-items: center;
  margin: 0 auto 12px;
  border: 6px double rgba(181, 51, 45, 0.78);
  border-radius: 50%;
  color: var(--red);
  font-family: Arial, sans-serif;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1.1;
  text-align: center;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(-34px) scale(1.22) rotate(-8deg);
}

.stamp-dialog.is-stamping .stamp-animation {
  animation: stampDrop 740ms cubic-bezier(0.2, 0.95, 0.28, 1.1) forwards;
}

@keyframes stampDrop {
  0% {
    opacity: 0;
    transform: translateY(-48px) scale(1.28) rotate(-10deg);
  }
  58% {
    opacity: 1;
    transform: translateY(6px) scale(0.92) rotate(-3deg);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(-5deg);
  }
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 60;
  width: min(420px, calc(100% - 28px));
  padding: 13px 16px;
  border-radius: 7px;
  color: #fff;
  background: var(--ink);
  box-shadow: var(--shadow);
  font-family: Arial, sans-serif;
  font-size: 14px;
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 14px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 820px) {
  .app-header {
    position: static;
    align-items: flex-start;
  }

  .scene-card,
  .story-body {
    grid-template-columns: 1fr;
  }

  .stage-image,
  .stage-image img,
  .stage-image video {
    min-height: 0;
    max-height: 430px;
    height: auto;
  }

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

  .choice-grid,
  .hotspot-grid,
  .check-grid,
  .memory-options,
  .visual-choice-grid,
  .product-grid,
  .word-grid {
    grid-template-columns: 1fr;
  }

  .phrase-practice {
    grid-template-columns: 1fr;
  }

  .phrase-actions {
    justify-content: flex-start;
  }

  .culture-panel {
    border-left: 0;
    border-top: 2px solid rgba(181, 51, 45, 0.22);
    padding: 14px 0 0;
  }

  .guide-panel {
    grid-template-columns: 110px minmax(0, 1fr);
  }
}

@media (max-width: 540px) {
  .access-screen {
    place-items: start center;
    padding: 10px;
  }

  .access-card {
    max-height: calc(100dvh - 20px);
    padding: 16px;
  }

  .access-card img {
    width: 48px;
    height: 48px;
  }

  .access-card h2 {
    font-size: 34px;
  }

  .access-copy {
    font-size: 14px;
    line-height: 1.35;
  }

  .auth-tabs {
    grid-template-columns: 1fr;
    gap: 6px;
    margin: 10px 0;
  }

  .auth-tab {
    min-height: 36px;
  }

  .login-form input {
    height: 40px;
  }

  .app-header,
  .header-actions,
  .story-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .brand img {
    width: 48px;
    height: 48px;
  }

  .traveler-summary {
    width: 100%;
    min-width: 0;
  }

  .day-list {
    grid-template-columns: 1fr;
  }

  .story-card h2 {
    font-size: 34px;
  }

  .detail-card {
    left: 12px;
    right: 12px;
    width: auto;
    bottom: 12px;
    max-height: min(46dvh, 340px);
    padding: 12px;
    gap: 8px;
  }

  .detail-card h3 {
    font-size: 22px;
  }

  .detail-card p:not(.kicker) {
    font-size: 14px;
    line-height: 1.42;
  }

  .detail-card .ghost-button {
    min-height: 42px;
  }

  .phrase-line {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .image-hotspot {
    max-width: 44px;
    padding: 5px;
  }

  .image-hotspot strong {
    display: none;
  }

  .guide-panel {
    left: 14px;
    right: 14px;
    width: auto;
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .guide-panel img {
    width: 150px;
    max-height: 220px;
  }
}

.mei-letter {
  display: grid;
  gap: 14px;
}

.mei-envelope {
  display: grid;
  justify-items: center;
  gap: 10px;
  width: 100%;
  padding: 22px 18px 18px;
  border: 1px solid rgba(181, 51, 45, 0.22);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 248, 236, 0.96), rgba(255, 255, 255, 0.82));
  color: var(--ink);
  box-shadow: 0 16px 34px rgba(21, 54, 74, 0.08);
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.mei-envelope:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 38px rgba(21, 54, 74, 0.12);
}

.mei-envelope strong {
  font-size: 20px;
}

.mei-envelope span:last-child {
  color: var(--muted);
  font-size: 14px;
}

.mei-envelope-shell {
  position: relative;
  width: 132px;
  height: 88px;
}

.mei-envelope-body,
.mei-envelope-flap {
  position: absolute;
  left: 0;
  right: 0;
  border: 1px solid rgba(181, 51, 45, 0.28);
}

.mei-envelope-body {
  bottom: 0;
  height: 62px;
  border-radius: 4px 4px 8px 8px;
  background: linear-gradient(180deg, #fff8ec, #f2dfbf);
}

.mei-envelope-flap {
  top: 0;
  height: 44px;
  transform-origin: top center;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  background: linear-gradient(180deg, #f7e8c8, #ead7b0);
  transition: transform 680ms ease;
}

.mei-envelope.is-opening .mei-envelope-flap {
  transform: rotateX(180deg);
}

.mei-letter-content {
  padding: 18px 18px 14px;
  border: 1px solid rgba(21, 54, 74, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 248, 236, 0.88));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  animation: letterReveal 620ms ease;
}

.mei-letter-to {
  margin: 0 0 14px;
  color: var(--red-dark);
  font-size: 18px;
  font-weight: 700;
}

.mei-letter-body {
  display: grid;
  gap: 12px;
  color: var(--text);
  line-height: 1.65;
}

.mei-letter-body p {
  margin: 0;
}

.mei-letter-sign {
  margin: 18px 0 0;
  color: var(--ink);
  font-style: italic;
  text-align: right;
}

.story-card.is-letter-mode .story-copy,
.story-card.is-image-only-mode .story-copy,
.story-card.is-image-only-mode .culture-panel,
.story-card.is-image-only-mode .interaction {
  display: none;
}

.scene-card.is-image-only {
  grid-template-columns: 1fr;
}

.scene-card.is-image-only .story-card {
  padding-top: 8px;
}

.scene-card.is-image-only .story-actions {
  justify-content: center;
}

@keyframes letterReveal {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.legal-page {
  display: block;
  min-height: 100vh;
  padding: clamp(22px, 5vw, 64px);
}

.legal-document {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: clamp(24px, 5vw, 44px);
  border: 1px solid rgba(21, 54, 74, 0.14);
  border-radius: 8px;
  background: rgba(255, 248, 236, 0.92);
  box-shadow: var(--shadow);
}

.legal-document h1,
.legal-document h2 {
  color: var(--ink);
}

.legal-document p {
  color: #405057;
  line-height: 1.65;
}

.legal-document a {
  color: var(--red-dark);
  font-weight: 800;
}

.admin-document {
  width: min(1080px, 100%);
}

.admin-login {
  max-width: 460px;
  margin: 22px 0;
}

.admin-toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 18px 0;
}

.admin-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin: 18px 0;
}

.admin-summary article {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid rgba(21, 54, 74, 0.13);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.66);
}

.admin-summary strong {
  color: var(--ink);
  font-size: 28px;
}

.admin-summary span {
  color: #5f6a70;
  font-family: Arial, sans-serif;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-rows {
  display: grid;
  gap: 12px;
}

.admin-row {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(21, 54, 74, 0.13);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.admin-row header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-row header strong {
  color: var(--ink);
  font-size: 20px;
}

.admin-row header span,
.admin-row small {
  color: #5f6a70;
}

.admin-row dl {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 8px;
  margin: 0;
}

.admin-row dl div {
  padding: 9px;
  border-radius: 7px;
  background: rgba(255, 248, 236, 0.74);
}

.admin-row dt {
  color: #7a241f;
  font-family: Arial, sans-serif;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-row dd {
  margin: 3px 0 0;
  color: var(--ink);
  font-weight: 800;
}

.admin-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.admin-detail-grid > div {
  padding: 12px;
  border: 1px solid rgba(21, 54, 74, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.6);
}

.admin-detail-grid h3 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 16px;
}

.admin-detail-grid p {
  margin: 0 0 6px;
  font-size: 14px;
  line-height: 1.45;
}
