:root {
  color-scheme: light;
  --ink: #141d34;
  --muted: #647083;
  --paper: #fffaf4;
  --panel: rgba(255, 255, 255, 0.66);
  --line: rgba(77, 82, 126, 0.18);
  --sage: #91b89b;
  --rose: #d99ca7;
  --sun: #e8bf76;
  --sea: #80b9c6;
  --lav: #aa9bcc;
  --aura-pink: #ff6fb2;
  --aura-cyan: #1ed7dc;
  --aura-gold: #ffd25f;
  --aura-violet: #7c5cff;
  --shadow: 0 18px 50px rgba(46, 53, 91, 0.16);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(ellipse at 16% 10%, rgba(255, 111, 178, 0.26), transparent 34%),
    radial-gradient(ellipse at 84% 16%, rgba(30, 215, 220, 0.24), transparent 32%),
    radial-gradient(ellipse at 50% 88%, rgba(255, 210, 95, 0.26), transparent 35%),
    linear-gradient(145deg, #fff8ef 0%, #edfaff 48%, #fbf0ff 100%);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(115deg, transparent 0%, rgba(255,255,255,0.38) 45%, transparent 62%),
    radial-gradient(circle at 50% 42%, rgba(255,255,255,0.34), transparent 38%);
  mix-blend-mode: screen;
  opacity: 0.58;
  animation: aura-shimmer 14s ease-in-out infinite alternate;
}

body[data-time-mood="night"] {
  background:
    radial-gradient(ellipse at 18% 12%, rgba(124, 92, 255, 0.18), transparent 36%),
    radial-gradient(ellipse at 84% 20%, rgba(30, 215, 220, 0.12), transparent 34%),
    radial-gradient(ellipse at 50% 90%, rgba(255, 210, 95, 0.1), transparent 38%),
    linear-gradient(145deg, #f4f1ff 0%, #eaf5ff 48%, #f6efff 100%);
}

body[data-time-mood="night"]::before {
  opacity: 0.34;
  animation-duration: 24s;
}

body[data-time-mood="night"] .vision-field span,
body[data-time-mood="night"] .breathing-atmosphere span {
  animation-duration: 32s;
  opacity: 0.2;
}

body[data-time-mood="morning"] {
  background:
    radial-gradient(ellipse at 18% 12%, rgba(255, 197, 111, 0.3), transparent 34%),
    radial-gradient(ellipse at 82% 18%, rgba(117, 240, 212, 0.22), transparent 32%),
    radial-gradient(ellipse at 50% 88%, rgba(255, 111, 178, 0.18), transparent 35%),
    linear-gradient(145deg, #fff8ef 0%, #f0fff9 48%, #fff4fa 100%);
}

body[data-low-stim="true"]::before {
  opacity: 0.22;
  animation: none;
}

body[data-low-stim="true"] .vision-field span,
body[data-low-stim="true"] .breathing-atmosphere span {
  opacity: 0.12;
  animation: none;
}

body[data-low-stim="true"] .canvas-stage::before,
body[data-low-stim="true"] .canvas-stage::after {
  opacity: 0.18;
  animation: none;
}

body[data-low-stim="true"] .cover-art,
body[data-low-stim="true"] .visual-cue-strip span {
  animation: none;
}

body[data-low-stim="true"] .line-art [data-fillable].filled-pulse {
  animation-duration: 180ms;
}

body[data-visual-cues="false"] .visual-cue-strip {
  display: none;
}

@media (display-mode: standalone) {
  .topbar {
    padding-top: max(14px, env(safe-area-inset-top));
  }

  .screen {
    padding-bottom: max(104px, calc(96px + env(safe-area-inset-bottom)));
  }

  .bottom-nav {
    bottom: max(14px, env(safe-area-inset-bottom));
  }
}

body[data-color-mood="ocean"]::before {
  background:
    linear-gradient(115deg, transparent 0%, rgba(255,255,255,0.34) 45%, transparent 62%),
    radial-gradient(circle at 48% 44%, rgba(64, 214, 232, 0.28), transparent 38%);
}

body[data-color-mood="gold"]::before {
  background:
    linear-gradient(115deg, transparent 0%, rgba(255,255,255,0.4) 45%, transparent 62%),
    radial-gradient(circle at 50% 42%, rgba(255, 216, 77, 0.34), transparent 38%);
}

body[data-color-mood="cosmic"]::before {
  background:
    linear-gradient(115deg, transparent 0%, rgba(255,255,255,0.3) 45%, transparent 62%),
    radial-gradient(circle at 50% 42%, rgba(143, 92, 255, 0.3), transparent 38%);
}

body[data-color-mood="healing"]::before {
  background:
    linear-gradient(115deg, transparent 0%, rgba(255,255,255,0.34) 45%, transparent 62%),
    radial-gradient(circle at 50% 42%, rgba(95, 212, 189, 0.32), transparent 38%);
}

body[data-memory-weather="ocean-mist"] .memory-sky {
  background:
    radial-gradient(circle at 18% 22%, rgba(255,255,255,0.68) 0 2px, transparent 3px),
    radial-gradient(ellipse at 40% 80%, rgba(64,214,232,0.16), transparent 42%),
    linear-gradient(135deg, rgba(255,255,255,0.78), rgba(232,250,255,0.64));
}

body[data-memory-weather="velvet-night"] .memory-sky {
  background:
    radial-gradient(circle at 18% 22%, rgba(255,255,255,0.5) 0 2px, transparent 3px),
    radial-gradient(ellipse at 70% 20%, rgba(143,92,255,0.14), transparent 42%),
    linear-gradient(135deg, rgba(248,244,255,0.78), rgba(235,245,255,0.62));
}

body[data-memory-weather="dream-glow"] .memory-sky {
  background:
    radial-gradient(circle at 18% 22%, rgba(255,255,255,0.72) 0 2px, transparent 3px),
    radial-gradient(ellipse at 72% 18%, rgba(255,216,77,0.18), transparent 42%),
    linear-gradient(135deg, rgba(255,255,255,0.78), rgba(255,248,223,0.62));
}

body[data-memory-weather="moon-haze"] .memory-sky,
body[data-memory-weather="constellation-rain"] .memory-sky {
  background:
    radial-gradient(circle at 18% 22%, rgba(255,255,255,0.62) 0 2px, transparent 3px),
    radial-gradient(ellipse at 74% 30%, rgba(143,92,255,0.14), transparent 42%),
    linear-gradient(135deg, rgba(255,255,255,0.76), rgba(244,240,255,0.62));
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  -webkit-tap-highlight-color: transparent;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  position: relative;
  z-index: 1;
}

.vision-field {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.vision-field span {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff, var(--aura-cyan) 42%, rgba(124, 92, 255, 0.72) 72%, transparent 74%);
  box-shadow: 0 0 18px rgba(30, 215, 220, 0.45);
  opacity: 0.42;
  animation: float-eye 22s ease-in-out infinite;
}

.vision-field span:nth-child(1) { left: 8%; top: 22%; animation-delay: -2s; }
.vision-field span:nth-child(2) { left: 18%; top: 76%; width: 12px; height: 12px; animation-delay: -7s; }
.vision-field span:nth-child(3) { left: 35%; top: 18%; background: radial-gradient(circle at 35% 35%, #fff, #ffd25f 42%, #ff6fb2 72%, transparent 74%); }
.vision-field span:nth-child(4) { left: 58%; top: 78%; animation-delay: -5s; }
.vision-field span:nth-child(5) { left: 82%; top: 26%; width: 10px; height: 10px; animation-delay: -9s; }
.vision-field span:nth-child(6) { left: 92%; top: 62%; animation-delay: -3s; }
.vision-field span:nth-child(7) { left: 46%; top: 9%; width: 6px; height: 6px; animation-delay: -11s; }
.vision-field span:nth-child(8) { left: 26%; top: 48%; animation-delay: -4s; }
.vision-field span:nth-child(9) { left: 72%; top: 52%; width: 13px; height: 13px; animation-delay: -8s; }
.vision-field span:nth-child(10) { left: 6%; top: 58%; width: 7px; height: 7px; animation-delay: -13s; }

.vision-field span:nth-child(n+7) {
  display: none;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  gap: 12px;
  align-items: center;
  padding: 14px clamp(14px, 4vw, 28px);
  background: rgba(255, 250, 244, 0.72);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.topbar h1 {
  margin: 0;
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  letter-spacing: 0;
}

.eyebrow {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
}

.icon-button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 38% 32%, #ffffff 0 13%, transparent 14%),
    radial-gradient(circle at 50% 54%, var(--aura-cyan) 0 19%, #18244a 20% 35%, transparent 36%),
    conic-gradient(from 90deg, #ff8a3d, #ffd84d, #26e1c2, #456dff, #d65cff, #ff8a3d);
  color: var(--ink);
  box-shadow: 0 8px 26px rgba(65, 70, 130, 0.14), inset 0 0 0 2px rgba(255,255,255,0.78);
}

.icon-button:disabled {
  opacity: 0.35;
}

.screen {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 18px clamp(14px, 4vw, 28px) 92px;
}

.screen.is-entering {
  animation: route-soft-enter 360ms ease-out both;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: clamp(18px, 4vw, 42px);
  min-height: min(720px, calc(100vh - 124px));
  align-items: center;
  padding: 8px 0 26px;
}

.hero-copy {
  display: grid;
  gap: 18px;
}

.hero h2 {
  margin: 0;
  max-width: 820px;
  font-size: clamp(2.15rem, 5.5vw, 4.2rem);
  line-height: 1.02;
  letter-spacing: 0;
  text-shadow: 0 0 28px rgba(30, 215, 220, 0.18);
}

.hero p {
  max-width: 640px;
  margin: 0;
  color: #52625a;
  font-size: clamp(1rem, 2.6vw, 1.18rem);
  line-height: 1.7;
}

.cover-frame {
  position: relative;
  width: 100%;
  max-height: min(70vh, 680px);
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.68);
  box-shadow: 0 24px 72px rgba(67, 70, 86, 0.18), 0 0 44px rgba(30, 215, 220, 0.18);
  background:
    radial-gradient(circle at 50% 35%, #18244a 0 8%, #26e1c2 9% 18%, rgba(255,255,255,0.9) 19% 29%, transparent 30%),
    radial-gradient(circle at 20% 18%, #8f5cff 0 7%, rgba(255,255,255,0.9) 8% 14%, transparent 15%),
    radial-gradient(circle at 78% 20%, #ff8a3d 0 7%, rgba(255,255,255,0.9) 8% 14%, transparent 15%),
    conic-gradient(from 90deg, #ff5ca8, #ffd84d, #26e1c2, #456dff, #8f5cff, #ff5ca8);
  animation: cover-breathe 12s ease-in-out infinite;
}

.cover-frame::after {
  content: "EYECREATE COLORING";
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 14%;
  text-align: center;
  color: #fffaf4;
  font-size: clamp(1.4rem, 5vw, 3rem);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-shadow: 0 8px 26px rgba(20,29,52,0.35);
}

.cover-art {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: relative;
  z-index: 1;
}

.cover-art.missing {
  display: none;
}

.daily-card {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin: 0 0 22px;
  padding: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    radial-gradient(circle at 86% 22%, rgba(255,255,255,0.78) 0 6%, transparent 7%),
    radial-gradient(ellipse at 82% 44%, rgba(24,36,74,0.9) 0 8%, var(--accent, #5fd4bd) 9% 18%, rgba(255,255,255,0.88) 20% 28%, transparent 30%),
    linear-gradient(135deg, rgba(255,255,255,0.82), rgba(241,250,255,0.62)),
    conic-gradient(from 120deg, rgba(255,92,168,0.18), rgba(38,225,194,0.18), rgba(69,109,255,0.16), rgba(255,216,77,0.14), rgba(255,92,168,0.18));
  box-shadow: var(--shadow), 0 0 38px rgba(30, 215, 220, 0.12);
}

.daily-card h2 {
  margin: 4px 0 4px;
  font-size: clamp(1.35rem, 3.4vw, 2rem);
  letter-spacing: 0;
}

.daily-card p {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.companion-card,
.emotion-entry,
.install-card,
.sanctuary-memory {
  margin: 0 0 22px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    radial-gradient(ellipse at 90% 18%, rgba(255,255,255,0.82) 0 7%, transparent 8%),
    radial-gradient(ellipse at 90% 32%, rgba(24,36,74,0.84) 0 7%, rgba(95,212,189,0.22) 9% 22%, transparent 24%),
    linear-gradient(135deg, rgba(255,255,255,0.78), rgba(241,250,255,0.6));
  box-shadow: 0 16px 44px rgba(46,53,91,0.08);
}

.companion-card {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  box-shadow: 0 16px 44px rgba(46,53,91,0.08), 0 0 42px rgba(255,216,77,var(--visit-warmth, 0));
}

.install-card {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.install-card h2 {
  margin: 4px 0;
  font-size: clamp(1.35rem, 3vw, 2rem);
}

.install-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.companion-card h2 {
  margin: 4px 0;
  font-size: clamp(1.35rem, 3vw, 2rem);
}

.companion-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.companion-orb {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  position: relative;
  border-radius: 50%;
  background:
    radial-gradient(circle at 38% 30%, rgba(255,255,255,0.96) 0 13%, transparent 14%),
    radial-gradient(circle at 50% 54%, #18244a 0 18%, var(--trusted-color, rgba(38,225,194,0.66)) 20% 42%, rgba(255,255,255,0.88) 44% 60%, #8f5cff 62% 100%);
  box-shadow: 0 0 28px rgba(38,225,194,0.22), inset 0 0 0 2px rgba(255,255,255,0.76);
  animation: companion-float 7s ease-in-out infinite;
}

.companion-orb::before,
.companion-orb::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.companion-orb::before {
  left: -8px;
  top: 28px;
  width: 18px;
  height: 14px;
  border-radius: 60% 35% 60% 35%;
  background: rgba(255,255,255,0.78);
  transform: rotate(-24deg);
}

.companion-orb::after {
  right: 12px;
  bottom: 10px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.82);
  box-shadow: 0 0 12px rgba(255,255,255,0.48);
}

.companion-orb span {
  width: 34px;
  height: 20px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 68% 38%, rgba(255,255,255,0.95) 0 12%, transparent 13%),
    radial-gradient(ellipse at 50% 50%, #18244a 0 22%, rgba(255,216,77,0.62) 24% 48%, rgba(255,255,255,0.88) 50% 100%);
  animation: cue-breathe 6s ease-in-out infinite;
}

.companion-resting .companion-orb,
.companion-resting .companion-orb span {
  animation: none;
  opacity: 0.82;
}

.companion-resting .companion-orb span {
  height: 8px;
  background: linear-gradient(90deg, transparent, rgba(24,36,74,0.72), transparent);
}

.companion-returned .companion-orb {
  box-shadow: 0 0 34px rgba(255,216,77,0.2), inset 0 0 0 2px rgba(255,255,255,0.76);
  animation: companion-float 6s ease-in-out infinite, companion-warmth 5.5s ease-in-out infinite;
}

.sanctuary-memory {
  display: grid;
  gap: 12px;
}

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

.memory-grid div {
  min-height: 112px;
  display: grid;
  align-content: center;
  gap: 7px;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid rgba(77,82,126,0.14);
  background: rgba(255,255,255,0.62);
  box-shadow: 0 12px 30px rgba(46,53,91,0.07);
}

.memory-grid strong,
.memory-grid small {
  display: block;
}

.memory-grid small {
  color: var(--muted);
  font-weight: 900;
}

.memory-orb {
  width: 36px;
  height: 26px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 52%, #18244a 0 16%, transparent 17%),
    radial-gradient(circle at 50% 52%, var(--memory-color) 0 42%, rgba(255,255,255,0.86) 45% 62%, var(--memory-color) 64% 100%);
  box-shadow: 0 0 18px rgba(143,92,255,0.14);
}

.memory-sky {
  margin: 0 0 22px;
  padding: 16px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    radial-gradient(circle at 18% 22%, rgba(255,255,255,0.72) 0 2px, transparent 3px),
    radial-gradient(circle at 76% 18%, rgba(255,255,255,0.58) 0 2px, transparent 3px),
    radial-gradient(circle at 62% 76%, rgba(255,255,255,0.64) 0 2px, transparent 3px),
    linear-gradient(135deg, rgba(255,255,255,0.76), rgba(241,250,255,0.58));
  box-shadow: 0 16px 44px rgba(46,53,91,0.08);
}

.memory-constellation {
  position: absolute;
  inset: 54px 14px auto auto;
  width: min(260px, 48%);
  height: 120px;
  pointer-events: none;
  opacity: 0.28;
}

.memory-constellation path {
  fill: none;
  stroke: var(--trusted-color, #5fd4bd);
  stroke-width: 1.8;
  stroke-linecap: round;
  filter: drop-shadow(0 0 8px rgba(143,92,255,0.16));
}

.memory-sky-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(156px, 1fr));
  gap: 9px;
}

.memory-sky-reflective {
  min-height: min(68vh, 680px);
  display: grid;
  align-content: start;
}

.memory-sky-reflective .memory-constellation {
  inset: 82px 5% auto auto;
  width: min(520px, 82%);
  height: 260px;
  opacity: 0.34;
}

.reflection-hero,
.memory-place-panel {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background:
    radial-gradient(ellipse at 88% 18%, rgba(255,255,255,0.82) 0 7%, transparent 8%),
    radial-gradient(ellipse at 88% 32%, rgba(24,36,74,0.84) 0 7%, rgba(95,212,189,0.2) 9% 22%, transparent 24%),
    linear-gradient(135deg, rgba(255,255,255,0.78), rgba(241,250,255,0.6));
  box-shadow: 0 16px 44px rgba(46,53,91,0.08);
}

.reflection-hero h2 {
  margin: 4px 0;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
}

.reflection-hero p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.reflection-hero .feeling-orbs {
  width: min(320px, 100%);
}

.memory-star,
.memory-empty {
  min-height: 88px;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 11px;
  border-radius: 8px;
  border: 1px solid rgba(77,82,126,0.14);
  background:
    radial-gradient(circle at 86% 22%, rgba(255,255,255,0.82) 0 8%, transparent 9%),
    radial-gradient(circle at 86% 36%, var(--memory-color, #5fd4bd) 0 8%, transparent 24%),
    rgba(255,255,255,0.62);
}

.memory-star i,
.memory-empty i {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, #18244a 0 14%, transparent 15%),
    radial-gradient(circle at 50% 50%, var(--memory-color, #5fd4bd) 0 42%, rgba(255,255,255,0.88) 45% 62%, var(--memory-color, #5fd4bd) 64% 100%);
  box-shadow: 0 0 18px rgba(143,92,255,0.14);
}

.memory-star strong,
.memory-star small,
.memory-empty strong,
.memory-empty small {
  display: block;
}

.memory-star strong,
.memory-empty strong {
  font-size: 0.9rem;
}

.memory-star small,
.memory-empty small {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 900;
}

.emotion-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(126px, 1fr));
  gap: 9px;
}

.emotion-button {
  min-height: 86px;
  display: grid;
  justify-items: start;
  gap: 8px;
  padding: 11px;
  text-align: left;
  border-radius: 8px;
  border: 1px solid rgba(77,82,126,0.14);
  background:
    radial-gradient(circle at 84% 18%, rgba(255,255,255,0.84) 0 8%, transparent 9%),
    radial-gradient(circle at 84% 34%, var(--mood-color) 0 8%, transparent 24%),
    rgba(255,255,255,0.62);
  box-shadow: 0 12px 30px rgba(46,53,91,0.07);
  touch-action: manipulation;
}

.emotion-button span {
  width: 34px;
  height: 24px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, #18244a 0 15%, transparent 16%),
    radial-gradient(circle at 50% 50%, var(--mood-color) 0 42%, rgba(255,255,255,0.86) 45% 62%, var(--mood-color) 64% 100%);
  box-shadow: 0 0 18px rgba(143,92,255,0.14);
}

.emotion-button.mood-wave span {
  border-radius: 46% 54% 50% 50%;
}

.emotion-button.mood-moon span {
  border-radius: 50%;
  clip-path: ellipse(44% 50% at 64% 50%);
}

.emotion-button.mood-breath span {
  width: 30px;
  height: 30px;
}

.emotion-button.mood-star span {
  clip-path: polygon(50% 0, 62% 35%, 100% 35%, 69% 56%, 82% 100%, 50% 72%, 18% 100%, 31% 56%, 0 35%, 38% 35%);
  border-radius: 0;
}

.emotion-button.mood-spark span {
  border-radius: 36% 64% 42% 58%;
}

.emotion-button.mood-ground span {
  height: 18px;
  border-radius: 999px;
}

.emotion-button strong {
  font-size: 0.92rem;
}

.planning-panel {
  margin-top: 20px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.78), rgba(239,250,255,0.58)),
    radial-gradient(ellipse at 92% 18%, rgba(38,225,194,0.18), transparent 34%);
  box-shadow: 0 16px 44px rgba(46, 53, 91, 0.08);
}

.planning-panel h2 {
  margin: 0;
  font-size: 1.15rem;
  letter-spacing: 0;
}

.planning-panel p {
  margin: 5px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.pack-plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.pack-plan {
  min-height: 86px;
  padding: 10px;
  border: 1px solid rgba(77, 82, 126, 0.14);
  border-radius: 8px;
  background:
    radial-gradient(ellipse at 82% 22%, rgba(255,255,255,0.78) 0 7%, transparent 8%),
    radial-gradient(ellipse at 82% 42%, rgba(24,36,74,0.82) 0 8%, rgba(95,212,189,0.32) 10% 24%, transparent 25%),
    rgba(255,255,255,0.58);
}

.pack-plan:first-child {
  min-height: 112px;
  padding: 14px;
  background:
    radial-gradient(ellipse at 88% 16%, rgba(255,255,255,0.82) 0 7%, transparent 8%),
    radial-gradient(ellipse at 88% 30%, rgba(24,36,74,0.88) 0 8%, rgba(143,92,255,0.28) 10% 25%, transparent 26%),
    linear-gradient(135deg, rgba(255,255,255,0.8), rgba(248,244,255,0.62));
}

.pack-plan strong,
.pack-plan span {
  display: block;
}

.pack-plan span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.daily-kicker,
.future-realm,
.signature-badge {
  color: #6b4b88;
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.future-realm,
.signature-badge {
  display: inline-block;
  justify-self: start;
  margin-top: 2px;
  padding: 5px 7px;
  border-radius: 8px;
  border: 1px solid rgba(155, 99, 220, 0.18);
  background: rgba(255, 255, 255, 0.58);
  text-transform: none;
}

.signature-section {
  margin-top: 26px;
}

.signature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.signature-card {
  min-height: 250px;
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 12px;
  text-align: left;
  border-radius: 8px;
  border: 1px solid rgba(77, 82, 126, 0.16);
  background:
    radial-gradient(ellipse at 84% 12%, rgba(255,255,255,0.86) 0 6%, transparent 7%),
    radial-gradient(ellipse at 84% 22%, rgba(24,36,74,0.86) 0 7%, rgba(143,92,255,0.25) 9% 22%, transparent 24%),
    linear-gradient(145deg, rgba(255,255,255,0.76), rgba(241,250,255,0.6));
  box-shadow: var(--shadow), 0 0 32px rgba(143, 92, 255, 0.1);
  overflow: hidden;
}

.signature-preview {
  width: 100%;
  aspect-ratio: 1.28;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid rgba(77, 82, 126, 0.12);
  background: rgba(255, 255, 255, 0.62);
}

.signature-preview svg {
  width: 100%;
  height: 100%;
}

.signature-card strong,
.signature-card span,
.signature-card small {
  display: block;
}

.signature-card span {
  margin-top: 5px;
  color: var(--muted);
  line-height: 1.42;
}

.signature-card small {
  margin-top: 6px;
  color: #456b76;
  font-weight: 900;
}

.exhibition-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(156px, 1fr));
  gap: 10px;
}

.exhibition-card {
  min-height: 210px;
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 10px;
  text-align: left;
  border-radius: 8px;
  border: 1px solid rgba(77, 82, 126, 0.14);
  background:
    radial-gradient(ellipse at 86% 18%, rgba(255,255,255,0.8) 0 7%, transparent 8%),
    radial-gradient(ellipse at 86% 30%, rgba(24,36,74,0.82) 0 7%, rgba(255,216,77,0.22) 9% 22%, transparent 24%),
    rgba(255,255,255,0.58);
  box-shadow: 0 14px 38px rgba(46, 53, 91, 0.09);
}

.exhibition-preview {
  aspect-ratio: 1.1;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid rgba(77, 82, 126, 0.1);
  background: rgba(255,255,255,0.62);
}

.exhibition-preview svg {
  width: 100%;
  height: 100%;
}

.exhibition-card strong,
.exhibition-card span {
  display: block;
}

.exhibition-card span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.beta-panel,
.export-note {
  margin-top: 18px;
  padding: 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background:
    radial-gradient(ellipse at 92% 20%, rgba(255,255,255,0.78) 0 7%, transparent 8%),
    radial-gradient(ellipse at 92% 34%, rgba(24,36,74,0.82) 0 7%, rgba(95,212,189,0.24) 9% 22%, transparent 24%),
    linear-gradient(135deg, rgba(255,255,255,0.76), rgba(241,250,255,0.58));
  box-shadow: 0 14px 42px rgba(46, 53, 91, 0.08);
}

.beta-panel h2 {
  margin: 0;
  font-size: 1.15rem;
}

.beta-panel p {
  margin: 5px 0 0;
  color: var(--muted);
}

.beta-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.beta-list span {
  padding: 7px 9px;
  border-radius: 8px;
  border: 1px solid rgba(77, 82, 126, 0.12);
  background: rgba(255,255,255,0.62);
  color: #456b76;
  font-size: 0.78rem;
  font-weight: 900;
}

.learn-hero,
.confidence-panel {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background:
    radial-gradient(ellipse at 88% 18%, rgba(255,255,255,0.82) 0 7%, transparent 8%),
    radial-gradient(ellipse at 88% 32%, rgba(24,36,74,0.84) 0 7%, rgba(143,92,255,0.24) 9% 22%, transparent 24%),
    linear-gradient(135deg, rgba(255,255,255,0.78), rgba(241,250,255,0.6));
  box-shadow: var(--shadow);
}

.learn-hero h2 {
  margin: 4px 0;
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 1.02;
}

.learn-hero p,
.confidence-panel span {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.growth-grid,
.learning-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.growth-tier,
.learning-card {
  border: 1px solid rgba(77, 82, 126, 0.14);
  border-radius: 8px;
  background:
    radial-gradient(ellipse at 82% 18%, rgba(255,255,255,0.8) 0 7%, transparent 8%),
    radial-gradient(ellipse at 82% 32%, rgba(24,36,74,0.78) 0 7%, rgba(95,212,189,0.22) 9% 22%, transparent 24%),
    rgba(255,255,255,0.6);
  box-shadow: 0 14px 38px rgba(46, 53, 91, 0.08);
}

.growth-tier {
  min-height: 112px;
  padding: 12px;
}

.growth-tier strong,
.growth-tier span,
.learning-card strong,
.learning-card span {
  display: block;
}

.growth-tier span,
.learning-card span {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.35;
}

.learning-card {
  min-height: 240px;
  display: grid;
  gap: 9px;
  align-content: start;
  padding: 12px;
  text-align: left;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
  touch-action: manipulation;
}

.learning-card:active {
  transform: scale(0.985);
}

.learning-card:focus-visible,
.practice-dot:focus-visible,
.nav-item:focus-visible,
.primary-button:focus-visible,
.secondary-button:focus-visible,
.tool-button:focus-visible {
  outline: 3px solid rgba(255, 216, 77, 0.78);
  outline-offset: 3px;
}

.learning-preview {
  aspect-ratio: 1.25;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid rgba(77, 82, 126, 0.1);
  background: rgba(255,255,255,0.62);
}

.learning-preview svg {
  width: 100%;
  height: 100%;
}

.learning-art path,
.learning-art circle {
  fill: rgba(255,255,255,0.78);
  stroke: #25332c;
  stroke-width: 3;
  stroke-linejoin: round;
}

.learning-memory {
  color: rgba(39, 48, 80, 0.58);
  font-weight: 800;
  letter-spacing: 0;
}

.destiny-section {
  margin-top: 18px;
}

.destiny-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.destiny-card {
  min-height: 250px;
  display: grid;
  gap: 9px;
  align-content: start;
  padding: 12px;
  text-align: left;
  border-radius: 8px;
  border: 1px solid rgba(77,82,126,0.14);
  background:
    radial-gradient(ellipse at 84% 14%, rgba(255,255,255,0.84) 0 7%, transparent 8%),
    radial-gradient(ellipse at 84% 28%, rgba(24,36,74,0.84) 0 7%, rgba(143,92,255,0.2) 9% 22%, transparent 24%),
    rgba(255,255,255,0.62);
  box-shadow: 0 14px 38px rgba(46,53,91,0.08);
  touch-action: manipulation;
}

.destiny-preview {
  aspect-ratio: 1.2;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid rgba(77,82,126,0.1);
  background: rgba(255,255,255,0.64);
}

.destiny-preview svg {
  width: 100%;
  height: 100%;
}

.destiny-card strong,
.destiny-card span {
  display: block;
}

.destiny-card span {
  color: var(--muted);
  line-height: 1.35;
}

.creative-path {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.creative-path-step {
  min-height: 126px;
  display: grid;
  align-content: center;
  gap: 7px;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid rgba(77,82,126,0.14);
  background:
    radial-gradient(circle at 86% 24%, rgba(255,255,255,0.82) 0 8%, transparent 9%),
    radial-gradient(circle at 86% 38%, var(--path-color) 0 8%, transparent 24%),
    rgba(255,255,255,0.62);
  box-shadow: 0 12px 30px rgba(46,53,91,0.07);
}

.creative-path-step i {
  width: 34px;
  height: 24px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 52%, #18244a 0 16%, transparent 17%),
    radial-gradient(circle at 50% 52%, var(--path-color) 0 42%, rgba(255,255,255,0.86) 45% 62%, var(--path-color) 64% 100%);
}

.creative-path-step strong,
.creative-path-step span {
  display: block;
}

.creative-path-step span {
  color: var(--muted);
  line-height: 1.35;
}

.imagination-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(260px, 1.05fr);
  gap: 14px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    radial-gradient(ellipse at 12% 18%, rgba(255,255,255,0.82) 0 7%, transparent 8%),
    radial-gradient(ellipse at 12% 32%, rgba(24,36,74,0.76) 0 7%, rgba(255,92,168,0.18) 9% 22%, transparent 24%),
    linear-gradient(135deg, rgba(255,255,255,0.76), rgba(245,252,255,0.58));
  box-shadow: 0 16px 44px rgba(46,53,91,0.08);
}

.imagination-panel h2 {
  margin: 5px 0;
  font-size: clamp(1.45rem, 3vw, 2.15rem);
}

.feeling-entry {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background:
    radial-gradient(ellipse at 88% 18%, rgba(255,255,255,0.82) 0 7%, transparent 8%),
    radial-gradient(ellipse at 88% 32%, rgba(24,36,74,0.84) 0 7%, rgba(255,92,168,0.18) 9% 22%, transparent 24%),
    linear-gradient(135deg, rgba(255,255,255,0.78), rgba(241,250,255,0.6));
  box-shadow: 0 16px 44px rgba(46,53,91,0.08);
}

.feeling-entry h2 {
  margin: 4px 0;
  font-size: clamp(1.4rem, 3vw, 2.1rem);
}

.feeling-entry p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.imagination-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.prompt-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.prompt-cloud span {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid rgba(77, 82, 126, 0.14);
  background:
    radial-gradient(circle at 22% 32%, rgba(255,255,255,0.92) 0 11%, transparent 12%),
    radial-gradient(circle at 48% 52%, rgba(24,36,74,0.86) 0 12%, rgba(143,92,255,0.22) 14% 38%, rgba(255,255,255,0.78) 41% 100%);
  color: #26304f;
  font-size: 0.82rem;
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(46,53,91,0.08);
}

.prompt-cloud.small {
  gap: 6px;
}

.prompt-cloud.small span {
  min-height: 28px;
  padding: 5px 9px;
  font-size: 0.76rem;
}

.visual-cue-strip {
  display: flex;
  gap: 9px;
  align-items: center;
  margin-top: 12px;
}

.visual-cue-strip span {
  display: inline-block;
  position: relative;
  width: 34px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid rgba(77, 82, 126, 0.14);
  background:
    radial-gradient(circle at 50% 50%, #18244a 0 16%, transparent 17%),
    radial-gradient(circle at 50% 50%, rgba(38,225,194,0.7) 0 35%, rgba(255,255,255,0.88) 38% 58%, transparent 60%);
  box-shadow: 0 0 18px rgba(38,225,194,0.16);
  animation: cue-breathe 4.8s ease-in-out infinite;
}

.visual-cue-strip .cue-touch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 38% 30%, rgba(255,255,255,0.96) 0 12%, transparent 13%),
    radial-gradient(circle at 50% 50%, #ffd84d 0 36%, rgba(255,255,255,0.82) 38% 54%, rgba(143,92,255,0.35) 56% 100%);
}

.visual-cue-strip .cue-path {
  width: 46px;
  height: 18px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(143,92,255,0.22), rgba(38,225,194,0.34)),
    radial-gradient(circle at 18% 50%, #18244a 0 10%, transparent 11%),
    radial-gradient(circle at 82% 50%, #18244a 0 10%, transparent 11%);
}

.visual-cue-strip .cue-bloom {
  width: 28px;
  height: 28px;
  background:
    radial-gradient(circle at 50% 50%, rgba(255,255,255,0.94) 0 12%, transparent 13%),
    conic-gradient(from 120deg, #ff5ca8, #ffd84d, #26e1c2, #456dff, #8f5cff, #ff5ca8);
}

.practice-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.feeling-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.feeling-stage {
  position: relative;
  min-height: clamp(420px, calc(100vh - 210px), 680px);
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 50% 44%, rgba(255,255,255,0.94), rgba(255,255,255,0.76) 56%, rgba(236,248,255,0.72)),
    conic-gradient(from 90deg, rgba(255,92,168,0.12), rgba(38,225,194,0.15), rgba(69,109,255,0.11), rgba(255,216,77,0.1), rgba(255,92,168,0.12));
  box-shadow: var(--shadow), 0 0 44px rgba(143,92,255,0.12);
  touch-action: manipulation;
}

.feeling-stage .visual-cue-strip {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
}

.feeling-art {
  width: min(680px, 100%);
  height: auto;
  max-height: 100%;
}

.feeling-art path {
  fill: rgba(255,255,255,0.78);
  stroke: #25332c;
  stroke-width: 3;
  stroke-linejoin: round;
  cursor: pointer;
  transition: fill 240ms ease, filter 240ms ease;
  pointer-events: visiblePainted;
}

.feeling-art path[style] {
  filter: drop-shadow(0 0 10px rgba(143,92,255,0.12));
  animation: feeling-bloom 420ms ease-out;
}

.feeling-art path:active {
  filter: drop-shadow(0 0 16px rgba(143,92,255,0.24));
}

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

.feeling-orb {
  aspect-ratio: 1;
  min-height: 50px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, rgba(255,255,255,0.96) 0 14%, transparent 15%),
    radial-gradient(circle at 50% 54%, #172244 0 19%, transparent 20%),
    radial-gradient(circle at 50% 50%, var(--feeling-color) 0 48%, rgba(255,255,255,0.9) 50% 62%, var(--feeling-color) 64% 100%);
  box-shadow: 0 0 18px rgba(80, 105, 220, 0.2), inset 0 0 0 2px rgba(255,255,255,0.72);
}

.feeling-orb.active {
  outline: 3px solid rgba(20, 29, 52, 0.82);
  outline-offset: 3px;
}

.practice-stage {
  position: relative;
  height: clamp(420px, calc(100vh - 210px), 680px);
  overflow: hidden;
  isolation: isolate;
  border-radius: 8px;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 50% 44%, rgba(255,255,255,0.94), rgba(255,255,255,0.76) 56%, rgba(236,248,255,0.72)),
    conic-gradient(from 90deg, rgba(255,92,168,0.12), rgba(38,225,194,0.15), rgba(69,109,255,0.11), rgba(255,216,77,0.1), rgba(255,92,168,0.12));
  box-shadow: var(--shadow), 0 0 44px rgba(143,92,255,0.12);
  user-select: none;
  touch-action: manipulation;
}

.practice-stage svg {
  width: 100%;
  height: 100%;
}

.practice-stage .learning-art {
  opacity: var(--ghost-opacity, 0.62);
  transition: opacity 420ms ease;
}

.practice-stage .learning-art path,
.practice-stage .learning-art circle {
  stroke-dasharray: 12 13;
  stroke: rgba(37, 51, 44, 0.6);
}

.practice-line {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.practice-line polyline {
  fill: none;
  stroke: #8f5cff;
  stroke-width: 8;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.62;
  filter: drop-shadow(0 0 10px rgba(143,92,255,0.28));
  transition: opacity 240ms ease;
}

.practice-line .mirror-line {
  stroke: #26e1c2;
  opacity: 0.5;
  filter: drop-shadow(0 0 12px rgba(38,225,194,0.28));
}

.mirror-axis {
  position: absolute;
  top: 8%;
  bottom: 8%;
  left: 50%;
  width: 1px;
  background: linear-gradient(to bottom, transparent, rgba(143,92,255,0.38), rgba(38,225,194,0.32), transparent);
  box-shadow: 0 0 16px rgba(143,92,255,0.18);
  pointer-events: none;
}

.practice-dot {
  position: absolute;
  width: 42px;
  height: 42px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, rgba(255,255,255,0.96) 0 14%, transparent 15%),
    radial-gradient(circle at 50% 52%, #18244a 0 18%, #ffd84d 19% 44%, rgba(255,255,255,0.9) 46% 62%, #8f5cff 64% 100%);
  color: #18244a;
  box-shadow: 0 0 18px rgba(143,92,255,0.24);
  touch-action: manipulation;
  transition: opacity 220ms ease, transform 180ms ease, box-shadow 220ms ease;
}

.practice-dot span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 900;
}

.practice-dot.done {
  opacity: 0.42;
  transform: translate(-50%, -50%) scale(0.82);
}

.practice-dot.next {
  outline: 3px solid rgba(255,216,77,0.72);
  outline-offset: 3px;
  box-shadow: 0 0 24px rgba(255,216,77,0.34), 0 0 18px rgba(143,92,255,0.24);
}

.practice-dot:active {
  transform: translate(-50%, -50%) scale(0.92);
}

.practice-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.68);
  box-shadow: 0 16px 44px rgba(46,53,91,0.1);
}

.practice-panel h2 {
  margin: 0;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
}

.practice-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.confidence-panel {
  margin-top: 18px;
  display: grid;
}

.confidence-panel.small {
  margin-top: 0;
  box-shadow: none;
}

.realm-preview {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.92fr);
  gap: clamp(16px, 4vw, 34px);
  align-items: center;
}

.realm-preview-art {
  min-height: min(68vh, 640px);
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 50% 45%, rgba(255,255,255,0.96), rgba(255,255,255,0.74) 58%, rgba(236,248,255,0.72)),
    conic-gradient(from 90deg, rgba(255,92,168,0.12), rgba(38,225,194,0.15), rgba(69,109,255,0.11), rgba(255,216,77,0.1), rgba(255,92,168,0.12));
  box-shadow: var(--shadow), inset 0 0 44px rgba(255,216,77,0.08);
}

.realm-preview-art svg {
  width: min(680px, 100%);
  height: auto;
  max-height: min(66vh, 620px);
}

.realm-preview-copy {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background:
    radial-gradient(ellipse at 88% 14%, rgba(255,255,255,0.82) 0 7%, transparent 8%),
    radial-gradient(ellipse at 88% 28%, rgba(24,36,74,0.84) 0 7%, rgba(95,212,189,0.24) 9% 22%, transparent 24%),
    linear-gradient(145deg, rgba(255,255,255,0.78), rgba(241,250,255,0.6));
  box-shadow: 0 18px 54px rgba(46, 53, 91, 0.12);
}

.realm-preview-copy h2 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.realm-preview-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.discovery-window {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 8px 10px;
  align-items: center;
  padding: 11px;
  border-radius: 8px;
  border: 1px solid rgba(77,82,126,0.14);
  background:
    radial-gradient(ellipse at 88% 22%, rgba(255,255,255,0.82) 0 8%, transparent 9%),
    radial-gradient(ellipse at 88% 36%, rgba(24,36,74,0.82) 0 8%, rgba(255,216,77,0.18) 10% 24%, transparent 25%),
    rgba(255,255,255,0.58);
}

.discovery-window i {
  grid-row: span 2;
  width: 38px;
  height: 28px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 52%, #18244a 0 16%, transparent 17%),
    radial-gradient(circle at 50% 52%, #ffd84d 0 42%, rgba(255,255,255,0.86) 45% 62%, #8f5cff 64% 100%);
  box-shadow: 0 0 18px rgba(255,216,77,0.16);
}

.discovery-window strong,
.discovery-window span {
  display: block;
}

.discovery-window span {
  color: var(--muted);
  line-height: 1.38;
}

.realm-facts {
  display: grid;
  gap: 8px;
}

.realm-facts div {
  padding: 10px;
  border-radius: 8px;
  border: 1px solid rgba(77, 82, 126, 0.12);
  background: rgba(255,255,255,0.58);
}

.realm-facts strong,
.realm-facts span {
  display: block;
}

.realm-facts strong {
  color: #18244a;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.realm-facts span {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.38;
}

.action-row,
.tool-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.primary-button,
.secondary-button,
.chip-button,
.tool-button {
  min-height: 42px;
  border-radius: 8px;
  padding: 0 16px;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(255,255,255,0.86), rgba(238, 251, 255, 0.72)),
    radial-gradient(circle at 50% 40%, rgba(30, 215, 220, 0.18), transparent 58%);
  border: 1px solid var(--line);
  box-shadow: 0 10px 28px rgba(56, 64, 57, 0.08);
}

.primary-button {
  background:
    radial-gradient(circle at 48% 45%, #23325f 0 24%, transparent 25%),
    conic-gradient(from 120deg, #ff5ca8, #ffd84d, #26e1c2, #456dff, #8f5cff, #ff5ca8);
  color: #fffaf4;
  box-shadow: 0 10px 28px rgba(69, 109, 255, 0.22), inset 0 0 0 2px rgba(255,255,255,0.36);
}

.category-grid,
.page-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(142px, 1fr));
  gap: 12px;
}

.category-card,
.page-card,
.save-panel,
.settings-panel {
  border: 1px solid var(--line);
  background:
    linear-gradient(145deg, rgba(255,255,255,0.76), rgba(241, 250, 255, 0.58)),
    radial-gradient(circle at 78% 18%, rgba(255,255,255,0.55), transparent 20%);
  box-shadow: var(--shadow);
  border-radius: 8px;
}

.category-card,
.page-card {
  min-height: 132px;
  padding: 16px;
  text-align: left;
  display: grid;
  align-content: end;
  overflow: hidden;
  position: relative;
}

.category-card::before,
.page-card::before {
  content: "";
  position: absolute;
  inset: 12px 12px auto auto;
  width: 58px;
  height: 42px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 52%, #172244 0 18%, transparent 19%),
    radial-gradient(circle at 50% 52%, var(--accent, var(--sage)) 0 36%, #ffffff 38% 55%, transparent 57%),
    linear-gradient(90deg, transparent 0, rgba(255,255,255,0.88) 48%, transparent 100%);
  opacity: 0.76;
  box-shadow: 0 0 24px rgba(80, 105, 220, 0.16);
  transform: rotate(-8deg);
}

.category-card::after,
.page-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 0%, rgba(255,255,255,0.42) 44%, transparent 62%);
  transform: translateX(-120%);
  opacity: 0.7;
  pointer-events: none;
}

.category-card strong,
.page-card strong {
  font-size: 1.05rem;
}

.category-card span,
.page-card span {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.45;
}

.page-picker-card {
  min-height: 220px;
  gap: 10px;
}

.depth-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 8px;
  margin: 0 0 16px;
}

.depth-chip,
.depth-badge {
  border: 1px solid rgba(77, 82, 126, 0.16);
  background:
    linear-gradient(135deg, rgba(255,255,255,0.78), rgba(239, 250, 255, 0.64)),
    radial-gradient(circle at 18% 50%, rgba(30, 215, 220, 0.22), transparent 42%);
  border-radius: 8px;
}

.depth-chip {
  padding: 10px;
  min-height: 76px;
}

.depth-chip strong,
.depth-badge {
  display: block;
  color: #18244a;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.depth-chip span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.depth-badge {
  justify-self: start;
  padding: 6px 8px;
}

.curation-tags,
.artist-collection,
.awakened-label {
  display: block;
  margin-top: 2px;
  color: #7b687e;
  font-size: 0.74rem;
  font-weight: 800;
  line-height: 1.35;
}

.artist-collection {
  color: #456b76;
}

.awakened-label {
  justify-self: start;
  padding: 5px 7px;
  border-radius: 8px;
  color: #3c2f67;
  background: rgba(255, 248, 223, 0.72);
  border: 1px solid rgba(255, 216, 77, 0.34);
}

.mini-preview,
.gallery-thumb {
  width: 100%;
  aspect-ratio: 1.25;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(77, 82, 126, 0.12);
}

.mini-preview svg,
.gallery-thumb svg {
  width: 100%;
  height: 100%;
}

.section-title {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: end;
  margin: 6px 0 16px;
}

.section-title h2 {
  margin: 0;
  font-size: clamp(1.55rem, 4vw, 2.35rem);
  letter-spacing: 0;
}

.section-title p {
  margin: 6px 0 0;
  color: var(--muted);
}

.canvas-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.canvas-stage {
  position: relative;
  height: clamp(420px, calc(100vh - 210px), 680px);
  background:
    radial-gradient(circle at 50% 44%, rgba(255,255,255,0.94), rgba(255,255,255,0.76) 56%, rgba(236, 248, 255, 0.72)),
    conic-gradient(from 90deg, rgba(255,92,168,0.12), rgba(38,225,194,0.15), rgba(69,109,255,0.11), rgba(255,216,77,0.1), rgba(255,92,168,0.12));
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow), 0 0 46px rgba(30, 215, 220, 0.16);
  overflow: hidden;
  touch-action: none;
}

.canvas-stage::before,
.canvas-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.38;
}

.canvas-stage::before {
  background:
    radial-gradient(circle at 24% 24%, rgba(255,255,255,0.72) 0 2px, transparent 3px),
    radial-gradient(circle at 74% 28%, rgba(255,255,255,0.52) 0 2px, transparent 3px),
    radial-gradient(circle at 62% 78%, rgba(255,255,255,0.58) 0 2px, transparent 3px);
  animation: atmosphere-drift 22s ease-in-out infinite alternate;
}

.canvas-stage::after {
  background:
    radial-gradient(ellipse at 50% 48%, rgba(24, 36, 74, 0.11) 0 9%, transparent 10%),
    radial-gradient(ellipse at 50% 48%, rgba(255,255,255,0.36) 0 19%, transparent 20%),
    radial-gradient(ellipse at 50% 48%, rgba(30,215,220,0.12), transparent 42%);
  transform: scale(0.96);
  animation: portal-breathe 16s ease-in-out infinite;
}

.breathing-atmosphere {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.breathing-atmosphere span {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 32%, rgba(255,255,255,0.96) 0 18%, transparent 19%),
    radial-gradient(circle at 50% 52%, rgba(24,36,74,0.88) 0 22%, rgba(30,215,220,0.46) 24% 58%, transparent 60%);
  box-shadow: 0 0 16px rgba(30, 215, 220, 0.22);
  opacity: 0.26;
  animation: canvas-particle 18s ease-in-out infinite;
}

.breathing-atmosphere span:nth-child(1) { left: 14%; top: 72%; }
.breathing-atmosphere span:nth-child(2) { left: 78%; top: 18%; animation-delay: -5s; }
.breathing-atmosphere span:nth-child(3) { left: 44%; top: 12%; animation-delay: -9s; }
.breathing-atmosphere span:nth-child(4) { left: 86%; top: 76%; animation-delay: -13s; }

.canvas-stage[data-mood="ocean"] {
  box-shadow: var(--shadow), 0 0 50px rgba(64, 214, 232, 0.2);
}

.canvas-stage[data-mood="gold"] {
  box-shadow: var(--shadow), 0 0 50px rgba(255, 216, 77, 0.2);
}

.canvas-stage[data-mood="cosmic"] {
  box-shadow: var(--shadow), 0 0 50px rgba(143, 92, 255, 0.18);
}

.canvas-stage[data-mood="healing"] {
  box-shadow: var(--shadow), 0 0 50px rgba(95, 212, 189, 0.2);
}

.canvas-stage.awakened-stage {
  box-shadow: var(--shadow), 0 0 54px rgba(30, 215, 220, 0.22), inset 0 0 42px rgba(255, 216, 77, 0.08);
}

.canvas-stage.watching-stage::after {
  opacity: 0.52;
}

.canvas-stage.pathway-stage::before {
  opacity: 0.5;
  background:
    radial-gradient(circle at 24% 24%, rgba(255,255,255,0.72) 0 2px, transparent 3px),
    radial-gradient(circle at 74% 28%, rgba(255,255,255,0.52) 0 2px, transparent 3px),
    radial-gradient(circle at 62% 78%, rgba(255,255,255,0.58) 0 2px, transparent 3px),
    linear-gradient(135deg, transparent 20%, rgba(255,216,77,0.12) 48%, transparent 70%);
}

.canvas-stage.secret-stage {
  box-shadow: var(--shadow), 0 0 66px rgba(143, 92, 255, 0.18), inset 0 0 44px rgba(30, 215, 220, 0.08);
}

.canvas-stage.completed-stage {
  box-shadow: var(--shadow), 0 0 64px rgba(255, 216, 77, 0.22), inset 0 0 54px rgba(255, 92, 168, 0.08);
}

.canvas-stage svg {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
  user-select: none;
  touch-action: none;
}

.line-art [data-fillable] {
  fill: #ffffff;
  stroke: #25332c;
  stroke-width: 3;
  stroke-linejoin: round;
  cursor: pointer;
  pointer-events: visiblePainted;
  transition: fill 260ms ease, filter 260ms ease, opacity 260ms ease;
}

.line-art [data-fillable]:hover {
  filter: brightness(1.02) drop-shadow(0 0 8px rgba(30, 215, 220, 0.28));
}

.line-art [data-fillable].filled-pulse {
  animation: liquid-fill 520ms ease-out;
}

.fill-ripple {
  position: absolute;
  z-index: 3;
  transform: translate(-50%, -50%) scale(0.2);
  border-radius: 50%;
  pointer-events: none;
  background:
    radial-gradient(circle, rgba(255,255,255,0.82) 0 10%, var(--ripple-color) 11% 32%, rgba(255,255,255,0.44) 34% 48%, transparent 64%);
  filter: blur(0.2px) drop-shadow(0 0 14px rgba(30, 215, 220, 0.34));
  opacity: 0;
  animation: fill-ripple 700ms ease-out forwards;
}

.completion-moment,
.discovery-moment {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  width: min(320px, calc(100% - 36px));
  padding: 12px 14px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  background:
    radial-gradient(ellipse at 50% 8%, rgba(255,255,255,0.9) 0 7%, transparent 8%),
    radial-gradient(ellipse at 50% 35%, rgba(24,36,74,0.92) 0 8%, rgba(255,216,77,0.52) 10% 22%, transparent 24%),
    linear-gradient(135deg, rgba(255,250,244,0.88), rgba(238,251,255,0.82));
  box-shadow: 0 18px 46px rgba(46, 53, 91, 0.18), 0 0 34px rgba(255,216,77,0.22);
  pointer-events: none;
  animation: completion-rise 2500ms ease forwards;
}

.discovery-moment {
  top: 18px;
  bottom: auto;
  width: min(300px, calc(100% - 36px));
  background:
    radial-gradient(ellipse at 50% 10%, rgba(255,255,255,0.92) 0 8%, transparent 9%),
    radial-gradient(ellipse at 50% 36%, rgba(24,36,74,0.9) 0 8%, rgba(30,215,220,0.45) 10% 23%, transparent 24%),
    linear-gradient(135deg, rgba(255,250,244,0.88), rgba(238,251,255,0.82));
  animation: discovery-float 2400ms ease forwards;
}

.completion-moment strong,
.completion-moment span,
.discovery-moment strong,
.discovery-moment span {
  display: block;
}

.completion-moment strong,
.discovery-moment strong {
  color: #18244a;
  font-size: 1rem;
}

.completion-moment span,
.discovery-moment span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.82rem;
}

.hidden-reveal {
  fill: rgba(255, 255, 255, 0);
  stroke: rgba(30, 42, 72, 0);
  stroke-width: 3;
  pointer-events: none;
  opacity: 0;
  transition: opacity 520ms ease, fill 520ms ease, stroke 520ms ease, filter 520ms ease;
}

.line-art.reveal-one .hidden-reveal[data-reveal-level="1"],
.line-art.reveal-one .hidden-reveal[data-reveal-level="2"],
.line-art.reveal-two .hidden-reveal[data-reveal-level="1"],
.line-art.reveal-two .hidden-reveal[data-reveal-level="2"],
.line-art.reveal-two .hidden-reveal[data-reveal-level="3"],
.line-art.reveal-three .hidden-reveal,
.line-art.reveal-four .hidden-reveal {
  fill: rgba(255, 248, 223, 0.78);
  stroke: rgba(30, 42, 72, 0.72);
  opacity: 1;
  filter: drop-shadow(0 0 11px rgba(30, 215, 220, 0.28));
}

.line-art.reveal-four .hidden-reveal {
  fill: rgba(255, 216, 77, 0.45);
}

.line-art.reveal-two .hidden-reveal {
  animation: hidden-eye-breathe 8s ease-in-out infinite;
}

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

.palette-sets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.palette-set-button {
  min-height: 34px;
  border-radius: 8px;
  padding: 0 10px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid var(--line);
  font-size: 0.84rem;
  font-weight: 800;
}

.palette-set-button.active {
  color: #fffaf4;
  background:
    radial-gradient(circle at 50% 46%, #18244a 0 18%, transparent 19%),
    conic-gradient(from 120deg, #ff5ca8, #ffd84d, #26e1c2, #456dff, #8f5cff, #ff5ca8);
}

.swatch {
  aspect-ratio: 1;
  min-width: 30px;
  border-radius: 50%;
  border: 0;
  background:
    radial-gradient(circle at 35% 30%, rgba(255,255,255,0.96) 0 14%, transparent 15%),
    radial-gradient(circle at 50% 54%, #172244 0 19%, transparent 20%),
    radial-gradient(circle at 50% 50%, var(--swatch) 0 48%, rgba(255,255,255,0.9) 50% 62%, var(--swatch) 64% 100%);
  box-shadow: 0 0 18px rgba(80, 105, 220, 0.2), inset 0 0 0 2px rgba(255,255,255,0.72);
}

.swatch.active {
  outline: 3px solid rgba(20, 29, 52, 0.82);
  outline-offset: 3px;
}

.tool-strip {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 18px 54px rgba(70, 70, 130, 0.12);
}

.collection-label {
  min-height: 36px;
  display: grid;
  align-items: center;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(77, 82, 126, 0.14);
  background:
    radial-gradient(ellipse at 88% 40%, rgba(255,255,255,0.78) 0 8%, transparent 9%),
    radial-gradient(ellipse at 88% 48%, rgba(24,36,74,0.82) 0 8%, rgba(95,212,189,0.28) 10% 22%, transparent 24%),
    rgba(255,255,255,0.54);
  color: #456b76;
  font-size: 0.82rem;
  font-weight: 900;
}

.awakening-meter {
  display: grid;
  gap: 7px;
  padding: 9px 10px;
  border-radius: 8px;
  border: 1px solid rgba(77, 82, 126, 0.14);
  background:
    linear-gradient(135deg, rgba(255,255,255,0.72), rgba(238,251,255,0.56)),
    radial-gradient(ellipse at 88% 44%, rgba(255,255,255,0.72) 0 8%, transparent 9%),
    radial-gradient(ellipse at 88% 50%, rgba(24,36,74,0.8) 0 8%, rgba(255,216,77,0.24) 10% 22%, transparent 24%);
}

.awakening-meter span {
  color: #456b76;
  font-size: 0.8rem;
  font-weight: 900;
}

.awakening-meter i {
  display: block;
  height: 7px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(77, 82, 126, 0.12);
}

.awakening-meter b {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #5fd4bd, #ffd84d, #ff5ca8);
  transition: width 260ms ease;
}

.tool-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.range-wrap {
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--muted);
}

.range-wrap input {
  flex: 1;
  accent-color: var(--sage);
}

.save-panel,
.settings-panel {
  padding: 18px;
  display: grid;
  gap: 14px;
}

.settings-group,
.comfort-note {
  display: grid;
  gap: 4px;
  margin-top: 8px;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid rgba(77, 82, 126, 0.14);
  background:
    radial-gradient(ellipse at 88% 36%, rgba(255,255,255,0.78) 0 8%, transparent 9%),
    radial-gradient(ellipse at 88% 46%, rgba(24,36,74,0.82) 0 8%, rgba(95,212,189,0.24) 10% 22%, transparent 24%),
    rgba(255,255,255,0.58);
}

.settings-group strong,
.comfort-note strong {
  color: #18244a;
}

.settings-group span,
.comfort-note span {
  color: var(--muted);
  line-height: 1.42;
}

.comfort-note {
  margin-top: 0;
}

.comfort-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.comfort-presets button {
  min-height: 38px;
  padding: 0 11px;
  border-radius: 8px;
  border: 1px solid rgba(77,82,126,0.14);
  background:
    radial-gradient(circle at 20% 45%, rgba(255,255,255,0.88) 0 8%, transparent 9%),
    radial-gradient(circle at 23% 48%, rgba(24,36,74,0.82) 0 8%, rgba(38,225,194,0.25) 10% 24%, transparent 25%),
    rgba(255,255,255,0.66);
  color: #456b76;
  font-size: 0.82rem;
  font-weight: 900;
}

.save-panel {
  background:
    radial-gradient(ellipse at 88% 8%, rgba(255,255,255,0.82) 0 5%, transparent 6%),
    radial-gradient(ellipse at 88% 16%, rgba(24,36,74,0.82) 0 6%, rgba(255,216,77,0.2) 8% 18%, transparent 20%),
    linear-gradient(145deg, rgba(255,255,255,0.76), rgba(241,250,255,0.58));
}

.preview-box {
  min-height: 260px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.56);
  border: 1px dashed rgba(36, 48, 43, 0.18);
  border-radius: 8px;
  overflow: hidden;
}

.preview-box svg {
  width: min(420px, 100%);
  height: auto;
}

.export-note {
  display: grid;
  gap: 4px;
  margin-top: 0;
}

.export-note strong,
.export-note span {
  display: block;
}

.export-note strong {
  color: #18244a;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.export-note span {
  color: var(--muted);
  line-height: 1.42;
}

.compact-title {
  margin-top: 8px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
  gap: 14px;
}

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

.gallery-stats div {
  min-height: 74px;
  display: grid;
  align-content: center;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid rgba(77, 82, 126, 0.14);
  background:
    radial-gradient(ellipse at 82% 30%, rgba(255,255,255,0.78) 0 8%, transparent 9%),
    radial-gradient(ellipse at 82% 44%, rgba(24,36,74,0.8) 0 8%, rgba(95,212,189,0.24) 10% 24%, transparent 26%),
    rgba(255,255,255,0.58);
}

.gallery-stats strong,
.gallery-stats span {
  display: block;
}

.gallery-stats strong {
  color: #18244a;
  font-size: 1.45rem;
}

.gallery-stats span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.gallery-section-heading {
  grid-column: 1 / -1;
  margin-top: 6px;
  color: #456b76;
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
}

.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.gallery-filter {
  min-height: 34px;
  padding: 0 11px;
  border-radius: 8px;
  border: 1px solid rgba(77, 82, 126, 0.14);
  background: rgba(255,255,255,0.68);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

.gallery-filter.active {
  color: #fffaf4;
  background:
    radial-gradient(circle at 50% 46%, #18244a 0 18%, transparent 19%),
    conic-gradient(from 120deg, #ff5ca8, #ffd84d, #26e1c2, #456dff, #8f5cff, #ff5ca8);
}

.gallery-card,
.empty-gallery {
  min-height: 190px;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.66);
  box-shadow: 0 12px 36px rgba(46, 53, 91, 0.1);
  text-align: left;
}

.empty-gallery {
  display: grid;
  gap: 6px;
  align-content: center;
}

.gallery-card {
  display: grid;
  gap: 8px;
  align-content: start;
  position: relative;
}

.gallery-card.awakened-card {
  border-color: rgba(255, 216, 77, 0.34);
  background:
    linear-gradient(145deg, rgba(255,255,255,0.78), rgba(255,248,223,0.58)),
    radial-gradient(ellipse at 82% 18%, rgba(255,255,255,0.86) 0 7%, transparent 8%),
    radial-gradient(ellipse at 82% 28%, rgba(24,36,74,0.82) 0 8%, rgba(255,216,77,0.3) 10% 24%, transparent 25%);
  box-shadow: 0 14px 42px rgba(46, 53, 91, 0.12), 0 0 30px rgba(255, 216, 77, 0.16);
}

.gallery-card.awakened-card .gallery-thumb {
  box-shadow: inset 0 0 24px rgba(255, 216, 77, 0.12);
}

.gallery-card::after {
  content: "";
  position: absolute;
  inset: auto 12px 12px auto;
  width: 34px;
  height: 22px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0.28;
  background:
    radial-gradient(circle at 50% 52%, #141d34 0 16%, transparent 17%),
    radial-gradient(circle at 50% 52%, rgba(95,212,189,0.78) 0 34%, rgba(255,255,255,0.86) 36% 55%, transparent 57%);
}

.gallery-open {
  display: grid;
  gap: 8px;
  text-align: left;
  padding: 0;
  color: inherit;
  background: transparent;
}

.gallery-card strong {
  font-size: 0.98rem;
}

.gallery-card span,
.empty-gallery {
  color: var(--muted);
}

.empty-gallery strong {
  color: #18244a;
  font-size: 1rem;
}

.gallery-plaque {
  display: inline-block;
  justify-self: start;
  padding: 5px 7px;
  border-radius: 8px;
  border: 1px solid rgba(77, 82, 126, 0.12);
  background: rgba(255,255,255,0.58);
  color: #456b76;
  font-size: 0.72rem;
  font-weight: 900;
}

.gallery-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-start;
}

.favorite-toggle,
.collection-button {
  min-height: 30px;
  border-radius: 8px;
  border: 1px solid rgba(77, 82, 126, 0.14);
  background: rgba(255, 255, 255, 0.7);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
}

.favorite-toggle {
  padding: 0 10px;
}

.favorite-toggle.active,
.collection-button.active {
  color: #fffaf4;
  background:
    radial-gradient(circle at 50% 45%, #18244a 0 20%, transparent 21%),
    conic-gradient(from 120deg, #ff5ca8, #ffd84d, #26e1c2, #456dff, #8f5cff, #ff5ca8);
  box-shadow: 0 8px 22px rgba(69, 109, 255, 0.18);
}

.collection-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.collection-button {
  padding: 0 8px;
}

.gallery-modal {
  position: fixed;
  z-index: 9;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(24, 28, 46, 0.36);
  backdrop-filter: blur(10px);
  animation: modal-soft-enter 260ms ease-out both;
}

.gallery-modal-panel {
  width: min(760px, 100%);
  max-height: calc(100vh - 42px);
  overflow: auto;
  padding: 14px;
  border: 1px solid rgba(255,255,255,0.76);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255,250,244,0.95), rgba(238,251,255,0.92)),
    conic-gradient(from 120deg, rgba(255,92,168,0.12), rgba(38,225,194,0.12), rgba(69,109,255,0.1), rgba(255,216,77,0.1), rgba(255,92,168,0.12));
  box-shadow: 0 26px 82px rgba(22, 29, 52, 0.28);
}

.gallery-modal.awakened-modal .gallery-modal-panel {
  box-shadow: 0 28px 86px rgba(22, 29, 52, 0.3), 0 0 44px rgba(255, 216, 77, 0.2);
}

.gallery-modal.awakened-modal .admire-preview {
  box-shadow: inset 0 0 42px rgba(255, 216, 77, 0.14);
}

.gallery-modal-panel .icon-button {
  width: auto;
  min-width: 64px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 900;
}

.admire-preview {
  display: grid;
  place-items: center;
  min-height: min(62vh, 560px);
  border: 1px solid rgba(77, 82, 126, 0.12);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 45%, rgba(255,255,255,0.96), rgba(255,255,255,0.72) 58%, rgba(236,248,255,0.7)),
    conic-gradient(from 90deg, rgba(255,92,168,0.12), rgba(38,225,194,0.15), rgba(69,109,255,0.11), rgba(255,216,77,0.1), rgba(255,92,168,0.12));
  overflow: hidden;
}

.admire-preview svg {
  width: min(620px, 100%);
  height: auto;
  max-height: 62vh;
}

.toggle-row {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}

.toggle-row:last-child {
  border-bottom: 0;
}

.toggle-row input {
  width: 22px;
  height: 22px;
  accent-color: var(--sage);
}

.bottom-nav {
  position: fixed;
  z-index: 6;
  left: 50%;
  bottom: max(14px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(560px, calc(100% - 28px));
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255,250,244,0.88), rgba(238,251,255,0.82)),
    radial-gradient(ellipse at 50% 50%, rgba(30, 215, 220, 0.16), transparent 68%);
  box-shadow: 0 18px 50px rgba(65, 77, 68, 0.18);
  backdrop-filter: blur(18px);
}

.nav-item {
  min-height: 42px;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  font-weight: 700;
  touch-action: manipulation;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.nav-item:active {
  transform: scale(0.97);
}

.nav-item.active {
  color: #fffaf4;
  background:
    radial-gradient(circle at 50% 46%, #18244a 0 20%, transparent 21%),
    conic-gradient(from 120deg, #ff5ca8, #ffd84d, #26e1c2, #456dff, #8f5cff, #ff5ca8);
}

@keyframes aura-shimmer {
  from { transform: translateX(-3%) translateY(-1%); opacity: 0.42; }
  to { transform: translateX(3%) translateY(1%); opacity: 0.72; }
}

@keyframes float-eye {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); opacity: 0.18; }
  45% { transform: translate3d(18px, -34px, 0) scale(1.4); opacity: 0.58; }
  70% { transform: translate3d(-12px, -18px, 0) scale(0.86); opacity: 0.36; }
}

@keyframes cover-breathe {
  0%, 100% { transform: translateY(0); filter: saturate(1); }
  50% { transform: translateY(-5px); filter: saturate(1.08); }
}

@keyframes card-shimmer {
  0%, 68% { transform: translateX(-130%); }
  82%, 100% { transform: translateX(130%); }
}

@keyframes iris-blink {
  0%, 82%, 100% { transform: scale(1); }
  88% { transform: scale(1.08, 0.82); }
}

@keyframes liquid-fill {
  0% { filter: brightness(1.34) drop-shadow(0 0 0 rgba(30, 215, 220, 0)); opacity: 0.74; }
  42% { filter: brightness(1.2) drop-shadow(0 0 16px rgba(30, 215, 220, 0.5)); opacity: 1; }
  100% { filter: brightness(1) drop-shadow(0 0 0 rgba(30, 215, 220, 0)); opacity: 1; }
}

@keyframes fill-ripple {
  0% { transform: translate(-50%, -50%) scale(0.2); opacity: 0; }
  24% { opacity: 0.58; }
  100% { transform: translate(-50%, -50%) scale(1.72); opacity: 0; }
}

@keyframes completion-rise {
  0% { transform: translate(-50%, 18px); opacity: 0; }
  18% { transform: translate(-50%, 0); opacity: 1; }
  78% { transform: translate(-50%, 0); opacity: 1; }
  100% { transform: translate(-50%, -10px); opacity: 0; }
}

@keyframes discovery-float {
  0% { transform: translate(-50%, -14px); opacity: 0; }
  18% { transform: translate(-50%, 0); opacity: 1; }
  76% { transform: translate(-50%, 0); opacity: 1; }
  100% { transform: translate(-50%, 8px); opacity: 0; }
}

@keyframes atmosphere-drift {
  0% { transform: translate3d(-12px, 8px, 0); opacity: 0.22; }
  100% { transform: translate3d(12px, -10px, 0); opacity: 0.44; }
}

@keyframes portal-breathe {
  0%, 100% { transform: scale(0.96); opacity: 0.24; }
  50% { transform: scale(1.04); opacity: 0.48; }
}

@keyframes canvas-particle {
  0%, 100% { transform: translate3d(0, 0, 0) scale(0.8); opacity: 0.16; }
  48% { transform: translate3d(14px, -22px, 0) scale(1.2); opacity: 0.36; }
  72% { transform: translate3d(-8px, -12px, 0) scale(0.94); opacity: 0.24; }
}

@keyframes hidden-eye-breathe {
  0%, 100% { filter: drop-shadow(0 0 9px rgba(30, 215, 220, 0.18)); }
  50% { filter: drop-shadow(0 0 16px rgba(143, 92, 255, 0.26)); }
}

@keyframes cue-breathe {
  0%, 100% { transform: scale(0.96); opacity: 0.72; }
  50% { transform: scale(1.04); opacity: 1; }
}

@keyframes companion-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@keyframes companion-warmth {
  0%, 100% { filter: saturate(1); }
  50% { filter: saturate(1.12) brightness(1.04); }
}

@keyframes feeling-bloom {
  0% { filter: brightness(1.2) drop-shadow(0 0 0 rgba(143,92,255,0)); }
  55% { filter: brightness(1.08) drop-shadow(0 0 16px rgba(143,92,255,0.2)); }
  100% { filter: drop-shadow(0 0 10px rgba(143,92,255,0.12)); }
}

@keyframes route-soft-enter {
  0% { opacity: 0; transform: translateY(8px); filter: blur(2px); }
  100% { opacity: 1; transform: translateY(0); filter: blur(0); }
}

@keyframes modal-soft-enter {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

@media (min-width: 860px) {
  .canvas-layout {
    grid-template-columns: minmax(0, 1fr) 272px;
  }

  .practice-layout {
    grid-template-columns: minmax(0, 1fr) 300px;
  }

  .feeling-layout {
    grid-template-columns: minmax(0, 1fr) 300px;
  }

  .tool-strip {
    align-self: start;
    position: sticky;
    top: 92px;
  }

  .palette {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (max-width: 760px) {
  .screen {
    padding-left: 12px;
    padding-right: 12px;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    gap: 12px;
    padding-bottom: 112px;
  }

  .cover-frame {
    order: -1;
    height: clamp(140px, 26vh, 220px);
    max-height: 220px;
  }

  .cover-art {
    object-position: center 38%;
  }

  .daily-card {
    display: grid;
    gap: 12px;
  }

  .companion-card {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .install-card {
    display: grid;
  }

  .memory-grid {
    grid-template-columns: 1fr;
  }

  .companion-card .primary-button {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .companion-orb {
    width: 52px;
    height: 52px;
  }

  .daily-card .primary-button {
    justify-self: start;
  }

  .hero h2 {
    font-size: clamp(1.85rem, 7vw, 2.4rem);
    line-height: 1.04;
  }

  .canvas-stage {
    height: clamp(320px, 52vh, 430px);
  }

  .tool-strip {
    margin-bottom: 104px;
    gap: 12px;
  }

  .realm-preview {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .realm-preview-art {
    min-height: clamp(260px, 46vh, 420px);
  }

  .realm-preview-copy {
    padding: 14px;
  }

  .learn-hero {
    display: grid;
  }

  .feeling-entry {
    display: grid;
  }

  .reflection-hero,
  .memory-place-panel {
    display: grid;
  }

  .imagination-panel {
    grid-template-columns: 1fr;
  }

  .practice-stage {
    height: clamp(330px, 54vh, 430px);
  }

  .feeling-stage {
    min-height: clamp(330px, 54vh, 430px);
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(138px, 1fr));
  }

  .gallery-modal {
    padding: 12px;
  }

  .gallery-modal-panel {
    max-height: calc(100vh - 24px);
  }

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

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

@media (max-width: 520px) {

  .section-title {
    display: block;
  }

  .category-grid,
  .page-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .category-card,
  .page-card {
    min-height: 118px;
    padding: 13px;
  }

  .palette {
    grid-template-columns: repeat(5, minmax(38px, 1fr));
  }

  .palette-set-button,
  .gallery-filter,
  .favorite-toggle,
  .collection-button,
  .emotion-button {
    min-height: 38px;
  }

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

  .emotion-button {
    min-height: 76px;
    padding: 10px;
  }

  .feeling-orbs {
    grid-template-columns: repeat(6, minmax(38px, 1fr));
  }

  .feeling-orb {
    min-height: 42px;
  }

  .canvas-stage {
    height: clamp(330px, 54vh, 420px);
  }

  .tool-row .primary-button,
  .tool-row .secondary-button,
  .tool-row .tool-button {
    flex: 1 1 42%;
  }

  .realm-preview-copy h2 {
    font-size: clamp(1.8rem, 9vw, 2.5rem);
  }

  .gallery-stats {
    grid-template-columns: 1fr;
  }

  .bottom-nav {
    width: min(620px, calc(100% - 18px));
    gap: 4px;
  }

  .nav-item {
    font-size: 0.78rem;
  }

  .learning-grid {
    grid-template-columns: 1fr;
  }

  .destiny-grid,
  .creative-path {
    grid-template-columns: 1fr;
  }

  .practice-dot {
    width: 38px;
    height: 38px;
  }
}

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

  .screen.is-entering,
  .gallery-modal {
    animation: none !important;
  }
}
