/* Swirly.Club — capa de tokens del rediseño 2026-07
   Fuente de verdad: docs/design_handoff_swirly_redesign/components/redesign/theme.css
   Se aplica sobre <body class="sw-root" data-mode data-hero>.
   Migración incremental: las pantallas rediseñadas usan estos tokens y las
   clases .sw-*; las aún no migradas siguen con base/components/gamification/sat.css.
   Vars compartidas (--bg,--surface,--text,--border) se redefinen aquí sobre body,
   así toda la app adopta la paleta nueva sin romper el layout existente. */

.sw-root {
  --font: 'Instrument Sans', ui-sans-serif, system-ui, sans-serif;
  --serif: 'Lora', Georgia, serif;
  --transition: 180ms cubic-bezier(.4,0,.2,1);

  /* Overlays internos del hero (por defecto: heroes oscuros → blancos) */
  --hero-overlay: rgba(255,255,255,0.08);
  --hero-overlay-strong: rgba(255,255,255,0.14);
  --hero-line: rgba(255,255,255,0.2);
  --hero-line-strong: rgba(255,255,255,0.3);
  --hero-star-off: rgba(255,255,255,0.55);
  --hero-placeholder: rgba(255,255,255,0.6);

  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 11px;
  --radius-pill: 999px;
  --card-pad: 20px;

  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  color: var(--text);
  background: var(--bg);
}
/* Reset de box-sizing para páginas que no cargan base.css (login/registro/landing) */
.sw-root, .sw-root *, .sw-root *::before, .sw-root *::after { box-sizing: border-box; }

/* ============ Modo claro (base malva) ============ */
.sw-root[data-mode="light"] {
  --bg: #F7F6F8;
  --surface: #FFFFFF;
  --surface-2: #F1EFF3;
  --text: #29242F;
  --text-muted: #8C8694;
  --border: #ECE9EF;
  --hero: #8A6B82;
  --hero-grad: linear-gradient(150deg, #9F8096 0%, #85627B 52%, #6C4B63 100%);
  --hero-text: #F9F1F6;
  --accent: #F43F5E;
  --accent-deep: #BE123C;
  --accent-ink: #FFFFFF;
  --amber: #E89A0C;
  --amber-soft: #FBF3E2;
  --success: #1D9E5F;
  --nav-bg: rgba(255,255,255,.94);
  --gold-on-hero: #F8CE85;
  --shadow-card: 0 1px 2px rgba(30,18,35,.04);
  --shadow-hero: 0 16px 36px -18px rgba(60,20,50,.45);
}

/* ============ Alternativas de color del hero ============ */
.sw-root[data-hero="burdeos"][data-mode="light"] {
  --hero: #8C4A52;
  --hero-grad: linear-gradient(150deg, #A26A6E 0%, #8C4A52 52%, #6D3540 100%);
}
.sw-root[data-hero="burdeos"][data-mode="dark"] {
  --hero: #5C333A;
  --hero-grad: linear-gradient(150deg, #6B3D43 0%, #542E35 55%, #3F2228 100%);
}
.sw-root[data-hero="oliva"][data-mode="light"] {
  --hero: #5E6653;
  --hero-grad: linear-gradient(150deg, #7B8268 0%, #5E6653 52%, #474F3D 100%);
}
.sw-root[data-hero="oliva"][data-mode="dark"] {
  --hero: #3E4536;
  --hero-grad: linear-gradient(150deg, #4A5240 0%, #383F30 55%, #2A3024 100%);
}
.sw-root[data-hero="noche"][data-mode="light"] {
  --hero: #4A5570;
  --hero-grad: linear-gradient(150deg, #66718C 0%, #4A5570 52%, #383F58 100%);
}
.sw-root[data-hero="noche"][data-mode="dark"] {
  --hero: #353D52;
  --hero-grad: linear-gradient(150deg, #414A63 0%, #303748 55%, #232838 100%);
}
/* Gris pálido — hero claro, texto oscuro */
.sw-root[data-hero="gris"][data-mode="light"] {
  --hero: #DAD6DC;
  --hero-grad: linear-gradient(150deg, #F2F0F3 0%, #E3E0E5 52%, #CFCAD1 100%);
  --hero-text: #2E2833;
  --gold-on-hero: #B8770B;
  --hero-overlay: rgba(255,255,255,0.55);
  --hero-overlay-strong: rgba(255,255,255,0.8);
  --hero-line: rgba(46,40,51,0.16);
  --hero-line-strong: rgba(46,40,51,0.3);
  --hero-star-off: rgba(46,40,51,0.28);
  --hero-placeholder: rgba(46,40,51,0.4);
  --shadow-hero: 0 14px 30px -18px rgba(60,50,65,.35);
}
.sw-root[data-hero="gris"][data-mode="dark"] {
  --hero: #3B3740;
  --hero-grad: linear-gradient(150deg, #474250 0%, #37333E 55%, #2B2830 100%);
}
/* Rosa pálido */
.sw-root[data-hero="rosa"][data-mode="light"] {
  --hero: #F2D7DC;
  --hero-grad: linear-gradient(150deg, #FAE9EC 0%, #F3D9DE 52%, #E7C2CB 100%);
  --hero-text: #4A2833;
  --gold-on-hero: #B8770B;
  --hero-overlay: rgba(255,255,255,0.55);
  --hero-overlay-strong: rgba(255,255,255,0.8);
  --hero-line: rgba(74,40,51,0.18);
  --hero-line-strong: rgba(74,40,51,0.32);
  --hero-star-off: rgba(74,40,51,0.3);
  --hero-placeholder: rgba(74,40,51,0.4);
  --shadow-hero: 0 14px 30px -18px rgba(120,50,70,.3);
}
.sw-root[data-hero="rosa"][data-mode="dark"] {
  --hero: #4A3138;
  --hero-grad: linear-gradient(150deg, #57393F 0%, #452D33 55%, #352227 100%);
}

/* ============ Modo oscuro (base malva) ============ */
.sw-root[data-mode="dark"] {
  --bg: #161318;
  --surface: #1F1B23;
  --surface-2: #29242F;
  --text: #F0EDF3;
  --text-muted: #9C94A6;
  --border: #2C2733;
  --hero: #574050;
  --hero-grad: linear-gradient(150deg, #63495B 0%, #4E3848 55%, #3D2B38 100%);
  --hero-text: #F9F1F6;
  --accent: #FB5A73;
  --accent-deep: #FB5A73;
  --accent-ink: #22080F;
  --amber: #F0A63A;
  --amber-soft: #322A1B;
  --success: #45C186;
  --nav-bg: rgba(22,19,24,.94);
  --gold-on-hero: #F8CE85;
  --shadow-card: 0 1px 2px rgba(0,0,0,.2);
  --shadow-hero: 0 16px 36px -18px rgba(0,0,0,.55);
}

/* ============ Primitivas ============ */
.sw-serif { font-family: var(--serif); }

.sw-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
}
.sw-label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.sw-btn {
  font-family: var(--font);
  border: none;
  cursor: pointer;
  transition: transform var(--transition), opacity var(--transition), background var(--transition);
}
.sw-btn:active { transform: scale(0.97); }
.sw-btn-primary { background: var(--accent); color: var(--accent-ink); }
.sw-btn-ghost { background: var(--surface-2); color: var(--text); }

.sw-scroll { overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; }
.sw-scroll::-webkit-scrollbar { display: none; }
.sw-hscroll { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.sw-hscroll::-webkit-scrollbar { display: none; }

.sw-input-hero::placeholder { color: var(--hero-placeholder); }

@keyframes sw-fade-up {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes sw-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }

/* ============ Shell: header + menú de avatar (rediseño fase 0b) ============ */
.sw-root .sw-header {
  position: sticky; top: 0; z-index: 200;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px;
  background: var(--surface); border-bottom: 1px solid var(--border);
}
.sw-brand { display: flex; align-items: center; gap: 9px; text-decoration: none; }
.sw-brand-cup { width: 26px; height: 26px; flex-shrink: 0; }
.sw-brand-name { font-family: var(--serif); font-size: 17px; font-weight: 600; color: var(--text); line-height: 1; }
.sw-brand-name span { color: var(--accent); }
.sw-brand-sub { font-size: 7.5px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--text-muted); margin-top: 3px; }

.sw-avatar {
  width: 32px; height: 32px; border-radius: 50%; border: none;
  background: var(--hero); color: var(--hero-text);
  font-family: var(--font); font-size: 13px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: transform var(--transition);
}
.sw-avatar:active { transform: scale(.95); }

.sw-menu-backdrop { position: fixed; inset: 0; z-index: 300; }
.sw-menu-backdrop.hidden { display: none; }
.sw-menu {
  position: fixed; top: 56px; right: 20px; z-index: 310;
  min-width: 210px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-md);
  box-shadow: 0 12px 32px -12px rgba(30,18,35,.35); overflow: hidden;
  animation: sw-fade-up 160ms ease;
}
.sw-menu.hidden { display: none; }
.sw-menu-head { padding: 12px 14px; border-bottom: 1px solid var(--border); }
.sw-menu-name { font-size: 13.5px; font-weight: 600; color: var(--text); }
.sw-menu-email { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sw-menu-item {
  width: 100%; display: flex; align-items: center; gap: 10px;
  padding: 11px 14px; background: transparent; border: none; cursor: pointer;
  font-family: var(--font); font-size: 13.5px; font-weight: 500; color: var(--text);
  text-align: left; text-decoration: none; min-height: 44px; box-sizing: border-box;
}
.sw-menu-item:hover { background: var(--surface-2); }
.sw-menu-item.danger { color: var(--accent); }

/* ============ Overlay de pantalla (arquetipo B) ============ */
.sw-overlay {
  position: fixed; inset: 0; z-index: 400;
  background: var(--bg); display: flex; flex-direction: column;
  animation: sw-fade-up 180ms ease;
}
.sw-overlay.hidden { display: none; }
.sw-screen-head { display: flex; align-items: center; gap: 12px; padding: 14px 20px 10px; }
.sw-back {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  background: var(--surface); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  color: var(--text); font-size: 16px;
}
.sw-screen-title { font-size: 17px; font-weight: 600; color: var(--text); }
.sw-screen-body { flex: 1; overflow-y: auto; padding: 6px 20px 40px; }
.sw-section-label { font-size: 10.5px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--text-muted); margin: 14px 2px 10px; }

/* Ajustes — selector de color de tema */
.sw-theme-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 6px; }
.sw-theme-opt { background: transparent; border: none; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 8px; font-family: var(--font); padding: 4px; }
.sw-theme-dot { width: 48px; height: 48px; border-radius: 50%; border: 2.5px solid var(--border); box-shadow: var(--shadow-card); display: flex; align-items: center; justify-content: center; transition: border-color 180ms ease; }
.sw-theme-opt.on .sw-theme-dot { border-color: var(--accent); }
.sw-theme-check { width: 20px; height: 20px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: none; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
.sw-theme-opt.on .sw-theme-check { display: flex; }
.sw-theme-name { font-size: 11px; font-weight: 500; color: var(--text-muted); }
.sw-theme-opt.on .sw-theme-name { font-weight: 600; color: var(--text); }
.sw-theme-dot[data-c="malva"]   { background: linear-gradient(150deg,#9F8096,#6C4B63); }
.sw-theme-dot[data-c="burdeos"] { background: linear-gradient(150deg,#A26A6E,#6D3540); }
.sw-theme-dot[data-c="oliva"]   { background: linear-gradient(150deg,#7B8268,#474F3D); }
.sw-theme-dot[data-c="noche"]   { background: linear-gradient(150deg,#66718C,#383F58); }
.sw-theme-dot[data-c="gris"]    { background: linear-gradient(150deg,#F2F0F3,#CFCAD1); }
.sw-theme-dot[data-c="rosa"]    { background: linear-gradient(150deg,#FAE9EC,#E7C2CB); }

/* Ajustes — toggle switch */
.sw-toggle-row { display: flex; align-items: center; gap: 12px; padding: 14px var(--card-pad); }
.sw-toggle { width: 46px; height: 27px; border-radius: 999px; position: relative; background: var(--surface-2); border: 1px solid var(--border); cursor: pointer; transition: background 200ms ease; flex-shrink: 0; }
.sw-toggle.on { background: var(--accent); }
.sw-toggle-knob { position: absolute; top: 2px; left: 2px; width: 21px; height: 21px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: left 200ms ease; }
.sw-toggle.on .sw-toggle-knob { left: 21px; }

/* ============ Inicio: hero Estado A (fase 1) ============ */
.hero-card-lead {
  font-size: 12px;
  line-height: 1.5;
  opacity: .72;
  margin: 8px 0 16px;
}

/* ============ Inicio: zona de carga (Estado A, fase 1b) ============ */
.hero-dropzone {
  width: 100%; background: transparent;
  border: 1.5px dashed var(--hero-line-strong); border-radius: var(--radius-md);
  height: 128px; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 9px; margin-bottom: 16px;
  font-family: var(--font); color: var(--hero-text); cursor: pointer;
  transition: transform var(--transition), border-color var(--transition);
}
.hero-dropzone:active { transform: scale(.99); }
.hero-dropzone-plus {
  width: 38px; height: 38px; border-radius: 50%; background: var(--accent);
  color: var(--accent-ink); font-size: 22px; font-weight: 400; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 14px -4px rgba(0,0,0,.3);
}
.hero-dropzone-title { font-size: 12.5px; font-weight: 600; }
.hero-dropzone-sub { font-size: 10.5px; opacity: .55; font-weight: 500; margin-top: -4px; }

/* ============ Inicio: hero Estado B — botella identificada (fase 1b) ============ */
#analyzeResultPanel {
  margin: 0 20px 24px; position: relative; overflow: hidden;
  background: var(--hero-grad); color: var(--hero-text);
  border-radius: var(--radius-lg); padding: 24px 22px;
  box-shadow: var(--shadow-hero);
  animation: sw-fade-up 200ms ease;
}
.arp-eyebrow {
  font-size: 10px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--gold-on-hero); margin-bottom: 12px; position: relative;
}
.arp-photo {
  border-radius: var(--radius-md); overflow: hidden; height: 250px; margin-bottom: 14px;
  background: rgba(0,0,0,.25); position: relative;
  display: flex; align-items: center; justify-content: center;
}
.arp-photo-img { max-width: 100%; max-height: 100%; object-fit: contain; }
.arp-close {
  position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; border-radius: 50%;
  background: rgba(0,0,0,.55); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  border: none; color: #fff; font-size: 15px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.arp-name { font-size: 19px; font-weight: 500; line-height: 1.25; margin-bottom: 3px; position: relative; }
.arp-meta { font-size: 12px; opacity: .65; margin-bottom: 12px; position: relative; }

.arp-rating-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-bottom: 10px; }
.arp-rating-cell {
  padding: 10px 12px; border-radius: var(--radius-sm);
  background: var(--hero-overlay); border: 1px solid var(--hero-line);
}
.arp-rating-head {
  display: flex; align-items: center; gap: 5px; margin-bottom: 4px;
  font-size: 10px; font-weight: 600; opacity: .7; letter-spacing: .04em; text-transform: uppercase;
}
.arp-rating-spark { color: var(--gold-on-hero); }
.arp-rating-num { font-family: var(--serif); font-size: 19px; font-weight: 600; }
.estimated .arp-rating-num { color: var(--gold-on-hero); }
.arp-rating-sub { font-size: 10px; opacity: .6; margin-top: 2px; }
.arp-rating-msg { font-size: 11.5px; opacity: .7; padding: 4px 0; }

.arp-stars-row {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  border-radius: var(--radius-sm); background: var(--hero-overlay);
  border: 1px solid var(--hero-line); margin-bottom: 16px;
}
.arp-stars-label { font-size: 11.5px; font-weight: 500; opacity: .75; flex: 1; }
.arp-stars { display: flex; gap: 4px; }
.arp-star {
  background: transparent; border: none; cursor: pointer; padding: 2px;
  font-size: 20px; line-height: 1; color: var(--hero-star-off);
  transition: color var(--transition), transform var(--transition);
}
.arp-star:active { transform: scale(.9); }
.arp-star.on { color: var(--gold-on-hero); }

.arp-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.arp-action {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 11px 8px; border-radius: var(--radius-sm);
  font-weight: 600; font-size: 12.5px; font-family: var(--font); cursor: pointer;
  background: transparent; color: var(--hero-text); border: 1px solid var(--hero-line-strong);
  transition: transform var(--transition), opacity var(--transition);
}
.arp-action:active { transform: scale(.97); }
.arp-action.primary { background: var(--accent); color: var(--accent-ink); border: none; }
.arp-action:disabled { opacity: .5; cursor: default; }

.arp-scan-another {
  background: transparent; border: none; color: var(--hero-text); opacity: .6;
  width: 100%; text-align: center; margin-top: 14px; font-size: 12px; font-weight: 500;
  cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px;
}

/* Estado B: neutralizar estilos heredados de .wine-ratings-card / textos del panel */
#analyzeResultPanel .wine-ratings-card {
  background: transparent; border: none; box-shadow: none; padding: 0; margin: 0 0 6px;
}
#analyzeResultPanel .arp-name { color: var(--hero-text); }
#analyzeResultPanel .arp-meta { color: var(--hero-text); opacity: .65; }

/* ============ Selección de modo de cata (arquetipo B, fase 2a) ============ */
.mp-context {
  display: flex; align-items: center; gap: 12px; margin-bottom: 22px;
  padding: 10px 12px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); box-shadow: var(--shadow-card);
}
.mp-thumb {
  width: 38px; height: 48px; border-radius: 8px; overflow: hidden;
  background: var(--surface-2); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.mp-thumb img { width: 100%; height: 100%; object-fit: contain; }
.mp-context-info { flex: 1; min-width: 0; }
.mp-context-name { font-size: 14px; font-weight: 500; color: var(--text); }
.mp-context-meta { font-size: 11px; color: var(--text-muted); }
.mp-type-chip {
  flex-shrink: 0; font-size: 9.5px; font-weight: 600; letter-spacing: .05em;
  text-transform: uppercase; padding: 4px 9px; border-radius: var(--radius-pill);
  background: var(--surface-2); color: var(--text-muted);
}
.mp-type-chip[data-tipo="tinto"] { background: color-mix(in srgb, var(--accent-deep) 14%, transparent); color: var(--accent-deep); }
.mp-type-chip[data-tipo="blanco"] { background: var(--amber-soft); color: var(--amber); }

.mp-title { font-size: 22px; font-weight: 500; color: var(--text); line-height: 1.25; margin-bottom: 6px; }
.mp-sub { font-size: 12.5px; color: var(--text-muted); line-height: 1.5; margin-bottom: 18px; }

.mp-cards { display: flex; flex-direction: column; gap: 12px; }
.mp-card {
  display: flex; align-items: center; gap: 14px; padding: 16px; width: 100%;
  text-align: left; font-family: var(--font); cursor: pointer;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-card);
  transition: transform var(--transition), border-color var(--transition);
}
.mp-card:active { transform: scale(.99); }
.mp-card.preferred { border-color: var(--accent); }
.mp-card-icon { width: 44px; height: 44px; flex-shrink: 0; }
.mp-card-body { flex: 1; min-width: 0; }
.mp-card-name { font-size: 14.5px; font-weight: 600; color: var(--text); margin-bottom: 3px; }
.mp-card-desc { font-size: 11.5px; color: var(--text-muted); line-height: 1.45; margin-bottom: 5px; }
.mp-card-meta { font-size: 10.5px; font-weight: 600; color: var(--amber); }
.mp-card-chevron { flex-shrink: 0; color: var(--text-muted); font-size: 20px; line-height: 1; }

/* ============ Cuestionario SAT — re-skin manteniendo estructura (fase 2b) ============ */
/* Progreso por fases */
/* ── Barra de fases del SAT — re-skin (fase 5): stepper calmo, sin "todo rojo".
      Antes: el override aplanaba TODO (global + 4 fases, done/partial/active) a
      accent → al llenarse quedaba una plasta rosa. Ahora: la fase ACTUAL se
      resalta en accent sólido, las COMPLETADAS en un tono suave, las PENDIENTES
      en track vacío. Se retira la barra global (redundante con las 4 fases). */
#s3 .sat-progress { background: var(--surface); border-bottom: 1px solid var(--border); }
#s3 .sat-progress-label { color: var(--accent); font-weight: 600; font-size: 12px; }
#s3 .sat-progress-count { color: var(--text-muted); font-weight: 600; font-size: 11.5px; }

/* La barra global (rose→blue) se retira: las 4 fases ya comunican el avance */
#s3 .sat-progress-bar-wrap { display: none; }

/* Segmentos de fase */
#s3 .sat-progress-sections { gap: 8px; }
#s3 .sat-prog-sec-bar {
  height: 6px; border-radius: 99px; background: var(--surface-2);
  outline: none; transition: background var(--transition);
}
#s3 .sat-prog-sec-fill { border-radius: 99px; transition: width .3s ease, background var(--transition); }

/* Completada / con avance parcial (no actual): tono suave, no compite */
#s3 .sat-prog-sec.done .sat-prog-sec-fill,
#s3 .sat-prog-sec.partial .sat-prog-sec-fill {
  background: color-mix(in srgb, var(--accent) 38%, var(--surface));
}
/* Fase ACTUAL: track con tinte tenue (identificable aun vacía) + relleno accent */
#s3 .sat-prog-sec.active-sec .sat-prog-sec-bar {
  background: color-mix(in srgb, var(--accent) 12%, var(--surface-2));
}
#s3 .sat-prog-sec.active-sec .sat-prog-sec-fill { background: var(--accent); }

/* Etiquetas: pendiente=muted · completada=texto · actual=accent */
#s3 .sat-prog-sec-label { color: var(--text-muted); font-weight: 600; font-size: 10px; }
#s3 .sat-prog-sec.done .sat-prog-sec-label { color: var(--text); }
#s3 .sat-prog-sec.active-sec .sat-prog-sec-label { color: var(--accent); font-weight: 700; }

/* Píldora del vino en curso */
#s3 .wine-pill {
  background: color-mix(in srgb, var(--hero) 7%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--hero) 14%, var(--border));
  border-radius: var(--radius-md);
}
#s3 .wine-pill-name { color: var(--text); font-family: var(--serif); }
#s3 .wine-pill-meta { color: var(--text-muted); }

/* Tarjetas de fase */
#s3 .card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-card);
}
#s3 .sat-label { font-size: 14px; font-weight: 600; color: var(--text); }

/* Texto de opción */
#s3 .opt-text { font-size: 13.5px; font-weight: 500; color: var(--text); }

/* ── Listas verticales EN FRAME (Dulzura, Color, Alcohol, Cuerpo…): un solo
      marco con filas separadas por líneas — NO pastillas. ── */
#s3 .opt-list:not(.opt-inline) {
  border: 1px solid var(--border); border-radius: var(--radius-md);
  overflow: hidden; background: var(--surface);
}
#s3 .opt-list:not(.opt-inline) .opt-item {
  border: none; border-bottom: 1px solid var(--border); border-radius: 0;
  padding: 13px 16px; background: var(--surface);
}
#s3 .opt-list:not(.opt-inline) .opt-item:last-child { border-bottom: none; }
#s3 .opt-list:not(.opt-inline) .opt-item.selected { background: color-mix(in srgb, var(--accent) 9%, var(--surface)); }
#s3 .opt-list:not(.opt-inline) .opt-item.selected .opt-text { color: var(--accent); font-weight: 600; }
#s3 .opt-list:not(.opt-inline) .opt-item.hint { background: var(--amber-soft); }
/* radio visible solo en las filas de frame (indicador de selección) */
#s3 .opt-list:not(.opt-inline) .opt-radio {
  display: block; width: 18px; height: 18px; border: 1.6px solid var(--border);
  border-radius: 50%; background: var(--surface); flex-shrink: 0;
}
#s3 .opt-list:not(.opt-inline) .opt-item.selected .opt-radio { border-color: var(--accent); background: var(--accent); }
#s3 .opt-list:not(.opt-inline) .opt-item.hint .opt-radio { border-color: var(--amber); }

/* ── Opciones inline como PASTILLAS (Limpidez, Intensidad, Acidez…) ── */
#s3 .opt-inline .opt-radio { display: none; }
#s3 .opt-inline .opt-item {
  border: 1px solid var(--border); border-radius: var(--radius-pill);
  padding: 9px 15px; background: var(--surface);
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}
#s3 .opt-inline .opt-item .opt-text { font-weight: 600; }
#s3 .opt-inline .opt-item.selected {
  background: var(--accent); border-color: var(--accent);
  box-shadow: 0 4px 12px -4px color-mix(in srgb, var(--accent) 50%, transparent);
}
#s3 .opt-inline .opt-item.selected .opt-text { color: var(--accent-ink); }
#s3 .opt-inline .opt-item.hint { border-color: var(--amber); background: var(--amber-soft); }

/* Aromas / sabores multi-select como píldoras */
#s3 .aroma-tag {
  border: 1px solid var(--border); border-radius: var(--radius-pill);
  padding: 8px 14px; background: var(--surface); color: var(--text);
  font-size: 12.5px; font-weight: 500;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}
#s3 .aroma-tag.sel { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
#s3 .aroma-tag.hint { border-color: var(--amber); color: var(--amber); }

/* Banner de tip (modo principiante) */
#s3 .hint-banner {
  background: var(--amber-soft); border: none;
  border-radius: var(--radius-md); color: var(--text);
}

/* Precedencia: una opción inline seleccionada gana al estilo de sugerencia (✦) */
#s3 .opt-inline .opt-item.selected.hint { background: var(--accent); border-color: var(--accent); }
#s3 .opt-inline .opt-item.selected.hint .opt-text { color: var(--accent-ink); }
#s3 .aroma-tag.sel.hint { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* ============ Ficha del vino #s2 — re-skin (fase 5) ============ */
#s2 .card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-card);
}
/* Punto del título a token de marca (no el azul de components.css) */
#s2 .card-title.ct-blue .dot { background: var(--accent); }

/* ============ Resultado de cata — re-skin (fase 2c) ============ */
#s4 .card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-card);
}
/* Anillo de puntuación */
#s4 .score-ring { width: 96px; height: 96px; border-width: 6px; }
#s4 .score-n { font-family: var(--serif); font-size: 1.9rem; font-weight: 600; }
#s4 .s-green { border-color: var(--success); color: var(--success); background: color-mix(in srgb, var(--success) 8%, var(--surface)); }
#s4 .s-amber { border-color: var(--amber); color: var(--amber); background: var(--amber-soft); }
#s4 .s-red { border-color: var(--accent-deep); color: var(--accent-deep); background: color-mix(in srgb, var(--accent-deep) 8%, var(--surface)); }
#s4 .score-summary { color: var(--text-muted); }

/* Comparativa Experto (verde) vs Tú (coral) */
#s4 .card-title.ct-green .dot { background: var(--success); }
#s4 .card-title.ct-blue .dot { background: var(--accent); }
#s4 .cmp-val-text.exp { color: var(--success); }
#s4 .cmp-val-text.stu { color: var(--accent); }
#s4 .cb-ok { background: color-mix(in srgb, var(--success) 12%, transparent); color: var(--success); }
#s4 .cb-warn { background: var(--amber-soft); color: var(--amber); }
#s4 .param-row, #s4 .param-row-block, #s4 .cmp-item { border-color: var(--border); }

/* Consejo (advice) y calificación estimada — bloques ámbar como el diseño */
#s4 .advice-card { background: var(--amber-soft); border: none; border-radius: var(--radius-lg); }
#s4 .advice-label { color: var(--amber); }
#s4 .advice-text { color: var(--text); }

/* ── Detalle desde historial — re-skin (fase 5): tokens, sin crema/ámbar viejo ── */
/* Calificación estimada: tarjeta de superficie limpia (antes gradiente crema) */
#s4 .detail-rating-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-card);
  padding: 14px 16px;
}
#s4 .detail-rating-icon { font-size: 1.1rem; color: var(--amber); line-height: 1.3; }
#s4 .detail-rating-label { color: var(--text-muted); }
#s4 .detail-rating-value { font-family: var(--serif); font-weight: 600; color: var(--text); }
#s4 .detail-rating-price { color: var(--text-muted); }
#s4 .detail-rating-note  { color: var(--text-muted); font-size: .8rem; line-height: 1.5; }
#s4 .rating-confidence {
  color: var(--success);
  background: color-mix(in srgb, var(--success) 12%, var(--surface));
}
#s4 .rating-confidence.low { color: var(--amber); background: var(--amber-soft); }

/* Banner "guardado, sin catar": callout suave de marca (antes crema hardcodeado) */
#s4 .uncated-status-banner {
  background: var(--hero-overlay); border: 1px solid var(--hero-line);
  border-radius: var(--radius-lg); color: var(--text);
}
#s4 .uncated-status-banner strong { color: var(--text); }
#s4 .uncated-notes { border-radius: var(--radius-lg); }
#s4 .uncated-notes-label { color: var(--text-muted); }

/* Badge de tipo de vino (Tinto/Blanco…): pill neutral de token, no el azul viejo */
#s4 .result-meta-sub .badge { background: var(--surface-2); color: var(--text-muted); }

/* Resultado express */
#s4 .express-result-card, #s4 .express-result-hero {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-card);
}

/* ============ Cata Express — re-skin (fase 2d) ============ */
#s3express .express-badge {
  background: var(--amber-soft); color: var(--amber);
  border-radius: var(--radius-pill); font-weight: 600;
}
#s3express .express-wine-pill {
  background: color-mix(in srgb, var(--hero) 7%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--hero) 14%, var(--border));
  border-radius: var(--radius-md); color: var(--text);
}
#s3express .express-q {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-card);
}
#s3express .express-q-num {
  background: var(--accent); color: var(--accent-ink);
  border-radius: 50%; font-weight: 600;
}
#s3express .express-q-title { color: var(--text); font-weight: 600; }
#s3express .express-q-hint { color: var(--text-muted); }
#s3express .ex-chip {
  border: 1px solid var(--border); border-radius: var(--radius-pill);
  padding: 8px 14px; background: var(--surface); color: var(--text);
  font-size: 12.5px; font-weight: 500;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}
#s3express .ex-chip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
#s3express .express-missing-hint { color: var(--amber); }

/* ============ Pantalla de espera (logo pulsante) — fase 2d ============ */
.loading { background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(2px); }
.loading .spinner { display: none; }
.loading-logo { width: 72px; height: 72px; margin: 0 auto 16px; animation: sw-pulse 1.2s ease-in-out infinite; }
.loading-msg { color: var(--text); font-family: var(--serif); font-size: 16px; }

/* ═══════════ FASE 3 — Raíces: Historial / Progreso / Logros ═══════════ */

/* Cabecera de pantalla raíz (arquetipo A): título + acción, sin back
   (la navegación vive en el tab bar). */
#sHistory .history-back-btn,
#sProgress .history-back-btn,
#sBadges .history-back-btn { display: none; }
#sHistory .history-page-header,
#sProgress .history-page-header,
#sBadges .history-page-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 0 14px; margin: 0;
}
#sHistory .history-page-title,
#sProgress .history-page-title,
#sBadges .history-page-title {
  font-family: var(--serif); font-size: 22px; font-weight: 600;
  color: var(--text); text-align: left;
}
.btn-delete-all { color: var(--text-muted); font-size: 12px; background: transparent; border: none; }
.badges-help-btn { color: var(--text-muted); background: transparent; border: 1px solid var(--border); border-radius: var(--radius-pill); padding: 6px 12px; }

/* Widget de racha (compartido en las 3 raíces + Inicio) */
.streak-widget {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); box-shadow: var(--shadow-card);
}
.streak-number { font-family: var(--serif); color: var(--text); }
.streak-label, .streak-progress-text { color: var(--text-muted); }
.streak-progress-bar { background: var(--surface-2); }
.streak-progress-fill { background: var(--amber); }

/* Estado vacío */
.empty-state { color: var(--text-muted); }
.empty-state p { color: var(--text-muted); }

/* ── Historial · filtros (rediseño): siempre visibles, agrupados en tarjeta y
      con chips amables (más aire, sin encimado). ── */
#sHistory .hist-filter { margin-bottom: 16px; }
#sHistory .hist-search {
  width: 100%; box-sizing: border-box; margin-bottom: 12px;
  background-color: var(--surface);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 13px center;
  border: 1px solid var(--border);
  border-radius: var(--radius-md); color: var(--text);
  padding: 11px 12px 11px 38px; font-size: 14px;
}
/* Panel siempre visible dentro de una tarjeta limpia (el "frame") */
#sHistory .hf-panel {
  display: flex; flex-direction: column; gap: 13px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-card);
  padding: 14px;
}
#sHistory .hf-row { display: flex; align-items: center; gap: 8px; }
#sHistory .hf-group { display: flex; flex-direction: column; gap: 8px; }
#sHistory .hf-label {
  font-size: 10.5px; font-weight: 600; letter-spacing: .07em;
  text-transform: uppercase; color: var(--text-muted);
}
#sHistory .hf-row .hf-label { flex-shrink: 0; }
#sHistory .sort-select {
  flex: 1; min-width: 0; padding: 9px 10px; font-size: 13px; cursor: pointer;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text);
}
#sHistory .sort-dir-btn {
  width: 36px; height: 36px; flex-shrink: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-size: 15px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text-muted);
}
#sHistory .filter-chips { display: flex; flex-wrap: wrap; gap: 7px; }
#sHistory .filter-chip {
  padding: 7px 13px; line-height: 1; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-pill); color: var(--text);
  font-size: 12.5px; font-weight: 600; text-transform: none;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}
#sHistory .filter-chip:hover { border-color: var(--accent); }
#sHistory .filter-chip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* Tarjeta de cata en el historial */
.history-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); box-shadow: var(--shadow-card);
}
.history-thumb {
  width: 54px; height: 70px; border-radius: 10px; overflow: hidden;
  background: var(--surface-2); display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.history-thumb img { width: 100%; height: 100%; object-fit: contain; }
.history-name { font-family: var(--serif); font-size: 14px; font-weight: 600; color: var(--text); }
.history-sub { font-size: 11.5px; color: var(--text-muted); }
.history-score { font-family: var(--serif); font-weight: 600; }
.history-score.hs-a, .history-score.hs-b, .history-score.hs-c { color: var(--success); }
.history-del { background: transparent; border: none; color: var(--text-muted); }
.uncated-badge { color: var(--text-muted); }
.btn-start-tasting, .btn-upgrade-tasting { color: var(--accent); font-weight: 600; }
.loc-add { color: var(--text-muted); }

/* ── Progreso ── */
#sProgress .card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); }
#sProgress .stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 14px; }
#sProgress .stat-pill {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); box-shadow: var(--shadow-card);
  padding: 12px 6px; text-align: center;
}
#sProgress .stat-num { font-family: var(--serif); font-size: 19px; font-weight: 600; color: var(--text); }
#sProgress .stat-lbl { font-size: 9px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--text-muted); margin-top: 3px; }
#sProgress .stats-section-lbl { font-size: 10.5px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--text-muted); margin: 14px 0 8px; }
#sProgress .param-strip-name { color: var(--text); }
#sProgress .param-strip-bar-track { background: var(--surface-2); border-radius: var(--radius-pill); overflow: hidden; }
#sProgress .tipo-stack { border-radius: var(--radius-pill); overflow: hidden; }
#sProgress .tipo-legend-item { color: var(--text-muted); }

/* Tu mejor cata — tarjeta hero */
#sProgress .best-tasting-card {
  background: var(--hero-grad); color: var(--hero-text);
  border: none; border-radius: var(--radius-lg); box-shadow: var(--shadow-hero);
}
#sProgress .bt-label { color: var(--gold-on-hero); }
#sProgress .bt-name { font-family: var(--serif); color: var(--hero-text); }
#sProgress .bt-meta, #sProgress .bt-tipo { color: var(--hero-text); opacity: .72; }
#sProgress .bt-chevron { color: var(--hero-text); opacity: .7; }
#sProgress .bt-thumb { background: rgba(0,0,0,.2); border-radius: 10px; }

/* Próximo paso */
#sProgress .next-step-card { background: var(--amber-soft); border: none; border-radius: var(--radius-lg); }
#sProgress .next-step-label { color: var(--amber); font-weight: 600; }
#sProgress .next-step-text { color: var(--text); }

/* ── Logros ── */
#sBadges .next-badge-hero {
  background: var(--hero-grad); color: var(--hero-text);
  border: none; border-radius: var(--radius-lg); box-shadow: var(--shadow-hero);
}
#sBadges .next-badge-label { font-size: 9.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--amber); }
#sBadges .next-badge-name { font-family: var(--serif); font-size: 16px; font-weight: 500; color: var(--hero-text); }
#sBadges .next-badge-hint { color: var(--hero-text); opacity: .7; }
#sBadges .next-badge-img-wrap { width: 64px; height: 64px; background: transparent; padding: 0; }
#sBadges .next-badge-img { width: 64px; height: 64px; filter: none; }
#sBadges .next-badge-progress-bar { background: var(--hero-line); border-radius: var(--radius-pill); overflow: hidden; }
#sBadges .next-badge-progress-fill { background: var(--gold-on-hero); }
#sBadges .next-badge-progress-text { color: var(--hero-text); opacity: .7; }

#sBadges .all-badges-inline-title { font-size: 10.5px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--text-muted); }
#sBadges .all-badges-inline-count { color: var(--text-muted); font-weight: 600; }
#sBadges .abi-category-label { font-size: 10px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--text-muted); margin: 12px 0 8px; }
#sBadges .abi-category-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
#sBadges .abi-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); box-shadow: var(--shadow-card);
  padding: 14px 10px; text-align: center;
}
#sBadges .abi-card-img { width: 74px; height: 74px; }
#sBadges .abi-card.locked .abi-card-img { filter: grayscale(1) opacity(.4); }
#sBadges .abi-card-name { font-size: 12.5px; font-weight: 600; color: var(--text); }
#sBadges .abi-card.locked .abi-card-name { color: var(--text-muted); }
#sBadges .abi-card-desc { font-size: 10.5px; color: var(--text-muted); }

/* CTA de sugerencias — DESTACADO (etapa beta): gradiente cálido ámbar→accent con
   texto blanco. Visible y llamativo en Home y Logros para invitar a dar feedback.
   Prefijo body.sw-root para ganarle a las reglas body.dark de gamification.css. */
body.sw-root .suggestion-cta {
  display: flex; align-items: center; gap: 12px;
  width: 100%; margin: 14px 0; text-align: left;
  background: linear-gradient(135deg, var(--amber) 0%, var(--accent) 100%);
  border: none; border-radius: var(--radius-lg);
  padding: 14px 16px; cursor: pointer;
  color: #fff;
  box-shadow: 0 8px 22px -8px color-mix(in srgb, var(--accent) 60%, transparent);
  transition: transform .15s ease, box-shadow .2s ease, filter .15s ease;
}
body.sw-root .suggestion-cta:hover {
  transform: translateY(-1px); filter: brightness(1.04);
  box-shadow: 0 10px 26px -8px color-mix(in srgb, var(--accent) 65%, transparent);
}
body.sw-root .suggestion-cta-icon { font-size: 1.5rem; flex-shrink: 0; }
body.sw-root .suggestion-cta-title { color: #fff; font-weight: 700; font-size: 14px; line-height: 1.2; }
body.sw-root .suggestion-cta-sub { color: rgba(255,255,255,.92); font-size: 12px; margin-top: 2px; line-height: 1.35; }
body.sw-root .suggestion-cta-sub strong { color: #fff; text-decoration: underline; text-underline-offset: 2px; }
body.sw-root .suggestion-cta-chevron { color: #fff; opacity: .85; font-size: 1.4rem; flex-shrink: 0; }

/* ═══════════ ARREGLOS (feedback Gaby) ═══════════ */

/* Hero Estado A: usar el degradado translúcido del diseño (no la plasta #5B2A4E) */
#newTastingCard.hero-card {
  background: var(--hero-grad);
  color: var(--hero-text);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-hero);
}
.hero-card-watermark { opacity: .13; }
.hero-card-eyebrow { color: var(--gold-on-hero); font-weight: 600; }
.hero-card-title { font-family: var(--serif); font-weight: 500; }

/* Racha (StreakBar del diseño) — compacta, consistente en todas las pantallas */
.streak-widget {
  display: flex; align-items: center; gap: 11px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); box-shadow: var(--shadow-card);
  padding: 11px 14px; margin: 0 0 14px;
}
.streak-widget:hover { transform: none; box-shadow: var(--shadow-card); }
.streak-flame {
  width: 17px; height: 17px; flex-shrink: 0; color: var(--amber);
  animation: none; filter: none;
}
.streak-body { flex: 1; min-width: 0; }
.streak-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.streak-headline { font-size: 12px; font-weight: 600; color: var(--text); white-space: nowrap; }
.streak-number { font-family: var(--font); font-size: 12px; font-weight: 600; color: var(--text); letter-spacing: 0; }
.streak-label { font-size: 12px; font-weight: 600; color: var(--text); }
.streak-progress-text { font-size: 11px; color: var(--text-muted); font-weight: 500; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.streak-progress-bar { height: 4px; background: var(--surface-2); border-radius: 2px; overflow: hidden; }
.streak-progress-fill { height: 100%; background: var(--amber); border-radius: 2px; width: 0%; transition: width 400ms ease; }
/* Overrides de modo oscuro heredados (gamification.css) */
.sw-root[data-mode="dark"] .streak-widget { background: var(--surface); border-color: var(--border); }
.sw-root[data-mode="dark"] .streak-number,
.sw-root[data-mode="dark"] .streak-headline,
.sw-root[data-mode="dark"] .streak-label { color: var(--text); }
.sw-root[data-mode="dark"] .streak-progress-bar { background: var(--surface-2); }

/* Estado B — ficha completa colapsable */
.arp-details-toggle {
  background: transparent; border: none; cursor: pointer;
  color: var(--hero-text); opacity: .75; font-family: var(--font);
  font-size: 11.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 5px;
  margin: 0 0 12px; padding: 2px 0;
}
.arp-details-chev { font-size: 10px; }
.arp-details {
  background: var(--hero-overlay); border: 1px solid var(--hero-line);
  border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 14px;
}
.arp-details.hidden { display: none; }
.arp-detail-row { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; font-size: 12px; }
.arp-detail-k { color: var(--hero-text); opacity: .6; }
.arp-detail-v { color: var(--hero-text); font-weight: 500; text-align: right; }
.arp-detail-desc { color: var(--hero-text); opacity: .75; font-size: 11.5px; line-height: 1.5; margin-top: 8px; }
.arp-detail-edit { display: inline-block; margin-top: 12px; background: transparent; border: none; cursor: pointer; color: var(--gold-on-hero); font-family: var(--font); font-size: 11.5px; font-weight: 600; padding: 0; }

/* Racha: quitar el uppercase heredado del CSS viejo */
.streak-headline, .streak-number, .streak-label {
  text-transform: none; letter-spacing: normal;
}

/* ═══════════ Historial — tarjeta rediseñada v2 (feedback Gaby) ═══════════ */
#sHistory .history-card {
  display: block; padding: 14px 16px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-card); margin-bottom: 12px;
}
#sHistory .hc-top { display: flex; gap: 12px; align-items: flex-start; }
#sHistory .history-thumb {
  width: 54px; height: 70px; border-radius: 10px; overflow: hidden;
  background: var(--surface-2); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
#sHistory .history-thumb img { width: 100%; height: 100%; object-fit: cover; }
#sHistory .hc-main { flex: 1; min-width: 0; }
#sHistory .hc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 5px; }
#sHistory .history-name { font-family: var(--serif); font-size: 15px; font-weight: 600; color: var(--text); line-height: 1.25; }

/* Píldora superior derecha */
#sHistory .hc-pill {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 600; padding: 4px 10px;
  border-radius: var(--radius-pill); white-space: nowrap;
}
#sHistory .hc-pill-start { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); cursor: pointer; }
#sHistory .hc-pill-express { background: var(--amber-soft); color: var(--amber); }
#sHistory .hc-pill-score.hs-g { background: color-mix(in srgb, var(--success) 13%, transparent); color: var(--success); }
#sHistory .hc-pill-score.hs-a { background: var(--amber-soft); color: var(--amber); }
#sHistory .hc-pill-score.hs-r { background: color-mix(in srgb, var(--accent-deep) 12%, transparent); color: var(--accent-deep); }

/* Tipo (coloreado) + origen */
#sHistory .hc-typeline { display: flex; align-items: baseline; gap: 8px; margin-bottom: 3px; flex-wrap: wrap; }
#sHistory .hc-type { font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
#sHistory .hc-type[data-tipo="tinto"] { color: var(--accent-deep); }
#sHistory .hc-type[data-tipo="blanco"] { color: var(--amber); }
#sHistory .hc-type[data-tipo="rosado"] { color: #E0729B; }
#sHistory .hc-type[data-tipo="espumoso"],
#sHistory .hc-type[data-tipo="dulce"],
#sHistory .hc-type[data-tipo="fortificado"] { color: var(--text-muted); }
#sHistory .hc-origin { font-size: 12px; color: var(--text-muted); min-width: 0; }

/* Fecha + lugar */
#sHistory .hc-dateline { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text-muted); flex-wrap: wrap; }
#sHistory .hc-dot { opacity: .5; }
#sHistory .loc-badge { color: var(--text-muted); }
#sHistory .hc-dateline .loc-add { color: var(--accent); cursor: pointer; font-weight: 500; }

/* Divisor + fila inferior */
#sHistory .hc-divider { height: 1px; background: var(--border); margin: 12px 0 10px; }
#sHistory .hc-bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
#sHistory .hc-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; flex: 1; min-width: 0; }
#sHistory .star-row { display: inline-flex; gap: 2px; }
#sHistory .star-row .star { color: color-mix(in srgb, var(--text-muted) 42%, transparent); font-size: 15px; cursor: pointer; line-height: 1; }
#sHistory .star-row .star.on { color: var(--amber); }
#sHistory .hc-sep { width: 1px; height: 14px; background: var(--border); flex-shrink: 0; }
#sHistory .hc-rec { color: var(--accent); font-weight: 600; font-size: 12px; cursor: pointer; }
#sHistory .btn-upgrade-tasting { color: var(--amber); font-weight: 600; font-size: 12px; cursor: pointer; }
#sHistory .history-del {
  width: 34px; height: 34px; border-radius: var(--radius-sm);
  background: var(--surface-2); border: none; color: var(--text-muted); cursor: pointer;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 14px;
}

/* Icono de marca del modo dentro de la píldora del Historial */
#sHistory .hc-pill-ic { width: 15px; height: 15px; flex-shrink: 0; object-fit: contain; }

/* ═══════════ Footer del flujo de cata — unificado (feedback Gaby) ═══════════
   CTA primario a todo el ancho, altura fija, una sola línea. Back compacto de
   ancho fijo para que el CTA sea SIEMPRE del mismo tamaño. Aplica a ficha (#s2),
   Express (#s3express), cuestionario (#s3nav) y resultado (#s4). */
.cata-foot {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 150;
  display: flex; gap: 10px; align-items: stretch;
  grid-template-columns: none; /* anula el grid heredado de .bottom-nav si lo hubiera */
  padding: 10px 20px calc(10px + env(safe-area-inset-bottom, 0px));
  background: var(--nav-bg);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
}
.cata-foot-back,
.cata-foot-mid,
.cata-foot-next {
  height: 50px; border-radius: var(--radius-sm);
  font-family: var(--font); font-size: 14px; font-weight: 600;
  cursor: pointer; white-space: nowrap;
  display: flex; align-items: center; justify-content: center;
  transition: transform var(--transition), background var(--transition);
}
.cata-foot-back:active,
.cata-foot-mid:active,
.cata-foot-next:active { transform: scale(.98); }
.cata-foot-back {
  flex: 0 0 92px;
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
}
.cata-foot-mid {
  flex: 1; min-width: 0; padding: 0 10px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
}
.cata-foot-next {
  flex: 1; min-width: 0; padding: 0 14px;
  background: var(--accent); border: none; color: var(--accent-ink);
}
.cata-foot-next:disabled { background: var(--surface-2); color: var(--text-muted); cursor: default; }

/* ═══════════ Progreso v3 — cards de sección (spec) ═══════════ */
#sProgress .sp-card { margin: 0 0 14px; padding: var(--card-pad); }
#sProgress .sp-card.hidden { display: none; }

/* Catas por modo — tiles */
#sProgress .sp-modo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
#sProgress .sp-modo-tile {
  background: var(--surface-2); border-radius: var(--radius-md); padding: 12px 8px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
#sProgress .sp-modo-ic { width: 22px; height: 22px; object-fit: contain; }
#sProgress .sp-modo-num { font-family: var(--serif); font-size: 19px; font-weight: 600; color: var(--text); line-height: 1; }
#sProgress .sp-modo-lbl { font-size: 9px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); }

/* Evolución */
#sProgress .sp-evol-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
#sProgress .sp-evol-legend { font-size: 10.5px; font-weight: 600; color: var(--text-muted); }
#sProgress .sp-evol-svg { width: 100%; height: auto; overflow: visible; display: block; margin: 12px 0 2px; }
#sProgress .sp-evol-foot { display: flex; justify-content: space-between; padding-left: 26px; font-size: 10px; font-weight: 500; color: var(--text-muted); }

/* Por tipo — dona */
#sProgress .sp-tipo-row { display: flex; align-items: center; gap: 22px; margin-top: 14px; }
#sProgress .sp-tipo-donut { width: 92px; height: 92px; flex-shrink: 0; }
#sProgress .sp-donut-total { font-family: var(--serif); font-weight: 600; fill: var(--text); }
#sProgress .sp-donut-sub { font-weight: 600; fill: var(--text-muted); }
#sProgress .sp-tipo-legend { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
#sProgress .sp-tipo-leg { display: flex; align-items: center; gap: 8px; }
#sProgress .sp-tipo-sq { width: 8px; height: 8px; border-radius: 3px; flex-shrink: 0; }
#sProgress .sp-tipo-name { font-size: 12.5px; font-weight: 500; color: var(--text); flex: 1; min-width: 0; }
#sProgress .sp-tipo-count { font-family: var(--serif); font-size: 14px; font-weight: 600; color: var(--text); }
#sProgress .sp-tipo-pct { font-size: 11px; font-weight: 600; color: var(--text-muted); width: 32px; text-align: right; }

/* Parámetros SAT (spec v3) — barras Dominado/Por mejorar */
#sProgress .sp-sat-list { display: flex; flex-direction: column; gap: 13px; margin-top: 14px; }
#sProgress .sp-sat-head { display: flex; align-items: baseline; margin-bottom: 6px; }
#sProgress .sp-sat-name { font-size: 12.5px; font-weight: 500; color: var(--text); flex: 1; min-width: 0; }
#sProgress .sp-sat-val { font-size: 11px; font-weight: 500; color: var(--text-muted); }
#sProgress .sp-sat-track { height: 4px; border-radius: 2px; background: var(--surface-2); overflow: hidden; }
#sProgress .sp-sat-fill { height: 100%; border-radius: 2px; }
#sProgress .sp-sat-legend { display: flex; gap: 16px; margin-top: 14px; }
#sProgress .sp-sat-leg { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text-muted); font-weight: 500; }
#sProgress .sp-sat-dot { width: 7px; height: 7px; border-radius: 50%; }

/* ═══════════ Auth (Login / Registro / recuperación) — spec ═══════════ */
.auth-wrap { max-width: 440px; margin: 0 auto; padding: 4px 0 40px; }
.auth-head { padding: 14px 20px 0; }
.auth-back { width: 30px; height: 30px; border-radius: 50%; background: var(--surface); border: 1px solid var(--border); display: inline-flex; align-items: center; justify-content: center; color: var(--text); font-size: 16px; text-decoration: none; }
.auth-brand { text-align: center; padding: 22px 20px; }
.auth-logo { width: 52px; height: 52px; }
.auth-word { font-family: var(--serif); font-size: 24px; font-weight: 600; color: var(--text); margin-top: 8px; }
.auth-word span { color: var(--accent); }
.auth-tag { font-size: 9px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--text-muted); margin-top: 6px; }
.auth-card { margin: 0 20px; padding: 22px 20px; }
.auth-title { font-family: var(--serif); font-size: 19px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.auth-sub { font-size: 12px; color: var(--text-muted); margin-bottom: 18px; line-height: 1.5; }
.auth-field { margin-bottom: 14px; }
.auth-label { display: block; font-size: 11.5px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.auth-input { width: 100%; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 13px; font-family: var(--font); font-size: 13.5px; color: var(--text); transition: border-color var(--transition); }
.auth-input::placeholder { color: var(--text-muted); }
.auth-input:focus { outline: none; border-color: var(--accent); }
.auth-btn { width: 100%; background: var(--accent); color: var(--accent-ink); border: none; border-radius: var(--radius-sm); padding: 13px 10px; font-family: var(--font); font-size: 14.5px; font-weight: 600; cursor: pointer; margin-top: 4px; min-height: 44px; transition: transform var(--transition), background var(--transition); }
.auth-btn:active { transform: scale(.98); }
.auth-btn:disabled { background: var(--surface-2); color: var(--text-muted); cursor: default; }
.auth-forgot { display: block; text-align: center; margin-top: 14px; font-size: 12px; font-weight: 500; color: var(--text-muted); text-decoration: none; }
.auth-switch { text-align: center; margin-top: 14px; font-size: 12.5px; color: var(--text-muted); }
.auth-switch a { color: var(--accent); font-weight: 600; text-decoration: none; }
.auth-error { background: color-mix(in srgb, var(--accent-deep) 8%, transparent); border: 1px solid color-mix(in srgb, var(--accent-deep) 28%, transparent); color: var(--accent-deep); border-radius: var(--radius-sm); padding: 10px 13px; font-size: 12.5px; margin-bottom: 14px; }
.auth-field-error { border-color: var(--accent-deep) !important; }
.auth-msg { font-size: 11px; color: var(--accent-deep); margin-top: 5px; }
.auth-legal { text-align: center; margin-top: 22px; font-size: 10.5px; color: var(--text-muted); }
.auth-legal a { color: var(--text-muted); text-decoration: none; }
.auth-hint { font-size: 10.5px; color: var(--text-muted); margin-top: 5px; line-height: 1.4; }
/* Registro: checkbox de términos */
.auth-check-row { display: flex; align-items: flex-start; gap: 10px; margin: 6px 0 16px; }
.auth-check { width: 19px; height: 19px; border-radius: 5px; border: 1.5px solid var(--border); background: var(--surface); flex-shrink: 0; cursor: pointer; -webkit-appearance: none; appearance: none; position: relative; margin-top: 1px; }
.auth-check:checked { background: var(--accent); border-color: var(--accent); }
.auth-check:checked::after { content: '✓'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--accent-ink); font-size: 12px; font-weight: 700; }
.auth-check-label { font-size: 11.5px; color: var(--text-muted); line-height: 1.45; }
.auth-check-label a { color: var(--accent); text-decoration: none; }

/* Auth: notas/estados (correo enviado, enlace inválido/expirado, éxito) */
.auth-note { text-align: center; padding: 6px 4px 2px; }
.auth-note-ic { font-size: 34px; line-height: 1; }
.auth-note-title { font-family: var(--serif); font-size: 17px; font-weight: 600; color: var(--text); margin: 10px 0 5px; }
.auth-note-text { font-size: 12.5px; color: var(--text-muted); line-height: 1.55; }

/* Estado B — descripción del vino (nota de la calificación estimada) */
.arp-note {
  background: var(--hero-overlay); border: 1px solid var(--hero-line);
  border-radius: var(--radius-sm); padding: 11px 13px; margin: 4px 0 14px;
  font-size: 12px; line-height: 1.55; color: var(--hero-text); opacity: .92;
}
.arp-note.hidden { display: none; }

/* Estado B — aviso "¿guardar también en tu colección?" tras calificar */
.arp-rate-prompt {
  display: flex; align-items: center; gap: 10px;
  background: var(--hero-overlay); border: 1px solid var(--hero-line);
  border-radius: var(--radius-sm); padding: 9px 11px 9px 13px; margin: 2px 0 12px;
}
.arp-rate-prompt.hidden { display: none; }
.arp-rate-prompt-txt {
  flex: 1; font-size: 12px; line-height: 1.4; color: var(--hero-text); opacity: .92;
}
.arp-rate-prompt-btn {
  flex-shrink: 0; padding: 7px 15px; border: none; border-radius: 999px;
  background: var(--accent); color: #fff; font: inherit; font-size: 12.5px;
  font-weight: 600; cursor: pointer; transition: filter .15s ease;
}
.arp-rate-prompt-btn:hover { filter: brightness(1.06); }
.arp-rate-prompt-btn:active { transform: translateY(1px); }

/* ═══════════ EXPERIENCIAS (#sExperiencias) — hub ═══════════ */
#sExperiencias .xp-sub {
  color: var(--text-muted); font-size: 13px; margin: -6px 0 16px;
}
#sExperiencias .xp-grid { display: flex; flex-direction: column; gap: 11px; }
#sExperiencias .xp-card {
  display: flex; align-items: center; gap: 13px; width: 100%; text-align: left;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-card);
  padding: 13px; cursor: pointer;
  transition: transform .12s ease, box-shadow .18s ease, border-color .15s ease;
}
#sExperiencias .xp-card:hover { transform: translateY(-1px); box-shadow: 0 8px 20px -8px color-mix(in srgb, var(--hero) 30%, transparent); }
#sExperiencias .xp-card:active { transform: translateY(0); }
/* La experiencia disponible destaca con borde de acento */
#sExperiencias .xp-featured { border: 1.5px solid var(--accent); }

#sExperiencias .xp-ic {
  width: 48px; height: 48px; flex-shrink: 0; border-radius: 13px;
  display: flex; align-items: center; justify-content: center; font-size: 24px;
}
#sExperiencias .xp-ic-viajes      { background: color-mix(in srgb, var(--hero) 16%, var(--surface)); }
#sExperiencias .xp-ic-catas       { background: color-mix(in srgb, var(--accent) 12%, var(--surface)); }
#sExperiencias .xp-ic-colecciones { background: var(--amber-soft); }
#sExperiencias .xp-ic-maridajes   { background: color-mix(in srgb, var(--success) 14%, var(--surface)); }

#sExperiencias .xp-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
#sExperiencias .xp-title { font-family: var(--serif); font-size: 15px; font-weight: 600; color: var(--text); line-height: 1.2; }
#sExperiencias .xp-desc { font-size: 12.5px; color: var(--text-muted); line-height: 1.4; }

#sExperiencias .xp-chip {
  flex-shrink: 0; align-self: flex-start; font-size: 11px; font-weight: 600;
  padding: 3px 10px; border-radius: var(--radius-pill); white-space: nowrap;
  background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--border);
}
#sExperiencias .xp-chip-on {
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
  color: var(--accent); border-color: transparent;
}

/* ═══════════ VIAJES (#sViajes) ═══════════ */
#sViajes .vj-back {
  background: transparent; border: none; color: var(--accent);
  font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; padding: 4px 0;
}
#sViajes .vj-view { display: none; }
#sViajes .vj-view.active { display: block; }

/* Lista de viajes */
.vj-new-btn {
  width: 100%; padding: 13px; margin-bottom: 14px; cursor: pointer;
  background: var(--hero-grad); color: var(--hero-text);
  border: none; border-radius: var(--radius-lg); box-shadow: var(--shadow-hero, 0 8px 22px -10px rgba(0,0,0,.3));
  font: inherit; font-size: 14px; font-weight: 600;
}
.vj-empty { text-align: center; padding: 40px 16px; color: var(--text-muted); }
.vj-empty-icon { font-size: 2.4rem; margin-bottom: 10px; }
.vj-empty p { color: var(--text-muted); line-height: 1.5; }

.vj-trip-card {
  display: block; width: 100%; text-align: left; cursor: pointer; margin-bottom: 12px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-card); padding: 14px 16px;
}
.vj-trip-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.vj-trip-name { font-family: var(--serif); font-size: 16px; font-weight: 600; color: var(--text); }
.vj-trip-region { font-size: 12.5px; color: var(--text-muted); margin-bottom: 8px; }
.vj-trip-stats { display: flex; gap: 6px; font-size: 12px; color: var(--text-muted); }
.vj-trip-status { font-size: 10.5px; font-weight: 700; padding: 3px 9px; border-radius: var(--radius-pill); white-space: nowrap; }
.vj-st-plan  { background: var(--amber-soft); color: var(--amber); }
.vj-st-curso { background: color-mix(in srgb, var(--accent) 12%, var(--surface)); color: var(--accent); }
.vj-st-fin   { background: color-mix(in srgb, var(--success) 12%, var(--surface)); color: var(--success); }

/* Crear viaje */
.vj-region-card { padding: 16px; margin-bottom: 14px; }
.vj-region-input {
  width: 100%; box-sizing: border-box; margin: 8px 0 10px; padding: 11px 12px; font-size: 14px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-md); color: var(--text);
}
.vj-region-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 12px; }
.vj-region-chip {
  padding: 6px 11px; cursor: pointer; font: inherit; font-size: 11.5px; font-weight: 600;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-pill); color: var(--text-muted);
}
.vj-region-chip:hover { border-color: var(--accent); color: var(--accent); }
.vj-suggest-btn {
  width: 100%; padding: 12px; cursor: pointer; font: inherit; font-size: 14px; font-weight: 600;
  background: var(--accent); color: var(--accent-ink); border: none; border-radius: var(--radius-md);
}
.vj-suggest-btn:disabled { opacity: .7; cursor: default; }
.vj-disclaimer { font-size: 11px; color: var(--text-muted); line-height: 1.4; margin-top: 9px; }

.vj-sel-head { display: flex; align-items: baseline; justify-content: space-between; margin: 14px 0 8px; }
.vj-sel-hint { font-size: 11px; color: var(--text-muted); }

/* Vinícola seleccionable */
.vj-winery {
  display: flex; gap: 10px; align-items: flex-start; cursor: pointer; margin-bottom: 9px; padding: 12px 13px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  transition: border-color var(--transition), background var(--transition);
}
.vj-winery.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 5%, var(--surface)); }
.vj-winery-check {
  flex-shrink: 0; width: 22px; height: 22px; margin-top: 1px; border-radius: 6px;
  border: 1.6px solid var(--border); display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 13px; font-weight: 700;
}
.vj-winery.on .vj-winery-check { background: var(--accent); border-color: var(--accent); }
.vj-winery-body { flex: 1; min-width: 0; }
.vj-winery-name { font-family: var(--serif); font-size: 14.5px; font-weight: 600; color: var(--text); display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.vj-pin-num {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 20px; height: 20px; border-radius: 50%; background: var(--accent); color: #fff;
  font-family: var(--font); font-size: 11px; font-weight: 700;
}
.vj-winery-meta { font-size: 12px; color: var(--text-muted); margin-top: 4px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.vj-catas-badge { background: var(--amber-soft); color: var(--amber); font-weight: 600; font-size: 10.5px; padding: 2px 7px; border-radius: var(--radius-pill); }
.vj-winery-tags { font-size: 12px; color: var(--accent); font-weight: 500; margin-top: 5px; }
.vj-winery-desc { font-size: 12px; color: var(--text-muted); line-height: 1.45; margin-top: 5px; }

.vj-save-btn {
  width: 100%; margin: 14px 0 8px; padding: 13px; cursor: pointer; font: inherit; font-size: 14px; font-weight: 600;
  background: var(--accent); color: var(--accent-ink); border: none; border-radius: var(--radius-md);
}
.vj-save-btn:disabled { opacity: .5; cursor: default; }

/* Detalle del viaje */
.vj-detail-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; }
.vj-detail-name { font-family: var(--serif); font-size: 18px; font-weight: 600; color: var(--text); }
.vj-detail-region { font-size: 13px; color: var(--text-muted); margin: 2px 0 8px; }
.vj-detail-summary { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-muted); margin-bottom: 10px; }
.vj-detail-summary strong { color: var(--text); font-family: var(--serif); }
.vj-sum-dot { opacity: .5; }
.vj-status-seg { display: flex; gap: 6px; margin-bottom: 12px; }
.vj-seg-btn {
  flex: 1; padding: 8px 6px; cursor: pointer; font: inherit; font-size: 12px; font-weight: 600;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text-muted);
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}
.vj-seg-btn.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.vj-detail-list { margin-top: 12px; }
.vj-detail-winery {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 13px; margin-bottom: 10px;
}
.vj-detail-winery.visited { border-color: color-mix(in srgb, var(--success) 40%, var(--border)); }
.vj-visited-badge { font-size: 10.5px; font-weight: 700; color: var(--success); background: color-mix(in srgb, var(--success) 12%, var(--surface)); padding: 2px 8px; border-radius: var(--radius-pill); }
.vj-winery-catas { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.vj-cata-chip { cursor: pointer; font-size: 11.5px; font-weight: 600; color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--surface)); padding: 4px 10px; border-radius: var(--radius-pill); }
.vj-catar-btn {
  width: 100%; margin-top: 10px; padding: 9px; cursor: pointer; font: inherit; font-size: 13px; font-weight: 600;
  background: var(--surface-2); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.vj-catar-btn:hover { border-color: var(--accent); color: var(--accent); }
.vj-delete-trip {
  width: 100%; margin: 16px 0 8px; padding: 10px; cursor: pointer; font: inherit; font-size: 12.5px;
  background: transparent; color: var(--text-muted); border: 1px solid var(--border); border-radius: var(--radius-sm);
}

/* Mapa (Leaflet) */
#sViajes .vj-map { height: 220px; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); margin-bottom: 6px; z-index: 0; }
.vj-map-pin {
  display: flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent); color: #fff; font-weight: 700; font-size: 12px;
  border: 2px solid #fff; box-shadow: 0 1px 5px rgba(0,0,0,.45);
}
.leaflet-container { font: inherit; background: var(--surface-2); }
.leaflet-popup-content { font-size: 12.5px; }
/* Modo oscuro: atenuar tiles para que peguen con el tema */
.sw-root[data-mode="dark"] #sViajes .vj-map .leaflet-tile { filter: brightness(0.75) invert(0) contrast(1.05); }

/* Banner "Catando en …" (Home, cata en ruta) */
.trip-cata-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--accent) 32%, var(--border));
  border-radius: var(--radius-md); padding: 10px 13px; margin-bottom: 12px;
}
.trip-cata-banner.hidden { display: none; }
.tcb-text { font-size: 13px; color: var(--text); line-height: 1.35; }
.tcb-text strong { color: var(--accent); }
.tcb-cancel {
  flex-shrink: 0; background: transparent; border: none; cursor: pointer;
  color: var(--text-muted); font: inherit; font-size: 12px; font-weight: 600; text-decoration: underline;
}
