:root {
  --bg: #0c0a1c;
  --bg-2: #14112e;
  --panel: rgba(255, 255, 255, 0.045);
  --panel-2: rgba(255, 255, 255, 0.07);
  --border: rgba(216, 180, 106, 0.18);
  --gold: #d8b46a;
  --gold-soft: #e8cf9a;
  --ink: #ece8f7;
  --muted: #a7a2c8;
  --muted-2: #6f6a92;
  --blocked: #cf6f7a;
  --active: #e0be74;
  --harmony: #74c6a8;
  --radius: 18px;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  --maxw: 480px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 700px at 50% -10%, #241a44 0%, transparent 55%),
    radial-gradient(900px 600px at 90% 100%, #17173a 0%, transparent 50%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

#app {
  max-width: var(--maxw);
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
}
.screen { flex: 1; padding: 26px 20px 110px; animation: fade .35s ease; }
.screen.center { display: flex; flex-direction: column; justify-content: center; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Typography */
.eyebrow { letter-spacing: .28em; text-transform: uppercase; font-size: 11px; color: var(--gold); font-weight: 600; }
h1 { font-size: 27px; font-weight: 700; margin: 10px 0 8px; letter-spacing: -.01em; }
h2 { font-size: 20px; font-weight: 650; margin: 0 0 6px; }
h3 { font-size: 16px; margin: 0 0 4px; }
p { color: var(--muted); margin: 0 0 14px; }
.lead { color: var(--ink); opacity: .92; }
.quote { font-style: italic; color: var(--gold-soft); border-left: 2px solid var(--border); padding-left: 14px; margin: 16px 0; }
.small { font-size: 13px; color: var(--muted-2); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 15px 18px; border: none; border-radius: 14px; cursor: pointer;
  font-size: 16px; font-weight: 650; font-family: inherit;
  background: linear-gradient(180deg, var(--gold-soft), var(--gold));
  color: #2a1e07; box-shadow: 0 8px 24px rgba(216, 180, 106, .22); transition: transform .12s ease, opacity .2s;
}
.btn:active { transform: translateY(1px) scale(.995); }
.btn.ghost { background: var(--panel-2); color: var(--ink); box-shadow: none; border: 1px solid var(--border); }
.btn.small { width: auto; padding: 10px 16px; font-size: 14px; border-radius: 11px; }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btnrow { display: flex; gap: 10px; }

/* Cards */
.card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin: 14px 0; box-shadow: var(--shadow); }
.card.tap { cursor: pointer; transition: background .2s, transform .12s; }
.card.tap:active { transform: scale(.99); }

/* Gate + onboarding */
.brandmark { width: 96px; height: 96px; margin: 0 auto 6px; display: block; }
.center-text { text-align: center; }
.field {
  width: 100%; padding: 15px 16px; border-radius: 13px; border: 1px solid var(--border);
  background: rgba(0,0,0,.25); color: var(--ink); font-size: 17px; text-align: center; letter-spacing: .12em;
  font-family: inherit; margin: 8px 0 14px;
}
.field:focus { outline: none; border-color: var(--gold); }
.dots { display: flex; gap: 7px; justify-content: center; margin: 18px 0; }
.dots span { width: 7px; height: 7px; border-radius: 50%; background: var(--muted-2); opacity: .5; }
.dots span.on { background: var(--gold); opacity: 1; }
.step-badge { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 14px;
  background: var(--panel-2); border: 1px solid var(--border); font-size: 24px; }

/* Scale (señales) */
.progress-thin { height: 3px; background: rgba(255,255,255,.08); border-radius: 3px; overflow: hidden; margin-bottom: 22px; }
.progress-thin > i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-soft)); transition: width .3s ease; }
.senal { font-size: 19px; line-height: 1.45; margin: 8px 0 22px; min-height: 96px; }
.scale { display: grid; gap: 10px; }
.opt {
  width: 100%; text-align: left; padding: 15px 16px; border-radius: 13px; cursor: pointer;
  background: var(--panel); border: 1px solid var(--border); color: var(--ink); font-size: 16px; font-family: inherit;
  display: flex; align-items: center; gap: 13px; transition: border-color .15s, background .15s;
}
.opt:active { background: var(--panel-2); }
.opt .rk { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--muted-2); flex: none; }
.opt.sel { border-color: var(--gold); background: rgba(216,180,106,.1); }
.opt.sel .rk { border-color: var(--gold); background: var(--gold); box-shadow: inset 0 0 0 3px var(--bg-2); }
.qmeta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }

/* Cube result */
.cubewrap { display: grid; place-items: center; margin: 8px 0 4px; }
.cube { width: 260px; height: 300px; }
.node { transition: fill .6s ease, r .4s ease; }
.node-label { font-size: 9px; fill: var(--muted); }
.legend { display: flex; gap: 16px; justify-content: center; margin: 6px 0 8px; font-size: 12px; color: var(--muted); }
.legend i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; margin-right: 5px; vertical-align: middle; }

/* Center reading rows */
.readrow { display: flex; gap: 12px; align-items: flex-start; padding: 13px 0; border-bottom: 1px solid rgba(255,255,255,.05); }
.readrow:last-child { border-bottom: none; }
.dot { width: 11px; height: 11px; border-radius: 50%; margin-top: 6px; flex: none; }
.chip { font-size: 10px; padding: 2px 8px; border-radius: 20px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.tag-foco { color: var(--gold); border: 1px solid var(--border); border-radius: 20px; font-size: 10px; padding: 2px 8px; letter-spacing: .08em; text-transform: uppercase; }

/* Práctica home */
.dayhead { display: flex; align-items: baseline; justify-content: space-between; }
.daynum { font-size: 15px; color: var(--gold); font-weight: 600; }
.phase-pill { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--border); border-radius: 20px; padding: 3px 10px; }
.streakrow { display: flex; gap: 12px; margin: 6px 0 4px; }
.stat { flex: 1; background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 13px; text-align: center; }
.stat b { font-size: 26px; display: block; color: var(--gold-soft); font-weight: 700; }
.stat span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.progress { height: 8px; background: rgba(255,255,255,.07); border-radius: 8px; overflow: hidden; margin: 12px 0 4px; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-soft)); border-radius: 8px; transition: width .5s; }

/* Checklist */
.check { display: flex; gap: 13px; align-items: flex-start; padding: 13px 0; border-bottom: 1px solid rgba(255,255,255,.05); cursor: pointer; }
.check:last-child { border-bottom: none; }
.box { width: 24px; height: 24px; border-radius: 8px; border: 2px solid var(--muted-2); flex: none; margin-top: 2px; display: grid; place-items: center; transition: .15s; }
.check.done .box { background: var(--gold); border-color: var(--gold); }
.check.done .box::after { content: "✓"; color: #2a1e07; font-weight: 800; font-size: 14px; }
.check.done .ctext { opacity: .5; }
.ctext b { font-size: 15px; }
.ctext .meta { font-size: 12px; color: var(--gold); margin-left: 6px; }
.ctext p { font-size: 13.5px; margin: 3px 0 0; }

/* Bottom nav */
.nav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: var(--maxw);
  display: flex; background: rgba(12, 10, 28, .82); backdrop-filter: blur(14px); border-top: 1px solid var(--border);
  padding: 8px 0 max(8px, env(safe-area-inset-bottom));
}
.nav button { flex: 1; background: none; border: none; color: var(--muted-2); font-family: inherit; font-size: 11px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 4px; }
.nav button .ic { font-size: 19px; }
.nav button.on { color: var(--gold); }

/* Misc */
.toast { position: fixed; bottom: 84px; left: 50%; transform: translateX(-50%); background: #241d3f; border: 1px solid var(--border); color: var(--ink); padding: 12px 18px; border-radius: 12px; font-size: 14px; box-shadow: var(--shadow); z-index: 50; animation: fade .3s; max-width: 92%; text-align: center; }
.dev { position: fixed; top: 8px; right: 8px; z-index: 60; font-size: 10px; color: var(--muted-2); background: rgba(0,0,0,.3); border: 1px solid var(--border); border-radius: 8px; padding: 4px 8px; cursor: pointer; }
.spacer { height: 8px; }
.divider { height: 1px; background: var(--border); margin: 18px 0; opacity: .6; }
.banner { background: linear-gradient(180deg, rgba(216,180,106,.14), rgba(216,180,106,.05)); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin: 14px 0; }
