.screen-head {
  padding: 6px 4px 2px;
}

.screen-title {
  font-size: clamp(34px, 10vw, 46px);
  line-height: 1;
  color: #fff;
  text-shadow: 0 4px 0 #8a2fb5, 0 8px 16px rgba(20, 6, 50, 0.4);
}

.screen-sub {
  margin-top: 8px;
  max-width: 46ch;
  font-size: 15px;
  color: var(--lavender);
}

.screen-footnote {
  margin-top: 26px;
  padding: 0 12px;
  text-align: center;
  font-size: 12.5px;
  color: rgba(196, 185, 248, 0.75);
}

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 32px;
  border: 3px solid rgba(255, 255, 255, 0.45);
  background: linear-gradient(180deg, #6a35b8, #2f1456);
  box-shadow: 0 8px 0 #1f0b40, 0 22px 40px rgba(10, 2, 30, 0.5);
}

.hero-scene {
  height: clamp(150px, 46vw, 250px);
  background: url('hero-bridge.webp') center 58% / cover no-repeat;
  -webkit-mask-image: linear-gradient(180deg, #000 62%, transparent);
  mask-image: linear-gradient(180deg, #000 62%, transparent);
}

.hero-body {
  position: relative;
  z-index: 1;
  margin-top: -46px;
  padding: 0 18px 20px;
}

.ribbon {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ff7ae6, #c93ac0);
  box-shadow: 0 3px 0 #7a1273;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
}

.wordmark {
  display: flex;
  flex-direction: column;
  margin: 8px 0 10px;
  line-height: 0.88;
}

.wordmark-line {
  font-family: var(--font-display);
  font-size: clamp(44px, 15vw, 76px);
  letter-spacing: 0.01em;
  color: #fff;
  text-shadow: 0 4px 0 #b3239f, 0 8px 0 #6a1a8f, 0 14px 20px rgba(0, 0, 0, 0.35);
}

.wordmark-line:last-child {
  width: fit-content;
  background: linear-gradient(180deg, #fff8b8, #ffd23f 52%, #ff9a1f);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: none;
  filter: drop-shadow(0 4px 0 #8a3b00) drop-shadow(0 9px 8px rgba(0, 0, 0, 0.35));
}

.hero-lead {
  max-width: 32ch;
  margin-bottom: 16px;
  font-size: 15.5px;
  color: var(--cream);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 10px;
}

.hero-bear {
  position: absolute;
  right: 6px;
  top: clamp(132px, 41vw, 222px);
  width: clamp(88px, 27vw, 150px);
  filter: drop-shadow(0 10px 8px rgba(10, 2, 30, 0.45));
  animation: bearHover 3.4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes bearHover {
  0%,
  100% {
    transform: translateY(0) rotate(-3deg);
  }
  50% {
    transform: translateY(-8px) rotate(3deg);
  }
}

.home-grid {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.progress-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
}

.progress-copy {
  min-width: 0;
}

.progress-number {
  display: block;
  font-size: 22px;
  color: #fff;
}

.mini-stats {
  display: grid;
  gap: 4px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  font-size: 13.5px;
}

.mini-stats li {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mini-stats .icon {
  color: var(--gold);
}

.daily-card {
  display: flex;
  flex-direction: column;
  padding: 16px;
}

.daily-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.daily-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}

.daily-preview {
  display: grid;
  place-items: center;
  min-height: 150px;
  margin: 10px 0;
  padding: 10px;
  border-radius: 20px;
  background: rgba(20, 6, 50, 0.45);
}

.daily-canvas {
  max-width: 100%;
}

.daily-name {
  font-size: 22px;
  color: #fff;
}

.daily-sub {
  margin-bottom: 12px;
  font-size: 13.5px;
  color: var(--lavender);
}

.daily-card .btn {
  margin-top: auto;
  width: 100%;
}

.fact-card {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
  padding: 14px;
}

.fact-art {
  flex: none;
  width: clamp(78px, 24vw, 130px);
  border-radius: 18px;
}

.fact-body {
  min-width: 0;
}

.fact-text {
  margin: 2px 0 10px;
  font-size: 15px;
  line-height: 1.42;
}

.fact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.step-grid {
  display: grid;
  gap: 12px;
}

.step-card {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  grid-template-areas:
    'art title'
    'art text';
  column-gap: 14px;
  align-content: center;
  padding: 12px 14px 12px 12px;
}

.step-art {
  grid-area: art;
  width: 76px;
  height: 76px;
  object-fit: contain;
  align-self: center;
  filter: drop-shadow(0 6px 6px rgba(10, 2, 30, 0.4));
}

.step-number {
  position: absolute;
  top: -8px;
  left: -6px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(180deg, #ffe680, #ffaf2b);
  border: 2px solid #fff;
  box-shadow: 0 3px 0 #b36b00;
  font-family: var(--font-display);
  font-size: 16px;
  color: #55270a;
}

.step-card strong {
  grid-area: title;
  align-self: end;
  font-size: 20px;
  color: #fff;
}

.step-card p {
  grid-area: text;
  align-self: start;
  font-size: 14px;
  color: var(--cream);
}

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

.teaser {
  --accent: var(--pink);
  display: grid;
  gap: 4px;
  padding: 14px;
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04)), #4a2585;
  border: 2px solid var(--accent);
  box-shadow: 0 5px 0 rgba(20, 6, 50, 0.5);
  transition: transform 0.15s ease;
}

.teaser:active {
  transform: translateY(3px);
}

.teaser strong {
  font-size: 18px;
  color: #fff;
}

.teaser-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-bottom: 4px;
  border-radius: 12px;
  background: var(--accent);
  color: var(--ink-night);
  font-size: 20px;
}

.teaser-meta {
  font-size: 12.5px;
  color: var(--lavender);
}

.teaser.is-locked {
  opacity: 0.7;
}

.world-card {
  --accent: var(--pink);
  --glow: #ffb3ec;
  position: relative;
  margin-top: 16px;
  padding: 14px 14px 16px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.03)), rgba(58, 28, 103, 0.72);
  border: 2px solid var(--accent);
  box-shadow: 0 6px 0 rgba(20, 6, 50, 0.5), 0 0 24px rgba(255, 255, 255, 0.06);
}

.world-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 12px;
}

.world-art {
  width: 64px;
  height: 64px;
  object-fit: contain;
  filter: drop-shadow(0 6px 6px rgba(10, 2, 30, 0.45));
}

.world-index {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--glow);
}

.world-copy h2 {
  font-size: 23px;
  color: #fff;
}

.world-copy p {
  margin-top: 2px;
  font-size: 13px;
  color: var(--lavender);
}

.world-meter {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px 4px 6px;
  border-radius: 999px;
  background: rgba(20, 6, 50, 0.55);
  font-size: 13px;
  white-space: nowrap;
}

.world-meter b {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 17px;
  color: #fff;
}

.meter-star {
  color: var(--gold);
}

.world-lock {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 8px 12px;
  border-radius: 14px;
  background: rgba(20, 6, 50, 0.55);
  font-size: 13.5px;
  color: var(--cream);
}

.world-lock .icon {
  color: var(--gold);
}

.node-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
  gap: 14px 8px;
  margin-top: 14px;
}

.node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
}

.node-orb {
  position: relative;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 3px solid #fff;
  background: radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0) 38%), var(--accent);
  box-shadow: 0 5px 0 rgba(20, 6, 50, 0.55), 0 10px 14px rgba(20, 6, 50, 0.35);
  transition: transform 0.15s ease;
}

.node-orb b {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 22px;
  color: #fff;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.35);
}

.node:active .node-orb {
  transform: translateY(3px);
}

.node-name {
  display: -webkit-box;
  max-width: 100%;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 11.5px;
  line-height: 1.15;
  text-align: center;
  color: var(--cream);
}

.node.is-done .node-orb {
  border-color: var(--gold);
}

.node.is-current .node-orb {
  animation: nodePulse 1.7s ease-in-out infinite;
}

.node.is-locked .node-orb {
  background: radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0) 38%), #5d4a85;
  border-color: rgba(255, 255, 255, 0.4);
  color: rgba(255, 255, 255, 0.8);
  font-size: 20px;
}

.node.is-locked .node-name {
  opacity: 0.6;
}

.world-card.is-closed .node-grid {
  opacity: 0.6;
}

@keyframes nodePulse {
  0%,
  100% {
    box-shadow: 0 5px 0 rgba(20, 6, 50, 0.55), 0 0 0 0 rgba(255, 255, 255, 0.7);
  }
  50% {
    box-shadow: 0 5px 0 rgba(20, 6, 50, 0.55), 0 0 0 11px rgba(255, 255, 255, 0);
  }
}

.sheet {
  --accent: var(--pink);
}

.sheet-preview {
  display: grid;
  place-items: center;
  min-height: 130px;
  padding: 10px;
  border-radius: 22px;
  background: rgba(20, 6, 50, 0.5);
  border: 2px solid rgba(255, 255, 255, 0.12);
}

.sheet-canvas {
  max-width: 100%;
}

.sheet-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0 10px;
}

.sheet-pieces {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.07);
}

.sheet-best {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin-top: 10px;
  font-size: 13.5px;
}

.sheet-tip {
  margin-top: 8px;
  text-align: center;
  font-size: 14px;
  color: var(--lavender);
}

.almanac-content.is-entering {
  animation: screenIn 0.35s ease both;
}

.timeline {
  position: relative;
  padding: 0;
  list-style: none;
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 12px;
  margin-bottom: 14px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: 21px;
  top: 46px;
  bottom: -14px;
  width: 5px;
  border-radius: 3px;
  background: repeating-linear-gradient(180deg, #ff7ae6 0 8px, #fff 8px 16px);
  opacity: 0.8;
}

.timeline-item:last-child::before {
  display: none;
}

.timeline-dot {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 3px solid #fff;
  background: radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0) 40%), linear-gradient(180deg, #ff7ae6, #c93ac0);
  box-shadow: 0 4px 0 #7a1273;
  color: #fff;
  font-size: 22px;
}

.timeline-card {
  padding: 12px 14px 14px;
}

.timeline-when {
  display: inline-block;
  margin-bottom: 4px;
  padding: 2px 10px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffe680, #ffaf2b);
  font-size: 12px;
  font-weight: 700;
  color: #55270a;
}

.timeline-card h3 {
  font-size: 20px;
  color: #fff;
}

.timeline-card p {
  margin-top: 4px;
  font-size: 14.5px;
  line-height: 1.45;
  color: var(--cream);
}

.thermo {
  padding: 16px;
}

.thermo-title {
  font-size: 24px;
  color: #fff;
}

.thermo-grid {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 14px;
  margin: 12px 0 14px;
}

.syrup {
  --syrup: #f7f0ff;
  --boil: 0.6;
  position: relative;
  align-self: start;
  height: 150px;
  overflow: hidden;
  border-radius: 14px 14px 44px 44px;
  border: 4px solid rgba(255, 255, 255, 0.6);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0) 30%), var(--syrup);
  box-shadow: inset 0 -14px 18px rgba(0, 0, 0, 0.22), 0 6px 0 rgba(20, 6, 50, 0.5);
  transition: background-color 0.4s ease;
}

.bubble {
  position: absolute;
  bottom: -14px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
  animation: bubbleRise calc(3.2s / var(--boil)) ease-in infinite;
}

.bubble-1 {
  left: 14%;
}

.bubble-2 {
  left: 34%;
  width: 8px;
  height: 8px;
  animation-delay: -0.9s;
}

.bubble-3 {
  left: 52%;
  width: 16px;
  height: 16px;
  animation-delay: -1.7s;
}

.bubble-4 {
  left: 70%;
  width: 9px;
  height: 9px;
  animation-delay: -0.4s;
}

.bubble-5 {
  left: 82%;
  animation-delay: -2.3s;
}

.bubble-6 {
  left: 24%;
  width: 7px;
  height: 7px;
  animation-delay: -2.8s;
}

@keyframes bubbleRise {
  from {
    transform: translateY(0) scale(0.6);
    opacity: 0.9;
  }
  to {
    transform: translateY(-160px) scale(1.1);
    opacity: 0;
  }
}

.thermo-readout {
  display: block;
  font-size: 22px;
  color: var(--gold);
}

.thermo-stage {
  margin-top: 2px;
  font-size: 22px;
  color: #fff;
}

.thermo-range {
  display: block;
  margin-bottom: 4px;
  font-size: 12.5px;
  color: var(--lavender);
}

.thermo-text {
  font-size: 14px;
  line-height: 1.4;
}

.thermo-use {
  margin-top: 6px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--pink-soft);
}

.thermo-slider {
  --fill: 10%;
  display: block;
  width: 100%;
  height: 16px;
  margin: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #ffd23f var(--fill), rgba(255, 255, 255, 0.2) var(--fill));
  -webkit-appearance: none;
  appearance: none;
  touch-action: pan-y;
  outline-offset: 6px;
}

.thermo-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid #fff;
  background: radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0) 40%), #e756dc;
  box-shadow: 0 4px 0 #8a1a84;
}

.thermo-slider::-moz-range-thumb {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 3px solid #fff;
  background: #e756dc;
  box-shadow: 0 4px 0 #8a1a84;
}

.thermo-hint {
  margin-top: 12px;
  text-align: center;
  font-size: 12.5px;
  color: var(--lavender);
}

.science-grid {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.science-item {
  overflow: hidden;
}

.science-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border: 0;
  background: transparent;
  text-align: left;
}

.science-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background: radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0) 40%), linear-gradient(180deg, #78d4ff, #2f9be8);
  box-shadow: 0 3px 0 #17609f;
  color: #fff;
  font-size: 24px;
}

.science-copy {
  display: grid;
  flex: 1;
  min-width: 0;
  gap: 2px;
}

.science-copy strong {
  font-size: 18px;
  color: #fff;
}

.science-copy span {
  font-size: 13.5px;
  color: var(--lavender);
}

.science-chevron {
  flex: none;
  color: var(--gold);
  transition: transform 0.3s ease;
}

.science-item.is-open .science-chevron {
  transform: rotate(90deg);
}

.science-detail {
  max-height: 0;
  overflow: hidden;
  padding: 0 16px;
  font-size: 14.5px;
  line-height: 1.45;
  color: var(--cream);
  transition: max-height 0.4s ease, padding 0.3s ease;
}

.science-item.is-open .science-detail {
  max-height: 320px;
  padding-bottom: 16px;
}

.pantry-grid,
.guide-grid {
  display: grid;
  gap: 10px;
}

.pantry-card {
  display: grid;
  grid-template-columns: minmax(104px, 118px) minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
}

.pantry-art {
  display: grid;
  place-items: center;
  padding: 8px;
  border-radius: 18px;
  background: rgba(20, 6, 50, 0.45);
}

.pantry-copy strong {
  font-size: 19px;
  color: #fff;
}

.pantry-size {
  margin-left: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--gold);
}

.pantry-copy p {
  margin-top: 3px;
  font-size: 13.5px;
  line-height: 1.38;
}

.pantry-fact {
  color: var(--lavender);
}

.guide-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px 10px 10px;
}

.guide-art {
  display: grid;
  place-items: center;
  flex: none;
  width: 72px;
  height: 72px;
  border-radius: 18px;
  background: rgba(20, 6, 50, 0.45);
}

.guide-copy strong {
  font-size: 18px;
  color: #fff;
}

.guide-copy p {
  font-size: 13.5px;
  line-height: 1.38;
}

.quiz-card {
  margin-top: 14px;
  padding: 18px 16px;
  border-radius: 26px;
  background: var(--panel-bg);
  border: 2px solid var(--panel-line);
  box-shadow: var(--shadow-soft), inset 0 2px 0 rgba(255, 255, 255, 0.18);
}

.quiz-intro,
.quiz-result {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding-top: 26px;
  padding-bottom: 24px;
  text-align: center;
}

.quiz-badge {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  border: 4px solid #fff;
  background: radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0) 40%), linear-gradient(180deg, #ffe680, #ffaf2b);
  box-shadow: 0 6px 0 #b36b00;
  color: #55270a;
  font-size: 38px;
}

.quiz-intro h3,
.quiz-result h3 {
  font-size: 30px;
  color: #fff;
}

.quiz-intro p,
.quiz-result p {
  max-width: 34ch;
  font-size: 15px;
}

.quiz-best {
  color: var(--gold);
  font-weight: 600;
}

.quiz-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.quiz-dots {
  display: flex;
  gap: 6px;
}

.quiz-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  transition: width 0.3s ease, background 0.3s ease;
}

.quiz-dot.is-done {
  background: var(--pink);
}

.quiz-dot.is-now {
  width: 28px;
  background: var(--gold);
}

.quiz-score {
  font-size: 13px;
  font-weight: 700;
  color: var(--gold);
}

.quiz-question {
  margin: 14px 0;
  font-size: 22px;
  line-height: 1.18;
  color: #fff;
}

.quiz-options {
  display: grid;
  gap: 10px;
}

.quiz-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 8px 14px 8px 10px;
  border: 2px solid rgba(255, 255, 255, 0.26);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 0 rgba(20, 6, 50, 0.45);
  text-align: left;
  font-size: 15.5px;
  line-height: 1.25;
  color: #fff;
  transition: transform 0.12s ease, background 0.2s ease, opacity 0.2s ease;
}

.quiz-option:active:not(:disabled) {
  transform: translateY(3px);
  box-shadow: 0 1px 0 rgba(20, 6, 50, 0.45);
}

.quiz-letter {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  font-family: var(--font-display);
}

.quiz-option:disabled {
  opacity: 1;
}

.quiz-option:disabled:not(.is-correct):not(.is-wrong) {
  opacity: 0.5;
}

.quiz-option.is-correct {
  border-color: #c7ffcc;
  background: linear-gradient(180deg, #5fdc6a, #2fa84a);
}

.quiz-option.is-wrong {
  border-color: #ffc2cf;
  background: linear-gradient(180deg, #ff7a96, #d9304f);
  animation: shake 0.4s ease;
}

.quiz-why {
  display: grid;
  gap: 8px;
  justify-items: start;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 18px;
  border-left: 6px solid var(--mint);
  background: rgba(20, 6, 50, 0.45);
  animation: screenIn 0.3s ease both;
}

.quiz-why.is-miss {
  border-left-color: var(--berry);
}

.quiz-why strong {
  font-size: 19px;
  color: #fff;
}

.quiz-why p {
  font-size: 14.5px;
  line-height: 1.4;
}

.quiz-result-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 10px;
  margin-top: 6px;
}

@keyframes shake {
  20%,
  60% {
    transform: translateX(-6px);
  }
  40%,
  80% {
    transform: translateX(6px);
  }
}

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

.avatar {
  flex: none;
  width: 88px;
  height: 88px;
  overflow: hidden;
  border-radius: 50%;
  border: 4px solid #fff;
  background: radial-gradient(circle at 50% 30%, #ffb3ec, #b56bff);
  box-shadow: 0 5px 0 #6a1a8f, 0 12px 18px rgba(10, 2, 30, 0.4);
}

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

.profile-copy {
  flex: 1;
  min-width: 0;
}

.name-input {
  width: 100%;
  margin: 2px 0 4px;
  padding: 4px 10px;
  border: 2px dashed rgba(255, 255, 255, 0.35);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  font-family: var(--font-display);
  font-size: 25px;
  color: #fff;
  user-select: text;
  -webkit-user-select: text;
}

.rank {
  display: block;
  font-size: 17px;
  color: var(--gold);
}

.rank-bar {
  height: 10px;
  margin: 6px 0 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
}

.rank-bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #ffd23f, #ff7ae6);
  transition: width 0.8s ease;
}

.rank-note {
  font-size: 12.5px;
  color: var(--lavender);
}

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

.stat-tile {
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 12px 4px 10px;
  border-radius: 20px;
  background: var(--panel-bg);
  border: 2px solid var(--panel-line);
  text-align: center;
}

.stat-tile .icon {
  font-size: 22px;
  color: var(--gold);
}

.stat-tile strong {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 20px;
  color: #fff;
}

.stat-tile span:last-child {
  font-size: 11.5px;
  color: var(--lavender);
}

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

.badge {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 4px;
  padding: 14px 10px;
  border-radius: 22px;
  background: rgba(20, 6, 50, 0.5);
  border: 2px solid rgba(255, 255, 255, 0.14);
  text-align: center;
  opacity: 0.6;
}

.badge-icon {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  margin-bottom: 2px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  font-size: 24px;
}

.badge strong {
  font-size: 16px;
  color: #fff;
}

.badge small {
  font-size: 12px;
  line-height: 1.3;
  color: var(--lavender);
}

.badge.is-on {
  opacity: 1;
  background: var(--panel-bg);
  border-color: var(--gold);
  box-shadow: 0 0 20px rgba(255, 210, 63, 0.22);
}

.badge.is-on .badge-icon {
  border: 3px solid #fff;
  background: radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0) 40%), linear-gradient(180deg, #ffe680, #ffaf2b);
  box-shadow: 0 4px 0 #b36b00;
  color: #55270a;
}

.settings {
  padding: 6px 14px 14px;
}

.toggle-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1.5px solid rgba(255, 255, 255, 0.12);
}

.toggle-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.14);
  color: var(--gold);
  font-size: 22px;
}

.toggle-copy {
  display: grid;
  flex: 1;
  min-width: 0;
}

.toggle-copy strong {
  font-size: 17px;
  color: #fff;
}

.toggle-copy small {
  font-size: 12.5px;
  color: var(--lavender);
}

.settings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 10px;
  padding-top: 16px;
}

.settings-actions .btn {
  flex: 1 1 140px;
}

@media (min-width: 560px) {
  .step-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .step-card {
    grid-template-columns: 1fr;
    grid-template-areas:
      'art'
      'title'
      'text';
    justify-items: center;
    padding: 16px 12px;
    text-align: center;
  }

  .step-card strong {
    align-self: auto;
  }

  .step-art {
    margin-bottom: 4px;
  }

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

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

  .pantry-grid,
  .guide-grid,
  .science-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

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

@media (min-width: 880px) {
  .stage > .screen {
    max-width: 980px;
  }

  .hero-scene {
    height: 300px;
  }

  .hero-bear {
    top: 250px;
    width: 170px;
  }

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

@media (max-width: 480px) {
  .world-head {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .world-meter {
    grid-column: 1 / -1;
    justify-self: start;
  }
}

@media (max-width: 350px) {
  .stat-grid {
    gap: 6px;
  }

  .stat-tile strong {
    font-size: 17px;
  }

  .progress-card {
    flex-direction: column;
    text-align: center;
  }

  .mini-stats {
    justify-items: start;
  }

  .profile {
    flex-direction: column;
    text-align: center;
  }

  .thermo-grid {
    grid-template-columns: 80px minmax(0, 1fr);
    gap: 10px;
  }

  .pantry-card {
    grid-template-columns: minmax(96px, 104px) minmax(0, 1fr);
  }
}
