/* Noorpa · Glass Redesign Styles (screens 01–05) */

/* Screen 1: Home */
.home-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px;
  align-items: center;
}
@media (max-width: 900px) {
  .home-grid { grid-template-columns: 1fr; gap: 28px; }
}
.home-copy { display: flex; flex-direction: column; gap: 20px; }
.home-eyebrow { font-size: 14px; font-weight: 600; letter-spacing: .08em; color: var(--manjal); }
.home-title { margin: 0; font-size: clamp(36px, 5vw, 58px); line-height: 1.18; font-weight: 700; }
.home-sub { font-size: 18px; color: var(--muted); max-width: 520px; }

.home-toy {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.toy-tile {
  padding: 14px 26px;
  border-radius: 20px;
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  min-height: 58px;
  transition: transform var(--m-one), border-color var(--m-one), background var(--m-one);
}
.toy-tile.on { border-color: var(--manjal); }
.toy-spark {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--manjal);
  color: #1B1E3C;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  opacity: .85;
  transform: scale(.94);
  transition: opacity var(--m-two), transform var(--m-two);
}
.toy-spark.lit { opacity: 1; transform: scale(1); }
.toy-result {
  font-size: 28px;
  font-weight: 700;
  opacity: .65;
  transform: translateX(0);
  transition: opacity var(--m-two), transform var(--m-two);
}
.toy-result.lit { opacity: 1; transform: scale(1.04); }

.home-cta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 6px; }
.home-visual { position: relative; display: flex; align-items: center; justify-content: center; min-height: 360px; }
.kolam-svg { width: min(100%, 400px); height: auto; }
.home-leaf {
  position: absolute;
  right: 0;
  bottom: 6px;
  width: min(100%, 340px);
}
@media (max-width: 900px) {
  .home-leaf { position: relative; right: auto; bottom: auto; margin-top: 12px; }
  .home-visual { flex-direction: column; min-height: auto; }
}
.stats-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-radius: 22px;
  padding: 16px 8px;
  text-align: center;
}
.stats-num { font-size: 26px; font-weight: 700; }
.stats-lbl { font-size: 13px; color: var(--muted); }

/* Screen 2: Learn Path */
.path-grid {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr) 340px;
  gap: 24px;
  align-items: start;
}
@media (max-width: 1040px) {
  .path-grid { grid-template-columns: 1fr; }
}
.today-card { padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.today-row { display: flex; align-items: center; gap: 16px; }
.lands-card { padding: 22px; display: flex; flex-direction: column; gap: 10px; }
.land-btn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 8px 10px;
  font-size: 15px;
  font-weight: 600;
  text-align: left;
  min-height: 44px;
}
.land-btn.active { background: var(--glass); border-color: var(--glass-border); }
.land-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 10px; }

.thread-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.thread-head h1 { font-size: 30px; font-weight: 700; }
.thread-head h1 span { font-size: 16px; font-weight: 500; color: var(--muted); }

.thread-spine { position: relative; display: flex; flex-direction: column; gap: 12px; }
.thread-line {
  position: absolute;
  left: 8px;
  top: 20px;
  bottom: 20px;
  width: 3px;
  border-radius: 2px;
  background: rgba(128, 134, 168, .28);
}
.thread-line-fill {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  border-radius: 2px;
  background: var(--nool);
  transition: height var(--m-two);
}
.knot-row { display: flex; align-items: center; gap: 16px; position: relative; }
.knot-dot {
  flex: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid rgba(128, 134, 168, .48);
  z-index: 1;
}
.knot-dot.done { background: var(--nool); border-color: var(--nool); }
.knot-dot.next { background: var(--manjal); border-color: var(--manjal); }
.knot-card {
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 13px 18px;
  border-radius: 18px;
  min-height: 54px;
  text-align: left;
  transition: transform var(--m-half), border-color var(--m-half);
}
.knot-card:hover { transform: translateX(3px); border-color: var(--manjal); }
.knot-card.next { border-color: var(--manjal); }
.knot-title { display: block; font-size: 17px; font-weight: 600; }
.knot-sub { display: block; font-size: 12.5px; color: var(--muted); }

.labs-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.labs-grid.gallery { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.lab-tile {
  border-radius: 20px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 108px;
  text-align: left;
  transition: transform var(--m-half), border-color var(--m-half);
}
.lab-tile:hover { transform: translateY(-2px); border-color: var(--manjal); }
.lab-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Screen 3: Step */
.step-top { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.bead-track { flex: 1; min-width: 220px; display: flex; align-items: flex-start; gap: 8px; }
.bead-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  background: transparent;
  border: none;
  padding: 0;
  min-width: 40px;
}
.bead-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 3px solid rgba(128, 134, 168, .45);
  background: transparent;
  transition: all var(--m-one);
}
.bead-node.done .bead-dot { background: var(--nool); border-color: var(--nool); }
.bead-node.active .bead-dot { width: 24px; height: 24px; background: var(--manjal); border-color: var(--manjal); }
.bead-lbl { font-size: 12px; font-weight: 600; color: var(--muted); }
.bead-node.active .bead-lbl { color: var(--manjal); }
.bead-bar-line { flex: 1; height: 3px; border-radius: 2px; background: rgba(128, 134, 168, .25); margin-top: 8px; }
.bead-bar-line.lit { background: var(--nool); }

.step-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  gap: 24px;
  align-items: start;
}
@media (max-width: 880px) {
  .step-grid { grid-template-columns: 1fr; }
}
.step-stage {
  border-radius: 30px;
  padding: 26px 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 440px;
}
.step-side { display: flex; flex-direction: column; gap: 16px; }
.step-leaf { transition: all var(--m-two); }
.step-leaf.glow { box-shadow: 0 0 0 3px var(--manjal), var(--glass-shadow); }
.options-card { padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.options-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.options-grid.single { grid-template-columns: 1fr; }
.opt-btn {
  padding: 12px;
  border-radius: 14px;
  border: 1.5px solid var(--glass-border);
  background: transparent;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  min-height: 46px;
  transition: all var(--m-half);
}
.opt-btn.good { background: var(--nool); border-color: var(--nool); color: #fff; }
.opt-btn.bad { animation: tt-shake var(--m-two); border-color: var(--nool); }
@keyframes tt-shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

/* Engines */
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }
.chip {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  border: 1.5px solid var(--glass-border);
  background: transparent;
  min-height: 40px;
  transition: all var(--m-half);
}
.chip.on { background: var(--manjal); color: #1B1E3C; border-color: var(--manjal); }
.chip.v { border-color: var(--ezhuthu); }
.chip-gap { width: 8px; }
.dial-label { font-size: 12.5px; font-weight: 600; color: var(--muted); margin-top: 6px; }

.col-stage { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; }
.col-track { display: flex; align-items: center; gap: 14px; transition: opacity var(--m-one); }
.col-track.f2, .col-track.f3 { opacity: .55; }
.col-track.f4 { opacity: 0; height: 0; overflow: hidden; }
.col-pill { padding: 8px 20px; border-radius: 14px; font-size: 22px; font-weight: 700; }
.col-atoms { display: flex; justify-content: center; flex-wrap: wrap; gap: 7px; }
.atom {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  font-size: 20px;
  font-weight: 700;
  background: var(--glass);
  border: 2px solid var(--glass-border);
  transition: all var(--m-two);
}
.atom.v { border-radius: 50%; border-color: var(--ezhuthu); }
.atom.mark { border-color: var(--manjal); }
.atom.born { background: var(--manjal); border-color: var(--manjal); color: #1B1E3C; }
.atom.changed { background: var(--nool); border-color: var(--nool); color: #fff; box-shadow: 0 0 22px rgba(229, 72, 77, .65); }
.atom.unborn { width: 0; border-width: 0; opacity: 0; overflow: hidden; }
.atom-drop-wrap { position: relative; display: inline-flex; }
.atom.drop-ghost {
  position: absolute;
  left: 0;
  top: 0;
  background: transparent;
  border: 2px dashed var(--muted);
  color: var(--muted);
  transform: translateY(26px) rotate(12deg);
  opacity: .55;
}
.atom.drop { transform: translateY(26px) rotate(12deg); opacity: .35; border-style: dashed; }
.atom-sep { width: 3px; height: 46px; border-radius: 2px; background: var(--nool); margin: 0 3px; }
.col-result {
  padding: 12px 32px;
  border-radius: 20px;
  font-size: 32px;
  font-weight: 700;
  background: rgba(229, 72, 77, .18);
  border: 2px solid var(--nool);
  box-shadow: 0 0 34px rgba(229, 72, 77, .3);
}

.scrub { display: flex; align-items: center; gap: 14px; margin-top: auto; }
.play-circle {
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: var(--nool);
  display: flex;
  align-items: center;
  justify-content: center;
}
.scrub-track { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.scrub-track input[type=range] { width: 100%; accent-color: var(--nool); }
.scrub-labels { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); gap: 6px; }
.scrub-labels span.on { color: var(--text); font-weight: 700; }

/* Pulse / Uyirmei / Mouth / Orbit / Tinai / Loom */
.word-in, .loom-in {
  border: 1px solid var(--glass-border);
  background: var(--glass);
  border-radius: 16px;
  padding: 8px 14px;
  min-height: 42px;
}
.loom-in { width: 100%; margin: 6px 0; }
.pulse-bars { display: flex; gap: 6px; margin: 14px 0; min-height: 80px; }
.pbar {
  background: var(--glass);
  border: 1.5px solid var(--glass-border);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  transition: all var(--m-half);
}
.pbar.nedil { border-color: var(--ezhuthu); }
.pbar.kutriyalukaram { border-style: dashed; border-color: var(--nool); }
.pbar.on { background: var(--manjal); border-color: var(--manjal); color: #1B1E3C; transform: translateY(-6px); }

.um-stage { display: flex; justify-content: center; align-items: center; gap: 24px; min-height: 120px; transition: gap var(--m-two); }
.um-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 90px;
  height: 94px;
  border-radius: 18px;
  border: 2px solid var(--glass-border);
  background: var(--glass);
  font-size: 32px;
  font-weight: 700;
  transition: all var(--m-two);
}
.um-tile small { font-size: 11px; color: var(--muted); }
.um-tile.uyir { border-radius: 50%; border-color: var(--ezhuthu); }
.um-tile.res { display: none; border-color: var(--nool); box-shadow: 0 0 28px rgba(229, 72, 77, .35); }
.um-stage.joined { gap: 0; }
.um-stage.joined .mei, .um-stage.joined .uyir { width: 0; border-width: 0; opacity: 0; overflow: hidden; }
.um-stage.joined .res { display: flex; }

.mouth-wrap, .orbit-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: center; }
@media (max-width: 640px) { .mouth-wrap, .orbit-wrap { grid-template-columns: 1fr; } }
.mouth-svg, .scene-svg { width: 100%; height: auto; border-radius: 22px; background: var(--glass); border: 1px solid var(--glass-border); }
.big-letter { font-size: 54px; font-weight: 700; color: var(--nool-text); line-height: 1.1; }

.orbit { position: relative; width: 100%; max-width: 300px; aspect-ratio: 1; margin: 0 auto; border: 2px dashed var(--glass-border); border-radius: 50%; }
.orbit-core {
  position: absolute;
  inset: 28%;
  border-radius: 50%;
  background: var(--glass);
  border: 2px solid var(--nool);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.moon {
  position: absolute;
  width: 54px;
  height: 54px;
  margin: -27px 0 0 -27px;
  border-radius: 50%;
  border: 2px solid var(--sol);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  transition: all var(--m-one);
}
.moon.on { background: var(--sol); color: #1B1E3C; transform: scale(1.14); font-weight: 700; }

.tinai-wrap { display: flex; flex-direction: column; gap: 14px; }
.tinai-hero { position: relative; height: 240px; border-radius: 26px; overflow: hidden; border: 1px solid var(--glass-border); }
.tinai-hero svg { width: 100%; height: 100%; display: block; }
.tinai-badge { position: absolute; left: 14px; bottom: 14px; padding: 8px 16px; border-radius: 16px; }
.tinai-rows { padding: 14px 18px; border-radius: 22px; display: flex; flex-direction: column; gap: 8px; font-size: 14.5px; }
.tinai-row { display: flex; justify-content: space-between; gap: 12px; }

.loom { margin: 12px 0; display: flex; flex-direction: column; gap: 14px; }
.adi { display: flex; flex-wrap: wrap; gap: 6px 0; border-bottom: 3px solid var(--nool); padding-bottom: 8px; }
.seer { padding: 0 10px; text-align: center; border-right: 1.5px dashed var(--glass-border); }
.seer:last-child { border-right: none; }
.beads { display: flex; gap: 4px; justify-content: center; }
.bead-a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 10px;
  font-weight: 700;
  border: 2px solid var(--porul);
  background: var(--glass);
}
.bead-a.ner { border-radius: 50%; min-width: 36px; }
.bead-a.nirai { border-radius: 18px; min-width: 60px; }
.bead-a.on { background: var(--manjal); border-color: var(--manjal); color: #1B1E3C; transform: translateY(-4px); }

/* Screen 4: Library */
.lib-search { display: flex; align-items: center; gap: 12px; border-radius: 999px; padding: 6px 8px 6px 20px; flex-wrap: wrap; }
.lib-search input { flex: 1; min-width: 180px; border: none; background: transparent; font-size: 16px; outline: none; min-height: 44px; }
.lib-grid { display: grid; grid-template-columns: 230px 300px minmax(0, 1fr); gap: 20px; min-height: 0; }
@media (max-width: 940px) { .lib-grid { grid-template-columns: 1fr; } }
.lib-pane { border-radius: 24px; padding: 12px; max-height: 68vh; overflow: auto; }
.tree-btn { display: flex; justify-content: space-between; width: 100%; border: none; background: transparent; padding: 8px 12px; border-radius: 12px; font-size: 14.5px; text-align: left; }
.tree-btn.active { background: var(--glass); font-weight: 700; }
.sutra-row { display: block; width: 100%; border: none; background: transparent; padding: 10px 14px; border-radius: 14px; text-align: left; }
.sutra-row.active { background: var(--pill-active-bg); color: var(--pill-active-fg); }
.compare-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 680px) { .compare-pair { grid-template-columns: 1fr; } }
.soll-chip {
  border: 1.5px solid var(--nool);
  color: var(--nool-text);
  background: transparent;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 13px;
  font-weight: 600;
  margin: 3px 4px 3px 0;
  min-height: 36px;
}
.legend { font-size: 13px; color: var(--muted); }
.ex { border-left: 3px solid var(--glass-border); padding: 4px 12px; margin: 8px 0; }
