/* ============= TOKENS ============= */
:root {
  --c-bg: #02223f;
  --c-bg-2: #063562;
  --c-bg-3: #0a4682;
  --c-surface: rgba(255, 255, 255, 0.07);
  --c-surface-2: rgba(255, 255, 255, 0.12);
  --c-text: #f7faff;
  --c-text-dim: #a9c4dc;
  --c-text-muted: #6a8fae;
  --c-gold: #ffcf3d;
  --c-gold-deep: #b78700;
  --c-success: #5fdb8d;
  --c-danger: #ff6b6b;
  --c-warning: #ffa94d;

  --r-sm: 10px;
  --r-md: 18px;
  --r-lg: 28px;
  --r-pill: 999px;

  --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.18);
  --shadow-coin: 0 8px 24px rgba(255, 207, 61, 0.32);

  --tap-min: 56px;

  --pad: max(16px, env(safe-area-inset-top));
  --pad-bottom: max(20px, env(safe-area-inset-bottom));

  font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  min-height: 100dvh;
  background: var(--c-bg);
  color: var(--c-text);
  font-size: 28px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  overscroll-behavior-y: none;
}

body {
  background: radial-gradient(ellipse at top, var(--c-bg-3) 0%, var(--c-bg) 70%);
  min-height: 100dvh;
}

#app {
  min-height: 100dvh;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  position: relative;
}

button, input {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

button {
  border: none;
  background: none;
  cursor: pointer;
  user-select: none;
}

input {
  border: none;
  outline: none;
  background: none;
}

.hidden { display: none !important; }

/* ============= VIEWS ============= */
.view {
  display: none;
  min-height: 100dvh;
  padding: var(--pad) 18px var(--pad-bottom);
  flex-direction: column;
  gap: 16px;
}

.view.active {
  display: flex;
}

.view-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
  min-height: var(--tap-min);
}

/* Header pegajoso en vistas de contenido (FAQ, productos, Rande, historial, qe) */
.view-content .view-header,
.view-form .view-header,
.view-chat .view-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--c-bg);
  margin-left: -18px;
  margin-right: -18px;
  padding: 8px 18px;
  margin-top: calc(-1 * var(--pad));
  padding-top: var(--pad);
  margin-bottom: 0;
}

.view-title {
  font-size: 31px;
  font-weight: 700;
  flex: 1;
}

.icon-btn {
  width: var(--tap-min);
  height: var(--tap-min);
  min-width: var(--tap-min);
  flex-shrink: 0;
  aspect-ratio: 1;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  background: var(--c-surface);
  color: var(--c-text);
  font-weight: 700;
  transition: transform 0.1s, background 0.15s;
  padding: 0;
}

.icon-btn:active { transform: scale(0.94); background: var(--c-surface-2); }

/* ============= BUTTONS ============= */
.btn-primary {
  background: var(--c-gold);
  color: #1a1300;
  font-weight: 800;
  font-size: 29px;
  padding: 20px 28px;
  border-radius: var(--r-pill);
  min-height: var(--tap-min);
  width: 100%;
  box-shadow: var(--shadow-coin);
  transition: transform 0.1s, filter 0.15s;
}
.btn-primary:active { transform: scale(0.97); filter: brightness(0.95); }
.btn-primary:disabled { opacity: 0.4; box-shadow: none; }

.btn-secondary {
  background: var(--c-surface-2);
  color: var(--c-text);
  font-weight: 600;
  font-size: 28px;
  padding: 18px 24px;
  border-radius: var(--r-pill);
  min-height: var(--tap-min);
  width: 100%;
  transition: transform 0.1s, background 0.15s;
}
.btn-secondary:active { transform: scale(0.97); background: var(--c-surface); }

.btn-link {
  background: transparent;
  color: var(--c-text-dim);
  font-weight: 500;
  font-size: 26px;
  padding: 14px;
  text-decoration: underline;
  text-decoration-color: rgba(169, 196, 220, 0.4);
  text-underline-offset: 4px;
}

.btn-choice {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  background: var(--c-surface);
  border: 2px solid transparent;
  border-radius: var(--r-md);
  width: 100%;
  min-height: var(--tap-min);
  transition: transform 0.1s, border-color 0.15s, background 0.15s;
}
.btn-choice:active { transform: scale(0.98); background: var(--c-surface-2); border-color: var(--c-gold); }

.btn-choice-icon {
  font-size: 43px;
  width: 44px;
  text-align: center;
}

.btn-choice-text {
  font-size: 29px;
  font-weight: 600;
  text-align: left;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.btn-choice-hint {
  display: block;
  font-size: 19px;
  color: var(--c-text-dim);
  font-weight: 500;
  font-style: italic;
  line-height: 1.4;
}

/* ============= ONBOARDING ============= */
.view-onboarding {
  justify-content: center;
  align-items: stretch;
  padding-top: max(48px, env(safe-area-inset-top));
}

.onboard-stack {
  display: flex;
  flex-direction: column;
  gap: 22px;
  align-items: center;
  text-align: center;
}

.onboard-emoji {
  font-size: 94px;
  line-height: 1;
}

.onboard-title {
  font-size: 74px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.onboard-h2 {
  font-size: 43px;
  font-weight: 800;
  margin-bottom: 4px;
}

.onboard-q {
  font-size: 36px;
  font-weight: 600;
  color: var(--c-text);
  max-width: 360px;
  margin: 0 auto 12px;
}

.onboard-sub {
  font-size: 28px;
  color: var(--c-text-dim);
  margin-top: -10px;
}

.onboard-slogan {
  font-size: 32px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--c-text);
  max-width: 360px;
  margin: 4px auto 0;
  text-align: center;
}

.onboard-slogan-sub {
  font-size: 25px;
  color: var(--c-text-dim);
  font-style: italic;
  font-weight: 400;
  margin: -10px auto 8px;
  text-align: center;
}

.howitworks-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: left;
  margin: 8px 0 16px;
  width: 100%;
}

.howitworks-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--c-surface);
  padding: 18px 18px;
  border-radius: var(--r-md);
  font-size: 26px;
  line-height: 1.55;
}

.howitworks-list .bullet {
  color: var(--c-gold);
  font-weight: 800;
  font-size: 31px;
  flex-shrink: 0;
}

.pw-input {
  background: var(--c-surface);
  color: var(--c-text);
  font-size: 49px;
  font-weight: 700;
  text-align: center;
  letter-spacing: 14px;
  padding: 18px 12px 18px 26px;
  border-radius: var(--r-md);
  width: 220px;
  margin: 12px auto 0;
}

.pw-error {
  color: var(--c-danger);
  font-size: 22px;
  margin-top: -10px;
}

/* ============= PUNTUTXU COIN ANIMATIONS ============= */
.puntutxu-coin {
  filter: drop-shadow(0 8px 24px rgba(255, 207, 61, 0.4));
}

@keyframes spin-pop {
  0%   { transform: scale(0.4) rotateY(-180deg); opacity: 0; }
  60%  { transform: scale(1.15) rotateY(0deg); opacity: 1; }
  100% { transform: scale(1) rotateY(0deg); opacity: 1; }
}

.animate-spin-pop {
  animation: spin-pop 1.1s cubic-bezier(0.2, 0.9, 0.3, 1.05) both;
}

@keyframes drop-in {
  0%   { transform: translateY(-180px) rotate(-10deg); opacity: 0; }
  60%  { transform: translateY(20px) rotate(8deg); }
  80%  { transform: translateY(-8px) rotate(-3deg); }
  100% { transform: translateY(0) rotate(0deg); opacity: 1; }
}

@keyframes shimmer {
  0%, 100% { filter: drop-shadow(0 8px 24px rgba(255, 207, 61, 0.35)); }
  50%      { filter: drop-shadow(0 8px 32px rgba(255, 220, 100, 0.85)); }
}

/* Combina drop-in + shimmer en una sola declaración para que ambas animaciones se apliquen */
.coin-anim {
  animation:
    drop-in 1.2s cubic-bezier(0.3, 1.2, 0.4, 1) both,
    shimmer 2.6s ease-in-out 1.2s infinite;
}

/* ============= HOME ============= */
.view-home {
  gap: 22px;
}

.home-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
  min-height: var(--tap-min);
}

.brand {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 40px;
  font-weight: 900;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #fff 0%, var(--c-gold) 90%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.brand-tag {
  font-size: 19px;
  color: var(--c-text-dim);
  font-weight: 500;
  letter-spacing: 0.01em;
}

.home-slogan {
  text-align: center;
  font-size: 26px;
  line-height: 1.5;
  color: var(--c-text);
  font-weight: 500;
  padding: 8px 6px 0;
  margin: 0;
}

.home-slogan-sub {
  display: inline-block;
  margin-top: 6px;
  font-size: 23px;
  color: var(--c-text-dim);
  font-style: italic;
  font-weight: 400;
}

.home-counter {
  text-align: center;
  padding: 24px 12px 16px;
}

.counter-num {
  font-size: 106px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, var(--c-gold) 0%, #fff5b8 60%, var(--c-gold-deep) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 4px 16px rgba(255, 207, 61, 0.25));
}

.counter-label {
  font-size: 22px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--c-text-dim);
  margin-top: 2px;
  font-weight: 600;
}

.rande-countdown {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--c-surface);
  border-radius: var(--r-md);
  padding: 14px 18px;
  text-align: center;
}

.cd-label {
  font-size: 19px;
  color: var(--c-text-dim);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.cd-days {
  font-size: 59px;
  font-weight: 900;
  line-height: 1.1;
}

.cd-sub {
  font-size: 12px;
  color: var(--c-text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.home-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.home-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.btn-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 26px 12px 24px;
  border-radius: var(--r-md);
  background: linear-gradient(135deg, var(--c-gold) 0%, #ffb629 100%);
  color: #1a1300;
  min-height: 140px;
  box-shadow: var(--shadow-coin);
  text-align: center;
  transition: transform 0.1s, filter 0.15s;
}

.btn-cta:active { transform: scale(0.97); filter: brightness(1.06); }

.cta-emoji {
  font-size: 72px;
  line-height: 1;
}

.cta-emoji-mirror {
  display: inline-block;
  transform: scaleX(-1);
}

.cta-label {
  font-size: 29px;
  font-weight: 800;
  line-height: 1.2;
}

.home-instructions {
  text-align: center;
  font-size: 25px;
  font-weight: 700;
  color: var(--c-text);
  margin: 6px 0 -2px;
  letter-spacing: 0.01em;
}

.home-quick-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 6px;
}

.ql {
  background: var(--c-surface);
  border-radius: var(--r-md);
  padding: 18px 20px;
  font-weight: 600;
  color: var(--c-text);
  text-align: left;
  min-height: 70px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
  transition: background 0.15s, transform 0.1s;
}

.ql:active { background: var(--c-surface-2); transform: scale(0.99); }

.ql-icon {
  font-size: 41px;
  line-height: 1;
  flex-shrink: 0;
  width: 44px;
  text-align: center;
}

.ql-arrow {
  color: var(--c-text-muted);
  font-size: 34px;
  font-weight: 300;
  flex-shrink: 0;
  margin-left: 4px;
}
.ql-text { font-size: 23px; line-height: 1.3; font-weight: 600; flex: 1; }

/* ============= MENU ============= */
.menu-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px 20px;
  background: var(--c-surface);
  border-radius: var(--r-md);
  width: 100%;
  min-height: 64px;
  transition: background 0.15s, transform 0.1s;
}

.menu-item:active { background: var(--c-surface-2); transform: scale(0.99); }

.menu-icon {
  font-size: 46px;
  flex-shrink: 0;
  width: 40px;
  text-align: center;
}

.menu-text {
  font-size: 29px;
  font-weight: 600;
  flex: 1;
  text-align: left;
}

.menu-arrow {
  font-size: 36px;
  color: var(--c-text-muted);
  font-weight: 300;
}

.menu-footer {
  margin-top: 24px;
  text-align: center;
  padding-top: 16px;
  border-top: 1px solid var(--c-surface-2);
}

.logout-link {
  background: transparent;
  color: var(--c-text-muted);
  font-size: 22px;
  padding: 14px 20px;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: rgba(106, 143, 174, 0.5);
  text-underline-offset: 4px;
  transition: color 0.2s, background 0.2s;
}

.logout-link:active { color: var(--c-text-dim); }

.logout-link.logout-armed {
  background: rgba(255, 107, 107, 0.15);
  color: var(--c-danger);
  border-radius: var(--r-pill);
  text-decoration: none;
  font-weight: 700;
  padding: 14px 22px;
}

/* ============= FORMS ============= */
.view-form {
  gap: 20px;
}

.form-stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
  flex: 1;
}

.form-stack h3 {
  font-size: 36px;
  font-weight: 700;
  line-height: 1.3;
}

.q-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--c-surface);
  padding: 22px 20px;
  border-radius: var(--r-md);
}

.q-text {
  font-size: 38px;
  font-weight: 700;
  line-height: 1.3;
}

.q-hint {
  font-size: 25px;
  color: var(--c-text-dim);
  font-style: italic;
  margin-top: -8px;
  line-height: 1.45;
}

.yn-buttons {
  display: flex;
  gap: 10px;
}

.yn-btn {
  flex: 1;
  padding: 20px;
  border-radius: var(--r-pill);
  font-size: 31px;
  font-weight: 700;
  background: var(--c-surface-2);
  color: var(--c-text);
  min-height: var(--tap-min);
  transition: transform 0.1s, background 0.15s;
}

.yn-btn:active { transform: scale(0.96); background: var(--c-bg-3); }

.yn-yes:active { background: rgba(255, 107, 107, 0.3); }
.yn-no:active { background: rgba(95, 219, 141, 0.3); }

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  padding: 12px 18px;
  border-radius: var(--r-pill);
  background: var(--c-surface);
  color: var(--c-text);
  font-size: 22px;
  font-weight: 600;
  border: 2px solid transparent;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
}
.chip:active { transform: scale(0.96); }
.chip.selected {
  background: var(--c-gold);
  color: #1a1300;
  border-color: var(--c-gold);
}

.progress {
  flex: 1;
  height: 6px;
  background: var(--c-surface);
  border-radius: var(--r-pill);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: var(--c-gold);
  border-radius: var(--r-pill);
  transition: width 0.3s cubic-bezier(0.2, 0.9, 0.3, 1);
  width: 0%;
}

/* ============= PLAN CARD ============= */
.plan-card {
  background: var(--c-surface);
  border-radius: var(--r-md);
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  font-size: 23px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.plan-loading {
  color: var(--c-text-dim);
  font-style: italic;
  text-align: center;
  padding: 40px 0;
}

/* ============= RESULT ============= */
.view-result {
  justify-content: center;
}

.result-stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
  text-align: center;
  padding: 20px 0;
}

.result-coins {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-bottom: 8px;
  min-height: 130px;
  align-items: center;
}

.result-coins svg {
  width: 110px;
  height: 110px;
}

.result-title {
  font-size: 46px;
  font-weight: 900;
  line-height: 1.2;
}

.result-message {
  font-size: 26px;
  color: var(--c-text-dim);
  max-width: 360px;
  margin: 0 auto;
  line-height: 1.5;
}

.result-tip {
  background: var(--c-surface);
  border-radius: var(--r-md);
  padding: 16px 18px;
  font-size: 22px;
  line-height: 1.55;
  text-align: left;
  margin-top: 8px;
}

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

.result-tip b {
  color: var(--c-gold);
  display: block;
  margin-bottom: 4px;
  font-size: 19px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.result-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

/* ============= CHAT ============= */
.view-chat {
  gap: 0;
  padding-bottom: 0;
}

.chat-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.msg {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: var(--r-md);
  font-size: 23px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.msg-user {
  align-self: flex-end;
  background: var(--c-gold);
  color: #1a1300;
  font-weight: 500;
  border-bottom-right-radius: 6px;
}

.msg-asst {
  align-self: flex-start;
  background: var(--c-surface);
  color: var(--c-text);
  border-bottom-left-radius: 6px;
}

.msg-asst.thinking {
  color: var(--c-text-dim);
  font-style: italic;
}

.chat-input-row {
  display: flex;
  gap: 8px;
  padding: 10px 0 var(--pad-bottom);
  align-items: center;
  background: var(--c-bg);
  position: sticky;
  bottom: 0;
}

.chat-input-row .icon-btn {
  width: 48px;
  height: 48px;
  min-width: 48px;
  flex-shrink: 0;
  aspect-ratio: 1;
  font-size: 22px;
}

#chatInput {
  flex: 1;
  min-width: 0;
  background: var(--c-surface);
  border-radius: var(--r-pill);
  padding: 14px 18px;
  min-height: 48px;
  font-size: 22px;
}

.send-btn { background: var(--c-gold); color: #1a1300; }
.mic-btn.recording { background: var(--c-danger); }
.photo-btn:active { transform: scale(0.94); background: var(--c-surface-2); }

.chat-image-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--c-surface);
  padding: 10px 12px;
  border-radius: var(--r-md);
  margin-bottom: 8px;
}

.chat-image-preview img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 10px;
  flex-shrink: 0;
}

.chat-image-preview .img-info {
  flex: 1;
  font-size: 17px;
  color: var(--c-text-dim);
  line-height: 1.35;
}

.img-remove-btn {
  width: 36px;
  height: 36px;
  font-size: 19px;
  background: var(--c-surface-2);
}

.msg img {
  max-width: 240px;
  width: 100%;
  border-radius: 12px;
  margin-top: 8px;
  display: block;
}

/* ============= FAQ ============= */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.faq-item {
  background: var(--c-surface);
  border-radius: var(--r-md);
  overflow: hidden;
}

.faq-q {
  padding: 18px 20px;
  font-size: 26px;
  font-weight: 600;
  width: 100%;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  color: var(--c-text);
  min-height: var(--tap-min);
  line-height: 1.4;
}

.faq-q::after {
  content: '+';
  color: var(--c-gold);
  font-size: 40px;
  font-weight: 300;
  transition: transform 0.2s;
  flex-shrink: 0;
}

.faq-item.open .faq-q::after { transform: rotate(45deg); }

.faq-a {
  padding: 0 20px 20px;
  font-size: 25px;
  line-height: 1.6;
  color: var(--c-text-dim);
  display: none;
}

.faq-item.open .faq-a { display: block; }

/* ============= PRODUCTS ============= */
.products-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.product-card {
  background: var(--c-surface);
  border-radius: var(--r-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-left: 4px solid var(--c-text-muted);
}

.product-card.risk-low { border-left-color: var(--c-success); }
.product-card.risk-mid { border-left-color: var(--c-warning); }
.product-card.risk-high { border-left-color: var(--c-danger); }

.product-name {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.3;
}

.product-tag {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: var(--c-surface-2);
  align-self: flex-start;
}

.product-card.risk-low .product-tag { background: rgba(95, 219, 141, 0.18); color: var(--c-success); }
.product-card.risk-mid .product-tag { background: rgba(255, 169, 77, 0.18); color: var(--c-warning); }
.product-card.risk-high .product-tag { background: rgba(255, 107, 107, 0.2); color: var(--c-danger); }

.product-card p, .product-card ul {
  font-size: 25px;
  line-height: 1.55;
  color: var(--c-text-dim);
}

.product-card ul {
  padding-left: 22px;
}

.product-card .product-rule {
  margin-top: 4px;
  background: var(--c-surface-2);
  padding: 12px 14px;
  border-radius: var(--r-sm);
  color: var(--c-text);
  font-size: 23px;
  line-height: 1.5;
}

/* ============= RANDE INFO ============= */
.rande-summary {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--c-surface);
  border-radius: var(--r-md);
  padding: 16px 18px;
  font-size: 23px;
}

.rande-info h3 {
  font-size: 25px;
  font-weight: 700;
  margin-top: 8px;
  color: var(--c-text-dim);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.avitu-line {
  position: relative;
  padding: 24px 0;
}

.avitu-track {
  height: 4px;
  background: var(--c-surface-2);
  border-radius: var(--r-pill);
  position: relative;
}

.avitu-points {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}

.avitu-pt {
  display: flex;
  gap: 12px;
  align-items: center;
  background: var(--c-surface);
  border-radius: var(--r-sm);
  padding: 10px 14px;
  font-size: 22px;
}

.avitu-pt b { color: var(--c-gold); min-width: 32px; font-weight: 800; }
.avitu-pt.meta b { color: var(--c-success); }

.rande-note {
  margin-top: 8px;
  font-size: 22px;
  color: var(--c-text-dim);
  line-height: 1.55;
  font-style: italic;
}

.rande-goal {
  margin-top: 6px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--c-gold);
  font-weight: 600;
}

.rande-tips {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0;
}

.rande-tips li {
  background: var(--c-surface);
  padding: 16px 18px 16px 42px;
  border-radius: var(--r-md);
  font-size: 23px;
  line-height: 1.5;
  position: relative;
}

.rande-tips li::before {
  content: '•';
  position: absolute;
  left: 18px;
  top: 14px;
  color: var(--c-gold);
  font-weight: 800;
  font-size: 26px;
}

/* ============= HISTORY ============= */
.history-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.history-empty {
  text-align: center;
  color: var(--c-text-dim);
  padding: 40px 12px;
  font-size: 23px;
}

.history-item {
  background: var(--c-surface);
  border-radius: var(--r-md);
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.history-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.history-date {
  font-size: 22px;
  font-weight: 700;
}

.history-pts {
  font-size: 19px;
  color: var(--c-text-dim);
}

.history-pts .gold { color: var(--c-gold); font-weight: 700; }

.history-del {
  min-width: 44px;
  height: 44px;
  border-radius: var(--r-pill);
  background: rgba(255, 107, 107, 0.12);
  color: var(--c-danger);
  font-size: 28px;
  font-weight: 600;
  padding: 0 14px;
  white-space: nowrap;
  transition: background 0.2s, padding 0.2s;
}
.history-del:active { background: rgba(255, 107, 107, 0.3); }
.history-del.history-del-armed {
  background: var(--c-danger);
  color: white;
  font-size: 22px;
  padding: 0 16px;
}

/* ============= RANDE DAY ============= */
.view-rande-day {
  justify-content: center;
  background: radial-gradient(circle at top, #ffcf3d22 0%, var(--c-bg) 60%);
}

.rd-stack {
  display: flex;
  flex-direction: column;
  gap: 22px;
  align-items: center;
  text-align: center;
  padding: 16px 0;
}

.rd-title {
  font-size: 46px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.rd-sub {
  font-size: 26px;
  color: var(--c-text-dim);
}

.rd-msg {
  font-size: 23px;
  color: var(--c-text-dim);
  max-width: 340px;
  line-height: 1.55;
}

.rd-counter { padding: 8px; }

/* ============= ¿QUÉ ES ESTO? ============= */
.qe-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-size: 26px;
  line-height: 1.6;
  color: var(--c-text);
}

.qe-lead {
  font-size: 34px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--c-text);
  margin-top: 4px;
}

.qe-sub {
  font-size: 25px;
  font-style: italic;
  color: var(--c-text-dim);
  margin-top: -8px;
  margin-bottom: 6px;
}

.qe-body p {
  font-size: 26px;
  line-height: 1.6;
  color: var(--c-text);
}

.qe-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0;
}

.qe-list li {
  background: var(--c-surface);
  padding: 16px 18px;
  border-radius: var(--r-md);
  font-size: 25px;
  line-height: 1.5;
}

/* ============= UTIL ============= */
.flex-spacer { flex: 1; }
