:root {
  --ink: #46342d;
  --muted: #7b6c65;
  --paper: #fff9f0;
  --paper-strong: #fffefd;
  --line: #ecd6c9;
  --blue: #94cdec;
  --blue-soft: #e9f6ff;
  --pink: #ffc5d1;
  --pink-soft: #fff0f4;
  --mint: #c8ead2;
  --violet: #d9d1fb;
  --yellow: #ffe58b;
  --coral: #f28674;
  --good: #4f9f66;
  --bad: #c95555;
  --shadow: 0 18px 44px rgba(72, 49, 40, 0.15);
  --radius: 8px;
  font-family: "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 18px 18px, rgba(255, 197, 209, 0.32) 0 4px, transparent 5px),
    linear-gradient(135deg, #f5fbff 0%, #fff4f7 46%, #fff9e8 100%);
  background-size: 44px 44px, auto;
  letter-spacing: 0;
  overflow-x: hidden;
}

button,
input,
select {
  font: inherit;
}

button {
  color: inherit;
}

svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  flex: 0 0 auto;
}

.svg-sprite {
  position: absolute;
}

.shell,
.screen {
  min-height: 100vh;
}

.screen {
  display: none;
}

.screen.active {
  display: block;
}

.home-screen {
  position: relative;
  overflow: hidden;
  padding: 24px;
}

.home-bg {
  position: absolute;
  inset: 24px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(255, 254, 250, 0.96) 0%, rgba(255, 254, 250, 0.78) 42%, rgba(255, 254, 250, 0.12) 78%),
    url("assets/momonga-study-hero.png") center / cover no-repeat;
  box-shadow: var(--shadow);
}

.home-copy {
  position: relative;
  z-index: 2;
  width: min(620px, calc(100vw - 56px));
  min-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 32px 0 32px min(6vw, 72px);
}

.pill,
.eyebrow,
.badge {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  padding: 7px 10px;
  border: 1px solid rgba(70, 52, 45, 0.17);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.home-copy h1 {
  margin: 14px 0 0;
  max-width: 560px;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.05;
  letter-spacing: 0;
  text-wrap: balance;
}

.home-subtitle {
  max-width: 540px;
  margin: 16px 0 0;
  color: #634e45;
  font-size: 17px;
  line-height: 1.75;
  font-weight: 800;
}

.primary-action,
.ghost-action,
.small-action,
.mode-nav button,
.vocab-tabs button,
.study-style-tabs button,
.speaker-button,
.choice-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper-strong);
  color: var(--ink);
  cursor: pointer;
  font-weight: 950;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease, border-color 150ms ease;
}

.primary-action {
  width: fit-content;
  min-height: 50px;
  margin-top: 26px;
  padding: 12px 18px;
  background: var(--yellow);
  box-shadow: 0 5px 0 var(--ink);
}

.primary-action.compact,
.small-action,
.ghost-action {
  min-height: 42px;
  padding: 9px 12px;
  margin: 0;
}

.primary-action:hover,
.ghost-action:hover,
.small-action:hover,
.mode-nav button:hover,
.vocab-tabs button:hover,
.study-style-tabs button:hover,
.speaker-button:hover,
.choice-option:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 0 var(--ink);
}

.primary-action:disabled,
.ghost-action:disabled,
.small-action:disabled,
.speaker-button:disabled,
.choice-option:disabled {
  cursor: not-allowed;
  opacity: 0.58;
  transform: none;
  box-shadow: none;
}

.ghost-action {
  background: #fff;
}

.choice-option span {
  white-space: pre-line;
}

.small-action {
  background: var(--blue-soft);
}

.small-action.active {
  background: var(--pink);
}

.load-status {
  min-height: 22px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.home-coach {
  position: absolute;
  z-index: 3;
  right: min(7vw, 86px);
  bottom: 54px;
  width: min(300px, calc(100vw - 64px));
  min-height: 96px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: rgba(255, 254, 253, 0.9);
  box-shadow: 0 10px 28px rgba(72, 49, 40, 0.16);
}

.home-coach img {
  width: 76px;
  height: 76px;
  object-fit: contain;
  filter: drop-shadow(0 5px 0 rgba(70, 52, 45, 0.1));
}

.home-coach b,
.home-coach span {
  display: block;
}

.home-coach b {
  font-size: 18px;
}

.home-coach span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  font-weight: 900;
}

.floating-bit {
  position: absolute;
  z-index: 2;
  pointer-events: none;
  filter: drop-shadow(0 2px 0 rgba(70, 52, 45, 0.16));
}

.bit-star {
  left: 9vw;
  top: 12vh;
  width: 20px;
  height: 20px;
  background: var(--yellow);
  clip-path: polygon(50% 0, 61% 36%, 98% 36%, 68% 57%, 80% 94%, 50% 71%, 20% 94%, 32% 57%, 2% 36%, 39% 36%);
}

.bit-card {
  right: 24vw;
  top: 12vh;
  width: 46px;
  height: 31px;
  border: 2px solid rgba(70, 52, 45, 0.62);
  border-radius: 7px;
  background:
    linear-gradient(90deg, rgba(148, 205, 236, 0.5) 0 11px, transparent 12px),
    repeating-linear-gradient(180deg, transparent 0 8px, rgba(70, 52, 45, 0.18) 9px 10px),
    rgba(255, 255, 255, 0.86);
  transform: rotate(-7deg);
}

.bit-pencil {
  right: 10vw;
  bottom: 24vh;
  width: 54px;
  height: 13px;
  border: 2px solid rgba(70, 52, 45, 0.72);
  border-radius: 999px;
  background: linear-gradient(90deg, var(--yellow) 0 24%, var(--pink) 25% 76%, #fff 77% 100%);
  transform: rotate(-18deg);
}

.study-screen.active {
  width: min(1760px, calc(100% - 28px));
  min-height: calc(100vh - 28px);
  margin: 14px auto;
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
  gap: 14px;
}

.side-panel,
.workbench {
  min-width: 0;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: rgba(255, 250, 243, 0.94);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.side-panel {
  position: sticky;
  top: 14px;
  height: calc(100vh - 28px);
  display: flex;
  flex-direction: column;
}

.brand {
  min-height: 70px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  background: var(--paper-strong);
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: linear-gradient(145deg, var(--blue-soft), var(--pink));
}

.brand strong,
.brand span {
  display: block;
}

.brand strong {
  font-size: 18px;
  line-height: 1.1;
}

.brand span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.coach-card {
  position: relative;
  padding: 16px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.58), rgba(255, 255, 255, 0)),
    var(--pink-soft);
  text-align: center;
  overflow: hidden;
}

.coach-card::before {
  content: "";
  position: absolute;
  right: 17px;
  top: 18px;
  width: 23px;
  height: 23px;
  border: 2px solid rgba(70, 52, 45, 0.64);
  border-radius: 7px;
  background: linear-gradient(90deg, transparent 8px, rgba(148, 205, 236, 0.52) 9px 11px, transparent 12px), #fff;
  transform: rotate(8deg);
}

.avatar-frame {
  width: 160px;
  height: 150px;
  margin: 0 auto 8px;
  display: grid;
  place-items: center;
}

.avatar-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 8px 0 rgba(70, 52, 45, 0.08));
}

.coach-card h2 {
  margin: 0;
  font-size: 22px;
}

.coach-card p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  font-weight: 850;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
}

.stats-grid div {
  min-width: 0;
  padding: 10px 5px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
  text-align: center;
}

.stats-grid b,
.stats-grid span {
  display: block;
}

.stats-grid b {
  font-size: 18px;
}

.stats-grid span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
}

.mode-nav {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.mode-nav button {
  width: 100%;
  min-height: 44px;
  justify-content: flex-start;
  padding: 10px 12px;
  box-shadow: 0 3px 0 var(--ink);
}

.mode-nav button.active {
  background: var(--yellow);
}

.side-panel > .ghost-action {
  margin: auto 12px 12px;
}

.workbench {
  min-height: calc(100vh - 28px);
  background: rgba(255, 254, 250, 0.96);
}

.topbar {
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.topbar h2 {
  margin: 6px 0 0;
  font-size: clamp(22px, 3vw, 32px);
  line-height: 1.18;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.quiz-format-label {
  min-width: 118px;
}

.select-label,
.target-box label,
.blank-form label,
.dictation-form label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
}

select,
input {
  min-height: 40px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font-weight: 850;
}

select {
  padding: 7px 32px 7px 10px;
}

input {
  width: 100%;
  padding: 8px 10px;
}

.panel {
  display: none;
  margin: 16px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper-strong);
  box-shadow: 0 10px 24px rgba(72, 49, 40, 0.09);
  overflow: hidden;
}

.panel.active-panel {
  display: block;
}

.panel-head {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fff, #fff8f1);
}

.panel-head h3 {
  margin: 5px 0 0;
  font-size: 20px;
}

.question-card {
  padding: 16px;
}

.passage-box {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fffaf5;
  color: #59443d;
  line-height: 1.72;
  font-weight: 720;
}

.question-card h4 {
  margin: 16px 0 0;
  font-size: 20px;
  line-height: 1.45;
}

.choice-grid {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.choice-option {
  min-height: 50px;
  justify-content: flex-start;
  padding: 11px 12px;
  text-align: left;
  line-height: 1.45;
  background: #fff;
}

.choice-option b {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--blue-soft);
  flex: 0 0 auto;
}

.choice-option.correct {
  background: #eef9f0;
  border-color: var(--good);
}

.choice-option.wrong {
  background: #fff0f0;
  border-color: var(--bad);
}

.blank-form,
.dictation-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
  margin-top: 14px;
}

.feedback-box {
  margin: 0 16px 16px;
  padding: 12px;
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--blue-soft);
}

.feedback-box[data-state="bad"] {
  background: #fff0f0;
}

.mood-avatar {
  position: relative;
  width: 74px;
  height: 70px;
  display: grid;
  place-items: center;
}

.mood-avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 0 rgba(70, 52, 45, 0.08));
}

.mood-avatar[data-mood="sad"] img {
  filter: grayscale(0.4) saturate(0.75) drop-shadow(0 4px 0 rgba(70, 52, 45, 0.08));
  transform: rotate(-3deg);
}

.mood-avatar[data-mood="happy"]::before,
.mood-avatar[data-mood="happy"]::after,
.goal-spark {
  content: "";
  position: absolute;
  width: 13px;
  height: 13px;
  background: var(--yellow);
  clip-path: polygon(50% 0, 61% 36%, 98% 36%, 68% 57%, 80% 94%, 50% 71%, 20% 94%, 32% 57%, 2% 36%, 39% 36%);
}

.mood-avatar[data-mood="happy"]::before {
  right: -4px;
  top: 6px;
}

.mood-avatar[data-mood="happy"]::after {
  left: -3px;
  bottom: 9px;
  width: 10px;
  height: 10px;
  background: var(--pink);
}

.mood-avatar[data-mood="sad"]::after {
  content: "";
  position: absolute;
  right: 11px;
  top: 25px;
  width: 7px;
  height: 12px;
  border-radius: 999px;
  background: var(--blue);
  transform: rotate(10deg);
}

.feedback-box strong {
  display: block;
  font-size: 18px;
}

.feedback-box p {
  margin: 5px 0 0;
  color: #59443d;
  line-height: 1.55;
  font-weight: 780;
}

.feedback-box .logic {
  color: var(--muted);
  font-size: 13px;
}

.action-row {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 0 16px 16px;
  flex-wrap: wrap;
}

.action-row.center {
  justify-content: center;
  padding: 0;
}

.vocab-head {
  align-items: center;
}

.target-box {
  display: flex;
  align-items: end;
  gap: 10px;
}

.target-box input {
  width: 92px;
}

.study-style-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin: 10px 16px 0;
  padding: 5px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 18px 14px, rgba(255, 197, 209, 0.34) 0 4px, transparent 5px),
    radial-gradient(circle at 48px 30px, rgba(148, 205, 236, 0.28) 0 4px, transparent 5px),
    #fff;
  background-size: 64px 42px;
}

.vocab-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin: 14px 16px 0;
  padding: 5px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: #fff;
}

.vocab-tabs button,
.study-style-tabs button {
  min-height: 40px;
  border: 0;
  box-shadow: none;
  background: transparent;
  color: var(--muted);
}

.vocab-tabs button.active,
.study-style-tabs button.active {
  background: var(--yellow);
  color: var(--ink);
}

.target-meter {
  display: grid;
  gap: 8px;
  margin: 14px 16px 0;
}

.meter-copy {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 950;
}

.meter {
  height: 12px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: #fff;
  overflow: hidden;
}

.meter span {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--pink), var(--yellow), var(--mint), var(--blue));
  transition: width 220ms ease;
}

.word-stage {
  position: relative;
  min-height: clamp(360px, calc(100vh - 380px), 430px);
  display: grid;
  align-content: start;
  gap: 14px;
  margin: 16px;
  padding: 18px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 24px 24px, rgba(255, 197, 209, 0.34) 0 4px, transparent 5px),
    radial-gradient(circle at 66px 58px, rgba(148, 205, 236, 0.24) 0 4px, transparent 5px),
    radial-gradient(circle at 92% 10%, rgba(255, 197, 209, 0.58) 0 66px, transparent 67px),
    radial-gradient(circle at 10% 90%, rgba(217, 209, 251, 0.55) 0 76px, transparent 77px),
    #fff;
  background-size: 86px 72px, 86px 72px, auto, auto, auto;
}

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

.speaker-button {
  position: absolute;
  right: 18px;
  top: 18px;
  min-height: 40px;
  padding: 9px 11px;
  background: var(--blue-soft);
}

.word-stage h4 {
  margin: 52px 0 0;
  max-width: 100%;
  font-size: var(--word-term-fit-size, clamp(34px, 7vw, 68px));
  line-height: 1.05;
  letter-spacing: 0;
  justify-self: start;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: keep-all;
}

.word-stage p {
  max-width: 680px;
  margin: 0;
  color: #59443d;
  line-height: 1.72;
  font-size: 16px;
  font-weight: 800;
  white-space: pre-line;
}

.meaning-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 6px;
}

.meaning-options .choice-option {
  min-height: 74px;
  align-items: flex-start;
  background:
    radial-gradient(circle at 18px 16px, rgba(255, 197, 209, 0.26) 0 4px, transparent 5px),
    radial-gradient(circle at calc(100% - 18px) calc(100% - 14px), rgba(148, 205, 236, 0.22) 0 5px, transparent 6px),
    rgba(255, 252, 247, 0.96);
  background-size: 58px 46px, 72px 54px, auto;
}

.vocab-panel.flash-mode .vocab-tabs,
.vocab-panel.flash-mode .panel-head,
.vocab-panel.flash-mode .target-meter,
.vocab-panel.flash-mode .feedback-box,
.vocab-panel.flash-mode > .action-row {
  display: none;
}

.vocab-panel.flash-mode .word-stage {
  min-height: clamp(460px, calc(100vh - 300px), 660px);
  place-items: center;
  align-content: center;
  text-align: center;
  gap: 26px;
  margin: 16px;
  background:
    radial-gradient(circle at 24px 24px, rgba(255, 197, 209, 0.36) 0 5px, transparent 6px),
    radial-gradient(circle at 72px 58px, rgba(148, 205, 236, 0.28) 0 5px, transparent 6px),
    radial-gradient(circle at 90% 13%, rgba(255, 229, 139, 0.62) 0 78px, transparent 80px),
    radial-gradient(circle at 11% 87%, rgba(217, 209, 251, 0.58) 0 92px, transparent 94px),
    #fff;
  background-size: 90px 76px, 90px 76px, auto, auto, auto;
}

.vocab-panel.flash-mode .word-meta,
.vocab-panel.flash-mode #wordDefinition {
  display: none;
}

.vocab-panel.flash-mode .speaker-button {
  display: inline-flex;
  position: absolute;
  right: 18px;
  top: 18px;
}

.vocab-panel.flash-mode .word-stage h4 {
  margin: 0;
  font-size: var(--word-term-fit-size, clamp(58px, 8vw, 128px));
  justify-self: center;
  max-width: min(920px, 100%);
}

.vocab-panel.flash-mode .meaning-options {
  width: min(900px, 100%);
  margin: 0 auto;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.vocab-panel.flash-mode .meaning-options .choice-option {
  min-height: 86px;
  justify-content: center;
  align-items: center;
  text-align: center;
  font-size: 19px;
  background:
    radial-gradient(circle at 22px 18px, rgba(255, 197, 209, 0.34) 0 5px, transparent 6px),
    radial-gradient(circle at calc(100% - 20px) calc(100% - 18px), rgba(148, 205, 236, 0.28) 0 6px, transparent 7px),
    rgba(255, 248, 251, 0.98);
  box-shadow: 0 4px 0 var(--ink);
}

.vocab-panel.flash-mode .meaning-options .choice-option b {
  background: var(--pink-soft);
}

.dictation-form {
  max-width: 620px;
}

.hidden {
  display: none !important;
}

.goal-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(70, 52, 45, 0.24);
  backdrop-filter: blur(3px);
}

.goal-card {
  position: relative;
  width: min(460px, 100%);
  padding: 24px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper-strong);
  box-shadow: var(--shadow);
  text-align: center;
}

.goal-card img {
  width: 156px;
  height: 140px;
  object-fit: contain;
  filter: drop-shadow(0 8px 0 rgba(70, 52, 45, 0.08));
}

.goal-card h2 {
  margin: 5px 0 0;
  font-size: 28px;
}

.goal-card p {
  margin: 10px auto 18px;
  max-width: 360px;
  color: #59443d;
  line-height: 1.65;
  font-weight: 850;
}

.spark-a {
  left: 28px;
  top: 34px;
}

.spark-b {
  right: 36px;
  top: 78px;
  width: 16px;
  height: 16px;
  background: var(--pink);
}

@media (max-width: 920px) {
  .study-screen.active {
    width: min(720px, calc(100% - 20px));
    grid-template-columns: 1fr;
    margin: 10px auto;
  }

  .side-panel {
    position: static;
    height: auto;
  }

  .brand {
    min-height: 56px;
    padding: 10px 14px;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
  }

  .stats-grid {
    padding: 10px;
  }

  .mode-nav {
    padding: 10px;
  }

  .side-panel > .ghost-action {
    margin: 0 10px 10px;
  }

  .coach-card {
    display: none;
  }

  .topbar,
  .panel-head,
  .vocab-head {
    align-items: stretch;
    flex-direction: column;
  }

  .top-actions,
  .target-box {
    width: 100%;
    align-items: stretch;
    flex-wrap: wrap;
  }

  .target-box label {
    flex: 1 1 120px;
  }

  .target-box input {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .home-screen {
    padding: 10px;
  }

  .home-bg {
    inset: 10px;
    background:
      linear-gradient(180deg, rgba(255, 254, 250, 0.96) 0%, rgba(255, 254, 250, 0.72) 46%, rgba(255, 254, 250, 0.12) 82%),
      url("assets/momonga-study-hero.png") 62% center / cover no-repeat;
  }

  .home-copy {
    width: calc(100vw - 20px);
    padding: 26px 18px 170px;
    justify-content: flex-start;
  }

  .home-copy h1 {
    font-size: clamp(32px, 12vw, 48px);
  }

  .home-subtitle {
    font-size: 15px;
  }

  .home-coach {
    left: 22px;
    right: 22px;
    bottom: 22px;
    width: auto;
  }

  .bit-card {
    right: 24px;
    top: 70px;
  }

  .bit-pencil {
    right: 24px;
    bottom: 176px;
  }

  .panel {
    margin: 8px;
  }

  .side-panel {
    gap: 0;
  }

  .side-panel .brand,
  .side-panel > .ghost-action {
    display: none;
  }

  .stats-grid {
    border-bottom: 0;
    padding: 8px;
  }

  .stats-grid div {
    padding: 8px 4px;
  }

  .stats-grid b {
    font-size: 16px;
  }

  .mode-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 0 8px 8px;
  }

  .mode-nav button {
    min-height: 40px;
    justify-content: center;
    padding: 8px;
  }

  .topbar {
    padding: 12px;
    min-height: 0;
  }

  .topbar h2 {
    font-size: 26px;
  }

  .top-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .top-actions .small-action,
  .top-actions select {
    width: 100%;
    min-height: 44px;
    padding-left: 8px;
    padding-right: 8px;
  }

  .top-actions .small-action {
    gap: 5px;
  }

  .select-label {
    min-width: 0;
  }

  .select-label span {
    font-size: 10px;
  }

  .panel-head {
    padding: 12px;
  }

  .panel-head h3 {
    font-size: 18px;
  }

  .question-card,
  .word-stage {
    padding: 14px;
  }

  .top-actions,
  .action-row,
  .blank-form,
  .dictation-form {
    display: grid;
    grid-template-columns: 1fr;
  }

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

  .study-screen[data-mode="quiz"] .top-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .meaning-options,
  .vocab-tabs,
  .study-style-tabs {
    grid-template-columns: 1fr;
  }

  .speaker-button {
    position: static;
    width: fit-content;
  }

  .word-stage h4 {
    margin-top: 8px;
    font-size: var(--word-term-fit-size, clamp(34px, 13vw, 54px));
  }

  .word-stage p {
    font-size: 14px;
    line-height: 1.55;
  }

  .meaning-options .choice-option {
    min-height: 64px;
    padding: 10px;
  }

  .vocab-panel.flash-mode .word-stage {
    min-height: min(620px, calc(100vh - 130px));
    padding: 18px;
  }

  .vocab-panel.flash-mode .meaning-options {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .vocab-panel.flash-mode .meaning-options .choice-option {
    min-height: 78px;
    font-size: 18px;
  }

  .vocab-panel.flash-mode .word-stage h4 {
    font-size: var(--word-term-fit-size, clamp(52px, 18vw, 78px));
  }

  .feedback-box {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .mood-avatar {
    margin: 0 auto;
  }
}
