/* ============================================================
   观想练习平台 — Base + 3 themes
   themes: zen (default) / glow / dream
   ============================================================ */

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body, #root { height: 100%; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--accent); color: var(--bg); }

/* ---------- THEME: zen (禅意 — 改：深石墨 + 朱砂刃) ---------- */
:root, .theme-zen {
  --bg: #14161B;
  --bg-deep: #0C0D11;
  --surface: #1B1E25;
  --surface-2: #23262E;
  --ink: #ECE8DD;
  --ink-soft: #A8A398;
  --ink-mute: #5E5A52;
  --divider: #2C2F38;
  --divider-soft: #232631;
  --accent: #E04E2C;        /* 朱砂刃 */
  --accent-soft: #C8341E;
  --accent-2: #C5A05A;      /* 铜 */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.4);
  --shadow-md: 0 18px 40px -22px rgba(0,0,0,0.6);
  --radius: 2px;
  --radius-lg: 4px;
  --font-display: "Noto Serif SC", "Source Han Serif SC", "Songti SC", serif;
  --font-body: "Noto Sans SC", "PingFang SC", sans-serif;
  --font-num: "Space Mono", "JetBrains Mono", "EB Garamond", monospace;
  --bg-decor:
    linear-gradient(rgba(255,255,255,0.012) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(90deg, rgba(255,255,255,0.012) 1px, transparent 1px) 0 0 / 40px 40px,
    radial-gradient(ellipse 60% 50% at 80% 20%, rgba(224,78,44,0.06), transparent 70%);
}

/* ---------- THEME: glow (光感 — 冷调玻璃 + 电光蓝/青) ---------- */
.theme-glow {
  --bg: #E8ECF3;
  --bg-deep: #D8DEEA;
  --surface: rgba(255,255,255,0.62);
  --surface-2: rgba(255,255,255,0.42);
  --ink: #0F1424;
  --ink-soft: #3A435A;
  --ink-mute: #7A8298;
  --divider: rgba(15,20,36,0.10);
  --divider-soft: rgba(15,20,36,0.06);
  --accent: #1E40FF;        /* 电光蓝 */
  --accent-soft: #A8B4FF;
  --accent-2: #00B4D8;      /* 冷青 */
  --shadow-sm: 0 1px 2px rgba(30,40,80,0.05);
  --shadow-md: 0 18px 50px -22px rgba(40,60,180,0.30);
  --radius: 8px;
  --radius-lg: 18px;
  --font-display: "HarmonyOS Sans SC", "PingFang SC", "Noto Sans SC", sans-serif;
  --font-body: "HarmonyOS Sans SC", "PingFang SC", "Noto Sans SC", sans-serif;
  --font-num: "Space Grotesk", "HarmonyOS Sans SC", sans-serif;
  --bg-decor: radial-gradient(ellipse 60% 50% at 80% 10%, rgba(30,64,255,0.20), transparent 60%),
              radial-gradient(ellipse 70% 50% at 10% 90%, rgba(0,180,216,0.16), transparent 65%);
}

/* ---------- THEME: dream (梦境 — 改：冷雾烟青 + 铜光) ---------- */
.theme-dream {
  --bg: #E6E4DA;
  --bg-deep: #D6D4C8;
  --surface: rgba(255,255,255,0.55);
  --surface-2: rgba(255,255,255,0.35);
  --ink: #1F2228;
  --ink-soft: #51545B;
  --ink-mute: #8A8C8E;
  --divider: rgba(31,34,40,0.10);
  --divider-soft: rgba(31,34,40,0.05);
  --accent: #B05A2C;        /* 铜火 */
  --accent-soft: #DDB390;
  --accent-2: #486A6E;      /* 烟青 */
  --shadow-sm: 0 1px 2px rgba(40,40,40,0.04);
  --shadow-md: 0 20px 60px -25px rgba(60,60,60,0.35);
  --radius: 12px;
  --radius-lg: 22px;
  --font-display: "Noto Serif SC", "Source Han Serif SC", serif;
  --font-body: "Noto Sans SC", "PingFang SC", sans-serif;
  --font-num: "Cormorant Garamond", "Noto Serif SC", serif;
  --bg-decor: radial-gradient(ellipse 50% 40% at 75% 15%, rgba(176,90,44,0.18), transparent 65%),
              radial-gradient(ellipse 45% 35% at 15% 85%, rgba(72,106,110,0.20), transparent 65%),
              radial-gradient(ellipse 35% 30% at 85% 75%, rgba(140,130,110,0.18), transparent 65%);
}

/* ============================================================
   BASE
   ============================================================ */
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  background-image: var(--bg-decor);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-size: 15px;
  line-height: 1.55;
  letter-spacing: 0.01em;
  transition: background-color 0.4s ease, color 0.4s ease;
}

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 500; letter-spacing: 0.02em; }
.serif { font-family: var(--font-display); }
.num { font-family: var(--font-num); font-feature-settings: "tnum"; }

/* ============================================================
   LAYOUT
   ============================================================ */
.app {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 100vh;
}

.sidebar {
  border-right: 1px solid var(--divider);
  padding: 28px 18px 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--surface);
  backdrop-filter: blur(20px);
  position: sticky;
  top: 0;
  height: 100vh;
}
.theme-zen .sidebar { background: var(--surface); border-color: var(--divider); }

.brand {
  padding: 4px 10px 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-mark {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 1px solid var(--ink);
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--ink);
}
.theme-glow .brand-mark { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: white; border: none; }
.theme-dream .brand-mark { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: white; border: none; }
.theme-zen .brand-mark { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: var(--bg); border: none; }
.brand-name { font-family: var(--font-display); font-size: 15px; letter-spacing: 0.1em; }
.brand-sub { font-size: 10px; color: var(--ink-mute); letter-spacing: 0.3em; margin-top: 2px; }

.nav-section {
  display: flex; flex-direction: column; gap: 2px;
  margin-top: 8px;
}
.nav-label {
  font-size: 10px;
  letter-spacing: 0.3em;
  color: var(--ink-mute);
  padding: 12px 12px 8px;
  text-transform: uppercase;
}
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius);
  color: var(--ink-soft);
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.nav-item:hover { background: var(--surface-2); color: var(--ink); }
.nav-item.active {
  background: var(--surface-2);
  color: var(--ink);
}
.theme-zen .nav-item.active { background: transparent; color: var(--accent); }
.theme-zen .nav-item.active::before {
  content: ""; width: 2px; height: 16px; background: var(--accent);
  margin-left: -12px; margin-right: 10px;
}
.theme-glow .nav-item.active,
.theme-dream .nav-item.active { color: var(--accent); }
.nav-item .nav-icon { width: 16px; height: 16px; flex: none; opacity: 0.7; }
.nav-item .nav-cn { font-family: var(--font-display); }
.nav-item .nav-en { font-size: 10px; color: var(--ink-mute); letter-spacing: 0.2em; margin-left: auto; }

.sidebar-foot {
  margin-top: auto;
  padding: 12px;
  font-size: 11px;
  color: var(--ink-mute);
  letter-spacing: 0.1em;
  border-top: 1px solid var(--divider-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.sidebar-home-link {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-mute);
  text-decoration: none;
  transition: color 0.15s;
  letter-spacing: 0.15em;
}
.sidebar-home-link:hover { color: var(--accent); }
.sidebar-shichen {
  letter-spacing: 0.15em;
}

.main {
  padding: 32px 44px 80px;
  max-width: 1200px;
  width: 100%;
}

/* ============================================================
   PAGE HEADERS
   ============================================================ */
.page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 28px;
  gap: 20px;
}
.page-head-tag {
  font-size: 10px;
  letter-spacing: 0.4em;
  color: var(--ink-mute);
  text-transform: uppercase;
  margin-bottom: 8px;
  animation: page-head-arrive 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.page-head-title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1.2;
  animation: page-head-arrive 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.08s both;
}
.page-head-sub {
  margin-top: 8px;
  color: var(--ink-soft);
  font-size: 13px;
  max-width: 540px;
  animation: page-head-arrive 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.16s both;
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--surface);
  border: 1px solid var(--divider-soft);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}
.theme-glow .card,
.theme-dream .card {
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}
.theme-zen .card {
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  box-shadow: none;
}
.card-title {
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.2em;
  color: var(--ink-soft);
  margin-bottom: 14px;
  display: flex; align-items: center; justify-content: space-between;
}
.card-title .more {
  font-size: 11px; letter-spacing: 0.15em; color: var(--ink-mute); cursor: pointer;
}
.card-title .more:hover { color: var(--accent); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 22px;
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  letter-spacing: 0.1em;
  transition: all 0.15s;
}
.btn:hover { border-color: var(--ink); background: var(--surface-2); }
.btn-primary {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.theme-glow .btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border: none; color: white;
  box-shadow: 0 10px 30px -10px var(--accent);
}
.theme-dream .btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border: none; color: white;
  box-shadow: 0 12px 32px -12px var(--accent);
}
.theme-zen .btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border: none; color: white;
  box-shadow: 0 10px 28px -10px rgba(224,78,44,0.40);
}
.btn-primary:hover { transform: translateY(-1px); filter: brightness(1.05); }
.btn-ghost {
  background: transparent;
  border: 1px solid var(--divider);
}
.btn-pill { border-radius: 999px; }

/* ============================================================
   DASHBOARD — two-column hero layout
   ============================================================ */
.dash-hero {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 22px;
  margin-bottom: 0;
}

.hero-left {
  background: var(--surface);
  border: 1px solid var(--divider-soft);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  position: relative;
  overflow: hidden;
  animation: dash-section-arrive 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.theme-zen .hero-left { background: radial-gradient(ellipse 85% 65% at 50% 25%, rgba(197,160,90,0.07) 0%, var(--bg-deep) 72%); border-radius: var(--radius); border-color: var(--divider); }
.theme-glow .hero-left { backdrop-filter: blur(24px); background: linear-gradient(150deg, rgba(255,255,255,0.72) 0%, rgba(218,228,255,0.56) 100%); }
.theme-dream .hero-left { backdrop-filter: blur(24px); background: linear-gradient(150deg, rgba(255,255,255,0.64) 0%, rgba(255,243,228,0.52) 100%); }

.hero-meta {
  display: flex; align-items: center; gap: 10px;
  font-size: 10px; letter-spacing: 0.3em;
  color: var(--ink-mute); text-transform: uppercase;
  width: 100%; justify-content: center;
}
.hero-change {
  cursor: pointer; color: var(--ink-mute);
  transition: color 0.15s;
}
.hero-change:hover { color: var(--accent); }

.hero-glyph {
  font-family: var(--font-display);
  font-size: clamp(80px, 16vh, 160px);
  line-height: 1;
  color: var(--ink);
  letter-spacing: 0;
  user-select: none;
  white-space: nowrap;
  margin: 12px 0 4px;
  animation: glyph-float 5s ease-in-out infinite;
}
.hero-glyph.num { font-family: var(--font-num); }
.hero-glyph.color {
  width: clamp(80px, 16vh, 160px);
  height: clamp(80px, 16vh, 160px);
  border-radius: 50%;
  font-size: 0;
}
.hero-label {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 0.1em;
}
.hero-sub {
  font-size: 12px;
  color: var(--ink-mute);
  letter-spacing: 0.15em;
}

.hero-right {
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: dash-section-arrive 0.65s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both;
}
.hero-right .dash-grid-3 { margin-top: 0; }

/* Stat mini card */
.stat-mini {
  cursor: default;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.stat-mini:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--divider); }
.theme-zen .stat-mini:hover { box-shadow: 0 12px 36px -14px rgba(224,78,44,0.18); border-color: var(--divider); }
.stat-mini .stat-num {
  font-family: var(--font-num);
  font-size: 36px;
  line-height: 1;
}
.stat-mini .stat-unit {
  font-size: 14px;
  color: var(--ink-mute);
  margin-left: 4px;
}

/* Quick flows */
.quick-flows {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}
.flow-card {
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--divider-soft);
  border-left: 3px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.18s;
  animation: card-arrive 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.quick-flows .flow-card:nth-child(2) { animation-delay: 0.05s; }
.quick-flows .flow-card:nth-child(3) { animation-delay: 0.10s; }
.quick-flows .flow-card:nth-child(4) { animation-delay: 0.15s; }
.quick-flows .flow-card:nth-child(5) { animation-delay: 0.20s; }
.theme-zen .flow-card { border-radius: var(--radius); }
.theme-glow .flow-card, .theme-dream .flow-card { backdrop-filter: blur(24px); }
.flow-card:hover { border-color: var(--divider-soft); border-left-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.theme-zen .flow-card:hover   { background: rgba(224,78,44,0.05); }
.theme-glow .flow-card:hover  { background: rgba(30,64,255,0.04); }
.theme-dream .flow-card:hover { background: rgba(176,90,44,0.05); }
.flow-card .flow-icon {
  font-size: 18px;
  color: var(--ink-mute);
  line-height: 1;
  margin-bottom: 10px;
  transition: color 0.18s, transform 0.18s;
}
.flow-card:hover .flow-icon { color: var(--accent); transform: scale(1.15); }
.flow-card .flow-name {
  font-family: var(--font-display);
  font-size: 15px;
  margin-bottom: 4px;
}
.flow-card .flow-desc {
  font-size: 11px;
  color: var(--ink-mute);
  letter-spacing: 0.05em;
  line-height: 1.5;
}

/* dashboard greeting strip above hero */
.dash-greet {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 14px; margin-top: -8px;
  font-size: 11px; letter-spacing: 0.25em;
  color: var(--ink-mute); text-transform: uppercase;
}
.dash-greet .title {
  font-family: var(--font-display);
  font-size: 18px; letter-spacing: 0.08em;
  color: var(--ink); text-transform: none;
}

/* auxiliary cards row — small + compact */
.dash-aux {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.2fr;
  gap: 14px;
  margin-top: 14px;
}
.aux-card {
  background: var(--surface);
  border: 1px solid var(--divider-soft);
  border-radius: var(--radius);
  padding: 14px 16px;
  min-height: 0;
}
.theme-glow .aux-card,
.theme-dream .aux-card { backdrop-filter: blur(24px); }
.aux-card .aux-label {
  font-size: 9px; letter-spacing: 0.3em;
  color: var(--ink-mute); text-transform: uppercase;
  margin-bottom: 8px;
}
.aux-card .aux-row {
  display: flex; align-items: baseline; gap: 8px;
  margin-bottom: 4px;
}
.aux-card .aux-num {
  font-family: var(--font-num); font-size: 28px; line-height: 1;
}
.aux-card .aux-unit { font-size: 11px; color: var(--ink-mute); letter-spacing: 0.15em; }
.aux-card .aux-meta { font-size: 11px; color: var(--ink-soft); letter-spacing: 0.1em; }

.streak-mini-bars { display: flex; gap: 3px; margin-top: 8px; }
.streak-mini-bars .b {
  flex: 1; height: 16px;
  background: var(--divider-soft); border-radius: 2px;
}
.streak-mini-bars .b.on { background: var(--accent); opacity: 0.85; }
.streak-mini-bars .b.today { outline: 1px solid var(--ink); outline-offset: 1px; }

.aux-curve { width: 100%; height: 44px; display: block; margin-top: 6px; }

.aux-recent { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.aux-recent .row {
  display: grid; grid-template-columns: 22px 1fr auto;
  gap: 8px; font-size: 11px; align-items: center;
}
.aux-recent .row .g {
  width: 22px; height: 22px; border-radius: 50%;
  border: 1px solid var(--divider-soft);
  display: grid; place-items: center;
  font-family: var(--font-display); font-size: 12px;
  color: var(--ink-soft);
}
.aux-recent .row .g.num { font-family: var(--font-num); }
.aux-recent .row .t { color: var(--ink-soft); letter-spacing: 0.05em; }
.aux-recent .row .s { color: var(--accent); font-size: 10px; letter-spacing: 0.1em; }
.dash-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 22px;
}
.dash-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 22px;
}
.dash-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-top: 22px;
}

/* Today hero card */
.hero {
  position: relative;
  overflow: hidden;
  padding: 32px;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.hero-eye {
  position: absolute;
  right: -40px; top: -20px;
  width: 280px; height: 280px;
  border-radius: 50%;
  border: 1px solid var(--divider);
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-size: 120px;
  color: var(--accent);
  opacity: 0.32;
}
.theme-glow .hero-eye {
  background: radial-gradient(circle at 30% 30%, var(--accent-soft), transparent 70%);
  border: none; opacity: 0.6;
}
.theme-dream .hero-eye {
  background: radial-gradient(circle at 30% 30%, var(--accent-soft), transparent 70%);
  border: none; opacity: 0.7;
}
.hero-tag { font-size: 10px; letter-spacing: 0.4em; color: var(--ink-mute); text-transform: uppercase; }
.hero-title { font-family: var(--font-display); font-size: 28px; line-height: 1.4; margin-top: 6px; max-width: 60%; }
.hero-meta {
  display: flex; gap: 24px; margin-top: 18px;
  font-size: 12px; color: var(--ink-soft);
  letter-spacing: 0.1em;
}
.hero-meta span { display: flex; align-items: center; gap: 6px; }
.hero-meta b { font-family: var(--font-num); font-weight: 500; color: var(--ink); font-size: 14px; }
.hero-cta { display: flex; gap: 10px; margin-top: 24px; }

/* Streak card */
.streak-num {
  font-family: var(--font-num);
  font-size: 64px;
  line-height: 1;
  color: var(--ink);
  margin-bottom: 6px;
}
.theme-zen .streak-num  { background: linear-gradient(135deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.theme-glow .streak-num { background: linear-gradient(135deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.theme-dream .streak-num { background: linear-gradient(135deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.streak-label { font-size: 11px; color: var(--ink-mute); letter-spacing: 0.3em; }
.streak-bars {
  display: flex; gap: 4px; margin-top: 18px;
}
.streak-bar {
  flex: 1;
  height: 32px;
  border-radius: 3px;
  background: var(--divider-soft);
  position: relative;
}
.streak-bar.on { background: var(--accent); opacity: 0.85; }
.streak-bar.today { outline: 1px solid var(--ink); outline-offset: 2px; }
.streak-bar-labels { display: flex; gap: 4px; margin-top: 6px; font-size: 10px; color: var(--ink-mute); }
.streak-bar-labels span { flex: 1; text-align: center; letter-spacing: 0.15em; }

/* Mini stat row */
.stat-row { display: flex; align-items: baseline; justify-content: space-between; padding: 12px 0; border-bottom: 1px dashed var(--divider-soft); }
.stat-row:last-child { border-bottom: none; }
.stat-row .k { font-size: 12px; color: var(--ink-soft); letter-spacing: 0.1em; }
.stat-row .v { font-family: var(--font-num); font-size: 18px; color: var(--ink); }

/* Quick start chips */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.quick-tile {
  padding: 18px 14px;
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  background: var(--surface);
  display: flex; flex-direction: column;
  align-items: flex-start; gap: 8px;
  cursor: pointer;
  transition: all 0.18s;
  min-height: 110px;
  text-align: left;
}
.quick-tile:hover { border-color: var(--accent); transform: translateY(-2px); }
.theme-zen .quick-tile:hover { background: rgba(224,78,44,0.05); }
.quick-tile .glyph {
  font-family: var(--font-display);
  font-size: 32px;
  color: var(--ink);
  line-height: 1;
}
.theme-glow .quick-tile .glyph { color: var(--accent); }
.theme-dream .quick-tile .glyph { color: var(--accent); }
.theme-zen .quick-tile .glyph { color: var(--accent); }
.quick-tile .label { font-size: 13px; color: var(--ink-soft); letter-spacing: 0.1em; }
.quick-tile .count { font-size: 10px; color: var(--ink-mute); letter-spacing: 0.2em; margin-top: auto; }

/* Clarity curve */
.curve-wrap { padding: 4px 0 0; }
.curve-svg { width: 100%; height: 140px; display: block; }
.curve-legend { display: flex; justify-content: space-between; margin-top: 8px; font-size: 10px; color: var(--ink-mute); letter-spacing: 0.2em; }

/* Recent log items */
.log-item { display: grid; grid-template-columns: 44px 1fr auto; gap: 14px; padding: 12px 0; border-bottom: 1px dashed var(--divider-soft); align-items: center; }
.log-item:last-child { border-bottom: none; }
.log-item .glyph {
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--divider);
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--ink);
  background: var(--surface-2);
}
.log-item .meta { display: flex; flex-direction: column; gap: 2px; }
.log-item .meta .title { font-size: 13px; }
.log-item .meta .sub { font-size: 11px; color: var(--ink-mute); letter-spacing: 0.1em; }
.log-item .stars { font-size: 12px; color: var(--accent); letter-spacing: 0.1em; }

/* ============================================================
   PRACTICE ROOM — 舞台至上版
   ============================================================ */
.practice-room {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: -8px;
}
.practice-topbar {
  display: flex; align-items: center; gap: 16px;
  font-size: 11px;
  letter-spacing: 0.25em;
  color: var(--ink-mute);
  text-transform: uppercase;
}
.practice-topbar .obj-name {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.1em;
  text-transform: none;
}
.practice-topbar .sep { width: 24px; height: 1px; background: var(--divider); }
.practice-topbar .right { margin-left: auto; display: flex; gap: 16px; }

.big-stage {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--divider-soft);
  border-radius: var(--radius-lg);
  overflow: hidden;
  height: calc(100vh - 240px);
  min-height: 560px;
  display: grid;
  place-items: center;
  animation: stage-arrive 0.4s ease both;
}
@keyframes stage-arrive {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.theme-glow .big-stage,
.theme-dream .big-stage {
  backdrop-filter: blur(24px);
}
.big-stage.dark { background: #050608; }
.theme-zen .big-stage { background: var(--bg-deep); }
.theme-zen .big-stage:not(.dark) { background: radial-gradient(ellipse 70% 60% at 50% 47%, rgba(197,160,90,0.045) 0%, var(--bg-deep) 62%); }
.theme-dream .big-stage:not(.dark) {
  background: linear-gradient(150deg, rgba(255,255,255,0.60) 0%, rgba(255,240,218,0.52) 100%);
}
.theme-glow .big-stage:not(.dark) {
  background: linear-gradient(150deg, rgba(255,255,255,0.70) 0%, rgba(224,235,255,0.56) 100%);
}

.practice-glyph {
  font-family: var(--font-display);
  font-size: clamp(280px, 56vh, 640px);
  line-height: 0.92;
  color: var(--ink);
  user-select: none;
  letter-spacing: 0;
  white-space: nowrap;
  transition: opacity 0.6s ease, transform 0.6s ease, filter 0.6s ease;
  animation: glyph-summon 0.8s cubic-bezier(0.22, 1, 0.36, 1) both,
             glyph-float 7s ease-in-out 0.9s infinite;
  position: relative;
  z-index: 2;
}
.practice-glyph.num { font-family: var(--font-num); font-size: clamp(240px, 48vh, 540px); font-weight: 400; }
.practice-glyph.symbol { font-size: clamp(220px, 46vh, 500px); }
.practice-glyph.seed {
  font-family: "Noto Serif Devanagari", "Noto Sans Devanagari", "Adobe Devanagari", serif;
  font-size: clamp(260px, 50vh, 580px);
  padding-top: 0.12em;
}
.theme-glow .practice-glyph.seed,
.theme-dream .practice-glyph.seed {
  font-family: "Noto Sans Devanagari", "Noto Serif Devanagari", "Adobe Devanagari", sans-serif;
}

/* Devanagari helper — apply to any element rendering Sanskrit */
.devanagari {
  font-family: "Noto Serif Devanagari", "Noto Sans Devanagari", "Adobe Devanagari", serif;
  letter-spacing: 0;
}
.theme-glow .devanagari, .theme-dream .devanagari {
  font-family: "Noto Sans Devanagari", "Noto Serif Devanagari", "Adobe Devanagari", sans-serif;
}
.lib-card.seed .glyph { font-family: "Noto Serif Devanagari", "Noto Sans Devanagari", serif; font-size: 64px; padding-top: 0.18em; line-height: 1; }
.theme-glow .lib-card.seed .glyph, .theme-dream .lib-card.seed .glyph { font-family: "Noto Sans Devanagari", "Noto Serif Devanagari", sans-serif; }
.obj-chip.seed { font-family: "Noto Serif Devanagari", "Noto Sans Devanagari", serif; font-size: 18px; }
.theme-glow .obj-chip.seed, .theme-dream .obj-chip.seed { font-family: "Noto Sans Devanagari", "Noto Serif Devanagari", sans-serif; }
.hero-glyph.seed, .quick-tile .glyph.seed { font-family: "Noto Serif Devanagari", "Noto Sans Devanagari", serif; padding-top: 0.12em; }
.theme-glow .hero-glyph.seed, .theme-dream .hero-glyph.seed { font-family: "Noto Sans Devanagari", "Noto Serif Devanagari", sans-serif; }
.big-stage.dark .practice-glyph { color: #F2EBD8; }
.practice-glyph.fade-out { animation: glyph-fade-out 0.7s ease both; }

.afterimage-ring {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: clamp(360px, 68vh, 760px);
  height: clamp(360px, 68vh, 760px);
  border-radius: 50%;
  border: 1px dashed var(--ink-mute);
  opacity: 0.08;
  pointer-events: none;
  z-index: 1;
}

.stage-corner {
  position: absolute;
  top: 18px; right: 22px;
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-num);
  font-size: 14px;
  color: var(--ink-mute);
  letter-spacing: 0.1em;
  z-index: 3;
}
.big-stage.dark .stage-corner { color: rgba(232,223,201,0.5); }
.stage-corner .ring-mini {
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 1px solid currentColor;
  position: relative;
}
.stage-corner .ring-mini::after {
  content: ""; position: absolute; inset: 2px;
  border-radius: 50%;
  background: var(--accent);
  transform-origin: center;
  transform: scale(var(--p, 1));
  transition: transform 0.4s ease;
}

/* Readout strip — instructions live OUTSIDE the stage, small */
.stage-readout {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  padding: 0 4px;
  font-size: 11px;
  color: var(--ink-mute);
  letter-spacing: 0.2em;
}
.stage-readout .step-label {
  color: var(--accent);
  font-weight: 500;
  text-transform: uppercase;
  margin-right: 12px;
}
.stage-readout .step-tip {
  color: var(--ink-soft);
  letter-spacing: 0.1em;
  text-transform: none;
  font-size: 11px;
}
.stage-readout .step-dots-row { display: flex; gap: 5px; align-items: center; }
.stage-readout .step-dots-row .dot {
  width: 5px; height: 5px; border-radius: 50%; background: var(--divider);
}
.stage-readout .step-dots-row .dot.on { background: var(--accent); }
.readout-content { animation: step-arrive 0.4s cubic-bezier(0.22, 1, 0.36, 1) both; }
.stage-readout .seq {
  font-family: var(--font-num);
  font-size: 11px;
  letter-spacing: 0.1em;
  margin-right: 12px;
}

/* Compact horizontal controls — at bottom */
.practice-controls {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 14px;
  align-items: stretch;
  margin-top: 4px;
  animation: dash-section-arrive 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
}
.ctrl-block {
  padding: 8px 12px;
  background: var(--surface);
  border: 1px solid var(--divider-soft);
  border-radius: var(--radius);
  display: flex; flex-direction: column; gap: 4px;
  min-width: 0;
}
.ctrl-label {
  font-size: 9px;
  letter-spacing: 0.3em;
  color: var(--ink-mute);
  text-transform: uppercase;
}
.ctrl-row { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }

.mini-pill {
  padding: 4px 10px;
  font-size: 11px;
  letter-spacing: 0.1em;
  border-radius: 999px;
  border: 1px solid var(--divider);
  background: var(--surface-2);
  color: var(--ink-soft);
  cursor: pointer;
  white-space: nowrap;
}
.mini-pill:hover { color: var(--ink); border-color: var(--ink-mute); }
.mini-pill.active { background: var(--accent); border-color: var(--accent); color: white; }
.theme-zen .mini-pill.active { color: var(--bg); }

.obj-strip {
  display: flex; gap: 6px;
  overflow-x: auto;
  scrollbar-width: thin;
  padding-bottom: 2px;
}
.obj-strip::-webkit-scrollbar { height: 4px; }
.obj-strip::-webkit-scrollbar-thumb { background: var(--divider); border-radius: 999px; }
.obj-chip {
  flex: none;
  width: 38px; height: 38px;
  border-radius: var(--radius);
  border: 1px solid var(--divider);
  background: var(--surface-2);
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.15s;
}
.obj-chip.num { font-family: var(--font-num); font-size: 17px; }
.obj-chip:hover { border-color: var(--ink-soft); }
.obj-chip.active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.theme-zen .obj-chip.active   { background: rgba(224,78,44,0.10); }
.theme-glow .obj-chip.active  { background: rgba(30,64,255,0.06); }
.theme-dream .obj-chip.active { background: rgba(176,90,44,0.08); }
.obj-chip.color-chip { font-size: 0; padding: 4px; }
.obj-chip.color-chip > div {
  width: 100%; height: 100%; border-radius: 50%;
}

.flow-chips { display: flex; flex-direction: column; gap: 3px; }
.flow-chip {
  padding: 4px 10px;
  font-size: 11px;
  letter-spacing: 0.1em;
  border-radius: var(--radius);
  border: 1px solid var(--divider);
  background: var(--surface-2);
  color: var(--ink-soft);
  cursor: pointer;
  white-space: nowrap;
  text-align: left;
}
.flow-chip:hover { color: var(--ink); }
.flow-chip.active { border-color: var(--accent); color: var(--ink); background: var(--surface); }
.theme-zen .flow-chip.active   { background: rgba(224,78,44,0.10); }
.theme-glow .flow-chip.active  { background: rgba(30,64,255,0.08); }
.theme-dream .flow-chip.active { background: rgba(176,90,44,0.10); }

.action-block {
  display: flex; flex-direction: column; gap: 4px; align-items: stretch;
  justify-content: center;
  padding: 4px 0;
}
.action-block .btn { padding: 8px 18px; font-size: 12px; letter-spacing: 0.15em; }
.action-block .small-row { display: flex; gap: 4px; }
.action-block .small-row .btn { padding: 6px 10px; font-size: 11px; letter-spacing: 0.1em; flex: 1; }

/* Closed-eyes — covers stage, no labels inside */
.eyes-closed-full {
  position: absolute; inset: 0;
  background: radial-gradient(circle at center, #1a1612 0%, #050505 80%);
  display: grid; place-items: center;
  animation: eyes-arrive 0.9s ease both, breathe 4s ease-in-out 0.9s infinite;
}
.eyes-closed-full .ring {
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 50%; position: absolute;
}
/* staggered ripple: innermost ring leads, outer rings follow */
.eyes-closed-full .ring:nth-child(3) { animation: ring-ripple 6s ease-in-out infinite; }
.eyes-closed-full .ring:nth-child(2) { animation: ring-ripple 6s ease-in-out 1.2s infinite; }
.eyes-closed-full .ring:nth-child(1) { animation: ring-ripple 6s ease-in-out 2.4s infinite; }
.eyes-closed-full .glow-orb {
  width: 240px; height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232,223,201,0.7), rgba(232,223,201,0) 70%);
  animation: pulse 6s ease-in-out infinite;
}
.theme-glow .eyes-closed-full {
  background: radial-gradient(circle at center, #0c1020 0%, #03050c 80%);
}
.theme-glow .eyes-closed-full .ring {
  border-color: rgba(120, 160, 255, 0.12);
}
.theme-glow .eyes-closed-full .glow-orb {
  background: radial-gradient(circle, rgba(140, 190, 255, 0.60), rgba(60, 120, 255, 0) 70%);
}
.theme-glow .big-stage.dark .stage-corner { color: rgba(140, 190, 255, 0.50); }
.theme-dream .eyes-closed-full {
  background: radial-gradient(circle at center, #1e1209 0%, #060302 80%);
}
.theme-dream .eyes-closed-full .ring {
  border-color: rgba(240, 210, 175, 0.12);
}
.theme-dream .eyes-closed-full .glow-orb {
  background: radial-gradient(circle, rgba(255, 185, 100, 0.55), rgba(170, 80, 20, 0) 70%);
}

/* Rate view inside stage — visually quiet */
.rate-center { text-align: center; }
.rate-center .rate-prompt {
  font-size: 11px; letter-spacing: 0.4em;
  color: var(--ink-mute); text-transform: uppercase;
  margin-bottom: 24px;
  animation: rate-arrive 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.rate-center .rating {
  justify-content: center;
  animation: rate-arrive 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.18s both;
}
.rate-center .rating .star {
  width: 52px; height: 52px;
  border-radius: 50%;
  font-size: 22px;
}
.rate-center .rate-readback {
  font-family: var(--font-display);
  font-size: 28px;
  margin-top: 28px;
  letter-spacing: 0.05em;
  animation: rate-arrive 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.38s both;
}

/* Completed view inside stage */
.complete-center { text-align: center; }
.complete-center .label {
  font-size: 11px; letter-spacing: 0.4em;
  color: var(--ink-mute); text-transform: uppercase;
  margin-bottom: 18px;
  animation: complete-arrive 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.complete-center .big {
  font-family: var(--font-display);
  font-size: 96px;
  line-height: 1;
  margin-bottom: 24px;
  animation: complete-arrive 1.0s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both,
             glyph-float 6s ease-in-out 1.2s infinite;
}
.complete-center .meta {
  font-size: 13px;
  color: var(--ink-soft);
  letter-spacing: 0.1em;
  animation: complete-arrive 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.4s both;
}
.complete-center .seq-answer {
  animation: none;
}
.theme-glow .complete-center .big {
  text-shadow: 0 0 80px rgba(30, 64, 255, 0.14), 0 8px 40px rgba(30, 64, 255, 0.08);
}
.theme-dream .complete-center .big {
  text-shadow: 0 0 80px rgba(176, 90, 44, 0.18), 0 8px 40px rgba(176, 90, 44, 0.10);
}
.theme-zen .complete-center .big {
  text-shadow: 0 0 80px rgba(224, 78, 44, 0.22), 0 8px 40px rgba(224, 78, 44, 0.14);
}

/* FULLSCREEN immersive */
.big-stage.fullscreen {
  position: fixed;
  inset: 0;
  height: 100vh;
  min-height: 100vh;
  width: 100vw;
  border-radius: 0;
  border: none;
  z-index: 1000;
}
.big-stage.fullscreen .practice-glyph {
  font-size: clamp(360px, 72vh, 880px);
}
.big-stage.fullscreen .practice-glyph.num { font-size: clamp(320px, 64vh, 780px); }
.big-stage.fullscreen .practice-glyph.symbol { font-size: clamp(300px, 60vh, 720px); }
.big-stage.fullscreen .afterimage-ring {
  width: clamp(500px, 80vh, 960px);
  height: clamp(500px, 80vh, 960px);
}
.fs-toggle {
  position: absolute; top: 22px; right: 22px;
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border-radius: 4px;
  color: var(--ink-mute);
  font-size: 14px;
  cursor: pointer;
  z-index: 4;
  transition: all 0.15s;
  background: transparent;
  border: 1px solid var(--divider-soft);
}
.fs-toggle:hover { background: var(--surface-2); color: var(--ink); border-color: var(--ink-soft); }
.big-stage.fullscreen .fs-toggle {
  color: rgba(255,255,255,0.4);
  border-color: rgba(255,255,255,0.10);
  top: 28px; right: 28px;
}
.big-stage.fullscreen .fs-toggle:hover { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.85); }
.big-stage.fullscreen .stage-corner {
  top: 28px; right: 70px;
  color: rgba(255,255,255,0.45);
}
.big-stage.fullscreen .stage-corner .ring-mini::after { background: var(--accent); }

.fs-step {
  position: absolute;
  bottom: 28px; left: 28px;
  font-size: 11px;
  letter-spacing: 0.3em;
  color: rgba(255,255,255,0.45);
  text-transform: uppercase;
  z-index: 4;
}
.fs-step .label { color: var(--accent); margin-right: 14px; }
.fs-step .tip { color: rgba(255,255,255,0.32); letter-spacing: 0.1em; text-transform: none; }
.big-stage:not(.fullscreen) .fs-step { display: none; }

.fs-controls {
  position: absolute;
  bottom: 28px; right: 28px;
  display: flex; gap: 8px;
  z-index: 4;
}
.fs-controls .fs-btn {
  padding: 8px 18px;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: rgba(255,255,255,0.7);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 2px;
  background: rgba(255,255,255,0.04);
  cursor: pointer;
}
.fs-controls .fs-btn:hover { background: rgba(255,255,255,0.10); color: white; }
.fs-controls .fs-btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}
.big-stage:not(.fullscreen) .fs-controls { display: none; }

.rating { display: flex; gap: 8px; }
.rating .star {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border: 1px solid var(--divider);
  border-radius: 4px;
  color: var(--ink-mute);
  font-size: 14px;
  cursor: pointer;
}
.rating .star:hover { border-color: var(--accent); color: var(--accent); }
.rating .star.on { background: var(--accent); border-color: var(--accent); color: white; }
.theme-zen .rating .star.on { background: var(--accent); color: var(--surface); }

@keyframes breathe {
  0%, 100% { filter: brightness(0.95); }
  50% { filter: brightness(1.05); }
}
@keyframes pulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 0.85; transform: scale(1.08); }
}
@keyframes ring-ripple {
  0%, 100% { opacity: 0.08; transform: scale(1); }
  40%       { opacity: 0.22; transform: scale(1.03); }
  70%       { opacity: 0.06; transform: scale(0.98); }
}
@keyframes glyph-summon {
  from { opacity: 0; transform: scale(0.96); filter: blur(10px); }
  to   { opacity: 1; transform: scale(1);    filter: blur(0); }
}
@keyframes complete-arrive {
  from { opacity: 0; transform: scale(0.86); filter: blur(8px); }
  to   { opacity: 1; transform: scale(1);    filter: blur(0); }
}
@keyframes rate-arrive {
  from { opacity: 0; transform: translateY(14px); filter: blur(4px); }
  to   { opacity: 1; transform: translateY(0);    filter: blur(0); }
}
@keyframes glyph-float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-5px); }
}
@keyframes glyph-fade-out {
  to { opacity: 0; transform: scale(1.14); filter: blur(44px); }
}
@keyframes item-arrive {
  from { opacity: 0; transform: translateY(8px) scale(0.88); }
  to   { opacity: 1; transform: translateY(0)   scale(1); }
}
@keyframes counter-flash {
  from { opacity: 0; transform: translateX(-50%) scale(0.75); }
  to   { opacity: 1; transform: translateX(-50%) scale(1); }
}
@keyframes today-pulse {
  0%, 100% { outline-offset: 2px; }
  50%       { outline-offset: 4px; }
}
@keyframes card-arrive {
  from { opacity: 0; transform: translateY(10px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)     scale(1); }
}
@keyframes eyes-arrive {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes step-arrive {
  from { opacity: 0; transform: translateX(-8px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes dash-section-arrive {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes page-head-arrive {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Dashboard bottom card stagger */
.dash-view > *:nth-child(3) { animation: dash-section-arrive 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.30s both; }
.dash-view > *:nth-child(4) { animation: dash-section-arrive 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.45s both; }

/* Dashboard streak bars */
@keyframes bar-arrive {
  from { opacity: 0; transform: translateY(4px) scaleY(0.6); }
  to   { opacity: 1; transform: translateY(0)   scaleY(1); }
}
.dash-sbar {
  height: 28px;
  border-radius: 4px;
  background: var(--divider-soft);
  opacity: 0.45;
  margin-bottom: 4px;
  transform-origin: bottom;
  animation: bar-arrive 0.38s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.dash-sbar.active { background: var(--accent); opacity: 1; }
.theme-zen .dash-sbar.active { box-shadow: 0 0 12px rgba(224,78,44,0.30), 0 2px 6px rgba(224,78,44,0.20); }
.dash-sbar.today {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  animation: today-pulse 2.8s ease-in-out infinite;
}
.dash-sbar.today.active {
  outline-color: var(--ink);
  outline-offset: 3px;
}
.theme-glow .dash-sbar  { border-radius: 8px; }
.theme-dream .dash-sbar { border-radius: 10px; }
.theme-glow .streak-bar   { border-radius: 8px; }
.theme-dream .streak-bar  { border-radius: 10px; }
.theme-glow .cal-cell     { border-radius: 4px; }
.theme-dream .cal-cell    { border-radius: 5px; }

/* Journal staggered entry */
.journal-view > *:nth-child(2) { animation: dash-section-arrive 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both; }
.journal-view > *:nth-child(3) { animation: dash-section-arrive 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.26s both; }
.journal-view > *:nth-child(4) { animation: dash-section-arrive 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.40s both; }
.journal-view > *:nth-child(5) { animation: dash-section-arrive 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.52s both; }

/* Library info row re-animates on tab switch */
.lib-info-row .card {
  animation: card-arrive 0.3s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.lib-info-row .card:nth-child(2) { animation-delay: 0.06s; }

/* ============================================================
   LIBRARY
   ============================================================ */
.lib-tabs {
  display: flex; gap: 4px;
  border-bottom: 1px solid var(--divider);
  margin-bottom: 24px;
}
.lib-tab {
  padding: 12px 18px;
  cursor: pointer;
  font-size: 13px;
  letter-spacing: 0.15em;
  color: var(--ink-soft);
  font-family: var(--font-display);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.lib-tab:hover { color: var(--ink); }
.lib-tab.active { color: var(--ink); border-bottom-color: var(--accent); }
.lib-tab .en { font-size: 10px; color: var(--ink-mute); letter-spacing: 0.3em; margin-left: 6px; font-family: var(--font-body); }

.lib-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px;
}
.lib-card {
  aspect-ratio: 1/1;
  background: var(--surface);
  border: 1px solid var(--divider-soft);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center; justify-content: center;
  gap: 8px;
  position: relative;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
  padding: 16px;
  animation: card-arrive 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.lib-grid .lib-card:nth-child(2)   { animation-delay: 0.04s; }
.lib-grid .lib-card:nth-child(3)   { animation-delay: 0.08s; }
.lib-grid .lib-card:nth-child(4)   { animation-delay: 0.12s; }
.lib-grid .lib-card:nth-child(5)   { animation-delay: 0.16s; }
.lib-grid .lib-card:nth-child(6)   { animation-delay: 0.20s; }
.lib-grid .lib-card:nth-child(7)   { animation-delay: 0.24s; }
.lib-grid .lib-card:nth-child(8)   { animation-delay: 0.28s; }
.lib-grid .lib-card:nth-child(n+9) { animation-delay: 0.32s; }
.theme-zen .lib-card { border-radius: var(--radius); }
.theme-glow .lib-card, .theme-dream .lib-card { backdrop-filter: blur(24px); }
.lib-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.theme-zen .lib-card:hover { box-shadow: 0 18px 44px -18px rgba(224,78,44,0.22); }
.lib-card .glyph {
  font-family: var(--font-display);
  font-size: 56px;
  color: var(--ink);
  line-height: 1;
  white-space: nowrap;
  transition: text-shadow 0.22s ease;
}
.theme-zen .lib-card .glyph { text-shadow: 0 0 28px rgba(197,160,90,0.15), 0 0 12px rgba(224,78,44,0.07); }
.theme-zen .lib-card:hover .glyph { text-shadow: 0 0 36px rgba(197,160,90,0.28), 0 0 18px rgba(224,78,44,0.14); }
.lib-card.num .glyph { font-family: var(--font-num); }
.lib-card.symbol .glyph { font-size: 48px; }
.lib-card .label { font-size: 11px; color: var(--ink-mute); letter-spacing: 0.2em; font-family: var(--font-body); }
.lib-card .romaji { font-size: 9px; color: var(--ink-mute); letter-spacing: 0.3em; text-transform: uppercase; }
.lib-card.color .glyph { width: 56px; height: 56px; border-radius: 50%; font-size: 0; }
.lib-card.color .glyph.white { background: radial-gradient(circle, #fff, #f3eedf 70%); box-shadow: 0 0 30px rgba(255,255,255,0.8); border: 1px solid var(--divider); }
.lib-card.color .glyph.gold { background: radial-gradient(circle, #FFE7A8, #C99746); box-shadow: 0 0 30px rgba(229,180,90,0.5); }
.lib-card.color .glyph.blue { background: radial-gradient(circle, #B9DDFF, #3F7AC2); box-shadow: 0 0 30px rgba(80,130,200,0.5); }
.lib-card.color .glyph.red { background: radial-gradient(circle, #FFC6BA, #C44B3E); box-shadow: 0 0 30px rgba(200,80,60,0.5); }
.lib-card.color .glyph.green { background: radial-gradient(circle, #C8E3BD, #5A8C49); box-shadow: 0 0 30px rgba(110,160,80,0.5); }
.lib-card.color .glyph.violet { background: radial-gradient(circle, #DBC9F0, #7B5BB8); box-shadow: 0 0 30px rgba(140,100,200,0.5); }

.lib-card.imagery .glyph { font-size: 38px; }

/* ============================================================
   JOURNAL
   ============================================================ */
.cal-grid {
  display: grid;
  grid-template-columns: repeat(20, 1fr);
  gap: 4px;
  margin-top: 12px;
}
.cal-cell {
  aspect-ratio: 1;
  border-radius: 3px;
  background: var(--divider-soft);
  transition: transform 0.12s ease, opacity 0.12s ease;
  cursor: default;
  position: relative;
}
.cal-cell:hover { transform: scale(1.5); opacity: 1 !important; z-index: 1; }
.cal-cell.l1 { background: var(--accent-soft); }
.cal-cell.l2 { background: var(--accent); opacity: 0.6; }
.cal-cell.l3 { background: var(--accent); opacity: 0.85; }
.cal-cell.l4 { background: var(--accent); }
.theme-zen .cal-cell.l1 { background: rgba(197,160,90,0.55); }
.cal-cell.today { outline: 2px solid var(--accent); outline-offset: 2px; z-index: 1; position: relative; animation: today-pulse 2.8s ease-in-out infinite; }
.cal-legend { display: flex; align-items: center; gap: 6px; margin-top: 12px; font-size: 10px; color: var(--ink-mute); letter-spacing: 0.2em; }
.cal-legend .swatch { width: 12px; height: 12px; border-radius: 3px; }

.session-list { display: flex; flex-direction: column; }
.session {
  display: grid;
  grid-template-columns: 60px 1fr auto auto;
  gap: 16px;
  padding: 16px 6px;
  border-bottom: 1px solid var(--divider-soft);
  align-items: center;
  transition: background 0.12s;
  border-radius: var(--radius);
}
.session:last-child { border-bottom: none; }
.session:hover { background: var(--surface-2); }
.session .date {
  font-family: var(--font-num);
  font-size: 24px;
  line-height: 1;
  text-align: center;
  transition: color 0.12s;
}
.session .date .m { display: block; font-size: 10px; letter-spacing: 0.3em; color: var(--ink-mute); margin-top: 4px; font-family: var(--font-body); }
.session .info .title { font-size: 14px; font-family: var(--font-display); }
.session .info .sub { font-size: 11px; color: var(--ink-mute); letter-spacing: 0.1em; margin-top: 4px; }
.session .duration { font-family: var(--font-num); font-size: 16px; color: var(--ink-soft); }
.session .stars { color: var(--accent); font-size: 13px; letter-spacing: 0.15em; }
.session-today { box-shadow: inset 2px 0 0 var(--accent); }
.session-today .date { color: var(--accent); }
.session-today .date .m { opacity: 0.75; }

/* ============================================================
   TWEAKS-INDEPENDENT NUMERIC GLYPHS
   ============================================================ */
.glow-text {
  text-shadow: 0 0 30px var(--accent-soft);
}
.theme-glow .practice-glyph { text-shadow: 0 0 40px var(--accent-soft); }
.theme-dream .practice-glyph { color: var(--ink); text-shadow: 0 0 80px rgba(176,90,44,0.13), 0 0 40px rgba(176,90,44,0.07); }
.theme-zen .practice-glyph { text-shadow: 0 0 120px rgba(197,160,90,0.14), 0 0 60px rgba(224,78,44,0.07); }
.theme-zen .hero-glyph  { text-shadow: 0 0 80px rgba(197,160,90,0.12), 0 0 40px rgba(224,78,44,0.06); }
.theme-glow .hero-glyph { text-shadow: 0 0 60px rgba(168,180,255,0.18); }
.theme-dream .hero-glyph { text-shadow: 0 0 60px rgba(176,90,44,0.10), 0 0 30px rgba(176,90,44,0.06); }

/* SVG symbol */
.sym-svg { width: 1em; height: 1em; }

.muted { color: var(--ink-mute); }
.center { text-align: center; }
.divider-h { height: 1px; background: var(--divider-soft); margin: 18px 0; }

/* Sequence memory counter & recall hint */
.seq-counter {
  position: absolute;
  bottom: 28px; left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-num);
  font-size: 22px;
  letter-spacing: 0.2em;
  color: var(--ink-mute);
  z-index: 3;
  pointer-events: none;
  animation: counter-flash 0.32s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.big-stage.dark .seq-counter { color: rgba(255,255,255,0.35); }

.seq-recall-hint {
  position: absolute;
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: 0.4em;
  color: rgba(255,255,255,0.3);
  z-index: 3;
  pointer-events: none;
}

.seq-answer {
  display: flex;
  gap: 18px;
  margin-top: 28px;
  justify-content: center;
  flex-wrap: wrap;
}
.seq-answer-item {
  font-family: var(--font-display);
  font-size: 36px;
  color: var(--ink);
  line-height: 1;
  animation: item-arrive 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
  padding: 12px 16px;
  background: var(--surface-2);
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  min-width: 52px;
  text-align: center;
}
.theme-glow .seq-answer-item,
.theme-dream .seq-answer-item { backdrop-filter: blur(12px); }
.seq-answer-item:nth-child(1) { animation-delay: 0.65s; }
.seq-answer-item:nth-child(2) { animation-delay: 0.82s; }
.seq-answer-item:nth-child(3) { animation-delay: 0.99s; }
.seq-answer-item:nth-child(4) { animation-delay: 1.16s; }
.seq-answer-item:nth-child(5) { animation-delay: 1.33s; }

/* Library card hover buttons */
.lib-hover-btns {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  border-radius: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s;
}
.lib-card:hover .lib-hover-btns { opacity: 1; pointer-events: auto; }
.lib-btn {
  padding: 7px 18px;
  font-size: 11px;
  letter-spacing: 0.15em;
  border-radius: 2px;
  border: 1px solid rgba(255,255,255,0.5);
  background: transparent;
  color: white;
  cursor: pointer;
  min-width: 90px;
  transition: background 0.15s;
}
.lib-btn:hover { background: rgba(255,255,255,0.15); }
.theme-glow .lib-hover-btns,
.theme-dream .lib-hover-btns { background: rgba(0,0,0,0.40); backdrop-filter: blur(6px); }
.theme-zen .lib-hover-btns { background: rgba(4,4,8,0.78); backdrop-filter: blur(8px); }

/* responsive guard */
@media (max-width: 1080px) {
  .dash-grid, .practice-wrap { grid-template-columns: 1fr; }
  .dash-grid-3 { grid-template-columns: 1fr 1fr; }
  .dash-hero { grid-template-columns: 1fr; }
  .hero-right { display: none; }
}
@media (max-width: 820px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .main { padding: 20px 18px 60px; }
}
