/* Componentes. Sin estilos en linea (CSP): los valores dinamicos llegan como --p, --len o --drag. */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.4;
  letter-spacing: -0.015em;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

/* Halo violeta fijo tras la cabecera, como un cielo a medianoche. */
body::before {
  content: "";
  position: fixed;
  inset: -120px 0 auto;
  height: 460px;
  background: radial-gradient(ellipse at 62% 0%, var(--glow), transparent 68%);
  pointer-events: none;
}

h1,
h2,
p,
ul,
ol {
  margin: 0;
  padding: 0;
}

ul,
ol {
  list-style: none;
}

button {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  touch-action: manipulation;
}

button:disabled {
  cursor: default;
}

a {
  color: inherit;
  text-decoration: none;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

#view:focus,
.sheet:focus {
  outline: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.ico {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  flex: none;
}

/* Tonos: cada metrica conserva su color en todas las pantallas. */
.tone-sleep {
  --tone: var(--sleep);
}
.tone-water {
  --tone: var(--water);
}
.tone-move {
  --tone: var(--move);
}
.tone-food {
  --tone: var(--food);
}
.tone-pink {
  --tone: var(--pink);
}
.tone-status {
  --tone: var(--status);
}
.tone-muted {
  --tone: var(--muted);
}

.chip {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: var(--panel-2);
  color: var(--tone, var(--muted));
  flex: none;
}

.chip .ico {
  width: 17px;
  height: 17px;
}

/* ---- Marco ---- */

.ensayo {
  position: fixed;
  inset: 0 0 auto;
  z-index: 60;
  padding-top: var(--safe-top);
  height: calc(var(--safe-top) + var(--band-h));
  display: grid;
  place-items: center;
  background: var(--amber);
  color: var(--amber-ink);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.01em;
}

.head {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  max-width: 520px;
  margin: 0 auto;
  padding: calc(var(--safe-top) + var(--band-h) + 16px) 21px 16px;
}

.brand-tile {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 13px;
  background: linear-gradient(145deg, #222a54, #0c1423 78%);
  border: 1px solid var(--border-strong);
  box-shadow: 0 8px 22px rgba(90, 76, 200, 0.22);
}

.brand-mark {
  width: 30px;
  height: 30px;
}

.brand-mark circle {
  stroke-width: 3.2;
  stroke-linecap: round;
}

.m-move {
  stroke: var(--move);
}
.m-water {
  stroke: var(--water);
}
.m-sleep {
  stroke: var(--sleep);
}

.brand {
  font-size: 19px;
  line-height: 1;
  font-weight: 780;
  letter-spacing: -0.05em;
}

.brand span {
  font-weight: 400;
  color: var(--muted);
}

.brand-sub {
  margin-top: 5px;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--faint);
}

.view {
  position: relative;
  max-width: 520px;
  margin: 0 auto;
  padding: 0 var(--gutter) calc(var(--tabbar-gap) + var(--tabbar-h) + 88px);
  animation: rise 0.28s var(--ease-out);
}

@keyframes rise {
  from {
    opacity: 0.6;
    transform: translateY(6px);
  }
}

.page-title {
  margin: 4px 0 16px;
  font-size: 33px;
  line-height: 1.08;
  font-weight: 780;
  letter-spacing: -0.05em;
}

.tabbar {
  position: fixed;
  z-index: 30;
  left: 50%;
  bottom: var(--tabbar-gap);
  transform: translateX(-50%);
  width: min(100% - 26px, 494px);
  height: var(--tabbar-h);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  padding: 5px;
  border-radius: 26px;
  background: var(--glass);
  border: 1px solid var(--border);
  box-shadow: 0 14px 40px var(--shadow);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  backdrop-filter: blur(22px) saturate(150%);
}

.tab {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 3px;
  border-radius: 21px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: -0.01em;
  transition: color 0.18s ease, background-color 0.18s ease;
}

.tab[aria-current="page"] {
  color: var(--accent);
  background: var(--panel-3);
}

.tab-ico {
  width: 21px;
  height: 21px;
}

.fab {
  position: fixed;
  z-index: 31;
  right: max(21px, calc((100% - 520px) / 2 + 21px));
  bottom: calc(var(--tabbar-gap) + var(--tabbar-h) + 14px);
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #17142b;
  background: linear-gradient(145deg, #dcd6ff, #8d79ef 78%);
  box-shadow: 0 10px 28px rgba(123, 107, 240, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  transition: transform 0.16s var(--ease-out);
}

.fab .ico {
  width: 26px;
  height: 26px;
  stroke-width: 2.2;
}

.fab:active {
  transform: scale(0.92);
}

/* ---- Botones ---- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 15px;
  font-size: 14px;
  font-weight: 700;
  transition: transform 0.14s var(--ease-out), opacity 0.14s ease;
}

.btn:active:not(:disabled) {
  transform: scale(0.97);
}

.btn:disabled {
  opacity: 0.5;
}

.btn-ghost {
  background: var(--panel-2);
  border: 1px solid var(--border);
}

.btn-accent {
  background: linear-gradient(145deg, #dcd6ff, #8d79ef 78%);
  color: #17142b;
}

.iconbtn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--text);
}

.iconbtn:disabled {
  color: var(--faint);
  opacity: 0.45;
}

/* ---- Tira de dias ---- */

.strip-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.strip-month {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.strip-month::first-letter {
  text-transform: uppercase;
}

.strip-nav {
  display: flex;
  gap: 6px;
}

.days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin: 10px 0 14px;
}

.day {
  display: grid;
  justify-items: center;
  gap: 5px;
  padding: 9px 0 8px;
  min-height: 72px;
  border-radius: 17px;
  border: 1px solid transparent;
  color: var(--muted);
  transition: background-color 0.18s ease, border-color 0.18s ease;
}

.day-label {
  font-size: 10px;
  font-weight: 750;
}

.day-num {
  font-size: 17px;
  font-weight: 760;
  color: var(--text);
}

.day-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: transparent;
}

.day.has-data .day-dot {
  background: var(--status);
}

.day.is-today .day-label {
  color: var(--accent);
}

.day.selected {
  background: var(--panel-3);
  border-color: var(--border);
  box-shadow: 0 6px 16px var(--shadow);
}

.day:disabled {
  opacity: 0.32;
}

/* ---- Heroe y anillos ---- */

.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 20px 14px 20px 20px;
  border-radius: var(--r-xl);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  background:
    radial-gradient(circle at 115% -40%, rgba(177, 161, 255, 0.26), transparent 55%),
    linear-gradient(135deg, #1d284a 0%, #131e31 56%, #111b2b 100%);
  box-shadow: 0 12px 48px var(--shadow);
}

.eyebrow {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero-text {
  flex: 1;
  min-width: 0;
}

.hero-title {
  margin-top: 6px;
  font-size: 36px;
  line-height: 1;
  font-weight: 790;
  letter-spacing: -0.055em;
}

.legend {
  display: grid;
  gap: 7px;
  margin-top: 18px;
}

.legend-row {
  display: grid;
  grid-template-columns: 7px 1fr auto;
  align-items: baseline;
  gap: 7px;
  font-size: 13px;
}

.legend-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--tone);
  align-self: center;
}

.legend-label {
  color: var(--muted);
  font-weight: 600;
}

.legend-value {
  font-weight: 760;
}

.legend-none {
  color: var(--faint);
  font-size: 12px;
}

.rings {
  position: relative;
  width: 158px;
  height: 158px;
  flex: none;
}

.rings-svg {
  display: block;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.ring-track,
.ring-arc {
  fill: none;
  stroke-width: 12;
}

.ring-track {
  stroke: rgba(205, 217, 255, 0.085);
}

.ring-arc {
  stroke: var(--tone);
  stroke-linecap: round;
  animation: ring-in 0.8s var(--ease-out);
}

@keyframes ring-in {
  from {
    stroke-dashoffset: var(--len);
  }
}

.ring-core {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  line-height: 1;
}

.ring-core strong {
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -0.05em;
}

.ring-core span {
  margin-top: 2px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

@media (max-width: 359px) {
  .rings {
    width: 124px;
    height: 124px;
  }

  .hero-title {
    font-size: 30px;
  }
}

/* ---- Bloques y cuadros ---- */

.block {
  margin-top: 22px;
}

.sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 11px;
}

.sec-title {
  font-size: 18px;
  font-weight: 760;
  letter-spacing: -0.035em;
}

.sec-aside {
  font-size: 12px;
  color: var(--muted);
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: 0 8px 38px var(--shadow);
}

.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.stat {
  display: flex;
  flex-direction: column;
  min-height: 134px;
  padding: 15px 14px 14px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}

.stat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stat-label {
  font-size: 12px;
  font-weight: 640;
  color: var(--muted);
}

.stat-val {
  margin-top: 13px;
  font-size: 29px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.05em;
  white-space: nowrap;
}

.stat-val small {
  margin-left: 2px;
  font-size: 13px;
  font-weight: 620;
  letter-spacing: -0.02em;
  color: var(--muted);
}

.stat-none {
  margin-top: 19px;
  font-size: 14px;
  font-weight: 600;
  color: var(--faint);
}

.tinybar {
  height: 4px;
  margin-top: 11px;
  border-radius: 50px;
  background: var(--panel-3);
  overflow: hidden;
}

.tinybar i {
  display: block;
  width: var(--p, 0%);
  height: 100%;
  border-radius: 50px;
  background: var(--tone, var(--accent));
}

.stat-meta {
  margin-top: auto;
  padding-top: 9px;
  font-size: 11px;
  line-height: 1.3;
  color: var(--muted);
}

.meta-stack {
  display: grid;
  gap: 3px;
}

.prov {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
}

.prov-dot {
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  background: currentColor;
  align-self: flex-start;
  margin-top: 0.38em;
}

.prov-hollow .prov-dot {
  background: transparent;
}

.rows .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 11px 17px;
}

.rows .row + .row,
.rows .entry + .entry {
  border-top: 1px solid var(--border);
}

.row-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  flex: none;
}

.row-text {
  text-align: right;
  font-size: 14px;
  font-weight: 560;
  overflow-wrap: anywhere;
}

.row-none {
  font-size: 13px;
  color: var(--faint);
}

.pill {
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--panel-2);
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.entry {
  display: flex;
  gap: 12px;
  padding: 13px 15px;
}

.entry-body {
  flex: 1;
  min-width: 0;
}

.entry-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-size: 14px;
}

.entry-head strong {
  font-weight: 700;
}

.entry-time {
  font-size: 12px;
  color: var(--faint);
}

.entry-text {
  margin-top: 3px;
  font-size: 14px;
  color: var(--muted);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* ---- Estados ---- */

.empty {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 30px 26px 26px;
  text-align: center;
  border-radius: var(--r-lg);
  border: 1px dashed var(--border-strong);
  background: rgba(18, 27, 43, 0.55);
}

.empty-ico {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 4px;
  border-radius: 15px;
  background: var(--panel-2);
  color: var(--accent);
}

.empty-title {
  font-size: 17px;
  font-weight: 760;
  letter-spacing: -0.03em;
}

.empty-text {
  max-width: 270px;
  font-size: 13.5px;
  color: var(--muted);
}

.empty .btn {
  margin-top: 10px;
}

.insufficient {
  padding: 16px;
  border-radius: var(--r-lg);
  background: var(--panel);
  border: 1px solid var(--border);
}

.insufficient-count {
  font-size: 15px;
  font-weight: 740;
}

.offer {
  display: flex;
  gap: 13px;
  margin-top: 14px;
  padding: 16px;
  border-radius: var(--r-lg);
  background: var(--panel);
  border: 1px solid var(--border-strong);
}

.offer-ico {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 13px;
  background: var(--panel-2);
  color: var(--accent);
}

.offer-body {
  flex: 1;
  min-width: 0;
}

.offer-title {
  font-size: 15.5px;
  font-weight: 760;
  letter-spacing: -0.025em;
}

.offer-text {
  margin-top: 2px;
  font-size: 13.5px;
  color: var(--muted);
}

.offer-note {
  margin-top: 8px;
  font-size: 12px;
  color: var(--faint);
}

.offer .btn {
  margin-top: 10px;
}

.more-actions {
  display: grid;
  justify-items: start;
  gap: 8px;
  margin-top: 14px;
}

/* ---- Copias y formularios ---- */

.form {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.field {
  display: grid;
  gap: 5px;
}

.field-label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
}

.input {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border-radius: 13px;
  border: 1px solid var(--border-strong);
  background: var(--panel-2);
  color: var(--text);
  font: inherit;
  font-size: 16px; /* iOS no hace zoom al enfocar con 16 px o mas */
}

.input-file {
  padding: 11px 12px;
  font-size: 14px;
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 44px;
  font-size: 13.5px;
}

.check-row input {
  flex: none;
  width: 22px;
  height: 22px;
  margin: 1px 0 0;
  accent-color: var(--accent);
}

.warning-box {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 13px;
  border: 1px solid var(--amber);
  background: rgba(245, 176, 66, 0.08);
  font-size: 13.5px;
}

.warning-box strong {
  color: var(--amber);
}

.form-error {
  font-size: 13.5px;
  font-weight: 620;
  color: var(--pink);
}

.form-error[hidden] {
  display: none;
}

.form-result:empty {
  display: none;
}

.form-result {
  margin-top: 14px;
}

.result-ok {
  padding: 13px 14px;
  border-radius: 13px;
  border: 1px solid var(--border-strong);
  background: var(--panel-2);
}

.result-title {
  margin: 0;
  font-size: 15px;
  font-weight: 760;
}

.result-text {
  margin-top: 3px;
  font-size: 13.5px;
  color: var(--muted);
}

.count-rows {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  font-size: 13.5px;
}

.count-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.count-row strong {
  font-weight: 760;
}

#backup-nudge {
  position: relative;
  max-width: 520px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.nudge {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid var(--amber);
  background: rgba(245, 176, 66, 0.1);
  color: var(--amber);
  font-size: 13.5px;
  font-weight: 650;
}

.nudge-text {
  flex: 1;
  min-width: 0;
}

.nudge-link {
  color: var(--text);
  text-decoration: underline;
  font-weight: 700;
}

.backup .btn[hidden] {
  display: none;
}

/* ---- Hoja inferior ---- */

.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 45;
  background: rgba(3, 6, 12, 0.6);
  opacity: 0;
  transition: opacity 0.28s ease;
}

.sheet-backdrop.open {
  opacity: 1;
}

.sheet {
  position: fixed;
  z-index: 50;
  left: 50%;
  bottom: var(--kb, 0px);
  width: min(100%, 520px);
  max-height: min(86dvh, calc(var(--vvh, 100dvh) - 12px));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-bottom: calc(var(--safe-bottom) + 20px);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  background: var(--panel);
  border: 1px solid var(--border-strong);
  border-bottom: 0;
  box-shadow: 0 -20px 60px var(--shadow);
  transform: translate(-50%, 100%);
  transition: transform 0.42s var(--ease-sheet);
}

.sheet.open {
  transform: translate(-50%, var(--drag, 0px));
}

.sheet.dragging {
  transition: none;
}

.sheet-grab {
  display: grid;
  place-items: center;
  height: 26px;
  touch-action: none;
  cursor: grab;
}

.sheet-grab i {
  width: 38px;
  height: 5px;
  border-radius: 3px;
  background: var(--panel-3);
}

.sheet-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--muted);
}

.sheet-body {
  padding: 2px 20px 0;
}

.sheet-title {
  font-size: 24px;
  font-weight: 780;
  letter-spacing: -0.045em;
}

.sheet-note {
  margin-top: 3px;
  font-size: 13px;
  color: var(--muted);
}

.reg-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 16px;
}

.reg {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 62px;
  padding: 0 14px;
  border-radius: var(--r-md);
  background: var(--panel-2);
  border: 1px solid var(--border);
  font-size: 15px;
  font-weight: 700;
  text-align: left;
}

.reg:disabled .reg-label {
  color: var(--muted);
}

.reg:disabled .chip {
  opacity: 0.55;
}

.reg-wide {
  grid-column: 1 / -1;
}

.reg .chip {
  background: var(--panel-3);
}

/* ---- Avisos ---- */

.toast,
.update {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  width: min(100% - 26px, 494px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 8px 8px 18px;
  border-radius: 20px;
  border: 1px solid var(--border-strong);
  background: var(--glass);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  backdrop-filter: blur(22px) saturate(150%);
  box-shadow: 0 14px 40px var(--shadow);
  font-size: 14px;
  font-weight: 620;
}

.toast {
  z-index: 55;
  bottom: calc(var(--tabbar-gap) + var(--tabbar-h) + 14px);
  min-height: 60px;
  animation: toast-in 0.26s var(--ease-out);
}

.toast-undo {
  min-width: 88px;
  min-height: 44px;
  border-radius: 14px;
  background: var(--panel-3);
  color: var(--accent);
  font-size: 14px;
  font-weight: 750;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translate(-50%, 10px);
  }
}

.update {
  z-index: 40;
  top: calc(var(--safe-top) + var(--band-h) + 10px);
}

/* ---- Guia de instalacion ---- */

.guide {
  position: relative;
  display: grid;
  justify-items: start;
  gap: 14px;
  max-width: 460px;
  min-height: 100dvh;
  align-content: center;
  margin: 0 auto;
  padding: calc(var(--safe-top) + 32px) 26px calc(var(--safe-bottom) + 32px);
}

.guide-mark {
  width: 72px;
  height: 72px;
  margin-bottom: 8px;
}

.guide-mark circle {
  stroke-width: 3.2;
  stroke-linecap: round;
}

.guide-title {
  font-size: 34px;
  line-height: 1.06;
  font-weight: 790;
  letter-spacing: -0.05em;
}

.guide-lead {
  color: var(--muted);
  font-size: 15.5px;
}

.guide-steps {
  display: grid;
  gap: 2px;
  width: 100%;
  margin: 10px 0 12px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.guide-step {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 14px 16px;
  font-size: 14.5px;
  font-weight: 600;
}

.guide-step + .guide-step {
  border-top: 1px solid var(--border);
}

.guide-ico {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: var(--panel-2);
  color: var(--accent);
}

.guide-note {
  font-size: 12.5px;
  color: var(--faint);
}

/* Movimiento reducido: ni transiciones ni animaciones, en ningun elemento. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* ---- Graficas y estrella ---- */
.metric {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
}

.metric-title {
  margin: 0;
  font-size: 16px;
}

.metric-value {
  margin: 0;
  font-size: 22px;
  font-variant-numeric: tabular-nums;
}

.metric-meta {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.chart {
  margin: 8px 0 0;
}

.chart-svg,
.star-svg {
  display: block;
  width: 100%;
  height: auto;
}

.chart-base {
  stroke: rgba(255, 255, 255, 0.14);
  stroke-width: 1;
}

.chart-goal {
  stroke: var(--muted);
  stroke-width: 1;
  stroke-dasharray: 4 4;
}

.stem {
  stroke: rgba(255, 255, 255, 0.22);
  stroke-width: 2;
}

.pt {
  fill: var(--accent, #8ab4ff);
  stroke: var(--accent, #8ab4ff);
  stroke-width: 2;
}

.pt-hollow {
  fill: var(--bg, #0b0f14);
}

.pt-live {
  opacity: 0.55;
}

.chart-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.chart-day {
  min-height: 44px;
  background: none;
  border: 0;
  color: inherit;
  font: inherit;
  font-size: 13px;
}

.chart-day.is-empty {
  color: var(--muted);
}

.chart-detail {
  min-height: 22px;
  margin: 4px 0 0;
  font-size: 14px;
}

.star {
  margin: 0;
}

.star-svg {
  max-width: 260px;
  margin: 0 auto;
}

.star-ring {
  fill: none;
  stroke: rgba(255, 255, 255, 0.14);
}

.axis {
  stroke: rgba(255, 255, 255, 0.3);
}

.axis-invalid {
  stroke-dasharray: 3 4;
  opacity: 0.6;
}

.star-area {
  fill: rgba(138, 180, 255, 0.28);
  stroke: var(--accent, #8ab4ff);
  stroke-width: 2;
}

.star-legend {
  display: grid;
  gap: 4px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.star-legend .is-invalid {
  color: var(--muted);
}

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

.pane {
  display: contents;
}
