
/* ======================================================================
   GLOBAL STYLE SECTION — START
   Anything in here (CSS custom properties, @font-face, base element
   rules) applies to the whole app. If you want a font swapped everywhere,
   change it in :root below, not in a component's own class.
   ====================================================================== */
:root{
  --bg:#0b0c18;
  /* --surface/--surface-2 used to lean warm brown (#1d1611/#261c15) — every
     card, toggle track, and modal/pop-up sheet in the app inherited that
     brown-grey tint, since these two tokens are what those all render on.
     Switched to a cool dark grey with a faint navy lean instead. --bg (page
     background/header) deliberately stays warm — this only retires the
     brown on the surfaces that sit ON TOP of it (cards, toggles, pop-ups),
     same "documented global palette change" pattern as --border below.
     Global change: touches every card/toggle/pop-up in the app. */
  --surface:#1b1d21; --surface-2:#24262b;
  /* --border used to lean warm/peach (rgba(255,214,170,.12)) — every hairline
     divider in the app (header, cards, rows) inherited that brown tint.
     Switched to a neutral dark grey so dividers read as "very dark grey/
     black" instead of brown, per the Today redesign. Global change: touches
     every divider in the app, not just Today. */
  --border:rgba(150,150,158,.14);
  --text:#f5ece1; --text-dim:#dcc9b6; --text-muted:#b39d87; --emphasis:#e9c97c;
  --accent:#e9c97c; --accent-soft:rgba(233,201,124,.14);
  --success:#6fb98a; --success-soft:rgba(111,185,138,.16);
  /* Yellowish-green used only by the recurrent-task icon toggle (card +
     tree view) so "on" reads distinctly from priority's warm gold
     (--emphasis) and from --success's cooler green. */
  --recurrent:#c3d15c;
  /* Liabilities got its own color — it used to share --accent with expenses,
     which was fine as two separate charts but reads as "is this a big
     expense or my debt line?" once income/expenses and balance share one
     axis. Leans red-purple (a blend toward --accent) and bright, per
     explicit request, while staying clearly its own hue. */
  --liability:#d35d95; --liability-soft:rgba(211,93,149,.16);
  /* Assets stays green (family with equity/income) but a darker, more
     settled tone than --success/equity's bright green, so the two don't
     read as the exact same line once both are on the combined chart. */
  --asset:#3f7d5e; --asset-soft:rgba(63,125,94,.16);
  --r:14px; --r-sm:9px; --fast:170ms; --ease:cubic-bezier(.4,0,.2,1);
  /* Duration for a foreign goal/orphans bucket collapsing away during a
     drag (and expanding back on drop) — see .board-card's transition and
     DRAG_COLLAPSE_MS in the BOARD DRAG script section, which is kept equal
     to this so the JS scroll timing and the CSS animation stay coordinated. */
  --drag-collapse:320ms;
  --nav-h:64px; --top-h:48px;
  /* Single source of truth for the bottom safe-area inset (iPhone home
     indicator / notch) — used by #bottom-nav, #views, .toast and
     .area-sidebar so they all move together if this ever needs tweaking,
     instead of repeating env(safe-area-inset-bottom, 0px) at each call site. */
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  /* ===================================================================
     FONT SYSTEM — single source of truth for every font-family in the
     app. Every font-family declaration below should reference one of
     these six variables instead of a literal font name — change a
     variable here and it updates everywhere that category is used,
     across every section (Today, Tablero, Almas, Progreso, modals...).
     Font SIZE is intentionally NOT unified here — an action row in
     Today and a card title on the Board are meant to differ in size by
     context; only which typeface/category they pull from is shared.
       --font-display : the "epic" brand font — Lyfe wordmark + every
                         other epic/hero usage (Almas section names,
                         week/month headers, review titles). Falls back
                         to Permanent Marker until LostInSouth.otf is
                         actually added (see comment below) — both uses
                         share this one variable so they can never
                         drift apart.
       --font-title   : prominent view-level headers (Tablero/Almas/
                         Progreso top-bar label). Deliberately distinct
                         from both --font-display (too "epic" for a nav
                         label) and --font-heading (too plain).
       --font-heading : the everyday UI font — nav labels, buttons,
                         section titles, card titles, badges, chips,
                         field labels. The single biggest category.
       --font-body    : paragraph / base body text.
       --font-serif   : journal/quote-style italic body copy (Almas
                         reflection text, planner paragraphs).
       --font-mono    : numeric values and small mono tags/chips.
     =================================================================== */
  --font-display:'LostInSouth','Permanent Marker',cursive;
  --font-title:var(--font-heading);
  --font-heading:'Space Grotesk',sans-serif;
  --font-body:'Inter',sans-serif;
  --font-serif:'Fraunces',serif;
  --font-mono:'JetBrains Mono',monospace;
  --logo-font:var(--font-display);
  /* Tipo colors (meta/submeta/tarea/sistema) — promoted from
     almas_tree_editor.html's --meta/--submeta/--tarea/--sistema per handoff
     §1.E, adapted for this app's dark/warm palette. Shared by tree rows, the
     Organización lens header, and .type-badge[data-tipo] generally. */
  --tipo-meta:#3F97CE; --tipo-submeta:#9A6DDE; --tipo-tarea:#B0743F; --tipo-sistema:#64914C;
}
/* "Lost In South" — https://www.dafont.com/es/lost-in-south.font
   dafont.com isn't reachable from this build environment's sandboxed
   network, so the actual font file couldn't be fetched/embedded here.
   1) Download the font yourself from the link above (dafont gates it
      behind a zip download, can't be pulled automatically).
   2) Drop the file at ASSETS/fonts/LostInSouth.otf (or .ttf — either
      works, the @font-face below tries both) alongside your other ASSETS.
   3) Reload — no other change needed, --logo-font above already points
      here. Until the file exists, the wordmark falls back to Permanent
      Marker (already loaded via Google Fonts above) so it still looks
      intentional in the meantime. */
@font-face{
  font-family:'LostInSouth';
  src:url('../../ASSETS/fonts/LostInSouth.otf') format('opentype'),
      url('../../ASSETS/fonts/LostInSouth.ttf') format('truetype');
  font-display:swap;
}
/* ======================================================================
   GLOBAL STYLE SECTION — END
   ====================================================================== */
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;}
/* Text is only ever meant to be typed, not selected/copied, except inside
   the handful of actual editing surfaces (plain inputs/textareas and the
   rich-text description editor) — everywhere else the iOS long-press
   selection/lookup gesture was firing on plain read-only text, which reads
   as a bug since nothing in the app supports copy/paste of static text.
   The universal rule above turns selection off everywhere; this turns it
   back on, scoped to editable surfaces and everything inside them (a
   directly-set value on a child always wins over an inherited one, so the
   rich-text editor's inner spans/bold/lists need their own explicit
   override, not just the contenteditable root). */
input,textarea,select,
[contenteditable="true"],[contenteditable=""],
[contenteditable="true"] *,[contenteditable=""] *{
  -webkit-touch-callout:default;-webkit-user-select:text;user-select:text;
}
/* FIT-TO-SCREEN: the page itself never scrolls or pans (only #views scrolls). Pinning body to the real
   viewport keeps the top bar / settings button from drifting when 100vh is taller than the visible
   screen (iOS toolbars) or when something overflows sideways. */
html{height:100%;width:100%;overflow:hidden;overscroll-behavior:none;-webkit-text-size-adjust:100%;}
body{position:fixed;top:0;right:0;bottom:0;left:0;width:100%;overflow:hidden;}
body{margin:0;background:var(--bg);color:var(--text);font-family:var(--font-body);font-size:14px;line-height:1.45;overscroll-behavior:none;text-align:left;}
h1,h2,h3{font-family:var(--font-heading);margin:0;}
.num{font-family:var(--font-mono);}
button{font-family:inherit;color:inherit;cursor:pointer;background:none;border:none;}
[data-action]{cursor:pointer;}
input,textarea,select{font-family:inherit;color:var(--text);background:var(--surface-2);border:1px solid var(--border);border-radius:var(--r);padding:8px 10px;font-size:14px;width:100%;}
/* Restore mode picker (2026-11-12) */
.lr-modes{display:grid;gap:10px;margin:14px 0 14px;}
.lr-mode{position:relative;display:flex;gap:14px;align-items:flex-start;padding:15px 16px;border:1.5px solid var(--border);border-radius:16px;background:var(--surface-2);cursor:pointer;user-select:none;-webkit-tap-highlight-color:transparent;transition:border-color .18s,background .18s,box-shadow .18s,transform .12s;}
.lr-mode:active{transform:scale(.985);}
.lr-mode:hover{border-color:rgba(233,201,124,.45);}
.lr-dot{flex:none;width:22px;height:22px;margin-top:1px;border-radius:50%;border:2px solid var(--text-muted);display:grid;place-items:center;transition:all .18s;}
.lr-dot::after{content:"";width:10px;height:10px;border-radius:50%;background:var(--accent);transform:scale(0);transition:transform .18s cubic-bezier(.3,1.6,.5,1);}
.lr-mode.on{border-color:var(--accent);background:linear-gradient(135deg,rgba(233,201,124,.16),rgba(233,201,124,.05));box-shadow:0 0 0 3px var(--accent-soft);}
.lr-mode.on .lr-dot{border-color:var(--accent);}
.lr-mode.on .lr-dot::after{transform:scale(1);}
.lr-mode.danger.on{border-color:#e05252;background:linear-gradient(135deg,rgba(224,82,82,.16),rgba(224,82,82,.05));box-shadow:0 0 0 3px rgba(224,82,82,.15);}
.lr-mode.danger.on .lr-dot{border-color:#e05252;}
.lr-mode.danger.on .lr-dot::after{background:#e05252;}
.lr-title{display:flex;align-items:center;gap:8px;font-family:var(--font-heading);font-size:14px;font-weight:600;letter-spacing:.02em;color:var(--text);}
.lr-tag{font-size:10px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;padding:2px 8px;border-radius:99px;background:var(--accent-soft);color:var(--accent);}
.lr-desc{margin-top:4px;font-size:12.5px;line-height:1.45;color:var(--text-muted);}
.lr-actions{display:flex;gap:10px;}
.lr-go{flex:1.6;padding:14px;border-radius:14px;border:none;font-family:var(--font-heading);font-size:14px;font-weight:600;letter-spacing:.03em;color:#fff;background:var(--accent);cursor:pointer;box-shadow:0 6px 18px rgba(233,201,124,.28);transition:background .18s,box-shadow .18s,transform .12s;}
.lr-go:active{transform:scale(.98);}
.lr-go.danger{background:#e05252;box-shadow:0 6px 18px rgba(224,82,82,.28);}

/* iOS Safari auto-zooms the whole page on focus of any field under
   16px — only on real touch devices (desktop w/ a mouse never triggers
   it, so this doesn't affect trackpad/mouse users on a touch-capable
   laptop). Bumping every input/textarea/select to 16px here avoids the
   zoom without hand-patching every date/number/text field in every modal
   across the app individually. */
@media (hover:none) and (pointer:coarse){
  input,textarea,select{font-size:16px !important;}
}
::placeholder{color:var(--text-muted);}
textarea{min-height:60px;resize:vertical;}
.desc-box{background:var(--surface-2);border:1px solid var(--border);border-radius:var(--r);overflow:visible;transition:border-color var(--fast) var(--ease),box-shadow var(--fast) var(--ease);}
.desc-box:focus-within{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft);}
.desc-toolbar{display:none;align-items:center;gap:2px;padding:6px 7px;border-bottom:1px solid var(--border);flex-wrap:wrap;position:sticky;top:0;z-index:5;background:var(--surface-2);border-radius:var(--r) var(--r) 0 0;}
.desc-box:focus-within .desc-toolbar{display:flex;}
.desc-toolbar-sep{width:1px;align-self:stretch;background:var(--border);margin:0 4px;}
.desc-toolbar button{display:inline-flex;align-items:center;justify-content:center;min-width:26px;height:26px;padding:0 6px;border:none;border-radius:6px;color:var(--text-dim);background:transparent;font-size:13px;font-weight:700;font-family:var(--font-heading);}
.desc-toolbar button svg{width:15px;height:15px;display:block;flex-shrink:0;}
.desc-toolbar button:hover{background:var(--surface);color:var(--text);}
.desc-toolbar button.active{color:#1a1408;background:var(--emphasis);}
.desc-plus-wrap{position:relative;margin-left:auto;}
.desc-plus-menu{position:absolute;top:100%;right:0;margin-top:4px;z-index:30;background:var(--bg,#100c0a);border:1px solid var(--border);border-radius:10px;box-shadow:0 8px 24px rgba(0,0,0,.35);padding:6px;min-width:170px;}
.desc-plus-menu button{display:flex;align-items:center;gap:8px;width:100%;text-align:left;background:none;border:none;padding:8px 10px;font-size:13px;color:var(--text);border-radius:7px;font-weight:400;height:auto;}
.desc-plus-menu button:hover{background:var(--surface-2);}
.desc-style-wrap{position:relative;}
.desc-style-btn{display:inline-flex;align-items:center;gap:4px;min-width:auto;padding:0 7px;font-family:var(--font-heading);}
.desc-style-menu{position:absolute;top:100%;left:0;margin-top:4px;z-index:30;background:var(--bg,#100c0a);border:1px solid var(--border);border-radius:10px;box-shadow:0 8px 24px rgba(0,0,0,.35);padding:6px;min-width:190px;}
.desc-style-menu button{display:flex;align-items:center;gap:8px;width:100%;text-align:left;background:none;border:none;padding:8px 10px;color:var(--text);border-radius:7px;height:auto;}
.desc-style-menu button:hover{background:var(--surface-2);}
.desc-style-check{width:14px;flex-shrink:0;color:var(--emphasis);opacity:0;font-size:12px;}
.desc-style-menu button.active .desc-style-check{opacity:1;}
.desc-rt h1{font-family:var(--font-heading);font-weight:700;font-size:19px;margin:10px 0 6px;line-height:1.3;}
.desc-rt h2{font-family:var(--font-heading);font-weight:700;font-size:16.5px;margin:8px 0 5px;line-height:1.3;}
.desc-rt h3{font-family:var(--font-heading);font-weight:600;font-size:14.5px;margin:6px 0 4px;line-height:1.3;}
.desc-rt h1:first-child,.desc-rt h2:first-child,.desc-rt h3:first-child{margin-top:0;}
.desc-rt pre{font-family:var(--font-mono);font-size:12.5px;background:var(--surface);border:1px solid var(--border);border-radius:8px;padding:8px 10px;white-space:pre-wrap;margin:6px 0;}
.desc-rt{width:100%;min-height:60px;background:transparent;border:none;padding:10px 12px;font-size:14px;line-height:1.55;color:var(--text);white-space:pre-wrap;overflow-wrap:anywhere;cursor:text;outline:none;}
.desc-rt-view{min-height:0;padding:12px 14px 20px;cursor:pointer;}
.desc-rt:empty:before{content:attr(data-placeholder);color:var(--text-muted);}
.desc-rt b,.desc-rt strong{font-weight:700;}
.desc-rt i,.desc-rt em{font-style:italic;}
.desc-rt u{text-decoration:underline;}
.desc-rt strike,.desc-rt s{text-decoration:line-through;}
.desc-rt ul{margin:2px 0 2px 18px;padding:0;}
.desc-rt ol{margin:2px 0 2px 18px;padding:0;}
.desc-rt li{margin:2px 0;}
/* Native "Pasos" block — the numbered-circle/bold-title/description layout
   requested to match the chat step-card look, but built with the app's OWN
   classes (no inline styles from any external source can ever land here,
   since it's inserted by insertStepItem(), never by paste). flex:1 + min-
   width:0 on .step-body is what makes it fill the full card width instead
   of the fixed-px column an external paste would have brought — the whole
   point of building it native instead of trying to preserve pasted markup. */
.desc-rt .step-list{list-style:none;margin:10px 0;padding:0;counter-reset:step;}
.desc-rt .step-list li{display:flex;gap:14px;align-items:flex-start;padding:12px 0;margin:0;border-bottom:1px solid var(--border);counter-increment:step;}
.desc-rt .step-list li:last-child{border-bottom:none;}
.desc-rt .step-list li:before{content:counter(step);flex:0 0 28px;width:28px;height:28px;border-radius:50%;background:var(--surface-2);color:var(--text-dim);font-family:var(--font-mono);font-size:13px;font-weight:600;display:flex;align-items:center;justify-content:center;}
.desc-rt .step-body{flex:1;min-width:0;}
.desc-rt .step-title{font-family:var(--font-heading);font-weight:600;font-size:14.5px;margin-bottom:3px;}
.desc-rt .step-desc{font-size:13.5px;color:var(--text-dim);line-height:1.5;}
.desc-rt a{color:var(--emphasis);text-decoration:underline;overflow-wrap:anywhere;word-break:break-all;}
.desc-rt a.smart-link{
  display:inline-flex;align-items:center;gap:8px;max-width:100%;
  margin:3px 0;padding:5px 10px 5px 7px;border:1px solid var(--border);border-radius:9px;
  background:var(--surface);color:var(--text);text-decoration:none;
  white-space:nowrap;overflow:hidden;vertical-align:middle;
  word-break:normal;overflow-wrap:normal;line-height:1.2;
}
.desc-rt a.smart-link .smart-link-title{
  overflow:hidden;text-overflow:ellipsis;font-size:13px;font-weight:600;color:var(--emphasis);
}
.desc-rt a.smart-link img.smart-link-icon,
.desc-rt img.smart-link-icon{
  width:16px;height:16px;max-width:16px;margin:0;border-radius:4px;flex-shrink:0;display:block;
}
.desc-rt img{max-width:100%;border-radius:8px;margin:6px 0;display:block;cursor:pointer;}
.desc-rt img.rt-img-selected{outline:2px solid var(--emphasis);outline-offset:2px;}
.desc-rt img.rt-img-inline{display:inline-block;vertical-align:middle;max-width:60%;margin:2px 6px;}
.desc-rt img.rt-img-wrap-left{float:left;margin:4px 12px 8px 0;max-width:50%;}
.desc-rt img.rt-img-wrap-right{float:right;margin:4px 0 8px 12px;max-width:50%;}
.desc-rt img.rt-img-break{display:block;margin:8px auto;clear:both;}
.rt-img-toolbar{position:fixed;z-index:2500;background:var(--surface,#1b1d21);border:1px solid var(--border);border-radius:10px;padding:5px;display:flex;gap:2px;align-items:center;box-shadow:0 8px 24px rgba(0,0,0,.45);}
.rt-img-toolbar button{background:none;border:none;color:var(--text);padding:6px 7px;border-radius:6px;cursor:pointer;font-size:13px;line-height:1;}
.rt-img-toolbar button:hover,.rt-img-toolbar button.active{background:var(--accent-soft,rgba(255,255,255,.1));}
.rt-img-toolbar .rt-img-sep{width:1px;align-self:stretch;background:var(--border);margin:0 3px;}
.rt-img-resize-handle{position:fixed;width:14px;height:14px;border-radius:50%;background:var(--emphasis);border:2px solid var(--bg,#0e0f1e);z-index:2500;cursor:nwse-resize;touch-action:none;}
#crop-stage{position:relative;max-width:100%;overflow:hidden;touch-action:none;background:#000;border-radius:8px;}
#crop-stage img{display:block;max-width:100%;user-select:none;pointer-events:none;}
#crop-rect{position:absolute;border:2px dashed var(--emphasis);box-sizing:border-box;background:rgba(255,255,255,.08);cursor:move;}
#crop-rect:after{content:'';position:absolute;right:-7px;bottom:-7px;width:14px;height:14px;border-radius:50%;background:var(--emphasis);border:2px solid var(--bg,#0e0f1e);cursor:nwse-resize;}
.almas-field{margin-bottom:14px;padding:0 26px;}
input[type=range]{-webkit-appearance:none;appearance:none;background:transparent;border:none;height:20px;padding:0;}
input[type=range]::-webkit-slider-runnable-track{height:2px;background:var(--border);border-radius:2px;}
input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;width:14px;height:14px;border-radius:50%;background:var(--text);margin-top:-6px;}
input[type=range]::-moz-range-track{height:2px;background:var(--border);}
input[type=range]::-moz-range-thumb{width:14px;height:14px;border-radius:50%;background:var(--text);border:none;}

#app{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;max-width:100%;overflow:hidden;display:flex;flex-direction:column;}
#top-bar{height:calc(var(--top-h) + env(safe-area-inset-top));padding-top:env(safe-area-inset-top);display:flex;align-items:center;justify-content:space-between;padding-left:18px;padding-right:14px;border-bottom:1px solid var(--border);flex-shrink:0;}
#top-bar-title{font-family:var(--font-title);font-weight:600;font-size:19px;letter-spacing:.01em;text-transform:uppercase;color:var(--text);opacity:1;transition:opacity .18s var(--ease);}
#top-bar-title.fading{opacity:0;}
/* Home view swaps the plain "Inicio" label for the LYFE wordmark — see
   updateTopBarTitle(). Uses --logo-font (set once, globally, in :root). */
.lyfe-logo-wrap{display:inline-flex;flex-direction:column;align-items:flex-start;gap:4px;}
.lyfe-logo{font-family:var(--logo-font);font-size:23px;line-height:1;color:var(--text);letter-spacing:.02em;text-transform:none;}
.lyfe-logo-underline{width:36px;height:4px;border-radius:2px;background:linear-gradient(90deg,var(--accent),var(--emphasis));}
#settings-btn,#contacts-btn{width:34px;height:34px;display:flex;align-items:center;justify-content:center;color:var(--text-dim);position:relative;}
#settings-btn::after,#contacts-btn::after{content:'';position:absolute;inset:-5px;}
#settings-btn svg,#contacts-btn svg{width:20px;height:20px;}
/* Pink + a touch thicker stroke to match the app's accent (buttons, fab,
   sync dot) instead of reading as a dim utility icon like settings. */
#contacts-btn{color:var(--accent);}
#contacts-btn svg{stroke-width:2.1;}
#top-bar-right{margin-left:auto;display:flex;align-items:center;gap:2px;}
/* ---- top-bar-slot: per-view toggle host, sitting inside #top-bar-right
   just left of the sync dot/settings icon. Empty (0-width) on views with
   nothing to show there, so #top-bar-right collapses back to just those
   icons with no dangling gap. renderTopBarSlot() owns its contents; never
   has its own visible chrome. ---- */
#top-bar-slot{display:flex;align-items:center;}
#top-bar-slot:not(:empty){margin-right:10px;}
#sync-status{width:22px;height:34px;display:flex;align-items:center;justify-content:center;font-size:13px;line-height:1;cursor:pointer;transition:opacity .15s var(--ease);}
#sync-status.is-syncing{animation:syncDotPulse 1s ease-in-out infinite;}
#sync-status.sync-dot-hidden{opacity:0;pointer-events:none;}
#connectivity-status{font-family:var(--font-heading);font-size:10px;font-weight:700;letter-spacing:.04em;color:#e05252;background:rgba(224,82,82,.12);border:1px solid rgba(224,82,82,.35);border-radius:20px;padding:3px 9px;margin-right:6px;white-space:nowrap;}
#connectivity-status.connectivity-hidden{display:none;}
@keyframes syncDotPulse{0%,100%{opacity:1;}50%{opacity:.3;}}
/* painted from this device's cache: yellow until the cloud answers (here in the head so the first paint is already yellow) */
#sync-status.from-cache{color:#f5c542!important;opacity:1!important;width:22px!important;pointer-events:auto!important;text-shadow:0 0 8px rgba(245,197,66,.65);animation:syncDotPulse 1.4s ease-in-out infinite}

#views{flex:1;overflow-y:auto;-webkit-overflow-scrolling:touch;padding:16px 22px calc(24px + var(--nav-h) + var(--safe-bottom));scrollbar-width:none;-ms-overflow-style:none;}
#views::-webkit-scrollbar{display:none;width:0;height:0;}
/* Same treatment for every other scrollable region in the app — these had
   been missed, so they still showed the native OS scrollbar. */
.next-col:first-child,.chip-row,.modal-body,.mai-paste-area:focus,.board-scroll,.p3-week-scroll,.metas-scroll{scrollbar-width:none;-ms-overflow-style:none;}
.next-col:first-child::-webkit-scrollbar,.chip-row::-webkit-scrollbar,.modal-body::-webkit-scrollbar,.mai-paste-area:focus::-webkit-scrollbar,.board-scroll::-webkit-scrollbar,.p3-week-scroll::-webkit-scrollbar,.metas-scroll::-webkit-scrollbar{display:none;width:0;height:0;}
.view{display:none;animation:fade var(--fast) var(--ease);}
.view.active{display:block;}
/* Board background photo (Kanban only, not the tree/Vista sub-view): a
   fixed, viewport-anchored layer OUTSIDE #views entirely (see the
   #board-photo-backdrop div right after <body>, and syncBoardPhotoBackdrop()
   in JS) — not a pseudo-element nested inside the scrolling #views/
   #view-board tree like it used to be. That nesting was the actual bug:
   #views scrolls (-webkit-overflow-scrolling:touch), and a position:fixed
   descendant of a scrolling container is exactly the situation browsers
   (mobile Safari especially) are notorious for getting wrong — the "fixed"
   box ended up sized/positioned relative to the scrollable content instead
   of the true viewport, so as the Pendientes column grew to 86 items and
   #views' scrollable height ballooned, the photo's cover-sizing box grew
   with it and the image read as zoomed way in. Living as a plain fixed
   sibling of #app, with no scrolling ancestor at all, sidesteps that
   class of bug entirely — its box is always exactly (viewport minus
   header/footer), full stop, regardless of how tall the columns get. */
#board-photo-backdrop{
  display:none;position:fixed;left:0;right:0;
  top:calc(var(--top-h) + env(safe-area-inset-top));
  bottom:calc(var(--nav-h) + var(--safe-bottom));
  z-index:-1;
  background-image:
    linear-gradient(180deg, rgba(16,20,28,.72) 0%, rgba(16,20,28,.6) 100%),
    url('../../ASSETS/photos/CITY2.webp');
  background-size:cover;background-position:center;background-repeat:no-repeat;
}
#board-photo-backdrop.show{display:block;}
@keyframes fade{from{opacity:0;transform:translateY(4px);}to{opacity:1;transform:translateY(0);}}
#bottom-nav{position:fixed;left:0;right:0;bottom:0;height:calc(var(--nav-h) + var(--safe-bottom));padding-bottom:var(--safe-bottom);background:rgba(11,12,24,.92);backdrop-filter:blur(10px);border-top:1px solid var(--border);display:flex;align-items:stretch;z-index:40;}
.nav-item{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;color:var(--text-muted);}
.nav-item svg{width:21px;height:21px;}
.nav-item.active{color:var(--accent);}
.nav-item .nav-label{font-family:var(--font-heading);font-size:9px;letter-spacing:.08em;text-transform:uppercase;}
.nav-fab{position:relative;}
.nav-fab .fab-circle{position:absolute;top:-14px;left:50%;transform:translateX(-50%);width:48px;height:48px;border-radius:50%;border:1.5px solid var(--accent);display:flex;align-items:center;justify-content:center;background:var(--bg);color:var(--accent);transition:border-color var(--fast),transform var(--fast);}
.nav-fab:active .fab-circle{transform:translateX(-50%) scale(.94);border-color:var(--text);}
#offline-changes-badge{position:absolute;top:-16px;left:calc(50% + 14px);width:18px;height:18px;border-radius:50%;background:var(--emphasis,#e0605a);color:#fff;font-size:11px;font-weight:700;line-height:1;display:flex;align-items:center;justify-content:center;box-shadow:0 2px 6px rgba(0,0,0,.45);z-index:6;cursor:pointer;border:1.5px solid var(--bg);}

.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--r);padding:14px;margin-bottom:10px;box-shadow:0 6px 18px rgba(0,0,0,.22);}
/* "¿Qué sigue?" post-completion screen — three columns side by side instead
   of one flat vertical button list, so the (potentially several) pending
   tasks live in their own scrollable column next to the two single-choice
   columns ("depende de otra meta" / "crear tarea nueva"). */
.next-cols{display:flex;gap:8px;align-items:stretch;}
.next-col{flex:1 1 0;min-width:0;background:var(--surface-2);border:1px solid var(--border);border-radius:var(--r);padding:8px;display:flex;flex-direction:column;gap:6px;}
.next-col-label{font-family:var(--font-heading);font-size:10px;letter-spacing:.06em;text-transform:uppercase;color:var(--text-muted);}
.next-col .card{margin-bottom:0;padding:10px 12px;font-size:12.5px;line-height:1.35;text-align:left;display:block;width:100%;}
.next-col .empty-note{font-size:12px;}
.next-col:first-child{max-height:50vh;overflow-y:auto;}
.next-col-add{position:relative;flex:1 1 0;min-width:0;background:var(--surface);border:1px solid var(--border);border-radius:var(--r);display:flex;align-items:center;justify-content:center;cursor:pointer;min-height:64px;}
.next-col-add:active{background:var(--surface-2);}
.next-col-add .next-col-add-plus{font-size:24px;line-height:1;font-weight:400;color:var(--text);pointer-events:none;}
.next-col-add .next-col-add-dup{position:absolute;top:6px;right:6px;width:39px;height:39px;border:none;background:transparent;color:var(--text-dim);}
.next-col-add .next-col-add-dup:active{background:var(--surface-2);color:var(--text);}
.card-row{display:flex;align-items:center;justify-content:space-between;gap:10px;}
.contacts-table{width:100%;border-collapse:collapse;font-size:12px;}
.contacts-table thead th{position:sticky;top:0;z-index:1;background:var(--bg);text-align:left;padding:8px 10px;border-bottom:1px solid var(--border);font-family:var(--font-heading);font-size:10px;letter-spacing:.05em;text-transform:uppercase;color:var(--text-dim);white-space:nowrap;}
.contacts-table thead th.sortable{cursor:pointer;user-select:none;}
.contacts-table thead th.sortable:hover{color:var(--text);}
.contacts-table thead th.sort-active{color:var(--accent);}
.contacts-table tbody td{padding:9px 10px;border-bottom:1px solid var(--border);vertical-align:top;max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--text);}
.contacts-table tbody tr{cursor:pointer;}
.contacts-table tbody tr:hover td{background:var(--surface);}
.contacts-table td:first-child{font-weight:500;}
.contacts-table tr.contacts-group-header td{padding:6px 10px;font-size:11px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:var(--text-secondary);background:var(--surface-2);border-bottom:1px solid var(--border);cursor:default;}
.contacts-table tr.contacts-group-header:hover td{background:var(--surface-2);}
/* A thin persistent accent stripe on loop rows themselves — so "this
   contact is on the loop" reads even after scrolling the group header out
   of view, not just from the header's own styling above. */
.contacts-table tr.is-loop-row td:first-child{box-shadow:inset 2px 0 0 var(--accent);}
/* Column drag-to-reorder handle in each (non-Nombre) header cell — same
   grip glyph/affordance as .tv-drag-handle in the task tree, scoped to the
   contacts table's own header row. Nombre stays pinned first and un-draggable
   (it's the row's identity/click target), so it never gets a handle. */
.contacts-table th[data-contacts-col]{cursor:grab;}
.contacts-col-handle{display:inline-block;margin-right:5px;color:var(--text-muted);}
.contacts-table th.contacts-col-dragging{opacity:.4;}
.contacts-table th.contacts-col-dragover{color:var(--accent);}
#contacts-filters-menu{max-height:60vh;overflow:auto;}
.section-title{font-family:var(--font-heading);font-size:11px;letter-spacing:.1em;text-transform:uppercase;color:var(--text);margin:32px 0 12px;padding:0 2px;font-weight:600;display:flex;align-items:center;gap:7px;}
.settings-section{border-bottom:1px solid var(--border);margin-bottom:4px;}
.settings-section:last-of-type{border-bottom:none;}
.settings-section-summary{cursor:pointer;list-style:none;font-family:var(--font-heading);font-size:13px;font-weight:600;letter-spacing:.02em;color:var(--text);padding:14px 2px;display:flex;align-items:center;justify-content:space-between;}
.settings-section-summary::-webkit-details-marker{display:none;}
.settings-section-summary::after{content:'▸';font-size:11px;color:var(--text-dim);transition:transform .15s ease;}
.settings-section[open] .settings-section-summary::after{transform:rotate(90deg);}
.settings-section-body{padding:2px 2px 18px;}
/* ---- Ajustes → Colores ---- */
.ac-list{display:flex;flex-direction:column;gap:8px;margin-top:10px;}
.ac-row-head{all:unset;box-sizing:border-box;width:100%;display:flex;align-items:center;gap:10px;cursor:pointer;padding:2px 0;}
.ac-prev{flex:1;min-width:0;display:flex;align-items:center;gap:9px;padding:8px 11px;border-radius:8px;font-family:var(--font-heading);font-size:12.5px;font-weight:600;color:#fff;background:color-mix(in srgb,var(--c) 45%,#0f1020);border:1px solid color-mix(in srgb,var(--c) 62%,#0f1020);}
.ac-dot{width:10px;height:10px;border-radius:50%;background:var(--c);flex-shrink:0;}
.ac-hex{font-family:var(--font-mono);font-size:11px;color:var(--text-muted);letter-spacing:.03em;}
.ac-chev{font-size:11px;color:var(--text-dim);transition:transform .15s ease;}
.ac-row.open .ac-chev{transform:rotate(90deg);}
.ac-panel{padding:10px 2px 6px;}
.ac-tabs{display:flex;gap:6px;margin-bottom:10px;}
.ac-tab{font:inherit;font-size:12px;padding:5px 12px;border-radius:999px;border:1px solid var(--border);background:transparent;color:var(--text-dim);cursor:pointer;}
.ac-tab.on{background:var(--surface-2);color:var(--text);border-color:color-mix(in srgb,var(--text) 30%,transparent);}
.ac-grid{display:grid;grid-template-columns:repeat(13,minmax(0,1fr));gap:4px;}
.ac-sw{all:unset;box-sizing:border-box;aspect-ratio:1;border-radius:6px;cursor:pointer;border:1px solid rgba(255,255,255,.12);}
.ac-sw.on{outline:2px solid #fff;outline-offset:1px;}
.ac-cap{font-size:10.5px;color:var(--text-muted);margin-top:6px;}
.ac-wheelwrap{display:flex;flex-direction:column;align-items:center;gap:14px;}
.ac-wheel{position:relative;width:180px;height:180px;border-radius:50%;touch-action:none;cursor:crosshair;flex-shrink:0;}
.ac-wheel-bg{position:absolute;inset:0;border-radius:50%;pointer-events:none;background:radial-gradient(circle closest-side,#fff,rgba(255,255,255,0)),conic-gradient(#f00,#ff0,#0f0,#0ff,#00f,#f0f,#f00);}
.ac-mark{position:absolute;width:16px;height:16px;margin:-8px 0 0 -8px;border-radius:50%;border:2px solid #fff;box-shadow:0 0 0 1px rgba(0,0,0,.5);pointer-events:none;}
.ac-wheelwrap input.ac-v{-webkit-appearance:none!important;appearance:none!important;width:100%!important;max-width:260px;height:16px!important;padding:0!important;margin:0!important;border-radius:8px!important;outline:0;border:1px solid var(--border)!important;background:linear-gradient(90deg,#000,var(--vc))!important;touch-action:none;}
.ac-wheelwrap input.ac-v::-webkit-slider-runnable-track{background:transparent!important;height:16px!important;border:0!important;box-shadow:none!important;}
.ac-wheelwrap input.ac-v::-moz-range-track{background:transparent!important;height:16px!important;border:0!important;}
.ac-wheelwrap input.ac-v::-webkit-slider-thumb{-webkit-appearance:none;width:22px;height:22px;border-radius:50%;background:#fff;border:2px solid rgba(0,0,0,.45);}
.ac-wheelwrap input.ac-v::-moz-range-thumb{width:20px;height:20px;border-radius:50%;background:#fff;border:2px solid rgba(0,0,0,.45);}
.ac-foot{display:flex;align-items:center;gap:10px;margin-top:12px;}
.ac-hexin{width:96px;font-family:var(--font-mono);font-size:12px;}
.ac-reset{font:inherit;font-size:12px;padding:5px 12px;border-radius:999px;border:1px solid var(--border);background:transparent;color:var(--text-dim);cursor:pointer;}
.settings-compact-row{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px 12px;margin-bottom:12px;}
.settings-compact-row .field{margin:0;}
.settings-compact-row .field label{font-size:10px;letter-spacing:.04em;}
@media (max-width: 640px){
  .settings-compact-row{grid-template-columns:repeat(2,minmax(0,1fr));}
}
.section-title::before{content:'';width:4px;height:4px;border-radius:50%;background:var(--accent);flex-shrink:0;}
.section-title:first-child{margin-top:0;}
/* Standard gap between card sections (Descripción, Submetas y Acciones,
   Lista de verificación, Notas, Ayuda IA, Adjuntos, ...) on the task/meta
   detail card. Uses padding-top, not margin — margins collapse/stack with
   whatever sits above them (a previous attempt using .section-title's own
   top margin ended up uneven: it either collapsed away entirely or added
   on top of a neighbouring element's own margin depending on what preceded
   it). Padding on this wrapper can't collapse, so every section gets
   exactly the same gap regardless of what precedes it. The two rules below
   zero out the nested title/head-row's own top margin so nothing inside
   ever adds on top of the wrapper's padding.  */
.card-section{padding-top:32px;}
.card-section:first-child{padding-top:0;}
.card-section .section-title,
.card-section .desc-head-row{margin-top:0;}
.chip-row{display:flex;gap:6px;overflow-x:auto;padding-bottom:4px;margin-bottom:12px;}
.chip{flex-shrink:0;padding:5px 10px;border:1px solid var(--border);border-radius:var(--r);font-family:var(--font-heading);font-size:11px;letter-spacing:.04em;text-transform:uppercase;color:var(--text-dim);white-space:nowrap;}
.chip.active{color:var(--bg);background:var(--accent);border-color:var(--accent);}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:10px 16px;border:1px solid var(--text-dim);border-radius:var(--r);font-size:12px;letter-spacing:.06em;text-transform:uppercase;font-family:var(--font-heading);color:var(--text);transition:transform var(--fast),background var(--fast);}
.btn-icon{display:inline-flex;align-items:center;justify-content:center;width:38px;height:38px;flex-shrink:0;border:1px solid var(--border);border-radius:var(--r);color:var(--text-dim);background:transparent;}
.btn-icon:active{background:var(--surface-2);color:var(--text);}
.btn:active{transform:scale(.97);}
.btn-solid{background:var(--accent);color:#fff;border-color:var(--accent);}
.btn-ghost{border-color:var(--border);color:var(--text-dim);}
.btn-block{width:100%;}
.action-row .node-timer-btn{margin:0 0 0 auto;}
.btn-sm{padding:6px 10px;font-size:10px;}
.field{margin-bottom:12px;padding:0 2px;}
/* Looks exactly like the plain .section-title text it replaced until you
   click into it — a heading that happens to be editable, not a form field
   competing for attention in the card. */
.checklist-title-input{flex:1;min-width:0;background:none;border:1px solid transparent;border-radius:6px;padding:2px 6px;margin:-2px -6px;font:inherit;color:inherit;letter-spacing:inherit;text-transform:inherit;}
.checklist-title-input:hover{border-color:var(--border);}
.checklist-title-input:focus{outline:none;border-color:var(--accent);background:var(--bg);}
.checklist-progress-track{height:5px;background:var(--border);border-radius:3px;overflow:hidden;margin:0 0 12px;}
.checklist-progress-fill{height:100%;background:var(--accent);transition:width var(--fast);}
.subtask-row{display:flex;align-items:center;gap:9px;padding:7px 0;border-bottom:1px solid var(--border);}
.subtask-text{flex:1;font-size:12.5px;}
.subtask-text.done{color:var(--text-muted);text-decoration:line-through;}
.subtask-date-btn{display:flex;align-items:center;gap:4px;flex-shrink:0;padding:4px 8px;border:1px solid var(--border);border-radius:8px;font-family:var(--font-heading);font-size:10px;color:var(--text-dim);background:transparent;}
.subtask-date-btn.set{color:var(--accent);border-color:var(--accent);}
.subtask-del-btn{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:24px;height:24px;padding:0;border:none;border-radius:6px;background:transparent;color:var(--text-dim);cursor:pointer;}
.subtask-del-btn svg{width:13px;height:13px;}
.subtask-del-btn:hover{color:var(--danger,#e5484d);background:rgba(255,255,255,.06);}
.subtask-date-input{position:absolute;opacity:0;pointer-events:none;width:1px;height:1px;}
.inline-add-row{display:flex;flex-direction:column;gap:8px;margin-top:8px;padding:10px;border:1px solid var(--border);border-radius:var(--r);background:var(--surface);}
.inline-add-row input[type=text]{background:transparent;border:none;border-bottom:1px solid var(--border);color:var(--text);font-size:13px;padding:4px 0;}
.inline-add-row .row-actions{display:flex;gap:8px;}
.field label{display:block;font-family:var(--font-heading);font-size:10px;letter-spacing:.08em;text-transform:uppercase;color:var(--text-muted);margin-bottom:5px;}
/* Tap-to-open stand-in for <input type=month> (unsupported on iOS Safari) —
   looks like a normal field, opens .money-month-picker instead of a keyboard. */
.month-field-btn{display:flex;align-items:center;justify-content:space-between;gap:8px;font-family:inherit;color:var(--text);background:var(--surface-2);border:1px solid var(--border);border-radius:var(--r);padding:8px 10px;font-size:14px;width:100%;text-align:left;}
.month-field-btn.placeholder{color:var(--text-muted);}
.month-field-btn svg{width:16px;height:16px;opacity:.55;flex-shrink:0;}
.month-field-btn:active{background:var(--surface);}
/* Month/year grid popover opened from a .month-field-btn tap */
.money-month-picker{background:var(--surface-2);border:1px solid var(--border);border-radius:12px;box-shadow:0 12px 40px rgba(0,0,0,.55);padding:14px;width:min(320px, calc(100vw - 32px));}
.mmp-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px;}
.mmp-year{font-family:var(--font-heading);font-size:15px;font-weight:700;color:var(--text);letter-spacing:.02em;background:transparent;border:none;padding:4px 10px;border-radius:8px;}
.mmp-year:active{background:var(--surface);}
.mmp-head-years{justify-content:space-between;}
.mmp-year-list-title{font-family:var(--font-heading);font-size:11px;font-weight:700;color:var(--text-dim);text-transform:uppercase;letter-spacing:.06em;}
.mmp-nav{width:32px;height:32px;display:flex;align-items:center;justify-content:center;color:var(--text-dim);border:1px solid var(--border);border-radius:8px;background:transparent;flex-shrink:0;}
.mmp-nav:active{background:var(--surface);}
.mmp-nav svg{width:16px;height:16px;}
.mmp-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;}
.mmp-cell{padding:11px 4px;border:1px solid var(--border);border-radius:9px;font-family:var(--font-heading);font-size:12.5px;letter-spacing:.02em;color:var(--text-dim);background:transparent;text-align:center;}
.mmp-cell:active{background:var(--surface);}
.mmp-cell.active{background:var(--accent);border-color:var(--accent);color:#fff;}
.mmp-year-list{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;max-height:min(50vh,320px);overflow-y:auto;}
.mmp-year-cell{padding:13px 4px;}
.hint{font-size:11px;color:var(--text-muted);margin-top:4px;}
.divider{height:1px;background:var(--border);margin:22px 0;}
.badge{font-family:var(--font-heading);font-size:10px;letter-spacing:.06em;text-transform:uppercase;padding:3px 8px;border:1px solid var(--border);border-radius:20px;color:var(--text-dim);}
.time-logged-badge{display:inline-flex;align-items:center;gap:5px;}
.time-logged-badge svg{width:12px;height:12px;flex-shrink:0;}
.icon-btn{width:30px;height:30px;display:flex;align-items:center;justify-content:center;color:var(--text-dim);flex-shrink:0;position:relative;}
.icon-btn::after{content:'';position:absolute;inset:-7px;}
.icon-btn svg{width:17px;height:17px;}
.empty-note{color:var(--text-muted);font-size:12px;padding:10px 0;}
.placeholder-text{color:var(--text-muted);font-style:italic;}

.hero-banner{position:relative;overflow:hidden;border-radius:calc(var(--r) + 4px);padding:22px 20px 22px;margin-bottom:22px;min-height:46vh;display:flex;flex-direction:column;justify-content:flex-end;background:
    radial-gradient(120% 90% at 85% -10%, rgba(233,201,124,.35), transparent 55%),
    radial-gradient(90% 70% at 10% 110%, rgba(233,201,124,.22), transparent 60%),
    linear-gradient(160deg,#1b1d36,#150f0b 70%);
  border:1px solid var(--border);box-shadow:0 10px 30px rgba(0,0,0,.35);}
.hero-banner::before{content:'';position:absolute;inset:0;background-image:
    radial-gradient(2px 2px at 20% 30%, rgba(255,224,170,.5), transparent 60%),
    radial-gradient(2px 2px at 70% 20%, rgba(255,224,170,.35), transparent 60%),
    radial-gradient(3px 3px at 85% 55%, rgba(255,224,170,.3), transparent 60%),
    radial-gradient(2px 2px at 40% 75%, rgba(255,224,170,.25), transparent 60%);
  pointer-events:none;opacity:.8;}
.hero-eyebrow{position:relative;font-family:var(--font-heading);font-size:10px;letter-spacing:.14em;text-transform:uppercase;color:var(--accent);margin-bottom:6px;}
.hero-title{position:relative;font-family:var(--font-title);font-weight:400;font-size:46px;line-height:1;color:var(--text);margin-bottom:8px;}
.hero-tag{position:relative;font-family:var(--font-heading);font-style:normal;font-size:15px;color:var(--text-dim);max-width:86%;}
.tick-btn{width:26px;height:26px;border:1.5px solid var(--text-dim);border-radius:50%;display:flex;align-items:center;justify-content:center;flex-shrink:0;transition:background var(--fast),border-color var(--fast);position:relative;}
.tick-btn::after{content:'';position:absolute;inset:-9px;}
.tick-btn.done{border-color:var(--emphasis);background:var(--emphasis);color:var(--bg);}
.tick-btn svg path{stroke-dasharray:16;stroke-dashoffset:16;transition:stroke-dashoffset 240ms var(--ease);}
.tick-btn.done svg path{stroke-dashoffset:0;}
@keyframes pulse{0%{filter:brightness(1);}45%{filter:brightness(1.4);}100%{filter:brightness(1);}}
.pulse{animation:pulse 280ms var(--ease);}

.complete-fx{position:fixed;inset:0;pointer-events:none;z-index:300;}
@keyframes completeFlash{0%{opacity:0;}25%{opacity:1;}100%{opacity:0;}}

/* ======================================================================
   GLOBAL ANIMATION POLICY — applies to every animation in this file
   ------------------------------------------------------------------
   Two categories, two different rules:

   1) DIRECT MANIPULATION — a transition that plays as the immediate,
      synchronous response to the user's own tap/press/toggle (nav tab
      switch, Organizar<->Árbol card slide + header chip feather, wo-toggle
      slider, press-fx, tick/complete pulses, board drag land-glow, etc).
      These NEVER get wrapped in @media (prefers-reduced-motion:reduce).
      The motion here isn't ambient decoration the user has to just sit
      and watch — it's the visual confirmation that their tap landed, so
      hiding it doesn't reduce discomfort, it just removes feedback and
      can make the UI feel broken/unresponsive (this is what was
      happening to the nav tab switch — see page-feather below).

   2) PASSIVE / AMBIENT — anything that autoplays on its own without a
      per-tap trigger, especially anything that loops or drifts
      indefinitely (hero photo Ken-Burns zoom/pan is the only current
      example). These DO stay gated behind prefers-reduced-motion, since
      this is exactly the kind of unsolicited, continuous motion that
      setting exists to suppress.

   When adding a new animation: if it fires once, synchronously, because
   the user just interacted with that exact element -> category 1, no
   media query. If it runs on a timer/loop independent of user input ->
   category 2, gate it. Don't gate something in category 1 "to be safe" —
   that's the mistake that made the nav transition silently vanish on any
   browser/OS reporting reduced motion (common on desktop Macs) while
   every other tap-driven animation in the app kept working fine.
   ====================================================================== */

/* ---- Tactile press feedback (Appendix A4): instant snap on press, eased release ---- */
.btn,.nav-item,.chip,.tick-btn,.wo-toggle-opt,.tv-star-toggle,.area-sidebar-toggle,.area-sidebar-item,.almas-edit-toggle,
.icon-btn,.mai-copy-btn,.mai-open-btn,.sistema-priority-star,.recall-toggle,
.p3-priority-habits-toggle,.tv-lens-toggle button,.seg-opt{
  transition:transform .15s ease-out;
}
.press-fx{transform:scale(.96) !important;transition:transform .04s ease-out !important;}
/* No reduced-motion gate — category 1 (direct manipulation) per the
   policy above: this *is* the press feedback, not decoration on top of it. */

/* ---- Bottom nav: sliding active indicator (B3) ---- */
#bottom-nav{position:fixed;}
.bnav-indicator{position:absolute;top:-1px;left:0;height:2px;width:0;background:var(--accent);
  transition:transform .25s cubic-bezier(.4,0,.2,1), width .25s cubic-bezier(.4,0,.2,1), opacity .15s ease;
  opacity:0;pointer-events:none;}
.bnav-indicator.show{opacity:1;}

/* ---- Page-level "feather" transition between bottom-nav tabs — same
   mechanism as the task-card header chip's feather (short drift + fade,
   sequential rather than a full carousel push), just sized for a full
   page. The outgoing view feathers out in the direction of travel
   (following the tab you're moving toward), then the incoming view
   feathers in from the opposite side.
   Deliberately NOT gated behind prefers-reduced-motion — see the GLOBAL
   ANIMATION POLICY note above the tactile-press-feedback rule below.
   Tapping a nav tab is direct manipulation, same category as the
   chip-feather/card-slide toggle further down; this was previously (and
   inconsistently) wrapped in a reduced-motion media query, which is why
   this transition silently never played on any device/browser reporting
   prefers-reduced-motion:reduce (e.g. macOS "Reduce motion" turned on,
   which desktop Chrome/Safari both honor) even though nothing else in
   the app treated this class of animation that way. ---- */
@keyframes pageFeatherOutRight{from{opacity:1;transform:translateX(0);}to{opacity:0;transform:translateX(20%);}}
@keyframes pageFeatherOutLeft{from{opacity:1;transform:translateX(0);}to{opacity:0;transform:translateX(-20%);}}
@keyframes pageFeatherInLeft{from{opacity:0;transform:translateX(-20%);}to{opacity:1;transform:translateX(0);}}
@keyframes pageFeatherInRight{from{opacity:0;transform:translateX(20%);}to{opacity:1;transform:translateX(0);}}
.view.page-feather-out-right{animation:pageFeatherOutRight .12s ease-in forwards;}
.view.page-feather-out-left{animation:pageFeatherOutLeft .12s ease-in forwards;}
.view.page-feather-in-left{animation:pageFeatherInLeft .16s ease-out forwards;}
.view.page-feather-in-right{animation:pageFeatherInRight .16s ease-out forwards;}

/* ---- wo-toggle: sliding thumb behind the active option (Appendix A2/A3) ---- */
.wo-toggle{position:relative;}
.wo-toggle-slider{position:absolute;top:2px;bottom:2px;left:2px;width:26px;border-radius:999px;
  background:var(--accent);transition:transform .2s cubic-bezier(.34,1.2,.64,1), width .2s cubic-bezier(.34,1.2,.64,1);
  z-index:0;pointer-events:none;}
.wo-toggle-opt{position:relative;z-index:1;}

/* ---- Today hero period toggle (Hoy/Semana/Mes): text variant of wo-toggle,
   same slide mechanism, positioned top-right of the hero banner ---- */

.wo-toggle-text{padding:3px;gap:0;}
.wo-toggle-text .wo-toggle-opt{width:auto;height:auto;padding:6px 12px;border-radius:999px;
  font-family:var(--font-heading);font-size:11px;font-weight:600;letter-spacing:.02em;text-transform:uppercase;
  color:var(--text-muted);background:transparent;border:none;cursor:pointer;transition:color .2s ease;}
.wo-toggle-text .wo-toggle-opt.active{background:transparent;color:var(--bg);}
.wo-toggle-text .wo-toggle-slider{top:2px;bottom:2px;left:2px;width:auto;}

/* ---- Hero photo Ken-Burns drift (P3): slow, barely-perceptible zoom/pan ----
   Two separate keyframes, not one shared rule — .almas-hero genuinely
   stacks 3 background layers (2 gradients + the photo, see its inline
   style), so heroKenBurns's 3-value comma lists are correct for it. But
   .today-hero has only ONE layer (just the photo — its vignette is a
   separate ::before, not folded into background-image). Sharing
   heroKenBurns with it used to mean the browser applied that list's FIRST
   value — background-size:100% 100% — to today-hero's single real layer
   for the whole animation, permanently overriding the base rule's correct
   background-size:cover with a hard non-uniform stretch. Only showed up
   wherever the animation was actually running (prefers-reduced-motion:no-
   preference) — invisible on a machine with OS-level reduced motion on,
   which is why it looked device-specific instead of universal. */
.today-hero{animation:heroKenBurnsSingle 26s ease-in-out infinite alternate;}
.almas-hero{animation:heroKenBurns 26s ease-in-out infinite alternate;}
@keyframes heroKenBurnsSingle{
  0%{background-size:112% auto;background-position:50% 38%;}
  100%{background-size:102% auto;background-position:50% 56%;}
}
@keyframes heroKenBurns{
  0%{background-size:100% 100%, 100% 100%, 112% auto;background-position:center, center, 50% 38%;}
  100%{background-size:100% 100%, 100% 100%, 102% auto;background-position:center, center, 50% 56%;}
}
@media (prefers-reduced-motion:reduce){ .today-hero,.almas-hero{animation:none;} }

/* ---- Habit streak milestone celebration (Appendix C): bouncier than the plain flash ---- */
@keyframes checkBounce{0%{transform:scale(1);}45%{transform:scale(1.35);}100%{transform:scale(1);}}
.tick-btn.milestone-pop{animation:checkBounce .4s cubic-bezier(.34,1.56,.64,1);}
.complete-fx.milestone{background:radial-gradient(circle at 50% 38%, rgba(233,201,124,.55), transparent 62%);animation:completeFlash 900ms ease-out forwards;}

/* ---- Task-card mode switch (Organize <-> Árbol): card chrome stays put,
   only the body content slides — see switchTaskCardMode(). ---- */
.card-slide-viewport{position:relative;overflow-x:hidden;}
.card-slide-pane{width:100%;position:absolute;top:0;left:0;right:0;}
.card-slide-out-right{animation:cardSlideOutRight .32s cubic-bezier(.4,0,.2,1) forwards;}
.card-slide-out-left{animation:cardSlideOutLeft .32s cubic-bezier(.4,0,.2,1) forwards;}
.card-slide-in-left{animation:cardSlideInLeft .32s cubic-bezier(.4,0,.2,1) forwards;}
.card-slide-in-right{animation:cardSlideInRight .32s cubic-bezier(.4,0,.2,1) forwards;}
@keyframes cardSlideOutRight{from{transform:translateX(0);}to{transform:translateX(100%);}}
@keyframes cardSlideOutLeft{from{transform:translateX(0);}to{transform:translateX(-100%);}}
@keyframes cardSlideInLeft{from{transform:translateX(-100%);}to{transform:translateX(0);}}
@keyframes cardSlideInRight{from{transform:translateX(100%);}to{transform:translateX(0);}}

/* ---- Header chip "half carrousel" (Organizador label <-> parent-goal
   chip): same directional feel as the body slide, but much shorter travel
   and a fade instead of a full traversal — a lighter echo of the body's
   motion rather than a second full carousel. Sequential (fades out, THEN
   the new label fades in) rather than two overlapping panes, since a
   single line of header text doesn't need the body's height-locking
   machinery. */
@keyframes chipFeatherOutRight{from{opacity:1;transform:translateX(0);}to{opacity:0;transform:translateX(9px);}}
@keyframes chipFeatherOutLeft{from{opacity:1;transform:translateX(0);}to{opacity:0;transform:translateX(-9px);}}
@keyframes chipFeatherInLeft{from{opacity:0;transform:translateX(-9px);}to{opacity:1;transform:translateX(0);}}
@keyframes chipFeatherInRight{from{opacity:0;transform:translateX(9px);}to{opacity:1;transform:translateX(0);}}
.chip-feather-out-right{animation:chipFeatherOutRight .13s ease-in forwards;}
.chip-feather-out-left{animation:chipFeatherOutLeft .13s ease-in forwards;}
.chip-feather-in-left{animation:chipFeatherInLeft .16s ease-out forwards;}
.chip-feather-in-right{animation:chipFeatherInRight .16s ease-out forwards;}
/* Deliberately NOT gated behind prefers-reduced-motion: this slide is a
   direct-manipulation response to the toggle tap itself, not passive
   ambient motion — unlike the Ken-Burns hero drift below, which stays
   gated since it's autoplaying and decorative. */
.progress-track{height:3px;background:var(--border);border-radius:2px;margin-top:6px;overflow:hidden;}
.progress-fill{height:100%;background:linear-gradient(90deg,var(--accent),var(--emphasis));}

.modal-overlay{position:fixed;inset:0;background:rgba(0,0,0,.6);z-index:1000;display:flex;align-items:flex-end;animation:fadeIn var(--fast);}
@keyframes fadeIn{from{opacity:0;}to{opacity:1;}}
.modal-sheet{background:var(--bg);border-top:1px solid var(--border);border-radius:14px 14px 0 0;max-height:92vh;width:100%;display:flex;flex-direction:column;animation:slideUp var(--fast) var(--ease);}
@keyframes slideUp{from{transform:translateY(16px);opacity:.6;}to{transform:translateY(0);opacity:1;}}
.modal-head{display:flex;align-items:center;justify-content:space-between;padding:16px 18px;border-bottom:1px solid var(--border);flex-shrink:0;}
.modal-head h2{font-size:14px;letter-spacing:.06em;text-transform:uppercase;}
.modal-body{padding:16px 18px;overflow-y:auto;scrollbar-gutter:stable;}
/* scrollbar-gutter:stable reserves the scrollbar's width permanently,
   whether or not a scrollbar is actually showing right now. Without it,
   the moment content becomes tall enough to need a scrollbar, that
   scrollbar eats into the available width from the right — which reads
   exactly like the content's padding suddenly growing / everything
   compacting inward. This is what was happening right at the end of the
   Organizador/Árbol slide: newWrap sits position:absolute during the
   animation (which may not engage modal-body's scrollbar the same way
   normal-flow content does) and only starts really triggering it once
   settle() drops it back into normal flow — so the scrollbar could pop in
   at that exact instant. Reserving its space up front means it can never
   change the width, whether it's actually rendered or not. */
/* Prevents flexbox from silently compressing the body below the height we
   lock it to during the Organizador/Árbol slide (see switchTaskCardMode) —
   .modal-sheet is a max-height:92vh flex column, and unlike the header and
   footer (both flex-shrink:0), .modal-body was still shrinkable by default.
   If the header's own rendered height changed between modes (a wrapping
   meta-chip vs. the plain "Organizador" label), flexbox would quietly
   resize modal-body to compensate — which is what kept reading as a snap
   even after the JS-side height was made constant. */
.modal-body.cs-height-locked{flex-shrink:0;}
.modal-foot{padding:12px 18px calc(12px + var(--safe-bottom));border-top:1px solid var(--border);display:flex;gap:10px;flex-shrink:0;}
.modal-overlay.doc-style{background:rgba(6,4,3,.82);align-items:center;justify-content:center;}
/* full-style: contact detail — fills the entire viewport, no rounded
   corners or side/top margins, since it's read on phone and every bit of
   screen matters. Still just the same .modal-body/.modal-head/.modal-foot
   markup inside, only the outer sheet's sizing changes. */
.modal-overlay.full-style{align-items:stretch;justify-content:stretch;background:var(--bg);}
.modal-sheet.full-style{width:100%;height:100%;max-height:100vh;border-radius:0;border:none;margin:0;animation:fadeIn var(--fast);}
.modal-sheet.full-style .modal-body{flex:1;}
.modal-sheet.full-style .modal-head{padding-top:calc(16px + env(safe-area-inset-top));}
/* ---- Manual AI wizard ---- */
.mai-step{margin-bottom:18px;}
.mai-step-num{font-family:var(--font-heading);font-size:9px;letter-spacing:.12em;text-transform:uppercase;color:var(--text-muted);margin-bottom:6px;}
.mai-step-hint{font-size:11.5px;color:var(--text-dim);margin-bottom:10px;line-height:1.5;}
.mai-prompt-box{position:absolute;opacity:0;pointer-events:none;width:1px;height:1px;overflow:hidden;}
.mai-copy-btn{padding:8px 10px;border:1px solid var(--border);border-radius:var(--r-sm);background:var(--surface-2);color:var(--text);cursor:pointer;display:flex;align-items:center;justify-content:center;line-height:1;flex-shrink:0;}
.mai-copy-btn.copied{color:var(--success);border-color:var(--success);}
.mai-copy-btn:active{background:var(--surface);}
.mai-paste-area{width:100%;box-sizing:border-box;background:var(--surface-2);border:1px solid var(--border);border-radius:8px;padding:12px;font-family:var(--font-heading);font-size:12px;color:var(--text);resize:none;height:44px;line-height:1.4;overflow:hidden;transition:height .15s;}
.mai-paste-area:focus{outline:none;border-color:var(--accent);height:120px;overflow-y:auto;}
.mai-paste-area::placeholder{color:var(--text-muted);font-size:11.5px;}
.mai-status{font-size:11px;color:var(--text-muted);margin-top:6px;min-height:16px;}
.mai-status.ok{color:var(--success);}
.mai-status.err{color:var(--accent);}
.mai-open-btn{font-family:var(--font-heading);font-size:10px;letter-spacing:.06em;text-transform:uppercase;padding:5px 10px;border:1px solid var(--border);border-radius:var(--r-sm);background:transparent;color:var(--accent);border-color:var(--accent);cursor:pointer;margin-left:8px;}
.modal-sheet.doc-style{margin:34px auto calc(20px + var(--safe-bottom));border-radius:20px;border:1px solid var(--border);max-height:84vh;box-shadow:0 30px 90px rgba(0,0,0,.6);max-width:560px;width:calc(100% - 40px);animation:docPopIn 240ms var(--ease);}
@keyframes docPopIn{from{opacity:0;transform:translateY(10px);}to{opacity:1;transform:translateY(0);}}
.modal-sheet.doc-style .modal-head{padding:20px 22px 14px;}
.modal-sheet.doc-style .modal-body{padding:8px 32px 30px;}
.modal-sheet.doc-style .modal-foot{padding:14px 26px calc(16px + var(--safe-bottom));}
/* modal-head-v2 had no doc-style override at all, so it kept its own 22px
   inset while doc-style bumps modal-body to 32px — that 10px gap is why
   the header chip sat to the left of the body text instead of lining up
   with it. */
.modal-sheet.doc-style .modal-head-v2{padding:20px 32px 10px;}

.modal-head-v2{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:20px 22px 10px;flex-shrink:0;}
.meta-chip{border:1px solid var(--border);border-radius:6px;padding:6px 11px;font-family:var(--font-heading);font-size:10.5px;letter-spacing:.04em;color:var(--text-dim);max-width:56%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
/* Wraps the Tipo badge (TAREA/META/etc.) together with the parent meta-chip
   in the card header so they always sit on one line, next to each other —
   see metaChipHTML(). Only the meta-chip inside truncates; the badge keeps
   its natural width. */
.header-chip-row{display:flex;align-items:center;gap:8px;max-width:70%;min-width:0;}
.header-chip-row .type-badge{flex-shrink:0;}
.header-chip-row .meta-chip{max-width:100%;min-width:0;flex-shrink:1;}
.head-right{display:flex;align-items:center;gap:10px;flex-shrink:0;}
.type-badge{font-family:var(--font-heading);font-size:8px;letter-spacing:.06em;text-transform:uppercase;color:var(--text-muted);}
.type-badge[data-tipo]{border:none;padding:1px 5px;border-radius:4px;font-weight:700;opacity:1;}
.type-badge[data-tipo="meta"]{color:var(--tipo-meta);background-color:rgba(63,151,206,0.24);}
.type-badge[data-tipo="submeta"]{color:var(--tipo-submeta);background-color:rgba(154,109,222,0.24);}
.type-badge[data-tipo="tarea"]{color:var(--tipo-tarea);background-color:rgba(176,116,63,0.24);}
.type-badge[data-tipo="sistema"]{color:var(--tipo-sistema);background-color:rgba(100,145,76,0.24);}

/* ---- tv-tipo-tags: standalone M/SM/T/S tipo-filter tags (replaces the old
   bordered money-seg-group pill). Same colored-tint-when-active look as
   .type-badge, but each tag sits on its own (no shared border/dividers) and
   drops to a plain greyed-out state when its tipo is off, so on/off reads
   the same way a checkbox would. */
.tv-tipo-tags{display:flex;align-items:center;gap:5px;flex-shrink:0;}
.tv-tipo-tag{display:inline-flex;align-items:center;justify-content:center;height:22px;min-width:22px;box-sizing:border-box;font-family:var(--font-heading);font-size:9px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;padding:0 5px;border-radius:4px;cursor:pointer;user-select:none;color:var(--text-muted);background:var(--surface-2);opacity:.55;transition:opacity var(--fast) var(--ease),color var(--fast) var(--ease),background var(--fast) var(--ease);}
.tv-tipo-tag:hover{opacity:.85;}
.tv-tipo-tag.on[data-tipo="meta"]{color:var(--tipo-meta);background-color:rgba(63,151,206,0.24);opacity:1;}
.tv-tipo-tag.on[data-tipo="submeta"]{color:var(--tipo-submeta);background-color:rgba(154,109,222,0.24);opacity:1;}
.tv-tipo-tag.on[data-tipo="tarea"]{color:var(--tipo-tarea);background-color:rgba(176,116,63,0.24);opacity:1;}
.tv-tipo-tag.on[data-tipo="sistema"]{color:var(--tipo-sistema);background-color:rgba(100,145,76,0.24);opacity:1;}
[data-device="phone"] .tv-tipo-tag{font-size:8.5px;height:20px;min-width:20px;padding:0 4.5px;}

/* ============================= TREE VIEW (Organización) — §1.E ===========
   Restyled on the app's own tokens per handoff §1.E — replaces the plain
   .card-row list from §1.B. Rows still use .card-row as their flex base
   (display/align/justify/gap), these are additive modifiers. */
.tv-toolbar{display:flex;gap:6px;flex-wrap:nowrap;align-items:center;padding:0 2px 6px;overflow-x:auto;scrollbar-width:none;}
.tv-toolbar::-webkit-scrollbar{display:none;}
.tv-toolbar .toolbar-spacer{flex:1;min-width:4px;}
.tv-toolbar .chip,.tv-toolbar .btn,.tv-toolbar .tv-icon-btn,.tv-toolbar .tv-menu-wrap{flex-shrink:0;}
.tv-icon-btn{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;flex-shrink:0;border:1px solid var(--border);border-radius:var(--r);color:var(--text-dim);background:transparent;font-size:15px;cursor:pointer;line-height:1;}
.tv-icon-btn:hover{background:var(--surface-2);color:var(--text);}
.tv-icon-btn:disabled{opacity:.35;cursor:default;}
.tv-icon-btn-plain{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;flex-shrink:0;border:none;border-radius:var(--r);color:var(--text-dim);background:transparent;cursor:pointer;line-height:1;padding:0;}
.tv-icon-btn-plain:hover{color:var(--text);}
.tv-icon-btn-plain:disabled{opacity:.35;cursor:default;}
.tv-icon-btn-plain svg{width:18px;height:18px;}
.tv-done-chip{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;padding:0;margin-left:-1px;flex-shrink:0;border:none;background:transparent;border-radius:4px;cursor:pointer;}
.tv-done-chip svg{display:block;width:22px;height:22px;}
.tv-done-chip.active{background:transparent;color:var(--text-dim);}
.wo-toggle{display:flex;background:var(--surface-2);border:1px solid var(--border);border-radius:999px;padding:2px;gap:2px;}
.wo-toggle-opt{border:none;background:transparent;color:var(--text-muted);width:26px;height:26px;border-radius:999px;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background .15s,color .15s;}
.wo-toggle-opt.active{background:var(--accent);color:var(--bg);}
.tv-area-header{padding:10px 4px;min-height:34px;font-family:var(--font-heading);font-weight:600;font-size:11px;letter-spacing:.04em;text-transform:uppercase;color:var(--text-dim);border-bottom:1px solid var(--border);margin:0;}
.tv-area-header.tv-drop-target{background:var(--accent-soft);}

.tv-tree{
  --tv-col-palanca:44px; --tv-col-due:44px; --tv-col-sched:52px; --tv-col-dur:36px; --tv-col-status:58px;
  --tv-col-star:16px; --tv-col-add:16px;
}
.tv-node-wrap{position:relative;}
.tv-dropline{height:0;border-top:2px solid transparent;margin:0 3px;border-radius:2px;}
.tv-dropline.show{border-top-color:var(--accent);}
.tv-row{
  display:grid;
  grid-template-columns:1fr var(--tv-col-palanca) var(--tv-col-due) var(--tv-col-sched) var(--tv-col-dur) var(--tv-col-status) var(--tv-col-star) var(--tv-col-add);
  column-gap:var(--tv-col-gap); align-items:center; padding:4px 6px 4px 3px; border-radius:5px;
  cursor:pointer; border:1px solid transparent; min-height:26px;
}
.tv-row:active{background:var(--surface-2);}
.tv-row.tv-dragging{opacity:.4;}
.tv-row.tv-drop-inside{outline:2px dashed var(--accent);outline-offset:-2px;background:var(--accent-soft);}
.tv-row-main{grid-column:1;display:flex;align-items:center;gap:6px;min-width:0;overflow:hidden;}
.tv-drag-handle{color:var(--text-muted);font-size:11px;cursor:grab;width:10px;text-align:center;flex-shrink:0;touch-action:none;}
.tv-drag-handle:active{cursor:grabbing;}
.tv-row-toggle{width:12px;height:12px;flex-shrink:0;color:var(--text-muted);font-size:9px;display:flex;align-items:center;justify-content:center;}
.tv-row .complete-circle,.tv-row .complete-spacer{width:14px;height:14px;flex-shrink:0;}
.tv-row-title{flex:1;min-width:0;font-size:12.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.tv-row-title.tv-destacada::before{content:'★ ';color:var(--emphasis);}
.tv-row[data-tipo="meta"] .tv-row-title{font-weight:650;}
.tv-row[data-tipo="submeta"] .tv-row-title{font-weight:600;color:var(--text-dim);}
.tv-row[data-tipo="sistema"] .tv-row-title{font-style:italic;color:#a9d9c1;}
.tv-node-chips{display:flex;align-items:center;gap:5px;flex-shrink:0;}
.tv-mini-chip{font-size:9.5px;padding:1px 6px;border-radius:8px;color:var(--text-dim);background:var(--surface-2);font-family:var(--font-mono);white-space:nowrap;}
.tv-mini-chip.cross{color:var(--accent);border:1px solid var(--accent-soft);background:var(--accent-soft);}
.tv-mini-chip.mismatch{color:var(--emphasis);border:1px solid rgba(233,201,124,.35);background:rgba(233,201,124,.1);}
.tv-mini-chip.palanca{color:#c9a3e3;border:1px solid rgba(201,163,227,.35);background:rgba(201,163,227,.1);}
.tv-mini-chip.palanca.tv-palanca-col{grid-column:2;justify-self:center;}
.tv-field-chip{font-size:9px;padding:1px 3px;border-radius:5px;background:transparent;color:var(--text-muted);font-family:var(--font-mono);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:center;cursor:pointer;border:1px solid transparent;width:100%;}
.tv-field-chip:hover{color:var(--text);}
.tv-field-chip.empty{opacity:.55;border:1px solid var(--border);border-radius:5px;}
.tv-field-chip.empty:hover{opacity:.9;border-color:var(--text-muted);}
.tv-field-chip.tv-due-chip{grid-column:3;}
.tv-field-chip.tv-sched-chip{grid-column:4;}
.tv-field-chip.dur-chip{grid-column:5;}
.tv-field-chip.status-chip{grid-column:6;}
.tv-field-chip.tv-due-chip.has-value.due-far{background:#fff;border-color:#fff;color:#111;}
.tv-field-chip.tv-due-chip.has-value.due14{background:#fff6b0;border-color:#f0e070;color:#2a2400;}
.tv-field-chip.tv-due-chip.has-value.due7{background:#f0c800;border-color:#e0b800;color:#191426;}
.tv-field-chip.tv-due-chip.has-value.due3{background:#e8883a;border-color:#e8883a;color:#111;}
.tv-field-chip.tv-due-chip.has-value.overdue{background:#e65a5a;border-color:#e65a5a;color:#000;font-weight:600;}
.tv-field-chip.tv-sched-chip.has-value{color:#7fb0e3;}
.tv-field-chip.status-chip{background:var(--surface-2);border-color:var(--border);border-radius:12px;padding:2px 9px;}
.tv-field-chip.tv-due-chip.tv-today{background:rgba(233,201,124,.16);border-color:var(--emphasis);color:var(--emphasis);}
.tv-field-chip.tv-due-chip.tv-overdue{background:#e65a5a;border-color:#e65a5a;color:#000;font-weight:600;}
.tv-field-chip input{width:100%;background:var(--bg);border:1px solid var(--accent);color:var(--text);border-radius:5px;padding:1px 3px;font-size:10px;font-family:inherit;}
.tv-star-toggle{grid-column:7;justify-self:center;width:15px;height:15px;border:none;background:transparent;color:var(--text-muted);font-size:12px;display:flex;align-items:center;justify-content:center;padding:0;line-height:1;}
.tv-star-toggle:active{color:var(--emphasis);}
.tv-star-toggle.on{color:var(--emphasis);}
/* Recurrent-task icon toggle — same filled/not-filled button pattern as
   .tv-star-toggle (used on the task-detail card, next to the priority
   star), but its own on-color so it doesn't read as "priority" too. */
.tv-recurrent-toggle{width:15px;height:15px;border:none;background:transparent;color:var(--text-muted);display:flex;align-items:center;justify-content:center;padding:0;line-height:1;cursor:pointer;}
.tv-recurrent-toggle:active{color:var(--recurrent);}
.tv-recurrent-toggle.on{color:var(--recurrent);}
/* Card-only variant (task-detail Identidad row): priority star just gets a
   bit bigger for easier phone tapping — it's already a filled glyph
   (★/☆), so no circle backdrop needed. Recurrent gets a smaller circular
   "on" fill (like .complete-circle's tick badge) since its icon is a thin
   outline that needed a solid state to read as toggled. Layered on top of
   .tv-star-toggle/.tv-recurrent-toggle via an extra class so the tree-view
   instances (small, inline in a dense row) are untouched. */
.tv-star-toggle.td-toggle-circle{
  width:22px;height:22px;font-size:18px;
  border:none;background:transparent;color:var(--text-muted);
  display:flex;align-items:center;justify-content:center;padding:0;line-height:1;
  cursor:pointer;flex-shrink:0;-webkit-tap-highlight-color:transparent;touch-action:manipulation;
  transition:color var(--fast) var(--ease),transform var(--fast) var(--ease);
}
.tv-star-toggle.td-toggle-circle:active{transform:scale(.88);}
.tv-star-toggle.td-toggle-circle.on{color:var(--emphasis);}
.tv-recurrent-toggle.td-toggle-circle{
  width:24px;height:24px;border-radius:50%;
  border:1.5px solid rgba(255,255,255,.35);background:transparent;
  color:var(--text-muted);
  display:flex;align-items:center;justify-content:center;padding:0;line-height:1;
  cursor:pointer;flex-shrink:0;-webkit-tap-highlight-color:transparent;touch-action:manipulation;
  transition:background var(--fast) var(--ease),border-color var(--fast) var(--ease),color var(--fast) var(--ease),transform var(--fast) var(--ease);
}
.tv-recurrent-toggle.td-toggle-circle svg{width:13px;height:13px;}
.tv-recurrent-toggle.td-toggle-circle:active{transform:scale(.88);}
.tv-recurrent-toggle.td-toggle-circle.on{background:var(--recurrent);border-color:var(--recurrent);color:#1a1209;}
.tv-row-add-btn{grid-column:8;justify-self:center;width:16px;height:16px;border-radius:5px;color:var(--text-muted);background:transparent;border:none;font-size:12px;display:flex;align-items:center;justify-content:center;}
.tv-row-add-btn:active{background:var(--surface-2);color:var(--accent);}
.tv-node-children{margin-left:14px;border-left:1px solid var(--border);padding-left:4px;}
.tv-node-children.collapsed{display:none;}
.tv-flat-section{margin-bottom:4px;}
.tv-row.tv-flat-row{cursor:pointer;}
/* Flat rows pack type-badge/O/title/tags together on the left instead of
   letting the title's flex:1 shove the tags all the way over to hug the
   Venc./Prog. columns — the tags stay right after the title, and whatever
   room is left over sits as empty space before the Vista columns. */
.tv-flat-row .tv-row-title{flex:0 1 auto;}
.tv-flat-tag{font-size:9.5px;padding:1px 6px;border-radius:8px;color:var(--text-dim);background:var(--surface-2);font-family:var(--font-mono);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:96px;flex-shrink:0;}
.tv-flat-tag-area{color:var(--accent);}
.tv-tree-divider{display:flex;align-items:center;gap:8px;margin:8px 4px 4px;color:var(--text-muted);font-size:9.5px;text-transform:uppercase;letter-spacing:.5px;}
.tv-tree-divider::before,.tv-tree-divider::after{content:'';flex:1;height:1px;background:var(--border);}
.tv-col-header{display:grid;grid-template-columns:1fr var(--tv-col-palanca) var(--tv-col-due) var(--tv-col-sched) var(--tv-col-dur) var(--tv-col-status) var(--tv-col-star) var(--tv-col-add);column-gap:var(--tv-col-gap);align-items:center;padding:4px 6px 4px 30px;font-size:9px;color:var(--text-muted);text-transform:uppercase;letter-spacing:.03em;font-weight:650;border-bottom:1px solid var(--border);margin-bottom:2px;}
.tch{text-align:center;min-width:0;overflow:hidden;white-space:nowrap;}
.tch-palanca{grid-column:2;}
.tch-due{grid-column:3;}
.tch-sched{grid-column:4;}
.tch-dur{grid-column:5;}
.tch-edo{grid-column:6;}
.tch-priority{grid-column:7;}
.tch.sortable{cursor:pointer;}
.tch.sortable:hover{color:var(--text);}
.tch.sort-active{color:var(--accent);}
.tv-area-header{position:sticky;top:-16px;background:var(--bg);z-index:3;cursor:pointer;display:flex;align-items:center;gap:6px;}
.tv-area-header:hover{background:var(--surface-2);}
.tv-area-header .tv-row-toggle{color:var(--text-muted);font-size:10px;width:12px;flex-shrink:0;}
.tv-area-header .btn-icon{width:24px;height:24px;border:none;font-size:14px;}
.tv-area-count{font-size:9.5px;color:var(--text-muted);background:var(--surface-2);border-radius:10px;padding:1px 7px;}
.tv-area-body.collapsed{display:none;}
[data-device="phone"] .tv-toolbar{flex-wrap:nowrap;overflow-x:auto;-ms-overflow-style:none;scrollbar-width:none;padding-bottom:4px;}
[data-device="phone"] .tv-toolbar::-webkit-scrollbar{display:none;}
[data-device="phone"] .tv-toolbar .chip,
[data-device="phone"] .tv-toolbar .btn{flex-shrink:0;}
[data-device="phone"] .tv-toolbar .toolbar-spacer{flex:0 0 8px;}
[data-device="phone"] .tv-col-header{padding-left:26px;}
/* ---- Narrow the tree view's side margins — the outer .board-scroll
   gutter, per-depth indent, and trailing star/add columns were eating
   enough width that titles got clipped and rows collided with the
   floating Vista menu. Left/right edges only; row content untouched.
   ---- Handoff v2 §6.5: originally phone-only, now applied on all
   devices (laptop included) per follow-up request. */
.board-scroll.tv-mode{margin:0 -8px;padding:0 8px 6px;}
.tv-tree{--tv-col-star:14px; --tv-col-add:14px;}
.tv-row{padding:4px 2px 4px 2px;}
.tv-row-main{gap:3px;}
.tv-drag-handle{width:7px;font-size:10px;}
.tv-node-children{margin-left:8px;padding-left:3px;}
.tv-area-header{padding:10px 2px;}
.tv-menu-wrap{position:relative;display:inline-flex;flex-shrink:0;}
.tv-dropdown-menu{position:fixed;background:var(--surface-2);border:1px solid var(--border);border-radius:var(--r-sm);padding:6px;min-width:212px;box-shadow:0 8px 24px rgba(0,0,0,.45);z-index:1050;display:flex;flex-direction:column;gap:2px;} /* BUGFIX (2026-09-07): was 500, sat BEHIND .modal-overlay (1000) whenever opened from inside a modal — e.g. the Contactos list's own "Filtros" button — so the popover rendered invisible/unclickable underneath the modal backdrop. 1050 clears the modal overlay while staying under .toast (1100). */
.tv-dropdown-item{background:transparent;border:none;color:var(--text);text-align:left;padding:7px 9px;border-radius:6px;font-size:12px;cursor:pointer;display:flex;align-items:center;gap:6px;width:100%;}
.tv-dropdown-item:hover{background:var(--surface);}
.tv-dropdown-item:disabled{opacity:.4;cursor:not-allowed;}
.tv-dropdown-sep{height:1px;background:var(--border);margin:4px 2px;}
.tv-dropdown-check{display:flex;align-items:center;gap:8px;padding:6px 9px;font-size:12px;color:var(--text);cursor:pointer;border-radius:6px;white-space:nowrap;}
.tv-dropdown-check:hover{background:var(--surface);}
.tv-dropdown-check input{accent-color:var(--accent);flex-shrink:0;width:14px;height:14px;margin:0;}
.tv-dropdown-slider{padding:8px 9px 6px;display:flex;flex-direction:column;gap:4px;}
.tv-dropdown-slider-row{display:flex;justify-content:space-between;align-items:baseline;gap:10px;font-size:12px;color:var(--text);}
.tv-dropdown-slider-row strong{font-variant-numeric:tabular-nums;color:var(--text-dim);font-weight:600;}
.tv-dropdown-slider input[type=range]{width:100%;margin:0;accent-color:var(--accent);cursor:pointer;}
#radial-filter-menu.tv-dropdown-menu{min-width:268px;max-height:min(78vh,720px);overflow-y:auto;}
.tv-dropdown-slider-hint{font-size:10px;color:var(--text-muted);padding:2px 9px 6px;line-height:1.35;}
.tv-duration-popover,.tv-status-popover{position:absolute;z-index:60;background:var(--surface-2);border:1px solid var(--border);border-radius:8px;padding:9px;box-shadow:0 8px 24px rgba(0,0,0,.45);}
.tv-duration-popover{display:flex;gap:8px;}
.tv-duration-popover label{font-size:9.5px;color:var(--text-muted);display:block;margin-bottom:3px;}
.tv-duration-popover input{width:50px;background:var(--bg);border:1px solid var(--border);color:var(--text);border-radius:5px;padding:5px;font-size:12px;font-family:inherit;}
.tv-status-popover input{width:160px;background:var(--bg);border:1px solid var(--border);color:var(--text);border-radius:5px;padding:6px 8px;font-size:12px;font-family:inherit;}
.tv-status-options{display:flex;flex-wrap:wrap;gap:5px;margin-bottom:8px;max-width:200px;}
.tv-status-option{background:var(--bg);border:1px solid var(--border);color:var(--text-dim);padding:4px 10px;border-radius:12px;font-size:11.5px;font-family:inherit;cursor:pointer;white-space:nowrap;}
.tv-status-option.selected{border-color:var(--accent);color:var(--accent);background:var(--accent-soft);}
.tv-breadcrumb{font-size:11px;color:var(--text-muted);margin:2px 0 14px;overflow-wrap:break-word;}
.tv-breadcrumb span{cursor:pointer;text-decoration:underline;text-decoration-color:var(--border);}
.tv-lens-toggle{display:flex;gap:6px;}
.tv-lens-toggle button{padding:5px 10px;border:1px solid var(--border);border-radius:var(--r-sm);font-family:var(--font-heading);font-size:10.5px;letter-spacing:.04em;text-transform:uppercase;color:var(--text-dim);background:transparent;}
.tv-lens-toggle button.active{color:var(--bg);background:var(--emphasis);border-color:var(--emphasis);}
.title-input{width:100%;background:transparent;border:none;font-family:var(--font-heading);font-size:19px;font-weight:600;color:var(--text);padding:2px 0 10px;line-height:1.3;}
.title-input:focus{outline:none;box-shadow:0 2px 0 var(--accent);}
.action-row{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:14px;align-items:center;}
.action-row select.tipo-select{width:auto;flex:0 0 auto;padding:8px 12px;font-size:11.5px;border-radius:9px;}
/* Card chrome: Palanca + Hoy + Fechas + + + clock on ONE row. Native
   <select> otherwise sizes to the longest OPTION ("Pendientes"), which
   shoved + onto the next line. fitStatusSelects() sets width to the
   selected label; nowrap + compact padding keep the rest in place. */
.card-action-row{flex-wrap:nowrap;gap:6px;margin-bottom:8px;}
.card-action-row select.tipo-select{
  flex:0 0 auto;min-width:0;max-width:none;padding:8px 12px;box-sizing:content-box;
  appearance:none;-webkit-appearance:none;-moz-appearance:none;
  background-image:none;text-indent:0;text-overflow:clip;
  text-align:center;text-align-last:center;line-height:1.2;
}
.card-action-row select.tipo-select::-ms-expand{display:none;}
.card-action-row .btn-chip{flex:0 0 auto;white-space:nowrap;padding:8px 10px;}
.card-action-row .btn-chip-icon{
  width:32px;height:32px;padding:0;justify-content:center;gap:0;
  box-sizing:border-box;
}
.card-action-row .btn-chip-icon svg{width:16px;height:16px;}
.card-action-row .card-add-btn{
  width:32px;height:32px;padding:0;justify-content:center;
  line-height:1;font-weight:400;box-sizing:border-box;
}
.card-action-row .node-timer-btn{
  margin:0;width:32px;height:32px;padding:0;justify-content:center;
  box-sizing:border-box;
}
.card-action-row .node-timer-btn svg{width:16px;height:16px;}
.modal-sheet.card-drop-hover{outline:2px dashed var(--emphasis);outline-offset:-6px;}
.modal-sheet.card-drop-hover::after{content:'Suelta para adjuntar';position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:rgba(16,12,10,.72);color:var(--emphasis);font-family:var(--font-heading);font-size:15px;letter-spacing:.06em;text-transform:uppercase;pointer-events:none;z-index:40;border-radius:inherit;}
/* ── KNOB / LEVERAGE-INPUT SHARED DESIGN TOKENS ───────────────────────────────────────────
   Single source of truth for the visual style shared between the area-focus
   knobs (Ajustes) and the per-task leverageMultiplier input (detail / board).
   Change any token here and both controls update together.
     --knob-cap       : circular cap fill; also the input background.
     --knob-arc       : active-arc stroke color (knob ring accent).
     --knob-text      : numeric value color inside cap / inside input.
     --knob-label     : area-name label below knob; input placeholder.
     --knob-font      : typeface for the numeric value in both controls.
     --knob-font-size : numeric value size shared by both controls.
     --knob-r         : border-radius of the input pill.
   ─────────────────────────────────────────────────────────────────────────── */
:root{
  --knob-cap:      #43464d;
  --knob-arc:      var(--accent);
  --knob-text:     var(--text);
  --knob-label:    var(--text-dim);
  --knob-font:     var(--font-heading);
  --knob-font-size:15px;
  --knob-r:        9px;
}
.action-row input.leverage-input{width:56px;flex:0 0 auto;padding:8px 10px;font-size:var(--knob-font-size);font-family:var(--knob-font);border-radius:var(--knob-r);text-align:center;}
/* Unify the action-row pills (workType/status selects + Fechas/+/timer
   btn-chips) — selects were inheriting the brighter base input fill
   (var(--surface-2) bg, var(--text) color) while .btn-chip defaults to a
   transparent bg and dimmer var(--text-dim), so "Fechas"/"+" looked
   visibly duller next to "Contacto"/"Pendiente". Same bg/color/border/
   padding across both element types now. */
.action-row select.tipo-select,
.action-row input.leverage-input,
.action-row .btn-chip{background:var(--knob-cap);color:var(--knob-label);border:1px solid var(--border);padding:8px 12px;}
.card-action-row select.tipo-select{
  appearance:none;-webkit-appearance:none;-moz-appearance:none;
  background-image:none;padding:8px 12px;
  text-align:center;text-align-last:center;line-height:1.2;
}
.card-action-row .btn-chip.btn-chip-icon,
.card-action-row .btn-chip.card-add-btn,
.card-action-row .btn-chip.node-timer-btn{
  width:32px;height:32px;padding:0;justify-content:center;gap:0;box-sizing:border-box;
}
.card-action-row .card-add-wrap{position:relative;flex:0 0 auto;}
.card-action-row .btn-chip.node-timer-btn{margin:0;}
.card-action-row .btn-chip.btn-chip-icon svg,
.card-action-row .btn-chip.card-add-btn svg,
.card-action-row .btn-chip.node-timer-btn svg{width:16px;height:16px;stroke-width:2.2;}
/* Enfoque semanal sliders — flat detent sliders, app pink (--accent), no
   shadows/gradients. Thumb follows the pointer 1:1 while dragging (JS sets
   transition:none), then eases to the nearest of the 4 stops on release
   (JS swaps in the var(--fast)/var(--ease) transition just for that step). */
.focus-knob-row{display:flex;flex-wrap:wrap;gap:10px 6px;justify-content:center;margin-bottom:6px;}
.focus-knob-item{display:flex;flex-direction:column;align-items:center;gap:4px;width:70px;}
.focus-knob-svg{touch-action:none;cursor:ns-resize;overflow:visible;}
.lev-knob-svg{touch-action:none;cursor:ns-resize;overflow:visible;display:block;flex-shrink:0;padding:0;border:none;position:relative;z-index:1;}
.focus-knob-cap{fill:var(--knob-cap);}
.focus-knob-label{font-size:10px;color:var(--knob-label);text-align:center;line-height:1.25;min-height:24px;}
.focus-knob-svg-text{fill:var(--knob-text);font-size:var(--knob-font-size);font-weight:600;font-family:var(--knob-font);}
.btn-chip{display:inline-flex;align-items:center;gap:5px;padding:8px 12px;border:1px solid var(--border);border-radius:9px;font-family:var(--font-heading);font-size:11.5px;color:var(--text-dim);background:transparent;}
.desc-head-row{display:flex;align-items:center;justify-content:space-between;margin-top:6px;}
.dur-value{display:inline-flex;align-items:center;justify-content:center;font-family:var(--font-heading);font-size:12px;color:var(--text-dim);border:none;background:transparent;border-radius:0;padding:0;min-width:0;text-align:center;cursor:pointer;user-select:none;-webkit-user-select:none;touch-action:manipulation;}
.dur-value:active{opacity:.7;}
.dur-input{font-family:var(--font-heading);font-size:11px;color:var(--text);background:var(--surface);border:1px solid var(--accent,var(--border));border-radius:8px;padding:5px 6px;width:44px;text-align:center;-moz-appearance:textfield;}
.dur-input::-webkit-outer-spin-button,.dur-input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0;}
.due-chip{display:inline-flex;align-items:center;gap:6px;padding:6px 11px;border-radius:8px;font-family:var(--font-heading);font-size:11px;border:1px solid var(--border);color:var(--text-dim);}
.date-chip-row{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:14px;align-items:center;}
.due-chip.sched-chip{background:transparent;color:var(--text-dim);}
.due-chip.due-far{background:#fff;border-color:#fff;color:#111;font-weight:600;}
.due-chip.due14{background:#fff6b0;border-color:#f0e070;color:#2a2400;font-weight:600;}
.due-chip.due7{background:#f0c800;border-color:#e0b800;color:#191426;font-weight:600;}
.due-chip.due3{background:#e8883a;border-color:#e8883a;color:#111;font-weight:600;}
.due-chip.overdue{background:#e65a5a;border-color:#e65a5a;color:#000;font-weight:600;}
.card-glow{box-shadow:0 0 0 1px rgba(232,167,98,.5), 0 0 16px rgba(232,167,98,.35);}
.comment-row{padding:10px 0;border-bottom:1px solid var(--border);}
.comment-input-row{display:flex;align-items:center;gap:10px;margin-bottom:6px;}
.comment-input-row input{flex:1;min-width:0;}
.comment-input-row .btn-icon{align-self:stretch;height:auto;}
.modal-close{width:30px;height:30px;color:var(--text-dim);position:relative;}
.modal-close::after{content:'';position:absolute;inset:-7px;}
.modal-close svg{width:16px;height:16px;}

.timer-num{font-family:var(--font-mono);font-size:56px;text-align:center;letter-spacing:.02em;margin:22px 0;}
.timer-phase{text-align:center;font-family:var(--font-heading);font-size:11px;letter-spacing:.1em;text-transform:uppercase;color:var(--text-dim);margin-bottom:6px;}

.wheel-wrap{display:flex;justify-content:center;margin-bottom:6px;}
.accordion-body{padding:10px 4px 18px;border-bottom:1px solid var(--border);}
.almas-edit-toggle{width:34px;height:34px;border-radius:50%;display:flex;align-items:center;justify-content:center;color:var(--text-dim);flex-shrink:0;transition:color var(--fast),background var(--fast);position:relative;}
.almas-edit-toggle::after{content:'';position:absolute;inset:-5px;}
.almas-edit-toggle.active{color:var(--emphasis);background:rgba(255,255,255,.06);}
.almas-edit-toggle svg{width:17px;height:17px;}

.step-dots{display:flex;gap:5px;justify-content:center;margin-bottom:16px;}
.step-dots span{width:5px;height:5px;border-radius:50%;background:var(--border);display:block;}
.step-dots span.on{background:var(--text-dim);}
.woop-label{font-family:var(--font-heading);font-size:10px;letter-spacing:.1em;text-transform:uppercase;color:var(--text-muted);margin:8px 0 4px;}

.toast{position:fixed;bottom:calc(var(--nav-h) + 18px + var(--safe-bottom));left:16px;right:16px;background:var(--surface-2);border:1px solid var(--border);border-radius:var(--r);padding:10px 14px;font-size:12px;z-index:3000;animation:fadeIn var(--fast);}
.toast-undo{display:flex;align-items:center;gap:10px;}
.toast-undo span{flex:1;}
/* Peso chip (Meta/Submeta stakes) + stuck-task triage (2026-10) */
.peso-chip{font-family:var(--font-mono);font-size:10px;letter-spacing:.08em;text-transform:uppercase;padding:4px 10px;border-radius:999px;border:1px solid var(--border);background:transparent;color:var(--text-muted);cursor:pointer;}
.peso-chip.peso-core{border-color:var(--emphasis);color:var(--emphasis);}
.peso-chip.peso-opcional{opacity:.55;border-style:dashed;}
.triage-banner{display:inline-flex;align-items:center;gap:7px;width:auto;margin:0 0 10px;padding:7px 12px;border:1px solid var(--emphasis);border-radius:999px;background:transparent;color:var(--emphasis);font-family:var(--font-mono);font-size:13px;font-weight:700;letter-spacing:.04em;cursor:pointer;}
.triage-banner svg{width:16px;height:16px;flex-shrink:0;}
.triage-row{padding:14px 0;border-top:1px solid var(--border);}
.triage-row:first-child{border-top:none;}
.triage-row{cursor:pointer;padding-left:10px;border-left:3px solid transparent;}
.triage-row.is-active{border-left-color:var(--accent);}
.triage-foot{flex-direction:column;}
.triage-foot-main{display:flex;gap:10px;}
.triage-foot-main .btn{flex:1 1 0;min-width:0;padding-left:8px;padding-right:8px;}
.triage-title{font-size:15px;font-weight:600;line-height:1.3;}
.triage-title b{color:var(--emphasis);font-family:var(--font-mono);font-size:10px;letter-spacing:.08em;margin-right:6px;}
.triage-meta{font-size:11px;color:var(--text-muted);margin:3px 0 10px;font-family:var(--font-mono);}
.triage-ctl{display:flex;flex-wrap:wrap;gap:6px;align-items:center;}
.triage-ctl input[type=date]{background:var(--surface-2);border:1px solid var(--border);border-radius:var(--r);color:inherit;padding:6px 8px;font-size:13px;}
.toast-undo button{flex-shrink:0;color:var(--accent);font-family:var(--font-heading);font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;padding:6px 4px;}
.btn.is-busy{opacity:.65;}

.toolbar{display:flex;gap:6px;margin-bottom:12px;}
.toolbar input{flex:1;}
.board-scroll{display:flex;gap:16px;overflow-x:auto;scroll-snap-type:x mandatory;margin:0 -16px;padding:0 16px 6px;-webkit-touch-callout:none;}
.board-scroll.tv-mode{overflow-x:visible;overflow-y:visible;scroll-snap-type:none;flex-direction:column;}
.board-scroll.tv-mode > .tv-tree{flex:0 0 auto;width:100%;min-width:0;}
/* Tree view (Vista Árbol) renders as .tv-tree straight into .board-scroll —
   same container the Kanban columns use. As a lone flex item it was
   shrinking to its own content width instead of filling the screen, since
   .board-scroll's flex-row layout doesn't stretch children by default.
   Kanban's multiple columns are unaffected — this only targets the
   single-child tree case. */
.board-scroll > .tv-tree{flex:1 1 100%;min-width:100%;}
.board-scroll.board-scroll-zoomed{scroll-snap-type:none;}
.board-col{flex:0 0 calc(100vw - 32px);scroll-snap-align:center;border-radius:var(--r);background:var(--surface-2);border:1px solid var(--border);padding:10px;transition:flex-basis 420ms cubic-bezier(.65,0,.35,1),background var(--fast),box-shadow var(--fast);}
.board-scroll.board-scroll-zoomed .board-col{flex-basis:calc((100vw - 80px) / 4);}
/* §1.C.4 — on laptop (AppDevice.isLaptop(), see embedded device-detect above),
   all 4 columns are visible at all times, so the phone-only pick-up zoom is
   redundant there; JS also skips actually triggering it, see startCardDrag/
   finalizeCardDrop's isBoardWide() guards. Deliberately a plain viewport-
   width breakpoint (not the phone/laptop UA+pointer heuristic) — that
   heuristic false-negatives on touchscreen laptops or a merely-narrow
   browser window, and width is what actually decides whether 4 columns fit. */
@media (min-width:880px){
  .board-scroll{scroll-snap-type:none;}
  .board-col{flex-basis:calc((100vw - 80px) / 4);}
}
.board-col.drop-target{background:rgba(216,211,199,.06);box-shadow:inset 0 0 0 1.5px var(--emphasis);}
.board-col .section-title{margin:4px 0 16px;padding:0 4px;font-size:14px;}
.board-col .card{padding:10px 12px;margin-bottom:0;min-height:auto;}
/* Drag grey-out: columns/buckets that the card being dragged can't legally
   land in (a dependency-blocked task pinned to 'onhold', or any goal-box/
   orphans bucket belonging to a different area+goal than the dragged card)
   dim down and stop accepting precise drops — see startCardDrag/findSlot's
   dragState.blocked/ownAreaId/ownGoalId. A foreign bucket still lets the
   column itself accept a general drop (status still changes), it just
   won't let the card nest into someone else's goal-box. */
.board-col.drag-col-invalid{opacity:.35;pointer-events:none;transition:opacity var(--fast) var(--ease);}
.goal-box.drag-bucket-invalid,.board-area-orphans.drag-bucket-invalid{opacity:.35;pointer-events:none;transition:opacity var(--fast) var(--ease),gap var(--drag-collapse) var(--ease),margin-bottom var(--drag-collapse) var(--ease);}
/* Collapsing (not just dimming) a foreign bucket's cards during a drag —
   on top of the opacity dim above, so the one bucket the card can actually
   land in stands out and doesn't need hunting for. .board-card always
   carries this transition + a generous max-height (never clips a normal
   card at full height) so toggling .drag-bucket-invalid off again on drop
   (see clearDragAvailability()) reverses it for free via the same
   transition — that's the "everything else uncollapses/expands back"
   motion, no extra JS needed for it. */
.board-card{max-height:300px;overflow:hidden;}
.goal-box.drag-bucket-invalid>.board-card,.board-area-orphans.drag-bucket-invalid>.board-card{max-height:0;opacity:0;margin:0;padding-top:0;padding-bottom:0;border-top-width:0;border-bottom-width:0;pointer-events:none;}
.goal-box.drag-bucket-invalid,.board-area-orphans.drag-bucket-invalid{gap:0;}
/* Landing glow: a couple of fast ease-in-out pulses on the card that just
   moved and the column it settled in, so it's easy to trace what happened
   after a drag instead of the board just "snapping" — see endCardDrag(). */
@keyframes cardLandPulse{0%,100%{box-shadow:none;}25%,75%{box-shadow:0 0 0 1px rgba(232,167,98,.7),0 0 18px rgba(232,167,98,.55);}50%{box-shadow:none;}}
.board-card.card-land-pulse{animation:cardLandPulse 500ms var(--ease) 1;}
@keyframes colLandPulse{0%,100%{box-shadow:none;}25%,75%{box-shadow:inset 0 0 0 1.5px rgba(232,167,98,.55);}50%{box-shadow:none;}}
.board-col.col-land-pulse{animation:colLandPulse 500ms var(--ease) 1;}
/* Single consolidated transition list for .board-card — a second rule
   setting `transition` here would otherwise win the cascade (same
   specificity, later in source order) and silently wipe out the
   max-height/margin/padding/border-width transition the drag-collapse
   rules above depend on, so every property any .board-card transition
   needs lives in this one list. */
.board-card{transition:transform var(--fast) var(--ease),opacity var(--drag-collapse) var(--ease),max-height var(--drag-collapse) var(--ease),margin var(--drag-collapse) var(--ease),padding var(--drag-collapse) var(--ease),border-width var(--drag-collapse) var(--ease);cursor:grab;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;-webkit-user-drag:none;}
.board-card.grabbing-source{opacity:.35;cursor:grabbing;touch-action:none;}
.board-card-title{font-family:var(--font-heading);font-size:13px;}
.board-card-meta{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin-top:7px;min-height:20px;}
.board-card-date,.board-card-pill{display:inline-flex;align-items:center;gap:4px;padding:3px 8px;border-radius:20px;font-family:var(--font-heading);font-size:10px;border:1px solid var(--border);color:var(--text-dim);}
.board-card-date svg,.board-card-pill svg{width:10px;height:10px;}
.board-card-date.due-far{background:#fff;border-color:#fff;color:#111;font-weight:600;}
.board-card-date.due14{background:#fff6b0;border-color:#f0e070;color:#2a2400;font-weight:600;}
.board-card-date.due7{background:#f0c800;border-color:#e0b800;color:#191426;font-weight:600;}
.board-card-date.due3{background:#e8883a;border-color:#e8883a;color:#111;font-weight:600;}
.board-card-date.overdue{background:#e65a5a;border-color:#e65a5a;color:#000;font-weight:600;}
.board-card-pill.board-card-checklist.all-done{color:var(--success);border-color:var(--success);}
.card-ghost{position:fixed;z-index:300;pointer-events:none;margin:0 !important;transform:scale(1) rotate(0deg);box-shadow:none;opacity:1;transition:transform var(--fast) var(--ease),box-shadow var(--fast) var(--ease),opacity var(--fast) var(--ease);}
.card-ghost.lifted{transform:scale(1.03) rotate(-2deg);box-shadow:0 14px 32px rgba(0,0,0,.5);opacity:.82;}

/* Quick-complete toggle circle: its own click target on the far left of a
   task card/line, separate from the card's drag surface (drag is bound to
   .board-card / mousedown-and-move, this only ever responds to a clean tap
   via the data-action click delegate — see 'toggle-complete' case). */
.complete-row{display:flex;align-items:flex-start;gap:10px;}
.complete-row-body{flex:1;min-width:0;}
.complete-circle{width:21px;height:21px;margin-top:1px;border-radius:50%;border:1.5px solid rgba(255,255,255,.55);background:transparent;flex-shrink:0;display:flex;align-items:center;justify-content:center;cursor:pointer;-webkit-tap-highlight-color:transparent;transition:background var(--fast) var(--ease),border-color var(--fast) var(--ease),transform var(--fast) var(--ease);touch-action:manipulation;}
.complete-circle:active{transform:scale(.85);}
.complete-circle svg{width:12px;height:12px;opacity:0;transform:scale(.4);transition:opacity var(--fast) var(--ease),transform var(--fast) var(--ease);}
.complete-circle.done{background:var(--success);border-color:var(--success);}
.complete-circle.done svg{opacity:1;transform:scale(1);}
/* Archive inline button — appears on completed cards next to the complete circle */
.archive-inline-btn{width:22px;height:22px;flex-shrink:0;display:flex;align-items:center;justify-content:center;background:none;border:none;cursor:pointer;color:var(--text-muted);border-radius:6px;padding:0;-webkit-tap-highlight-color:transparent;transition:color var(--fast) var(--ease),background var(--fast) var(--ease);touch-action:manipulation;margin-top:1px;}
.archive-inline-btn:active{color:var(--text);background:var(--surface-2);}
/* Toast with undo action button */
.toast-with-action{display:flex;align-items:center;justify-content:space-between;gap:12px;}
.toast-undo-btn{background:none;border:none;color:var(--emphasis);font-size:12px;font-weight:600;font-family:var(--font-heading);cursor:pointer;padding:0;flex-shrink:0;letter-spacing:.02em;}
.complete-row-body.is-done{opacity:.6;}

.board-area-block{margin-bottom:14px;}
.board-area-orphans{display:flex;flex-direction:column;gap:5px;margin-bottom:6px;}
.goal-box{display:flex;flex-direction:column;padding:12px 14px;margin-bottom:10px;border:1px solid var(--border);border-radius:var(--r);background:var(--surface);box-shadow:0 6px 18px rgba(0,0,0,.22);}
.goal-box-header{display:flex;align-items:flex-start;gap:8px;width:100%;background:none;border:none;padding:0 0 10px;font-family:var(--font-heading);color:var(--text-dim);cursor:pointer;text-align:left;}
.goal-box-header .chevron{margin-top:2px;}
/* Plain flex-wrapping text, NOT -webkit-line-clamp: combining line-clamp's
   display:-webkit-box with a flex:1 child is unreliable in iOS Safari — it
   can ignore the flex row's width and push the area tag (margin-left:auto)
   off the visible edge of the card instead of wrapping. min-width:0 is what
   actually makes a flex item wrap within its share of the row instead of
   overflowing; no hard line cap needed, an extra-long title just wraps
   further instead of truncating. */
.goal-box-title{flex:1;min-width:0;font-family:var(--font-heading);font-size:13.5px;font-weight:700;letter-spacing:.01em;line-height:1.3;text-transform:none;color:var(--text);}
.goal-box-area-tag{margin-left:auto;flex-shrink:0;margin-top:1px;}
.goal-box.collapsed .board-card{display:none;}
.goal-box.collapsed .goal-box-header{padding-bottom:0;}
/* Strip the standalone-card look (background/border/shadow/radius/margin)
   off activities once they're inside a unified goal-box, so they read as
   plain rows of the one outer card; a hairline only between consecutive
   rows (not under the header, not after the last row) via the adjacent-
   sibling selector. .board-card-meta's existing min-height:20px already
   reserves the second line even when a row has no date/tag/checklist pill,
   so every row lands at the same height — rows with several pills or an
   attachments count that wraps are the one allowed exception. */
.goal-box>.board-card{background:none;border:none;box-shadow:none;border-radius:0;padding:10px 0;margin-bottom:0;}
.goal-box>.board-card+.board-card{border-top:1px solid var(--border);}
/* Shuffle/ungrouped board mode: flat rows (a goal-box or a lone orphan
   card) laid out one after another with no area sections between them.
   Each carries a small grip for the pointer-based reorder drag defined in
   startBoardFlatDrag — deliberately separate from .board-card's own
   mousedown-driven cross-bucket drag, see boardFlatRowHTML's comment. */
.board-col-flat{display:flex;flex-direction:column;}
.board-flat-row{margin-bottom:10px;}
.board-flat-row.grabbing-source{opacity:.35;}
.board-flat-row-head{display:flex;align-items:flex-start;gap:2px;}
.board-flat-row-head .goal-box-header{flex:1;min-width:0;}
.board-flat-orphan{display:flex;align-items:flex-start;gap:2px;border:1px solid var(--border);border-radius:var(--r);background:var(--surface);box-shadow:0 6px 18px rgba(0,0,0,.22);padding:2px 10px 2px 2px;}
.board-flat-orphan .board-card{flex:1;min-width:0;border:none;box-shadow:none;background:none;padding:10px 0;margin:0;}
.board-flat-grip{flex-shrink:0;align-self:center;color:var(--text-muted);font-size:15px;line-height:1;cursor:grab;padding:6px 4px;touch-action:none;}
.board-flat-grip:active{cursor:grabbing;color:var(--text);}
.board-flat-row-ghost{position:fixed;z-index:999;pointer-events:none;opacity:.92;box-shadow:0 12px 28px rgba(0,0,0,.4);border-radius:var(--r);transform:scale(1.02);}
.chevron{transition:transform var(--fast) var(--ease);transform:rotate(0deg);}
.chevron.open{transform:rotate(90deg);}

/* ---- ALMAS: tira de pestañas horizontal (se desliza) + una sola área visible debajo ---- */
/* ---- History Log (Fases 10/11, §1.3) ---- */
.hist-day-card { margin-bottom:8px; }
.hist-day-hdr { display:flex;align-items:center;justify-content:space-between;padding:9px 12px;cursor:pointer;background:var(--surface-2);border-radius:var(--r-sm); }
.hist-day-date { font-size:12px;font-family:var(--font-heading);color:var(--emphasis);display:flex;align-items:center; }
.hday-detail-wrap { display:grid;grid-template-rows:0fr;overflow:hidden;transition:grid-template-rows .32s var(--ease); }
.hday-detail-wrap.open { grid-template-rows:1fr; }
.hday-detail-wrap > div { min-height:0;opacity:0;transform:translateY(-4px);transition:opacity .22s ease .04s,transform .22s ease .04s; }
.hday-detail-wrap.open > div { opacity:1;transform:translateY(0); }
.hday-arr { display:inline-block;transition:transform .25s ease; }
.hday-arr.open { transform:rotate(90deg); }
.prog-period-bar { display:flex;align-items:center;justify-content:center;gap:0;padding:4px 0 14px;font-family:var(--font-heading);font-size:13px;font-weight:500;letter-spacing:0.3px;position:relative; }
.prog-period-opt { color:var(--text-muted);cursor:pointer;padding:4px 12px;transition:color .18s;user-select:none; }
.prog-period-opt.active { color:var(--emphasis);position:relative; }
.prog-period-indicator { position:absolute;left:0;bottom:6px;height:2px;background:var(--emphasis);border-radius:2px;opacity:.85;transition:transform .25s var(--ease),width .25s var(--ease);pointer-events:none; }
.prog-period-sep { color:var(--border);font-size:11px;line-height:1;pointer-events:none; }
.money-chart-body { height: 220px; margin-bottom: 4px; width:100%; }
.money-chart-body .mini-chart-svg { display:block; width:100%; height:220px; }
/* Income/Expenses bars — doubled from the original 220px per the "twice as
   tall" request; width comes for free from .money-chart-body's own
   width:100% now that the SVGs carry preserveAspectRatio="none". */
.money-chart-body-bars { height: 400px; }
.money-chart-body-bars .mini-chart-svg { height: 382px; }
/* money-seg-group: unified segmented-control look, shared by the biz filter
   and the CF/Detalle toggle — one bordered box, items separated by a thin
   divider instead of each being its own separate pill (was "a bunch of
   floating buttons" before). */
.money-seg-group { display:flex; align-items:stretch; background:var(--surface-2); border:1px solid var(--border); border-radius:20px; overflow:hidden; }
.money-seg-item { display:flex; align-items:center; gap:6px; font-family:var(--font-heading); font-size:10.5px; color:var(--text-muted); padding:5px 12px; cursor:pointer; user-select:none; position:relative; opacity:.6; transition:color var(--fast) var(--ease), opacity var(--fast) var(--ease); }
.money-seg-item:not(:last-child)::after { content:''; position:absolute; right:0; top:22%; bottom:22%; width:1px; background:var(--border); }
.money-seg-item.on, .money-seg-item.active { color:var(--emphasis); opacity:1; }
.money-seg-item .mcf-dot { width:6px; height:6px; border-radius:50%; background:var(--border); flex-shrink:0; transition:background var(--fast) var(--ease); }
.money-seg-item.on .mcf-dot, .money-seg-item.active .mcf-dot { background:var(--emphasis); }
/* ---- tv-tipo-seg: retired — the meta/submeta/tarea/sistema filter now
   renders as standalone .tv-tipo-tag chips (see .tv-tipo-tags above)
   instead of sharing this money-seg-group pill. Rules kept dormant in case
   any other caller still references the class names.
   the tree toolbar's meta/submeta/tarea/sistema filter — tightened padding
   so 4 items + Deshacer/Rehacer/Vista (desktop) or Vista/⋯ (phone) still
   fit on one row without wrapping or forcing horizontal scroll. ---- */
/* money-bucket-toggle: simple Mes/Año checkbox-style pill pair */

/* ======================================================================
   MONEY CHART ANIMATIONS
   Fully JS-driven now — see moneyAnimateAndApply() / moneyComputeScale() /
   moneyLerpGroups() etc. (§11.3b in the script). Every toggle that can
   change the chart (bars/CF/assets/liabilities/equity, business filter,
   category filter) runs a two-phase tween: first the AXIS geometry morphs
   from the old scale to the new one (chart "shrinks"/"expands"), then —
   only once that finishes — the DATA morphs from old values to new ones
   (bars grow/shrink, lines move point to point), by re-rendering the whole
   chart body via makeMoneyBarsSVG on every animation frame. No CSS
   transform/keyframe trick is involved; each frame is a real, correctly-
   computed chart at an interpolated point between "before" and "after".
   ====================================================================== */
.money-bar-seg { cursor:pointer; }

/* ---- Pie view (bars/pie toggle, area-proportional pies, family hover) ---- */
.money-chart-title-row{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:10px;margin-bottom:10px;}
.money-chart-title-row .section-title{margin:0;justify-self:start;}
.money-chart-view-toggle{display:flex;align-items:center;margin:0;flex-shrink:0;justify-self:center;}
.money-chart-title-row .money-seg-group{justify-self:end;}
#money-view-toggle .wo-toggle-opt.active{background:transparent;color:var(--bg);}
.money-chart-slide-viewport{position:relative;overflow:hidden;width:100%;}
.money-chart-body-pies{height:auto;min-height:280px;margin-bottom:8px;}
.money-pie-hover-root.money-pie-board{display:grid;grid-template-columns:minmax(0,1fr) max-content;justify-content:stretch;gap:2px 8px;align-items:start;padding:0 8px 8px;width:100%;}
.money-pie-stage{display:flex;align-items:center;justify-content:flex-start;gap:4px;padding:0;flex-wrap:nowrap;min-width:0;width:100%;}
.money-pie-col{display:flex;flex-direction:column;align-items:center;gap:0;min-width:0;}
.money-pie-svg{display:block;overflow:visible;max-width:100%;height:auto;}
.money-pie-slice{cursor:pointer;stroke:rgba(10,8,6,.55);stroke-width:0.55;transition:filter .16s ease;}
.money-pie-family{transition:transform .18s cubic-bezier(.34,1.2,.64,1);}
.money-pie-family-outline{fill:none;stroke:rgba(8,6,4,.42);stroke-width:1.35;pointer-events:none;}
.money-pie-family-split{fill:none;stroke:rgba(8,6,4,.5);stroke-width:1.2;stroke-linecap:butt;pointer-events:none;}
.money-pie-acct-split{fill:none;stroke:rgba(6,4,3,.88);stroke-width:2.7;stroke-linecap:butt;pointer-events:none;}
.money-pie-acct{cursor:pointer;pointer-events:auto;stroke:rgba(8,6,4,.55);stroke-width:1.05;}
.money-pie-acct-lbl{fill:#f8f1e6;font-family:var(--font-heading);font-weight:700;font-size:8px;letter-spacing:.08em;text-transform:uppercase;pointer-events:none;}
.money-pie-empty{fill:none;stroke:var(--border);stroke-width:1.2;stroke-dasharray:3 4;}
.money-pie-hole-lbl{fill:var(--text-muted);font-family:var(--font-heading);letter-spacing:.05em;text-transform:uppercase;}
.money-pie-hole-amt{fill:var(--text);font-family:var(--font-heading);font-weight:700;}
.money-pie-legend{padding:0;min-width:0;width:max-content;max-width:520px;align-self:start;}
.money-pie-legend-cols{display:grid;grid-template-columns:minmax(168px,230px) minmax(168px,230px);gap:18px;align-items:start;}
.money-pie-hover-root.is-hovering .money-pie-slice{filter:brightness(.72);}
.money-pie-hover-root.is-hovering .money-pie-slice.is-bright{filter:brightness(1.55) saturate(1.18);}
.money-pie-hover-root.is-hovering .money-pie-acct{filter:brightness(.72);}
.money-pie-hover-root.is-hovering .money-pie-acct.is-bright{filter:brightness(1.45) saturate(1.1);}
.money-metrics-row{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:10px;flex-wrap:wrap;}
.money-metrics-cluster{display:flex;align-items:center;gap:14px;}
.money-metrics-cluster .trend-stat{flex:0 0 auto;text-align:center;padding:2px 8px;}
.money-metrics-cluster .trend-stat-val{font-size:14px;line-height:1.15;}
.money-metrics-cluster .trend-stat-lbl{font-size:9px;}
@media (max-width:640px){
  .money-pie-legend-cols{grid-template-columns:1fr;}
  .money-pie-hover-root.money-pie-board{grid-template-columns:1fr;}
  .money-pie-stage{gap:6px;flex-wrap:wrap;}
}
.money-pie-tooltip{
  position:fixed; z-index:700; pointer-events:none;
  background:rgba(20,20,28,.92);
  border:1px solid rgba(150,150,158,.22);
  border-radius:8px;
  padding:10px 16px;
  font-size:13px; color:var(--text);
  text-align:center;
  min-width:140px;
  max-width:280px;
  box-shadow:0 8px 24px rgba(0,0,0,.55);
  display:none;
  flex-direction:column; align-items:center;
  backdrop-filter:blur(8px);
  line-height:1.45;
}
.money-pie-tip-main{font-family:var(--font-heading);font-weight:700;font-size:13px;}
.money-pie-tip-sub{font-family:var(--font-heading);font-size:11px;color:var(--text-muted);margin-top:1px;}
.money-pie-tip-amt{display:flex;gap:12px;margin-top:6px;font-family:var(--font-heading);font-size:12px;color:var(--text-muted);}
.money-pie-tip-amt span:first-child{font-weight:700;color:var(--text);}
.money-net-popup-layout{display:grid;grid-template-columns:minmax(280px,1fr) max-content max-content;gap:12px 22px;align-items:start;}
.money-net-popup-pies{display:flex;flex-direction:column;align-items:center;justify-self:stretch;gap:4px;min-width:0;}
.money-pie-stage-stack{flex-direction:column;align-items:center;gap:8px;padding:0;}
.money-net-popup-layout .money-net-section{width:max-content;max-width:280px;}
.money-net-popup-layout .money-net-row-head{justify-content:flex-start;gap:12px;}
.money-net-popup-layout .money-net-row-name{flex:0 1 auto;}
.money-net-popup-layout .money-net-sub{justify-content:flex-start;gap:12px;}
.money-net-head-amt{font-size:15px;letter-spacing:0;font-weight:700;text-transform:none;margin-left:6px;}
.money-net-section{min-width:0;padding:0;}
.money-net-section + .money-net-section{border-left:1px solid var(--border);padding-left:18px;}
.money-net-section-title{font-family:var(--font-heading);font-size:10px;letter-spacing:.08em;text-transform:uppercase;color:var(--text-muted);margin-bottom:4px;}
.money-net-row{padding:3px 0 2px;border-bottom:1px solid var(--border);transition:transform .16s cubic-bezier(.34,1.2,.64,1),opacity .16s ease;}
.money-net-row-head{display:flex;justify-content:space-between;align-items:baseline;gap:8px;}
.money-net-row-name{display:flex;align-items:center;gap:6px;font-family:var(--font-heading);font-size:12px;font-weight:600;min-width:0;}
.money-net-dot{width:8px;height:8px;border-radius:50%;flex-shrink:0;display:inline-block;}
.money-net-row-amt{font-family:var(--font-heading);font-size:12px;font-weight:700;flex-shrink:0;}
.money-net-sub{display:flex;justify-content:space-between;align-items:baseline;gap:8px;padding:1px 0 1px 14px;line-height:1.2;font-family:var(--font-heading);font-size:10.5px;color:var(--text-muted);transition:color .16s ease,transform .16s ease,opacity .16s ease;}
.money-net-sub-amt{flex-shrink:0;font-size:10.5px;}
.money-pie-hover-root.is-hovering .money-net-row{opacity:.4;}
.money-pie-hover-root.is-hovering .money-net-row.is-hot{opacity:1;transform:translateY(-2px);}
.money-pie-hover-root.is-hovering .money-net-row.is-hot .money-net-row-name,
.money-pie-hover-root.is-hovering .money-net-row.is-hot .money-net-row-amt{font-weight:800;}
.money-pie-hover-root.is-hovering .money-net-sub.is-sub-hot{
  color:var(--text);font-weight:700;transform:translateY(-1px);opacity:1;
}
.money-pie-hover-root.is-hovering .money-net-sub.is-sub-hot .money-net-sub-amt{font-weight:800;font-size:12px;}
.modal-sheet.doc-style.money-net-wide{max-width:1080px;width:min(1080px, calc(100% - 28px));}
@media (max-width:720px){
  .money-net-popup-layout{grid-template-columns:1fr;}
  .money-net-popup-pies{align-self:center;}
  .money-net-section + .money-net-section{border-left:none;padding-left:0;border-top:1px solid var(--border);padding-top:12px;}
}
/* Full-bleed chart cards: no padding, no corner rounding, and negative
   margins to cancel out #views' own 22px side padding so the chart itself
   reaches the true edges of the screen. Header/legend/stat-row content
   still needs its own padding, so it's wrapped in .money-card-pad instead —
   only the chart body (.money-chart-body) sits directly in the unpadded
   card, edge to edge. */
.money-card-full { padding:0; border-radius:0; margin-left:-22px; margin-right:-22px; width:calc(100% + 44px); }
.money-card-pad { padding:14px; }
/* More breathing room between the header/legend/pill row and the actual
   chart data, now that the card itself carries no padding to imply any. */
.money-card-full .money-chart-body { margin-top:22px; }
.money-card-full .money-chart-body-pies { margin-top:4px; }
/* 4d: bars chart wrapper — position:relative so HTML labels overlay the SVG */
.money-bars-wrap { position:relative; width:100%; height:100%; }
.money-bars-wrap .mini-chart-svg { display:block; width:100%; height:100%; }
/* Y-axis labels: absolutely positioned, always same pixel size regardless of SVG scale */
.mbars-ylabel { position:absolute; left:0; width:40px; transform:translateY(-50%); text-align:right;
  font-family:'JetBrains Mono', monospace; font-size:10px; color:var(--text-muted); white-space:nowrap;
  pointer-events:none; line-height:1; }
/* X-axis label row: sits below the SVG, labels positioned by % */
.mbars-xlabels { position:relative; width:100%; height:16px; margin-top:2px; }
.mbars-xlabel { position:absolute; transform:translateX(-50%); font-family:'Space Grotesk', sans-serif;
  font-size:10px; color:var(--text-muted); white-space:nowrap; pointer-events:none; top:0; line-height:1; }
/* Two-row x-axis (month above / year below) — used by both the bars/CF
   chart and the balance chart now that they share the same bucket groups. */
.mbars-xlabels-2row { height:30px; }
.mbars-xlabel-year { top:16px; color:var(--text-dim); font-size:9px; }
/* Ruler-style tick marks sitting right above the month-number row — one
   thin tick per month, quarter-end months (03/06/09/12) drawn taller so it
   reads like graduation marks on a ruler. Ticks are positioned with the
   exact same left:% formula (posPct) as the labels beneath them, so they
   always line up regardless of how many labels get thinned out. */
.mbars-ruler { position:relative; width:100%; height:9px; margin-top:6px; pointer-events:none; }
.mbars-ruler-tick { position:absolute; bottom:0; width:1px; height:4px; background:var(--border); opacity:.4; }
.mbars-ruler-tick-q { height:8px; opacity:.7; }
/* Landmark annotations — a dot pinned to the baseline (bottom of the chart,
   not a line running through the data), a short stub connecting it, and a
   small pill label sitting just above the dot marking a specific month
   (e.g. "Home purchase"). Lives inside .money-bars-wrap so it shares the
   exact same left:% coordinate space as the bars/lines/labels below it. */
/* Landmark annotations — a dot pinned to the baseline (bottom of the chart,
   not a line running through the data), a short gradient stub connecting
   it, and a bold pill label sitting just above the dot marking a specific
   month (e.g. "Home purchase"). Uses --emphasis (the app's gold "special
   annotation" color, already used for the equity line) rather than
   --accent, since --accent reads as "negative/loss" elsewhere in this
   chart. Lives inside .money-bars-wrap so it shares the exact same left:%
   coordinate space as the bars/lines/labels below it. */
.money-landmark-line { position:absolute; left:0; bottom:0; top:auto; height:24px; width:1.5px; background:linear-gradient(to top, var(--emphasis), transparent); opacity:.65; pointer-events:none; }
.money-landmark-dot { position:absolute; bottom:-3px; width:8px; height:8px; margin-left:-4px; border-radius:50%; background:var(--emphasis); box-shadow:0 0 0 3px var(--bg), 0 0 10px rgba(233,201,124,.55); pointer-events:none; z-index:3; }
.money-landmark-lbl { position:absolute; bottom:28px; transform:translateX(-50%); display:flex; align-items:center; gap:4px; background:var(--surface); border:1px solid var(--emphasis); border-radius:20px; padding:3px 9px 3px 7px; font-family:var(--font-heading); font-size:9px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:var(--emphasis); white-space:nowrap; pointer-events:none; max-width:140px; overflow:hidden; text-overflow:ellipsis; z-index:2; box-shadow:0 4px 14px rgba(0,0,0,.4); }
.money-landmark-icon { width:10px; height:10px; flex-shrink:0; }
.money-landmark-lbl span { overflow:hidden; text-overflow:ellipsis; }
/* ---- §7.2: Category filter — floating popover triggered by icon btn ---- */
/* The chart body is now a plain block; no side panel anymore. */
.money-import-banner-error { border:1px solid var(--accent); background-color:rgba(48,35,42,1); }
.money-import-banner-warn { border:1px solid var(--border); background:var(--surface); }
.money-cat-chip { display:flex; align-items:center; gap:6px; font-family:var(--font-heading); font-size:10.5px; color:var(--text-dim); padding:5px 6px; border-radius:6px; cursor:pointer; user-select:none; transition:background .12s var(--ease), opacity .15s var(--ease); }
.money-cat-chip:hover { background:var(--surface); }
.money-cat-chip .dot { width:7px; height:7px; border-radius:50%; flex-shrink:0; }
.money-cat-chip .mcc-name { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.money-cat-chip .mcc-check { font-size:9px; color:var(--text-muted); flex-shrink:0; }
.money-cat-chip.excluded { opacity:.35; }
.money-cat-chip.excluded .mcc-name { text-decoration:line-through; }
.money-cat-chip.partial { opacity:.8; }
.money-cat-chip.partial .mcc-name { text-decoration:none; }

/* Filter icon trigger button */
.money-filter-trigger { display:inline-flex; align-items:center; gap:5px; font-family:var(--font-heading); font-size:10.5px; color:var(--text-muted); background:var(--surface-2); border:1px solid var(--border); border-radius:18px; padding:4px 10px; cursor:pointer; user-select:none; transition:color var(--fast) var(--ease), border-color var(--fast) var(--ease); position:relative; }
.money-filter-trigger:hover, .money-filter-trigger.active { color:var(--text); border-color:var(--emphasis); }
.money-filter-trigger svg { width:12px; height:12px; flex-shrink:0; }
.money-filter-trigger .mft-badge { position:absolute; top:-4px; right:-4px; min-width:14px; height:14px; background:var(--emphasis); color:#fff; border-radius:7px; font-size:8px; font-weight:700; display:flex; align-items:center; justify-content:center; padding:0 3px; pointer-events:none; }

/* The popover — fixed position, anchored below trigger, full 3-col grid */
.money-filter-popover { background:var(--surface-2); border:1px solid var(--border); border-radius:12px; box-shadow:0 12px 40px rgba(0,0,0,.55); padding:14px; width:min(640px, calc(100vw - 32px)); max-height:80vh; overflow-x:hidden; overflow-y:auto; scrollbar-width:thin; scrollbar-color:rgba(245,236,225,.22) transparent; }
.money-filter-popover::-webkit-scrollbar { width:6px; height:0; }
.money-filter-popover::-webkit-scrollbar-track { background:transparent; }
.money-filter-popover::-webkit-scrollbar-thumb { background:rgba(245,236,225,.2); border-radius:8px; }
.money-filter-popover::-webkit-scrollbar-thumb:hover { background:rgba(233,201,124,.45); }
.money-filter-popover::-webkit-scrollbar-corner { background:transparent; }
.money-filter-popover-hd { display:flex; align-items:center; justify-content:space-between; margin-bottom:10px; }
.money-filter-popover-hd .mfp-title { font-family:var(--font-heading); font-size:11px; font-weight:700; color:var(--text-dim); text-transform:uppercase; letter-spacing:.06em; }
.money-filter-popover-actions { display:flex; gap:6px; }
.money-filter-btn { font-family:var(--font-heading); font-size:10px; color:var(--text-muted); background:var(--surface); border:1px solid var(--border); border-radius:12px; padding:3px 9px; cursor:pointer; user-select:none; transition:color var(--fast) var(--ease), border-color var(--fast) var(--ease); }
.money-filter-btn:hover { color:var(--text); border-color:var(--emphasis); }
.money-filter-cols { display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:10px; }
.money-filter-col-hd { font-family:var(--font-heading); font-size:9.5px; font-weight:700; color:var(--text-muted); text-transform:uppercase; letter-spacing:.06em; padding:0 6px 5px; border-bottom:1px solid var(--border); margin-bottom:3px; display:flex; justify-content:space-between; }
.money-filter-col-hd .mfc-count { font-weight:400; }
.money-filter-divider { height:1px; background:var(--border); opacity:.6; margin:8px 4px 2px; }
.money-filter-section { font-family:var(--font-heading); font-size:9px; font-weight:700; color:var(--text-muted); text-transform:uppercase; letter-spacing:.07em; padding:8px 6px 3px; }
.money-filter-section:first-child { padding-top:4px; }
.money-filter-cat { display:block; }
.money-cat-caret { flex-shrink:0; width:16px; height:16px; display:inline-flex; align-items:center; justify-content:center; color:var(--text-muted); font-size:9px; line-height:1; border-radius:4px; transform:rotate(-90deg); transition:transform .12s ease; }
.money-cat-caret:hover { color:var(--text); background:var(--surface); }
.money-filter-cat.open .money-cat-caret { transform:rotate(0deg); }
.money-filter-subs { display:none; padding:0 2px 4px 14px; }
.money-filter-cat.open .money-filter-subs { display:block; }
.money-sub-chip { font-size:10px; padding:3px 6px; }
.money-sub-chip .dot { width:5px; height:5px; opacity:.75; }
.mini-chart-wrap { position:relative;height:80px;margin-bottom:4px; }
.mini-chart { position:absolute;inset:0; }
.mini-chart-svg { width:100%;height:80px; }
.mc-axis-label { position:absolute;font-family:var(--font-heading);font-size:9px;color:var(--text-muted);pointer-events:none;white-space:nowrap; }
.chart-labels { display:flex;justify-content:space-between;font-family:var(--font-heading);font-size:9px;color:var(--text-muted);margin-top:4px; }
.trend-stat-row { display:flex;gap:0;margin-top:10px; }
.trend-stat { flex:1;text-align:center;padding:6px 0; }
.trend-stat-val { font-family:var(--font-heading);font-size:15px;font-weight:600;color:var(--text); }
.trend-stat-lbl { font-size:10px;color:var(--text-muted);margin-top:2px; }
/* ---- Almas/Progreso area picker: permanent collapsible side panel ------
   Same pattern as this chat interface's own left sidebar: a persistent
   rail fixed to the screen edge. Expanded = icon-only rail (grey, current
   area picked out in the app's pink --accent) — this is the default state.
   Collapsed = fully hidden, just the toggle button remains visible on the
   edge, and the content column reserves matching right-hand space so it
   visibly narrows/"shrinks" (expanded) or nearly fills the screen
   (collapsed). There are no text labels in either state. */
/* The sidebar itself now renders into #area-sidebar-root, a sibling of
   #views placed directly under #app (see body markup) — NOT inside this
   content column. A position:fixed element nested inside #views would
   still get clipped to #views' box because it has overflow-y:auto (a
   scrolling ancestor clips fixed descendants for painting purposes even
   though they're positioned relative to the viewport), which is why the
   panel previously looked squashed/wasn't reaching the real bottom of the
   screen. Keeping it in its own root outside that scroller is what lets it
   truly span the full viewport height. This column just reserves matching
   right-hand space via a plain state class instead of a sibling selector,
   since the two are no longer DOM siblings. */
.area-sidebar-content{min-width:0;transition:margin-right .22s var(--ease);}
.area-sidebar-content.sb-collapsed{margin-right:0;}
.area-sidebar-content.sb-expanded{margin-right:48px;}
/* Full-bleed heroes (progress-hero/almas-hero) assume their
   direct parent is #views (16px padding both sides) so they can bleed
   edge-to-edge with a negative margin. Nested one level deeper here, next
   to the sidebar, that bleed would run under/behind the rail instead — so
   neutralize it and let them just fill the (now narrower) content column. */
.area-sidebar-content .almas-hero{
  margin:0 !important;width:100% !important;border-radius:var(--r) !important;overflow:hidden;
}
/* True side panel: fixed to the right edge of the screen, flush (no gap,
   no radius on the outer edge), spanning the full height between the
   header and the bottom-nav footer (stops there, doesn't run under it).
   Mount/unmount slide-and-feather is driven from JS via the Web Animations
   API (see renderAreaSidebarRoot) rather than a CSS class — both a plain
   transition and a @keyframes class still ended up snapping on exit here,
   because the same tick that unmounts this panel is also doing a bunch of
   other DOM work (view swap, re-render) and the class-based approaches
   were losing the race against that. element.animate() starts as its own
   independent, already-running animation the instant it's called, so nothing
   else on the page can preempt it. Collapsing/expanding uses plain width +
   background/border-color transitions (see toggleAreaSidebarCollapsed,
   which mutates this same persisting node rather than recreating it) —
   collapsed fades the bar's own background/border out to transparent, so
   nothing is painted there but the toggle button itself. */
.area-sidebar{position:fixed;top:calc(var(--top-h) + env(safe-area-inset-top));right:0;
  bottom:calc(var(--nav-h) + var(--safe-bottom));z-index:45;flex-shrink:0;display:flex;flex-direction:column;gap:2px;
  border:none;border-left:1px solid transparent;border-radius:0;background:transparent;
  overflow:hidden;transition:width .25s var(--ease), background-color .2s var(--ease), border-color .2s var(--ease);}
.area-sidebar.collapsed{width:34px;background:transparent;border-left-color:transparent;}
/* Matches #bottom-nav's own black translucent + blur treatment so the two
   permanent chrome bars (bottom nav, this rail) read as one family. */
.area-sidebar.expanded{width:48px;background:rgba(11,12,24,.92);backdrop-filter:blur(10px);border-left-color:var(--border);}
/* The toggle button carries its own background/border rather than
   inheriting the nav's, so it stays visible as a small tab even when the
   nav itself has gone fully transparent (collapsed) — that's the only
   thing painted on screen in that state, no bar/strip behind it. */
.area-sidebar-toggle{display:flex;align-items:center;justify-content:center;
  width:100%;padding:11px 0;background:rgba(11,12,24,.92);backdrop-filter:blur(10px);border:none;border-bottom:1px solid var(--border);
  color:var(--text-muted);cursor:pointer;flex-shrink:0;
  transition:border-radius .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);}
.area-sidebar.collapsed .area-sidebar-toggle{
  border-bottom-color:transparent;border-left:1px solid var(--border);
  border-radius:var(--r-sm) 0 0 var(--r-sm);box-shadow:-2px 0 8px rgba(0,0,0,.12);}
.area-sidebar-toggle-icon{width:14px;height:14px;transition:transform .22s var(--ease);}
.area-sidebar-toggle-icon.open{transform:rotate(180deg);}
/* Screen-size aware: the items list fills whatever vertical space remains
   below the toggle (flex:1) and each row shares that space equally
   (flex:1 too), with a comfortable min so rows never get so thin they're
   unusable on very short screens. Rows always fit the screen exactly —
   no scroll, no fixed per-row height that could run short or leave a big
   gap depending on the device. Bottom padding is a bit heavier than the
   sides so the last row doesn't crowd the panel's own bottom edge. */
.area-sidebar-items{display:flex;flex-direction:column;padding:4px 3px 14px;gap:2px;overflow:hidden;flex:1;
  transition:opacity .16s var(--ease);}
.area-sidebar-item{display:flex;align-items:center;justify-content:center;gap:8px;padding:0;border:none;border-radius:var(--r-sm);
  background:transparent;color:var(--text-muted);font-family:var(--font-heading);font-size:11.5px;
  letter-spacing:.02em;text-align:left;cursor:pointer;white-space:nowrap;flex:1;min-height:28px;}
.area-sidebar-icon{width:17px;height:17px;flex-shrink:0;display:flex;color:inherit;}
.area-sidebar-icon svg{width:100%;height:100%;}
/* Collapsed = fully hidden (just the toggle button remains): the icons
   fade out with the panel's own width shrink instead of snapping via
   display:none, so collapsing/expanding reads as one smooth motion. */
.area-sidebar.collapsed .area-sidebar-items{opacity:0;pointer-events:none;}
/* Selected area: grey rail lights up in the app's pink accent — the rest
   stay grey, per "collapsed state is just the icons in grey and the
   selected one in the nice pink style of the app". */
.area-sidebar-item.active{color:var(--accent-tab,var(--accent));background:var(--accent-soft);}
.area-sidebar-item:active{background:var(--surface-2);}
/* ---- Board filters popover: almas list, styled like the money chart's
   .money-cat-chip (slim, low-padding, no divider lines, dot + CAPS name +
   tiny check) instead of the old big circular .tick-btn rows. Checked
   state borrows the area's own accent color for the dot; "off" areas dim
   and strike through, mirroring .money-cat-chip.excluded. ---- */
.board-area-chip{display:flex;align-items:center;gap:6px;font-family:var(--font-heading);font-size:10.5px;letter-spacing:.03em;text-transform:uppercase;color:var(--text-dim);padding:5px 6px;border-radius:6px;cursor:pointer;user-select:none;transition:background .12s var(--ease),opacity .15s var(--ease);}
.board-area-chip:hover{background:var(--surface);}
.board-area-chip .dot{width:7px;height:7px;border-radius:50%;flex-shrink:0;}
.board-area-chip .bac-name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.board-area-chip .bac-check{font-size:9px;color:var(--text-muted);flex-shrink:0;}
.board-area-chip.excluded{opacity:.35;}
.board-area-chip.excluded .bac-name{text-decoration:line-through;}
/* The popover itself — fixed-position pop-up like .money-filter-popover,
   just narrower since it's a single column instead of a 3-col grid.
   (The radial map's own Filtros button uses the lighter, non-masking
   .tv-dropdown-menu instead — see openRadialFiltersPopover — since it
   needs to stay open while the chart underneath keeps responding live.) */
.board-filter-popover{background:var(--surface-2);border:1px solid var(--border);border-radius:12px;box-shadow:0 12px 40px rgba(0,0,0,.55);padding:14px;width:min(300px, calc(100vw - 32px));max-height:80vh;overflow-x:hidden;overflow-y:auto;scrollbar-width:thin;scrollbar-color:rgba(245,236,225,.22) transparent;}
.board-filter-popover::-webkit-scrollbar{width:6px;height:0;}
.board-filter-popover::-webkit-scrollbar-track{background:transparent;}
.board-filter-popover::-webkit-scrollbar-thumb{background:rgba(245,236,225,.2);border-radius:8px;}
.board-filter-popover::-webkit-scrollbar-thumb:hover{background:rgba(233,201,124,.45);}
.board-filter-popover::-webkit-scrollbar-corner{background:transparent;}
/* Vista block now leads the popover (above Filtros/areas) — label on its
   own line, the four column-toggle checkboxes in a uniform 2-col grid
   instead of a wrapping flex row, so they line up cleanly regardless of
   label length. */
.board-filter-vista-block{padding-bottom:8px;}
.board-filter-vista-label{display:block;font-family:var(--font-heading);font-size:9.5px;font-weight:700;color:var(--text-muted);text-transform:uppercase;letter-spacing:.06em;margin-bottom:6px;}
.board-filter-vista-grid{display:grid;grid-template-columns:1fr 1fr;gap:2px 4px;}
.board-filter-vista-grid .tv-dropdown-check{padding:6px 6px;white-space:normal;}
/* ---- Progreso "Esta semana" (v2): the old 2x2 grid of square icon-over-
   text tiles ate almost a full screen before showing anything else. This
   collapses it into a compact header strip of slim icon-beside-text rows
   — same footprint whether the badge/label is present or not — and wraps
   the whole thing in .progress-hero, a full-bleed banner using the exact
   same convention as .today-hero (negative-margin bleed, background-image
   placeholder, top/bottom vignette). The rows sit at the top of the hero;
   the reserved min-height below them is deliberately left as open page
   background for now, ready to show a photo the moment one is dropped
   into ASSETS/ and referenced below — no layout changes needed then. ---- */
.progress-hero{position:relative;min-height:60vh;padding:20px 16px 0;
  border:none !important;box-shadow:none !important;border-radius:0 !important;
  margin:-16px -16px 4px !important;width:calc(100% + 32px);
  /* STUDIO2.png, same wiring convention as .today-hero's background-image
     above — cover + centered so top/bottom get cropped by the layout
     rather than the source file (nudge background-position if the crop
     needs to favor top or bottom once the real photo is in). */
  background-image:url('../../ASSETS/photos/STUDIO2.webp');
  background-size:cover;background-position:center center;background-repeat:no-repeat;}
/* Feather-to-black blend copied 1:1 from .today-hero::before so this hero
   "blends into the next section" the same way the Today hero does — same
   gradient stops, same var(--bg) match at both ends. */
.progress-hero::before{content:'';position:absolute;inset:0;pointer-events:none;
  /* Was only 4 stops, jumping 0%->75% opacity across a single 24-point
     span right before the edge — same "looks fine, then a wall" problem
     as .today-hero::before had (see its comment). Same fix: many more
     stops so the climb to var(--bg) is spread across the whole bottom
     half instead of arriving all at once near the end. */
  background:linear-gradient(180deg, var(--bg) 0%, rgba(11,12,24,0) 20%, rgba(11,12,24,0) 30%, rgba(11,12,24,.04) 40%, rgba(11,12,24,.1) 50%, rgba(11,12,24,.18) 58%, rgba(11,12,24,.27) 65%, rgba(11,12,24,.38) 72%, rgba(11,12,24,.5) 78%, rgba(11,12,24,.63) 84%, rgba(11,12,24,.75) 89%, rgba(11,12,24,.85) 93%, rgba(11,12,24,.92) 96%, rgba(11,12,24,.97) 98%, var(--bg) 100%);}
.progress-hero .section-title{position:relative;margin:0 0 10px;}
.progress-hero .audit-cta-scroll{position:relative;}

/* Was a 2x2 grid — now a horizontally-scrolling row (same scroll pattern as
   .ai-assist-scroll below) so all four cards sit side by side and the panel
   scrolls instead of wrapping to a second row. */
/* Full-bleed on both edges, ignoring #views' own 22px side padding (and
   .progress-hero's own 16px inner padding on top of that — 16+6px of
   residual, unbled hero padding = 22px total to cancel) so the crawl
   reaches the true screen edges left and right, same as a native ticker.
   On the right this runs straight under .area-sidebar (fixed, z-index 45,
   painted after this in the stacking order) — cards keep crawling behind
   it rather than stopping short of it, in either sidebar state. */
.audit-cta-scroll{display:flex;overflow-x:hidden;overflow-y:hidden;padding:2px 2px 6px;margin:0 -22px 0;width:calc(100% + 44px);
  -webkit-overflow-scrolling:touch;scrollbar-width:none;-ms-overflow-style:none;
  cursor:grab;touch-action:pan-y;user-select:none;-webkit-user-select:none;}
.audit-cta-scroll.ticker-grabbing{cursor:grabbing;}
.audit-cta-scroll::-webkit-scrollbar{display:none;}
/* ---- Ticker track: renderProgress() prints the card set TWICE back to
   back inside this track (see .audit-cta-track children in JS). Position
   is now driven entirely from JS (see the renderProgress() wiring block —
   "ambient crawl + grab/throw") via transform:translateX, not a CSS
   @keyframes animation — that's what lets a manual drag and momentum
   coast interrupt/resume the same motion instead of fighting a
   declarative loop. width:max-content so the track can grow past the
   viewport instead of the flex row shrinking the cards. ---- */
.audit-cta-track{display:flex;gap:8px;width:max-content;}
.audit-cta-scroll .audit-cta{flex:0 0 171px;flex-direction:row;align-items:center;justify-content:flex-start;gap:9px;aspect-ratio:auto;margin-bottom:0;padding:10px 10px;background:var(--surface);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);}
.audit-cta-scroll .audit-cta-icon{width:38px;height:38px;border-radius:11px;flex-shrink:0;}
.audit-cta-scroll .audit-cta-icon svg{width:19px;height:19px;}
.audit-cta-scroll .audit-cta-body{width:auto;min-width:0;flex:1;}
.audit-cta-scroll .audit-cta-title-row{flex-wrap:nowrap;gap:5px;}
.audit-cta-scroll .audit-cta-title{font-size:12.5px;line-height:1.2;font-weight:700;letter-spacing:.01em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.ai-export-wrap{position:absolute;left:0;right:0;top:50%;transform:translateY(-50%);display:flex;justify-content:center;z-index:2;pointer-events:none;}
.ai-export-btn{position:relative;isolation:isolate;pointer-events:auto;display:inline-flex;align-items:center;gap:12px;padding:9px 26px 9px 13px;border:0;border-radius:999px;background:var(--surface);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);color:var(--text);font-family:var(--font-heading);font-size:12.5px;font-weight:700;letter-spacing:.14em;cursor:pointer;box-shadow:0 0 28px rgba(233,201,124,.24),0 6px 18px rgba(0,0,0,.28);}
/* thin coral-to-ember gradient rim (masked ring, so a translucent --surface never tints it) */
.ai-export-btn::before{content:'';position:absolute;inset:0;border-radius:inherit;padding:1.5px;background:linear-gradient(135deg,#ff6f91 0%,#f7704f 55%,#b5301a 100%);-webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor;mask:linear-gradient(#000 0 0) content-box exclude,linear-gradient(#000 0 0);pointer-events:none;z-index:-1;}
.ai-export-brain{position:relative;flex-shrink:0;width:46px;aspect-ratio:240/232;filter:drop-shadow(0 0 7px rgba(233,201,124,.5));}
.ai-export-brain img{position:absolute;inset:0;width:100%;height:100%;display:block;pointer-events:none;-webkit-user-drag:none;}
.ai-export-label{background:linear-gradient(90deg,#f9e9bb,#e6c372);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;color:transparent;}
/* Every 10s: the still brain crossfades to its glare-frame twin in 0.4s, holds ~1.2s, fades back.
   Ambient loop, so it IS gated behind prefers-reduced-motion (see motion policy above). */
@keyframes aiBrainA{0%,80%{opacity:1}84%,96%{opacity:0}100%{opacity:1}}
@keyframes aiBrainB{0%,80%{opacity:0}84%,96%{opacity:1}100%{opacity:0}}
.ai-export-brain .b{opacity:0;animation:aiBrainB 10s ease-in-out infinite;}
.ai-export-brain .a{animation:aiBrainA 10s ease-in-out infinite;}
@media (prefers-reduced-motion:reduce){.ai-export-brain .a,.ai-export-brain .b{animation:none;}.ai-export-brain .b{opacity:0;}}
.ai-export-btn:active{transform:scale(.97);}
/* In the Today hero the brain sits near the bottom edge, clear of the date at the top. */
/* Today hero: just the brain, centred, no box and no label. */
.today-hero .ai-export-wrap{top:50%;bottom:auto;transform:translateY(-50%);}
.today-hero .ai-export-btn{padding:0;background:none;backdrop-filter:none;-webkit-backdrop-filter:none;box-shadow:none;gap:0;border-radius:50%;-webkit-tap-highlight-color:transparent;}
.today-hero .ai-export-btn::before{display:none;}
.today-hero .ai-export-brain{width:96px;filter:drop-shadow(0 0 14px rgba(233,201,124,.65)) drop-shadow(0 4px 10px rgba(0,0,0,.4));}
/* AI agent screen: a conversation. Brain avatar + feed + one approve/discard card per real action. */
.agent-screen{position:fixed;inset:0;z-index:3500;display:flex;flex-direction:column;background:radial-gradient(110% 60% at 50% 0%,#26112e 0%,#130a1a 50%,#07050a 100%);color:#f6ece6;font-family:var(--font-heading);opacity:0;visibility:hidden;transform:translateY(24px) scale(.985);transition:opacity .28s ease,transform .32s cubic-bezier(.2,.8,.2,1),visibility 0s .32s;padding-top:env(safe-area-inset-top,0px);padding-bottom:env(safe-area-inset-bottom,0px);}
.agent-screen.open{opacity:1;visibility:visible;transform:none;transition:opacity .28s ease,transform .32s cubic-bezier(.2,.8,.2,1),visibility 0s;}
.agent-top{display:flex;align-items:center;gap:10px;padding:10px 12px;border-bottom:1px solid rgba(255,255,255,.07);touch-action:manipulation;}
.agent-back{display:inline-flex;align-items:center;gap:6px;border:1px solid rgba(255,255,255,.14);background:rgba(255,255,255,.05);color:inherit;font:600 13px var(--font-heading);padding:8px 13px 8px 9px;border-radius:999px;cursor:pointer;}
.agent-who{flex:1;display:flex;align-items:center;justify-content:center;gap:8px;min-width:0;}
.agent-face{width:38px;height:38px;border-radius:50%;flex-shrink:0;background:url('../../ASSETS/ui/AGENT.webp') 69% 40%/300% no-repeat,#131313;border:1.5px solid rgba(233,201,124,.65);box-shadow:0 0 12px rgba(233,201,124,.35);}
.agent-hero{flex-shrink:0;align-self:center;width:min(100%,360px);aspect-ratio:1/.7;background:url('../../ASSETS/ui/AGENT.webp') 67% 75%/115% no-repeat;-webkit-mask-image:radial-gradient(ellipse closest-side,#000 62%,transparent 100%);mask-image:radial-gradient(ellipse closest-side,#000 62%,transparent 100%);margin:-4px 0 -6px;transition:filter .4s ease;}
.agent-screen.busy .agent-hero{filter:brightness(1.18) saturate(1.15);}
.agent-state{font-size:12px;color:#d9bfb5;white-space:nowrap;}
.agent-screen.busy .agent-face{animation:agentPulse 1.1s ease-in-out infinite;}
@keyframes agentPulse{50%{transform:scale(1.14);filter:drop-shadow(0 0 12px rgba(233,201,124,.9))}}
.agent-icon{width:38px;height:38px;border-radius:50%;border:1px solid rgba(255,255,255,.14);background:rgba(255,255,255,.05);color:inherit;display:grid;place-items:center;cursor:pointer;flex-shrink:0;}
.agent-feed{flex:1;overflow-y:auto;-webkit-overflow-scrolling:touch;padding:16px 14px 10px;display:flex;flex-direction:column;gap:12px;}
.agent-msg{max-width:86%;padding:11px 14px;border-radius:18px;font-size:14.5px;line-height:1.5;white-space:pre-wrap;}
.agent-msg.ai{align-self:flex-start;background:rgba(255,255,255,.07);border:1px solid rgba(255,255,255,.09);border-top-left-radius:6px;}
.agent-msg.me{align-self:flex-end;background:linear-gradient(135deg,#f9e9bb,#e6c372);color:#1a0b08;font-weight:600;border-bottom-right-radius:6px;}
.agent-msg .via{display:block;font-size:10.5px;font-weight:600;opacity:.6;margin-bottom:3px;}
.agent-think{align-self:flex-start;max-width:90%;font-size:12.5px;color:#cfb4a9;padding:2px 4px;display:flex;flex-direction:column;gap:5px;}
.agent-think div{display:flex;align-items:center;gap:8px;}
.agent-think .dot{width:7px;height:7px;border-radius:50%;background:#e6c372;flex-shrink:0;animation:agentBlink 1s ease-in-out infinite;}
.agent-think .ok .dot{animation:none;background:#6fcf97;}
.agent-think .ok{opacity:.65;}
@keyframes agentBlink{50%{opacity:.25}}
.agent-prop{align-self:stretch;border:1px solid rgba(233,201,124,.45);background:rgba(233,201,124,.07);border-radius:18px;padding:14px;}
.agent-prop-h{font-size:13px;font-weight:700;color:#ffc2b3;margin-bottom:6px;}
.agent-prop-row{display:flex;gap:9px;align-items:baseline;font-size:13.5px;line-height:1.45;padding:7px 0;border-top:1px solid rgba(255,255,255,.08);}
.agent-tag{font-size:10.5px;font-weight:700;color:#f8e6b4;border:1px solid rgba(233,201,124,.4);border-radius:6px;padding:1px 6px;flex-shrink:0;}
.agent-prop-act{display:flex;gap:8px;margin-top:10px;}
.agent-btn{flex:1;border:1px solid rgba(255,255,255,.16);background:rgba(255,255,255,.05);color:inherit;font:700 14px var(--font-heading);padding:12px;border-radius:13px;cursor:pointer;}
.agent-btn.go{background:linear-gradient(135deg,#f9e9bb,#e6c372);color:#1a0b08;border-color:transparent;}
.agent-btn:active,.agent-icon:active,.agent-back:active,.agent-round:active{transform:scale(.96);}
.agent-prop.done{border-color:rgba(111,207,151,.5);background:rgba(111,207,151,.07);}
.agent-prop.done .agent-prop-h{color:#8fe0b0;}
.agent-prop.gone{border-color:rgba(255,255,255,.14);background:none;opacity:.6;}
.agent-compose{display:flex;align-items:center;gap:8px;padding:10px 12px 12px;border-top:1px solid rgba(255,255,255,.08);background:rgba(8,5,4,.6);}
.agent-input{flex:1;min-width:0;border:1px solid rgba(255,255,255,.14);background:rgba(255,255,255,.06);color:inherit;font:16px var(--font-heading);padding:12px 15px;border-radius:999px;outline:none;}
.agent-round{width:44px;height:44px;flex-shrink:0;border-radius:50%;border:1px solid rgba(255,255,255,.16);background:rgba(255,255,255,.06);color:inherit;display:grid;place-items:center;cursor:pointer;}
.agent-round.mic{background:linear-gradient(135deg,#f9e9bb,#e6c372);color:#1a0b08;border-color:transparent;}
.agent-screen.listening .agent-round.mic{animation:agentPulse 1s ease-in-out infinite;}
.agent-input:focus-visible,.agent-back:focus-visible,.agent-btn:focus-visible,.agent-round:focus-visible,.agent-icon:focus-visible{outline:2px solid #e6c372;outline-offset:2px;}

.agent-flow{display:flex;align-items:center;gap:6px;padding:8px 14px;font-size:11px;font-weight:700;color:#8f776d;overflow-x:auto}
.agent-flow i{flex:1;height:1px;min-width:10px;background:rgba(255,255,255,.12)}
.agent-step{padding:4px 10px;border-radius:999px;border:1px solid rgba(255,255,255,.1);white-space:nowrap;transition:.25s}
.agent-step.on{color:#1a0b08;background:linear-gradient(135deg,#f9e9bb,#e6c372);border-color:transparent}
.ag-head{flex:1;display:flex;align-items:center;gap:10px;min-width:0}
.ag-head b{display:block;font-size:14px}.ag-status{display:block;font-size:11.5px;color:#d9bfb5;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ag-orb .ai-export-brain{width:38px}.ag-orb.thinking .ai-export-brain{animation:agentPulse 1.1s ease-in-out infinite}
.ag-mini{width:36px;height:36px}.ag-mini.on{background:linear-gradient(135deg,#f9e9bb,#e6c372);color:#1a0b08}
.ag-thread{min-height:0;flex:1;overflow-y:auto;-webkit-overflow-scrolling:touch;padding:14px;display:flex;flex-direction:column;gap:6px}
.ag-row{display:flex;animation:agIn .25s ease both}.ag-row.me{justify-content:flex-end}
@keyframes agIn{from{opacity:0;transform:translateY(6px)}}
.ag-b,.ag-sys,.ag-sheet-in,.ag-sheet-in *{-webkit-user-select:text;user-select:text;-webkit-touch-callout:default}
.ag-b{max-width:82%;padding:10px 14px;border-radius:18px;font-size:15px;line-height:1.45;white-space:pre-wrap;word-break:break-word}
.ag-row.ai .ag-b{background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.09);border-top-left-radius:6px}
.ag-row.me .ag-b{background:linear-gradient(135deg,#f9e9bb,#e6c372);color:#1a0b08;font-weight:600;border-bottom-right-radius:6px}
.ag-typing .ag-b{display:flex;gap:4px;padding:14px}.ag-typing i{width:7px;height:7px;border-radius:50%;background:#cfb4a9;animation:agentBlink 1s infinite}
.ag-typing i:nth-child(2){animation-delay:.15s}.ag-typing i:nth-child(3){animation-delay:.3s}
.ag-sys{align-self:center;font-size:12px;color:#8fe0b0;padding:4px 10px}
.ag-undo{align-self:center;border:1px solid rgba(255,255,255,.18);background:none;color:#ffc2b3;font:600 12px var(--font-heading);padding:5px 12px;border-radius:999px;cursor:pointer}
.ag-chips{display:flex;gap:8px;overflow-x:auto;padding:4px 14px 8px}.ag-chips:empty{display:none}
.agent-chip{flex-shrink:0;border:1px solid rgba(233,201,124,.45);background:rgba(233,201,124,.08);color:#f8e6b4;font:600 13px var(--font-heading);padding:8px 13px;border-radius:999px;cursor:pointer}
.ag-prop{align-self:stretch;margin:8px 0;border:1px solid rgba(233,201,124,.45);background:rgba(233,201,124,.07);border-radius:18px;padding:14px;animation:agIn .3s ease both}
.ag-prop .agent-prop-h{display:flex;justify-content:space-between;gap:8px}
.ag-pr em{font-style:normal;font-size:10.5px;font-weight:700;color:#f8e6b4;border:1px solid rgba(233,201,124,.4);border-radius:6px;padding:1px 6px;flex-shrink:0}
.ag-warn{font-size:12.5px;color:#ffd08a;margin-top:8px}
.ag-prop .agent-prop-act{flex-wrap:wrap}.ag-prop .agent-btn{padding:10px 8px;font-size:13px}
.ag-input{resize:none;border-radius:20px;max-height:120px;line-height:1.35}
.ag-menu{position:absolute;top:calc(60px + env(safe-area-inset-top,0px));right:10px;z-index:20;background:#241512;border:1px solid rgba(255,255,255,.14);border-radius:14px;padding:6px;display:flex;flex-direction:column;min-width:230px;box-shadow:0 12px 30px rgba(0,0,0,.5)}
.ag-menu[hidden],.ag-sheet[hidden]{display:none}
.ag-menu button{background:none;border:0;color:inherit;text-align:left;font:600 14px var(--font-heading);padding:11px 12px;border-radius:9px;cursor:pointer}
.ag-menu button:active{background:rgba(255,255,255,.08)}
.ag-sheet{position:absolute;inset:0;z-index:6;background:rgba(0,0,0,.6);display:flex;align-items:flex-end}
.ag-sheet-in{width:100%;max-height:80%;overflow:auto;background:#1c0f0c;border-radius:22px 22px 0 0;padding:18px;display:flex;flex-direction:column;gap:8px}
.ag-sec{font:700 11px var(--font-heading);letter-spacing:.08em;text-transform:uppercase;color:#d9bfb5;margin:12px 0 4px}
.ag-sheet-in h3{margin:0}.ag-sheet-in p{font-size:13px;color:#d9bfb5;margin:0}
.ag-ml{display:flex;justify-content:space-between;gap:8px;font-size:13px;padding:6px 0;border-top:1px solid rgba(255,255,255,.08)}
.ag-ml span{color:#8f776d}.ag-ml .lista{color:#8fe0b0}.ag-ml .en-pausa{color:#ffd08a}
.ag-tip{font-size:12px}
.ag-rail{position:absolute;top:calc(62px + env(safe-area-inset-top,0px));right:12px;z-index:8;display:flex;flex-direction:column;gap:10px}
.ag-rail .agent-round{width:40px;height:40px;background:rgba(20,10,12,.55);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}
.ag-rail .ag-claude{color:#d97757;border-color:rgba(217,119,87,.55);box-shadow:0 0 14px rgba(217,119,87,.28)}
.ag-menu button.ag-tgl{display:flex;justify-content:space-between;align-items:center;gap:16px}
.ag-sw{width:38px;height:22px;border-radius:999px;background:rgba(255,255,255,.18);position:relative;flex-shrink:0;transition:background .18s}
.ag-sw::after{content:"";position:absolute;top:3px;left:3px;width:16px;height:16px;border-radius:50%;background:#fff;transition:transform .18s}
.ag-tgl[aria-checked="true"] .ag-sw{background:linear-gradient(135deg,#f9e9bb,#e6c372)}
.ag-tgl[aria-checked="true"] .ag-sw::after{transform:translateX(16px)}

.agent-screen > :not(.ag-menu):not(.ag-sheet):not(.ag-rail){position:relative;z-index:1}
.agent-screen > .agent-top{z-index:10}
/* Agent stage: the muse (ASSETS/AGENT.png, uncropped) idles, talks and listens like a creature you're chatting with. */
.ag-stage{pointer-events:none;position:relative;flex-shrink:0;display:flex;flex-direction:column;align-items:center;padding-top:2px}
.ag-sprite{transform:translateZ(0);--s:min(100vw,56vh,640px);position:relative;width:var(--s);aspect-ratio:1;margin:calc(var(--s) * -.2) 0 calc(var(--s) * -.14);transition:width .3s ease,margin .3s ease}
.ag-sprite::before{content:"";position:absolute;inset:16% 6% 6%;border-radius:50%;background:radial-gradient(closest-side,rgba(233,201,124,.22),transparent 72%);opacity:.55;transition:opacity .4s,transform .4s}
.ag-sprite img{position:relative;width:100%;height:100%;object-fit:contain;display:block;mix-blend-mode:lighten;-webkit-mask-image:radial-gradient(closest-side,#000 74%,transparent 100%);mask-image:radial-gradient(closest-side,#000 74%,transparent 100%);animation:agIdle 4.6s ease-in-out infinite;transform-origin:50% 88%;user-select:none;-webkit-user-drag:none}
@keyframes agIdle{50%{transform:translateY(-1.6%) scale(1.012)}}
@keyframes agGlow{50%{transform:scale(1.15)}}
.ag-wave{position:absolute;left:19%;top:21%;width:62%;height:62%;border-radius:50%;border:1.5px solid rgba(233,201,124,.34);box-shadow:0 0 22px rgba(233,201,124,.14),inset 0 0 22px rgba(233,201,124,.08);opacity:0;pointer-events:none;transform:scale(.7)}
@keyframes agWave{0%{transform:scale(.72);opacity:0}18%{opacity:.5}100%{transform:scale(1.5);opacity:0}}
.agent-screen.talking .ag-wave{animation:agWave 3.2s ease-out infinite}
.agent-screen.talking .ag-wave.w2{animation-delay:1.07s}
.agent-screen.talking .ag-wave.w3{animation-delay:2.13s}
.agent-screen.busy .ag-sprite img{animation:agIdle 1.6s ease-in-out infinite;filter:brightness(1.15) saturate(1.2)}
.agent-screen.busy .ag-sprite::before,.agent-screen.talking .ag-sprite::before{opacity:1;transform:scale(1.08)}
.agent-screen.listening .ag-sprite::before{opacity:1;background:radial-gradient(closest-side,rgba(233,201,124,.4),transparent 72%);animation:agGlow 1.2s ease-in-out infinite}
.ag-plaque{position:relative;z-index:1;max-width:80%;padding:4px 14px;border-radius:999px;border:1px solid rgba(233,201,124,.45);background:rgba(10,6,5,.72)}
@media (pointer:coarse){.agent-screen:has(.ag-input:focus) .ag-sprite{--s:min(46vw,24vh,220px)}}
.agent-round.mic.live{box-shadow:0 0 0 3px rgba(233,201,124,.55),0 0 16px rgba(233,201,124,.5)}
.agent-round.ag-stop{display:none;background:linear-gradient(135deg,#f9e9bb,#e6c372);color:#1a0b08;border-color:transparent}
.agent-screen.talking .agent-round.ag-stop{display:grid}
@media (prefers-reduced-motion:reduce){.ag-sprite img,.ag-sprite::before,.ag-wave{animation:none!important}}
html.ag-open,html.ag-open body{overflow:hidden!important;overscroll-behavior:none}
.agent-screen{overscroll-behavior:contain}
/* FIX (2026-11): this hide-on-focus exists to make room for the on-screen keyboard, so it is touch-only. On desktop the input is auto-focused on open (agFocusSpeak), which hid the muse until focus was lost (click / switching tab). */
@media (pointer:coarse){.agent-screen:has(.ag-input:focus) .ag-stage{display:none}}
@media (prefers-reduced-motion:reduce){.agent-screen.busy .agent-face,.agent-screen.listening .agent-round.mic,.agent-think .dot{animation:none;}}
.audit-cta-scroll .audit-cta-sub{font-size:10px;line-height:1.3;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--text-dim);}
.audit-cta-scroll .badge{font-size:8.5px;padding:2px 6px;flex-shrink:0;}

/* ---- Tiempo invertido card header: houses the moved Historial button,
   filtered to the area whose chart is showing (with an "all" toggle
   inside the modal itself, see openHistoryLogModal(areaId)). ---- */
.tinv-head-row{display:flex;align-items:center;justify-content:space-between;margin-bottom:0;}
.tinv-head-row .section-title{margin:0;}
.tinv-hist-btn{width:28px;height:28px;border-radius:8px;background:var(--surface-2,rgba(255,255,255,.04));border:1px solid var(--border);color:var(--text-dim);display:flex;align-items:center;justify-content:center;flex-shrink:0;cursor:pointer;}
.tinv-hist-btn svg{width:14px;height:14px;}
.almas-page-progress-track{height:4px;background:transparent;border-radius:2px;overflow:hidden;margin:6px 0 8px;}
.almas-page-progress-fill{height:100%;background:var(--accent,var(--text-dim));}

/* ---- ALMAS hero: full-bleed, unboxed, image fades to page bg at the bottom edge ---- */
.almas-hero{border:none !important;box-shadow:none !important;border-radius:0 !important;
  margin:0 -16px 4px !important;width:calc(100% + 32px);min-height:48vh;}

/* ---- Today hero (Phase 5 Part A revamp): the old hero-banner ate ~46vh
   of screen before showing a single task, and the top-three block had no
   heading of its own. This modifier collapses the banner to just enough
   room for the greeting/date + the AI day-heading, and a dedicated
   section-title now introduces the top-three cards below it. ---- */
/* Today hero background image: now set inline per-render by
   todayHeroBackgroundStyle() (rotates through TODAY_HERO_IMAGES every
   TODAY_HERO_DAYS_PER_IMAGE days), which overrides the background-image
   below — CITY.png here is just the static fallback for any markup that
   somehow renders .today-hero without that inline style. The vignette
   (feather to black, BOTTOM ONLY — see mask-image below) lives on ::before
   below, NOT combined into this background-image — see that rule for why. */
/* Unbound / full-bleed, same trick as .almas-hero: no border, no box-shadow,
   square corners, pulled out to the edges of #views (which has 16px padding
   all round) with a negative margin — including the TOP, so the image sits
   flush against the header instead of leaving a 16px gap + visible border
   under it. */
.today-hero{min-height:44vh;padding:56px 20px 20px;display:flex;flex-direction:column;justify-content:flex-start;
  border:none !important;box-shadow:none !important;border-radius:0 !important;
  margin:-16px -16px 4px !important;width:calc(100% + 32px);
  background-image:url('../../ASSETS/photos/CITY.webp');
  background-size:cover;background-position:center;background-repeat:no-repeat;
  /* Bottom feather only, take 3. The old approach painted a translucent
     var(--bg)-colored scrim OVER the photo via ::before — that fights the
     photo's own brightness: a bright highlight (lit glass, sky) still
     shows through paint at 90%+ opacity, then the paint hits 100% and you
     get a hard-edged solid rectangle sitting on the image (exactly the
     "grey box" that was visible) instead of a gradual reveal. A painted
     overlay is also a losing battle against ANY photo, since it has to be
     re-tuned per image's local brightness.
     Fix: mask the element's own alpha instead of painting on top. This
     makes the photo itself progressively transparent at the bottom edge,
     genuinely dissolving into whatever solid color sits behind it (the
     page background, which is var(--bg) — so this only reads as seamless
     because #app/#views behind it is a flat, untextured var(--bg); if
     that ever stops being a flat color this technique needs revisiting).
     Previously this also feathered the TOP edge in from transparent —
     that's removed now: the mask is fully opaque from 0% to 30%, so the
     photo runs edge-to-edge at the top with no fade. */
  -webkit-mask-image:linear-gradient(180deg, black 0%, black 30%, rgba(0,0,0,.96) 40%, rgba(0,0,0,.9) 50%, rgba(0,0,0,.82) 58%, rgba(0,0,0,.73) 65%, rgba(0,0,0,.62) 72%, rgba(0,0,0,.5) 78%, rgba(0,0,0,.37) 84%, rgba(0,0,0,.25) 89%, rgba(0,0,0,.15) 93%, rgba(0,0,0,.08) 96%, rgba(0,0,0,.03) 98%, transparent 100%);
  mask-image:linear-gradient(180deg, black 0%, black 30%, rgba(0,0,0,.96) 40%, rgba(0,0,0,.9) 50%, rgba(0,0,0,.82) 58%, rgba(0,0,0,.73) 65%, rgba(0,0,0,.62) 72%, rgba(0,0,0,.5) 78%, rgba(0,0,0,.37) 84%, rgba(0,0,0,.25) 89%, rgba(0,0,0,.15) 93%, rgba(0,0,0,.08) 96%, rgba(0,0,0,.03) 98%, transparent 100%);
  -webkit-mask-size:100% 100%;mask-size:100% 100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;}
/* The base .hero-banner::before sprinkles decorative gradient "dust" dots —
   made for the old abstract-gradient hero, reads as noise/artifacts on a
   real photo, so it's replaced here (not just switched off) with the actual
   top/bottom feather-to-black vignette.
   This is deliberately its OWN layer — position:absolute + inset:0 — rather
   than a second entry in .today-hero's background-image above. A gradient
   folded into the same background-image list as the photo shares that
   property's background-size (cover, sized off the photo's own aspect
   ratio), so as the card's aspect ratio changes with viewport width, the
   vignette's coverage could shift with it. inset:0 has no such dependency:
   it is always exactly the rendered box's full width/height, at every
   breakpoint, full stop — that's what makes the top/bottom feather reliably
   solid regardless of how wide the window is.
   Colors match var(--bg) (page background) rather than pure black, and the
   0%/100% stops are fully opaque var(--bg) — so the feather's edge is a
   pixel-exact match with the page/header behind it and never reads as a
   seam. Text content below (.today-hero-toprow) is position:relative so it
   stacks above this, same convention as .hero-eyebrow/.hero-title do for
   the base .hero-banner::before. */
.today-hero::before{content:'';position:absolute;inset:0;pointer-events:none;}
.today-hero-toprow{position:relative;display:flex;align-items:flex-start;justify-content:space-between;gap:16px;}
.today-hero-daycol{flex-shrink:0;}
/* Hero social mini-card (top right): birthdays ≤14d + the two recommended contacts with a done circle */
.hs-card{flex:0 1 168px;min-width:120px;margin-top:2px;padding:6px 8px;border-radius:14px;background:rgba(14,10,8,.62);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border:1px solid rgba(255,255,255,.09);display:flex;flex-direction:column;gap:1px;}
.hs-row{display:flex;align-items:center;gap:6px;min-height:22px;font-size:11.5px;line-height:1.2;color:var(--text);}
.hs-row .nm{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:500;cursor:pointer;}
.hs-row svg{width:12px!important;height:12px!important;flex-shrink:0;color:var(--text-dim);}
.hs-row.bd.today svg{color:var(--accent);}
.hs-row.bd.today .nm{font-weight:700;}
.hs-b{flex-shrink:0;font-size:9.5px;font-weight:600;letter-spacing:.04em;color:var(--text-dim);}
.hs-b.today{padding:1px 6px;border-radius:999px;background:var(--accent);color:var(--bg,#0b0c18);letter-spacing:.08em;}
.hs-sep{height:1px;margin:3px 0;background:rgba(255,255,255,.1);}
.hs-more{font-size:9.5px;color:var(--text-muted);padding-left:18px;}
.hs-done{flex-shrink:0;width:26px;height:26px;margin:-2px -4px -2px 0;padding:0;border:0;background:none;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;-webkit-tap-highlight-color:transparent;}
.hs-done i{display:flex;align-items:center;justify-content:center;width:17px;height:17px;border-radius:50%;border:1.6px solid var(--text-dim);box-sizing:border-box;}
.hs-done:active i{transform:scale(.88);}
.hs-done svg{display:none;width:10px!important;height:10px!important;color:var(--bg,#0b0c18);}
.hs-row.done{opacity:.55;}
.hs-row.done .nm{text-decoration:line-through;}
.hs-row.done .hs-done{cursor:default;}
.hs-row.done .hs-done i{background:var(--accent);border-color:var(--accent);}
.hs-row.done .hs-done svg{display:block;}
.today-toprow{position:relative;display:flex;align-items:flex-start;justify-content:space-between;gap:10px;}
.today-hero .hero-title{font-size:32px;margin-top:12px;}
/* ---- Today hero content (streamlined pass): day name big + bold, date
   underneath. Minutes moved out of the hero entirely — now sits next to
   the "Today's Work" heading below, see .today-eyebrow-flex .today-minutes.
   Everything else that used to live in the hero (AI day-title narrative,
   week paragraph, chip copy) got cut — see buildPlannerHTML's heroHTML. ---- */
.today-daylabel{font-family:var(--font-heading);font-weight:700;font-size:29px;line-height:1.05;letter-spacing:.01em;text-transform:uppercase;color:var(--text);}
.today-datesub{font-family:var(--font-heading);font-weight:600;font-size:13.5px;letter-spacing:.1em;text-transform:uppercase;color:var(--text-dim);margin-top:5px;}
/* "Añadir tiempo" glow chip — appears next to the day name when the user
   has skipped (or not yet answered) today's daily-init modal. The pulse
   animates via box-shadow so it doesn't affect layout or trigger repaints
   on transform-locked elements nearby. Category 1 (direct-manipulation
   adjacent) per the animation policy — not gated behind reduced-motion. */
.today-daylabel-row{display:flex;align-items:center;gap:10px;}
.today-add-time-btn{
  display:inline-flex;align-items:center;justify-content:center;
  width:22px;height:22px;padding:0;
  font-family:var(--font-heading);font-size:14px;font-weight:700;letter-spacing:.05em;
  color:var(--bg);background:var(--emphasis);
  border:none;border-radius:999px;cursor:pointer;
  white-space:nowrap;flex-shrink:0;
  animation:addTimePulse 2.2s ease-in-out infinite;
}
.today-add-time-btn:active{opacity:.8;}
@keyframes addTimePulse{
  0%,100%{box-shadow:0 0 0 0 rgba(233,201,124,0);}
  50%{box-shadow:0 0 0 7px rgba(233,201,124,.28);}
}
.today-eyebrow-flex .today-eyebrow-left{display:flex;align-items:center;gap:8px;}
.today-eyebrow-flex .today-minutes{font-family:var(--font-mono);font-size:13px;font-weight:600;letter-spacing:normal;color:var(--text-dim);}
.today-eyebrow-flex .today-eyebrow-right{display:flex;flex-direction:column;align-items:flex-end;gap:2px;text-transform:none;font-weight:400;letter-spacing:normal;}
.today-eyebrow-flex .today-eyebrow-right .today-ai-subtle,
.today-eyebrow-flex .today-eyebrow-right .today-regen-row{margin-top:0;}
/* AI-unavailable notice, turned way down: one muted line instead of a
   bordered/tinted alert box, with the retry action inline as a small link
   rather than a standalone button. */
.today-ai-subtle{display:flex;align-items:center;justify-content:flex-end;gap:4px;font-family:var(--font-heading);font-size:10.5px;color:var(--text-muted);}
.today-ai-subtle button{margin-left:6px;background:none;border:none;padding:0;font-family:inherit;font-size:inherit;color:var(--accent);text-decoration:underline;cursor:pointer;}
.today-ai-subtle .icon-refresh-btn{width:22px;height:22px;margin-left:0;color:var(--text-muted);border-color:rgba(255,255,255,.18);}
.today-ai-subtle .icon-refresh-btn svg{width:11px;height:11px;stroke-width:2.6;}
.today-regen-row{display:flex;align-items:center;justify-content:flex-end;gap:14px;margin-top:4px;}
.today-regen-row button{background:none;border:none;padding:0;font-family:var(--font-heading);font-size:10px;letter-spacing:.04em;color:var(--text-muted);opacity:.65;cursor:pointer;}
.today-regen-row .today-regen-manual-btn{color:var(--accent);opacity:1;border:none;border-radius:0;padding:0;text-transform:none;letter-spacing:normal;font-size:10.5px;text-decoration:underline;}
.today-regen-row .today-regen-manual-btn:active{opacity:.7;background:none;}
/* Circular icon-only refresh/regenerate button — replaces the various
   "↻ Rehacer X"/"Forzar IA ahora" TEXT buttons app-wide. One shared look:
   a plain circular outline with a refresh-arrows glyph, used in the hero,
   next to "Esta semana"/the month title, and for "Rehacer día". */
.icon-refresh-btn{width:30px;height:30px;flex-shrink:0;border-radius:50%;border:1px solid var(--border);display:inline-flex;align-items:center;justify-content:center;color:var(--text-dim);background:transparent;cursor:pointer;}
.icon-refresh-btn svg{width:14px;height:14px;}
.icon-refresh-btn:active{background:var(--surface-2);color:var(--text);}
.icon-refresh-btn-subtle{border-color:transparent;color:var(--text-muted);opacity:.55;}
.icon-refresh-btn-subtle:active{opacity:1;background:var(--surface-2);}
/* ---- Today section blocks (Top Three + Habits + Vida Social, same
   treatment for all three): small red eyebrow OUTSIDE the box (own font —
   see --logo-font sibling styling below), then the actual section title
   ("Your Top Three" etc.) lives INSIDE the box as its heading, followed by
   the box's rows. Keep reusing .today-block-eyebrow/.today-card-heading/
   .today-row for the Week/Month views too when those get the same pass. ---- */
.today-block-eyebrow{font-family:var(--font-heading);font-weight:800;font-size:15px;letter-spacing:.01em;text-transform:uppercase;color:var(--accent);margin:26px 2px 8px;}
.today-work-eyebrow{margin-bottom:16px;}
.today-block-eyebrow:first-child{margin-top:4px;}
.today-eyebrow-flex{display:flex;align-items:center;justify-content:space-between;gap:10px;}
.today-eyebrow-flex .icon-refresh-btn{width:26px;height:26px;}
.today-eyebrow-flex .icon-refresh-btn svg{width:12px;height:12px;}
.today-card-heading{font-family:var(--font-heading);font-size:20px;font-weight:700;color:var(--text);padding:16px 16px 12px;line-height:1.18;}
/* ---- Today calendar ---- */
.cal{position:relative;margin:6px 0 18px;min-height:200px;}
.cal-grid{position:absolute;left:0;right:0;top:0;pointer-events:none;}
.cal-line{position:absolute;left:54px;right:0;border-top:1px solid var(--border);opacity:.45;}
.cal-line.hour{opacity:.9;}
.cal-label{position:absolute;left:0;width:46px;text-align:right;transform:translateY(-50%);font-size:11px;color:var(--text-muted);font-family:var(--font-heading);}
.cal:not(.cal-painted) .cal-event,.cal.cal-measuring .cal-event{visibility:hidden;}
.cal-event{position:absolute;box-sizing:border-box;overflow:hidden;z-index:2;display:flex;align-items:flex-start;gap:10px;padding:9px 12px;border-radius:12px;background:var(--surface);border:1px solid var(--border);cursor:pointer;}
.cal-event .complete-circle{margin-top:1px;}
.cal-ev-body{min-width:0;flex:1;}
.cal-ev-title{font-family:var(--font-heading);font-size:13px;font-weight:600;line-height:1.25;}
.cal-ev-sub,.cal-ev-meta{font-size:11px;color:var(--text-muted);margin-top:2px;}
.cal-ev-side{display:flex;flex-direction:column;align-items:flex-end;gap:4px;flex-shrink:0;}
.cal-event.done .cal-ev-title{text-decoration:line-through;opacity:.6;}
.cal-task{border-left:3px solid var(--emphasis);}
.cal-event{--ac:var(--ev-neutral)}
/* ===== Unified calendar event skin v2 — Hoy / Semana / Mes share this =====
   Colored items: deep, solid jewel-tone fill (area color sunk into the dark
   background), a slightly lighter rim of the same hue, white text.
   Quiet items (office, contacts, anything without an area): outlined ghost,
   so background structure never competes with real tasks. */
:root{--ev-neutral:#8e939c;}
.cal-event.cal-event,.wk .wk-ev.wk-ev,.wk-chip.wk-chip,.mc-cell .mc-chip.mc-chip{
  --evc:var(--ac,var(--ev-neutral));
  background:color-mix(in srgb,var(--evc) 45%,#0f1020)!important;
  border:1px solid color-mix(in srgb,var(--evc) 62%,#0f1020)!important;
  color:#fff;text-shadow:none;}
.cal-event.cal-event .cal-ev-sub,.cal-event.cal-event .cal-ev-meta,
.wk-ev i,.mc-cell .mc-chip.mc-chip b{color:inherit;opacity:.78;}
.cal-event.cal-contact,.wk .wk-ev.k-contact,
.cal-event.cal-task:not(.area-tint),.wk .wk-ev.k-task:not(.area-tint),
.wk-chip.wk-chip:not(.area-tint),.mc-cell .mc-chip.mc-chip:not(.area-tint){
  --evc:var(--ev-neutral);
  background:color-mix(in srgb,var(--ev-neutral) 7%,var(--surface))!important;
  border:1px solid color-mix(in srgb,var(--ev-neutral) 32%,transparent)!important;
  color:var(--text-dim);}
@media (hover:hover){
  .cal-event.cal-event:hover,.wk .wk-ev.wk-ev:hover,.wk-chip.wk-chip:hover,.mc-cell .mc-chip.mc-chip:hover{
    background:color-mix(in srgb,var(--evc) 54%,#0f1020)!important;}
  .cal-event.cal-contact:hover,.wk .wk-ev.k-contact:hover,
  .cal-event.cal-task:not(.area-tint):hover,.wk .wk-ev.k-task:not(.area-tint):hover,
  .wk-chip.wk-chip:not(.area-tint):hover,.mc-cell .mc-chip.mc-chip:not(.area-tint):hover{
    background:color-mix(in srgb,var(--ev-neutral) 14%,var(--surface))!important;}
}
.wk .wk-ev.wk-ev.wk-drag{box-shadow:0 10px 24px rgba(0,0,0,.5);}
/* ---- Fluid calendar type: text shrinks with the page ---- */
.p3-cal-weekday{font-size:clamp(8px,2.6vw,10px);letter-spacing:clamp(.01em,.4vw,.06em);}
.p3-cal-daynum{font-size:clamp(9px,3.2vw,12px);}
.wk .wk-ev.wk-ev{font-size:clamp(8.5px,2.7vw,10.5px);}
.wk .wk-ev i{font-size:clamp(7.5px,2.3vw,9px);}
.wk-h{font-size:clamp(8px,2.4vw,10px);}
.wk-h b{font-size:clamp(11px,3.4vw,14px);width:clamp(20px,6.2vw,26px);height:clamp(20px,6.2vw,26px);}
.cal-event .cal-ev-title{font-size:clamp(11px,3.4vw,13px);}
.cal-event .cal-ev-sub,.cal-event .cal-ev-meta{font-size:clamp(9.5px,2.8vw,11px);}
@media (max-width:420px){
  .mc-cell .mc-add{display:none!important;}      /* tap the cell itself to add */
  .mc-cell .mc-i{width:5px;height:5px;}
  .mc-cell .mc-top{gap:2px;padding:0 1px;}
  .p3-cal-legend{gap:10px;font-size:9px;}
}
/* ---- Week toolbar icon buttons ---- */
.wk-actions .wk-plan.wk-ic{width:34px;height:32px;padding:0;display:inline-flex;align-items:center;justify-content:center;border-radius:999px;}
.wk-actions .wk-plan.wk-ic svg{width:18px;height:18px;}
.wk-actions .wk-plan.wk-ic.plan{color:var(--accent);}

.cal-event.cal-event .today-row-tag{display:none}
.cal-event.cal-event.done{filter:saturate(.5);opacity:.6}
.cal-event.cal-event.cal-dragging{opacity:1}
.wk-principle b{display:block;font-size:10px;letter-spacing:.08em;text-transform:uppercase;color:var(--accent);margin-bottom:2px}.wkc{padding:16px 18px;font-size:13px;line-height:1.55;color:var(--text-muted)}.wkc p{margin:0 0 10px}.wkc ol{margin:0 0 12px;padding-left:18px}.wkc-row{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:8px 0}.wkc textarea{width:100%;box-sizing:border-box}.wkc-card{border:1px solid var(--border);border-radius:10px;padding:10px 12px;margin:0 0 10px;color:var(--text)}.wkc-card b{display:block;font-size:10px;letter-spacing:.08em;text-transform:uppercase;color:var(--text-muted);margin:8px 0 2px}.wkc-card b:first-child{margin-top:0}.wkc-day{font-size:12px;margin:3px 0}.wkl{border:1px solid var(--border);border-radius:10px;margin:0 0 8px;padding:8px 12px}.wkl summary{cursor:pointer;color:var(--text)}.wkl-b{padding-top:8px}
.cal-new{position:absolute;box-sizing:border-box;left:54px;right:2px;z-index:15;border-radius:12px;background:var(--accent-soft,rgba(217,163,90,.25));border:1px dashed var(--accent);padding:8px 12px;color:var(--text);overflow:hidden}.cal-new input{width:100%;box-sizing:border-box;background:transparent;border:0;outline:0;color:var(--text);font-family:var(--font-heading);font-size:13px;font-weight:600;padding:0}
.area-tint{background:color-mix(in srgb,var(--ac) 20%,var(--surface))!important;border-color:color-mix(in srgb,var(--ac) 35%,var(--border))!important;border-left-color:var(--ac)!important}.p3-cal-task-row.area-tint{border-left:3px solid var(--ac)!important}
.cal-task.timed{border-left-color:var(--accent);}
.cal-habit{border-left:3px solid var(--text-dim);}
.cal-office{cursor:grab;border-left:3px solid var(--text-dim);}
.cal-contact{cursor:grab;}
.cal-contact-body{margin-top:6px;display:flex;flex-direction:column;gap:0;}
.cal-contact-body .card{background:none!important;box-shadow:none!important;border:0!important;border-top:1px solid var(--border)!important;border-radius:0!important;padding:12px 0!important;margin:0!important;}
.cal-contact-body .card:first-child{border-top:0!important;padding-top:6px!important;}
.cal-event{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;}
.cal-event[data-drag]{cursor:grab;}
.cal-event[data-edge=top],.cal-event[data-edge=bottom]{cursor:ns-resize;}
body.cal-resize-active,body.cal-resize-active *{cursor:ns-resize!important;}
.cal-event.cal-dragging{z-index:20;cursor:grabbing;box-shadow:0 10px 28px rgba(0,0,0,.45);transform:scale(1.015);opacity:.96;transition:none;}
body.cal-drag-active{cursor:grabbing;}
.cal-drag-time{position:absolute;left:0;width:50px;text-align:right;z-index:21;font-size:11px;font-weight:600;color:var(--accent);pointer-events:none;white-space:nowrap;}
.cal-dayend{position:absolute;left:46px;right:0;height:0;border-top:1.5px dashed var(--text-muted);opacity:.7;z-index:5;pointer-events:none;font-size:10px;color:var(--text-muted);text-align:right;padding-right:4px;line-height:1;}
.cal-now{position:absolute;left:46px;right:0;height:0;border-top:2px solid #e5484d;z-index:6;pointer-events:none;}
.cal-now::before{content:'';position:absolute;left:-5px;top:-6px;width:10px;height:10px;border-radius:50%;background:#e5484d;}
.today-unified-box{background:var(--surface);border:1px solid var(--border);border-radius:var(--r);overflow:hidden;}
/* Loose variant for content that already renders its own cards (Vida
   Social's contact cards) — just groups the heading with what follows,
   no extra hard border/box duplicating the cards' own. */
.today-card-block .today-card-heading{padding:0 2px 12px;}
.today-card-block > .card,.today-card-block > .today-row-empty{margin-top:0;}
.today-card-block > .card + .card{margin-top:10px;}
.today-row{display:flex;align-items:flex-start;gap:12px;padding:16px;border-bottom:1px solid var(--border);cursor:pointer;}
.today-row:last-child{border-bottom:none;}
.today-row .complete-circle{margin-top:2px;}
.today-row-body{flex:1;min-width:0;padding-top:1px;}
.today-row-title{font-family:var(--font-heading);font-size:16px;font-weight:700;color:var(--text);line-height:1.32;}
.today-row-subtitle{font-family:var(--font-heading);font-size:11.5px;color:var(--text-muted);margin-top:3px;line-height:1.3;}
.today-row.done .today-row-title{opacity:.5;text-decoration:line-through;}
.today-row.done .today-row-subtitle{opacity:.5;}
.today-row-side{flex-shrink:0;display:flex;flex-direction:column;align-items:flex-end;gap:9px;}
.today-row-tag{font-size:9.5px;font-weight:600;padding:3px 10px;}
.today-row-skip{font-family:var(--font-heading);font-size:10px;letter-spacing:.06em;text-transform:uppercase;color:var(--text-muted);background:none;border:none;padding:0;cursor:pointer;}
.today-row-empty{padding:16px;font-size:12.5px;color:var(--text-muted);font-family:var(--font-heading);}

.p3-date-title{font-family:var(--font-display);font-size:54px;line-height:1;color:var(--text);margin:0 0 4px;}
/* Mañana/Tarde/Noche — three separate cards again (each its own
   .today-unified-box), items inside each separated by a subtle line
   (mirrors .today-row). Cards lost their individual grip handle — the
   whole row is draggable via long-press now, matching the board's
   card-drag pattern. Item type is now a small Tipo badge instead of a
   colour/size-coded dot, so every row reads at the same visual weight. */
.p3-block{margin-bottom:14px;}
.p3-block:last-child{margin-bottom:0;}
.p3-block-header{display:flex;align-items:center;gap:10px;padding:16px 16px 10px;}
.p3-block-icon{width:20px;height:20px;flex-shrink:0;display:inline-flex;color:var(--accent);}
.p3-block-icon svg{width:100%;height:100%;}
.p3-block-header-text{display:flex;flex-direction:column;gap:3px;}
.p3-block-label{font-family:var(--font-heading);font-size:15px;font-weight:700;color:var(--text);}
.p3-block-time{font-family:var(--font-mono);font-size:10.5px;color:var(--text-muted);}
.p3-block-empty{padding:2px 16px 16px;}
.p3-block-item{display:flex;align-items:center;gap:10px;padding:10px 16px;border-top:1px solid var(--border);cursor:pointer;}
.p3-block-header + .p3-block-item{border-top:none;}
.p3-block-item:last-child{padding-bottom:14px;}
.p3-block-item:active{background:var(--surface-2);}
.p3-block-item-dot{width:6px;height:6px;border-radius:50%;background:var(--text-muted);flex-shrink:0;}
.p3-block-item-body{flex:1;min-width:0;}
.p3-block-item-title{font-size:13px;color:var(--text);line-height:1.35;}
.p3-block-item-side{flex-shrink:0;display:flex;flex-direction:column;align-items:flex-end;gap:6px;}
.p3-block-skip{flex-shrink:0;font-size:13px;font-family:var(--font-heading);color:var(--text-muted);background:transparent;border:none;padding:0;cursor:pointer;opacity:.75;}
.p3-block-skip:active{opacity:1;color:var(--text);}
.p3-block-item.grabbing-source{opacity:.35;}
.p3-block-item-ghost{position:fixed;z-index:300;pointer-events:none;margin:0 !important;background:var(--surface) !important;border:1px solid var(--border);box-shadow:0 14px 32px rgba(0,0,0,.5);opacity:.95;transform:scale(1.03) rotate(-1deg);border-radius:var(--r-sm);}
.p3-block.p3-block-drop-target{background:rgba(216,211,199,.06);box-shadow:inset 0 0 0 1.5px var(--emphasis);}
.sistema-priority-star{flex-shrink:0;background:transparent;border:none;font-size:16px;line-height:1;cursor:pointer;color:var(--border);padding:2px;}
.sistema-priority-star.active{color:var(--emphasis, #d8a34a);}
.p3-priority-habits-section{margin-top:20px;}
.p3-priority-habits-toggle{width:100%;display:flex;align-items:center;gap:8px;background:transparent;border:none;color:var(--text);font-family:var(--font-heading);font-size:12px;letter-spacing:.05em;text-transform:uppercase;padding:6px 0;cursor:pointer;}
.p3-priority-habits-chevron{color:var(--text-muted);font-size:11px;width:10px;}
.p3-priority-habits-body.collapsed{display:none;}
.p3-week-section{margin-top:40px;padding-top:24px;border-top:2px solid var(--border);}
.p3-week-header{font-family:var(--font-display);font-size:clamp(22px,7.2vw,36px);line-height:1.1;color:var(--text);margin-bottom:4px;padding-left:20px;}
.p3-week-sub{font-family:var(--font-serif);font-style:italic;font-size:13px;color:var(--text-muted);margin-bottom:20px;padding-left:20px;}
/* Weekly board-style day cards — horizontal scroll like .board-scroll/.board-col */
.p3-week-scroll{display:flex;gap:8px;overflow-x:auto;scroll-snap-type:x mandatory;margin:0 -16px;padding:0 16px 10px;-webkit-overflow-scrolling:touch;-webkit-touch-callout:none;}
@media (min-width:880px){
  .p3-week-scroll{scroll-snap-type:none;}
  .p3-week-day-col{flex-basis:calc((100vw - 56px) / 4) !important;}
}
.p3-week-day-col{flex:0 0 calc(100vw - 32px);scroll-snap-align:center;border-radius:var(--r);background:var(--surface-2);border:1px solid var(--border);overflow:hidden;box-shadow:0 4px 14px rgba(0,0,0,.22);}
.p3-week-day-box{display:flex;flex-direction:column;}
.p3-week-day-header{padding:10px 14px 8px;display:flex;align-items:center;gap:8px;}
.p3-week-day-name{font-family:var(--font-heading);font-size:12px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--emphasis);}
.p3-week-day-count{font-family:var(--font-heading);font-size:10px;color:var(--text-muted);margin-left:auto;}
.p3-week-task-row{display:flex;align-items:flex-start;gap:12px;padding:14px 14px 13px;border-top:1px solid var(--border);cursor:pointer;transition:background var(--fast) var(--ease);min-height:62px;box-sizing:border-box;}
.p3-week-task-row:active{background:rgba(255,214,170,.06);}
.p3-week-task-circle{width:20px;height:20px;border-radius:50%;border:1.5px solid var(--border);flex-shrink:0;display:flex;align-items:center;justify-content:center;margin-top:1px;transition:background var(--fast) var(--ease),border-color var(--fast) var(--ease);}
.p3-week-task-circle.done{background:var(--success);border-color:var(--success);}
.p3-week-task-circle svg{width:10px;height:10px;stroke:var(--bg);opacity:0;}
.p3-week-task-circle.done svg{opacity:1;}
.p3-week-task-done{text-decoration:line-through;color:var(--text-muted);}
.p3-week-task-body{flex:1;min-width:0;display:flex;flex-direction:column;gap:7px;}
.p3-week-task-meta{display:flex;align-items:center;gap:6px;flex-wrap:wrap;}
.p3-paragraph-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--r);padding:28px 32px;margin-bottom:14px;}
.p3-paragraph-label{font-family:var(--font-heading);font-size:9.5px;letter-spacing:.1em;text-transform:uppercase;color:var(--emphasis);margin-bottom:10px;font-weight:600;}
.p3-paragraph-text{font-family:var(--font-serif);font-size:14px;line-height:1.75;color:var(--text-dim);}
.p3-month-section{margin-top:40px;padding-top:24px;border-top:2px solid var(--border);padding-left:clamp(10px,3.4vw,20px);padding-right:clamp(10px,3.4vw,20px);}
.p3-month-header{font-family:var(--font-display);font-size:clamp(22px,7.2vw,36px);line-height:1.1;color:var(--text);margin-bottom:4px;}
.p3-month-sub{font-family:var(--font-serif);font-style:italic;font-size:clamp(11px,3.2vw,13px);color:var(--text-muted);margin-bottom:20px;}

/* ---- Mes calendar grid ---- */
.p3-cal{margin-bottom:18px;}
.p3-cal-header-row{display:grid;grid-template-columns:repeat(7,1fr);margin-bottom:4px;}
.p3-cal-weekday{text-align:center;font-family:var(--font-heading);font-size:10px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--text-muted);padding:4px 0;}
.p3-cal-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:4px;}
.p3-cal-cell{aspect-ratio:1;border-radius:var(--r-sm);background:var(--surface-2);border:1px solid var(--border);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;padding:2px;}
.p3-cal-cell-empty{background:transparent;border-color:transparent;}
.p3-cal-daynum{font-family:var(--font-heading);font-size:12px;color:var(--text-dim);}
.p3-cal-cell.today{background:var(--accent-soft);border-color:var(--accent);}
.p3-cal-cell.today .p3-cal-daynum{color:var(--accent);font-weight:700;}
.p3-cal-dots{display:flex;gap:3px;}
.p3-cal-dot{width:5px;height:5px;border-radius:50%;flex-shrink:0;}
.p3-cal-dot-due{background:var(--accent);}
.p3-cal-dot-sched{background:var(--emphasis);}
.p3-cal-legend{display:flex;gap:16px;margin-top:10px;font-family:var(--font-heading);font-size:10px;color:var(--text-muted);}
.p3-cal-legend span{display:inline-flex;align-items:center;gap:5px;}
.p3-cal-legend .p3-cal-dot{width:6px;height:6px;}

/* ---- Minimal "vencen este mes" list — complete circle + title only ---- */
.p3-cal-tasklist{margin-top:6px;}
.p3-cal-task-row{display:flex;align-items:center;gap:12px;padding:12px 14px;border-top:1px solid var(--border);cursor:pointer;}
.p3-cal-tasklist .p3-cal-task-row:first-child{border-top:none;}
.p3-cal-task-row:active{background:rgba(255,214,170,.06);}
.p3-cal-task-date{font-family:var(--font-mono);font-size:10.5px;color:var(--text-muted);flex-shrink:0;width:44px;}
.p3-cal-task-title{font-family:var(--font-heading);font-size:13px;color:var(--text);flex:1;min-width:0;}
.p3-cal-task-row.done .p3-cal-task-title{text-decoration:line-through;color:var(--text-muted);}

.p3-week-block{margin-bottom:16px;}
.p3-week-block-label{font-family:var(--font-heading);font-size:10px;letter-spacing:.1em;text-transform:uppercase;color:var(--tipo-submeta);margin-bottom:6px;font-weight:600;}
.p3-success-bar{display:flex;gap:6px;align-items:center;padding:10px 14px;border:1px solid var(--success);border-radius:var(--r-sm);background:var(--success-soft);margin:14px 0;}
.p3-success-bar-text{font-family:var(--font-heading);font-size:11px;color:var(--success);letter-spacing:.03em;}

/* ---- ALMAS Metas: horizontal scroll strip of prominent cards. Each of the
   4-5 Main goals shares the row, sized device-dependently like the Tablero
   board columns below (.board-scroll/.board-col): 1 full-width card per
   screen on phone, 5 per screen on laptop (min-width:880px), the rest
   reachable by swiping/scrolling (scroll-snap on phone). Cards carry their
   top-5 subgoals inline. ---- */
.metas-scroll{display:flex;gap:10px;overflow-x:auto;-webkit-overflow-scrolling:touch;scroll-snap-type:x proximity;margin:0 -16px 4px;padding:2px 16px 12px;}
/* Device-dependent width, same pattern as .board-scroll/.board-col above:
   1 card fills the screen on phone (edge-to-edge minus the strip's own
   16px+16px padding), 5 fit at once on laptop — same min-width:880px
   breakpoint used everywhere else in the app to distinguish phone/laptop. */
.meta-card{flex:0 0 calc(100vw - 32px);min-width:0;display:flex;flex-direction:column;gap:12px;padding:26px 18px;border:1px solid var(--border);border-radius:var(--r);background:var(--surface-2);text-align:left;scroll-snap-align:start;}
@media (min-width:880px){
  .metas-scroll{scroll-snap-type:none;}
  .meta-card{flex-basis:calc((100vw - 72px) / 5);}
}
.meta-card-head{display:flex;align-items:center;gap:10px;text-align:left;}
.meta-card .meta-card-title{font-size:13.5px;font-family:var(--font-heading);line-height:1.3;font-weight:600;text-align:left;}
.meta-card-subgoals{display:flex;flex-direction:column;margin-top:2px;}
.meta-subgoal-row{display:flex;align-items:center;gap:8px;padding:9px 0;border-top:1px solid var(--border);}
.meta-subgoal-title{font-size:11.5px;line-height:1.28;text-align:left;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;}
.meta-subgoal-check{font-size:10px;color:var(--text-dim);margin-top:3px;display:flex;align-items:center;gap:4px;}
.meta-subgoal-check svg{width:10px;height:10px;flex-shrink:0;}

/* ============================= WEEKLY AUDIT ============================= */
.audit-cta{display:flex;align-items:center;gap:12px;cursor:pointer;}
.audit-cta-icon{width:40px;height:40px;border-radius:50%;background:var(--accent-soft);color:var(--accent);display:flex;align-items:center;justify-content:center;flex-shrink:0;}
.audit-cta-icon svg{width:19px;height:19px;}
.audit-cta-body{flex:1;}
.audit-cta-title-row{display:flex;align-items:center;gap:8px;}
.audit-cta-title{font-family:var(--font-heading);font-size:13.5px;font-weight:600;color:var(--text);}
.audit-cta-sub{font-size:11.5px;color:var(--text-muted);margin-top:2px;}
.proposal-row{margin-bottom:10px;}
.proposal-title{font-family:var(--font-heading);font-size:13.5px;font-weight:600;color:var(--text);}
.proposal-desc{margin-top:4px;}
.proposal-why{margin-top:4px;font-style:italic;}
.proposal-actions{display:flex;gap:8px;margin-top:10px;}
.proposal-status{margin-top:8px;font-weight:600;}
.proposal-row.is-accepted{opacity:0.6;}
.proposal-row.is-rejected{opacity:0.4;text-decoration:line-through;}
.badge.done{color:var(--emphasis);border-color:var(--emphasis);}

.modal-back{width:26px;height:26px;color:var(--text-dim);flex-shrink:0;display:flex;align-items:center;justify-content:center;background:none;border:none;cursor:pointer;}
.modal-back svg{width:16px;height:16px;}

.step-intro{font-family:var(--font-serif);font-style:italic;font-size:13.5px;color:var(--text-muted);margin-bottom:16px;line-height:1.5;}
.step-q{font-family:var(--font-heading);font-size:16px;font-weight:600;color:var(--text);line-height:1.35;margin-bottom:18px;}

.stat-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;}
.stat-box .stat-num{font-family:var(--font-mono);font-size:24px;color:var(--text);}
.stat-box .stat-num small{font-family:var(--font-mono);font-size:13px;color:var(--text-muted);}
.stat-box .stat-label{font-family:var(--font-heading);font-size:9.5px;letter-spacing:.06em;text-transform:uppercase;color:var(--text-muted);margin-top:3px;}
.audit-bars{margin-top:14px;padding-top:12px;border-top:1px solid var(--border);}
.audit-bar-row{display:flex;align-items:center;gap:10px;padding:5px 0;}
.audit-bar-row .name{font-family:var(--font-heading);font-size:11px;color:var(--text-dim);width:104px;flex-shrink:0;}
.audit-bar-track{flex:1;height:4px;border-radius:2px;background:var(--border);overflow:hidden;}
.audit-bar-fill{height:100%;background:linear-gradient(90deg,var(--accent),var(--emphasis));}
.audit-bar-row .pct{width:30px;text-align:right;font-size:10.5px;color:var(--text-muted);flex-shrink:0;}

.rating-row{display:flex;align-items:center;gap:14px;margin-bottom:6px;}
.rating-num{font-family:var(--font-mono);font-size:30px;color:var(--emphasis);width:52px;flex-shrink:0;}
.rating-row input{flex:1;}
.rating-scale-labels{display:flex;justify-content:space-between;font-size:10px;color:var(--text-muted);font-family:var(--font-heading);}

.recall-toggle{display:inline-flex;align-items:center;gap:5px;font-family:var(--font-heading);font-size:11px;color:var(--accent);margin-bottom:12px;background:none;border:none;cursor:pointer;padding:0;}
.recall-toggle svg{width:12px;height:12px;}
.recall-card{border:1px solid var(--border);border-radius:var(--r-sm);padding:14px;margin-bottom:14px;background:var(--surface-2);}
.recall-card .stat-grid{gap:10px;margin-bottom:14px;padding-bottom:14px;border-bottom:1px solid var(--border);}
.recall-card .stat-box .stat-num{font-size:19px;}
.recall-section{margin-bottom:14px;}
.recall-section:last-child{margin-bottom:0;}
.recall-section-label{display:flex;align-items:center;gap:7px;font-family:var(--font-heading);font-size:10px;letter-spacing:.07em;text-transform:uppercase;color:var(--text-muted);margin-bottom:8px;}
.recall-section-label .rc-dot{width:6px;height:6px;border-radius:50%;flex-shrink:0;}
.recall-section-label .rc-count{margin-left:auto;color:var(--text-muted);font-family:var(--font-mono);font-size:10px;}
.rc-dot.done{background:var(--emphasis);}
.rc-dot.started{background:var(--accent);opacity:.7;}
.rc-dot.ignored{background:var(--text-muted);opacity:.5;}
.audit-task-row{display:flex;align-items:center;gap:8px;padding:5px 0;font-size:12px;color:var(--text-dim);}
.audit-task-row .t-title{flex:1;}
.audit-task-row .t-area{font-family:var(--font-heading);font-size:9.5px;letter-spacing:.03em;color:var(--text-muted);flex-shrink:0;}
.audit-task-row.ignored .t-title{color:var(--text-muted);}

.chip .area-tag{color:var(--text-muted);font-size:10px;margin-left:2px;}
.chip.active .area-tag{color:inherit;}
.freeform-divider{display:flex;align-items:center;gap:10px;margin:14px 0 12px;color:var(--text-muted);font-family:var(--font-heading);font-size:10px;letter-spacing:.06em;text-transform:uppercase;}
.freeform-divider::before,.freeform-divider::after{content:'';flex:1;height:1px;background:var(--border);}
.skip-clean{display:block;width:100%;text-align:center;padding:12px;color:var(--text-muted);font-family:var(--font-heading);font-size:11.5px;letter-spacing:.04em;margin-top:14px;background:none;border:none;cursor:pointer;}

.loading-wrap{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 10px 20px;text-align:center;}
.loading-spinner{width:30px;height:30px;border-radius:50%;border:2px solid var(--border);border-top-color:var(--accent);animation:auditspin 900ms linear infinite;margin-bottom:18px;}
@keyframes auditspin{to{transform:rotate(360deg);}}
.loading-line{font-family:var(--font-serif);font-style:italic;font-size:13.5px;color:var(--text-dim);margin-bottom:6px;transition:opacity var(--fast);}

.audit-hero{position:relative;overflow:hidden;border-radius:calc(var(--r) + 4px);padding:26px 20px 22px;margin:10px 0 22px;background:
    radial-gradient(120% 90% at 85% -10%, rgba(233,201,124,.32), transparent 55%),
    radial-gradient(90% 70% at 10% 110%, rgba(233,201,124,.20), transparent 60%),
    linear-gradient(160deg,#1b1d36,#150f0b 70%);
  border:1px solid var(--border);box-shadow:0 10px 30px rgba(0,0,0,.35);}
.audit-hero::before{content:'';position:absolute;inset:0;background-image:
    radial-gradient(2px 2px at 20% 30%, rgba(255,224,170,.5), transparent 60%),
    radial-gradient(2px 2px at 70% 20%, rgba(255,224,170,.35), transparent 60%),
    radial-gradient(3px 3px at 85% 55%, rgba(255,224,170,.3), transparent 60%),
    radial-gradient(2px 2px at 40% 75%, rgba(255,224,170,.25), transparent 60%);
  pointer-events:none;opacity:.8;}
.audit-eyebrow{position:relative;font-family:var(--font-heading);font-size:10px;letter-spacing:.14em;text-transform:uppercase;color:var(--accent);margin-bottom:6px;}
.audit-title{position:relative;font-family:var(--font-display);font-weight:400;font-size:38px;line-height:1;color:var(--text);margin-bottom:8px;}
.audit-tag{position:relative;font-family:var(--font-serif);font-style:italic;font-size:14px;color:var(--text-dim);max-width:90%;}
.rating-wrap{display:flex;align-items:center;gap:18px;}
.rating-arc-num{font-family:var(--font-mono);font-size:13px;fill:var(--text);}
.rating-copy{flex:1;}
.rating-q{font-family:var(--font-serif);font-style:italic;font-size:14px;color:var(--text-dim);line-height:1.5;}

.reflection-card{padding:20px 18px;}
.reflection-head{margin-bottom:18px;padding-bottom:16px;border-bottom:1px solid var(--border);}
.reflection-title{font-family:var(--font-serif);font-weight:600;font-size:21px;color:var(--text);margin-bottom:4px;}
.reflection-subtitle{font-family:var(--font-heading);font-size:10.5px;letter-spacing:.06em;text-transform:uppercase;color:var(--text-muted);}
.reflection-block{margin-bottom:18px;}
.reflection-block:last-of-type{margin-bottom:0;}
.reflection-block-label{font-family:var(--font-heading);font-size:10px;letter-spacing:.08em;text-transform:uppercase;color:var(--emphasis);margin-bottom:7px;font-weight:600;}
.reflection-block-body{font-family:var(--font-serif);font-size:15px;font-weight:500;line-height:1.7;color:var(--text-dim);}
.reflection-pull{margin-top:20px;padding:16px 17px;border-radius:var(--r-sm);background:var(--accent-soft);}
.reflection-pull .pull-label{font-family:var(--font-heading);font-size:9.5px;letter-spacing:.1em;text-transform:uppercase;color:var(--accent);margin-bottom:6px;}
.reflection-pull .pull-text{font-family:var(--font-serif);font-style:italic;font-size:14.5px;color:var(--text);line-height:1.55;}

.ownwords-row{display:flex;gap:10px;margin-bottom:10px;}
.ownwords-row:last-child{margin-bottom:0;}
.ownwords-icon{width:26px;height:26px;border-radius:50%;flex-shrink:0;display:flex;align-items:center;justify-content:center;font-size:12px;margin-top:1px;}
.ownwords-icon.well{background:rgba(233,201,124,.14);color:var(--emphasis);}
.ownwords-icon.rough{background:rgba(230,90,90,.14);color:#e65a5a;}
.ownwords-body .label{font-family:var(--font-heading);font-size:9.5px;letter-spacing:.08em;text-transform:uppercase;color:var(--text-muted);margin-bottom:3px;}
.ownwords-body .txt{font-size:13px;color:var(--text-dim);line-height:1.55;}
.focus-chip{display:inline-flex;align-items:center;gap:6px;padding:8px 13px;border:1px solid var(--accent);border-radius:20px;font-family:var(--font-heading);font-size:12px;color:var(--text);background:var(--accent-soft);margin:0 8px 8px 0;}
.focus-chip .dot{width:5px;height:5px;border-radius:50%;background:var(--accent);flex-shrink:0;}
.focus-note{font-family:var(--font-serif);font-style:italic;font-size:12.5px;color:var(--text-muted);margin-top:10px;line-height:1.5;}
.tree-row{display:flex;gap:12px;padding:13px 2px;border-bottom:1px solid var(--border);}
.tree-row:last-child{border-bottom:none;}
.tree-mark{width:7px;height:7px;border-radius:50%;background:var(--emphasis);flex-shrink:0;margin-top:6px;}
.tree-body{flex:1;min-width:0;}
.tree-node{font-family:var(--font-heading);font-size:13px;font-weight:600;color:var(--text);}
.tree-issue{font-size:12px;color:var(--text-muted);margin-bottom:5px;}
.tree-suggestion{font-size:12.5px;color:var(--text-dim);}
.tree-suggestion b{color:var(--emphasis);font-weight:600;}
.timestamp{text-align:center;font-family:var(--font-heading);font-size:10px;letter-spacing:.06em;color:var(--text-muted);margin-top:14px;text-transform:uppercase;}

/* ==========================================================================
   COMPONENT POLISH PATCH — subtle refinement pass on shared components
   (cards, buttons, chips, modals). Placed last on purpose so it wins the
   cascade over the base rules above without editing them directly — every
   declaration here is additive (shadows, transitions, focus states, hover
   for real-pointer devices) or a small spacing/contrast nudge. No colors,
   fonts, or layout structure were changed; the deliberate palette choices
   documented earlier in this file are untouched.
   ========================================================================== */

/* ---- Cards: layered shadow instead of one flat drop-shadow, so depth
   reads a bit richer without getting heavier. A hairline inner highlight
   along the top edge catches the surface like a subtle bevel. ---- */
.card{
  box-shadow:0 1px 0 rgba(255,255,255,.03) inset,0 1px 2px rgba(0,0,0,.3),0 8px 20px rgba(0,0,0,.24);
}

/* ---- Chips: a touch more breathing room, and the active state gets a
   soft accent-colored glow instead of sitting perfectly flat. ---- */
.chip{
  padding:6px 12px;
  transition:background var(--fast),border-color var(--fast),color var(--fast);
}
.chip.active{
  box-shadow:0 3px 10px rgba(233,201,124,.32);
}

/* ---- Buttons: smoother state transitions; solid buttons get a faint
   lift so they read as the primary action at a glance. ---- */
.btn{transition:transform var(--fast),background var(--fast),border-color var(--fast),filter var(--fast);}
.btn-solid{box-shadow:0 3px 12px rgba(233,201,124,.28);}
.btn-icon{transition:background var(--fast),color var(--fast),border-color var(--fast);}

/* ---- Hover states, gated to devices with a real pointer so touch/phone
   behavior (press-fx above) is unaffected. ---- */
@media (hover:hover) and (pointer:fine){
  .btn-solid:hover{filter:brightness(1.08);}
  .btn-ghost:hover,.btn-icon:hover{background:var(--surface-2);border-color:var(--text-dim);color:var(--text);}
  .chip:not(.active):hover{border-color:var(--text-dim);color:var(--text);}
  .card:hover{border-color:rgba(150,150,158,.22);}
}

/* ---- Keyboard focus: a visible, on-brand ring for every interactive
   control that didn't already define its own focus treatment. Uses
   :focus-visible so it only shows for keyboard/assistive nav, never on
   tap/click. ---- */
.btn:focus-visible,.btn-icon:focus-visible,.chip:focus-visible,.btn-chip:focus-visible,
.nav-item:focus-visible,.tick-btn:focus-visible,.meta-chip:focus-visible{
  outline:none;
  box-shadow:0 0 0 3px var(--accent-soft);
}

/* ---- Modal sheets: a small drag-handle grabber signals "this can be
   swiped down" before the user even tries, and the overlay gets a faint
   blur so the sheet reads as sitting clearly above the app rather than
   just a dark rectangle on top of it. ---- */
.modal-overlay{-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);}
.modal-sheet{box-shadow:0 -8px 30px rgba(0,0,0,.35);position:relative;}
.modal-sheet::before{
  content:'';
  position:absolute;top:8px;left:50%;
  width:36px;height:4px;
  transform:translateX(-50%);
  border-radius:2px;
  background:var(--border);
  pointer-events:none;
}
.modal-sheet.doc-style::before{display:none;}

/* ============================= RADIAL MAP (§2 of the ALMAS leverage/map
   design doc) — laptop/desktop-only spatial view+editor over padresSecundarios
   /bloqueadaPor_id. Rendered as a fixed fullscreen overlay (not inside the
   padded, scrolling #views flow) so the canvas can own the whole viewport;
   opened via setView('radial') (data-action="nav" data-view="radial") from
   the Tablero/Almas toolbars, same plumbing every other view uses. ---- */
#view-radial.active{ position:fixed; top:calc(var(--top-h) + env(safe-area-inset-top)); left:0; right:0; bottom:0; z-index:500; display:flex; flex-direction:column; background:var(--bg); }
.radial-toolbar{ flex-shrink:0; display:flex; align-items:center; gap:10px; padding:10px 14px; border-bottom:1px solid var(--border); }
.radial-toolbar input{ flex:1; min-width:0; }
.radial-crumb{ flex:1; min-width:0; font-family:var(--font-heading); font-size:12px; letter-spacing:.03em; color:var(--text-dim); white-space:nowrap; overflow-x:auto; scrollbar-width:none; }
.radial-crumb::-webkit-scrollbar{ display:none; }
.radial-crumb span{ cursor:pointer; }
.radial-crumb span:hover{ color:var(--text); text-decoration:underline; }
.radial-crumb .sep{ margin:0 4px; color:var(--text-muted); cursor:default; }
.radial-crumb .sep:hover{ text-decoration:none; color:var(--text-muted); }
/* touch-action:none — without this, a touch-drag here fights the browser's
   own scroll/pan gesture recognizer, which can jank the drag or cancel it
   outright mid-gesture (pointercancel) before a drop ever lands. Every
   other custom-drag surface in this file (.tv-drag-handle, .board-flat-grip,
   the knob-svg, etc.) already sets this — the radial map's pan + node-drag
   were the one interaction left without it. */
.radial-canvas-wrap{ position:relative; flex:1; overflow:hidden; cursor:grab; touch-action:none; }
#radial-svg{ overflow:visible; }
.radial-canvas-wrap.panning{ cursor:grabbing; }
.radial-canvas-wrap svg{ width:100%; height:100%; display:block; }
/* Node base */
.radial-node-hitcircle{ fill:transparent; }
.radial-node-body{ transition:opacity 150ms var(--ease), r 150ms var(--ease); filter:drop-shadow(0 0 0px transparent); }
.radial-node-glow{ pointer-events:none; }
.radial-node-label{
  font-family:var(--font-heading,sans-serif);
  fill:var(--text-dim);
  pointer-events:none;
  user-select:none;
  letter-spacing:.02em;
}
/* Label anchors — a separate top-level layer (see #radial-labels in
   renderRadialMap) rendered AFTER #radial-nodes/#radial-lines so every
   label paints on top of every circle/edge in the map, regardless of
   render order. Each anchor group sits at a fixed WORLD position
   (data-lx/data-ly) with a `scale(1/uiRadial.scale)` baked into its own
   transform — since the parent #radial-transform group already carries
   `scale(uiRadial.scale)`, the two cancel out and the label content
   (box + text, drawn in plain local pixel units) always renders at the
   same on-screen size no matter how zoomed in/out the map is.
   radialApplyTransform() refreshes just this counter-scale factor on
   every pan/zoom tick, so it stays correct without a full re-render. The
   direction (which side of the node the box sits on) is decided once per
   render, in renderRadialMap()/radialComputeLabelPlacements(), so labels
   don't collide even at the most-zoomed-out view. */
.radial-label-anchor{ pointer-events:none; }
/* Toolbar "Mostrar títulos" toggle. It ONLY governs Meta labels (see the
   .radial-label-meta class added in radialLabelMarkup): checked forces
   every Meta title visible without hovering, unchecked leaves Meta titles
   in the same hover-only state as everything else. The label layer itself
   is never display:none'd for this — Submeta/Tarea titles (and, when the
   box is unchecked, Meta titles too) are always reachable via hover
   regardless of this toggle, so it must stay in the render tree. See
   .radial-label-anchor.radial-label-progressive further down for the
   opacity rules this toggle overrides. */
.radial-label-box{
  fill:var(--surface);
  fill-opacity:.92;
  stroke:var(--border);
  stroke-width:1;
}
/* Every title label — Meta, Submeta, or Tarea, on the focus path or off it
   — starts out invisible by default and is only revealed on hover of its
   own node, via JS (radial-label-hover, set from a delegated
   pointerover/pointerout pair in radialAttachHandlers) since the label
   anchor no longer lives inside its node's own <g>, so a plain CSS
   `:hover` sibling rule can't reach them. That hover reveal is unconditional
   — never gated by the "Mostrar títulos" toggle, so any title is always
   reachable by hovering its node regardless of filter state. The ONE
   exception to "hidden by default" is Meta labels while "Mostrar títulos"
   is checked (see .radial-label-meta below and the toggle's own comment
   above .radial-label-box) — Submeta/Tarea titles never get a
   default-visible mode; hover is their only reveal. */
.radial-label-anchor.radial-label-progressive{ opacity:0; transition:opacity 120ms; }
#radial-svg:not(.radial-hide-labels) .radial-label-anchor.radial-label-progressive.radial-label-meta{ opacity:1; }
.radial-label-anchor.radial-label-hover{ opacity:1; }
/* Click-to-focus dimming (radialSetFocus/radialClearFocus toggle this on
   the matching label anchor, matched by data-label-for, the same way they
   already do for .radial-node.radial-dim). !important because Meta labels
   above win on plain specificity otherwise (#radial-svg:not(...) + 3
   classes beats this rule's 2 classes) — without it, a focused/task view
   still showed every OTHER Meta title at full opacity via "Mostrar
   títulos", which is exactly the wall-of-background-text this is meant to
   prevent. Dropped to 0 (was .07): with dozens of labels overlapping, even
   a faint 7% opacity read as legible clutter — while a task is focused,
   anything off its chain should be genuinely gone, not just dim. */
.radial-label-anchor.radial-dim{ opacity:0 !important; }
/* Dim/hover states */
.radial-node.radial-dim .radial-node-body{ opacity:.07; }
.radial-node.radial-dim .radial-node-chrome{ opacity:.07; }
.radial-node.radial-dim .radial-node-glow{ opacity:0; }
.radial-node.radial-dim .radial-handle{ opacity:0 !important; }
.radial-node-dragging{ cursor:grabbing; opacity:.55; }
.radial-node-dragging .radial-node-body{ stroke-dasharray:2,2; }
.radial-drop-target .radial-node-body{ stroke:#fff !important; stroke-width:2.4 !important; filter:drop-shadow(0 0 8px #fff); }
.radial-node.radial-hover .radial-node-body{ filter:drop-shadow(0 0 6px currentColor); }
/* Meta/Submeta fruits: no round type-ring (see radialTypeRingSpec) —
   instead each fruit's own built-in outline (the .fruit-outline
   path/circle/rect tagged inside each AREA_FRUIT_SVG entry) gets recolored
   to that type's ring color (meta blue / submeta purple) and drawn
   noticeably thicker. Unitless stroke-width here lives in the fruit's own
   0–64 viewBox, so it still scales with the node's palanca-driven size
   exactly like the fruit itself does. !important because these are SVG
   presentation attributes on the fruit markup, not plain unstyled shapes. */
.radial-fruit-submeta .fruit-outline{ stroke:#9B3FE0 !important; stroke-width:5 !important; }
.radial-fruit-meta .fruit-outline{ stroke:#22C7DE !important; stroke-width:5 !important; }
/* Base floor line (grove/tree mode only) — every Alma's trunk sits on this
   same y=0 baseline (see radialComputeXY), so one line spanning the
   visible forest's width reads as solid ground the whole row of trees
   grows out of. Drawn first inside #radial-lines so every tree/node paints
   over it, never under. */
#radial-svg.radial-grove-mode .radial-grove-floor{
  stroke:#6b6459;
  fill:none;
  stroke-linecap:round;
}
/* Grace-period hover (see radialAttachHandlers' pointerover/pointerout
   pair) — kept as a SEPARATE class from the plain :hover rule right below,
   not a replacement for it, so a handle still appears instantly on direct
   hover and simply stays a little longer once the cursor has left. */
.radial-node.radial-handles-armed .radial-handle{ opacity:1; transform:scale(1); }
/* Handles — hidden by default, appear on hover */
.radial-handle{ opacity:0; transition:opacity 150ms var(--ease), transform 150ms var(--ease); cursor:crosshair; transform-origin:center; transform:scale(.7); }
.radial-node:hover .radial-handle{ opacity:1; transform:scale(1); }
.radial-node:not(:hover):not(.radial-handles-armed) .radial-handle,
.radial-node:not(:hover):not(.radial-handles-armed) .radial-handle-hit{ pointer-events:none; }
/* Tag handle (diamond) and dep handle (chevron/arrow) both carry the
   node's own area color, set inline via fill="..." in the markup (same
   radialAreaColorFor() value used for the node body) — no CSS `fill` here
   on purpose, same reasoning as .radial-crosslink-line/.radial-dependency-line
   below: a CSS fill on this class would always beat the inline presentation
   attribute, which is exactly what was pinning every handle to one flat
   gold/pink color regardless of which area's node it sat on. Shape (diamond
   vs chevron) is what still tells tag and dependency handles apart. */
.radial-handle-tag{ stroke:rgba(0,0,0,.4); stroke-width:.8; }
.radial-handle-dep{ stroke:rgba(0,0,0,.4); stroke-width:.8; }
/* Handle label tooltip */
/* Lines — hierarchy edges are curved branches (single trunk forking into
   children, per the reference sketch) so they read as organic growth
   rather than a starburst of straight rays converging on a point. */
.radial-hierarchy-line{ stroke:#6b6459; stroke-width:1.7; fill:none; stroke-linecap:round; stroke-linejoin:round; opacity:1; transition:opacity 150ms var(--ease); }
/* No per-edge outline class — the dark collar is an SVG filter
   (#radial-tree-outline, defined in renderRadialMap) applied to a small
   <g> per PARENT (that parent's whole trunk+fork group), not to one edge
   and not to the whole tree at once. Dilating each parent's own combined
   alpha means a fork reads as one seamless branch with no seam at the
   join, while two DIFFERENT parents' branches that cross elsewhere still
   each paint their own outline+color independently — ordinary SVG paint
   order (later group on top) then makes whichever is drawn later visibly
   cut over the earlier one right at that crossing. See the `stroke()`
   helper in radialHierarchyEdgesForParent and the per-parent <g> wrap in
   renderRadialMap. */
/* Cross-links/dependencies are always visually secondary to the hierarchy
   (§3 item 4 of the implementation spec) — thinner and dimmer than the
   hierarchy lines above, never the loudest thing on screen, and hidden by
   default (see uiRadial.showTags/showDependencies default below). Half the
   old weight (RADIAL_CROSSDEP_LINE_WIDTH halved in JS too) so they read as
   slim ribbons riding alongside the tree rather than a second tree. */
.radial-crosslink-line{
  /* No CSS `stroke` here on purpose — each path sets its own via the
     inline stroke="..." attribute (mixed from the two areas it connects,
     then tinted toward a violet family so a tag ribbon never reads as the
     same shade as a dependency ribbon or the tree itself — see
     radialDrawSpecialEdge's callers). A CSS stroke declaration on this
     class would always win over that inline attribute (SVG presentation
     attributes lose to any CSS rule, "fallback" or not), which is exactly
     what was making every line render in one flat color regardless of what
     was computed per-line in JS. */
  stroke-width:2; /* kept in sync with RADIAL_CROSSDEP_LINE_WIDTH in JS */
  fill:none;
  opacity:.8;
  stroke-linecap:round;
  transition:opacity 150ms var(--ease);
}
/* Direction chevrons riding along a cross-link's own path (see
   radialChevronMarkup) — the visual cue that marks this as a special,
   directional connection rather than plain hierarchy. Kept a touch dimmer
   than the line itself so the ribbon still reads first, ticks second. */
.radial-crosslink-chevron{
  opacity:1;
  pointer-events:none;
  transition:opacity 150ms var(--ease);
}
.radial-dependency-line{
  /* Same fix as .radial-crosslink-line above — no CSS `stroke` here, the
     inline stroke="..." attribute per path carries the actual (mixed, then
     amber-tinted) color — a different tint family than the tag ribbon's
     violet lean, so the two edge types stay visually distinct from each
     other, not just from the tree. */
  stroke-width:2; /* kept in sync with RADIAL_CROSSDEP_LINE_WIDTH in JS */
  fill:none;
  opacity:.8;
  stroke-linecap:round;
  transition:opacity 150ms var(--ease);
}
/* Direction chevrons riding along a dependency edge's own path — same
   language as the cross-link chevrons above, so both "special connection"
   edge types read consistently as directional ribbons rather than plain
   hierarchy lines. */
.radial-dependency-chevron{
  opacity:1;
  pointer-events:none;
  transition:opacity 150ms var(--ease);
}
/* Click-to-focus dimming for the lines themselves (see radialSetFocus) —
   a branch that isn't part of the currently-focused node's chain fades to
   near-invisible, same as its node bodies via .radial-node.radial-dim
   below, so an irrelevant branch is genuinely hidden rather than just its
   endpoint circle. */
.radial-hierarchy-line.radial-dim,
.radial-hierarchy-join.radial-dim,
.radial-crosslink-line.radial-dim,
.radial-crosslink-chevron.radial-dim,
.radial-dependency-line.radial-dim,
.radial-dependency-chevron.radial-dim{ opacity:.06 !important; }
/* Grove fork wedge: clip percentages are relative to the fill's own box
   so the parabola reveals from the joint up, not from the SVG viewBox. */
#radial-svg.radial-grove-mode .radial-hierarchy-join{
  transform-box: fill-box;
}
/* Pending rubber-band line — while a tag/dep link is armed and the mouse is
   still choosing a target, this preview should read as the same kind of
   edge the click will actually create, not a thinner, dashed placeholder
   with its own separate look. So it reuses the exact weight/opacity
   language of the permanent .radial-crosslink-line/.radial-dependency-line
   above (kept in sync via RADIAL_CROSSDEP_LINE_WIDTH) — solid, not dashed
   — and, same reasoning as those two, no CSS `stroke` here: the line's own
   stroke="..." attribute (the origin node's area color — the target's
   isn't known yet, so there's nothing to mix with) carries the actual
   color. */
.radial-pending-line-tag,
.radial-pending-line-dep{
  stroke-width:2; /* kept in sync with RADIAL_CROSSDEP_LINE_WIDTH in JS */
  fill:none;
  opacity:.8;
  stroke-linecap:round;
  pointer-events:none;
}
.radial-pending-line{ stroke:var(--text); stroke-width:1.6; stroke-dasharray:3 3; fill:none; pointer-events:none; }
/* Collapse toggle — progressive disclosure (§3 item 5): hidden by default,
   revealed on hover/focus of its own node, so it doesn't clutter every
   container node at every zoom level. The "Mostrar −" toolbar button pins
   them all visible (radial-pin-toggles on the svg root) for anyone who
   wants the old always-on behaviour. */
.radial-collapse-toggle{ cursor:pointer; opacity:0; transition:opacity 120ms; }
.radial-node:hover .radial-collapse-toggle{ opacity:.7; }
.radial-collapse-toggle:hover{ opacity:1; }
#radial-svg.radial-pin-toggles .radial-collapse-toggle{ opacity:.7; }
#radial-svg.radial-pin-toggles .radial-collapse-toggle:hover{ opacity:1; }
/* While a node is being dragged (.dragging-node toggled on
   .radial-canvas-wrap by the node-drag handlers in radialAttachHandlers),
   force every OTHER node's hover-revealed chrome off. Handle/collapse-toggle
   visibility above is driven by plain CSS :hover, which keeps reacting to
   the cursor's real on-screen position no matter what the pointer capture
   held by the drag is targeting — so as the dragged node gets carried
   across its neighbours, their handles/toggles were popping open on their
   own. .radial-drop-target (set explicitly in JS, not via :hover) is the
   one thing that should still react while dragging, and isn't touched here. */
.radial-canvas-wrap.dragging-node .radial-handle,
.radial-canvas-wrap.dragging-node .radial-collapse-toggle{ opacity:0 !important; }
.radial-canvas-wrap.dragging-node .radial-node:not(.radial-node-dragging){ pointer-events:none; }
.radial-node-dragging{ pointer-events:none; }
#radial-carry-overlay{
  position:fixed; inset:0; z-index:2147483000;
  cursor:grabbing; touch-action:none; background:transparent;
}
#radial-carry-overlay[hidden]{ display:none !important; }
/* Node labels — progressive disclosure (§3 item 5): Meta titles default on
   only while the "Mostrar títulos" toolbar toggle is checked; Submeta/Tarea
   titles never default on, regardless of focus path or that toggle — hover
   is their only reveal, so the default view shows dots, not a wall of
   text. (Implemented via .radial-label-anchor.radial-label-progressive /
   .radial-label-meta / .radial-label-hover above, since labels live in
   their own top-level layer — see the comment block above
   .radial-label-anchor.) */
/* Badge */
.radial-badge-ring{ fill:none; stroke-width:1.5; opacity:.75; stroke-dasharray:3 2; }
/* Tooltip */
.radial-tooltip{
  /* The tooltip stays click-through so it never eats a click meant for the
     canvas underneath it — but it pins open on click and carries a real
     button ("+ meta aquí"), which pointer-events:none made unclickable.
     Re-enable pointers on the button alone. */
  position:fixed; z-index:600; pointer-events:none;
  background:rgba(20,20,28,.92);
  border:1px solid rgba(150,150,158,.22);
  border-radius:8px;
  padding:12px 21px;
  font-size:16px; color:var(--text);
  text-align:center;
  min-width:180px;
  max-width:420px;
  box-shadow:0 8px 24px rgba(0,0,0,.55);
  display:none;
  backdrop-filter:blur(8px);
  line-height:1.5;
}
.radial-tooltip button{ pointer-events:auto; }
/* Left-aligned: it's a list of names, not the centred label text around it.
   pointer-events back on so a long index can actually be scrolled. */
.radial-palanca-index{
  align-self:stretch; text-align:left; pointer-events:auto;
  margin-top:5px; padding-top:5px;
  border-top:1px solid rgba(255,255,255,.12);
  color:var(--text-muted); font-size:10px; line-height:1.55;
  max-height:220px; overflow-y:auto;
}
/* Pending state UI */
.radial-pending-banner{
  position:fixed; z-index:600; pointer-events:none;
  top:58px; left:50%; transform:translateX(-50%);
  background:rgba(20,20,28,.92);
  border:1px solid rgba(150,150,158,.22);
  border-radius:8px;
  padding:7px 14px;
  font-size:12px; color:var(--text);
  box-shadow:0 8px 24px rgba(0,0,0,.55);
  backdrop-filter:blur(8px);
  white-space:nowrap;
}
.radial-cancel-btn{ position:fixed; z-index:600; top:58px; right:16px; }
.radial-areanav{ position:absolute; z-index:600; left:50%; bottom:calc(14px + env(safe-area-inset-bottom)); transform:translateX(-50%); max-width:94vw; display:flex; align-items:center; gap:10px; padding:7px 10px; background:rgba(20,20,28,.92); border:1px solid rgba(150,150,158,.22); border-radius:999px; box-shadow:0 8px 24px rgba(0,0,0,.55); }
.radial-areanav-back{ border:0; background:rgba(255,255,255,.1); color:var(--text); font:inherit; font-size:12px; padding:5px 11px; border-radius:999px; cursor:pointer; white-space:nowrap; }
.radial-areanav-title{ font-size:12px; color:var(--text); white-space:nowrap; font-weight:500; }
.radial-areanav-chips{ display:flex; gap:5px; overflow-x:auto; scrollbar-width:none; }
.radial-areanav-chip{ flex:0 0 auto; width:30px; height:30px; border-radius:50%; border:1.5px solid var(--chip); background:transparent; color:var(--chip); display:flex; align-items:center; justify-content:center; cursor:pointer; padding:0; }
.radial-areanav-chip.active{ background:var(--chip); color:#fff; }
@media (max-width:640px){ .radial-areanav-title{ display:none; } }

/* ---- Inicio redesign: brain in header, shorter hero, live "now" card ---- */
.hdr-logo-row{display:inline-flex;align-items:center;gap:12px;}
.hdr-brain{background:none;border:0;padding:0;cursor:pointer;-webkit-tap-highlight-color:transparent;display:inline-flex;}
.hdr-brain .ai-export-brain{width:34px;filter:drop-shadow(0 0 6px rgba(233,201,124,.6));}
.hdr-brain:active{transform:scale(.92);}
.today-hero{min-height:20vh !important;padding-top:20px !important;margin-top:6px !important;}
.now-card{position:relative;display:flex;align-items:stretch;gap:14px;margin:2px 0 4px;padding:10px;border-radius:20px;background:var(--surface);border:1px solid color-mix(in srgb,var(--ac) 45%,transparent);box-shadow:0 0 22px color-mix(in srgb,var(--ac) 18%,transparent);cursor:pointer;overflow:hidden;}
.now-pic{flex:0 0 84px;min-height:96px;border-radius:14px;background:linear-gradient(160deg,var(--ac),#1b1d36) center/cover no-repeat;}
.now-body{flex:1;min-width:0;display:flex;flex-direction:column;justify-content:center;gap:3px;}
.now-state{font-size:12px;font-weight:600;color:var(--ac);letter-spacing:.02em;}
.now-title{font-family:var(--font-heading);font-size:18px;font-weight:700;line-height:1.2;color:var(--text);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
.now-desc{font-size:13px;line-height:1.35;color:var(--text);opacity:.7;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
.now-ring{position:relative;flex:0 0 78px;width:78px;height:78px;align-self:center;}
.now-ring svg{width:100%;height:100%;transform:rotate(-90deg);}
.now-ring circle{fill:none;stroke-width:5;}
.now-ring-bg{stroke:rgba(255,255,255,.1);}
.now-ring-fg{stroke:var(--ac);stroke-linecap:round;transition:stroke-dashoffset 1s linear;}
.now-time{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;padding-bottom:9px;font-size:15px;font-weight:700;font-variant-numeric:tabular-nums;color:var(--text);}
.now-cap{position:absolute;left:0;right:0;bottom:15px;text-align:center;font-size:9.5px;opacity:.6;color:var(--text);}
@media (prefers-reduced-motion:reduce){.now-ring-fg{transition:none;}}
.wk-chip.dn{text-decoration:line-through;opacity:.55;}
/* ---- Ahora/Siguiente card: cadena Área › … › Submeta ---- */
.now-chain{font-size:11px;line-height:1.3;color:var(--text-muted);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
.now-chain .nc-area{color:var(--ac);font-weight:600;}
.now-chain .nc-sep{opacity:.5;margin:0 3px;}
.now-chain .nc-sub{color:var(--text);font-weight:600;opacity:.85;}
/* ---- Contactos / Oficina en el calendario: bloques compactos, movibles y redimensionables ---- */
.cal-event.cal-contact .cal-ev-names{font-size:11px;color:var(--text-muted);margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.cal-event.cal-contact,.cal-event.cal-office{padding-bottom:14px;}
.cal-grip{position:absolute;left:0;right:0;bottom:0;height:14px;display:flex;align-items:center;justify-content:center;cursor:ns-resize;touch-action:none;z-index:3;}
.cal-grip::after{content:'';width:28px;height:3px;border-radius:2px;background:var(--text-muted);opacity:.45;}
.cal-office{cursor:pointer;}
.cal-contact{cursor:pointer;}
/* ---- Modales de Contactos del día / Oficina ---- */
.ccm-sec{font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:var(--text-muted);margin:14px 0 6px;}
.ccm-sec:first-child{margin-top:0;}
.ccm-card{background:var(--surface-2);border:1px solid var(--border);border-radius:14px;padding:12px;margin-bottom:8px;}
.ccm-card.done{opacity:.55;}
.ccm-name{font-family:var(--font-heading);font-size:15px;font-weight:600;cursor:pointer;display:flex;align-items:center;gap:8px;}
.ccm-card.done .ccm-name span.nm{text-decoration:line-through;}
.ccm-why,.ccm-meta{font-size:12px;color:var(--text-muted);margin-top:3px;}
.ccm-note{font-size:13px;white-space:pre-wrap;margin-top:6px;padding-top:6px;border-top:1px solid var(--border);}
.ccm-note small{display:block;font-size:10.5px;color:var(--text-muted);margin-bottom:1px;}
.ccm-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px;}
.ccm-bday{display:flex;align-items:center;gap:10px;padding:8px 0;border-top:1px solid var(--border);cursor:pointer;}
.ccm-bday:first-of-type{border-top:0;}
.ccm-bday .d{margin-left:auto;font-size:12px;color:var(--text-muted);white-space:nowrap;}

/* ---- 2026-11 phone fit fixes ----
   1) Header: title + HOY/SEMANA/MES pill + sync dot + contacts + settings add
      up to ~390px, wider than a 375px phone, so the right-hand ⋮ got clipped.
      Let the header shrink and tighten the pill/gaps on narrow screens.
   2) Standalone (home-screen) iOS: the fixed layer can end up shorter than the
      physical screen, leaving a dead band under the bottom nav. Use the large
      viewport height there so body and nav reach the real bottom edge. */
#top-bar{min-width:0;box-sizing:border-box;}
#top-bar-title{min-width:0;flex-shrink:1;}
#top-bar-right{min-width:0;flex-shrink:0;}
#sync-status.sync-dot-hidden{width:0;overflow:hidden;}
@media (max-width:420px){
  #top-bar{padding-left:14px;padding-right:8px;}
  #top-bar-slot:not(:empty){margin-right:4px;}
  #top-bar-slot .wo-toggle-text .wo-toggle-opt{padding:6px 8px;font-size:12px;}
  #settings-btn,#contacts-btn{width:30px;}
  #top-bar-right{gap:0;}
}
@media (display-mode:standalone){
  @supports (height:100lvh){
    html,body{height:100lvh;}
    body{bottom:auto;}
  }
}
#deploy-paste-zone:empty::before{content:attr(data-placeholder);color:var(--text-dim);pointer-events:none;}
#deploy-paste-zone:focus{outline:none;border-color:var(--accent);}

/* ===== LYFE · Mechanicat (vista Progreso) — tokens de la app, diseño propio ===== */
.gm-modal,.gm-toast{--gm-xp:var(--emphasis);--gm-hp:var(--accent);--gm-ok:var(--success);--gm-blue:var(--tipo-meta,#3F97CE);--gm-pur:var(--tipo-submeta,#9A6DDE);--gm-fire:#f0924a;--gm-rad:20px;--gm-line:rgba(150,150,158,.14);font-family:var(--font-body);font-variant-numeric:tabular-nums}
.gm-modal *{box-sizing:border-box}
.gm{--gm-xp:var(--emphasis);--gm-hp:var(--accent);--gm-ok:var(--success);--gm-blue:var(--tipo-meta,#3F97CE);--gm-pur:var(--tipo-submeta,#9A6DDE);--gm-fire:#f0924a;--gm-rad:20px;--gm-line:rgba(150,150,158,.14);
  padding:10px 14px 130px;max-width:560px;margin:0 auto;font-family:var(--font-body);color:var(--text);font-variant-numeric:tabular-nums;-webkit-font-smoothing:antialiased}
.gm *{box-sizing:border-box}
.gm-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:14px}
.gm-sec{min-width:0}
.gm h2{font-family:var(--font-heading);font-size:11px;letter-spacing:.14em;text-transform:uppercase;color:var(--text-muted);margin:14px 2px 12px;font-weight:600;display:flex;align-items:center;gap:12px}
.gm h2::after{content:"";flex:1;height:1px;background:var(--gm-line)}
.gm h2 .gm-h2r{order:3;margin-left:auto;font-weight:500;letter-spacing:.04em;text-transform:none;font-size:12px}
.gm-card{position:relative;background:var(--surface);border:1px solid var(--gm-line);border-radius:var(--gm-rad);padding:20px;box-shadow:inset 0 1px 0 rgba(255,255,255,.035)}
.gm-ico{width:1em;height:1em;flex:none;display:inline-block;vertical-align:-.14em;stroke:currentColor;fill:none;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.gm-ico.fill{fill:currentColor;stroke:none}
.gm-kicker{font-family:var(--font-heading);font-size:10.5px;letter-spacing:.14em;text-transform:uppercase;color:var(--text-muted);font-weight:600;display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.gm-sub{color:var(--text-muted);font-size:13px;line-height:1.45}
.gm-title{font-family:var(--font-heading);font-weight:600;font-size:15px;letter-spacing:-.005em}
.gm-name{font-family:var(--font-heading);font-size:26px;font-weight:700;letter-spacing:-.02em}
.gm-num{font-family:var(--font-heading);font-weight:600;letter-spacing:-.03em}

/* --- placeholders (hasta que lleguen los assets propios) --- */
.gm-ph{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;width:100%;height:100%;border-radius:50%;color:var(--text-muted);overflow:hidden;
  background:radial-gradient(120% 120% at 30% 15%,rgba(255,255,255,.07),rgba(255,255,255,.015) 60%),var(--surface-2);border:1px solid var(--gm-line)}
.gm-ph svg{width:46%;height:46%;stroke-width:1.4;opacity:.85}
.gm-ph .gm-phn{font-family:var(--font-heading);font-weight:600;font-size:clamp(22px,34%,54px);letter-spacing:-.04em;color:var(--text);line-height:1}
.gm-ph code{font-family:var(--font-mono);font-size:8.5px;opacity:.45;letter-spacing:.02em}
.gm-ph img{width:100%;height:100%;object-fit:contain;border-radius:0}
.gm-sq .gm-ph{border-radius:14px}

/* --- barras --- */
.gm-bar{position:relative;height:8px;background:var(--surface-2);border-radius:99px;overflow:hidden}
.gm-bar .f{position:absolute;inset:0 auto 0 0;border-radius:99px;transition:width .9s var(--ease)}
.gm-bar .g{position:absolute;inset:0 auto 0 0;border-radius:99px;background:repeating-linear-gradient(135deg,rgba(233,201,124,.85) 0 4px,rgba(233,201,124,.35) 4px 8px)}
.gm-bar.xp .f{background:var(--gm-xp)}
.gm-bar.hp .f{background:var(--gm-hp)}
.gm-bar.boss .f{background:var(--gm-pur)}
.gm-bar.hp.gok .f{background:var(--success)}
.gm-bar.thick{height:10px}
.gm-meter{display:flex;justify-content:space-between;align-items:baseline;gap:10px;margin:12px 0 7px;font-size:12px;color:var(--text-muted)}
.gm-meter b{font-family:var(--font-heading);font-weight:600;color:var(--text);font-size:13px}

/* --- botones --- */
.gm-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;font-family:var(--font-heading);font-weight:600;border:1px solid var(--accent);color:#fff;background:var(--accent);border-radius:999px;padding:0 22px;height:46px;font-size:14px;letter-spacing:0;cursor:pointer;transition:transform var(--fast) var(--ease),background var(--fast),border-color var(--fast),opacity var(--fast)}
.gm-btn:hover{filter:brightness(1.06)}.gm-btn:active{transform:scale(.98)}
.gm-btn:focus-visible,.gm-ibtn:focus-visible,.gm-grip:focus-visible{outline:2px solid var(--emphasis);outline-offset:2px}
.gm-btn.p{background:var(--gm-pur);border-color:var(--gm-pur)}
.gm-btn.o{background:transparent;border-color:rgba(150,150,158,.35);color:var(--text)}
.gm-btn.o:hover{background:rgba(255,255,255,.04);filter:none}
.gm-btn.sm{height:38px;font-size:13px;padding:0 16px}
.gm-btn.w{width:100%}
.gm-ibtn{width:40px;height:40px;border-radius:50%;flex:none;display:grid;place-items:center;border:1px solid rgba(150,150,158,.3);background:transparent;color:var(--text-dim);cursor:pointer;font-size:17px;transition:background var(--fast),color var(--fast),border-color var(--fast),transform var(--fast)}
.gm-ibtn:hover{background:rgba(255,255,255,.06);color:var(--text)}.gm-ibtn:active{transform:scale(.94)}
.gm-ibtn.ok{border-color:rgba(111,185,138,.45);color:var(--success)}.gm-ibtn.ok:hover{background:var(--success);color:#10231a;border-color:var(--success)}
.gm-ibtn.go{background:var(--accent);border-color:var(--accent);color:#fff}.gm-ibtn.go:hover{background:var(--accent);filter:brightness(1.08)}
.gm-ibtn.lg{width:46px;height:46px;font-size:18px}

/* --- chips --- */
.gm-xpchip{display:inline-flex;align-items:center;gap:5px;font-family:var(--font-heading);font-size:11.5px;font-weight:600;padding:4px 10px;border-radius:99px;background:rgba(233,201,124,.12);color:var(--gm-xp);white-space:nowrap;line-height:1.2}
.gm-xpchip.big{font-size:13px;padding:6px 13px}
.gm-xpchip.pur{background:rgba(154,109,222,.14);color:#c3a6f2}
.gm-xpchip.red{background:rgba(233,201,124,.13);color:#f58aa6}
.gm-xpchip.mut{background:rgba(150,150,158,.12);color:var(--text-muted)}
.gm-tier{font-family:var(--font-heading);font-size:10px;font-weight:600;background:rgba(154,109,222,.16);color:#c3a6f2;padding:3px 9px;border-radius:99px;text-transform:uppercase;letter-spacing:.1em}

/* --- héroe --- */
.gm-hero{display:flex;gap:22px;align-items:center;padding:24px;background:radial-gradient(90% 140% at 0 0,rgba(233,201,124,.13),transparent 60%),var(--surface)}
.gm-hero.rusted{filter:saturate(.4)}
.gm-avatar{position:relative;width:132px;height:132px;flex:none}
.gm-avatar svg.ringsvg{position:absolute;inset:0;width:100%;height:100%;transform:rotate(-90deg)}
.gm-avatar .in{position:absolute;inset:11px;animation:gmbob 3.6s ease-in-out infinite}
@keyframes gmbob{50%{transform:translateY(-3px)}}
.gm-hero-b{flex:1;min-width:0}
.gm-stagename{font-family:var(--font-heading);font-size:26px;font-weight:700;letter-spacing:-.02em;line-height:1.1;margin:8px 0 12px}
.gm-xpline{display:flex;align-items:baseline;gap:8px}
.gm-xpline .gm-num{font-size:30px;color:var(--text)}
.gm-bubble{font-size:14px;line-height:1.5;margin:14px 0 0;color:var(--text-dim);max-width:60ch}
.gm-state{font-family:var(--font-heading);font-size:10px;font-weight:600;letter-spacing:.1em;text-transform:uppercase;padding:3px 9px;border-radius:99px;background:rgba(63,151,206,.16);color:#8cc4e6}
.gm-state.r{background:rgba(240,146,74,.16);color:#f6b27d}

/* --- stats --- */
.gm-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.gm-stat{padding:14px 14px 13px;display:flex;flex-direction:column;gap:2px;min-width:0}
.gm-stat .l{display:flex;align-items:center;gap:6px;font-size:11px;color:var(--text-muted);font-weight:500;letter-spacing:.02em}
.gm-stat .v{font-family:var(--font-heading);font-size:24px;font-weight:600;letter-spacing:-.03em;line-height:1.15;margin-top:4px}
.gm-stat .s{font-size:11.5px;color:var(--text-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.gm-stat .gm-bar{margin-top:9px;height:5px}
.gm-stat.fire .l,.gm-stat.fire .v{color:var(--gm-fire)}
.gm-stat.xp .l{color:var(--gm-xp)}
.gm-stat.hp .l{color:var(--gm-hp)}

.gm-alerts{display:grid;gap:8px}
.gm-alert{display:flex;gap:10px;align-items:center;padding:12px 16px;border-radius:14px;background:rgba(240,146,74,.1);font-size:13px;color:#f6b27d}
.gm-alert.amber{background:rgba(233,201,124,.09);color:var(--emphasis)}

/* --- meta del día --- */
.gm-goal{display:flex;gap:20px;align-items:center}
.gm-ring{position:relative;width:96px;height:96px;flex:none}.gm-ring svg{width:100%;height:100%}
.gm-ringt{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;font-family:var(--font-heading)}.gm-ringt b{font-size:22px;font-weight:600;letter-spacing:-.03em}.gm-ringt span{font-size:10.5px;color:var(--text-muted)}
.gm-gl{flex:1;min-width:0}
.gm-g{display:flex;align-items:center;gap:11px;padding:7px 0;font-size:13.5px;color:var(--text-dim)}
.gm-g+.gm-g{border-top:1px solid var(--gm-line)}
.gm-g .ck{width:20px;height:20px;border-radius:50%;border:1.5px solid rgba(150,150,158,.5);display:grid;place-items:center;font-size:11px;flex:none;color:transparent}
.gm-g.ok{color:var(--text-muted)}.gm-g.ok .ck{background:var(--success);border-color:var(--success);color:#10231a}.gm-g.ok .tx{text-decoration:line-through;text-decoration-color:rgba(150,150,158,.6)}
.gm-g .tx{flex:1;min-width:0}

/* --- cola ordenable --- */
.gm-queue{display:flex;flex-direction:column;gap:10px;position:relative}
.gm-q{position:relative;background:var(--surface);border:1px solid var(--gm-line);border-radius:var(--gm-rad);transition:transform .2s var(--ease),border-color var(--fast),box-shadow var(--fast)}
.gm-q.row{display:flex;align-items:center;gap:10px;padding:12px 14px 12px 8px;cursor:pointer}
.gm-q.row:hover{border-color:rgba(233,201,124,.35)}
.gm-q.main{padding:22px;background:linear-gradient(160deg,rgba(233,201,124,.10),transparent 55%),var(--surface);border-color:rgba(233,201,124,.38)}
.gm-q.drag{z-index:20;transition:none;box-shadow:0 18px 44px rgba(0,0,0,.55);border-color:var(--emphasis);cursor:grabbing;opacity:.97}
.gm-q.settling{transition:transform .18s var(--ease)}
.gm-grip{flex:none;width:28px;height:36px;display:grid;place-items:center;border:0;background:none;color:var(--text-muted);opacity:.5;cursor:grab;touch-action:none;border-radius:8px;font-size:16px;padding:0}
.gm-q:hover .gm-grip,.gm-grip:focus-visible{opacity:1}.gm-grip:hover{background:rgba(255,255,255,.05)}
.gm-q.main .gm-grip{position:absolute;top:12px;right:12px}
.gm-q.main .gm-kicker{color:var(--gm-xp);padding-right:34px}
.gm-mtitle{font-family:var(--font-heading);font-size:24px;font-weight:700;letter-spacing:-.02em;margin:10px 0 6px;line-height:1.2}
.gm-mtitle[data-gm]{cursor:pointer;-webkit-tap-highlight-color:transparent}.gm-mtitle[data-gm]:hover,.gm-mtitle[data-gm]:active,.gm-mtitle[data-gm]:focus{text-decoration:none}.gm-mtitle[data-gm]:focus-visible{outline:2px solid var(--emphasis);outline-offset:4px;border-radius:6px}
.gm-rew{display:flex;gap:6px;flex-wrap:wrap;margin-top:14px}
.gm-act{display:flex;gap:10px;margin-top:18px;align-items:center}
.gm-act .gm-btn{flex:1}
.gm-qb{flex:1;min-width:0}
.gm-qt{font-family:var(--font-heading);font-weight:600;font-size:14.5px;line-height:1.3;letter-spacing:-.005em;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.gm-qs{display:flex;align-items:center;gap:6px;font-size:12px;color:var(--text-muted);margin-top:4px;min-width:0}
.gm-qs span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.gm-qh{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:12px 2px 0}
.gm-link{background:none;border:0;color:var(--text-muted);font-family:var(--font-body);font-size:12.5px;cursor:pointer;padding:6px 2px;text-decoration:underline;text-decoration-color:rgba(150,150,158,.4);text-underline-offset:3px}.gm-link:hover{color:var(--text)}
.gm-hint{font-size:12px;color:var(--text-muted);display:flex;align-items:center;gap:6px}
.gm-live{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}

/* --- jefes --- */
.gm-bosses,.gm-guards,.gm-streaks{display:grid;grid-template-columns:minmax(0,1fr);gap:12px}
.gm-boss{display:flex;flex-direction:column;gap:0;padding:0;overflow:hidden}
.gm-boss .top{display:flex;gap:14px;align-items:center;padding:18px 18px 4px}
.gm-boss .pic{width:68px;height:68px;flex:none}
.gm-bname{font-family:var(--font-heading);font-weight:600;font-size:16.5px;letter-spacing:-.01em;line-height:1.25;margin-top:7px}
.gm-boss .bd{padding:6px 18px 18px;display:flex;flex-direction:column;flex:1}
.gm-hpnum{display:flex;align-items:baseline;gap:8px;margin:10px 0 8px}
.gm-hpnum .gm-num{font-size:30px}.gm-hpnum span{font-size:12px;color:var(--text-muted)}
.gm-pips{display:flex;gap:6px;margin-top:12px}
.gm-pip{flex:1;height:6px;border-radius:99px;background:var(--surface-2)}.gm-pip.on{background:var(--gm-pur)}
.gm-boss .gm-sub{margin-top:10px}
.gm-boss .gm-btn{margin-top:auto}
.gm-boss .gm-sub+.gm-btn,.gm-boss .gm-pips+.gm-btn{margin-top:14px}
.gm-hz{display:flex;gap:10px;flex-wrap:wrap;margin-top:12px}
.gm-silh{display:flex;align-items:center;gap:10px;padding:8px 14px 8px 8px;border-radius:99px;background:var(--surface);border:1px solid var(--gm-line);font-size:12.5px;color:var(--text-muted)}
.gm-hid{gap:8px;justify-content:center;margin-top:18px;pointer-events:none;user-select:none}
.gm-hidt{width:34px;height:50px;flex:none}.gm-hidt .pic{width:100%;height:100%}
.gm-hidt .gm-ph{background:none;border-radius:0}.gm-hidt .gm-ph svg{display:none}
.gm-hidt img.gm-real{filter:brightness(.07) saturate(0) contrast(1.2);opacity:.3}
.gm-silh .pic{width:30px;height:30px}.gm-silh .pic img.gm-real{filter:brightness(0) opacity(.55)}
.gm-badge .pic{position:relative}.gm-badge.lock .pic{opacity:1}.gm-badge.lock .pic img.gm-real{filter:brightness(0) opacity(.35)}
.gm-badge.lock .pic::after{content:'?';position:absolute;inset:0;display:grid;place-items:center;font:700 30px var(--font-heading);color:#d9a85a;text-shadow:0 0 10px rgba(255,200,90,.5)}
[data-gx=creature]{cursor:pointer}
.gm-modal.reveal{background:radial-gradient(circle at 50% 45%,rgba(255,196,80,.28),rgba(10,8,7,.96) 70%)}
.gm-rv{position:relative;width:min(300px,72vw);height:min(46vh,420px);margin:6px auto 14px;display:grid;place-items:center}
.gm-rv .aura{position:absolute;inset:-18%;border-radius:50%;background:conic-gradient(from 0deg,rgba(255,200,90,0),rgba(255,200,90,.5),rgba(255,200,90,0) 25%,rgba(255,170,60,.4) 50%,rgba(255,200,90,0) 75%,rgba(255,200,90,.45),rgba(255,200,90,0));filter:blur(22px);animation:gmrvspin 9s linear infinite}
.gm-rv .halo{position:absolute;inset:6%;border-radius:50%;background:radial-gradient(circle,rgba(255,214,120,.55),transparent 65%);animation:gmrvpulse 2.8s ease-in-out infinite}
.gm-rv img{position:relative;max-width:100%;max-height:100%;object-fit:contain;animation:gmrvin 1.1s cubic-bezier(.2,.9,.3,1) both,gmrvfloat 4.5s ease-in-out 1.1s infinite;filter:drop-shadow(0 0 16px rgba(255,200,90,.75))}
.gm-rv .sp{position:absolute;width:5px;height:5px;border-radius:50%;background:#ffe3a1;box-shadow:0 0 8px 2px rgba(255,205,100,.9);left:var(--x);top:var(--y);opacity:0;animation:gmrvsp var(--d) ease-in-out var(--dl) infinite}
@keyframes gmrvspin{to{transform:rotate(360deg)}}
@keyframes gmrvpulse{0%,100%{opacity:.55;transform:scale(.95)}50%{opacity:1;transform:scale(1.08)}}
@keyframes gmrvin{0%{opacity:0;transform:translateY(40px) scale(.7);filter:brightness(3) drop-shadow(0 0 40px #ffd57a)}60%{opacity:1}100%{transform:none;filter:brightness(1) drop-shadow(0 0 16px rgba(255,200,90,.75))}}
@keyframes gmrvfloat{0%,100%{transform:translateY(0)}50%{transform:translateY(-8px)}}
@keyframes gmrvsp{0%{opacity:0;transform:translateY(8px) scale(.4)}40%{opacity:1}100%{opacity:0;transform:translateY(-34px) scale(1)}}

/* --- escenas de nivel / evolución / insignia --- */
.gm-modal.gm-lv,.gm-modal.gm-bd{transition:opacity .2s,background .6s}
.gm-modal.gm-lv.out,.gm-modal.gm-bd.out{opacity:0}
.gm-lv.evo{background:radial-gradient(circle at 50% 40%,rgba(255,214,120,.2),rgba(4,3,3,.98) 66%)}
.lv-card{max-width:400px!important;overflow:hidden}
.lv-done{display:flex;align-items:center;justify-content:center;gap:8px;margin-top:8px;min-height:24px;font-weight:600;font-size:14px;transition:opacity .4s}
.lv-ck{width:22px;height:22px;border-radius:50%;background:var(--gm-ok);color:#fff;display:grid;place-items:center;flex:none;animation:lvPop .5s .1s cubic-bezier(.2,1.6,.4,1) both}
.lv-ck svg{width:14px;height:14px;stroke-width:3}
.lv-tt{max-width:280px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;animation:gmf .5s .2s both}
.lv-stage{position:relative;width:230px;height:230px;margin:8px auto 2px}
.lv-pic{position:absolute;inset:0;opacity:0;transition:opacity .22s,filter .22s}
.lv-pic.show{opacity:1}
.lv-pic.sil{filter:brightness(0) invert(1) drop-shadow(0 0 14px rgba(255,230,160,.9))}
.lv-pic.pop{animation:lvReveal .9s cubic-bezier(.2,1.4,.4,1)}
.lv-glow{position:absolute;inset:6%;border-radius:50%;background:radial-gradient(circle,rgba(255,200,90,.38),transparent 68%);opacity:.5;transition:opacity .6s,transform .6s}
.evo .lv-glow{opacity:1;transform:scale(1.35);animation:lvGlow 1.1s ease-in-out infinite}
.lv-fx{position:absolute;inset:0;pointer-events:none}
.lv-flash{position:absolute;inset:-40%;background:radial-gradient(circle,#fff 15%,rgba(255,255,255,0) 70%);opacity:0;pointer-events:none}
.flash .lv-flash{animation:lvFlash .6s ease-out}
.lv-ring{position:absolute;left:50%;top:50%;width:120px;height:120px;margin:-60px 0 0 -60px;border-radius:50%;border:3px solid rgba(255,214,120,.9);animation:lvRing .9s ease-out forwards}
.lv-ring.big{border-width:5px;border-color:#fff}
.lv-sp{position:absolute;left:50%;top:50%;width:var(--s);height:var(--s);margin:calc(var(--s)/-2);border-radius:50%;background:#ffe39a;box-shadow:0 0 8px 2px rgba(255,200,90,.8);animation:lvSp var(--d) ease-out forwards}
.lv-name{font-family:var(--font-heading);font-weight:700;font-size:17px;margin-top:2px;letter-spacing:-.01em}
.lv-row{display:flex;align-items:center;justify-content:space-between;margin:14px 2px 8px;transition:opacity .4s}
.lv-lvl{font:700 15px var(--font-heading);padding:4px 12px;border-radius:99px;background:rgba(255,200,90,.14);color:var(--gm-xp)}
.lv-lvl.bump{animation:lvBump .6s cubic-bezier(.2,1.6,.4,1)}
.lv-gain{font:700 16px var(--font-heading);color:var(--gm-xp);animation:lvPop .5s .3s both}
.lv-bar{transition:opacity .4s}
.lv-bar .f{box-shadow:0 0 12px rgba(255,200,90,.55)}
.lv-nums{font-size:12px;color:var(--text-muted);margin-top:6px;transition:opacity .4s}
.lv-msg{min-height:44px;margin:10px 0 12px;font-size:13px;color:var(--text-muted);display:flex;flex-direction:column;gap:2px}
.lv-msg b{font:700 17px var(--font-heading);color:var(--text);animation:gmf .4s}
.evo .lv-done,.evo .lv-row,.evo .lv-bar,.evo .lv-nums,.evo .lv-kick{opacity:.18}
.evo .lv-done{visibility:hidden}
.evo .lv-msg b{color:#ffe39a}
@keyframes lvPop{from{transform:scale(0);opacity:0}}
@keyframes lvBump{0%{transform:scale(1)}40%{transform:scale(1.35)}100%{transform:scale(1)}}
@keyframes lvRing{from{transform:scale(.4);opacity:1}to{transform:scale(2.7);opacity:0}}
@keyframes lvSp{from{transform:rotate(var(--a)) translateX(0);opacity:1}to{transform:rotate(var(--a)) translateX(var(--r));opacity:0}}
@keyframes lvFlash{0%{opacity:0}25%{opacity:1}100%{opacity:0}}
@keyframes lvGlow{50%{opacity:.6}}
@keyframes lvReveal{0%{transform:scale(.6);filter:brightness(3)}60%{transform:scale(1.12);filter:brightness(1.4)}100%{transform:scale(1);filter:none}}
/* insignia */
.gm-bd{--c0:#b9773c;--c1:#e9a96a;--c2:#8a5424}.gm-bd.s{--c0:#b9c0cf;--c1:#eef1f7;--c2:#7c8496}.gm-bd.gd{--c0:#e3a23a;--c1:#ffe08a;--c2:#b8741a}
.gm-bd{background:radial-gradient(circle at 50% 42%,color-mix(in srgb,var(--c1) 30%,transparent),rgba(8,6,5,.95) 70%)}
.bd-card{max-width:360px!important;overflow:hidden}
.bd-stage{position:relative;width:220px;height:220px;margin:10px auto 6px;display:grid;place-items:center}
.bd-rays{position:absolute;inset:-30%;background:repeating-conic-gradient(from 0deg,color-mix(in srgb,var(--c1) 38%,transparent) 0 8deg,transparent 8deg 22deg);-webkit-mask:radial-gradient(circle,#000 18%,transparent 66%);mask:radial-gradient(circle,#000 18%,transparent 66%);animation:bdSpin 14s linear infinite,gmf 1s .3s both}
.bd-ring{position:absolute;left:50%;top:50%;width:150px;height:150px;margin:-75px 0 0 -75px;border-radius:50%;border:4px solid var(--c1);animation:lvRing 1.1s .45s ease-out both}
.bd-pic{position:relative;width:150px;height:150px;animation:bdIn 1.1s cubic-bezier(.2,1.3,.35,1) both;filter:drop-shadow(0 8px 22px color-mix(in srgb,var(--c1) 55%,transparent))}
.bd-pic .gm-ph{border-radius:50%;background:radial-gradient(circle at 35% 28%,var(--c1),var(--c2));border:5px solid var(--c0);color:#fff}
.bd-pic .gm-ph svg{width:52%;height:52%;stroke-width:1.8;opacity:1}
.bd-pic .gm-ph.has{background:none;border-color:transparent}
.bd-shine{position:absolute;inset:0;border-radius:50%;overflow:hidden;pointer-events:none}
.bd-shine::after{content:'';position:absolute;top:-20%;bottom:-20%;width:34%;left:-50%;background:linear-gradient(100deg,transparent,rgba(255,255,255,.75),transparent);transform:skewX(-18deg);animation:bdShine 1.3s .9s ease-out both}
@keyframes bdIn{0%{transform:scale(0) rotateY(-540deg);opacity:0}70%{transform:scale(1.14) rotateY(0);opacity:1}100%{transform:scale(1)}}
@keyframes bdShine{to{left:130%}}
@keyframes bdSpin{to{transform:rotate(360deg)}}

/* --- guardianes / rachas --- */
.gm-guard{display:flex;gap:14px;align-items:center;padding:16px}
.gm-guard .pic{width:52px;height:52px;flex:none}
.gm-guard .gm-bar{margin:10px 0 0;height:6px}
.gm-streak{display:flex;align-items:center;gap:16px}.gm-flame{width:56px;height:56px;flex:none}
.gm-dots{display:flex;gap:6px;margin-top:16px}
.gm-dot{flex:1;max-width:44px;aspect-ratio:1;border-radius:50%;background:var(--surface-2);display:grid;place-items:center;font-family:var(--font-heading);font-size:10.5px;font-weight:600;color:var(--text-muted);font-size:11px}
.gm-dot.done{background:var(--gm-fire);color:#2a1507}
.gm-dot.rest{background:var(--gm-blue);color:#fff}
.gm-dot.today{box-shadow:inset 0 0 0 1.5px var(--gm-xp);color:var(--gm-xp)}

/* --- diario / ajustes --- */
.gm-log{display:flex;flex-direction:column;padding:6px 18px}
.gm-ev{display:flex;gap:12px;align-items:center;padding:13px 0;font-size:13.5px}
.gm-ev+.gm-ev{border-top:1px solid var(--gm-line)}
.gm-ev .ic{width:30px;height:30px;border-radius:50%;background:var(--surface-2);display:grid;place-items:center;color:var(--text-muted);font-size:14px;flex:none}
.gm-ev .tx{flex:1;min-width:0}
.gm-ev .n{margin-left:auto;font-family:var(--font-heading);font-size:13px;font-weight:600;white-space:nowrap}.gm-pos{color:var(--gm-ok)}.gm-neg{color:var(--gm-hp)}
.gm-set{display:flex;justify-content:space-between;align-items:center;gap:14px}
.gm-seg{display:flex;background:var(--surface-2);border-radius:999px;padding:3px;margin-top:10px}.gm-seg button{flex:1;font-family:var(--font-heading);font-weight:600;font-size:12.5px;border:0;background:none;color:var(--text-muted);padding:9px;border-radius:999px;cursor:pointer;transition:background var(--fast),color var(--fast)}.gm-seg button.on{background:var(--surface);color:var(--text);box-shadow:0 1px 3px rgba(0,0,0,.4)}
.gm-sep{height:1px;background:var(--gm-line);margin:18px 0}
.gm-note{background:rgba(63,151,206,.08);border-radius:14px;padding:12px 14px;font-size:12.5px;color:#8cc4e6}
#gm-money{margin-top:2px}

/* --- insignias (ALMAS) --- */
.gm-scroll{display:flex;gap:12px;overflow-x:auto;padding:2px 2px 8px;scrollbar-width:none}.gm-scroll::-webkit-scrollbar{display:none}
.gm-badge{flex:none;width:84px;text-align:center;font-size:11.5px;color:var(--text-muted)}.gm-badge .pic{width:68px;height:68px;margin:0 auto 6px}
.gm-badge.lock .pic{opacity:.4}
.gm-badge.b .gm-ph{border-color:#b9773c;color:#d79a5f}.gm-badge.s .gm-ph{border-color:#b9c0cf;color:#d5dae4}.gm-badge.gd .gm-ph{border-color:var(--gm-xp);color:var(--gm-xp)}

/* --- toasts y momentos --- */
.gm-toasts{position:fixed;top:calc(var(--top-h,48px) + 10px + env(safe-area-inset-top));left:0;right:0;z-index:2147483060;display:flex;flex-direction:column;align-items:center;gap:8px;pointer-events:none}
.gm-toast{pointer-events:auto;display:flex;gap:12px;align-items:center;background:rgba(30,32,37,.94);backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);border:1px solid var(--gm-line);border-radius:18px;padding:8px 18px 8px 8px;animation:gmin .35s cubic-bezier(.2,1.1,.4,1);max-width:92%;color:var(--text);box-shadow:0 14px 36px rgba(0,0,0,.5)}
.gm-toast .pic{width:42px;height:42px}
.gm-toast .xp{font-family:var(--font-heading);color:var(--gm-xp);font-weight:700;font-size:16px;letter-spacing:-.01em}
.gm-toast .gm-sub{font-size:12px}
@keyframes gmin{from{transform:translateY(-18px) scale(.96);opacity:0}}
body.gm-cr-open #modal-root .modal-overlay{z-index:2147483000}
.gm-fr .fr-card{position:relative;width:min(92vw,420px);height:min(86vh,720px);border-radius:22px;overflow:hidden;background-size:cover;background-position:center;background-color:#1a120d;box-shadow:0 20px 60px #000a;animation:frIn .6s ease-out}
.gm-fr .fr-veil{position:absolute;inset:0;background:linear-gradient(180deg,rgba(10,7,5,.15),rgba(10,7,5,.78) 70%)}
.gm-fr .fr-body{position:relative;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:8px;padding:22px 20px 20px;text-align:center;color:#f3e6cf}
.gm-fr .fr-k{font:600 11px var(--font-heading,system-ui);letter-spacing:.14em;text-transform:uppercase;color:#e9c97c}
.gm-fr .fr-pet{width:46%;aspect-ratio:1;margin-top:auto}.gm-fr .fr-pet img{width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 0 24px #ffb34788);animation:frBob 3s ease-in-out infinite alternate}
.gm-fr .fr-t{font:700 22px/1.2 var(--font-title,system-ui)}.gm-fr .fr-s{font-size:14px;opacity:.9}
.gm-fr .fr-g{display:flex;align-items:center;gap:10px;margin:6px 0 4px;text-align:left}.gm-fr .fr-g img{width:64px;height:auto;flex:none}.gm-fr .fr-say{font-size:14px;line-height:1.35}
.gm-fr .fr-ok{width:100%}
.gm-fr.quiet .fr-card,.gm-fr.quiet .fr-pet img{animation:none}
@keyframes frIn{from{opacity:0;transform:scale(.94)}to{opacity:1;transform:none}}@keyframes frBob{to{transform:translateY(-6px)}}
.gm-ar .ar-card{position:relative;width:min(92vw,420px);height:min(86vh,720px);border-radius:22px;overflow:hidden;background-size:cover;background-position:center;background-color:#1a1f33;box-shadow:0 20px 60px #000a;animation:arIn .5s ease-out}
.gm-ar .ar-card.ar-nobg{background-image:linear-gradient(180deg,#2a2f4a,#14101c)}
.gm-ar .ar-swap{position:absolute;inset:0;background-size:cover;background-position:center;opacity:0;transition:opacity 1.2s}
.gm-ar .ar-veil{position:absolute;inset:0;background:linear-gradient(180deg,rgba(8,8,16,.1),rgba(8,8,16,.8) 72%)}
.gm-ar .ar-body{position:relative;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:8px;padding:22px 20px 20px;text-align:center;color:#f3e6cf}
.gm-ar .ar-name{font:700 22px/1.2 var(--font-title,system-ui)}.gm-ar .ar-note{font-size:13px;opacity:.85}
.gm-ar .ar-pic{width:46%;aspect-ratio:1;margin-top:auto}.gm-ar .ar-pic .gm-sq,.gm-ar .ar-pic img{width:100%;height:100%;object-fit:contain}
.gm-ar .ar-x,.gm-arl .ar-x{position:absolute;top:10px;right:12px;z-index:3;background:rgba(0,0,0,.45);color:#fff;border:0;border-radius:50%;width:34px;height:34px;font-size:16px}
.gm-ar .ar-skip{position:absolute;top:12px;right:14px;z-index:3;background:none;border:0;color:#f3e6cf;opacity:.7;font-size:13px}
.gm-ar .ar-chip{font:600 11px var(--font-heading,system-ui);letter-spacing:.1em;text-transform:uppercase;color:#e9c97c;min-height:14px;opacity:0;transition:opacity .6s}
.gm-ar .ar-g{display:flex;align-items:center;gap:10px;text-align:left;width:100%;margin-top:6px}.gm-ar .ar-g img{width:64px;height:auto;flex:none}.gm-ar .ar-say{font-size:14px;line-height:1.35}
.gm-ar .gm-btn.w{width:100%}
.gm-arl .arl-card{position:relative;width:min(92vw,420px);max-height:86vh;overflow:auto;background:#17141f;color:#f3e6cf;border-radius:20px;padding:16px}
.gm-arl .arl-h{display:flex;justify-content:space-between;align-items:center;font-size:17px;padding-right:40px}.gm-arl .arl-s{font-size:12.5px;opacity:.75;margin:6px 0 12px}
.gm-arl .arl-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:12px}
.gm-arl .arl-t{position:relative;height:150px;border:0;border-radius:14px;overflow:hidden;background-size:cover;background-position:center;background-color:#222;color:#fff;text-align:left;padding:0}
.gm-arl .arl-t.ar-nobg{background-image:linear-gradient(180deg,#2a2f4a,#14101c)}
.gm-arl .arl-v{position:absolute;inset:0;background:linear-gradient(180deg,transparent 35%,rgba(0,0,0,.8))}
.gm-arl .arl-n{position:absolute;left:10px;right:10px;bottom:24px;font-size:13px;font-weight:700;line-height:1.2}.gm-arl .arl-p{position:absolute;left:10px;bottom:8px;font-size:12px;opacity:.85}
.gm-ar.quiet .ar-card,.gm-ar.quiet .ar-swap{animation:none;transition:none}
@keyframes arIn{from{opacity:0;transform:scale(.95)}to{opacity:1;transform:none}}
.almas-arenas{position:absolute;top:10px;left:10px;right:auto;z-index:3;display:inline-flex;align-items:center;gap:7px;height:38px;padding:0 13px 0 10px;border-radius:999px;cursor:pointer;background:rgba(11,12,24,.42);border:1px solid rgba(255,255,255,.10);color:var(--text-dim);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);font:600 13px var(--font-heading,system-ui)}
.almas-arenas svg{width:16px;height:16px}.almas-arenas:hover{background:rgba(11,12,24,.6);border-color:rgba(233,201,124,.35)}.almas-arenas:active{transform:scale(.97)}
.almas-arenas.pulse{animation:arPulse 1.1s ease-in-out 4;border-color:#e9c97c;color:#f3e6cf}
@keyframes arPulse{0%,100%{box-shadow:0 0 0 0 rgba(233,201,124,.0)}50%{box-shadow:0 0 0 8px rgba(233,201,124,.35)}}
.gm-ar .ar-mock{width:100%}.gm-ar .ar-mk-hero{position:relative;height:96px;border-radius:14px;background:linear-gradient(160deg,#4a3a2a,#1e1812);border:1px solid rgba(255,255,255,.12);overflow:hidden}
.gm-ar .ar-mk-pill{position:absolute;top:10px;left:10px;font:600 12px system-ui;padding:8px 12px;border-radius:999px;background:rgba(11,12,24,.6);border:1px solid #e9c97c;color:#f3e6cf;animation:arPulse 1.1s ease-in-out infinite}
.gm-ar .ar-mk-tr{position:absolute;top:10px;right:10px;width:70px;height:34px;border-radius:999px;background:rgba(11,12,24,.5);border:1px solid rgba(255,255,255,.1)}
.gm-ar .ar-mk-t{position:absolute;left:14px;bottom:10px;font:700 18px system-ui;color:#f3e6cf;opacity:.8}
.gm-modal{position:fixed;inset:0;z-index:2147482900;background:rgba(10,8,7,.74);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);display:grid;place-items:center;padding:20px;animation:gmf .25s}
.gm-modal.cine{background:radial-gradient(circle,rgba(154,109,222,.35),rgba(10,8,7,.96))}
.gm-modal .gm-card{max-width:380px;width:100%;text-align:center;animation:gmpop .4s cubic-bezier(.2,1.2,.4,1);padding:28px 24px 24px}
.gm-modal .gm-name{font-size:24px;margin-top:6px}
.gm-modal .gm-kicker{justify-content:center}
@keyframes gmpop{from{transform:scale(.9);opacity:0}}@keyframes gmf{from{opacity:0}}
body.gm-noanim .gm *,body.gm-noanim .gm-toast,body.gm-noanim .gm-modal *{animation:none!important}
@media (prefers-reduced-motion:reduce){.gm *,.gm-toast,.gm-modal *{animation:none!important;transition:none!important}}


.gm-ph{position:relative}
.gm-ph>img.gm-real{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;border-radius:0}
.gm-ph.has{background:none;border-color:transparent}
.gm-ph.has>*:not(img){display:none}
.gm-hero.frozen .gm-avatar .in{filter:hue-rotate(160deg) saturate(.7) brightness(1.05)}
@media (max-width:560px){.gm-q.row .gm-ibtn.go{display:none}}
/* ===== tablet ===== */
@media (min-width:640px){
  .gm-guards,.gm-streaks,.gm-bosses{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:420px){
  .gm-hero{padding:18px;gap:16px}.gm-avatar{width:104px;height:104px}.gm-avatar .in{inset:9px}
  .gm-stagename{font-size:21px;margin-bottom:10px}.gm-xpline .gm-num{font-size:24px}
  .gm-mtitle{font-size:21px}.gm-stat .v{font-size:21px}.gm-stat{padding:12px}
}

/* ===== portátil / escritorio: mismo ritmo que el resto de vistas (anchas, en rejilla) ===== */
@media (min-width:880px){
  .gm{max-width:1320px;padding:26px clamp(20px,3.2vw,52px) 140px}
  .gm-grid{grid-template-columns:repeat(12,minmax(0,1fr));gap:22px 22px;
    grid-template-areas:
      "hero  hero  hero  hero  hero  hero  hero  hero  hero  hero  hero  hero"
      "queue queue queue queue queue queue queue queue goal  goal  goal  goal"
      "habits habits habits habits habits habits habits habits habits habits habits habits"
      "boss  boss  boss  boss  boss  boss  boss  boss  boss  boss  boss  boss"
      "guard guard guard guard guard guard guard guard guard guard guard guard"
      "streak streak streak streak streak streak streak streak streak streak streak streak"
      "log   log   log   log   log   log   log   log   log   log   log   log"}
  .gm-a-hero{grid-area:hero}.gm-a-stats{grid-area:stats}.gm-a-goal{grid-area:goal}.gm-a-queue{grid-area:queue}
  .gm-a-habits{grid-area:habits}.gm-a-boss{grid-area:boss}.gm-a-guard{grid-area:guard}.gm-a-streak{grid-area:streak}.gm-a-log{grid-area:log}.gm-a-set{grid-area:set}
  .gm-a-alerts{grid-column:1/-1}
  .gm h2{margin-top:6px}
  .gm-hero{padding:30px 32px;gap:30px;height:100%}
  .gm-avatar{width:164px;height:164px}.gm-avatar .in{inset:13px}
  .gm-stagename{font-size:32px}.gm-xpline .gm-num{font-size:38px}
  .gm-stats{grid-template-columns:minmax(0,1fr);grid-template-rows:repeat(3,1fr);height:100%}
  .gm-stat{flex-direction:row;flex-wrap:wrap;align-items:center;gap:0 14px;padding:16px 20px}
  .gm-stat .l{flex:0 0 100%}.gm-stat .v{margin-top:2px;font-size:26px}.gm-stat .s{flex:1;text-align:right}
  .gm-stat .gm-bar{flex:0 0 100%;margin-top:9px}
  .gm-goal{flex-direction:column;align-items:stretch;gap:12px;justify-content:center}
  .gm-goal .gm-ring{margin:0 auto}
  .gm-bosses{grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}
  .gm-guards{grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
  .gm-streaks{grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
  .gm-q.main{padding:28px 30px}.gm-mtitle{font-size:28px}
  .gm-q.row{padding:14px 18px 14px 10px}
  .gm-act .gm-btn{flex:0 0 auto;min-width:200px}
  .gm-q.main .gm-rew{margin-top:16px}
  .gm-toasts{left:auto;right:28px;align-items:flex-end}
}
@media (min-width:1200px){
  .gm-grid{grid-template-areas:
      "hero  hero  hero  hero  hero  hero  hero  hero  hero  hero  hero  hero"
      "queue queue queue queue queue queue queue queue goal  goal  goal  goal"
      "habits habits habits habits habits habits habits habits habits habits habits habits"
      "boss  boss  boss  boss  boss  boss  boss  boss  boss  boss  boss  boss"
      "guard guard guard guard guard guard guard guard guard guard guard guard"
      "streak streak streak streak streak streak streak streak streak streak streak streak"
      "log   log   log   log   log   log   log   log   log   log   log   log"}
}


/* ===== Home compacta: Lvl + XP + Vida + Racha arriba, tareas justo debajo ===== */
.gm-hero{position:relative;padding:14px 16px;gap:14px;height:auto}
.gm-hero .gm-avatar{width:84px;height:84px;flex:0 0 auto}.gm-hero .gm-avatar .in{inset:7px}
.gm-lvl{font-size:12px;letter-spacing:.12em}
.gm-hero .gm-xpline .gm-num{font-size:22px}
.gm-vida{display:flex;justify-content:flex-end;align-items:baseline;margin:10px 0 5px;font-size:11px;color:var(--gm-hp);font-weight:500;letter-spacing:.02em}
.gm-vida .gm-vl{display:flex;align-items:center;gap:6px}.gm-vida .gm-vv{font-family:var(--font-heading);font-size:14px;font-weight:600;color:var(--text)}
.gm-vida .gm-vv{display:inline-flex;align-items:baseline;gap:6px}.gm-vida .gm-vv>svg,.gm-vida .gm-vv>.gm-ic{color:var(--gm-hp);align-self:center}
.gm-hero .gm-bar{height:5px}
.gm-hero .gm-bubble{margin:10px 0 0;font-size:13px}
.gm-racha{position:absolute;top:10px;right:12px;display:flex;align-items:center;gap:5px;padding:5px 10px;border-radius:999px;background:rgba(255,255,255,.05);color:var(--gm-fire);font-family:var(--font-heading);font-weight:700;font-size:16px;line-height:1}
.gm-racha .gm-ico{width:18px;height:18px}
@media (min-width:880px){.gm-hero{padding:16px 22px;gap:20px}.gm-hero .gm-avatar{width:96px;height:96px}.gm-hero .gm-xpline .gm-num{font-size:26px}.gm-racha{top:14px;right:18px}}

/* ===== batería de XP: pequeña y simple, debajo del personaje ===== */
.gm-av{display:flex;flex-direction:column;align-items:center;gap:8px;flex:none}
.gm-av .in{width:80px;height:80px;animation:gmbob 3.6s ease-in-out infinite}
.gm-hero.frozen .gm-av .in{filter:hue-rotate(160deg) saturate(.7) brightness(1.05)}
.gm-batt{display:flex;align-items:center;gap:2px}
.gm-batt .body{width:46px;height:14px;border-radius:5px;background:var(--surface-2);box-shadow:inset 0 0 0 2px rgba(255,255,255,.18);overflow:hidden}
.gm-batt .fill{display:block;height:100%;width:var(--to);background:var(--gm-xp);border-radius:3px;animation:gmbfill 1s var(--ease) both}
.gm-batt.up .fill{animation:gmbup 1.9s var(--ease) both}
.gm-batt .cap{width:3px;height:6px;border-radius:0 2px 2px 0;background:rgba(255,255,255,.3)}
.gm-batt.full .body{box-shadow:inset 0 0 0 2px rgba(255,255,255,.3),0 0 8px var(--gm-xp)}
@keyframes gmbfill{from{width:var(--from)}to{width:var(--to)}}
@keyframes gmbup{0%{width:var(--from)}45%{width:100%;filter:none}60%{width:100%;filter:brightness(1.8)}75%{width:100%;filter:none}100%{width:var(--to)}}
@media (prefers-reduced-motion:reduce){.gm-batt .fill,.gm-batt.up .fill{animation:none}}
@media (min-width:880px){.gm-av .in{width:96px;height:96px}.gm-batt .body{width:54px;height:16px}}
/* creatura más grande en Home SIN cambiar el diseño: misma posición, mismo reparto. Escala uniforme para todas las etapas
   (la diferencia entre evoluciones se conserva); solo cambia la pantalla de Inicio. */
.gm-hero .gm-av{position:relative;z-index:1}
.gm-hero .gm-av .in{scale:1.6;transform-origin:50% 50%;margin:24px 16px 18px}
/* Home creature: compress the stage-size curve so early stages fill the card (stage 0 .34→.62, stage 4 .40→.66, last stage stays 1.0). Other screens keep the original scale. */
.gm-hero .gm-av .gm-real{transform:scale(calc(.62 + (var(--s,.5) - .342) * .604))!important}
/* Arte de etapa: cuadrado 1024², criatura centrada (≈87 % del lienzo) → el centro de la caja es el centro de la criatura; nada anclado abajo. */
.gm-ph>img.gm-real{object-position:50% 50%;transform-origin:50% 50%;image-rendering:auto}
.gm-hero .gm-batt{margin-top:6px}
@media (min-width:880px){.gm-hero .gm-av .in{scale:1.5;margin:18px 14px 14px}}

/* ===== racha tocable + vista de calendario ===== */
button.gm-racha{border:0;cursor:pointer;font:inherit;font-family:var(--font-heading);font-weight:700;font-size:16px;-webkit-tap-highlight-color:transparent}
button.gm-racha:active{transform:scale(.95)}
.gm-modal.gm-sk .sk{width:min(420px,100%);max-height:calc(100vh - 24px);overflow:auto;padding:0;text-align:left}
.sk-top{position:relative;padding:18px 20px 16px;background:linear-gradient(160deg,#c97800,#e08a14);color:#fff;border-radius:var(--gm-rad) var(--gm-rad) 0 0}
.sk-x{position:absolute;top:12px;left:12px;width:32px;height:32px;border:0;border-radius:50%;background:rgba(0,0,0,.18);color:#fff;font-size:20px;line-height:1;cursor:pointer}
.sk-big{display:flex;align-items:center;gap:10px;margin-top:30px;font-family:var(--font-heading);font-weight:800;font-size:56px;line-height:1}
.sk-big .gm-ico{width:52px;height:52px;color:#fff}
.sk-lbl{font-size:20px;font-weight:700;margin-top:4px}.sk-best{font-size:12.5px;opacity:.85;margin-top:2px}
.sk-nav{display:flex;justify-content:space-between;align-items:center;padding:16px 18px 6px}
.sk-m{font-family:var(--font-heading);font-size:18px;font-weight:700}
.sk-n{width:34px;height:34px;border:0;border-radius:50%;background:var(--surface-2);color:var(--text);font-size:20px;cursor:pointer;margin-left:6px}.sk-n:disabled{opacity:.3;cursor:default}
.sk-stats{display:grid;grid-template-columns:1fr 1fr;gap:10px;padding:8px 18px}
.sk-stats div{border-radius:14px;padding:10px 12px;background:var(--surface-2);display:flex;flex-direction:column;gap:2px}
.sk-stats b{font-family:var(--font-heading);font-size:20px}.sk-stats span{font-size:11.5px;color:var(--text-muted)}
.sk-cal{padding:8px 14px 4px}
.sk-wd,.sk-g{display:grid;grid-template-columns:repeat(7,1fr)}
.sk-wd span{text-align:center;font-size:11px;font-weight:600;color:var(--text-muted);padding:4px 0}
.sk-d{position:relative;height:42px;display:grid;place-items:center}
.sk-d b{position:relative;z-index:1;width:34px;height:34px;border-radius:50%;display:grid;place-items:center;font-size:14px;font-weight:600;color:var(--text-muted)}
.sk-d.on b{background:#f4a62a;color:#2b1a00}
.sk-d.pz b{background:#3fa9e6;color:#04233a}
.sk-d.td b{box-shadow:0 0 0 2px var(--text)}
.sk-d.on.td b{box-shadow:0 0 0 2px #fff}
.sk-d.fu b{opacity:.55}
.sk-d.lk::before,.sk-d.ln::after{content:"";position:absolute;top:50%;height:34px;margin-top:-17px;background:rgba(244,166,42,.24)}
.sk-d.lk::before{left:-1px;right:50%}
.sk-d.ln::after{left:50%;right:-1px}
.sk-goal{padding:12px 18px 6px}
.sk-gb{display:flex;align-items:center;gap:10px;margin-top:8px;font-family:var(--font-heading);font-weight:700;font-size:14px}
.sk-bar{flex:1;height:10px;border-radius:6px;background:var(--surface-2);overflow:hidden}
.sk-bar i{display:block;height:100%;border-radius:6px;background:#f4a62a}
.gm-modal.gm-sk{touch-action:pan-y;overscroll-behavior:contain}
.gm-modal.gm-sk .sk{overflow-x:hidden;overflow-y:auto;touch-action:pan-y;box-sizing:border-box;max-width:100%}
.gm-modal.gm-sk .sk *{box-sizing:border-box;max-width:100%}
.gm-modal.gm-sk .sk .sk-close{display:block;margin:14px 18px 18px;width:calc(100% - 36px)}

/* ===== celebración de racha (primera tarea del día) ===== */
.gm-modal.gm-ce{touch-action:none;background:radial-gradient(circle at 50% 38%,rgba(240,146,74,.22),rgba(10,8,7,.96) 68%);transition:opacity .22s}
.gm-modal.gm-ce.out{opacity:0}
.gm-ce .ce{width:min(380px,100%);display:flex;flex-direction:column;align-items:center;text-align:center;color:var(--text);gap:6px}
.gm-ce .ce-step{display:flex;flex-direction:column;align-items:center;width:100%}.gm-ce .ce-step[hidden]{display:none}
.ce-bub{max-width:100%;padding:12px 16px;border-radius:16px;background:var(--surface);box-shadow:0 0 0 2px rgba(255,255,255,.12);font-size:15px;line-height:1.4;animation:cefade .5s .1s both}
.ce-fl{position:relative;margin:22px 0 4px;color:var(--gm-fire);animation:cepop .8s .25s cubic-bezier(.2,1.5,.4,1) both}
.ce-fl .gm-ico{width:120px;height:120px;filter:drop-shadow(0 0 22px rgba(240,146,74,.6))}
.ce-ring{position:absolute;left:50%;top:50%;width:120px;height:120px;margin:-60px 0 0 -60px;border-radius:50%;box-shadow:0 0 0 3px rgba(240,146,74,.55);animation:cering 1.2s .5s ease-out both}
.ce-n{font-family:var(--font-heading);font-weight:800;font-size:76px;line-height:1;color:var(--gm-fire)}
.ce-n .pop{display:inline-block;animation:cenum .5s cubic-bezier(.2,1.6,.4,1)}
.ce-l{font-family:var(--font-heading);font-size:24px;font-weight:700;color:var(--gm-fire);margin-bottom:18px}
.ce-strip{display:flex;justify-content:space-between;width:100%;padding:0 6px;animation:cefade .5s .6s both}
.ce-w{display:flex;flex-direction:column;align-items:center;gap:6px;font-size:12px;font-weight:600;color:var(--text-muted)}
.ce-w i{width:34px;height:34px;border-radius:50%;background:var(--surface-2);display:grid;place-items:center;font-style:normal;font-size:16px;font-weight:800;color:#2b1a00}
.ce-w i.on{background:#f4a62a}.ce-w i.pz{background:#3fa9e6;color:#04233a}
.ce-w i.td{box-shadow:0 0 0 2px #fff}.ce-w i.td.on{animation:cetd .6s 1.1s cubic-bezier(.2,1.6,.4,1) both}
.ce-ms{margin:10px 0 18px}.ce-cal{display:grid;place-items:center;width:120px;height:130px;border-radius:22px;background:#fff;border-top:30px solid #ef4444;font-style:normal;font-family:var(--font-heading);font-weight:800;font-size:52px;color:#ef4444;animation:cepop .8s .1s cubic-bezier(.2,1.5,.4,1) both}
.ce-t{font-family:var(--font-heading);font-size:22px;font-weight:700}.ce-s{font-size:14px;color:var(--text-dim);margin-top:6px;max-width:300px}
.gm-ce .ce-go{margin-top:26px;opacity:0;pointer-events:none;animation:cego .4s 1.4s forwards}
@keyframes cefade{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes cepop{from{opacity:0;transform:scale(.3)}to{opacity:1;transform:scale(1)}}
@keyframes cering{from{opacity:.9;transform:scale(.7)}to{opacity:0;transform:scale(2)}}
@keyframes cenum{from{transform:scale(.5)}to{transform:scale(1)}}
@keyframes cetd{from{transform:scale(0)}to{transform:scale(1)}}
@keyframes cego{to{opacity:1;pointer-events:auto}}
@media (prefers-reduced-motion:reduce){.ce-bub,.ce-fl,.ce-ring,.ce-strip,.ce-w i.td.on,.ce-cal,.ce-n .pop{animation:none}.gm-ce .ce-go{animation:none;opacity:1;pointer-events:auto}}

/* ===== tarea principal: late con un destello cada pocos segundos ===== */
.gm-q.main{overflow:hidden;border-color:rgba(240,170,80,.7);box-shadow:0 0 22px rgba(240,146,74,.18);animation:gmpulse 6s ease-out infinite}
.gm-q.main::after{content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;
  background:linear-gradient(110deg,transparent 38%,rgba(255,255,255,.18) 50%,transparent 62%) 120% 0/250% 100% no-repeat;animation:gmshine 6s ease-in-out infinite}
.gm-q.main .gm-act .gm-btn:first-child{animation:gmbtn 6s ease-in-out infinite}
@keyframes gmpulse{0%{border-color:rgba(240,170,80,.7);box-shadow:0 0 0 0 rgba(240,146,74,.55),0 0 22px rgba(240,146,74,.18)}
  7%{border-color:rgba(255,200,120,1);box-shadow:0 0 0 0 rgba(240,146,74,.55),0 0 46px rgba(240,146,74,.55)}
  32%,100%{border-color:rgba(240,170,80,.7);box-shadow:0 0 0 18px rgba(240,146,74,0),0 0 22px rgba(240,146,74,.18)}}
@keyframes gmshine{0%,2%{background-position:120% 0}24%,100%{background-position:-20% 0}}
@keyframes gmbtn{0%,18%,100%{transform:scale(1)}8%{transform:scale(1.07)}}
@keyframes gmbreathe{0%,100%{box-shadow:0 0 16px rgba(240,146,74,.14)}50%{box-shadow:0 0 30px rgba(240,146,74,.34)}}
.gm-invt{display:flex;align-items:center;gap:8px;margin-top:12px;font-size:13px;font-weight:600;color:var(--gm-fire)}
.gm-invt .gm-ico{width:16px;height:16px}
@keyframes gminvshine{from{background-position:120% 0}to{background-position:-20% 0}}
@keyframes gminvglow{0%{box-shadow:0 0 0 0 rgba(240,146,74,.45),0 0 26px rgba(240,146,74,.2)}100%{box-shadow:0 0 0 14px rgba(240,146,74,0),0 0 26px rgba(240,146,74,.2)}}
@keyframes gminvbtn{0%,100%{transform:scale(1)}50%{transform:scale(1.06)}}
/* movimiento reducido: sin barrido ni rebote, pero la tarea principal sigue respirando suave */
@media (prefers-reduced-motion:reduce){.gm-q.main{animation:gmbreathe 6s ease-in-out infinite}.gm-q.main::after,.gm-q.main .gm-act .gm-btn:first-child{animation:none}}
/* botón pequeño junto a la misión principal: abre al compañero para reprogramar */
.gm-q.main .gm-kicker{padding-right:84px}
.gm-agbtn{position:absolute;top:10px;right:50px;z-index:2;width:32px;height:32px;padding:0;border-radius:50%;display:grid;place-items:center;cursor:pointer;
  color:var(--gm-xp,#e9c97c);background:rgba(240,170,80,.12);border:1px solid rgba(240,170,80,.45);transition:background .15s,transform .15s}
.gm-agbtn:hover{background:rgba(240,170,80,.24)}.gm-agbtn:active{transform:scale(.92)}
.gm-agbtn:focus-visible{outline:2px solid var(--gm-xp,#e9c97c);outline-offset:2px}
.ag-head{flex-direction:column;align-items:flex-start;justify-content:center;gap:1px}

/* ===== días perfectos ===== */
.sk-stats{grid-template-columns:repeat(3,1fr)}
.sk-stats .pfst b{color:#ffd24a}
.sk-d.pf b{background:#f4a62a;color:#2b1a00;box-shadow:0 0 0 2px #191426,0 0 0 4px #ffd24a,0 0 14px 3px rgba(255,210,74,.65);animation:pfglow 2.2s ease-in-out infinite}
.sk-d .pfl{position:absolute;top:-1px;right:2px;z-index:2;width:15px;height:15px;color:#ffd24a;filter:drop-shadow(0 0 4px rgba(255,210,74,.9));font-style:normal;line-height:0}
.sk-d .pfl .gm-ico{width:15px;height:15px}
.ce-w i.pf{box-shadow:0 0 0 2px #191426,0 0 0 4px #ffd24a,0 0 10px 2px rgba(255,210,74,.6)}
button.gm-racha.pf{color:#ffd24a;box-shadow:0 0 0 2px #ffd24a,0 0 14px 2px rgba(255,210,74,.55);animation:pfglow 2.2s ease-in-out infinite}
@keyframes pfglow{0%,100%{filter:brightness(1)}50%{filter:brightness(1.25)}}
.gm-modal.gm-pf{touch-action:none;overflow:hidden;background:radial-gradient(circle at 50% 36%,rgba(255,210,74,.34),rgba(10,8,7,.97) 66%);animation:pfbg .9s ease-out,gmf .25s;transition:opacity .24s}
.gm-modal.gm-pf.out{opacity:0}
.pf-conf{position:absolute;inset:0;pointer-events:none;overflow:hidden}
.pf-conf i{position:absolute;top:-6%;border-radius:2px;background:var(--c);transform:rotate(var(--r));opacity:0;animation:pffall var(--du) var(--dl) linear infinite}
.gm-pf .pf{position:relative;z-index:1;width:min(380px,100%);display:flex;flex-direction:column;align-items:center;text-align:center;gap:8px;color:var(--text)}
.pf-fl{position:relative;width:170px;height:170px;display:grid;place-items:center;margin-bottom:6px;animation:pfpop 1s .1s cubic-bezier(.2,1.6,.35,1) both}
.pf-ico .gm-ico{width:128px;height:128px;color:#ffd24a;filter:drop-shadow(0 0 10px #ffb200) drop-shadow(0 0 30px rgba(255,210,74,.8)) drop-shadow(0 0 2px #fff);animation:pfwob 2.4s ease-in-out 1s infinite}
.pf-r{position:absolute;inset:6px;border-radius:50%;box-shadow:0 0 0 3px #ffd24a,0 0 22px rgba(255,210,74,.7);opacity:0;animation:pfring 2.2s ease-out infinite}
.pf-r.r2{animation-delay:.7s}.pf-r.r3{animation-delay:1.4s}
.pf-star{position:absolute;right:6px;top:8px;font-size:34px;color:#fff;text-shadow:0 0 12px #ffd24a,0 0 26px #ffb200;animation:pftwk 1.4s ease-in-out infinite}
.pf-t{font-family:var(--font-heading);font-weight:900;font-size:38px;letter-spacing:.02em;line-height:1.05;background:linear-gradient(100deg,#ffb200 20%,#fff6c8 45%,#ffd24a 55%,#ffb200 80%);background-size:250% 100%;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent;animation:pfshim 2.4s linear infinite,pfrise .6s .5s cubic-bezier(.2,1.5,.4,1) both;filter:drop-shadow(0 0 14px rgba(255,210,74,.55))}
.pf-s{font-size:14.5px;line-height:1.45;color:var(--text-dim);max-width:310px;animation:pfrise .5s .8s both}
.pf-rows{display:flex;flex-direction:column;gap:8px;width:100%;margin-top:6px}
.pf-r1w{display:flex;align-items:center;gap:12px;padding:11px 14px;border-radius:14px;background:rgba(255,210,74,.10);box-shadow:inset 0 0 0 1px rgba(255,210,74,.35);font-weight:600;font-size:15px;text-align:left;opacity:0;animation:pfrow .5s cubic-bezier(.2,1.5,.4,1) both}
.pf-r1w:nth-child(1){animation-delay:1s}.pf-r1w:nth-child(2){animation-delay:1.4s}.pf-r1w:nth-child(3){animation-delay:1.8s}
.pf-r1w span{width:24px;height:24px;border-radius:50%;background:#ffd24a;color:#2b1a00;display:grid;place-items:center;font-weight:900;font-size:14px;flex:none}
.pf-cnt{margin-top:8px;font-size:13px;color:var(--text-muted);animation:pfrise .5s 2.2s both}.pf-cnt b{color:#ffd24a;font-size:15px}
.gm-pf .pf-go{margin-top:14px;opacity:0;pointer-events:none;animation:cego .4s 2.4s forwards}
@keyframes pfbg{0%{filter:brightness(2.2)}100%{filter:none}}
@keyframes pffall{0%{opacity:0;transform:translateY(0) rotate(var(--r))}8%{opacity:1}100%{opacity:1;transform:translateY(112vh) rotate(calc(var(--r) + 540deg))}}
@keyframes pfpop{from{opacity:0;transform:scale(.2) rotate(-12deg)}to{opacity:1;transform:none}}
@keyframes pfwob{0%,100%{transform:scale(1) rotate(-2deg)}50%{transform:scale(1.06) rotate(2deg)}}
@keyframes pfring{0%{opacity:.9;transform:scale(.7)}100%{opacity:0;transform:scale(1.9)}}
@keyframes pftwk{0%,100%{transform:scale(.8) rotate(0)}50%{transform:scale(1.15) rotate(20deg)}}
@keyframes pfshim{to{background-position:-250% 0}}
@keyframes pfrise{from{opacity:0;transform:translateY(12px) scale(.9)}to{opacity:1;transform:none}}
@keyframes pfrow{from{opacity:0;transform:translateX(-18px) scale(.9)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){.gm-modal.gm-pf,.pf-fl,.pf-ico .gm-ico,.pf-r,.pf-star,.pf-t,.pf-s,.pf-r1w,.pf-cnt,.sk-d.pf b,button.gm-racha.pf{animation:none}.pf-r1w,.pf-s,.pf-cnt{opacity:1}.pf-r{display:none}.gm-pf .pf-go{animation:none;opacity:1;pointer-events:auto}}

/* ===== SECUENCIA DE RACHA (sc-) — escenas: llama · XP · misiones y cofres ===== */
.gm-modal.sc{display:block;padding:0;overflow:hidden;touch-action:manipulation;background:#0a0807;transition:opacity .3s}
.gm-modal.sc.out{opacity:0}
.sc-glow{position:absolute;left:50%;top:32%;width:150vmin;height:150vmin;margin:-75vmin 0 0 -75vmin;pointer-events:none;background:radial-gradient(closest-side,rgba(255,150,60,.5),rgba(255,110,30,.16) 45%,transparent 70%);opacity:0;transform:scale(.4);transition:opacity .7s,transform 1.6s cubic-bezier(.2,.9,.2,1)}
.sc.lit .sc-glow{opacity:1;transform:scale(1)}
.sc.shake{animation:scshake .45s}
@keyframes scshake{0%,100%{transform:none}15%{transform:translate(-7px,4px)}30%{transform:translate(6px,-5px)}45%{transform:translate(-5px,-3px)}60%{transform:translate(4px,4px)}80%{transform:translate(-2px,1px)}}
.sc-s{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:calc(28px + env(safe-area-inset-top,0px)) 22px calc(104px + env(safe-area-inset-bottom,0px));text-align:center;color:var(--text);opacity:0;transform:translateY(26px) scale(.98);pointer-events:none;transition:opacity .5s,transform .55s cubic-bezier(.2,.8,.2,1)}
.sc-s.on{opacity:1;transform:none;pointer-events:auto}
.sc-s.off{opacity:0;transform:translateY(-34px) scale(.96)}
.sc-skip{position:absolute;z-index:3;top:calc(14px + env(safe-area-inset-top,0px));right:16px;background:none;border:0;color:var(--text-muted);font:inherit;font-size:13px;padding:8px;cursor:pointer}
.sc-fl{position:relative;width:170px;height:170px;display:grid;place-items:center}
.sc-ico .gm-ico{width:150px;height:150px;color:#4b4037;transition:color .15s,filter .4s}
.sc-ico.hot .gm-ico{color:var(--gm-fire);filter:drop-shadow(0 0 14px rgba(255,150,60,.9)) drop-shadow(0 0 40px rgba(255,110,30,.6))}
.sc-ico.hot{animation:scslam .7s cubic-bezier(.2,1.5,.4,1),scflick 2.2s .7s ease-in-out infinite}
@keyframes scslam{0%{transform:scale(.55)}45%{transform:scale(1.4)}100%{transform:scale(1)}}
@keyframes scflick{0%,100%{transform:scale(1) rotate(-1.5deg)}50%{transform:scale(1.05) rotate(1.5deg)}}
.sc-num{height:1em;font-size:92px;line-height:1;overflow:hidden;font-family:var(--font-heading);font-weight:800;color:var(--gm-fire);filter:drop-shadow(0 0 12px rgba(255,140,50,.55)) drop-shadow(0 0 30px rgba(255,110,30,.28))}
/* el brillo va con filter (sigue la forma del número y sale de la caja); con text-shadow el overflow:hidden de la ruleta lo cortaba en un cuadrado */
.sc-col{display:flex;flex-direction:column;transition:transform .8s cubic-bezier(.2,1.35,.3,1)}
.sc-col span{height:1em;display:block}.sc-col.go{transform:translateY(-1em)}
.sc-num.pop{animation:scnum .5s cubic-bezier(.2,1.6,.4,1)}
@keyframes scnum{from{transform:scale(.8)}to{transform:none}}
.sc-lab{font-family:var(--font-heading);font-weight:700;font-size:26px;color:var(--gm-fire);margin-top:-2px;opacity:0;transform:translateY(8px);transition:.5s}
.sc-lab.show,.sc-wk.show{opacity:1;transform:none}
.sc-wk{display:flex;justify-content:space-between;width:min(380px,100%);margin-top:26px;opacity:0;transform:translateY(14px);transition:.6s}
.sc-d{display:flex;flex-direction:column;align-items:center;gap:7px;font-size:12px;font-weight:600;color:var(--text-muted)}
.sc-d.td span{color:var(--gm-fire)}
.sc-d u{position:relative;overflow:hidden;width:40px;height:40px;border-radius:50%;background:rgba(255,255,255,.07);display:grid;place-items:center;text-decoration:none}
.sc-d u i{position:absolute;inset:0;background:#f4a62a;transform:scaleY(0);transform-origin:50% 100%;transition:transform .45s cubic-bezier(.3,1.2,.4,1)}
.sc-d.pz u i{background:#3fa9e6}.sc-d.pf u{box-shadow:0 0 0 2px #191426,0 0 0 4px #ffd24a}
.sc-d u b{position:relative;font-size:17px;font-weight:900;color:#2b1a00;opacity:0;transform:scale(.3);transition:.3s .2s}
.sc-d.fill u i{transform:scaleY(1)}.sc-d.fill u b{opacity:1;transform:none}
.sc-d.big u{animation:scbig .7s cubic-bezier(.2,1.6,.4,1) both;box-shadow:0 0 0 3px #fff,0 0 26px 4px rgba(255,170,70,.8)}
@keyframes scbig{0%{transform:scale(1)}40%{transform:scale(1.5)}100%{transform:scale(1.18)}}
.sc-bub{min-height:52px;margin-top:20px;max-width:330px;padding:13px 18px;border-radius:16px;background:var(--surface);box-shadow:0 0 0 2px rgba(255,255,255,.1);font-size:15px;line-height:1.4;opacity:0;transform:translateY(10px);transition:.4s}
.sc-bub.show{opacity:1;transform:none}
.sc-sp{position:absolute;z-index:2;width:7px;height:7px;margin:-3px;border-radius:50%;background:var(--c,#ffb44a);box-shadow:0 0 9px var(--c,#ffb44a);pointer-events:none;animation:scsp 1s cubic-bezier(.1,.7,.3,1) forwards}
@keyframes scsp{to{transform:translate(var(--x),var(--y)) scale(.1);opacity:0}}
.sc-wv{position:absolute;z-index:1;width:120px;height:120px;margin:-60px;border-radius:50%;border:3px solid rgba(255,170,70,.85);pointer-events:none;animation:scwv 1.1s ease-out forwards}
@keyframes scwv{from{transform:scale(.3);opacity:1}to{transform:scale(4.5);opacity:0}}
.sc-em{position:absolute;bottom:-10px;width:4px;height:4px;border-radius:50%;background:#ffb44a;box-shadow:0 0 6px #ff8a2a;pointer-events:none;animation:scem 3.4s linear forwards}
@keyframes scem{0%{opacity:0;transform:translate(0,0)}15%{opacity:.9}100%{opacity:0;transform:translate(var(--x),-100vh)}}
.sc-cf{position:absolute;z-index:2;top:-4%;border-radius:2px;background:var(--c);pointer-events:none;animation:scfall var(--du) var(--dl) linear forwards}
@keyframes scfall{from{transform:translateY(0) rotate(0)}to{transform:translateY(112vh) rotate(720deg)}}
.sc-ms{display:grid;place-items:center;width:150px;height:164px;border-radius:26px;background:#fff;border-top:38px solid #ef4444;font-family:var(--font-heading);font-weight:800;font-size:66px;color:#ef4444;box-shadow:0 0 50px rgba(255,150,60,.5)}
.sc-s.on .sc-ms{animation:scslam .8s cubic-bezier(.2,1.5,.4,1)}
.sc-t{font-family:var(--font-heading);font-size:24px;font-weight:700;margin-top:16px}.sc-sub{font-size:14px;color:var(--text-dim);max-width:310px;min-height:20px}
.sc-k{font-size:16px;color:var(--text-dim)}
.sc-xp{font-family:var(--font-heading);font-weight:800;font-size:88px;line-height:1;color:var(--gm-xp,#e9c97c);text-shadow:0 0 30px rgba(240,170,80,.4)}
.sc-xp small{font-size:30px;margin-left:6px}
.sc-lvl{display:flex;align-items:center;gap:12px;width:min(380px,100%);margin-top:22px;font-weight:700;font-size:14px;color:var(--text-dim)}
.sc-bar,.sc-qb{position:relative;flex:1;height:16px;border-radius:9px;background:rgba(255,255,255,.09);overflow:hidden}
.sc-bar b,.sc-qb b{position:absolute;inset:0 auto 0 0;width:0;border-radius:9px;background:linear-gradient(90deg,#f0924a,#ffc36b)}
.sc-qb em{position:absolute;inset:0;display:grid;place-items:center;font-style:normal;font-size:11px;font-weight:800;color:#fff;text-shadow:0 1px 2px rgba(0,0,0,.5)}
.sc-card{width:min(400px,100%);border-radius:22px;background:rgba(255,255,255,.04);box-shadow:inset 0 0 0 1px rgba(255,255,255,.09);text-align:left}
.sc-q{display:grid;grid-template-columns:1fr 56px;column-gap:10px;align-items:center;padding:14px 16px;border-top:1px solid rgba(255,255,255,.07)}
.sc-q:first-child{border-top:0}
.sc-qt{grid-column:1;font-weight:700;font-size:15px;margin-bottom:8px}
.sc-qb{grid-column:1;grid-row:2}.sc-ch{grid-column:2;grid-row:1/4;width:56px;height:52px;filter:grayscale(1) brightness(.6);opacity:.55;transition:filter .4s,opacity .4s}
.sc-ch.rdy{filter:none;opacity:1;animation:scjig 1.6s ease-in-out infinite}
.sc-ch.open{animation:none}
@keyframes scjig{0%,60%,100%{transform:none}70%{transform:rotate(-8deg) scale(1.08)}80%{transform:rotate(8deg) scale(1.08)}90%{transform:rotate(-4deg)}}
.sc-ch .lid{transform-box:fill-box;transform-origin:0 100%;transition:transform .5s cubic-bezier(.3,1.6,.5,1)}.sc-ch.open .lid{transform:rotate(-42deg)}
.sc-ch .gl{opacity:0;transition:opacity .4s}.sc-ch.open .gl{opacity:1}
.sc-qr{grid-column:1;grid-row:3;font-size:12px;font-weight:700;color:#ffd24a;max-height:0;opacity:0;overflow:hidden;transition:.4s}.sc-qr.show{max-height:24px;opacity:1;margin-top:7px}
.sc-mo{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:14px 18px;margin-top:12px}
.sc-mo .sc-qt{margin:0 0 6px}.sc-mo .gm-ico{width:34px;height:34px;color:var(--gm-fire)}
.sc-ft{position:absolute;left:0;right:0;bottom:calc(22px + env(safe-area-inset-bottom,0px));display:flex;justify-content:center;padding:0 22px;z-index:3}
.sc-go{width:min(400px,100%);opacity:0;transform:translateY(14px);pointer-events:none;transition:opacity .35s,transform .35s}.sc-go.rdy{opacity:1;transform:none;pointer-events:auto}
@media (max-height:700px){.sc-num{font-size:72px}.sc-fl{width:130px;height:130px}.sc-ico .gm-ico{width:116px;height:116px}.sc-wk{margin-top:14px}}
@media (prefers-reduced-motion:reduce){.sc-ico.hot,.sc.shake,.sc-ch.rdy,.sc-d.big u,.sc-s.on .sc-ms{animation:none}.sc-col,.sc-d u i,.sc-s{transition-duration:.01s}}
.cf-fx summary{cursor:pointer;list-style:none}.cf-fx summary::-webkit-details-marker{display:none}.cf-fx summary::after{content:" ▾";opacity:.7}.cf-fx[open] summary::after{content:" ▴"}
/* barras de desplazamiento con el tema: respaldo global. Las que ya se ocultan a propósito siguen ocultas (sus reglas son más específicas). */
*{scrollbar-width:thin;scrollbar-color:rgba(233,201,124,.38) transparent}
*::-webkit-scrollbar{width:8px;height:8px}
*::-webkit-scrollbar-track{background:transparent}
*::-webkit-scrollbar-thumb{background:rgba(233,201,124,.34);border-radius:8px;border:2px solid transparent;background-clip:padding-box}
*::-webkit-scrollbar-thumb:hover{background:rgba(233,201,124,.62);border:2px solid transparent;background-clip:padding-box}
*::-webkit-scrollbar-corner{background:transparent}
