:root {
  color-scheme: dark;
  --night-950: #10112d;
  --night-900: #17183c;
  --night-850: #20214b;
  --night-800: #292956;
  --paper: #fff7e6;
  --paper-soft: #f6eedb;
  --ink: #25213a;
  --ink-soft: #6d6677;
  --apricot: #ffad66;
  --apricot-bright: #ffc680;
  --berry: #ec7f89;
  --jade: #55c9ad;
  --sky: #8cb9ea;
  --gold: #ffd269;
  --white: #ffffff;
  --line-dark: rgba(255, 255, 255, 0.12);
  --line-paper: rgba(44, 35, 57, 0.11);
  --shadow-deep: 0 24px 70px rgba(5, 6, 25, 0.34);
  --shadow-card: 0 18px 40px rgba(10, 11, 34, 0.16);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --display: "Trebuchet MS", "Microsoft YaHei UI", "PingFang SC", sans-serif;
  --body: "Microsoft YaHei UI", "PingFang SC", "Noto Sans CJK SC", Arial, sans-serif;
  --mono: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--night-950);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--white);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 9% 2%, rgba(109, 93, 181, 0.3), transparent 27rem),
    radial-gradient(circle at 95% 85%, rgba(70, 162, 151, 0.17), transparent 30rem),
    linear-gradient(145deg, #11122f 0%, #17183c 46%, #11122d 100%);
}

button,
textarea,
input {
  font: inherit;
}

button {
  border: 0;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(255, 198, 128, 0.9);
  outline-offset: 3px;
}

.ambient {
  position: fixed;
  z-index: 0;
  width: 20rem;
  height: 20rem;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
}

.ambient-one {
  top: -8rem;
  left: 32%;
  background: rgba(228, 112, 117, 0.11);
}

.ambient-two {
  right: -8rem;
  bottom: -8rem;
  background: rgba(64, 188, 156, 0.1);
}

.app-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  width: min(1480px, 100%);
  min-height: 100vh;
  margin: 0 auto;
}

.side-rail {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 30px 24px 24px;
  border-right: 1px solid var(--line-dark);
  background: rgba(15, 16, 45, 0.32);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 210, 105, 0.38);
  border-radius: 14px;
  background: linear-gradient(145deg, #34305c, #222044);
  box-shadow: inset 0 1px rgba(255,255,255,.14), 0 9px 22px rgba(8,9,30,.3);
  overflow: hidden;
}

.brand-moon {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 13px rgba(255, 210, 105, 0.55);
}

.brand-moon::after {
  content: "";
  position: absolute;
  top: -3px;
  left: 4px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #2d2a53;
}

.brand-lantern {
  position: absolute;
  right: 7px;
  bottom: 7px;
  width: 12px;
  height: 17px;
  border-radius: 5px;
  background: var(--apricot);
  box-shadow: 0 0 14px rgba(255, 173, 102, 0.7);
}

.brand-lantern::before,
.brand-lantern::after {
  content: "";
  position: absolute;
  left: 2px;
  width: 8px;
  height: 2px;
  border-radius: 2px;
  background: #ffd6a2;
}

.brand-lantern::before { top: -2px; }
.brand-lantern::after { bottom: -2px; }

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

.brand strong {
  font-family: var(--display);
  font-size: 16px;
  letter-spacing: 0.02em;
}

.brand small {
  margin-top: 2px;
  color: rgba(255,255,255,.55);
  font-size: 11px;
  letter-spacing: .2em;
}

.desktop-nav {
  display: grid;
  gap: 9px;
  margin-top: 52px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px 13px;
  border: 1px solid transparent;
  border-radius: 14px;
  color: rgba(255,255,255,.57);
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: color .2s ease, background .2s ease, transform .2s ease;
}

.nav-item:hover {
  color: var(--white);
  background: rgba(255,255,255,.055);
  transform: translateX(2px);
}

.nav-item.is-active {
  color: var(--white);
  border-color: rgba(255,198,128,.2);
  background: linear-gradient(90deg, rgba(255,173,102,.17), rgba(255,255,255,.045));
  box-shadow: inset 3px 0 var(--apricot);
}

.nav-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
}

.nav-icon svg,
.mobile-nav svg {
  width: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rail-spacer { flex: 1; }

.companion-note {
  position: relative;
  margin-bottom: 18px;
  padding: 58px 14px 14px;
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 18px;
  background:
    linear-gradient(180deg, transparent, rgba(12,13,39,.76)),
    url("./assets/night-market-welcome.webp") 81% 48% / 260% auto;
  overflow: hidden;
}

.mini-mascot {
  position: absolute;
  top: 11px;
  right: 13px;
  width: 48px;
  height: 48px;
  border: 2px solid rgba(255,220,173,.8);
  border-radius: 50%;
  background: url("./assets/night-market-welcome.webp") 84% 53% / 850% auto;
  box-shadow: 0 8px 18px rgba(4,5,22,.35);
}

.companion-note p {
  margin: 0 0 3px;
  font-size: 12px;
}

.companion-note span {
  color: rgba(255,255,255,.55);
  font-size: 10px;
}

.profile-button {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 2px;
  color: rgba(255,255,255,.7);
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.profile-avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #34254a;
  background: linear-gradient(145deg, var(--apricot), var(--berry));
  font-size: 13px;
  font-weight: 800;
}

.profile-button strong,
.profile-button small { display: block; }
.profile-button strong { color: var(--white); font-size: 11px; }
.profile-button small { margin-top: 2px; color: rgba(255,255,255,.45); font-size: 9px; }

.main-stage {
  min-width: 0;
  padding: 35px clamp(28px, 4vw, 64px) 60px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.eyebrow,
.section-kicker {
  margin: 0;
  color: var(--apricot-bright);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .18em;
}

.topbar h1 {
  margin: 6px 0 0;
  font-family: var(--display);
  font-size: clamp(25px, 2.6vw, 36px);
  line-height: 1.1;
  letter-spacing: -.03em;
}

.status-pills {
  display: flex;
  align-items: center;
  gap: 10px;
}

.status-pill {
  display: grid;
  grid-template-columns: auto auto;
  grid-template-rows: auto auto;
  column-gap: 7px;
  padding: 8px 13px 8px 11px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 14px;
  background: rgba(255,255,255,.055);
  box-shadow: inset 0 1px rgba(255,255,255,.08);
}

.status-pill > span {
  grid-row: 1 / 3;
  align-self: center;
  font-size: 17px;
}

.status-pill strong { font-size: 12px; line-height: 1; }
.status-pill small { color: rgba(255,255,255,.43); font-size: 8px; }

.view-root {
  min-height: calc(100vh - 135px);
  animation: view-in .55s cubic-bezier(.2,.7,.25,1) both;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 38px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,.08);
  color: rgba(255,255,255,.36);
  font-size: 8px;
}

.site-footer nav { display: flex; align-items: center; gap: 16px; }
.site-footer a { color: rgba(255,255,255,.56); text-decoration: none; }
.site-footer a:hover { color: var(--apricot-bright); }

@keyframes view-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.market-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, .7fr);
  gap: 22px;
}

.hero-card {
  position: relative;
  min-height: 430px;
  padding: clamp(24px, 3.5vw, 44px);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(90deg, rgba(18,17,45,.94) 0%, rgba(22,19,50,.7) 43%, rgba(18,17,42,.1) 74%),
    linear-gradient(0deg, rgba(13,14,38,.6), transparent 48%),
    var(--hero-image, url("./assets/night-market-welcome.webp")) var(--hero-position, center) / cover;
  box-shadow: var(--shadow-deep);
  overflow: hidden;
  isolation: isolate;
}

.hero-card::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    radial-gradient(circle at 79% 31%, rgba(255,186,112,.18), transparent 14%),
    linear-gradient(110deg, transparent 40%, rgba(255,255,255,.08) 49%, transparent 57%);
  background-size: auto, 210% 100%;
  animation: lantern-sheen 8s ease-in-out infinite;
}

@keyframes lantern-sheen {
  0%, 60%, 100% { background-position: center, 140% 0; }
  75% { background-position: center, -80% 0; }
}

.hero-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 6px 11px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 999px;
  color: rgba(255,255,255,.8);
  background: rgba(19,18,47,.55);
  backdrop-filter: blur(10px);
  font-size: 10px;
  font-weight: 700;
}

.chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--jade);
  box-shadow: 0 0 8px rgba(85,201,173,.85);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  max-width: 470px;
  min-height: 310px;
}

.hero-copy h2 {
  max-width: 430px;
  margin: 19px 0 12px;
  font-family: var(--display);
  font-size: clamp(36px, 5vw, 65px);
  line-height: .98;
  letter-spacing: -.055em;
  text-wrap: balance;
}

.hero-copy h2 em {
  color: var(--apricot-bright);
  font-style: normal;
}

.hero-copy > p {
  max-width: 380px;
  margin: 0;
  color: rgba(255,255,255,.72);
  font-size: 13px;
  line-height: 1.75;
}

.primary-action,
.secondary-action,
.ghost-action,
.small-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 800;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.primary-action {
  min-height: 48px;
  padding: 0 19px;
  color: #33233b;
  background: linear-gradient(135deg, var(--apricot-bright), var(--apricot));
  box-shadow: 0 11px 25px rgba(255,149,80,.24), inset 0 1px rgba(255,255,255,.55);
}

.primary-action:hover,
.small-action:hover { transform: translateY(-2px); box-shadow: 0 15px 30px rgba(255,149,80,.3); }

.primary-action svg,
.secondary-action svg,
.ghost-action svg {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hero-action-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 25px;
}

.time-caption {
  display: flex;
  align-items: center;
  gap: 7px;
  color: rgba(255,255,255,.52);
  font-size: 10px;
}

.time-caption strong { color: var(--white); }

.hero-foot {
  position: absolute;
  right: 20px;
  bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 13px;
  color: rgba(255,255,255,.66);
  background: rgba(16,16,43,.58);
  backdrop-filter: blur(12px);
  font-size: 9px;
}

.hero-foot strong { color: var(--white); font-size: 10px; }

.market-side {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 22px;
}

.lantern-card,
.note-card,
.paper-card,
.journey-card,
.collection-card {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.lantern-card {
  padding: 23px;
  color: var(--ink);
  background:
    radial-gradient(circle at 100% 0, rgba(255,189,110,.4), transparent 8rem),
    var(--paper);
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 17px;
}

.section-heading h3 {
  margin: 3px 0 0;
  font-family: var(--display);
  font-size: 18px;
  letter-spacing: -.03em;
}

.section-heading > span {
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 9px;
}

.lantern-route {
  position: relative;
  display: grid;
  gap: 0;
}

.lantern-route::before {
  content: "";
  position: absolute;
  top: 20px;
  bottom: 20px;
  left: 15px;
  width: 1px;
  background: rgba(47,41,58,.15);
}

.route-stop {
  position: relative;
  display: grid;
  grid-template-columns: 31px 1fr auto;
  align-items: center;
  gap: 11px;
  min-height: 52px;
}

.route-light {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border: 1px solid rgba(48,40,60,.12);
  border-radius: 11px;
  color: rgba(45,38,57,.4);
  background: #eee4d2;
  font-size: 11px;
  font-weight: 800;
}

.route-stop.is-current .route-light {
  color: #4b2d35;
  border-color: rgba(214,117,78,.3);
  background: var(--apricot-bright);
  box-shadow: 0 7px 17px rgba(238,141,83,.26), 0 0 0 5px rgba(255,173,102,.11);
}

.route-stop.is-complete .route-light {
  color: #16423b;
  background: #a8e5d6;
}

.route-label strong,
.route-label small { display: block; }
.route-label strong { font-size: 11px; }
.route-label small { margin-top: 3px; color: var(--ink-soft); font-size: 9px; }
.route-time { color: var(--ink-soft); font-family: var(--mono); font-size: 8px; }

.progress-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding-top: 15px;
  border-top: 1px dashed rgba(48,40,60,.16);
  color: var(--ink-soft);
  font-size: 10px;
}

.progress-summary strong { color: var(--ink); }

.note-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 190px;
  padding: 22px;
  border: 1px solid rgba(255,255,255,.1);
  background:
    linear-gradient(180deg, rgba(24,25,62,.05), rgba(19,19,49,.94)),
    var(--note-image, url("./assets/night-market-welcome.webp")) var(--note-position, 83% 48%) / 210% auto;
  overflow: hidden;
}

.note-card::after {
  content: "“";
  position: absolute;
  top: 12px;
  left: 16px;
  color: rgba(255,198,128,.35);
  font-family: Georgia, serif;
  font-size: 64px;
}

.note-card p {
  position: relative;
  z-index: 1;
  max-width: 250px;
  margin: 0 0 13px;
  color: rgba(255,255,255,.86);
  font-family: var(--display);
  font-size: 15px;
  line-height: 1.55;
}

.note-author {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 9px;
  color: rgba(255,255,255,.48);
  font-size: 9px;
}

.note-author .mini-mascot {
  position: static;
  width: 30px;
  height: 30px;
}

.below-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-top: 22px;
}

.paper-card {
  padding: 22px;
  color: var(--ink);
  background: var(--paper);
}

.compact-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 16px;
}

.compact-heading h3 { margin: 0; font-family: var(--display); font-size: 17px; }
.compact-heading span { color: var(--ink-soft); font-size: 9px; }

.preview-words {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.word-pill {
  padding: 7px 10px;
  border: 1px solid rgba(42,35,53,.1);
  border-radius: 10px;
  background: #f3e9d5;
  font-family: var(--display);
  font-size: 10px;
  font-weight: 800;
}

.word-pill:nth-child(2n) { background: #e5f2eb; }
.word-pill:nth-child(3n) { background: #eee7f1; }

.upgrade-row {
  display: grid;
  grid-template-columns: 46px 1fr auto;
  align-items: center;
  gap: 12px;
}

.upgrade-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: linear-gradient(145deg, #322b53, #181936);
  box-shadow: inset 0 1px rgba(255,255,255,.16);
  font-size: 21px;
}

.upgrade-copy strong,
.upgrade-copy span { display: block; }
.upgrade-copy strong { font-size: 11px; }
.upgrade-copy span { margin-top: 4px; color: var(--ink-soft); font-size: 9px; }

.upgrade-meter {
  width: 80px;
  height: 6px;
  margin-top: 7px;
  border-radius: 99px;
  background: #ddd2c0;
  overflow: hidden;
}

.upgrade-meter span {
  display: block;
  width: 38%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--jade), #81dcc6);
  transition: width .5s ease;
}

.upgrade-price { color: var(--ink-soft); font-family: var(--mono); font-size: 9px; }

.mobile-nav { display: none; }

/* Journey */
.journey-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(290px, .7fr);
  gap: 22px;
}

.journey-card,
.collection-card {
  color: var(--ink);
  background: var(--paper);
}

.journey-map {
  padding: clamp(23px, 3.4vw, 38px);
}

.journey-intro {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 25px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line-paper);
}

.journey-intro h2 {
  margin: 4px 0 8px;
  font-family: var(--display);
  font-size: clamp(25px, 3vw, 38px);
  letter-spacing: -.04em;
}

.journey-intro p { max-width: 540px; margin: 0; color: var(--ink-soft); font-size: 11px; line-height: 1.7; }

.route-badge {
  flex: 0 0 auto;
  align-self: flex-start;
  padding: 8px 11px;
  border-radius: 10px;
  color: #244c44;
  background: #d7efe7;
  font-size: 9px;
  font-weight: 800;
}

.week-track {
  display: grid;
  gap: 8px;
}

.day-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 67px;
  padding: 8px 11px 8px 8px;
  border: 1px solid transparent;
  border-radius: 16px;
}

.day-row.is-current {
  border-color: rgba(206,117,76,.2);
  background: #fbebd7;
}

.day-row.is-complete { background: #e9f4ef; }

.day-index {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  color: var(--ink-soft);
  background: #eee5d3;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 800;
}

.day-row.is-current .day-index { color: #4f302d; background: var(--apricot-bright); }
.day-row.is-complete .day-index { color: #22594f; background: #bde7da; }

.day-copy strong,
.day-copy small { display: block; }
.day-copy strong { font-size: 11px; }
.day-copy small { margin-top: 4px; color: var(--ink-soft); font-size: 9px; }
.day-state { color: var(--ink-soft); font-size: 9px; }

.branch-stack { display: grid; gap: 16px; }

.branch-card {
  position: relative;
  min-height: 194px;
  padding: 23px;
  border: 1px solid rgba(255,255,255,.11);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, #2f305f, #202046);
  overflow: hidden;
}

.branch-card.trade { background: linear-gradient(145deg, #21504e, #172e3a); }
.branch-card::after { content: "✦"; position: absolute; right: -13px; bottom: -32px; color: rgba(255,255,255,.06); font-size: 130px; }
.branch-card .lock { display: inline-flex; padding: 5px 8px; border: 1px solid rgba(255,255,255,.15); border-radius: 99px; color: rgba(255,255,255,.58); font-size: 8px; }
.branch-card h3 { max-width: 210px; margin: 22px 0 7px; font-family: var(--display); font-size: 21px; line-height: 1.15; }
.branch-card p { max-width: 230px; margin: 0; color: rgba(255,255,255,.52); font-size: 9px; line-height: 1.65; }

/* Collection */
.collection-layout { display: grid; gap: 22px; }
.collection-hero { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: end; padding: clamp(24px,4vw,42px); }
.collection-hero h2 { margin: 5px 0 10px; font-family: var(--display); font-size: clamp(27px,4vw,46px); letter-spacing: -.045em; }
.collection-hero p { max-width: 590px; margin: 0; color: var(--ink-soft); font-size: 11px; line-height: 1.7; }
.collection-count { text-align: right; }
.collection-count strong { display: block; color: var(--berry); font-family: var(--display); font-size: 46px; line-height: 1; }
.collection-count span { color: var(--ink-soft); font-size: 9px; }
.expression-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 15px; }
.expression-card { min-height: 165px; padding: 21px; border-radius: 18px; color: var(--ink); background: var(--paper); box-shadow: var(--shadow-card); }
.expression-card.is-locked { color: rgba(255,255,255,.5); background: rgba(255,255,255,.065); }
.expression-tag { display: inline-block; padding: 5px 8px; border-radius: 99px; color: #28534b; background: #d8eee7; font-size: 8px; font-weight: 800; }
.expression-card.is-locked .expression-tag { color: rgba(255,255,255,.5); background: rgba(255,255,255,.08); }
.expression-card h3 { margin: 21px 0 7px; font-family: var(--display); font-size: 15px; line-height: 1.4; }
.expression-card p { margin: 0; color: var(--ink-soft); font-size: 9px; line-height: 1.6; }
.expression-card.is-locked p { color: rgba(255,255,255,.35); }

/* Challenge */
.challenge-layer {
  position: fixed;
  z-index: 50;
  inset: 0;
  display: none;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 5%, rgba(255,177,103,.23), transparent 23rem),
    radial-gradient(circle at 90% 90%, rgba(85,201,173,.17), transparent 28rem),
    #17183c;
}

.challenge-layer.is-open {
  display: block;
  animation: layer-in .38s ease both;
}

@keyframes layer-in { from { opacity: 0; } to { opacity: 1; } }

.challenge-shell {
  width: min(940px, calc(100% - 40px));
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: 25px 0 45px;
}

.challenge-header {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 16px;
  color: var(--white);
}

.icon-button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  color: var(--white);
  background: rgba(255,255,255,.06);
  cursor: pointer;
}

.icon-button svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.challenge-progress { min-width: 0; }
.challenge-progress-meta { display: flex; justify-content: space-between; margin-bottom: 8px; color: rgba(255,255,255,.55); font-size: 9px; }
.challenge-progress-meta strong { color: var(--white); }
.challenge-track { height: 6px; border-radius: 99px; background: rgba(255,255,255,.1); overflow: hidden; }
.challenge-track span { display: block; width: 12%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--apricot), var(--gold)); box-shadow: 0 0 12px rgba(255,186,105,.45); transition: width .45s cubic-bezier(.2,.8,.2,1); }

.challenge-card {
  position: relative;
  width: min(720px, 100%);
  min-height: 560px;
  margin: 38px auto 0;
  padding: clamp(27px, 5vw, 55px);
  border-radius: 32px;
  background: var(--paper);
  box-shadow: 0 30px 80px rgba(5,6,25,.32);
  overflow: hidden;
  animation: card-in .45s cubic-bezier(.2,.75,.25,1) both;
}

@keyframes card-in { from { opacity: 0; transform: translateY(16px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }

.challenge-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 180px;
  height: 180px;
  border-radius: 0 0 0 100%;
  background: radial-gradient(circle at 100% 0, rgba(255,190,111,.3), transparent 68%);
  pointer-events: none;
}

.step-kicker { margin: 0 0 10px; color: #b16054; font-family: var(--mono); font-size: 9px; font-weight: 800; letter-spacing: .15em; }
.challenge-card h2 { max-width: 580px; margin: 0; font-family: var(--display); font-size: clamp(28px,5vw,45px); line-height: 1.08; letter-spacing: -.045em; }
.step-lead { max-width: 570px; margin: 13px 0 0; color: var(--ink-soft); font-size: 11px; line-height: 1.8; }

.warmup-stack { display: grid; gap: 9px; margin: 28px 0; }
.warmup-phrase { display: grid; grid-template-columns: 31px 1fr auto; align-items: center; gap: 11px; min-height: 56px; padding: 8px 13px 8px 8px; border: 1px solid var(--line-paper); border-radius: 15px; background: #f7efdf; }
.phrase-check { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 10px; color: #28554b; background: #cceadf; font-size: 12px; }
.warmup-phrase strong { display: block; font-size: 11px; }
.warmup-phrase small { color: var(--ink-soft); font-size: 9px; }
.speak-mini { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; color: var(--ink); background: #e8dfcf; cursor: pointer; }
.speak-mini svg { width: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.step-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 27px; }
.step-actions.is-end { justify-content: flex-end; }
.secondary-action { min-height: 47px; padding: 0 18px; color: var(--ink); border: 1px solid rgba(43,35,55,.13); background: transparent; }
.secondary-action:hover { background: #eee5d5; }
.ghost-action { min-height: 42px; padding: 0 12px; color: var(--ink-soft); background: transparent; }
.small-action { min-height: 38px; padding: 0 13px; color: #3d2a39; background: var(--apricot-bright); }

.vocab-stage { margin-top: 32px; }
.word-count { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 15px; color: var(--ink-soft); font-family: var(--mono); font-size: 9px; }
.word-count strong { color: #a85d52; }
.word-main { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding-bottom: 25px; border-bottom: 1px solid var(--line-paper); }
.word-main h3 { margin: 0; font-family: var(--display); font-size: clamp(38px,8vw,68px); line-height: 1; letter-spacing: -.05em; }
.word-main p { margin: 9px 0 0; color: var(--ink-soft); font-family: var(--mono); font-size: 10px; }
.sound-button { display: grid; place-items: center; flex: 0 0 auto; width: 49px; height: 49px; border-radius: 16px; color: #244d45; background: #cce9df; cursor: pointer; }
.sound-button svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.meaning-line { display: flex; align-items: baseline; gap: 12px; margin-top: 22px; }
.meaning-line strong { font-size: 18px; }
.meaning-line span { color: var(--ink-soft); font-size: 10px; }
.example-box { margin-top: 23px; padding: 17px 19px; border-left: 3px solid var(--apricot); border-radius: 0 13px 13px 0; background: #f2e9d9; }
.example-box small { display: block; margin-bottom: 7px; color: #aa655a; font-size: 8px; font-weight: 800; letter-spacing: .12em; }
.example-box p { margin: 0; font-family: var(--display); font-size: 14px; line-height: 1.6; }
.example-box span { display: block; margin-top: 5px; color: var(--ink-soft); font-size: 9px; }
.word-dots { display: flex; gap: 6px; }
.word-dots span { width: 7px; height: 7px; border-radius: 50%; background: #d8cebd; }
.word-dots span.is-done { background: var(--jade); }
.word-dots span.is-current { width: 20px; border-radius: 99px; background: var(--apricot); }

.quiz-options { display: grid; gap: 10px; margin-top: 28px; }
.quiz-option { display: flex; align-items: center; gap: 13px; min-height: 58px; padding: 9px 14px; border: 1px solid var(--line-paper); border-radius: 15px; color: var(--ink); background: #f7efdf; cursor: pointer; text-align: left; transition: transform .18s ease, border-color .18s ease, background .18s ease; }
.quiz-option:hover { transform: translateX(3px); border-color: rgba(199,111,81,.35); }
.quiz-letter { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 9px; background: #e9decd; font-family: var(--mono); font-size: 9px; font-weight: 800; }
.quiz-option.is-correct { border-color: rgba(61,149,127,.4); background: #ddf1ea; }
.quiz-option.is-wrong { border-color: rgba(214,99,103,.35); background: #f8e1df; }
.quiz-hint { min-height: 20px; margin-top: 12px; color: #9a574f; font-size: 9px; }

.dialogue-scene { position: relative; margin-top: 26px; padding: 21px; border-radius: 20px; color: var(--white); background: linear-gradient(140deg, #292a5b, #1c1c43); overflow: hidden; }
.dialogue-scene::after { content: ""; position: absolute; inset: 0; opacity: .23; background: var(--dialogue-image, url("./assets/night-market-welcome.webp")) var(--dialogue-position, center) / cover; mix-blend-mode: luminosity; pointer-events: none; }
.customer-row { position: relative; z-index: 1; display: grid; grid-template-columns: 42px 1fr; gap: 12px; align-items: start; }
.customer-avatar { display: grid; place-items: center; width: 42px; height: 42px; border: 2px solid rgba(255,255,255,.25); border-radius: 50%; background: linear-gradient(145deg,#7abeb2,#325f65); font-size: 18px; }
.customer-bubble { padding: 14px 16px; border-radius: 4px 16px 16px 16px; color: var(--ink); background: rgba(255,247,230,.94); font-family: var(--display); font-size: 13px; line-height: 1.6; }
.target-words { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 7px; margin-top: 17px; }
.target-words span { padding: 6px 9px; border: 1px solid rgba(255,255,255,.17); border-radius: 99px; color: rgba(255,255,255,.72); background: rgba(13,14,39,.44); font-size: 8px; }
.target-words span.is-used { color: #163d34; border-color: transparent; background: #9de0cf; }

.answer-zone { margin-top: 17px; }
.answer-zone label { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; color: var(--ink-soft); font-size: 9px; }
.answer-zone textarea { display: block; width: 100%; min-height: 105px; resize: vertical; padding: 15px 17px; border: 1px solid rgba(43,35,55,.14); border-radius: 15px; color: var(--ink); background: #fffaf0; font-size: 12px; line-height: 1.6; }
.answer-zone textarea::placeholder { color: #aaa0a6; }
.mic-console { margin-top: 13px; padding: 13px; border: 1px solid rgba(52,49,94,.13); border-radius: 16px; background: linear-gradient(135deg,rgba(255,255,255,.58),rgba(238,229,213,.64)); }
.mic-status-row { display: grid; grid-template-columns: 35px minmax(0,1fr) auto; align-items: center; gap: 10px; }
.mic-status-icon { display: grid; place-items: center; width: 35px; height: 35px; border-radius: 12px; color: #4b486f; background: #e5dccd; transition: color .2s ease, background .2s ease, box-shadow .2s ease; }
.mic-status-icon svg { width: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mic-status-copy { min-width: 0; }
.mic-status-copy strong,
.mic-status-copy span { display: block; }
.mic-status-copy strong { color: var(--ink); font-size: 9px; }
.speech-status { margin-top: 3px; color: var(--ink-soft); font-size: 8px; line-height: 1.5; }
.mic-status-badge { padding: 5px 7px; border-radius: 999px; color: #656078; background: rgba(52,49,94,.07); font-family: var(--mono); font-size: 6px; font-weight: 800; white-space: nowrap; }
.mic-console[data-mic-state="granted"] .mic-status-icon { color: #23594e; background: #cfe9e1; }
.mic-console[data-mic-state="granted"] .mic-status-badge { color: #23594e; background: #d9eee8; }
.mic-console[data-mic-state="requesting"] .mic-status-icon,
.mic-console[data-mic-state="finishing"] .mic-status-icon { color: #74463e; background: #ffe0b8; box-shadow: 0 0 0 5px rgba(255,173,102,.12); }
.mic-console[data-mic-state="listening"] .mic-status-icon,
.mic-console[data-mic-state="recording"] .mic-status-icon { color: #fff; background: #b94e5a; animation: record-pulse 1.5s ease infinite; }
.mic-console[data-mic-state="listening"] .mic-status-badge,
.mic-console[data-mic-state="recording"] .mic-status-badge { color: #8a3742; background: #f7dadd; }
.mic-console[data-mic-state="denied"] .mic-status-icon,
.mic-console[data-mic-state="error"] .mic-status-icon,
.mic-console[data-mic-state="busy"] .mic-status-icon,
.mic-console[data-mic-state="no-device"] .mic-status-icon { color: #8a3742; background: #f2dadd; }
.record-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 12px; }
.record-button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-width: 185px; min-height: 46px; padding: 0 15px; border-radius: 13px; color: var(--white); background: #34315e; cursor: pointer; font-weight: 800; touch-action: manipulation; }
.record-button.is-listening { background: #b94e5a; animation: record-pulse 1.5s ease infinite; }
@keyframes record-pulse { 50% { box-shadow: 0 0 0 7px rgba(185,78,90,.12); } }
.record-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--berry); }
.record-button.is-listening .record-dot { background: var(--white); }
.mic-help-toggle { min-height: 40px; padding: 0 4px; color: #5b5677; background: transparent; cursor: pointer; font-size: 8px; text-decoration: underline; text-decoration-color: rgba(91,86,119,.3); text-underline-offset: 3px; touch-action: manipulation; }
.mic-help { margin-top: 12px; padding: 13px 14px; border-radius: 13px; color: #f7f0e5; background: #2d2b56; }
.mic-help[hidden] { display: none; }
.mic-help > strong { display: block; color: #ffd08b; font-size: 9px; }
.mic-help-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 10px; margin-top: 10px; }
.mic-help-grid section { padding: 10px 11px; border: 1px solid rgba(255,255,255,.1); border-radius: 11px; background: rgba(255,255,255,.045); }
.mic-help-grid section > b { display: block; color: #fff; font-size: 8px; }
.mic-help ol { display: grid; gap: 7px; margin: 9px 0 0; padding-left: 18px; }
.mic-help li,
.mic-help p { color: rgba(255,255,255,.72); font-size: 8px; line-height: 1.6; }
.mic-help p { margin: 9px 0 0; }
.mic-help b { color: #fff; }
.mic-help button { min-height: 40px; margin-top: 11px; padding: 0 12px; border-radius: 10px; color: #3d3040; background: #ffd08b; cursor: pointer; font-size: 8px; font-weight: 800; touch-action: manipulation; }
.mic-playback { display: grid; grid-template-columns: minmax(0,1fr) minmax(210px,280px) auto; align-items: center; gap: 10px; margin-top: 12px; padding: 10px; border: 1px solid rgba(61,149,127,.2); border-radius: 13px; background: #e5f0eb; }
.mic-playback strong,
.mic-playback span { display: block; }
.mic-playback strong { color: #24584e; font-size: 8px; }
.mic-playback span { margin-top: 2px; color: #57746d; font-size: 7px; line-height: 1.45; }
.mic-playback audio { width: 100%; height: 36px; }
.mic-playback button { min-height: 38px; padding: 0 9px; border-radius: 9px; color: #79424b; background: #f5dfe0; cursor: pointer; font-size: 7px; touch-action: manipulation; }
.mic-privacy { display: flex; align-items: center; gap: 5px; margin: 10px 0 0; color: #777083; font-size: 7px; line-height: 1.45; }
.mic-privacy span { color: #3d8e7a; font-size: 12px; }

.feedback-stack { display: grid; gap: 10px; margin-top: 25px; }
.feedback-item { display: grid; grid-template-columns: 34px 1fr; gap: 12px; padding: 14px; border: 1px solid var(--line-paper); border-radius: 15px; background: #f6eddd; }
.feedback-item.is-good { background: #e4f3ed; }
.feedback-item.is-focus { background: #fae6d7; }
.feedback-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; color: #74483f; background: rgba(255,255,255,.53); font-size: 15px; }
.feedback-copy small { display: block; margin-bottom: 4px; color: var(--ink-soft); font-size: 8px; font-weight: 800; letter-spacing: .08em; }
.feedback-copy p { margin: 0; font-size: 10px; line-height: 1.65; }
.feedback-copy .english { font-family: var(--display); font-size: 12px; }
.practice-note { margin-top: 11px; color: var(--ink-soft); font-size: 8px; text-align: center; }

.reward-card { text-align: center; }
.reward-card::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle, rgba(255,184,97,.26) 0 3px, transparent 4px) 0 0 / 42px 42px; mask-image: linear-gradient(to bottom, #000, transparent 70%); opacity: .45; }
.reward-content { position: relative; z-index: 1; }
.reward-lantern { position: relative; display: grid; place-items: center; width: 108px; height: 128px; margin: 2px auto 23px; border-radius: 44px; color: #593238; background: linear-gradient(90deg, #ef8c65, #ffd07f 48%, #ed8964); box-shadow: 0 0 60px rgba(255,174,101,.45), inset 0 0 0 6px rgba(255,245,207,.24); font-size: 38px; }
.reward-lantern::before { content: ""; position: absolute; top: -7px; width: 58px; height: 12px; border-radius: 5px; background: #46304c; }
.reward-lantern::after { content: ""; position: absolute; bottom: -17px; width: 3px; height: 22px; background: #dc7e65; box-shadow: -9px 3px #dc7e65, 9px 3px #dc7e65; }
.reward-card h2 { margin-inline: auto; }
.reward-card .step-lead { margin-inline: auto; }
.reward-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 26px; }
.reward-item { padding: 15px 8px; border-radius: 15px; background: #f0e6d5; }
.reward-item span { display: block; font-size: 18px; }
.reward-item strong { display: block; margin-top: 5px; font-size: 12px; }
.reward-item small { color: var(--ink-soft); font-size: 8px; }

.toast-region { position: fixed; z-index: 80; right: 20px; bottom: 20px; display: grid; gap: 9px; }
.toast { min-width: 220px; padding: 13px 15px; border: 1px solid rgba(255,255,255,.12); border-radius: 13px; color: var(--white); background: rgba(25,25,58,.94); box-shadow: 0 18px 40px rgba(7,8,28,.32); font-size: 10px; animation: toast-in .25s ease both; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 1080px) {
  .app-shell { grid-template-columns: 86px minmax(0,1fr); }
  .side-rail { padding-inline: 16px; align-items: center; }
  .brand > span:last-child,
  .nav-item > span:last-child,
  .companion-note,
  .profile-button > span:not(.profile-avatar) { display: none; }
  .desktop-nav { width: 100%; }
  .nav-item { justify-content: center; padding-inline: 8px; }
  .profile-button { display: flex; justify-content: center; }
  .market-grid { grid-template-columns: minmax(0,1.35fr) minmax(250px,.7fr); }
  .hero-card { min-height: 400px; }
  .below-grid { grid-template-columns: 1fr; }
}

@media (max-width: 780px) {
  body { background: #17183c; }
  .app-shell { display: block; padding-bottom: 79px; }
  .side-rail { display: none; }
  .main-stage { padding: 22px 16px 34px; }
  .topbar { margin-bottom: 18px; }
  .eyebrow { font-size: 8px; }
  .status-pill { padding: 7px 9px; }
  .status-pill small { display: none; }
  .status-pill > span { grid-row: auto; font-size: 14px; }
  .status-pill strong { font-size: 10px; }
  .view-root { min-height: auto; }
  .market-grid,
  .journey-layout { grid-template-columns: 1fr; }
  .hero-card { min-height: 520px; padding: 22px; border-radius: 24px; background: linear-gradient(0deg, rgba(16,16,44,.92) 2%, rgba(16,16,44,.45) 58%, rgba(16,16,44,.08) 100%), var(--hero-image, url("./assets/night-market-welcome.webp")) var(--hero-position, 68% center) / cover; }
  .hero-copy { justify-content: flex-end; min-height: 412px; }
  .hero-copy h2 { max-width: 330px; margin-top: 15px; font-size: clamp(36px,12vw,52px); }
  .hero-copy > p { font-size: 11px; line-height: 1.65; }
  .hero-action-row { width: 100%; margin-top: 20px; }
  .hero-action-row .primary-action { flex: 1; }
  .hero-foot { display: none; }
  .market-side { grid-template-columns: 1fr; grid-template-rows: auto; }
  .note-card { min-height: 170px; }
  .below-grid { grid-template-columns: 1fr; }
  .mobile-nav { position: fixed; z-index: 30; right: 12px; bottom: 10px; left: 12px; display: grid; grid-template-columns: repeat(3,1fr); height: 64px; padding: 6px; border: 1px solid rgba(255,255,255,.12); border-radius: 21px; background: rgba(20,20,53,.88); box-shadow: 0 17px 45px rgba(5,6,24,.45); backdrop-filter: blur(18px); }
  .mobile-nav-item { display: grid; place-items: center; align-content: center; gap: 3px; border-radius: 16px; color: rgba(255,255,255,.42); background: transparent; font-size: 8px; cursor: pointer; }
  .mobile-nav-item svg { width: 19px; }
  .mobile-nav-item.is-active { color: var(--apricot-bright); background: rgba(255,173,102,.1); }
  .journey-intro { display: block; }
  .route-badge { display: inline-block; margin-top: 14px; }
  .branch-stack { grid-template-columns: 1fr 1fr; }
  .branch-card { min-height: 170px; padding: 17px; }
  .branch-card h3 { font-size: 16px; }
  .collection-hero { grid-template-columns: 1fr; }
  .collection-count { text-align: left; }
  .expression-grid { grid-template-columns: 1fr 1fr; }
  .challenge-shell { width: calc(100% - 24px); padding: calc(13px + env(safe-area-inset-top)) env(safe-area-inset-right) calc(26px + env(safe-area-inset-bottom)) env(safe-area-inset-left); }
  .challenge-header { grid-template-columns: 38px 1fr 38px; gap: 10px; }
  .icon-button { width: 38px; height: 38px; border-radius: 12px; }
  .challenge-card { min-height: calc(100vh - 105px); margin-top: 16px; padding: 29px 21px 26px; border-radius: 25px; }
  .challenge-card { min-height: calc(100dvh - 105px); }
  .step-actions { position: sticky; bottom: 0; margin-inline: -6px; padding: 15px 6px max(2px, env(safe-area-inset-bottom)); background: linear-gradient(0deg, var(--paper) 72%, transparent); }
  .answer-zone label { font-size: 11px; }
  .answer-zone textarea { font-size: 16px; }
  .mic-console { padding: 12px; }
  .mic-status-row { grid-template-columns: 35px minmax(0,1fr); align-items: start; }
  .mic-status-copy strong { font-size: 12px; }
  .speech-status { margin-top: 4px; font-size: 12px; line-height: 1.55; text-align: left; }
  .mic-status-badge { grid-column: 2; justify-self: start; margin-top: -3px; font-size: 8px; }
  .record-row { align-items: stretch; flex-direction: column; gap: 4px; }
  .record-button { width: 100%; min-height: 48px; font-size: 12px; }
  .mic-help-toggle { align-self: flex-start; min-height: 40px; font-size: 11px; }
  .mic-help > strong { font-size: 12px; }
  .mic-help-grid { grid-template-columns: 1fr; }
  .mic-help-grid section > b { font-size: 11px; }
  .mic-help li,
  .mic-help p { font-size: 11px; }
  .mic-help button { min-height: 44px; font-size: 11px; }
  .mic-playback { grid-template-columns: 1fr; }
  .mic-playback strong { font-size: 11px; }
  .mic-playback span { font-size: 10px; }
  .mic-playback button { min-height: 44px; font-size: 10px; }
  .mic-privacy { align-items: flex-start; font-size: 10px; }
  .site-footer { align-items: flex-start; flex-direction: column; padding-bottom: calc(74px + env(safe-area-inset-bottom)); font-size: 10px; }
  .site-footer nav { flex-wrap: wrap; gap: 12px; }
  .site-footer a { min-height: 32px; }
}

@media (max-width: 480px) {
  .topbar h1 { font-size: 24px; }
  .status-pills { gap: 5px; }
  .status-pill { border-radius: 11px; }
  .hero-card { min-height: 500px; }
  .time-caption { display: none; }
  .branch-stack,
  .expression-grid { grid-template-columns: 1fr; }
  .day-row { grid-template-columns: 44px minmax(0,1fr); }
  .day-index { width: 44px; height: 44px; }
  .day-state { grid-column: 2; }
  .step-actions { flex-wrap: wrap; }
  .step-actions .primary-action { flex: 1; }
  .word-main h3 { font-size: 44px; }
  .reward-grid { gap: 6px; }
  .reward-item { padding-inline: 4px; }
}

/* Multi-practice daily board */
.theme-apricot,
.challenge-layer[data-exercise-theme="apricot"] {
  --task-accent: #ffad66;
  --task-accent-soft: #ffe0b8;
  --task-ink: #57313d;
  --task-gradient: linear-gradient(135deg, #ffc680, #ef8b68);
}

.theme-jade,
.challenge-layer[data-exercise-theme="jade"] {
  --task-accent: #55c9ad;
  --task-accent-soft: #cceee4;
  --task-ink: #204e48;
  --task-gradient: linear-gradient(135deg, #82ddc7, #43a9a1);
}

.theme-berry,
.challenge-layer[data-exercise-theme="berry"] {
  --task-accent: #ec7f89;
  --task-accent-soft: #f7d2d5;
  --task-ink: #603143;
  --task-gradient: linear-gradient(135deg, #f3a0a4, #d56178);
}

.theme-sky,
.challenge-layer[data-exercise-theme="sky"] {
  --task-accent: #8cb9ea;
  --task-accent-soft: #d9e8f7;
  --task-ink: #294867;
  --task-gradient: linear-gradient(135deg, #a9d2f4, #688fc9);
}

.hero-card-dynamic {
  background:
    linear-gradient(90deg, rgba(18,17,45,.96) 0%, rgba(22,19,50,.76) 42%, rgba(18,17,42,.08) 76%),
    linear-gradient(0deg, rgba(13,14,38,.62), transparent 48%),
    var(--hero-image) var(--hero-position) / cover;
}

.hero-card-dynamic .chip-dot {
  background: var(--task-accent);
  box-shadow: 0 0 10px var(--task-accent);
}

.hero-card-dynamic .primary-action,
.challenge-layer .primary-action {
  background: var(--task-gradient, linear-gradient(135deg, var(--apricot-bright), var(--apricot)));
}

.market-side-v2 {
  grid-template-rows: auto minmax(160px, .65fr);
}

.daily-floor-card {
  padding: 22px;
}

.minimum-meter {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  margin: 3px 0 14px;
  padding: 14px;
  border: 1px solid rgba(43,35,55,.08);
  border-radius: 17px;
  background: #f3e9d8;
}

.minimum-meter > div:last-child > strong {
  display: block;
  font-size: 11px;
}

.minimum-meter p {
  margin: 4px 0 0;
  color: var(--ink-soft);
  font-size: 8px;
  line-height: 1.5;
}

.minimum-ring {
  display: grid;
  place-items: center;
  align-content: center;
  width: 68px;
  height: 68px;
  border: 6px solid #ded3c1;
  border-top-color: var(--apricot);
  border-radius: 50%;
  background: var(--paper);
}

.minimum-ring.is-met {
  border-color: var(--jade);
  box-shadow: 0 0 0 5px rgba(85,201,173,.1);
}

.minimum-ring strong {
  font-family: var(--display);
  font-size: 19px;
  line-height: 1;
}

.minimum-ring span {
  margin-top: 3px;
  color: var(--ink-soft);
  font-size: 7px;
}

.mini-task-list {
  display: grid;
  gap: 5px;
}

.mini-task {
  display: grid;
  grid-template-columns: 27px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 42px;
  padding: 5px 8px 5px 5px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.mini-task:hover,
.mini-task.is-current {
  border-color: rgba(174,101,70,.15);
  background: rgba(255,173,102,.12);
}

.mini-task.is-done {
  background: rgba(85,201,173,.1);
}

.mini-task > span:first-child {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 9px;
  color: #785049;
  background: #ecdcc7;
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 800;
}

.mini-task.is-done > span:first-child {
  color: #22564d;
  background: #bce5d8;
}

.mini-task strong,
.mini-task small {
  display: block;
}

.mini-task strong {
  font-size: 9px;
}

.mini-task small {
  margin-top: 2px;
  color: var(--ink-soft);
  font-size: 7px;
}

.mini-task > span:last-child {
  color: var(--ink-soft);
  font-size: 14px;
}

.note-card-dynamic {
  background:
    linear-gradient(180deg, rgba(24,25,62,.06), rgba(19,19,49,.95)),
    var(--note-image) var(--note-position) / 190% auto;
}

.task-board-section {
  margin-top: 27px;
}

.task-board-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 16px;
  padding-inline: 3px;
}

.task-board-heading h2 {
  margin: 4px 0 0;
  font-family: var(--display);
  font-size: clamp(23px, 3vw, 33px);
  letter-spacing: -.04em;
}

.task-board-heading > p {
  max-width: 430px;
  margin: 0;
  color: rgba(255,255,255,.48);
  font-size: 9px;
  line-height: 1.65;
  text-align: right;
}

.task-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
}

.task-choice-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 268px;
  padding: 17px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 20px;
  color: var(--white);
  background:
    linear-gradient(0deg, rgba(13,14,39,.94) 0%, rgba(16,17,44,.48) 62%, rgba(16,17,44,.15) 100%),
    var(--task-image) var(--task-position) / cover;
  box-shadow: 0 16px 34px rgba(6,7,26,.22);
  overflow: hidden;
  isolation: isolate;
  transition: transform .23s ease, border-color .23s ease, box-shadow .23s ease;
}

.task-choice-card::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(125deg, transparent 30%, color-mix(in srgb, var(--task-accent) 22%, transparent), transparent 70%);
  opacity: 0;
  transition: opacity .25s ease;
}

.task-choice-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--task-accent) 55%, transparent);
  box-shadow: 0 22px 42px rgba(6,7,26,.31);
}

.task-choice-card:hover::after {
  opacity: 1;
}

.task-choice-card.is-complete {
  border-color: rgba(85,201,173,.48);
}

.task-choice-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: rgba(255,255,255,.68);
  font-family: var(--mono);
  font-size: 7px;
}

.task-choice-top span:first-child {
  padding: 5px 7px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 99px;
  background: rgba(15,16,43,.44);
  backdrop-filter: blur(8px);
}

.task-choice-card.is-complete .task-choice-top span:first-child {
  color: #173f38;
  border-color: transparent;
  background: #a6decf;
}

.task-choice-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: flex-end;
  padding-top: 70px;
}

.task-level {
  align-self: flex-start;
  color: var(--task-accent-soft);
  font-family: var(--mono);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: .12em;
}

.task-choice-copy h3 {
  margin: 7px 0 5px;
  font-family: var(--display);
  font-size: 18px;
  letter-spacing: -.03em;
}

.task-choice-copy p {
  margin: 0;
  color: rgba(255,255,255,.57);
  font-size: 8px;
  line-height: 1.6;
}

.task-choice-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 38px;
  margin-top: 13px;
  padding: 0 11px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 11px;
  color: var(--white);
  background: rgba(255,255,255,.08);
  cursor: pointer;
  font-size: 8px;
  font-weight: 800;
  backdrop-filter: blur(9px);
}

.task-choice-action:hover {
  color: var(--task-ink);
  background: var(--task-accent-soft);
}

.market-summary-grid {
  margin-top: 16px;
}

.word-pill.is-learned {
  border-color: rgba(49,143,122,.24);
  background: #d8eee7;
}

.challenge-layer {
  isolation: isolate;
  --task-accent: var(--apricot);
  --task-gradient: linear-gradient(135deg, var(--apricot-bright), var(--apricot));
}

.challenge-layer::before {
  content: "";
  position: fixed;
  z-index: -2;
  inset: -28px;
  background:
    linear-gradient(120deg, rgba(16,17,45,.9), rgba(23,24,60,.72)),
    var(--exercise-bg-image, url("./assets/night-market-welcome.webp")) var(--exercise-bg-position, center) / cover;
  filter: blur(14px) saturate(.75);
  transform: scale(1.05);
}

.challenge-layer::after {
  content: "";
  position: fixed;
  z-index: -1;
  inset: 0;
  background:
    radial-gradient(circle at 12% 5%, color-mix(in srgb, var(--task-accent) 22%, transparent), transparent 28rem),
    radial-gradient(circle at 88% 90%, rgba(85,201,173,.13), transparent 28rem),
    rgba(17,18,47,.45);
  pointer-events: none;
}

.challenge-track span {
  background: var(--task-gradient);
  box-shadow: 0 0 12px color-mix(in srgb, var(--task-accent) 50%, transparent);
}

.dialogue-scene-dynamic::after {
  opacity: .46;
  mix-blend-mode: normal;
}

.challenge-layer .phrase-check,
.challenge-layer .sound-button {
  color: var(--task-ink);
  background: var(--task-accent-soft);
}

.challenge-layer .word-dots span.is-current,
.challenge-layer .example-box {
  border-color: var(--task-accent);
}

.challenge-layer .word-dots span.is-current {
  background: var(--task-accent);
}

.challenge-layer .reward-lantern {
  background: var(--task-gradient);
}

button:disabled {
  opacity: .42;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.reward-card-v2 {
  min-height: 620px;
}

.next-choice-card {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 15px;
  min-height: 112px;
  margin-top: 21px;
  padding: 16px;
  border-radius: 16px;
  color: var(--white);
  background:
    linear-gradient(90deg, rgba(18,18,46,.94), rgba(18,18,46,.22)),
    var(--next-image) var(--next-position) / cover;
  overflow: hidden;
  text-align: left;
}

.next-choice-card div {
  max-width: 72%;
}

.next-choice-card small,
.next-choice-card strong,
.next-choice-card div > span {
  display: block;
}

.next-choice-card small {
  color: var(--apricot-bright);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: .12em;
}

.next-choice-card strong {
  margin-top: 5px;
  font-family: var(--display);
  font-size: 16px;
}

.next-choice-card div > span {
  margin-top: 4px;
  color: rgba(255,255,255,.56);
  font-size: 8px;
  line-height: 1.5;
}

.next-choice-card > span {
  padding: 5px 8px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 99px;
  background: rgba(13,14,38,.5);
  font-size: 8px;
  white-space: nowrap;
}

.reward-decision {
  display: grid;
  grid-template-columns: .72fr 1.28fr;
  gap: 10px;
  margin-top: 14px;
}

.reward-decision > button {
  width: 100%;
}

.all-done-note {
  margin-top: 22px;
  padding: 17px;
  border-radius: 16px;
  background: #e2f2ec;
}

.all-done-note > span {
  display: block;
  color: #2f7c6c;
  font-size: 18px;
}

.all-done-note strong {
  display: block;
  margin-top: 5px;
  font-size: 11px;
}

.all-done-note p {
  margin: 4px 0 0;
  color: var(--ink-soft);
  font-size: 8px;
}

@media (max-width: 1180px) {
  .task-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .task-choice-card {
    min-height: 245px;
  }
}

@media (max-width: 780px) {
  .market-grid-v2 {
    grid-template-columns: 1fr;
  }

  .hero-card-dynamic {
    background:
      linear-gradient(0deg, rgba(16,16,44,.94) 2%, rgba(16,16,44,.5) 58%, rgba(16,16,44,.08) 100%),
      var(--hero-image) var(--hero-position) / cover;
  }

  .task-board-heading {
    display: block;
  }

  .task-board-heading > p {
    margin-top: 7px;
    text-align: left;
  }

  .task-board {
    grid-template-columns: none;
    grid-auto-columns: min(82vw, 320px);
    grid-auto-flow: column;
    gap: 11px;
    margin-inline: -16px;
    padding: 2px 16px 12px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: inline mandatory;
    scrollbar-width: none;
  }

  .task-board::-webkit-scrollbar {
    display: none;
  }

  .task-choice-card {
    min-height: 250px;
    scroll-snap-align: start;
  }

  .market-summary-grid {
    grid-template-columns: 1fr;
  }

  .note-card-dynamic {
    background-size: cover;
  }

  .reward-card-v2 {
    min-height: calc(100vh - 105px);
  }

  .reward-decision {
    position: sticky;
    bottom: 0;
    grid-template-columns: 1fr;
    margin-inline: -6px;
    padding: 15px 6px 2px;
    background: linear-gradient(0deg, var(--paper) 82%, transparent);
  }

  .reward-decision .secondary-action {
    order: 2;
  }
}

@media (max-width: 480px) {
  .minimum-meter {
    grid-template-columns: 68px minmax(0, 1fr);
  }

  .minimum-ring {
    width: 62px;
    height: 62px;
  }

  .next-choice-card div {
    max-width: 80%;
  }
}

/* Read-only world overview */
.overview-layer {
  position: fixed;
  z-index: 90;
  inset: 0;
  display: none;
  overflow-y: auto;
  color: var(--white);
  background:
    radial-gradient(circle at 8% 2%, rgba(255,173,102,.14), transparent 27rem),
    radial-gradient(circle at 95% 92%, rgba(85,201,173,.13), transparent 31rem),
    #11122f;
}

.overview-layer.is-open {
  display: block;
  animation: layer-in .3s ease both;
}

.overview-shell {
  width: min(1540px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 25px clamp(22px, 3vw, 46px) 54px;
}

.overview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 19px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}

.overview-title-group,
.overview-header-actions {
  display: flex;
  align-items: center;
  gap: 13px;
}

.overview-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255,198,128,.26);
  border-radius: 14px;
  color: var(--apricot-bright);
  background: linear-gradient(145deg, #302e5a, #1c1d43);
  box-shadow: inset 0 1px rgba(255,255,255,.1);
  font-family: var(--mono);
}

.overview-title-group p,
.overview-intro > p,
.world-map-heading p {
  margin: 0;
  color: var(--apricot-bright);
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .16em;
}

.overview-title-group h1 {
  margin: 4px 0 0;
  font-family: var(--display);
  font-size: 22px;
  letter-spacing: -.035em;
}

.overview-mode {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(85,201,173,.2);
  border-radius: 99px;
  color: rgba(255,255,255,.67);
  background: rgba(85,201,173,.07);
  font-size: 8px;
  font-weight: 700;
}

.overview-mode > span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--jade);
  box-shadow: 0 0 9px rgba(85,201,173,.8);
}

.overview-close {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  color: var(--white);
  background: rgba(255,255,255,.06);
  cursor: pointer;
}

.overview-close svg {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.overview-summary {
  display: grid;
  grid-template-columns: minmax(360px, 1.55fr) repeat(3, minmax(130px, .5fr));
  gap: 1px;
  margin-top: 20px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 20px;
  background: rgba(255,255,255,.1);
  box-shadow: 0 18px 42px rgba(5,6,25,.2);
  overflow: hidden;
}

.overview-intro,
.overview-stat {
  background: rgba(29,29,70,.92);
}

.overview-intro {
  padding: 22px 25px;
}

.overview-intro h2 {
  margin: 7px 0 7px;
  font-family: var(--display);
  font-size: clamp(19px, 2.4vw, 29px);
  letter-spacing: -.04em;
}

.overview-intro > span {
  color: rgba(255,255,255,.48);
  font-size: 9px;
}

.overview-stat {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 18px;
}

.overview-stat strong,
.overview-stat span,
.overview-stat small {
  display: block;
}

.overview-stat strong {
  font-family: var(--display);
  font-size: 22px;
}

.overview-stat span {
  margin-top: 5px;
  font-size: 9px;
  font-weight: 800;
}

.overview-stat small {
  margin-top: 3px;
  color: rgba(255,255,255,.38);
  font-size: 7px;
}

.world-architecture {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  margin-top: 13px;
  padding: 13px 18px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 16px;
  background: rgba(255,255,255,.035);
}

.world-architecture > div {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 10px;
  align-items: center;
}

.world-architecture small {
  grid-row: 1 / 3;
  padding: 6px 8px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 9px;
  color: var(--apricot-bright);
  font-family: var(--mono);
  font-size: 6px;
}

.world-architecture strong {
  font-size: 9px;
}

.world-architecture span {
  margin-top: 2px;
  color: rgba(255,255,255,.38);
  font-size: 7px;
}

.world-architecture i {
  color: rgba(255,255,255,.25);
  font-style: normal;
}

.world-overview-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  gap: 17px;
  align-items: start;
  margin-top: 17px;
}

.world-map-panel {
  min-width: 0;
  padding: 18px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 23px;
  background: rgba(25,25,61,.78);
  box-shadow: 0 22px 54px rgba(5,6,25,.25);
}

.world-map-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 13px;
}

.world-map-heading h2 {
  margin: 5px 0 0;
  font-family: var(--display);
  font-size: 20px;
  letter-spacing: -.035em;
}

.world-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  color: rgba(255,255,255,.48);
  font-size: 7px;
}

.world-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.world-legend span::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,.24);
}

.world-legend .legend-actual::before { background: var(--jade); }
.world-legend .legend-preview::before { background: var(--sky); }
.world-legend .legend-selected::before { background: var(--apricot); box-shadow: 0 0 7px rgba(255,173,102,.7); }

.world-map-canvas {
  position: relative;
  min-height: 650px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(16,17,45,.91), rgba(21,38,58,.72)),
    url("./assets/night-market-directions.webp") 55% center / cover;
  overflow: hidden;
  isolation: isolate;
}

.world-map-canvas::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    radial-gradient(circle at 10% 76%, rgba(255,173,102,.17), transparent 20%),
    radial-gradient(circle at 55% 25%, rgba(85,201,173,.13), transparent 24%),
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: auto, auto, 36px 36px, 36px 36px;
}

.world-zone-label {
  position: absolute;
  z-index: 1;
  padding: 5px 8px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 99px;
  color: rgba(255,255,255,.32);
  background: rgba(12,13,37,.35);
  font-family: var(--mono);
  font-size: 6px;
  letter-spacing: .12em;
}

.zone-origin { left: 3%; bottom: 5%; }
.zone-growth { top: 5%; left: 42%; }
.zone-branch { right: 3%; bottom: 3%; }

.world-main-route {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.route-shadow,
.route-line,
.route-branch {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.route-shadow {
  stroke: rgba(7,8,26,.62);
  stroke-width: 15;
}

.route-line {
  stroke: url(#routeGlow);
  stroke-width: 4;
  stroke-dasharray: 4 10;
  animation: route-drift 15s linear infinite;
}

.route-branch {
  stroke: rgba(140,185,234,.55);
  stroke-width: 3;
  stroke-dasharray: 3 9;
}

@keyframes route-drift {
  to { stroke-dashoffset: -140; }
}

.world-level-node {
  position: absolute;
  z-index: 3;
  top: var(--node-y);
  left: var(--node-x);
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 148px;
  min-height: 68px;
  padding: 7px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 15px;
  color: var(--white);
  background: rgba(18,19,48,.9);
  box-shadow: 0 12px 26px rgba(5,6,24,.36);
  cursor: pointer;
  text-align: left;
  transform: translate(-50%, -50%);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
  backdrop-filter: blur(12px);
}

.world-level-node:hover {
  z-index: 6;
  transform: translate(-50%, -54%);
  border-color: rgba(140,185,234,.55);
}

.world-level-node.is-selected {
  z-index: 7;
  border-color: var(--apricot);
  box-shadow: 0 0 0 4px rgba(255,173,102,.12), 0 16px 32px rgba(5,6,24,.4);
}

.world-level-node.is-complete,
.world-level-node.is-met {
  border-color: rgba(85,201,173,.56);
}

.world-level-node.is-branch {
  border-style: dashed;
  background: rgba(25,37,58,.92);
}

.world-node-scene {
  width: 42px;
  height: 49px;
  border-radius: 11px;
  background: linear-gradient(0deg, rgba(17,18,45,.2), rgba(17,18,45,.05)), var(--node-image) var(--node-position) / cover;
}

.world-node-copy {
  min-width: 0;
}

.world-node-copy small,
.world-node-copy strong,
.world-node-copy em {
  display: block;
}

.world-node-copy small {
  overflow: hidden;
  color: var(--sky);
  font-family: var(--mono);
  font-size: 5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.world-level-node.is-met .world-node-copy small,
.world-level-node.is-complete .world-node-copy small {
  color: var(--jade);
}

.world-node-copy strong {
  overflow: hidden;
  margin-top: 4px;
  font-family: var(--display);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.world-node-copy em {
  overflow: hidden;
  margin-top: 2px;
  color: rgba(255,255,255,.37);
  font-size: 6px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.world-node-progress {
  align-self: flex-start;
  padding: 3px 4px;
  border-radius: 6px;
  color: rgba(255,255,255,.55);
  background: rgba(255,255,255,.07);
  font-family: var(--mono);
  font-size: 5px;
}

.level-inspector {
  position: sticky;
  top: 17px;
  border-radius: 23px;
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 23px 54px rgba(5,6,25,.29);
  overflow: hidden;
}

.level-inspector:focus {
  outline: none;
}

.inspector-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 175px;
  padding: 15px;
  color: var(--white);
  background:
    linear-gradient(0deg, rgba(15,16,43,.94), rgba(15,16,43,.18)),
    var(--inspector-image) var(--inspector-position) / cover;
}

.inspector-visual-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.inspector-visual-top span {
  padding: 5px 7px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 99px;
  background: rgba(15,16,42,.45);
  font-family: var(--mono);
  font-size: 6px;
}

.inspector-visual > div:last-child small,
.inspector-visual > div:last-child strong {
  display: block;
}

.inspector-visual > div:last-child small {
  color: var(--apricot-bright);
  font-size: 7px;
}

.inspector-visual > div:last-child strong {
  margin-top: 5px;
  font-family: var(--display);
  font-size: 24px;
  letter-spacing: -.04em;
}

.inspector-body {
  padding: 19px;
}

.inspector-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.inspector-badges span {
  padding: 5px 7px;
  border-radius: 99px;
  color: var(--ink-soft);
  background: #ebe2d2;
  font-size: 7px;
  font-weight: 800;
}

.inspector-badges .status-met,
.inspector-badges .status-complete {
  color: #22564c;
  background: #d5ece5;
}

.inspector-badges .status-preview {
  color: #345574;
  background: #dbe7f3;
}

.inspector-body > h2 {
  margin: 13px 0 7px;
  font-family: var(--display);
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: -.035em;
}

.inspector-scene {
  margin: 0;
  color: var(--ink-soft);
  font-size: 8px;
  line-height: 1.7;
}

.inspector-progress-block {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--line-paper);
  border-radius: 13px;
  background: #f4ead9;
}

.inspector-progress-block > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 7px;
}

.inspector-progress-block strong {
  font-size: 7px;
}

.inspector-meter {
  height: 5px;
  margin-top: 8px;
  border-radius: 99px;
  background: #ddd1c0;
  overflow: hidden;
}

.inspector-meter span {
  display: block;
  min-width: 2px;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--jade), #79d8c1);
}

.inspector-metrics {
  display: grid;
  grid-template-columns: .6fr 1.4fr;
  gap: 8px;
  margin-top: 9px;
}

.inspector-metrics > div {
  padding: 10px;
  border-radius: 12px;
  background: #eee5d5;
}

.inspector-metrics strong,
.inspector-metrics span {
  display: block;
}

.inspector-metrics strong {
  font-size: 10px;
}

.inspector-metrics span {
  margin-top: 3px;
  color: var(--ink-soft);
  font-size: 6px;
}

.inspector-section,
.inspector-task-progress {
  margin-top: 16px;
}

.inspector-subheading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.inspector-subheading strong {
  font-size: 9px;
}

.inspector-subheading span {
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 6px;
}

.inspector-section > p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 8px;
  line-height: 1.65;
}

.inspector-stages {
  display: grid;
  gap: 5px;
}

.inspector-stages > div {
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: center;
  gap: 8px;
  min-height: 30px;
}

.inspector-stages span {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  color: #7a4b45;
  background: #f1d8be;
  font-family: var(--mono);
  font-size: 6px;
}

.inspector-stages strong {
  font-size: 7px;
}

.inspector-words {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.inspector-words span {
  padding: 5px 7px;
  border: 1px solid var(--line-paper);
  border-radius: 8px;
  background: #f2e8d8;
  font-family: var(--display);
  font-size: 7px;
  font-weight: 800;
}

.inspector-task-row {
  display: grid;
  grid-template-columns: 27px 1fr;
  align-items: center;
  gap: 8px;
  min-height: 39px;
  padding: 5px;
  border-radius: 10px;
  background: #f2e9da;
}

.inspector-task-row + .inspector-task-row {
  margin-top: 5px;
}

.inspector-task-row > span:first-child {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 8px;
  color: var(--ink-soft);
  background: #e2d7c5;
  font-family: var(--mono);
  font-size: 7px;
}

.inspector-task-row.is-done > span:first-child {
  color: #23574d;
  background: #bfe5da;
}

.inspector-task-row strong,
.inspector-task-row small {
  display: block;
}

.inspector-task-row strong { font-size: 7px; }
.inspector-task-row small { margin-top: 2px; color: var(--ink-soft); font-size: 6px; }

.preview-boundary {
  display: grid;
  grid-template-columns: 29px 1fr;
  gap: 9px;
  margin-top: 16px;
  padding: 11px;
  border: 1px dashed rgba(75,96,121,.25);
  border-radius: 12px;
  background: #e5edf2;
}

.preview-boundary > span {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border-radius: 9px;
  color: #375f7d;
  background: #d1e0ea;
}

.preview-boundary strong {
  font-size: 8px;
}

.preview-boundary p {
  margin: 3px 0 0;
  color: var(--ink-soft);
  font-size: 6px;
  line-height: 1.55;
}

.overview-return {
  width: 100%;
  min-height: 41px;
  margin-top: 17px;
  border-radius: 12px;
  color: var(--white);
  background: #28264f;
  cursor: pointer;
  font-size: 8px;
  font-weight: 800;
}

@media (max-width: 1180px) {
  .world-overview-layout {
    grid-template-columns: 1fr;
  }

  .level-inspector {
    position: static;
    display: grid;
    grid-template-columns: 310px 1fr;
  }

  .inspector-visual {
    min-height: 100%;
  }

  .overview-summary {
    grid-template-columns: minmax(300px, 1.25fr) repeat(3, minmax(110px, .5fr));
  }
}

@media (max-width: 780px) {
  .mobile-nav {
    grid-template-columns: repeat(4, 1fr);
  }

  .overview-shell {
    padding: 14px 12px 30px;
  }

  .overview-header {
    position: sticky;
    z-index: 20;
    top: 0;
    margin-inline: -12px;
    padding: 7px 12px 12px;
    background: linear-gradient(180deg, #11122f 75%, transparent);
  }

  .overview-mark,
  .overview-mode {
    display: none;
  }

  .overview-title-group h1 {
    font-size: 17px;
  }

  .overview-title-group p {
    font-size: 6px;
  }

  .overview-close {
    width: 38px;
    height: 38px;
  }

  .overview-summary {
    grid-template-columns: repeat(3, 1fr);
    margin-top: 10px;
  }

  .overview-intro {
    grid-column: 1 / -1;
    padding: 18px;
  }

  .overview-stat {
    min-height: 88px;
    padding: 12px;
  }

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

  .world-architecture {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .world-architecture i {
    display: none;
  }

  .world-map-panel {
    padding: 12px;
    border-radius: 19px;
  }

  .world-map-heading {
    display: block;
  }

  .world-legend {
    justify-content: flex-start;
    margin-top: 9px;
  }

  .world-map-canvas {
    display: grid;
    gap: 9px;
    min-height: 0;
    padding: 13px;
    background:
      linear-gradient(135deg, rgba(16,17,45,.95), rgba(21,38,58,.86)),
      url("./assets/night-market-directions.webp") center / cover;
    overflow: visible;
  }

  .world-main-route,
  .world-zone-label {
    display: none;
  }

  .world-level-node {
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
    min-height: 68px;
    transform: none;
  }

  .world-level-node:hover {
    transform: translateY(-2px);
  }

  .world-level-node.is-branch {
    width: calc(100% - 18px);
    margin-left: 18px;
  }

  .level-inspector {
    display: block;
    scroll-margin-top: 58px;
  }

  .inspector-visual {
    min-height: 190px;
  }
}

@media (max-width: 420px) {
  .overview-stat small {
    display: none;
  }

  .overview-stat span {
    font-size: 7px;
  }

  .world-node-progress {
    align-self: center;
  }

  .inspector-metrics {
    grid-template-columns: 1fr;
  }
}

/* 21-day habit calendar */
.habit-journey-card {
  margin-top: 24px;
  padding: 22px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 24px;
  background:
    radial-gradient(circle at 8% 0%, rgba(255,173,102,.13), transparent 25rem),
    linear-gradient(145deg, rgba(35,34,79,.94), rgba(22,24,59,.94));
  box-shadow: 0 18px 42px rgba(6,7,26,.2);
  overflow: hidden;
}

.habit-journey-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.habit-journey-heading h2 {
  margin: 5px 0 5px;
  font-family: var(--display);
  font-size: clamp(22px, 2.6vw, 31px);
  letter-spacing: -.04em;
}

.habit-journey-heading p:not(.section-kicker) {
  margin: 0;
  color: rgba(255,255,255,.55);
  font-size: 9px;
  line-height: 1.6;
}

.habit-journey-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.habit-journey-actions > strong {
  color: var(--apricot-bright);
  font-family: var(--display);
  font-size: 17px;
}

.habit-journey-actions > button,
.activity-teaser > button,
.journey-chapter header button,
.branch-card button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 37px;
  padding: 0 12px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 11px;
  color: var(--white);
  background: rgba(255,255,255,.09);
  cursor: pointer;
  font-size: 8px;
  font-weight: 800;
}

.habit-journey-actions svg {
  width: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.habit-journey-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 248px;
  gap: 14px;
  margin-top: 18px;
}

.habit-week-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
}

.habit-week {
  min-width: 0;
  padding: 13px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 17px;
  background: rgba(10,12,38,.36);
}

.habit-week > header {
  display: grid;
  grid-template-columns: auto minmax(0,1fr);
  align-items: center;
  gap: 9px;
  margin-bottom: 11px;
}

.habit-week > header > span {
  padding: 5px 6px;
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 8px;
  color: var(--apricot-bright);
  font-family: var(--mono);
  font-size: 6px;
}

.habit-week > header strong,
.habit-week > header small {
  display: block;
}

.habit-week > header strong { font-size: 9px; }
.habit-week > header small { margin-top: 2px; overflow: hidden; color: rgba(255,255,255,.42); font-size: 6px; text-overflow: ellipsis; white-space: nowrap; }

.habit-days {
  position: relative;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.habit-days::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 24px;
  right: 5%;
  left: 5%;
  height: 2px;
  background: repeating-linear-gradient(90deg, rgba(255,198,128,.34) 0 5px, transparent 5px 9px);
}

.habit-date {
  position: relative;
  z-index: 1;
  display: flex;
  min-width: 0;
  min-height: 70px;
  padding: 5px 2px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 11px;
  color: rgba(255,255,255,.76);
  background: #202049;
  cursor: pointer;
  text-align: center;
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}

.habit-date:hover { transform: translateY(-3px); border-color: var(--sky); }
.habit-date small { overflow: hidden; max-width: 100%; color: rgba(255,255,255,.35); font-size: 5px; text-overflow: ellipsis; white-space: nowrap; }
.habit-date strong { margin-top: 4px; font-family: var(--display); font-size: 12px; }
.habit-date span { margin-top: 3px; color: rgba(255,255,255,.4); font-size: 5px; }
.habit-date.is-current { border-color: var(--apricot); background: linear-gradient(145deg, #4c344d, #292650); box-shadow: 0 0 0 3px rgba(255,173,102,.1); }
.habit-date.is-current strong { color: var(--apricot-bright); }
.habit-date.is-recorded { color: #173e37; border-color: transparent; background: #93dac8; }
.habit-date.is-recorded small,
.habit-date.is-recorded span { color: rgba(20,61,52,.64); }
.habit-date.is-milestone { border-color: rgba(255,210,105,.52); }
.habit-date.is-milestone::after { content: "✦"; position: absolute; top: 3px; right: 4px; color: var(--gold); font-size: 6px; }

.activity-teaser {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 126px;
  padding: 15px;
  flex-direction: column;
  justify-content: flex-end;
  border: 1px solid rgba(255,198,128,.2);
  border-radius: 17px;
  background:
    linear-gradient(0deg, rgba(17,18,47,.96), rgba(17,18,47,.25)),
    var(--activity-image) 66% center / cover;
  overflow: hidden;
}

.activity-teaser > span { color: var(--apricot-bright); font-family: var(--mono); font-size: 6px; font-weight: 800; letter-spacing: .12em; }
.activity-teaser strong { display: block; margin-top: 4px; font-family: var(--display); font-size: 13px; }
.activity-teaser p { margin: 4px 0 10px; color: rgba(255,255,255,.58); font-size: 7px; line-height: 1.55; }
.activity-teaser > button { align-self: flex-start; min-height: 32px; }
.habit-record-note { margin: 11px 2px 0; color: rgba(255,255,255,.35); font-size: 7px; }

/* Growth route: three connected paths, not a text list */
.journey-layout-21 {
  grid-template-columns: minmax(0, 1fr) 300px;
  align-items: start;
}

.journey-map-21 {
  padding: 28px;
}

.journey-map-21 .journey-intro {
  align-items: flex-start;
}

.journey-chapters {
  display: grid;
  gap: 24px;
  margin-top: 22px;
}

.journey-chapter {
  --chapter-accent: var(--apricot);
  position: relative;
  min-width: 0;
  padding: 15px 17px 18px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 19px;
  color: var(--white);
  background:
    linear-gradient(90deg, rgba(20,20,52,.96), rgba(20,20,52,.78)),
    var(--chapter-image) var(--chapter-position) / cover;
  box-shadow: 0 15px 30px rgba(10,10,34,.16);
  isolation: isolate;
}

.journey-chapter.theme-jade { --chapter-accent: var(--jade); }
.journey-chapter.theme-sky { --chapter-accent: var(--sky); }

.journey-chapter:not(:last-child)::after {
  content: "";
  position: absolute;
  z-index: 5;
  right: 31px;
  bottom: -25px;
  width: 3px;
  height: 25px;
  background: linear-gradient(var(--chapter-accent), rgba(255,255,255,.2));
  box-shadow: 0 0 11px color-mix(in srgb, var(--chapter-accent) 45%, transparent);
}

.journey-chapter:nth-child(2)::after { right: auto; left: 31px; }

.journey-chapter > header {
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  align-items: center;
  gap: 10px;
}

.journey-chapter > header > span {
  padding: 5px 7px;
  border: 1px solid color-mix(in srgb, var(--chapter-accent) 42%, transparent);
  border-radius: 8px;
  color: var(--chapter-accent);
  font-family: var(--mono);
  font-size: 6px;
}

.journey-chapter h3 { margin: 0; font-family: var(--display); font-size: 16px; }
.journey-chapter header p { margin: 2px 0 0; color: rgba(255,255,255,.45); font-size: 7px; }
.journey-chapter header button { min-height: 30px; }

.journey-day-list {
  position: relative;
  display: grid;
  grid-template-columns: repeat(7, minmax(0,1fr));
  gap: 7px;
  margin-top: 15px;
  padding-top: 3px;
}

.journey-day-list::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 27px;
  right: 5%;
  left: 5%;
  height: 4px;
  border-radius: 99px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--chapter-accent) 76%, #fff), color-mix(in srgb, var(--chapter-accent) 32%, transparent));
  box-shadow: 0 0 13px color-mix(in srgb, var(--chapter-accent) 28%, transparent);
}

.journey-chapter:nth-child(2) .journey-day-list { direction: rtl; }

.journey-day {
  position: relative;
  z-index: 2;
  display: flex;
  min-width: 0;
  padding: 0 2px;
  flex-direction: column;
  align-items: center;
  color: var(--white);
  background: transparent;
  cursor: pointer;
  direction: ltr;
  text-align: center;
}

.journey-day > span:first-child {
  display: grid;
  place-items: center;
  width: 49px;
  height: 49px;
  border: 3px solid color-mix(in srgb, var(--chapter-accent) 60%, #20214b);
  border-radius: 50%;
  color: var(--chapter-accent);
  background: #20214b;
  box-shadow: 0 0 0 5px rgba(24,25,60,.86), 0 8px 16px rgba(5,6,25,.28);
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 800;
}

.journey-day > span:nth-child(2) { min-width: 0; margin-top: 8px; }
.journey-day strong,
.journey-day small { display: block; }
.journey-day strong { overflow: hidden; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.journey-day small { display: -webkit-box; min-height: 23px; margin-top: 3px; overflow: hidden; color: rgba(255,255,255,.4); font-size: 6px; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.journey-day em { margin-top: 5px; padding: 3px 5px; border-radius: 99px; color: rgba(255,255,255,.48); background: rgba(255,255,255,.07); font-size: 5px; font-style: normal; }
.journey-day.is-current > span:first-child { border-color: var(--apricot); color: var(--apricot-bright); box-shadow: 0 0 0 5px rgba(255,173,102,.11), 0 0 20px rgba(255,173,102,.32); }
.journey-day.is-complete > span:first-child { color: #183f37; border-color: var(--jade); background: #9ce0cf; }
.journey-day.is-celebration > span:first-child { width: 55px; height: 55px; border-radius: 17px; color: #573b28; border-color: var(--gold); background: linear-gradient(145deg, var(--gold), var(--apricot)); transform: rotate(3deg); }
.journey-day:hover > span:first-child { transform: translateY(-3px); }
.journey-day.is-celebration:hover > span:first-child { transform: translateY(-3px) rotate(3deg); }

.branch-stack-21 { position: sticky; top: 20px; }
.branch-stack-21 .branch-card { min-height: 245px; padding: 22px; }
.branch-stack-21 .branch-card:first-child { background: linear-gradient(145deg, rgba(81,77,143,.92), rgba(43,42,93,.96)), url("./assets/trade-expo-week3.webp") center / cover; }
.branch-stack-21 .branch-card.trade { background: linear-gradient(145deg, rgba(29,92,84,.92), rgba(25,65,69,.96)), url("./assets/trade-expo-week3.webp") center / cover; }
.branch-stack-21 .branch-card button { margin-top: 14px; }

/* Full 21-level atlas */
.overview-shell { padding-top: 18px; }
.overview-summary { margin-top: 14px; }
.overview-intro { padding: 17px 21px; }
.overview-stat { padding: 14px 16px; }
.world-architecture { margin-top: 10px; padding: 10px 14px; }
.world-overview-layout { margin-top: 12px; }
.world-map-panel { padding: 14px; }
.level-inspector { max-height: calc(100vh - 34px); overflow-y: auto; scrollbar-width: thin; }

.world-map-canvas.world-map-21 {
  display: block;
  min-height: 0;
  padding: 11px;
  background:
    radial-gradient(circle at 7% 18%, rgba(255,173,102,.12), transparent 24rem),
    radial-gradient(circle at 92% 78%, rgba(85,201,173,.11), transparent 25rem),
    linear-gradient(145deg, #11132f, #152139);
  overflow: visible;
}

.world-chapter-lanes {
  display: grid;
  gap: 10px;
}

.world-chapter-lane {
  --chapter-route-accent: var(--apricot);
  position: relative;
  display: grid;
  grid-template-columns: 152px minmax(0,1fr);
  min-height: 132px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 15px;
  background:
    linear-gradient(90deg, rgba(18,19,49,.97), rgba(18,19,49,.87)),
    var(--chapter-map-image) var(--chapter-map-position) / cover;
  box-shadow: 0 12px 26px rgba(4,5,22,.18);
  overflow: hidden;
}

.world-chapter-lane.theme-jade { --chapter-route-accent: var(--jade); }
.world-chapter-lane.theme-sky { --chapter-route-accent: var(--sky); }

.world-chapter-lane:not(:last-child)::after {
  content: "↓";
  position: absolute;
  z-index: 8;
  right: 17px;
  bottom: -16px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 50%;
  color: var(--chapter-route-accent);
  background: #17183c;
  font-size: 10px;
}

.world-chapter-header {
  position: relative;
  z-index: 2;
  display: flex;
  padding: 15px;
  flex-direction: column;
  justify-content: center;
  border-right: 1px solid rgba(255,255,255,.1);
  background:
    linear-gradient(90deg, rgba(17,18,46,.9), rgba(17,18,46,.52)),
    var(--chapter-map-image) var(--chapter-map-position) / cover;
}

.world-chapter-header span { color: var(--chapter-route-accent); font-family: var(--mono); font-size: 6px; font-weight: 800; letter-spacing: .12em; }
.world-chapter-header h3 { margin: 6px 0 3px; font-family: var(--display); font-size: 17px; }
.world-chapter-header p { margin: 0; color: rgba(255,255,255,.48); font-size: 7px; line-height: 1.5; }
.world-chapter-header > strong { position: absolute; right: 9px; bottom: 2px; color: rgba(255,255,255,.06); font-family: var(--display); font-size: 39px; }

.chapter-level-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(7, minmax(0,1fr));
  align-items: center;
  gap: 7px;
  min-width: 0;
  padding: 14px 11px;
}

.chapter-level-grid::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 50%;
  right: 4%;
  left: 4%;
  height: 3px;
  border-radius: 99px;
  background: repeating-linear-gradient(90deg, color-mix(in srgb, var(--chapter-route-accent) 65%, transparent) 0 6px, transparent 6px 11px);
}

.world-map-21 .world-level-node {
  position: relative;
  top: auto;
  left: auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 5px;
  width: 100%;
  min-width: 0;
  min-height: 101px;
  padding: 5px;
  border-radius: 13px;
  background: rgba(22,23,56,.95);
  transform: none;
}

.world-map-21 .world-level-node:hover { z-index: 6; transform: translateY(-3px); }
.world-map-21 .world-level-node.is-selected { z-index: 7; transform: translateY(-2px); }
.world-map-21 .world-level-node.is-celebration { border-color: rgba(255,210,105,.65); background: linear-gradient(145deg, rgba(96,64,56,.96), rgba(38,33,63,.96)); }
.world-map-21 .world-node-scene { width: 100%; height: 39px; border-radius: 9px; }
.world-map-21 .world-node-copy { padding: 0 2px 2px; }
.world-map-21 .world-node-copy small { font-size: 4.5px; }
.world-map-21 .world-node-copy strong { margin-top: 3px; font-size: 7.5px; }
.world-map-21 .world-node-copy em { display: none; }
.world-map-21 .world-node-progress { position: absolute; top: 8px; right: 8px; color: var(--white); background: rgba(13,14,39,.72); backdrop-filter: blur(6px); }

.world-branch-section {
  display: grid;
  grid-template-columns: 152px minmax(0,1fr);
  gap: 0;
  margin-top: 10px;
  border: 1px dashed rgba(140,185,234,.28);
  border-radius: 15px;
  background: rgba(20,30,49,.72);
  overflow: hidden;
}

.world-branch-section > header {
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 14px;
  border-right: 1px dashed rgba(140,185,234,.25);
}

.world-branch-section > header > span { color: var(--sky); font-family: var(--mono); font-size: 6px; }
.world-branch-section > header strong,
.world-branch-section > header small { display: block; }
.world-branch-section > header strong { font-size: 10px; }
.world-branch-section > header small { margin-top: 3px; color: rgba(255,255,255,.4); font-size: 6px; }
.world-branch-lane { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; padding: 9px; }
.world-branch-lane .world-level-node { min-height: 78px; grid-template-columns: 53px minmax(0,1fr) auto; }
.world-branch-lane .world-node-scene { width: 53px; height: 55px; }
.world-branch-lane .world-node-copy em { display: block; }

.inspector-activity {
  padding: 11px;
  border: 1px dashed rgba(174,101,70,.2);
  border-radius: 12px;
  background: #f6e4cf;
}

/* Optional activity square */
.activity-layer {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: none;
  padding: 20px;
  color: var(--white);
  background: rgba(9,10,30,.82);
  backdrop-filter: blur(16px);
  overflow-y: auto;
}

.activity-layer.is-open { display: grid; place-items: center; animation: layer-in .25s ease both; }

.activity-shell {
  width: min(940px, 100%);
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 25px;
  background: linear-gradient(145deg, #22234f, #151633);
  box-shadow: 0 28px 80px rgba(4,5,22,.55);
  overflow: hidden;
}

.activity-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 22px;
  border-bottom: 1px solid rgba(255,255,255,.09);
}

.activity-header > div > span,
.activity-stage-copy > span { color: var(--apricot-bright); font-family: var(--mono); font-size: 7px; font-weight: 800; letter-spacing: .14em; }
.activity-header h1 { margin: 4px 0 3px; font-family: var(--display); font-size: 23px; }
.activity-header p { margin: 0; color: rgba(255,255,255,.45); font-size: 8px; }
.activity-header > button { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid rgba(255,255,255,.13); border-radius: 12px; color: var(--white); background: rgba(255,255,255,.06); cursor: pointer; font-size: 20px; }

.activity-tabs { display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; padding: 10px 22px; border-bottom: 1px solid rgba(255,255,255,.08); }
.activity-tabs button { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 38px; border-radius: 10px; color: rgba(255,255,255,.54); background: rgba(255,255,255,.05); cursor: pointer; font-size: 8px; font-weight: 800; }
.activity-tabs button.is-active { color: #4d3433; background: var(--apricot-bright); }
.activity-tabs button span { font-family: var(--mono); }
.activity-panel { min-height: 420px; padding: 22px; }
.activity-stage-copy h2 { margin: 6px 0 4px; font-family: var(--display); font-size: 25px; }
.activity-stage-copy p { margin: 0; color: rgba(255,255,255,.48); font-size: 8px; line-height: 1.6; }
.match-progress { height: 6px; margin: 18px 0 14px; border-radius: 99px; background: rgba(255,255,255,.09); overflow: hidden; }
.match-progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,var(--apricot),var(--gold)); box-shadow: 0 0 12px rgba(255,173,102,.5); }
.activity-match-board { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px; }
.match-column { display: grid; gap: 7px; }
.match-column > small { color: rgba(255,255,255,.35); font-family: var(--mono); font-size: 6px; }
.match-card { display: flex; align-items: center; justify-content: space-between; min-height: 50px; padding: 0 13px; border: 1px solid rgba(255,255,255,.11); border-radius: 12px; color: var(--white); background: rgba(255,255,255,.055); cursor: pointer; text-align: left; }
.match-card span { font-family: var(--display); font-size: 11px; font-weight: 800; }
.match-card em { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 8px; color: rgba(255,255,255,.48); background: rgba(255,255,255,.08); font-family: var(--mono); font-size: 6px; font-style: normal; }
.match-card.is-selected { border-color: var(--apricot); background: rgba(255,173,102,.13); }
.match-card.is-matched { color: #163f36; border-color: transparent; background: #98ddcb; }
.match-card.is-matched em { color: #173e37; background: rgba(255,255,255,.45); }
.match-complete { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; margin-top: 14px; padding: 12px; border-radius: 13px; color: #4d3b31; background: #ffe2a8; }
.match-complete > span { font-size: 20px; }
.match-complete strong { font-size: 10px; }
.match-complete p { margin: 3px 0 0; color: rgba(77,59,49,.65); font-size: 7px; }
.match-complete button,
.prompt-card button { min-height: 35px; padding: 0 11px; border-radius: 10px; color: var(--white); background: #292750; cursor: pointer; font-size: 7px; font-weight: 800; }
.prompt-stage { min-height: 370px; padding: 23px; border-radius: 18px; background: linear-gradient(90deg,rgba(15,16,43,.96),rgba(15,16,43,.38)),var(--prompt-image) center/cover; }
.prompt-card { width: min(510px,100%); margin-top: 42px; padding: 20px; border: 1px solid rgba(255,255,255,.16); border-radius: 17px; background: rgba(17,18,47,.78); backdrop-filter: blur(12px); }
.prompt-card small { color: var(--apricot-bright); font-size: 7px; }
.prompt-card strong { display: block; margin-top: 7px; font-family: var(--display); font-size: 17px; line-height: 1.45; }
.prompt-card p { margin: 12px 0; padding: 11px; border-left: 3px solid var(--jade); color: rgba(255,255,255,.66); background: rgba(255,255,255,.06); font-size: 9px; line-height: 1.6; }
.prompt-card > div { display: flex; flex-wrap: wrap; gap: 8px; }
.prompt-card .sound-button { position: static; width: auto; height: 35px; padding: 0 11px; border-radius: 10px; }
.passport-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-top: 18px; }
.passport-stamp { position: relative; display: grid; grid-template-columns: 58px minmax(0,1fr); align-items: center; gap: 12px; min-height: 105px; padding: 12px; border: 1px dashed rgba(255,255,255,.16); border-radius: 15px; background: linear-gradient(90deg,rgba(17,18,47,.96),rgba(17,18,47,.72)),var(--passport-image) center/cover; filter: grayscale(.8); opacity: .58; }
.passport-stamp.is-stamped { border-color: rgba(85,201,173,.5); filter: none; opacity: 1; }
.passport-stamp > span { display: grid; place-items: center; width: 58px; height: 58px; border: 2px solid rgba(255,255,255,.18); border-radius: 50%; color: rgba(255,255,255,.62); font-family: var(--display); font-size: 19px; }
.passport-stamp.is-stamped > span { color: #173f37; border-color: #a6e2d3; background: #a6e2d3; transform: rotate(-8deg); }
.passport-stamp small,
.passport-stamp strong,
.passport-stamp p { display: block; }
.passport-stamp small { color: var(--apricot-bright); font-size: 6px; }
.passport-stamp strong { margin-top: 3px; font-family: var(--display); font-size: 13px; }
.passport-stamp p { margin: 4px 0 0; color: rgba(255,255,255,.48); font-size: 7px; }
.activity-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 49px; padding: 10px 22px; border-top: 1px solid rgba(255,255,255,.08); background: rgba(9,10,29,.2); }
.activity-footer p { margin: 0; color: rgba(255,255,255,.58); font-size: 8px; }
.activity-footer > span { color: var(--apricot-bright); font-family: var(--mono); font-size: 7px; white-space: nowrap; }

@media (max-width: 1180px) {
  .habit-journey-layout { grid-template-columns: 1fr; }
  .activity-teaser { min-height: 160px; }
  .journey-layout-21 { grid-template-columns: 1fr; }
  .branch-stack-21 { position: static; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .branch-stack-21 .branch-card { min-height: 190px; }
  .level-inspector { max-height: none; overflow: hidden; }
}

@media (max-width: 780px) {
  .habit-journey-card { margin-top: 17px; padding: 16px; border-radius: 19px; }
  .habit-journey-heading { display: block; }
  .habit-journey-actions { justify-content: space-between; margin-top: 13px; }
  .habit-week-grid { grid-template-columns: 1fr; }
  .habit-date { min-height: 64px; }
  .journey-map-21 { padding: 18px 14px; }
  .journey-chapter { padding: 13px 11px 17px; }
  .journey-chapter > header { grid-template-columns: auto minmax(0,1fr); }
  .journey-chapter > header button { grid-column: 1 / -1; justify-self: start; }
  .journey-day-list { grid-template-columns: repeat(7, 76px); margin-inline: -11px; padding: 3px 11px 8px; overflow-x: auto; }
  .journey-day-list::before { right: 35px; left: 35px; }
  .journey-day strong { font-size: 7px; }
  .journey-day small { display: none; }
  .branch-stack-21 { grid-template-columns: 1fr; }
  .world-map-canvas.world-map-21 { display: block; padding: 8px; overflow: hidden; }
  .world-chapter-lane { display: block; min-height: 0; }
  .world-chapter-header { min-height: 88px; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.1); }
  .chapter-level-grid { grid-template-columns: repeat(7, 128px); padding: 10px; overflow-x: auto; scroll-snap-type: inline mandatory; }
  .chapter-level-grid::before { right: 35px; left: 35px; }
  .world-map-21 .world-level-node { min-height: 96px; scroll-snap-align: start; }
  .world-branch-section { display: block; }
  .world-branch-section > header { border-right: 0; border-bottom: 1px dashed rgba(140,185,234,.25); }
  .world-branch-lane { grid-template-columns: 1fr; }
  .world-branch-lane .world-level-node { width: 100%; margin-left: 0; }
  .activity-layer { padding: 10px; align-items: start; }
  .activity-shell { border-radius: 19px; }
  .activity-header { padding: 16px; }
  .activity-header p { display: none; }
  .activity-tabs { padding: 9px 12px; }
  .activity-tabs button { font-size: 7px; }
  .activity-panel { min-height: 0; padding: 14px; }
  .activity-match-board,
  .passport-grid { grid-template-columns: 1fr; }
  .prompt-stage { min-height: 430px; padding: 16px; }
  .match-complete { grid-template-columns: auto 1fr; }
  .match-complete button { grid-column: 1 / -1; }
}

@media (max-width: 480px) {
  .habit-days { grid-template-columns: repeat(7, 43px); padding-bottom: 5px; overflow-x: auto; }
  .habit-date { min-height: 65px; }
  .habit-journey-actions { align-items: flex-start; flex-direction: column; }
  .activity-tabs button span { display: none; }
  .activity-footer { align-items: flex-start; flex-direction: column; }
}

/* Community preview: an asynchronous lantern bridge, not a generic social feed */
.community-bridge-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(260px,.78fr) minmax(360px,1.22fr);
  gap: 32px;
  align-items: center;
  margin-top: 24px;
  padding: 26px 30px 25px;
  border: 1px solid rgba(255,198,128,.2);
  border-radius: 25px;
  background:
    radial-gradient(circle at 82% 16%, rgba(255,198,128,.14), transparent 19rem),
    linear-gradient(120deg, rgba(43,39,80,.98), rgba(22,23,57,.98));
  box-shadow: 0 20px 52px rgba(5,6,25,.2);
  overflow: hidden;
}

.community-bridge-card::after {
  content: "";
  position: absolute;
  right: -40px;
  bottom: -90px;
  width: 260px;
  height: 180px;
  border: 1px solid rgba(255,198,128,.12);
  border-radius: 50%;
  transform: rotate(-11deg);
  pointer-events: none;
}

.community-bridge-copy,
.community-bridge-visual,
.community-demo-label { position: relative; z-index: 1; }
.community-bridge-copy h2 { margin: 6px 0 8px; font-family: var(--display); font-size: clamp(25px,3.1vw,40px); letter-spacing: -.045em; }
.community-bridge-copy > p:not(.section-kicker) { max-width: 490px; margin: 0; color: rgba(255,255,255,.58); font-size: 10px; line-height: 1.75; }
.community-bridge-copy > button { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; margin-top: 17px; padding: 0 16px; border-radius: 12px; color: #43323c; background: var(--apricot-bright); cursor: pointer; font-size: 9px; font-weight: 800; }
.community-bridge-copy > button svg { width: 15px; fill: none; stroke: currentColor; stroke-width: 2; }
.community-bridge-visual { min-width: 0; padding: 19px 18px 14px; border: 1px solid rgba(255,255,255,.09); border-radius: 19px; background: rgba(10,11,36,.3); }
.community-demo-label { position: absolute; right: 18px; bottom: 8px; color: rgba(255,255,255,.27); font-size: 6px; }

.squad-rope {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5,minmax(54px,1fr));
  gap: 12px;
  min-width: 0;
  padding: 13px 0 5px;
}

.squad-rope::before {
  content: "";
  position: absolute;
  top: 34px;
  right: 7%;
  left: 7%;
  height: 2px;
  background: linear-gradient(90deg,rgba(255,198,128,.28),rgba(143,217,200,.45),rgba(140,185,234,.25));
  box-shadow: 0 0 16px rgba(255,198,128,.2);
}

.squad-member { position: relative; z-index: 1; display: grid; justify-items: center; gap: 6px; color: rgba(255,255,255,.42); text-align: center; }
.squad-member > span { display: grid; place-items: center; width: 44px; height: 52px; border: 1px solid rgba(255,255,255,.16); border-radius: 18px 18px 14px 14px; background: #25254e; font-family: var(--display); font-size: 14px; box-shadow: 0 10px 22px rgba(4,5,22,.22); }
.squad-member > span::after { content: ""; position: absolute; top: 8px; width: 18px; height: 3px; border-radius: 99px; background: rgba(255,255,255,.12); }
.squad-member small { max-width: 64px; overflow: hidden; font-size: 6px; text-overflow: ellipsis; white-space: nowrap; }
.squad-member.is-active > span { color: #4c343d; border-color: transparent; background: linear-gradient(145deg,#ffd28f,#f0a170); box-shadow: 0 0 22px rgba(255,173,102,.25); }
.squad-member.theme-jade.is-active > span { color: #214f47; background: linear-gradient(145deg,#b9eadf,#67c9b1); }
.squad-member.theme-sky.is-active > span { color: #294867; background: linear-gradient(145deg,#d7eafb,#84b6e9); }
.squad-member.is-you > span { outline: 2px solid rgba(255,255,255,.48); outline-offset: 3px; }
.squad-member.is-active small { color: rgba(255,255,255,.82); }
.squad-rope.is-compact { padding-top: 5px; }
.squad-rope.is-compact::before { top: 27px; }

.bridge-stall-progress { display: grid; grid-template-columns: auto minmax(80px,1fr) auto; align-items: center; gap: 10px; margin-top: 12px; color: rgba(255,255,255,.54); font-size: 7px; }
.bridge-stall-progress > div { height: 5px; border-radius: 99px; background: rgba(255,255,255,.09); overflow: hidden; }
.bridge-stall-progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,var(--apricot),var(--gold)); box-shadow: 0 0 10px rgba(255,198,128,.4); }
.bridge-stall-progress strong { color: var(--apricot-bright); font-family: var(--mono); font-size: 7px; }

.reward-community-invite { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 13px; margin-top: 17px; padding: 13px; border: 1px solid rgba(61,149,127,.18); border-radius: 15px; background: #e6f1eb; text-align: left; }
.reward-peer-stack { display: flex; padding-left: 10px; }
.reward-peer-stack span { display: grid; place-items: center; width: 32px; height: 32px; margin-left: -10px; border: 2px solid #e6f1eb; border-radius: 50%; color: #274f49; background: #9fdccb; font-family: var(--display); font-size: 10px; }
.reward-peer-stack .theme-apricot { color: #5f3a3f; background: #ffc680; }
.reward-peer-stack .theme-sky { color: #294867; background: #b9d8f4; }
.reward-community-invite small,
.reward-community-invite strong { display: block; }
.reward-community-invite small { color: #55726b; font-size: 7px; }
.reward-community-invite strong { margin-top: 3px; color: #29483f; font-size: 9px; line-height: 1.45; }
.reward-community-invite > button { min-height: 39px; padding: 0 11px; border-radius: 10px; color: #fff; background: #34315e; cursor: pointer; font-size: 7px; font-weight: 800; }

.community-layer { position: fixed; z-index: 120; inset: 0; display: none; padding: 18px; color: var(--white); background: rgba(8,9,28,.88); backdrop-filter: blur(18px); overflow-y: auto; overscroll-behavior-y: contain; }
.community-layer.is-open { display: block; animation: layer-in .28s ease both; }
.community-layer::before { content: ""; position: fixed; z-index: -1; inset: 0; opacity: .34; background: linear-gradient(120deg,#11122f 12%,rgba(17,18,47,.72)),var(--community-image) var(--community-position,center)/cover; filter: saturate(.74); }
.community-shell { width: min(1180px,100%); min-height: calc(100vh - 36px); min-height: calc(100dvh - 36px); margin: 0 auto; border: 1px solid rgba(255,255,255,.13); border-radius: 27px; background: linear-gradient(145deg,rgba(33,34,77,.98),rgba(18,19,48,.99)); box-shadow: 0 30px 90px rgba(3,4,20,.58); overflow: hidden; }
.community-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 20px 24px; border-bottom: 1px solid rgba(255,255,255,.08); }
.community-header > div > span { color: var(--apricot-bright); font-family: var(--mono); font-size: 7px; font-weight: 800; letter-spacing: .14em; }
.community-header h1 { margin: 4px 0 2px; font-family: var(--display); font-size: 27px; letter-spacing: -.035em; }
.community-header p { margin: 0; color: rgba(255,255,255,.46); font-size: 8px; }
.community-header > button { display: grid; place-items: center; flex: 0 0 auto; width: 42px; height: 42px; border: 1px solid rgba(255,255,255,.13); border-radius: 13px; color: #fff; background: rgba(255,255,255,.06); cursor: pointer; font-size: 20px; }

.squad-bridge-stage { display: grid; grid-template-columns: minmax(210px,.72fr) minmax(390px,1.3fr) minmax(230px,.78fr); align-items: center; gap: 24px; padding: 19px 24px; border-bottom: 1px solid rgba(255,255,255,.08); background: linear-gradient(90deg,rgba(255,173,102,.06),transparent 55%); }
.squad-bridge-stage > div:first-child small { color: var(--apricot-bright); font-family: var(--mono); font-size: 6px; }
.squad-bridge-stage > div:first-child strong { display: block; margin-top: 5px; font-family: var(--display); font-size: 14px; }
.squad-bridge-stage > div:first-child p { margin: 5px 0 0; color: rgba(255,255,255,.4); font-size: 7px; line-height: 1.55; }
.shared-stall-mini { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 11px; border: 1px solid rgba(255,198,128,.15); border-radius: 14px; background: rgba(255,255,255,.05); }
.shared-stall-mini > span { font-size: 24px; }
.shared-stall-mini small,
.shared-stall-mini strong { display: block; }
.shared-stall-mini small { color: rgba(255,255,255,.36); font-size: 6px; }
.shared-stall-mini strong { margin-top: 3px; font-size: 9px; }
.shared-stall-mini div > div { height: 4px; margin-top: 7px; border-radius: 99px; background: rgba(255,255,255,.1); overflow: hidden; }
.shared-stall-mini i { display: block; height: 100%; background: linear-gradient(90deg,var(--apricot),var(--gold)); }
.shared-stall-mini em { color: var(--apricot-bright); font-family: var(--mono); font-size: 7px; font-style: normal; }

.community-task-tabs { display: grid; grid-template-columns: repeat(4,1fr); gap: 7px; padding: 10px 24px; border-bottom: 1px solid rgba(255,255,255,.08); }
.community-task-tabs button { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 39px; border: 1px solid transparent; border-radius: 11px; color: rgba(255,255,255,.48); background: rgba(255,255,255,.045); cursor: pointer; font-size: 8px; font-weight: 800; }
.community-task-tabs button > span { display: grid; place-items: center; width: 19px; height: 19px; border-radius: 7px; background: rgba(255,255,255,.07); font-family: var(--mono); font-size: 7px; }
.community-task-tabs button.is-open { color: rgba(255,255,255,.76); }
.community-task-tabs button.is-active { color: #49323b; border-color: transparent; background: var(--apricot-bright); }
.community-task-tabs button.is-active > span { background: rgba(255,255,255,.38); }

.community-layout { display: grid; grid-template-columns: minmax(0,1.45fr) minmax(300px,.72fr); gap: 14px; padding: 16px 24px 20px; }
.peer-answer-stage { min-width: 0; padding: 20px; border-radius: 21px; color: var(--ink); background: var(--paper); }
.peer-answer-stage > header { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--line-paper); }
.peer-answer-stage > header small { color: #b16a58; font-family: var(--mono); font-size: 6px; font-weight: 800; letter-spacing: .12em; }
.peer-answer-stage > header h2 { margin: 5px 0 0; font-family: var(--display); font-size: 22px; letter-spacing: -.035em; }
.peer-answer-stage > header > span { color: var(--ink-soft); font-size: 7px; white-space: nowrap; }
.own-answer-ticket { margin-top: 15px; padding: 13px 15px; border: 1px solid rgba(61,149,127,.17); border-radius: 14px; background: #e4f1eb; }
.own-answer-ticket span { color: #367467; font-family: var(--mono); font-size: 6px; font-weight: 800; letter-spacing: .1em; }
.own-answer-ticket p { margin: 6px 0 0; font-family: var(--display); font-size: 11px; line-height: 1.6; }
.peer-answer-stream { position: relative; display: grid; gap: 12px; margin-top: 17px; padding-left: 22px; }
.peer-answer-stream::before { content: ""; position: absolute; top: 5px; bottom: 8px; left: 7px; width: 2px; background: linear-gradient(var(--apricot),rgba(85,201,173,.28)); }
.peer-answer-card { position: relative; margin-left: var(--answer-offset); padding: 15px; border: 1px solid rgba(43,35,55,.1); border-radius: 4px 17px 17px; background: #f5ecdc; box-shadow: 0 9px 20px rgba(44,35,57,.06); }
.peer-answer-card::before { content: ""; position: absolute; top: 20px; left: -21px; width: 13px; height: 13px; border: 3px solid var(--paper); border-radius: 50%; background: var(--apricot); box-shadow: 0 0 0 2px rgba(199,111,81,.18); }
.peer-answer-card.theme-jade::before { background: var(--jade); }
.peer-answer-card.theme-sky::before { background: var(--sky); }
.peer-answer-card.theme-berry::before { background: var(--berry); }
.peer-answer-card > header { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 9px; }
.peer-avatar { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 11px; color: #4c343d; background: #ffc680; font-family: var(--display); font-size: 10px; }
.peer-answer-card.theme-jade .peer-avatar { color: #204e48; background: #a8dfd2; }
.peer-answer-card.theme-sky .peer-avatar { color: #294867; background: #c0dbf4; }
.peer-answer-card.theme-berry .peer-avatar { color: #603143; background: #f1c0c5; }
.peer-answer-card header strong,
.peer-answer-card header small { display: block; }
.peer-answer-card header strong { font-size: 9px; }
.peer-answer-card header small { margin-top: 2px; color: var(--ink-soft); font-size: 6px; }
.peer-answer-card header > span:last-child { color: #c4b7a7; font-family: var(--mono); font-size: 8px; }
.peer-answer-card blockquote { margin: 12px 0 0; font-family: var(--display); font-size: 12px; font-weight: 800; line-height: 1.65; }
.peer-answer-card > p { display: flex; align-items: center; gap: 6px; margin: 9px 0 0; color: var(--ink-soft); font-size: 7px; }
.peer-answer-card > p span { color: #c4775d; }
.peer-reactions { display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; margin-top: 12px; }
.peer-reaction { display: flex; align-items: center; justify-content: center; gap: 5px; min-height: 36px; border: 1px solid rgba(43,35,55,.09); border-radius: 10px; color: #645d6d; background: rgba(255,255,255,.5); cursor: pointer; font-size: 7px; }
.peer-reaction em { color: #9a8e95; font-family: var(--mono); font-size: 6px; font-style: normal; }
.peer-reaction.is-selected { color: #4d373d; border-color: rgba(199,111,81,.24); background: #ffddb3; }
.peer-answer-lock { display: grid; place-items: center; align-content: center; min-height: 460px; margin-top: 16px; padding: 35px; border-radius: 17px; color: #fff; background: linear-gradient(rgba(27,27,63,.82),rgba(27,27,63,.92)),var(--locked-image) center/cover; text-align: center; }
.peer-answer-lock > span { display: grid; place-items: center; width: 64px; height: 76px; border: 1px solid rgba(255,255,255,.19); border-radius: 26px 26px 20px 20px; color: var(--apricot-bright); background: rgba(255,173,102,.08); font-size: 25px; }
.peer-answer-lock h3 { margin: 17px 0 7px; font-family: var(--display); font-size: 24px; }
.peer-answer-lock p { max-width: 420px; margin: 0; color: rgba(255,255,255,.6); font-size: 9px; line-height: 1.7; }
.peer-answer-lock button { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-top: 17px; padding: 0 16px; border-radius: 12px; color: #4d3433; background: var(--apricot-bright); cursor: pointer; font-size: 8px; font-weight: 800; }
.peer-answer-lock button svg { width: 15px; fill: none; stroke: currentColor; stroke-width: 2; }

.community-side { display: grid; align-content: start; gap: 12px; min-width: 0; }
.shared-stall-card,
.saved-expression-card,
.lantern-corner { border: 1px solid rgba(255,255,255,.1); border-radius: 18px; background: rgba(255,255,255,.055); }
.shared-stall-card { padding: 17px; background: linear-gradient(160deg,rgba(40,69,69,.78),rgba(27,38,61,.86)); }
.shared-stall-scene { position: relative; display: flex; align-items: flex-end; justify-content: center; gap: 14px; min-height: 82px; margin: -2px -2px 13px; border-bottom: 1px solid rgba(255,255,255,.11); background: radial-gradient(ellipse at center bottom,rgba(255,198,128,.12),transparent 70%); }
.shared-stall-scene span { filter: drop-shadow(0 0 12px rgba(255,173,102,.5)); font-size: 30px; }
.shared-stall-scene span:nth-child(2) { font-size: 42px; transform: translateY(-6px); }
.shared-stall-card > small,
.saved-expression-card header small,
.lantern-corner header small { color: var(--apricot-bright); font-family: var(--mono); font-size: 6px; font-weight: 800; letter-spacing: .11em; }
.shared-stall-card h3 { margin: 5px 0 4px; font-family: var(--display); font-size: 18px; }
.shared-stall-card p { margin: 0; color: rgba(255,255,255,.5); font-size: 7px; line-height: 1.6; }
.shared-stall-meter { height: 6px; margin-top: 13px; border-radius: 99px; background: rgba(255,255,255,.1); overflow: hidden; }
.shared-stall-meter span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,var(--jade),var(--apricot-bright)); box-shadow: 0 0 13px rgba(85,201,173,.36); }
.shared-stall-card > div:last-child { display: flex; justify-content: space-between; margin-top: 7px; color: rgba(255,255,255,.5); font-size: 7px; }
.shared-stall-card > div:last-child strong { color: #a8e2d4; }
.saved-expression-card { padding: 15px; }
.saved-expression-card > header,
.lantern-corner > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.saved-expression-card h3,
.lantern-corner h3 { margin: 4px 0 0; font-family: var(--display); font-size: 14px; }
.saved-expression-card header > span,
.lantern-corner header > span { display: grid; place-items: center; min-width: 25px; height: 25px; padding: 0 7px; border-radius: 9px; color: #3f323d; background: var(--apricot-bright); font-family: var(--mono); font-size: 7px; }
.saved-expression-empty { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 9px; margin-top: 12px; padding: 10px; border-radius: 11px; background: rgba(255,255,255,.05); }
.saved-expression-empty > span { color: var(--apricot-bright); font-size: 18px; }
.saved-expression-empty p { margin: 0; color: rgba(255,255,255,.42); font-size: 7px; line-height: 1.55; }
.saved-expression-list { display: grid; gap: 6px; margin-top: 11px; }
.saved-expression-list button { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 7px; min-height: 42px; padding: 8px 9px; border-radius: 10px; color: rgba(255,255,255,.72); background: rgba(255,255,255,.06); cursor: pointer; text-align: left; }
.saved-expression-list button span { overflow: hidden; font-family: var(--display); font-size: 7px; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.saved-expression-list button svg { width: 14px; fill: none; stroke: var(--apricot-bright); stroke-width: 2; }
.lantern-corner { padding: 15px; }
.incoming-lantern { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 10px; margin-top: 12px; padding: 11px; border: 1px solid rgba(255,198,128,.13); border-radius: 13px; background: rgba(255,173,102,.065); }
.incoming-lantern > span { grid-row: 1 / 3; font-size: 26px; filter: drop-shadow(0 0 10px rgba(255,173,102,.4)); }
.incoming-lantern blockquote { margin: 0; color: rgba(255,255,255,.82); font-family: var(--display); font-size: 9px; line-height: 1.55; }
.incoming-lantern > div { display: flex; align-items: center; gap: 6px; }
.incoming-lantern strong { font-size: 7px; }
.incoming-lantern small { color: rgba(255,255,255,.34); font-size: 6px; }
.incoming-lantern button { margin-left: auto; padding: 3px; color: var(--apricot-bright); background: transparent; cursor: pointer; font-size: 6px; }
.lantern-compose { display: flex; justify-content: space-between; margin-top: 13px; color: rgba(255,255,255,.54); font-size: 7px; }
.lantern-corner textarea { width: 100%; min-height: 76px; margin-top: 6px; padding: 11px; resize: vertical; border: 1px solid rgba(255,255,255,.12); border-radius: 11px; color: #fff; background: rgba(6,7,25,.32); font-size: 9px; line-height: 1.55; }
.lantern-corner textarea::placeholder { color: rgba(255,255,255,.26); }
.lantern-compose-actions { display: flex; align-items: center; justify-content: space-between; gap: 9px; margin-top: 8px; }
.lantern-compose-actions small { color: rgba(255,255,255,.28); font-size: 6px; }
.lantern-compose-actions button { min-height: 38px; padding: 0 12px; border-radius: 10px; color: #49323b; background: var(--apricot-bright); cursor: pointer; font-size: 7px; font-weight: 800; }
.my-lanterns { display: grid; gap: 6px; margin-top: 12px; padding-top: 10px; border-top: 1px dashed rgba(255,255,255,.1); }
.my-lanterns > small { color: rgba(255,255,255,.34); font-size: 6px; }
.my-lanterns p { margin: 0; padding: 7px 9px; border-radius: 8px; color: rgba(255,255,255,.66); background: rgba(255,255,255,.05); font-family: var(--display); font-size: 7px; line-height: 1.5; }
.community-footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 48px; padding: 10px 24px; border-top: 1px solid rgba(255,255,255,.08); background: rgba(7,8,27,.24); }
.community-footer p { margin: 0; color: rgba(255,255,255,.66); font-size: 7px; }
.community-footer > span { color: rgba(255,255,255,.28); font-size: 6px; text-align: right; }

@media (max-width: 980px) {
  .community-bridge-card { grid-template-columns: 1fr; gap: 18px; }
  .squad-bridge-stage { grid-template-columns: 1fr; gap: 12px; }
  .shared-stall-mini { width: min(420px,100%); }
  .community-layout { grid-template-columns: 1fr; }
  .community-side { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .lantern-corner { grid-column: 1 / -1; }
}

@media (max-width: 780px) {
  .community-bridge-card { margin-top: 17px; padding: 20px 17px 25px; border-radius: 21px; }
  .community-bridge-copy h2 { font-size: 29px; }
  .community-bridge-copy > p:not(.section-kicker) { font-size: 11px; }
  .community-bridge-copy > button { width: 100%; justify-content: center; min-height: 48px; font-size: 11px; }
  .community-bridge-visual { padding: 14px 10px 12px; }
  .community-demo-label { right: 14px; bottom: 7px; max-width: calc(100% - 28px); font-size: 7px; text-align: right; }
  .community-layer { padding: calc(8px + env(safe-area-inset-top)) max(8px,env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left)); }
  .community-shell { min-height: calc(100dvh - 16px); border-radius: 21px; }
  .community-header { padding: 16px; }
  .community-header h1 { font-size: 24px; }
  .community-header p { font-size: 10px; }
  .community-header > button { width: 44px; height: 44px; }
  .squad-bridge-stage { padding: 15px 16px; }
  .squad-bridge-stage > div:first-child strong { font-size: 13px; }
  .squad-bridge-stage > div:first-child p { font-size: 10px; }
  .squad-rope { grid-template-columns: repeat(5,52px); padding-bottom: 8px; overflow-x: auto; }
  .squad-member small { font-size: 8px; }
  .community-task-tabs { display: flex; padding: 9px 14px; overflow-x: auto; scroll-snap-type: inline mandatory; }
  .community-task-tabs button { flex: 0 0 128px; min-height: 44px; font-size: 10px; scroll-snap-align: start; }
  .community-layout { padding: 12px; }
  .peer-answer-stage { padding: 16px 13px; border-radius: 18px; }
  .peer-answer-stage > header { align-items: flex-start; flex-direction: column; }
  .peer-answer-stage > header h2 { font-size: 21px; }
  .peer-answer-stage > header > span { font-size: 10px; }
  .own-answer-ticket p { font-size: 13px; }
  .peer-answer-stream { padding-left: 18px; }
  .peer-answer-card { margin-left: 0; padding: 14px 12px; }
  .peer-answer-card blockquote { font-size: 14px; }
  .peer-answer-card header strong { font-size: 11px; }
  .peer-answer-card header small,
  .peer-answer-card > p { font-size: 9px; }
  .peer-reaction { min-height: 44px; padding: 0 4px; font-size: 9px; }
  .peer-answer-lock { min-height: 390px; padding: 26px 18px; }
  .peer-answer-lock p { font-size: 11px; }
  .peer-answer-lock button { min-height: 48px; font-size: 10px; }
  .community-side { grid-template-columns: 1fr; }
  .lantern-corner { grid-column: auto; }
  .shared-stall-card p,
  .saved-expression-empty p { font-size: 10px; }
  .saved-expression-list button { min-height: 48px; }
  .saved-expression-list button span { font-size: 10px; }
  .incoming-lantern blockquote { font-size: 12px; }
  .incoming-lantern strong,
  .incoming-lantern small,
  .incoming-lantern button,
  .lantern-compose { font-size: 9px; }
  .lantern-corner textarea { min-height: 92px; font-size: 16px; }
  .lantern-compose-actions { align-items: flex-start; flex-direction: column; }
  .lantern-compose-actions small { font-size: 9px; }
  .lantern-compose-actions button { width: 100%; min-height: 46px; font-size: 10px; }
  .community-footer { align-items: flex-start; flex-direction: column; padding: 12px 16px; }
  .community-footer p { font-size: 10px; }
  .community-footer > span { font-size: 8px; text-align: left; }
  .reward-community-invite { grid-template-columns: auto minmax(0,1fr); }
  .reward-community-invite > button { grid-column: 1 / -1; width: 100%; min-height: 44px; font-size: 10px; }
}

@media (max-width: 420px) {
  .peer-reactions { grid-template-columns: 1fr; }
  .peer-reaction { justify-content: space-between; padding-inline: 12px; }
  .bridge-stall-progress { grid-template-columns: 1fr auto; }
  .bridge-stall-progress > div { grid-column: 1 / -1; grid-row: 2; }
}

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