:root {
  --bg-top: #d9f99d;
  --bg-bottom: #fef3c7;
  --panel: rgba(255, 255, 255, 0.88);
  --text: #1f2937;
  --accent: #0f766e;
  --accent-strong: #115e59;
  --accent-soft: #99f6e4;
  --shadow: 0 20px 50px rgba(15, 118, 110, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Hiragino Maru Gothic ProN", "Yu Gothic", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.8), transparent 24rem),
    linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
}

.debug-build-badge {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 9999;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  box-shadow: 0 0.4rem 1rem rgba(0, 0, 0, 0.2);
}

button,
input,
select {
  font: inherit;
}

.app-shell {
  width: min(1120px, calc(100vw - 2rem));
  margin: 0 auto;
  padding: 1rem 0 3rem;
}

.hero,
.card,
.settings-panel {
  background: var(--panel);
  backdrop-filter: blur(16px);
  border: 3px solid rgba(255, 255, 255, 0.7);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.hero {
  position: relative;
  padding: 1.5rem 1.5rem 1.25rem;
  margin-bottom: 1rem;
}

.home-hero {
  padding: 2rem 1.5rem;
}

.home-hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  gap: 1.5rem;
  align-items: center;
}

.home-hero-copy {
  min-width: 0;
}

.hero-subtitle {
  margin: 0.4rem 0 0;
  font-size: clamp(1rem, 2vw, 1.35rem);
  font-weight: 800;
  color: var(--accent-strong);
}

.home-hero-figure {
  margin: 0;
  justify-self: end;
  width: min(100%, 24rem);
  border-radius: 26px;
  overflow: hidden;
  border: 4px solid rgba(255, 255, 255, 0.82);
  box-shadow: 0 18px 40px rgba(15, 118, 110, 0.18);
  background: rgba(255, 255, 255, 0.72);
}

.home-hero-figure img {
  display: block;
  width: 100%;
  height: auto;
}

.eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero h1,
.card h2,
.settings-panel h2 {
  margin: 0;
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
}

.screen-title,
.course-title {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.course-title-icon {
  font-size: 1.1em;
  line-height: 1;
}

.hero-copy {
  max-width: 38rem;
  margin: 0.75rem 0 0;
  font-size: 1.1rem;
  line-height: 1.6;
}

.app-error {
  margin: 1rem 0 0;
  padding: 0.9rem 1rem;
  border-radius: 18px;
  background: #fee2e2;
  color: #991b1b;
  font-weight: 700;
}

.settings-trigger {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 3.5rem;
  height: 3.5rem;
  border: none;
  border-radius: 999px;
  background: var(--accent);
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
}

.back-button {
  border: none;
  border-radius: 999px;
  padding: 0.8rem 1rem;
  margin-bottom: 1rem;
  background: #e2e8f0;
  color: var(--text);
  cursor: pointer;
  font-weight: 700;
}

.layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.home-layout {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.status-strip,
.mode-status-grid {
  display: grid;
  gap: 0.75rem;
}

.status-strip {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 1rem;
}

.mode-status-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 1rem;
}

.card {
  padding: 1rem;
}

.card-controls {
  margin-top: 1rem;
}

.mode-card {
  min-height: 16rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.course-card-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(110px, 0.6fr);
  gap: 1rem;
  align-items: start;
}

.course-card-copy {
  min-width: 0;
}

.course-card-art {
  margin: -0.2rem -0.2rem 1rem;
  border-radius: 22px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.8), rgba(209, 250, 229, 0.8));
  border: 2px solid rgba(15, 118, 110, 0.14);
}

.course-card-art-side {
  margin: 0;
  width: min(100%, 150px);
  justify-self: end;
  align-self: start;
  aspect-ratio: 3 / 4;
}

.course-card-art-still {
  width: min(100%, 176px);
}

.course-card-art-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.course-list {
  margin: 0.75rem 0 1rem 1.1rem;
  padding: 0;
  line-height: 1.6;
  font-weight: 700;
}

.mode-card-active {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(209, 250, 229, 0.92));
}

.status-pill,
.mini-status {
  padding: 0.9rem 1rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.76);
  border: 2px solid rgba(15, 118, 110, 0.14);
}

.status-label {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-strong);
}

.mode-badge {
  display: inline-flex;
  width: fit-content;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  background: #d1fae5;
  color: #065f46;
  font-weight: 700;
}

.mode-badge-soon {
  background: #fef3c7;
  color: #92400e;
}

.card-heading,
.progress-meta,
.settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.status-chip {
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: var(--accent-soft);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent-strong);
}

.camera-stack {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  margin-top: 1rem;
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.2), rgba(255, 255, 255, 0.7)),
    #d1fae5;
}

.camera-feed,
.camera-mask,
.guide-frame {
  position: absolute;
  inset: 0;
}

.camera-feed {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}

.camera-mask {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 1rem;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.76), rgba(15, 23, 42, 0.84));
  color: white;
}

.mask-figure {
  width: min(34vw, 10rem);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at center 40%, transparent 0 28%, rgba(255, 255, 255, 0.8) 29% 32%, transparent 33%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0.55));
}

.guide-frame {
  display: grid;
  place-items: center;
  pointer-events: none;
}

.still-heart-face-frame {
  position: absolute;
  left: 10%;
  top: 50%;
  width: 24%;
  aspect-ratio: 1;
  border: 10px solid rgba(255, 255, 255, 0.98);
  border-radius: 50%;
  box-shadow:
    0 0 0 6px rgba(15, 23, 42, 0.24),
    inset 0 0 0 4px rgba(255, 255, 255, 0.82);
  transform: translateY(-50%);
  pointer-events: none;
}

.guide-frame::before {
  content: "";
  width: 68%;
  height: 78%;
  border: 4px dashed rgba(255, 255, 255, 0.8);
  border-radius: 38%;
}

.guide-mouth {
  position: absolute;
  bottom: 26%;
  width: 19%;
  height: 11%;
  border: 6px solid rgba(255, 255, 255, 0.92);
  border-radius: 999px;
}

.guide-body {
  position: absolute;
  bottom: 15%;
  width: 24%;
  height: 45%;
  border: 6px solid rgba(255, 255, 255, 0.92);
  border-radius: 999px 999px 30% 30%;
}

.guide-frame.guide-ear-mode::before {
  width: 56%;
  height: 74%;
  border-radius: 42%;
  transform: translateX(8%);
}

.guide-frame.guide-heart-mode::before {
  width: 88%;
  height: 58%;
  border-radius: 24%;
  border-style: solid;
  border-color: rgba(255, 255, 255, 0.96);
  box-shadow:
    0 0 0 10px rgba(15, 23, 42, 0.18),
    inset 0 0 0 2px rgba(255, 255, 255, 0.42);
}

.guide-body.guide-ear-shape {
  bottom: 24%;
  width: 16%;
  height: 30%;
  border-radius: 55% 45% 52% 48%;
  transform: translateX(24%) rotate(10deg);
}

.guide-body.guide-ear-shape::before {
  content: "";
  position: absolute;
  inset: 20% 22% 18% 26%;
  border: 5px solid rgba(255, 255, 255, 0.88);
  border-radius: 56% 44% 58% 42%;
}

.guide-body.guide-heart-shape {
  bottom: 22%;
  width: 10%;
  height: 34%;
  border: 6px solid rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  background: linear-gradient(rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.92)) center 24% / 160% 6px no-repeat;
}

.guide-body.guide-heart-shape::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -34%;
  width: 150%;
  height: 24%;
  border: 6px solid rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  transform: translateX(-50%);
}

.guide-body.guide-heart-shape::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -46%;
  width: 360%;
  height: 66%;
  border-left: 6px solid rgba(255, 255, 255, 0.92);
  border-right: 6px solid rgba(255, 255, 255, 0.92);
  border-top: 6px solid rgba(255, 255, 255, 0.92);
  transform: translateX(-50%);
  clip-path: polygon(14% 18%, 30% 52%, 38% 52%, 46% 0, 54% 0, 62% 52%, 70% 52%, 86% 18%, 92% 24%, 74% 62%, 62% 62%, 56% 100%, 44% 100%, 38% 62%, 26% 62%, 8% 24%);
}

.guide-heart-face {
  position: absolute;
  left: 11%;
  top: 50%;
  width: 26%;
  aspect-ratio: 1;
  border: 10px solid rgba(255, 255, 255, 0.98);
  border-radius: 50%;
  box-shadow:
    0 0 0 6px rgba(15, 23, 42, 0.22),
    inset 0 0 0 4px rgba(255, 255, 255, 0.82);
  transform: translateY(-50%);
}

.guide-heart-svg-wrap {
  position: absolute;
  inset: 8% 4%;
  display: none;
  place-items: center;
  z-index: 2;
}

.guide-heart-svg {
  width: 100%;
  height: 100%;
}

.guide-frame.guide-heart-mode .guide-body {
  display: none;
}

.guide-frame.guide-heart-mode .guide-heart-svg-wrap {
  display: none;
}

.guide-face-turn {
  position: absolute;
  width: 46%;
  height: 46%;
  border: 6px solid rgba(255, 255, 255, 0.92);
  border-radius: 50%;
}

.guide-face-turn::before,
.guide-face-turn::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 24%;
  height: 0;
  border-top: 6px solid rgba(255, 255, 255, 0.92);
}

.guide-face-turn::before {
  left: -26%;
}

.guide-face-turn::after {
  right: -26%;
}

.prompt-illustration {
  display: grid;
  place-items: center;
  min-height: 12rem;
  padding: 1rem 0;
}

.face-circle {
  position: relative;
  width: min(46vw, 13rem);
  aspect-ratio: 1;
  border-radius: 50%;
  background: #fde68a;
  box-shadow: inset 0 -12px 0 rgba(255, 255, 255, 0.35);
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.face-circle-coaching {
  transform: translateY(-2px) scale(1.01);
  box-shadow:
    inset 0 -12px 0 rgba(255, 255, 255, 0.35),
    0 0 0 6px rgba(245, 158, 11, 0.18);
}

.face-circle-happy {
  background: #fde047;
  box-shadow:
    inset 0 -12px 0 rgba(255, 255, 255, 0.35),
    0 10px 24px rgba(16, 185, 129, 0.2);
}

.face-circle-happy .eye {
  top: 36%;
  height: 7%;
  border-radius: 999px 999px 0 0;
}

.exam-icon {
  display: grid;
  place-items: center;
  min-height: 12rem;
}

.direction-illustration,
.vision-illustration {
  display: grid;
  place-items: center;
  min-height: 12rem;
  padding: 1rem 0;
}

.vision-eye-coach {
  position: relative;
  display: grid;
  place-items: center;
  width: min(48vw, 13rem);
  aspect-ratio: 1;
  gap: 0.5rem;
  transition: transform 180ms ease, opacity 180ms ease;
}

.vision-coach-copy {
  font-size: 0.95rem;
  font-weight: 800;
  color: #0f766e;
  text-align: center;
}

.vision-coach-svg {
  display: block;
  width: 100%;
  height: auto;
}

.direction-arrow {
  position: relative;
  width: min(46vw, 12rem);
  height: 2rem;
  border-radius: 999px;
  background: linear-gradient(90deg, #93c5fd, #2563eb);
  transition: transform 180ms ease, filter 180ms ease;
}

.direction-arrow::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -0.2rem;
  width: 2.6rem;
  height: 2.6rem;
  transform: translateY(-50%) rotate(45deg);
  border-top: 0.8rem solid #1d4ed8;
  border-right: 0.8rem solid #1d4ed8;
}

.direction-left {
  transform: scaleX(-1);
}

.direction-right {
  transform: scaleX(1);
}

.direction-arrow.is-complete {
  filter: drop-shadow(0 0 12px rgba(34, 197, 94, 0.35));
}

.vision-landolt {
  display: none;
  place-items: center;
  width: min(42vw, 12rem);
  aspect-ratio: 1;
  color: #0f172a;
  font-size: min(34vw, 9.5rem);
  font-weight: 800;
  line-height: 1;
  transition: transform 180ms ease, filter 180ms ease;
}

.vision-landolt.is-visible {
  display: grid;
}

.landolt-up {
  transform: rotate(-90deg);
}

.landolt-right {
  transform: rotate(0deg);
}

.landolt-down {
  transform: rotate(90deg);
}

.landolt-left {
  transform: rotate(180deg);
}

.vision-answer-grid {
  display: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.vision-answer-grid.is-visible {
  display: grid;
}

.answer-button {
  min-height: 3.5rem;
  border: 2px solid rgba(15, 118, 110, 0.18);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  transition:
    transform 140ms ease,
    background 140ms ease,
    border-color 140ms ease;
}

.answer-button.is-selected {
  background: #ccfbf1;
  border-color: #14b8a6;
  transform: translateY(-2px);
}

.still-exam-chooser {
  margin-top: 1.25rem;
}

.still-exam-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.exam-choice-button {
  min-height: 4rem;
  border: 2px solid rgba(15, 118, 110, 0.16);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
}

.exam-icon-shape {
  width: min(42vw, 11rem);
  aspect-ratio: 1;
  border-radius: 24px;
  background: linear-gradient(180deg, #ecfccb, #bbf7d0);
  position: relative;
}

.still-custom-image {
  display: block;
  width: min(42vw, 11rem);
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 24px;
  box-shadow: 0 0.8rem 2rem rgba(15, 23, 42, 0.12);
}

.exam-naika::before,
.exam-ganka::before,
.exam-shindenzu::before,
.exam-jibika::before {
  content: "";
  position: absolute;
  inset: 22%;
}

.exam-naika::before {
  inset: 18% 18% 24% 18%;
  border: 8px solid #0f766e;
  border-bottom: none;
  border-radius: 999px 999px 0 0;
}

.exam-naika::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 18%;
  width: 44%;
  height: 30%;
  transform: translateX(-50%);
  border-left: 8px solid #0f766e;
  border-right: 8px solid #0f766e;
  border-bottom: 8px solid #0f766e;
  border-radius: 0 0 999px 999px;
  box-shadow:
    -24px 18px 0 -14px #0f766e,
    24px 18px 0 -14px #0f766e;
}

.exam-ganka::before {
  border-radius: 999px;
  border: 10px solid #1d4ed8;
  box-shadow:
    -42px 0 0 -18px #1d4ed8,
    42px 0 0 -18px #1d4ed8;
}

.exam-shindenzu::before {
  inset: 32% 18%;
  border-left: 10px solid transparent;
  border-bottom: 10px solid #dc2626;
  transform: skewX(-24deg);
  box-shadow:
    20px -8px 0 0 #dc2626,
      42px 10px 0 0 #dc2626,
      60px -12px 0 0 #dc2626;
}

.exam-jibika::before {
  inset: 28% 22%;
  border-left: 10px solid #7c3aed;
  border-right: 10px solid #7c3aed;
  border-radius: 999px;
}

.exam-jibika::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 28%;
  width: 56%;
  height: 34%;
  transform: translateX(-50%);
  border-top: 10px solid #7c3aed;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-radius: 999px 999px 0 0;
}

.eye {
  position: absolute;
  top: 34%;
  width: 12%;
  height: 12%;
  border-radius: 50%;
  background: var(--text);
}

.eye.left {
  left: 28%;
}

.eye.right {
  right: 28%;
}

.illustration-mouth {
  position: absolute;
  left: 50%;
  bottom: 23%;
  width: 22%;
  height: 11%;
  transform: translateX(-50%);
  border-radius: 999px;
  background: #7c2d12;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.15);
  transition:
    height 140ms ease,
    width 140ms ease,
    border-radius 140ms ease,
    background 140ms ease,
    transform 140ms ease;
}

.mouth-mode-switch {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.mouth-mode-button {
  flex: 1;
  border: 2px solid rgba(15, 118, 110, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--accent-strong);
  font-weight: 800;
  padding: 0.8rem 1rem;
  cursor: pointer;
}

.mouth-mode-button.active {
  background: linear-gradient(180deg, #0f766e, #14b8a6);
  color: #fff;
  border-color: transparent;
}

.illustration-mouth-almost {
  width: 24%;
  height: 14%;
  border-radius: 38% 38% 48% 48%;
  background: #9a3412;
  transform: translateX(-50%) translateY(2px);
}

.illustration-mouth-open {
  width: 18%;
  height: 23%;
  border-radius: 45%;
  background: #431407;
}

.illustration-mouth-done {
  width: 19%;
  height: 25%;
  border-radius: 46%;
  background: #166534;
}

.face-circle-eee .eye {
  transform: translateY(1px);
}

.illustration-mouth-eee-almost {
  width: 30%;
  height: 9%;
  border-radius: 999px;
  background: #b45309;
  transform: translateX(-50%) translateY(-2px);
}

.illustration-mouth-eee {
  width: 34%;
  height: 7%;
  border-radius: 999px;
  background:
    linear-gradient(180deg, #fafaf9 0 44%, #7c2d12 44% 56%, #fafaf9 56% 100%);
  border: 3px solid #7c2d12;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.35);
}

.progress-meta {
  margin: 1rem 0 0.5rem;
  font-weight: 700;
}

.progress-track {
  width: 100%;
  height: 2rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  border: 2px solid rgba(15, 118, 110, 0.18);
}

.progress-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background:
    linear-gradient(90deg, #14b8a6, #22c55e),
    #14b8a6;
  transition: width 100ms linear;
}

.prompt-text,
.support-text {
  margin: 1rem 0 0;
  line-height: 1.6;
}

.ratio-label {
  margin: 0.75rem 0 0;
  font-weight: 700;
  color: var(--accent-strong);
}

.vision-debug-label {
  margin: 0.5rem 0 0;
  padding: 0.75rem 0.9rem;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.9);
  color: #e2e8f0;
  font-size: 0.82rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.celebration {
  position: relative;
  overflow: hidden;
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 20px;
  background: linear-gradient(135deg, #f97316, #facc15);
  color: white;
  font-weight: 700;
  text-align: center;
}

.confetti-layer {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 10% 20%, #ffffff 0 4px, transparent 5px),
    radial-gradient(circle at 35% 70%, #fef08a 0 5px, transparent 6px),
    radial-gradient(circle at 60% 25%, #dcfce7 0 5px, transparent 6px),
    radial-gradient(circle at 80% 60%, #bfdbfe 0 4px, transparent 5px);
  animation: drift 3s linear infinite;
  opacity: 0.8;
}

.manual-trigger,
.primary-button,
.close-button {
  border: none;
  border-radius: 22px;
  cursor: pointer;
}

.secondary-button {
  width: 100%;
  min-height: 3.5rem;
  margin-top: 1rem;
  border: 2px solid #94a3b8;
  border-radius: 22px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
  background: #f8fafc;
}

.manual-trigger,
.primary-button {
  width: 100%;
  min-height: 4rem;
  margin-top: 1rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: white;
  background: linear-gradient(180deg, var(--accent), var(--accent-strong));
}

.manual-trigger.is-active {
  background: linear-gradient(180deg, #22c55e, #16a34a);
}

.settings-dialog {
  width: min(32rem, calc(100vw - 2rem));
  padding: 0;
  border: none;
  background: transparent;
}

.settings-dialog::backdrop {
  background: rgba(15, 23, 42, 0.32);
  backdrop-filter: blur(8px);
}

.settings-panel {
  padding: 1rem;
}

.field {
  display: grid;
  gap: 0.5rem;
  margin-top: 1rem;
}

.field select,
.field input[type="range"] {
  width: 100%;
}

.checkbox-field {
  grid-template-columns: auto 1fr;
  align-items: center;
}

.field-stack {
  grid-template-columns: 1fr;
}

.settings-image-preview {
  display: block;
  width: min(100%, 14rem);
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 18px;
  box-shadow: 0 0.7rem 1.6rem rgba(15, 23, 42, 0.12);
}

.close-button {
  padding: 0.75rem 1rem;
  background: #e2e8f0;
}

.hidden {
  display: none !important;
}

@keyframes drift {
  from {
    transform: translateY(-8px);
  }
  50% {
    transform: translateY(8px);
  }
  to {
    transform: translateY(-8px);
  }
}

@media (max-width: 900px) {
  .home-hero-layout {
    grid-template-columns: 1fr;
  }

  .home-hero-figure {
    justify-self: center;
    width: min(100%, 22rem);
  }

  .layout,
  .home-layout {
    grid-template-columns: 1fr;
  }

  .course-card-layout {
    grid-template-columns: 1fr;
  }

  .course-card-art-side {
    aspect-ratio: 16 / 9;
  }

  .status-strip,
  .mode-status-grid {
    grid-template-columns: 1fr;
  }
}
