:root {
  color-scheme: light;
  --ink: #142339;
  --muted: #5f6f84;
  --deep: #123b68;
  --ocean: #0a93d4;
  --aqua: #64d7ea;
  --mint: #78ddb9;
  --coral: #ff708f;
  --sun: #ffd65f;
  --lavender: #a992f5;
  --paper: #ffffff;
  --mist: #effbff;
  --line: rgba(18, 59, 104, 0.13);
  --shadow: 0 18px 40px rgba(18, 59, 104, 0.16);
  --radius: 8px;
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background:
    linear-gradient(135deg, rgba(120, 221, 185, 0.32), rgba(255, 112, 143, 0.08) 45%, rgba(100, 215, 234, 0.3)),
    #eefbff;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.22) 0 2px, transparent 2px 24px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(239, 251, 255, 0.62));
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

svg {
  display: block;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.app-shell {
  position: relative;
  width: min(100%, 520px);
  min-height: 100vh;
  margin: 0 auto;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(241, 252, 255, 0.96)),
    var(--mist);
  box-shadow: 0 0 60px rgba(18, 59, 104, 0.13);
  overflow: hidden;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(env(safe-area-inset-top) + 12px) 16px 10px;
  background: rgba(247, 253, 255, 0.88);
  border-bottom: 1px solid rgba(18, 59, 104, 0.08);
  backdrop-filter: blur(18px);
}

.brand {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-mascot {
  width: 44px;
  height: 44px;
  object-fit: contain;
  filter: drop-shadow(0 5px 8px rgba(10, 147, 212, 0.18));
  transition:
    transform 0.2s ease,
    filter 0.2s ease;
}

.brand p,
.brand h1 {
  margin: 0;
}

.brand p {
  color: var(--ocean);
  font-size: 0.76rem;
  font-weight: 800;
}

.brand h1 {
  overflow: hidden;
  font-size: 1rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.main {
  padding: 14px 14px calc(88px + env(safe-area-inset-bottom));
}

.screen {
  display: none;
}

.screen.active {
  display: block;
}

.mission-band {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px;
  align-items: end;
  min-height: 214px;
  padding: 18px 14px 16px;
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(140deg, rgba(18, 59, 104, 0.96), rgba(10, 147, 212, 0.86) 58%, rgba(120, 221, 185, 0.9)),
    var(--deep);
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.mission-band::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(160deg, transparent 0 58%, rgba(255, 214, 95, 0.22) 59% 62%, transparent 63%),
    repeating-linear-gradient(0deg, transparent 0 18px, rgba(255, 255, 255, 0.07) 18px 19px);
}

.mission-copy {
  position: relative;
  z-index: 2;
  min-width: 0;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  color: var(--deep);
  background: var(--sun);
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
}

.mission-copy h2 {
  max-width: 12em;
  margin: 12px 0 8px;
  font-size: 1.48rem;
  line-height: 1.18;
}

.mission-copy p {
  min-height: 42px;
  margin: 0 0 14px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.88rem;
  line-height: 1.55;
}

.mascot-stage {
  position: relative;
  z-index: 1;
  width: 154px;
  max-width: 42vw;
  justify-self: end;
  margin: 0 -24px -16px 0;
}

.mascot-stage::before {
  position: absolute;
  inset: 12% 0 5%;
  z-index: -1;
  content: "";
  background: radial-gradient(circle, rgba(255, 214, 95, 0.6), rgba(100, 215, 234, 0.22) 48%, transparent 70%);
  border-radius: 999px;
  opacity: 0;
  transform: scale(0.74);
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
}

.hero-mascot {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  filter: drop-shadow(0 14px 14px rgba(10, 41, 74, 0.28));
  transform-origin: 50% 80%;
  transition:
    filter 0.24s ease,
    transform 0.24s ease;
}

.mascot-star {
  position: absolute;
  z-index: 3;
  width: 28px;
  height: 28px;
  background: #fff5b8;
  clip-path: polygon(50% 0%, 61% 34%, 97% 35%, 68% 55%, 79% 90%, 50% 70%, 21% 90%, 32% 55%, 3% 35%, 39% 34%);
  filter:
    drop-shadow(0 2px 0 rgba(18, 59, 104, 0.14))
    drop-shadow(0 0 10px rgba(255, 214, 95, 0.92));
  opacity: 0;
  transform: scale(0.5) rotate(-12deg);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.star-one {
  top: 17%;
  left: 4%;
}

.star-two {
  top: 6%;
  right: 9%;
}

.star-three {
  right: -2%;
  bottom: 30%;
}

.mascot-badge {
  position: absolute;
  right: 8px;
  bottom: 11px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  min-height: 28px;
  padding: 4px 9px;
  color: var(--deep);
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(18, 59, 104, 0.16);
  font-size: 0.7rem;
  font-weight: 900;
}

.app-shell[data-mascot-stage="1"] .brand-mascot,
.app-shell[data-mascot-stage="2"] .brand-mascot,
.app-shell[data-mascot-stage="3"] .brand-mascot,
.app-shell[data-mascot-stage="4"] .brand-mascot {
  filter:
    drop-shadow(0 5px 8px rgba(10, 147, 212, 0.18))
    drop-shadow(0 0 10px rgba(255, 214, 95, 0.45));
}

.app-shell[data-mascot-stage="1"] .mascot-stage::before {
  opacity: 0.42;
  transform: scale(0.88);
}

.app-shell[data-mascot-stage="1"] .hero-mascot {
  transform: rotate(-1deg) scale(1.02);
  filter:
    drop-shadow(0 14px 14px rgba(10, 41, 74, 0.28))
    drop-shadow(0 0 10px rgba(255, 214, 95, 0.4));
}

.app-shell[data-mascot-stage="1"] .star-one {
  opacity: 1;
  transform: scale(0.86) rotate(-8deg);
}

.app-shell[data-mascot-stage="1"] .mascot-badge {
  background: #fff6bf;
}

.app-shell[data-mascot-stage="2"] .mascot-stage::before {
  opacity: 0.64;
  transform: scale(1);
}

.app-shell[data-mascot-stage="2"] .hero-mascot {
  transform: rotate(1deg) scale(1.05);
  filter:
    drop-shadow(0 14px 14px rgba(10, 41, 74, 0.28))
    drop-shadow(0 0 14px rgba(255, 214, 95, 0.58));
}

.app-shell[data-mascot-stage="2"] .star-one,
.app-shell[data-mascot-stage="2"] .star-two {
  opacity: 1;
  transform: scale(0.94) rotate(8deg);
}

.app-shell[data-mascot-stage="2"] .mascot-badge {
  color: #6f4d00;
  background: linear-gradient(135deg, #fff6bf, #ffd65f);
}

.app-shell[data-mascot-stage="3"] .mascot-stage::before,
.app-shell[data-mascot-stage="4"] .mascot-stage::before {
  opacity: 0.86;
  transform: scale(1.13);
}

.app-shell[data-mascot-stage="3"] .hero-mascot,
.app-shell[data-mascot-stage="4"] .hero-mascot {
  transform: rotate(-1deg) scale(1.08);
  filter:
    drop-shadow(0 14px 14px rgba(10, 41, 74, 0.28))
    drop-shadow(0 0 18px rgba(255, 214, 95, 0.68))
    drop-shadow(0 0 18px rgba(120, 221, 185, 0.36));
}

.app-shell[data-mascot-stage="3"] .mascot-star,
.app-shell[data-mascot-stage="4"] .mascot-star {
  opacity: 1;
  transform: scale(1) rotate(10deg);
}

.app-shell[data-mascot-stage="3"] .mascot-badge,
.app-shell[data-mascot-stage="4"] .mascot-badge {
  color: #fff;
  background: linear-gradient(135deg, var(--coral), var(--sun), var(--mint));
  border-color: rgba(255, 255, 255, 0.88);
}

.app-shell[data-mascot-stage="4"] .mascot-stage {
  animation: mascotFloat 2.8s ease-in-out infinite;
}

.app-shell[data-mascot-stage="4"] .mascot-star {
  animation: mascotTwinkle 1.4s ease-in-out infinite alternate;
}

.app-shell[data-mascot-stage="4"] .star-two {
  animation-delay: 0.18s;
}

.app-shell[data-mascot-stage="4"] .star-three {
  animation-delay: 0.36s;
}

@keyframes mascotFloat {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-5px);
  }
}

@keyframes mascotTwinkle {
  from {
    filter: brightness(1);
    transform: scale(0.94) rotate(-8deg);
  }

  to {
    filter: brightness(1.18);
    transform: scale(1.08) rotate(10deg);
  }
}

.hero-actions,
.card-actions,
.stacked-actions {
  display: grid;
  gap: 10px;
}

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

.primary-button,
.secondary-button,
.danger-button,
.primary-icon-button,
.icon-button,
.text-button,
.mode-button,
.option-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border-radius: var(--radius);
  font-weight: 800;
  text-decoration: none;
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    border-color 0.16s ease,
    background 0.16s ease;
}

.primary-button {
  color: #fff;
  background: linear-gradient(135deg, var(--coral), #ff8f68);
  box-shadow: 0 10px 18px rgba(255, 112, 143, 0.24);
}

.secondary-button {
  color: var(--deep);
  background: #fff;
  border: 1px solid rgba(18, 59, 104, 0.12);
}

.danger-button {
  color: #8c1d32;
  background: #fff0f4;
  border: 1px solid rgba(255, 112, 143, 0.34);
}

.primary-icon-button,
.icon-button {
  width: 44px;
  min-width: 44px;
  padding: 0;
}

.primary-icon-button {
  color: #fff;
  background: var(--ocean);
  box-shadow: 0 8px 18px rgba(10, 147, 212, 0.22);
}

.icon-button {
  color: var(--deep);
  background: #fff;
  border: 1px solid var(--line);
}

.text-button {
  min-height: 34px;
  padding: 0 4px;
  color: var(--ocean);
  background: transparent;
}

.primary-button:active,
.secondary-button:active,
.danger-button:active,
.primary-icon-button:active,
.icon-button:active,
.option-button:active,
.mode-button:active,
.nav-button:active {
  transform: translateY(1px);
}

.full {
  width: 100%;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.stat-tile {
  min-height: 74px;
  padding: 10px 8px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.stat-tile span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
}

.stat-tile strong {
  display: block;
  color: var(--deep);
  font-size: 1.28rem;
  line-height: 1.1;
}

.stat-tile.accent strong {
  color: #d68a00;
}

.section-block,
.quiz-panel,
.feedback-panel,
.settings-panel {
  margin-top: 12px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

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

.section-heading.compact {
  margin-bottom: 12px;
}

.section-heading h2,
.settings-panel h3 {
  margin: 0;
  color: var(--deep);
  font-size: 1rem;
  line-height: 1.3;
}

.section-heading span:not(.pill) {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.target-list,
.word-list {
  display: grid;
  gap: 8px;
}

.target-item,
.word-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 62px;
  padding: 10px;
  background: #f9fdff;
  border: 1px solid rgba(18, 59, 104, 0.09);
  border-radius: var(--radius);
}

.word-main,
.target-main {
  min-width: 0;
}

.word-main strong,
.target-main strong {
  display: block;
  overflow-wrap: anywhere;
  color: var(--deep);
  font-size: 1rem;
}

.word-main span,
.target-main span {
  display: block;
  margin-top: 3px;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 0.82rem;
}

.mini-progress {
  width: 64px;
  height: 8px;
  overflow: hidden;
  background: #dff3fa;
  border-radius: 999px;
}

.mini-progress > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--mint), var(--sun));
}

.progress-track {
  height: 14px;
  overflow: hidden;
  background: #dff3fa;
  border-radius: 999px;
}

.progress-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--coral), var(--sun), var(--mint));
  transition: width 0.25s ease;
}

.mode-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.mode-row[hidden] {
  display: none;
}

.quiz-kind-row {
  margin-top: -4px;
}

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

.global-kind-row {
  margin: 12px 0;
}

.card-kind-row {
  margin-top: 12px;
}

.mode-button {
  min-height: 40px;
  color: var(--muted);
  background: transparent;
  font-size: 0.88rem;
}

.mode-button.active {
  color: #fff;
  background: var(--deep);
  box-shadow: 0 8px 18px rgba(18, 59, 104, 0.16);
}

.quiz-panel {
  position: relative;
  min-height: 210px;
  padding-top: 48px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(238, 251, 255, 0.98)),
    #fff;
}

.quiz-meta {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 66px;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.quiz-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 8px;
  overflow: hidden;
  color: var(--deep);
  background: #e7f7fd;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quiz-meta span:last-child {
  background: #fff6d8;
}

.speaker-button {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: #fff;
  background: var(--ocean);
  border-radius: var(--radius);
}

.quiz-prompt {
  display: grid;
  place-items: center;
  min-height: 88px;
  margin: 0;
  color: var(--deep);
  font-size: 2.1rem;
  font-weight: 900;
  line-height: 1.1;
  overflow-wrap: anywhere;
  text-align: center;
}

.quiz-example {
  min-height: 44px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
  text-align: center;
}

.option-grid {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.option-grid[hidden] {
  display: none;
}

.spell-form {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.spell-form[hidden] {
  display: none;
}

.spell-field {
  display: grid;
  gap: 7px;
  padding: 12px;
  color: var(--deep);
  background: #fff;
  border: 1px solid rgba(18, 59, 104, 0.12);
  border-radius: var(--radius);
  box-shadow: 0 8px 18px rgba(18, 59, 104, 0.07);
}

.spell-field span {
  font-size: 0.82rem;
  font-weight: 900;
}

.spell-field input {
  width: 100%;
  min-height: 52px;
  padding: 0 12px;
  color: var(--deep);
  background: #f9fdff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 1.2rem;
  font-weight: 900;
  outline: 0;
}

.spell-field input:focus {
  border-color: rgba(10, 147, 212, 0.74);
  box-shadow: 0 0 0 3px rgba(10, 147, 212, 0.12);
}

.spell-field.correct {
  background: #e6fbf0;
  border-color: rgba(120, 221, 185, 0.68);
}

.spell-field.wrong {
  background: #fff0f4;
  border-color: rgba(255, 112, 143, 0.58);
}

.option-button {
  justify-content: flex-start;
  min-height: 58px;
  padding: 12px 14px;
  color: var(--deep);
  background: #fff;
  border: 1px solid rgba(18, 59, 104, 0.12);
  box-shadow: 0 8px 18px rgba(18, 59, 104, 0.07);
  overflow-wrap: anywhere;
  text-align: left;
}

.option-button.correct {
  color: #0f5d3a;
  background: #e6fbf0;
  border-color: rgba(120, 221, 185, 0.68);
}

.option-button.wrong {
  color: #8c1d32;
  background: #fff0f4;
  border-color: rgba(255, 112, 143, 0.58);
}

.feedback-panel {
  min-height: 96px;
}

.feedback-panel p {
  margin: 0 0 10px;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.45;
}

.flash-card {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 310px;
  padding: 22px 16px;
  color: var(--deep);
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.94), rgba(231, 247, 253, 0.94)),
    #fff;
  border: 1px solid rgba(18, 59, 104, 0.13);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
}

.flash-card span {
  align-self: start;
  padding: 4px 9px;
  color: var(--deep);
  background: var(--sun);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
}

.flash-card strong {
  display: block;
  width: 100%;
  overflow-wrap: anywhere;
  font-size: 2.35rem;
  line-height: 1.12;
}

.flash-card em {
  display: block;
  min-height: 32px;
  color: var(--muted);
  font-size: 1.05rem;
  font-style: normal;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.card-actions {
  grid-template-columns: 1fr 1fr;
  margin-top: 12px;
}

.search-field {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 48px;
  margin-bottom: 12px;
  padding: 0 12px;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.search-field input {
  min-width: 0;
  height: 46px;
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
}

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

.word-actions .icon-button {
  width: 38px;
  min-width: 38px;
  min-height: 38px;
}

.settings-panel h3 {
  margin-bottom: 12px;
}

.install-panel {
  display: grid;
  gap: 12px;
}

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

.install-panel h3 {
  margin-bottom: 4px;
}

.install-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.5;
}

.stepper {
  display: grid;
  grid-template-columns: 44px minmax(80px, 1fr) 44px;
  align-items: center;
  gap: 10px;
}

.stepper strong {
  display: grid;
  place-items: center;
  min-height: 44px;
  color: var(--deep);
  background: #f9fdff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 1.24rem;
}

.file-label {
  position: relative;
  overflow: hidden;
}

.file-label input {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.bottom-nav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  width: min(100%, 520px);
  margin: 0 auto;
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.9);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.nav-button {
  display: grid;
  place-items: center;
  gap: 3px;
  min-width: 0;
  min-height: 54px;
  color: var(--muted);
  background: transparent;
  border-radius: var(--radius);
  font-size: 0.72rem;
  font-weight: 900;
}

.nav-button svg {
  width: 22px;
  height: 22px;
}

.nav-button.active {
  color: #fff;
  background: var(--deep);
}

.word-dialog {
  width: min(calc(100% - 28px), 480px);
  padding: 0;
  color: var(--ink);
  background: #fff;
  border: 0;
  border-radius: var(--radius);
  box-shadow: 0 24px 70px rgba(18, 59, 104, 0.32);
}

.word-dialog::backdrop {
  background: rgba(18, 35, 57, 0.45);
  backdrop-filter: blur(4px);
}

.word-dialog form {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.dialog-heading,
.dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.dialog-heading h2 {
  margin: 0;
  color: var(--deep);
  font-size: 1.08rem;
}

.word-dialog label {
  display: grid;
  gap: 6px;
  color: var(--deep);
  font-size: 0.84rem;
  font-weight: 900;
}

.word-dialog input,
.word-dialog select {
  width: 100%;
  min-height: 46px;
  padding: 0 12px;
  color: var(--ink);
  background: #f9fdff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline: 0;
}

.word-dialog input:focus,
.word-dialog select:focus,
.search-field:focus-within {
  border-color: rgba(10, 147, 212, 0.7);
  box-shadow: 0 0 0 3px rgba(10, 147, 212, 0.12);
}

.dialog-actions {
  justify-content: end;
}

.toast {
  position: fixed;
  right: 16px;
  bottom: calc(82px + env(safe-area-inset-bottom));
  left: 16px;
  z-index: 60;
  display: none;
  width: min(calc(100% - 32px), 488px);
  min-height: 44px;
  margin: 0 auto;
  padding: 12px 14px;
  color: #fff;
  background: rgba(18, 59, 104, 0.94);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  font-weight: 800;
}

.toast.show {
  display: block;
}

.empty-state {
  min-height: 96px;
  padding: 20px 14px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
  border: 1px dashed rgba(18, 59, 104, 0.2);
  border-radius: var(--radius);
  line-height: 1.55;
  text-align: center;
}

@media (min-width: 430px) {
  .hero-actions {
    grid-template-columns: auto auto;
  }

  .option-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 360px) {
  .main {
    padding-right: 10px;
    padding-left: 10px;
  }

  .mission-band {
    grid-template-columns: 1fr 108px;
    padding: 14px 10px;
  }

  .mission-copy h2 {
    font-size: 1.3rem;
  }

  .mascot-stage {
    width: 132px;
  }

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

  .quiz-prompt,
  .flash-card strong {
    font-size: 1.85rem;
  }
}

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