:root {
  --paper: #fffdf8;
  --cream: #fbf6ec;
  --ink: #18231f;
  --muted: #665d4e;
  --green: #176b5d;
  --green-dark: #0f4e43;
  --red: #b84634;
  --gold: #c59a4a;
  --line: #eadfcb;
}

* {
  box-sizing: border-box;
}

html,
body,
#root {
  min-height: 100%;
  margin: 0;
}

html {
  min-width: 320px;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  background: linear-gradient(180deg, #fff 0%, var(--cream) 72%);
  color: var(--ink);
  font-family: Aptos, "Segoe UI", Arial, sans-serif;
  padding-bottom: env(safe-area-inset-bottom);
}

button,
select,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.94);
  backdrop-filter: blur(12px);
  padding-top: env(safe-area-inset-top);
}

.topbar-inner,
.page {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar-inner {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 0;
  align-items: center;
}

.brand {
  border: 0;
  background: transparent;
  text-align: left;
  color: inherit;
  padding: 0;
}

.brand span,
.eyebrow {
  color: var(--red);
  display: block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.brand strong {
  color: var(--green-dark);
  display: block;
  font-size: 24px;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.nav button,
.secondary,
.primary,
.danger {
  align-items: center;
  border-radius: 14px;
  display: inline-flex;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  font-weight: 800;
  text-decoration: none;
}

.nav button,
.secondary {
  background: white;
  border: 1px solid #d9cab3;
  color: #25443d;
}

.nav button.active,
.primary {
  background: var(--green);
  border: 1px solid var(--green);
  color: white;
  box-shadow: 0 12px 22px rgba(23, 107, 93, 0.18);
}

.danger {
  background: #f7e3df;
  border: 1px solid #e6aea5;
  color: #9d2f21;
}

.page {
  padding: 28px 0 54px;
  padding-bottom: calc(54px + env(safe-area-inset-bottom));
}

.mobile-install {
  align-items: center;
  background: #f3fbf7;
  border: 1px solid #cfe8dd;
  border-radius: 18px;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  margin: 14px auto 0;
  padding: 14px 16px;
  width: min(1180px, calc(100% - 32px));
}

.mobile-install strong {
  color: var(--green-dark);
  display: block;
  font-size: 18px;
}

.mobile-install p {
  color: var(--muted);
  margin: 4px 0 0;
}

.auth-shell {
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  align-items: stretch;
}

.auth-visual {
  border: 1px solid var(--line);
  border-radius: 30px;
  min-height: 560px;
  overflow: hidden;
  position: relative;
  background: #111;
  box-shadow: 0 28px 80px rgba(54, 37, 18, 0.2);
}

.auth-visual img {
  height: 100%;
  width: 100%;
  object-fit: cover;
  display: block;
}

.auth-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.74), rgba(0, 0, 0, 0.18));
}

.auth-visual > div {
  position: absolute;
  z-index: 1;
  inset: auto 34px 34px;
  color: white;
}

.auth-visual h1 {
  font-size: clamp(46px, 8vw, 82px);
  line-height: 0.96;
  margin: 10px 0;
}

.auth-visual p {
  font-size: 20px;
  line-height: 1.45;
  max-width: 650px;
}

.auth-panel {
  align-self: center;
}

.hero {
  min-height: 520px;
  border-radius: 30px;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--line);
  background: #111;
  box-shadow: 0 28px 80px rgba(54, 37, 18, 0.22);
}

.hero img,
.banner img,
.level-card img,
.study-card > img,
.quiz-image,
.preview-card img,
.review-card img,
.photo-frame img {
  width: 100%;
  object-fit: cover;
  display: block;
}

.photo-frame {
  background: #fffdf8;
  margin: 0;
}

.hero img {
  height: 520px;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.34), transparent);
}

.hero-content {
  position: absolute;
  z-index: 1;
  left: 0;
  bottom: 0;
  max-width: 680px;
  padding: 42px;
  color: white;
}

.hero-content h1 {
  margin: 10px 0;
  font-size: clamp(44px, 8vw, 78px);
  line-height: 0.95;
}

.hero-content p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 19px;
  line-height: 1.7;
}

.grid {
  display: grid;
  gap: 18px;
}

.two {
  grid-template-columns: 1.05fr 0.95fr;
}

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

.four {
  grid-template-columns: repeat(4, 1fr);
}

.surface,
.stat,
.level-card,
.preview-card,
.review-card {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 18px 48px rgba(66, 49, 23, 0.08);
}

.surface {
  padding: 26px;
}

.section {
  margin-top: 22px;
}

.title {
  color: var(--green-dark);
  font-size: clamp(28px, 5vw, 42px);
  margin: 6px 0 8px;
}

.copy,
.muted {
  color: var(--muted);
  line-height: 1.65;
}

.field {
  display: grid;
  gap: 8px;
}

.field span {
  color: #4d4538;
  font-weight: 800;
}

.field select,
.field input {
  background: var(--paper);
  border: 1px solid #d9cab3;
  border-radius: 14px;
  min-height: 48px;
  padding: 12px;
  width: 100%;
}

.level-strip {
  align-items: center;
  background: #fffaf0;
  border: 1px solid var(--line);
  border-radius: 18px;
  display: flex;
  gap: 14px;
  padding: 14px;
}

.level-strip b {
  align-items: center;
  background: var(--green);
  border-radius: 999px;
  color: white;
  display: grid;
  height: 40px;
  place-items: center;
  width: 40px;
}

.preview-card {
  overflow: hidden;
}

.preview-card img {
  height: 170px;
}

.preview-card div {
  padding: 16px;
}

.dashboard {
  background-image: linear-gradient(110deg, rgba(18, 58, 51, 0.94), rgba(18, 58, 51, 0.72)), url("https://images.unsplash.com/photo-1516483638261-f4dbaf036963?auto=format&fit=crop&w=1600&q=80");
  background-size: cover;
  background-position: center;
  border-radius: 28px;
  color: white;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 34px;
}

.dashboard .copy {
  color: rgba(255, 255, 255, 0.86);
}

.reward-shortcuts {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.reward-shortcut {
  border: 0;
  border-radius: 24px;
  box-shadow: 0 18px 48px rgba(66, 49, 23, 0.12);
  color: white;
  min-height: 190px;
  overflow: hidden;
  padding: 26px;
  position: relative;
  text-align: left;
}

.reward-shortcut::after {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  content: "";
  height: 170px;
  position: absolute;
  right: -44px;
  top: -44px;
  width: 170px;
}

.reward-shortcut .eyebrow {
  color: rgba(255, 255, 255, 0.82);
}

.reward-shortcut strong {
  display: block;
  font-size: clamp(30px, 5vw, 44px);
  line-height: 1;
  margin: 12px 0;
}

.reward-shortcut small {
  color: rgba(255, 255, 255, 0.88);
  display: block;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
  max-width: 520px;
}

.recipes-shortcut {
  background: linear-gradient(135deg, rgba(18, 58, 51, 0.96), rgba(184, 70, 52, 0.78)), url("https://images.unsplash.com/photo-1516483638261-f4dbaf036963?auto=format&fit=crop&w=1200&q=80");
  background-position: center;
  background-size: cover;
}

.traditions-shortcut {
  background: linear-gradient(135deg, rgba(15, 78, 67, 0.96), rgba(197, 154, 74, 0.72)), url("https://images.unsplash.com/photo-1523906834658-6e24ef2386f9?auto=format&fit=crop&w=1200&q=80");
  background-position: center;
  background-size: cover;
}

.funfact-shortcut {
  background: linear-gradient(135deg, rgba(184, 70, 52, 0.94), rgba(23, 107, 93, 0.76)), url("https://images.unsplash.com/photo-1534445867742-43195f401b6c?auto=format&fit=crop&w=1200&q=80");
  background-position: center;
  background-size: cover;
}

.ai-speaking-shortcut {
  background: linear-gradient(135deg, rgba(15, 78, 67, 0.95), rgba(48, 72, 121, 0.72)), url("https://images.unsplash.com/photo-1507842217343-583bb7270b66?auto=format&fit=crop&w=1200&q=80");
  background-position: center;
  background-size: cover;
}

.start-fresh-card {
  background:
    linear-gradient(135deg, rgba(255, 253, 248, 0.96), rgba(234, 248, 241, 0.94)),
    url("https://images.unsplash.com/photo-1534445867742-43195f401b6c?auto=format&fit=crop&w=1200&q=80");
  background-position: center;
  background-size: cover;
  border-color: rgba(23, 107, 93, 0.2);
}

.recipe-hero {
  background-image: linear-gradient(110deg, rgba(18, 58, 51, 0.94), rgba(101, 58, 28, 0.6)), url("https://images.unsplash.com/photo-1516483638261-f4dbaf036963?auto=format&fit=crop&w=1600&q=80");
  background-position: center;
  background-size: cover;
  border-radius: 28px;
  color: white;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  padding: 34px;
}

.recipe-hero .copy {
  color: rgba(255, 255, 255, 0.88);
}

.tradition-hero {
  background-image: linear-gradient(110deg, rgba(18, 58, 51, 0.95), rgba(184, 70, 52, 0.58)), url("https://images.unsplash.com/photo-1523906834658-6e24ef2386f9?auto=format&fit=crop&w=1600&q=80");
  background-position: center;
  background-size: cover;
  border-radius: 28px;
  color: white;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  padding: 34px;
}

.tradition-hero .copy {
  color: rgba(255, 255, 255, 0.88);
}

.funfact-hero {
  background-image: linear-gradient(110deg, rgba(18, 58, 51, 0.95), rgba(184, 70, 52, 0.62)), url("https://images.unsplash.com/photo-1534445867742-43195f401b6c?auto=format&fit=crop&w=1600&q=80");
  background-position: center;
  background-size: cover;
  border-radius: 28px;
  color: white;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  padding: 34px;
}

.funfact-hero .copy {
  color: rgba(255, 255, 255, 0.88);
}

.funfact-card {
  align-items: center;
  display: grid;
  gap: 26px;
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.1fr);
  overflow: hidden;
}

.funfact-card .photo-frame {
  height: 360px;
  margin: 0;
}

.funfact-card .photo-frame img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.ai-hero {
  background-image: linear-gradient(110deg, rgba(18, 58, 51, 0.95), rgba(48, 72, 121, 0.62)), url("https://images.unsplash.com/photo-1507842217343-583bb7270b66?auto=format&fit=crop&w=1600&q=80");
  background-position: center;
  background-size: cover;
  border-radius: 28px;
  color: white;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  padding: 34px;
}

.ai-hero .copy {
  color: rgba(255, 255, 255, 0.88);
}

.ai-notice {
  background: #f1f7f4;
  border: 1px solid rgba(23, 107, 93, 0.22);
  border-radius: 18px;
  color: #24443c;
  font-weight: 800;
  line-height: 1.55;
  padding: 18px 20px;
}

.ai-practice-layout {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
}

.ai-panel {
  align-self: start;
}

.ai-controls-grid {
  margin-top: 16px;
}

.nicola-panel {
  overflow: hidden;
}

.nicola-stage {
  align-items: end;
  background: linear-gradient(160deg, #fff7e9, #e9f6f1);
  border: 1px solid rgba(23, 107, 93, 0.18);
  border-radius: 24px;
  display: flex;
  height: 360px;
  justify-content: center;
  margin-bottom: 18px;
  overflow: hidden;
  position: relative;
}

.nicola-stage img {
  display: block;
  height: 112%;
  max-width: 92%;
  object-fit: contain;
  position: relative;
  z-index: 2;
}

.nicola-aura {
  background: radial-gradient(circle, rgba(197, 154, 74, 0.3), rgba(23, 107, 93, 0.12) 48%, transparent 70%);
  border-radius: 999px;
  height: 260px;
  position: absolute;
  top: 44px;
  width: 260px;
  z-index: 1;
}

.sound-wave {
  border: 3px solid rgba(184, 70, 52, 0.42);
  border-left: 0;
  border-bottom: 0;
  border-radius: 0 999px 0 0;
  height: 46px;
  opacity: 0;
  position: absolute;
  right: 34px;
  top: 104px;
  transform: rotate(45deg) scale(0.7);
  width: 46px;
  z-index: 3;
}

.sound-wave.two {
  height: 68px;
  right: 24px;
  top: 94px;
  width: 68px;
}

.sound-wave.three {
  height: 92px;
  right: 14px;
  top: 84px;
  width: 92px;
}

.nicola-stage.speaking img {
  animation: tutorSpeak 0.7s ease-in-out infinite alternate;
}

.nicola-stage.speaking .nicola-aura {
  animation: tutorGlow 1s ease-in-out infinite alternate;
}

.nicola-stage.speaking .sound-wave {
  animation: soundPulse 1s ease-out infinite;
}

.nicola-stage.listening .sound-wave {
  border-color: rgba(23, 107, 93, 0.48);
}

.nicola-stage.listening .nicola-aura {
  background: radial-gradient(circle, rgba(23, 107, 93, 0.28), rgba(197, 154, 74, 0.12) 48%, transparent 70%);
}

.nicola-stage.speaking .sound-wave.two {
  animation-delay: 0.15s;
}

.nicola-stage.speaking .sound-wave.three {
  animation-delay: 0.3s;
}

@keyframes tutorSpeak {
  from {
    transform: translateY(0) scale(1);
  }
  to {
    transform: translateY(-8px) scale(1.018);
  }
}

@keyframes tutorGlow {
  from {
    opacity: 0.62;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1.08);
  }
}

@keyframes soundPulse {
  0% {
    opacity: 0;
    transform: rotate(45deg) scale(0.6);
  }
  35% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: rotate(45deg) scale(1.08);
  }
}

.ai-mic-panel {
  align-items: center;
  background: #fffaf0;
  border: 1px solid var(--line);
  border-radius: 18px;
  display: flex;
  gap: 16px;
  margin-top: 18px;
  padding: 16px;
}

.mic-button {
  background: var(--red);
  border: 1px solid var(--red);
  border-radius: 999px;
  color: white;
  font-weight: 900;
  min-height: 58px;
  min-width: 178px;
  padding: 14px 22px;
}

.ai-transcript {
  background: #fffaf0;
  border: 1px solid var(--line);
  border-radius: 18px;
  display: grid;
  gap: 12px;
  min-height: 290px;
  padding: 16px;
}

.ai-message {
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
}

.ai-message.user {
  border-color: rgba(23, 107, 93, 0.28);
  margin-left: 28px;
}

.ai-message.assistant {
  border-color: rgba(184, 70, 52, 0.25);
  margin-right: 28px;
}

.ai-message p {
  margin: 8px 0 0;
}

.ai-message small {
  color: var(--muted);
  display: block;
  margin-top: 8px;
}

.empty-transcript {
  align-self: center;
  color: var(--muted);
  font-weight: 800;
  justify-self: center;
  text-align: center;
}

.recipe-feature {
  align-items: center;
  display: grid;
  gap: 24px;
  grid-template-columns: 0.9fr 1.1fr;
  overflow: hidden;
}

.recipe-feature img,
.recipe-detail-view img {
  border-radius: 18px;
  height: 280px;
  object-fit: cover;
  width: 100%;
}

.recipe-detail-view {
  align-items: center;
  display: grid;
  gap: 26px;
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.1fr);
  overflow: hidden;
}

.recipe-detail-view img {
  height: 360px;
}

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

.recipe-card {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 18px 48px rgba(66, 49, 23, 0.08);
  overflow: hidden;
}

.recipe-card.locked {
  filter: saturate(0.78);
}

.recipe-image-wrap {
  height: 190px;
  position: relative;
}

.recipe-image-wrap img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.recipe-card.locked .recipe-image-wrap img {
  filter: brightness(0.72) blur(1px);
}

.recipe-lock {
  background: rgba(18, 58, 51, 0.9);
  border-radius: 999px;
  color: white;
  font-size: 12px;
  font-weight: 900;
  padding: 7px 10px;
  position: absolute;
  right: 12px;
  text-transform: uppercase;
  top: 12px;
}

.recipe-body {
  padding: 18px;
}

.recipe-body h2 {
  color: var(--green-dark);
  font-size: 23px;
  line-height: 1.15;
  margin: 12px 0 4px;
}

.recipe-detail {
  background: #fffaf0;
  border: 1px solid var(--line);
  border-radius: 16px;
  margin-top: 14px;
  padding: 14px;
}

.recipe-detail.expanded {
  font-size: 18px;
  padding: 20px;
}

.tradition-feature {
  align-items: center;
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(260px, 0.9fr) minmax(0, 1.1fr);
  overflow: hidden;
}

.tradition-detail-view {
  align-items: center;
  display: grid;
  gap: 26px;
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.1fr);
  overflow: hidden;
}

.tradition-detail-view .photo-frame {
  height: 360px;
  margin: 0;
}

.tradition-detail-view .photo-frame img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.tradition-detail {
  background: #fffaf0;
  border: 1px solid var(--line);
  border-radius: 16px;
  margin-top: 14px;
  padding: 14px;
}

.tradition-detail.expanded {
  font-size: 18px;
  padding: 20px;
}

.tradition-detail strong {
  color: var(--green-dark);
}

.tradition-detail p {
  color: var(--muted);
  line-height: 1.6;
  margin: 10px 0 0;
}

.tradition-feature .photo-frame {
  height: 260px;
  margin: 0;
}

.tradition-feature .photo-frame img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

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

.tradition-card {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 18px 48px rgba(66, 49, 23, 0.08);
  overflow: hidden;
}

.tradition-card.locked {
  filter: saturate(0.78);
}

.tradition-card-top {
  background: #eaf8f1;
  height: 190px;
  padding: 0;
  position: relative;
}

.tradition-card.locked .tradition-card-top {
  filter: brightness(0.82);
}

.tradition-card-top .photo-frame {
  border-radius: 0;
  height: 100%;
  margin: 0;
}

.tradition-card-top .photo-frame img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.tradition-mark {
  align-items: center;
  background: rgba(255, 253, 248, 0.94);
  border: 3px solid rgba(23, 107, 93, 0.18);
  border-radius: 18px;
  bottom: 12px;
  box-shadow: 0 14px 30px rgba(18, 58, 51, 0.16);
  color: var(--green-dark);
  display: grid;
  font-size: 26px;
  font-weight: 900;
  height: 70px;
  left: 12px;
  place-items: center;
  position: absolute;
  width: 70px;
}

.tradition-body {
  padding: 18px;
}

.tradition-body h2 {
  color: var(--green-dark);
  font-size: 23px;
  line-height: 1.15;
  margin: 12px 0 4px;
}

.unlock-strip {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 18px 0;
}

.badge-celebration {
  border-color: rgba(23, 107, 93, 0.28);
  box-shadow: 0 26px 70px rgba(23, 107, 93, 0.14);
}

.badge-celebration .title {
  font-size: clamp(42px, 7vw, 72px);
  line-height: 0.95;
}

.badge-celebration-copy {
  color: var(--green-dark);
  font-size: clamp(24px, 4vw, 38px);
  font-weight: 900;
  line-height: 1.12;
  margin: 12px 0 4px;
}

.unlock-strip article {
  background: #fffaf0;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
}

.badge-celebration .unlock-strip article {
  background: linear-gradient(135deg, #fffaf0, #eaf8f1);
  border-color: rgba(23, 107, 93, 0.18);
}

.tradition-unlock-note {
  align-items: center;
  background: #fffdf8;
  border: 1px solid rgba(23, 107, 93, 0.18);
  border-radius: 22px;
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.2fr);
  margin: 18px 0;
  overflow: hidden;
  padding: 16px;
}

.tradition-unlock-note .photo-frame {
  height: 230px;
  margin: 0;
}

.tradition-unlock-note .photo-frame img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.tradition-unlock-note h2 {
  color: var(--green-dark);
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.05;
  margin: 8px 0;
}

.tradition-unlock-note p {
  line-height: 1.6;
}

.unlock-strip strong {
  color: var(--green-dark);
  display: block;
  font-size: 23px;
  line-height: 1.2;
  margin-top: 4px;
}

.recipe-detail strong {
  color: var(--green-dark);
}

.recipe-detail p {
  color: var(--muted);
  line-height: 1.55;
  margin: 10px 0 0;
}

.profile-hero {
  align-items: center;
  background-image: linear-gradient(110deg, rgba(18, 58, 51, 0.94), rgba(18, 58, 51, 0.7)), url("https://images.unsplash.com/photo-1516483638261-f4dbaf036963?auto=format&fit=crop&w=1600&q=80");
  background-position: center;
  background-size: cover;
  border-radius: 28px;
  color: white;
  display: grid;
  gap: 22px;
  grid-template-columns: auto 1fr auto;
  padding: 30px;
}

.profile-hero h1 {
  font-size: clamp(38px, 6vw, 66px);
  line-height: 1;
  margin: 8px 0;
}

.profile-hero p {
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
  margin: 0;
}

.profile-avatar {
  align-items: center;
  background: #fffdf8;
  border: 4px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  color: var(--green-dark);
  display: grid;
  font-size: 34px;
  font-weight: 900;
  height: 118px;
  overflow: hidden;
  place-items: center;
  width: 118px;
}

.profile-avatar img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.profile-avatar.small {
  border-color: var(--line);
  font-size: 24px;
  height: 82px;
  width: 82px;
}

.profile-meter {
  align-items: center;
  border: 3px solid rgba(255, 255, 255, 0.42);
  border-radius: 18px;
  display: grid;
  min-width: 150px;
  padding: 18px;
  text-align: center;
}

.profile-meter strong {
  font-size: 40px;
}

.profile-meter span {
  color: rgba(255, 255, 255, 0.82);
  font-weight: 800;
}

.profile-panel {
  align-self: start;
}

.ai-settings-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.setting-check {
  align-items: center;
  background: #fffaf0;
  border: 1px solid var(--line);
  border-radius: 14px;
  display: flex;
  gap: 10px;
  min-height: 48px;
  padding: 10px 12px;
}

.setting-check input {
  accent-color: var(--green);
  height: 18px;
  width: 18px;
}

.setting-check span {
  font-weight: 800;
}

.profile-picture-row {
  align-items: center;
  display: flex;
  gap: 16px;
  margin-top: 16px;
}

.upload-button {
  display: inline-flex;
  margin-bottom: 10px;
  overflow: hidden;
  position: relative;
}

.upload-button input {
  inset: 0;
  opacity: 0;
  position: absolute;
}

.danger-zone {
  background: #fff8f5;
}

.ring {
  align-items: center;
  border: 4px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  display: flex;
  flex-direction: column;
  height: 130px;
  justify-content: center;
  min-width: 130px;
}

.ring strong {
  font-size: 38px;
}

.stat {
  padding: 20px;
}

.stat span {
  color: var(--muted);
  font-weight: 800;
}

.stat strong {
  color: var(--green-dark);
  display: block;
  font-size: clamp(22px, 3vw, 31px);
  line-height: 1.15;
  margin-top: 8px;
  overflow-wrap: anywhere;
}

.level-card {
  border: 0;
  overflow: hidden;
  text-align: left;
  transition: transform 0.18s ease;
}

.level-card:not(:disabled):hover {
  transform: translateY(-3px);
}

.level-card img {
  height: 230px;
}

.level-card-body {
  padding: 20px;
}

.pill {
  border: 1px solid #d9cab3;
  border-radius: 999px;
  color: var(--muted);
  display: inline-flex;
  font-size: 12px;
  font-weight: 900;
  padding: 6px 10px;
  text-transform: uppercase;
}

.pill.good {
  background: #eaf8f1;
  border-color: #b9dfcf;
  color: var(--green);
}

.pill.warn {
  background: #fff6d8;
  border-color: #e5c777;
  color: #79580f;
}

.bar {
  background: #e8dfd0;
  border-radius: 999px;
  height: 12px;
  margin: 14px 0;
  overflow: hidden;
}

.bar span {
  background: linear-gradient(90deg, var(--green), #2f8b61, var(--gold));
  display: block;
  height: 100%;
}

.banner {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  overflow: hidden;
}

.study-card {
  display: block;
  overflow: hidden;
}

.banner img {
  height: 300px;
}

.banner div,
.study-body {
  padding: 30px;
}

.chips {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, 1fr);
}

.chip {
  background: white;
  border: 1px solid #d9cab3;
  border-radius: 14px;
  padding: 13px;
  text-align: left;
}

.chip.done {
  background: #eaf8f1;
  border-color: #b9dfcf;
}

.study-card > img,
.study-card .photo-frame img {
  height: 390px;
}

.study-body h2 {
  color: var(--green-dark);
  font-size: clamp(38px, 6vw, 62px);
  line-height: 1;
  margin: 14px 0;
}

.pronunciation-row,
.prompt-with-audio {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.prompt-with-audio {
  justify-content: space-between;
}

.prompt-with-audio h2,
.pronunciation-row p {
  margin: 0;
}

.listen-button {
  min-height: 42px;
  padding: 10px 16px;
}

.voice-check {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding: 16px;
}

.voice-check strong {
  color: var(--green-dark);
}

.voice-check span {
  color: var(--muted);
}

.meaning {
  background: white;
  border: 1px solid var(--line);
  border-radius: 18px;
  margin: 18px 0;
  padding: 18px;
}

.meaning strong {
  color: var(--green-dark);
  font-size: 26px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.lesson-controls {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, 1fr);
}

.quiz-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 24px;
  margin-top: 18px;
  padding: 22px;
}

.quiz-card h2 {
  color: var(--green-dark);
  font-size: clamp(27px, 5vw, 42px);
}

.quiz-image {
  border-radius: 18px;
  height: 300px;
  margin-bottom: 16px;
}

.photo-quiz {
  border-radius: 18px;
  margin-bottom: 16px;
  overflow: hidden;
}

.photo-quiz img {
  height: 300px;
}

.answers {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, 1fr);
  margin-top: 18px;
}

.answer {
  background: white;
  border: 1px solid #d9cab3;
  border-radius: 16px;
  min-height: 58px;
  padding: 14px;
  text-align: left;
}

.answer.correct {
  background: #eaf8f1;
  border-color: var(--green);
  color: var(--green-dark);
}

.answer.wrong {
  background: #f7e3df;
  border-color: var(--red);
  color: #8d2c20;
}

.feedback {
  border-radius: 14px;
  font-weight: 900;
  margin-top: 15px;
  padding: 14px;
}

.feedback.good {
  background: #eaf8f1;
  color: var(--green-dark);
}

.feedback.bad {
  background: #f7e3df;
  color: #8d2c20;
}

.review-card {
  overflow: hidden;
}

.review-card img,
.review-card .photo-frame img {
  height: 210px;
}

.review-card-content {
  padding: 18px;
}

.subscription-hero {
  align-items: center;
  background:
    linear-gradient(90deg, rgba(15, 78, 67, 0.9), rgba(184, 70, 52, 0.72)),
    url("https://images.unsplash.com/photo-1516483638261-f4dbaf036963?auto=format&fit=crop&w=1600&q=80") center/cover;
  border-radius: 30px;
  color: white;
  display: flex;
  justify-content: space-between;
  min-height: 360px;
  padding: 38px;
}

.subscription-hero .copy {
  color: rgba(255, 255, 255, 0.9);
  max-width: 700px;
}

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

.pricing-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pricing-card.featured {
  border-color: var(--green);
  box-shadow: 0 18px 44px rgba(23, 107, 93, 0.16);
}

.pricing-card h2 {
  color: var(--green-dark);
  font-size: 34px;
  margin: 0;
}

.price-row {
  align-items: end;
  display: flex;
  gap: 6px;
}

.price-row strong {
  color: var(--red);
  font-size: 42px;
  line-height: 1;
}

.pricing-card ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 20px;
}

.pricing-actions {
  display: grid;
  gap: 10px;
  margin-top: auto;
}

.subscription-note {
  max-width: 920px;
}

.creator-code-box {
  margin-top: 16px;
  max-width: 300px;
}

.creator-code-box summary {
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
}

.creator-code-entry {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr auto;
  margin-top: 8px;
}

.creator-code-entry input {
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
  min-width: 0;
  padding: 10px 12px;
}

.legal-page {
  max-width: 920px;
  margin: 0 auto;
}

.legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.link-button {
  border: 0;
  background: transparent;
  color: var(--green-dark);
  font-weight: 900;
  padding: 0;
  text-decoration: underline;
}

.legal-section-list {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.legal-section {
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
}

.legal-section h2 {
  color: var(--green-dark);
  margin: 0 0 8px;
}

@media (max-width: 860px) {
  .topbar-inner,
  .mobile-install,
  .dashboard,
  .recipe-hero,
  .tradition-hero,
  .funfact-hero,
  .ai-hero,
  .recipe-feature,
  .recipe-detail-view,
  .tradition-feature,
  .tradition-detail-view,
  .funfact-card,
  .ai-practice-layout,
  .profile-hero,
  .auth-shell,
  .banner {
    display: block;
  }

  .profile-avatar,
  .profile-meter {
    margin-bottom: 16px;
  }

  .auth-visual {
    min-height: 420px;
    margin-bottom: 18px;
  }

  .two,
  .three,
  .four,
  .reward-shortcuts,
  .ai-controls-grid,
  .ai-settings-grid,
  .recipe-grid,
  .tradition-grid,
  .pricing-grid,
  .unlock-strip,
  .tradition-unlock-note,
  .lesson-controls,
  .answers,
  .chips {
    grid-template-columns: 1fr;
  }

  .hero-content {
    padding: 28px;
  }

  .topbar-inner {
    gap: 12px;
  }

  .topbar-inner,
  .page,
  .mobile-install {
    width: min(100% - 20px, 1180px);
  }

  .brand strong {
    font-size: 20px;
  }

  .nav {
    justify-content: flex-start;
    margin-top: 12px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
    flex-wrap: nowrap;
  }

  .nav::-webkit-scrollbar {
    display: none;
  }

  .nav button {
    flex: 0 0 auto;
    min-height: 42px;
    padding: 9px 13px;
  }

  .mobile-install {
    margin-top: 10px;
  }

  .mobile-install .secondary {
    margin-top: 12px;
    width: 100%;
  }

  .ai-mic-panel {
    align-items: stretch;
    display: grid;
  }

  .nicola-stage {
    height: 300px;
  }
}
