/* Hub · claro y minimal (Notion/Linear), con modo oscuro automático */
:root {
  --bg: #F7F7F5;
  --surface: #FFFFFF;
  --surface-2: #F2F2EF;
  --surface-3: #E6E6E2;
  --line: #E8E8E4;
  --line-strong: #D6D6D1;
  --text: #1C1C1B;
  --muted: #6B6B66;
  --faint: #9C9C96;
  --ink: #1C1C1B;
  --ink-text: #FFFFFF;
  --ink2: #8A8A85;
  --accent: #5B6CFF;
  --accent-bg: #ECEEFF;
  --focus: rgba(91, 108, 255, .32);
  --ok: #1F8A5B; --ok-bg: #E4F3EB;
  --warn: #A3620B; --warn-bg: #FBF0DD;
  --bad: #C8372F; --bad-bg: #FCE8E6;
  --green: #1F9D6B; --green-2: #8ED1B3; --green-bg: #E3F4EC;
  --pink: #D63F77; --pink-bg: #FBE6EE;
  --blue: #3A63D8; --blue-2: #C3D0F3; --blue-bg: #E7EDFC;
  --p1: #3A8DDE; --p2: #E08A1E; --p3: #D9433A;
  --shadow: 0 1px 2px rgba(20, 20, 18, .04), 0 1px 1px rgba(20, 20, 18, .02);
  --shadow-md: 0 6px 20px -8px rgba(20, 20, 18, .14);
  --shadow-lg: 0 24px 60px -16px rgba(20, 20, 18, .3);
  --r: 10px;
  --r-lg: 16px;
  --font: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101010;
    --surface: #18181A;
    --surface-2: #212123;
    --surface-3: #2E2E31;
    --line: #27272A;
    --line-strong: #37373B;
    --text: #EDEDEA;
    --muted: #A3A39E;
    --faint: #6E6E6A;
    --ink: #EDEDEA;
    --ink-text: #111110;
    --ink2: #8C8C88;
    --accent: #8C99FF;
    --accent-bg: rgba(140, 153, 255, .14);
    --focus: rgba(140, 153, 255, .4);
    --ok: #5CC995; --ok-bg: rgba(92, 201, 149, .13);
    --warn: #E8B35A; --warn-bg: rgba(232, 179, 90, .13);
    --bad: #F07B73; --bad-bg: rgba(240, 123, 115, .13);
    --green: #5CC995; --green-2: #2F6E52; --green-bg: rgba(92, 201, 149, .13);
    --pink: #F27BA6; --pink-bg: rgba(242, 123, 166, .13);
    --blue: #86A4FF; --blue-2: #34477E; --blue-bg: rgba(127, 160, 255, .13);
    --p1: #6AAEF0; --p2: #F0A84A; --p3: #F07B73;
    --shadow: none;
    --shadow-md: 0 6px 20px -8px rgba(0, 0, 0, .6);
    --shadow-lg: 0 24px 60px -16px rgba(0, 0, 0, .8);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; font-feature-settings: 'ss01', 'cv11'; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 28px; line-height: 1.15; font-weight: 600; letter-spacing: -.025em; }
h2 { font-size: 14.5px; font-weight: 600; letter-spacing: -.01em; }
h3 { font-size: 13px; font-weight: 600; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
code, .mono { font-family: var(--mono); font-size: 12.5px; }
small, .small { font-size: 12px; }
kbd { font: 500 11px/1 var(--mono); padding: 3px 5px; border-radius: 5px; border: 1px solid var(--line-strong); border-bottom-width: 2px; background: var(--surface); color: var(--muted); }
.muted { color: var(--muted); }
.hint { color: var(--faint); font-size: 12px; }
.grow { flex: 1; }
.warn-t { color: var(--warn); }
.up-t { color: var(--ok); } .down-t { color: var(--bad); } .accent-t { color: var(--accent); }
.danger-t { color: var(--bad) !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 99; background: var(--ink); color: var(--ink-text); padding: 8px 12px; border-radius: 8px; }
.skip:focus { left: 8px; }
.num, .kpi-v, .big-num strong, .cd-days, .wx-t, .mini-grid b, .stat-grid b, .hb-stats b { font-variant-numeric: tabular-nums; }

.ic { width: 18px; height: 18px; flex: none; }
.ic.ext { width: 13px; height: 13px; color: var(--faint); }
.ic.lg { width: 26px; height: 26px; }
.ic.xl { width: 34px; height: 34px; color: var(--faint); }

.mark { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; background: var(--ink); color: var(--ink-text); font: 600 11px/1 var(--font); letter-spacing: -.02em; }
.dot { width: 8px; height: 8px; border-radius: 3px; flex: none; background: currentColor; display: inline-block; }
.tone-green { color: var(--green); } .tone-pink { color: var(--pink); } .tone-blue { color: var(--blue); }
.tone-ink { color: var(--ink); } .tone-ink2 { color: var(--ink2); }

/* ---------- botones y campos ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); font: 500 13.5px/1 var(--font); cursor: pointer; transition: background .15s, border-color .15s, opacity .15s, transform .1s; white-space: nowrap; }
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--ink); border-color: var(--ink); color: var(--ink-text); }
.btn.primary:hover { opacity: .88; }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.block { width: 100%; height: 40px; }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12.5px; border-radius: 8px; }
.btn:disabled { opacity: .5; cursor: progress; }
.btn .ic { width: 16px; height: 16px; }
.btn-group { display: inline-flex; align-items: center; gap: 2px; }
.icon-btn { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; border: 0; background: transparent; color: var(--muted); cursor: pointer; flex: none; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn.on { color: var(--accent); background: var(--accent-bg); }
.icon-btn.sm { width: 26px; height: 26px; }
.icon-btn.sm .ic { width: 15px; height: 15px; }
.link { border: 0; background: none; padding: 0; color: var(--muted); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; display: inline-flex; align-items: center; gap: 4px; }
.link:hover { color: var(--text); }
.link .ic { width: 13px; height: 13px; }
.link-s { color: var(--muted); font-size: 12.5px; font-weight: 500; display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
.link-s:hover { color: var(--text); }

.form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field > span, .field > legend { font-size: 12.5px; font-weight: 500; color: var(--muted); }
.field small { color: var(--faint); }
input:not([type=checkbox]):not([type=radio]), select, textarea { width: 100%; min-height: 38px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--surface); color: var(--text); font: 400 14px var(--font); transition: border-color .15s, box-shadow .15s; }
textarea { padding: 10px 12px; resize: vertical; line-height: 1.5; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239C9C96' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 30px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--focus); }
input.otp { font: 500 22px/1 var(--mono); letter-spacing: .25em; text-align: center; height: 52px; }
input[type=date], input[type=time] { font-family: var(--font); }
.title-in { border: 0 !important; box-shadow: none !important; padding: 0 !important; font: 600 20px/1.3 var(--font) !important; letter-spacing: -.015em; background: transparent !important; }
fieldset { margin: 0; padding: 0; border: 0; display: grid; gap: 10px; min-width: 0; }
legend { padding: 0; margin-bottom: 8px; font-weight: 600; font-size: 13.5px; display: flex; gap: 8px; align-items: center; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.check { display: flex; gap: 8px; align-items: center; font-size: 13.5px; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--ink); margin: 0; }
.seg { display: inline-flex; background: var(--surface-2); border-radius: 9px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg label { cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 11px; border-radius: 7px; font-size: 12.5px; font-weight: 500; color: var(--muted); }
.seg input:checked + span { background: var(--surface); color: var(--text); box-shadow: var(--shadow), 0 0 0 1px var(--line); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); }
.seg .ic { width: 14px; height: 14px; }
.seg .p1 .ic { color: var(--p1); } .seg .p2 .ic { color: var(--p2); } .seg .p3 .ic { color: var(--p3); }
.seg.sm span { height: 24px; padding: 0 9px; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.sw { position: relative; cursor: pointer; }
.sw input { position: absolute; opacity: 0; }
.sw span { display: block; width: 26px; height: 26px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 2px var(--surface); border: 2px solid transparent; }
.sw.none span { background: repeating-linear-gradient(45deg, var(--surface-2) 0 4px, var(--surface-3) 4px 8px); }
.sw input:checked + span { border-color: var(--c); }
.sw input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.days-pick, .space-pick { display: flex; gap: 6px; flex-wrap: wrap; }
.days-pick label { cursor: pointer; }
.days-pick input { position: absolute; opacity: 0; }
.days-pick span { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line-strong); font-weight: 600; font-size: 13px; color: var(--muted); }
.days-pick input:checked + span { background: var(--ink); color: var(--ink-text); border-color: var(--ink); }
.days-pick input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.space-pick { display: grid; gap: 8px; }

.tag { font: 500 11px/1 var(--font); padding: 4px 7px; border-radius: 99px; background: var(--surface-2); color: var(--muted); }
.badge { margin-left: auto; font: 500 10.5px/1 var(--font); padding: 3px 6px; border-radius: 5px; background: var(--surface-2); color: var(--faint); }
.pill { display: inline-flex; align-items: center; gap: 5px; font: 500 12px/1 var(--font); padding: 5px 9px; border-radius: 99px; background: var(--surface-2); color: var(--muted); white-space: nowrap; width: max-content; }
.pill .ic { width: 14px; height: 14px; }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.bad { background: var(--bad-bg); color: var(--bad); }
.note { padding: 10px 12px; border-radius: 8px; font-size: 13px; margin-bottom: 16px; }
.note.ok { background: var(--ok-bg); color: var(--ok); }
.note.err { background: var(--bad-bg); color: var(--bad); }
.delta { font-size: 12px; font-weight: 500; white-space: nowrap; font-variant-numeric: tabular-nums; }
.delta.up { color: var(--ok); } .delta.down { color: var(--bad); } .delta.flat { color: var(--faint); }

/* ---------- acceso ---------- */
body.auth { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.auth-wrap { width: 100%; max-width: 400px; display: grid; gap: 20px; }
.auth-brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; justify-self: center; }
.auth-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px; box-shadow: var(--shadow); }
.auth-card h1 { font-size: 21px; margin-bottom: 6px; }
.auth-card .sub { color: var(--muted); margin-bottom: 22px; }
.auth-card fieldset + fieldset { padding-top: 16px; border-top: 1px solid var(--line); }
.auth-card .back { margin-top: 16px; text-align: center; font-size: 13px; }
.auth-foot { text-align: center; color: var(--faint); font-size: 12px; }
.auth:has(.auth-card fieldset) .auth-wrap { max-width: 480px; }
.qr { width: 188px; height: 188px; margin: 0 auto 14px; padding: 6px; background: #fff; border-radius: 10px; border: 1px solid var(--line); }
.qr svg { width: 100%; height: 100%; display: block; }
.secret { margin-bottom: 18px; font-size: 12.5px; color: var(--muted); text-align: center; }
.secret summary { cursor: pointer; }
.secret code { display: block; margin-top: 8px; padding: 8px; background: var(--surface-2); border-radius: 6px; word-break: break-all; color: var(--text); }
.tempcard { margin-bottom: 20px; padding: 14px; border: 1px dashed var(--line-strong); border-radius: 10px; background: var(--surface-2); font-size: 13px; }
.tempcard dl, .cred { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 10px 0 0; align-items: center; }
.tempcard dt, .cred dt { color: var(--muted); font-size: 12.5px; }
.tempcard dd, .cred dd { margin: 0; display: flex; gap: 6px; align-items: center; min-width: 0; }
.tempcard code, .cred code { color: var(--text); word-break: break-all; }

/* ---------- estructura ---------- */
.shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
.side { position: sticky; top: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column; gap: 6px; padding: 14px 10px; border-right: 1px solid var(--line); background: var(--bg); z-index: 20; }
.side-top { display: flex; align-items: center; justify-content: space-between; padding: 2px 8px 8px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14.5px; }
.menu-btn { display: none; }
.nav { flex: 1; overflow-y: auto; display: grid; align-content: start; gap: 16px; padding: 0 2px; }
.nav-search { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); color: var(--faint); font-size: 13px; cursor: pointer; box-shadow: var(--shadow); }
.nav-search:hover { border-color: var(--line-strong); color: var(--muted); }
.nav-search .ic { width: 16px; height: 16px; }
.nav-search kbd { margin-left: auto; font-size: 10px; }
.nav-group { display: grid; gap: 1px; }
.nav-label { padding: 0 10px 6px; font-size: 11.5px; font-weight: 500; color: var(--faint); }
.nav-item { display: flex; align-items: center; gap: 10px; height: 32px; padding: 0 10px; border-radius: 8px; color: var(--muted); font-weight: 500; font-size: 13.5px; transition: background .12s, color .12s; }
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow), inset 0 0 0 1px var(--line); }
.nav-item .dot { margin: 0 5px; }
.nav-item .ic.ext { margin-left: auto; opacity: 0; transition: opacity .12s; }
.nav-item:hover .ic.ext { opacity: 1; }
.nav-count { margin-left: auto; font: 600 11px/1 var(--font); font-style: normal; min-width: 19px; height: 19px; display: grid; place-items: center; padding: 0 5px; border-radius: 99px; background: var(--surface-3); color: var(--muted); }
.nav-count.bad { background: var(--bad); color: #fff; }
.side-foot { border-top: 1px solid var(--line); padding-top: 10px; }
.me { display: flex; align-items: center; gap: 10px; padding: 4px 4px 0 6px; }
.me-txt { flex: 1; min-width: 0; display: grid; line-height: 1.25; }
.me-txt strong { font-weight: 500; font-size: 13.5px; }
.me-txt span { font-size: 12px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; }
.me form { margin: 0; }
.av { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; flex: none; background: var(--c); color: #fff; font: 600 11px/1 var(--font); }
.av.lg { width: 44px; height: 44px; font-size: 15px; }
.av.xs { width: 18px; height: 18px; font-size: 8.5px; }

.content { min-width: 0; outline: none; }
.page { max-width: 1040px; margin: 0 auto; padding: 40px 40px 72px; display: grid; gap: 28px; align-content: start; }
.page.wide { max-width: 1280px; }
.page-head { display: grid; gap: 6px; }
.page-head .muted { max-width: 64ch; }
.row-head { grid-template-columns: 1fr auto; align-items: end; gap: 16px; }
.eyebrow { color: var(--muted); font-size: 13px; }
.block { display: grid; gap: 12px; }
.block-head { display: flex; align-items: center; justify-content: space-between; }
.block-head h2 { font-size: 13px; color: var(--muted); font-weight: 500; }
.grid { display: grid; gap: 14px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px 20px; box-shadow: var(--shadow); display: grid; gap: 12px; align-content: start; min-width: 0; }
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; gap: 8px; min-height: 26px; }
.card-head h2 { display: flex; align-items: center; gap: 8px; margin-right: auto; }
.card-head h2 .ic { color: var(--faint); width: 17px; height: 17px; }
.card-head .count { font: 600 12px var(--font); color: var(--muted); font-variant-numeric: tabular-nums; }
.list-h { font-size: 11.5px; font-weight: 600; color: var(--faint); text-transform: uppercase; letter-spacing: .05em; margin-top: 4px; }
.label { display: block; font-size: 11.5px; font-weight: 500; color: var(--faint); }
.empty-line { display: flex; align-items: center; gap: 8px; color: var(--faint); font-size: 13px; padding: 6px 0; }
.empty-line .ic { width: 16px; height: 16px; }
.empty-mini { display: grid; gap: 10px; justify-items: start; color: var(--muted); font-size: 13px; }
.empty-state { justify-items: center; text-align: center; padding: 56px 24px; gap: 16px; }
.empty-state p { color: var(--muted); max-width: 46ch; }
.all-clear { display: flex; align-items: center; gap: 12px; padding: 18px 4px; color: var(--muted); }
.skel { border-radius: 10px; background: linear-gradient(90deg, var(--surface-2) 0, var(--surface-3) 40%, var(--surface-2) 80%); background-size: 300% 100%; animation: skel 1.4s ease infinite; }
@keyframes skel { from { background-position: 100% 0; } to { background-position: -50% 0; } }
.foot-note { color: var(--faint); font-size: 12px; text-align: center; display: flex; justify-content: center; gap: 4px; align-items: center; }
.foot-note .link { color: var(--faint); }

/* ---------- inicio ---------- */
.hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.hero-txt { display: grid; gap: 6px; }
.brief { color: var(--muted); font-size: 15px; max-width: 62ch; }
.brief strong { color: var(--text); font-weight: 600; }
.search-btn { display: flex; align-items: center; gap: 10px; height: 40px; width: 260px; padding: 0 12px; border-radius: 11px; border: 1px solid var(--line); background: var(--surface); color: var(--faint); cursor: pointer; box-shadow: var(--shadow); flex: none; }
.search-btn:hover { border-color: var(--line-strong); color: var(--muted); }
.search-btn span { flex: 1; text-align: left; font-size: 13.5px; }
.focus { display: flex; align-items: center; gap: 10px; padding: 0 14px; height: 46px; border-radius: 12px; border: 1px dashed var(--line-strong); background: transparent; cursor: text; transition: border-color .15s, background .15s; }
.focus.set { border-style: solid; border-color: var(--line); background: var(--surface); box-shadow: var(--shadow); }
.focus:focus-within { border-color: var(--accent); border-style: solid; }
.focus .ic { color: var(--accent); }
.focus-l { font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.focus input { border: 0 !important; box-shadow: none !important; background: transparent !important; padding: 0 !important; min-height: 0; height: 100%; font-size: 14.5px; font-weight: 500; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.kpi { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 10px; row-gap: 2px; padding: 15px 16px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); min-width: 0; overflow: hidden; transition: border-color .15s, transform .15s, box-shadow .15s; }
a.kpi:hover { border-color: var(--line-strong); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.kpi-l { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); font-weight: 500; }
.kpi-v { font-size: 25px; font-weight: 600; letter-spacing: -.025em; line-height: 1.25; margin-top: 4px; }
.kpi-v small { font-size: 13px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.kpi-s { font-size: 12px; display: flex; gap: 4px; align-items: center; min-width: 0; white-space: nowrap; overflow: hidden; }
.kpi > :not(.kpi-chart) { grid-column: 1; }
.kpi-chart { grid-column: 2; grid-row: 2 / span 2; align-self: end; opacity: .9; }
.kpi > .kpi-l { grid-column: 1 / -1; }
.kpi-l { overflow: hidden; white-space: nowrap; }
.kpi-chart .ic { color: var(--surface-3); }

.bento { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.col { display: grid; gap: 14px; }
.quick { position: relative; display: flex; align-items: center; gap: 8px; padding: 0 12px; min-height: 42px; border-radius: 11px; background: var(--surface-2); border: 1px solid transparent; transition: border-color .15s, background .15s; flex-wrap: wrap; }
.quick:focus-within { background: var(--surface); border-color: var(--accent); box-shadow: 0 0 0 3px var(--focus); }
.quick-ic { color: var(--faint); display: grid; }
.quick input { flex: 1; min-width: 180px; border: 0 !important; box-shadow: none !important; background: transparent !important; padding: 0 !important; min-height: 40px; }
.quick-hint { display: flex; gap: 6px; flex-wrap: wrap; }
.quick-hint span { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 500; padding: 3px 7px; border-radius: 6px; background: var(--accent-bg); color: var(--accent); }
.quick-hint .ic { width: 12px; height: 12px; }
.quick.big { min-height: 46px; }

.items { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.it { display: flex; align-items: flex-start; gap: 10px; padding: 6px 6px; border-radius: 9px; transition: background .12s; }
.it:hover { background: var(--surface-2); }
.it-main { flex: 1; min-width: 0; display: grid; gap: 1px; text-align: left; background: none; border: 0; padding: 1px 0; cursor: pointer; }
.it-title { font-size: 13.5px; font-weight: 500; line-height: 1.35; overflow-wrap: anywhere; display: inline-flex; align-items: center; gap: 5px; }
.it-sub { display: flex; flex-wrap: wrap; gap: 4px 8px; font-size: 12px; color: var(--muted); align-items: center; }
.it-sub > span:not(.tag-src):not(:first-child)::before { content: '·'; margin-right: 8px; color: var(--faint); }
.it-sub .it-when + span::before { content: '·'; }
.it-when { font-variant-numeric: tabular-nums; }
.it.ev { box-shadow: inset 3px 0 0 var(--ec, var(--ink)); border-radius: 0 9px 9px 0; padding-left: 10px; }
.tag-src { font-size: 10.5px; font-weight: 600; padding: 1px 6px; border-radius: 5px; background: var(--surface-2); }
.tag-src.tone-green { background: var(--green-bg); } .tag-src.tone-pink { background: var(--pink-bg); } .tag-src.tone-blue { background: var(--blue-bg); }
.src-dot { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; flex: none; margin-top: 1px; }
.src-dot .ic { width: 13px; height: 13px; }
.src-dot.tone-green { background: var(--green-bg); } .src-dot.tone-pink { background: var(--pink-bg); } .src-dot.tone-blue { background: var(--blue-bg); } .src-dot.tone-ink { background: var(--surface-2); }
.d-late { color: var(--bad); font-weight: 500; } .d-today { color: var(--accent); font-weight: 500; } .d-soon { color: var(--warn); }

.chk { flex: none; display: grid; place-items: center; width: 20px; height: 20px; margin: 2px 1px 0; border-radius: 6px; border: 1.75px solid var(--line-strong); background: var(--surface); color: transparent; cursor: pointer; transition: background .15s, border-color .15s, transform .15s; padding: 0; }
.chk .ic { width: 13px; height: 13px; stroke-width: 3; }
.chk:hover { border-color: var(--ink2); color: var(--faint); }
.chk.p1 { border-color: var(--p1); } .chk.p2 { border-color: var(--p2); } .chk.p3 { border-color: var(--p3); background: color-mix(in srgb, var(--p3) 8%, var(--surface)); }
.chk.on { background: var(--ink); border-color: var(--ink); color: var(--ink-text); }
.chk.pop { animation: pop .3s ease; }
@keyframes pop { 50% { transform: scale(1.25); } }
.more-l { font-size: 12.5px; color: var(--muted); padding: 2px 8px; }
.done-today summary { cursor: pointer; font-size: 12.5px; color: var(--faint); padding: 4px 6px; }
.done-today .it-title { text-decoration: line-through; color: var(--faint); }

.wx-now { display: flex; align-items: center; gap: 14px; }
.wx-ic { color: var(--warn); }
.ic.wx-big { width: 44px; height: 44px; stroke-width: 1.4; }
.wx-t { font-size: 44px; font-weight: 600; letter-spacing: -.04em; line-height: 1; }
.wx-d { display: grid; gap: 2px; font-size: 12px; color: var(--muted); }
.wx-d strong { font-size: 13.5px; color: var(--text); font-weight: 600; }
.wx-d span { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.wx-d .ic { width: 13px; height: 13px; }
.wx-days { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; border-top: 1px solid var(--line); padding-top: 12px; }
.wx-days div { display: grid; justify-items: center; gap: 3px; font-size: 12px; }
.wx-days span { color: var(--muted); text-transform: capitalize; }
.wx-days .ic { color: var(--muted); width: 20px; height: 20px; }
.wx-days b { font-weight: 600; } .wx-days small { color: var(--faint); }
.wx-days em { font-style: normal; font-size: 10.5px; color: var(--blue); min-height: 14px; }

.habit-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.habit-list li { display: flex; align-items: center; gap: 10px; padding: 4px 0; }
.hb-chk { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--c) 45%, var(--line-strong)); background: transparent; color: transparent; cursor: pointer; transition: all .15s; padding: 0; }
.hb-chk .ic { width: 14px; height: 14px; stroke-width: 3; }
.hb-chk:hover { background: color-mix(in srgb, var(--c) 12%, transparent); }
.hb-chk.on { background: var(--c); border-color: var(--c); color: #fff; animation: pop .3s ease; }
.hb-name { flex: 1; font-size: 13.5px; font-weight: 500; min-width: 0; }
.hb-week { display: flex; gap: 3px; }
.hb-week i { width: 7px; height: 7px; border-radius: 2px; background: var(--surface-3); }
.hb-week i.on { background: var(--c); }
.hb-streak { display: inline-flex; align-items: center; gap: 2px; font-size: 12px; font-weight: 600; color: var(--warn); min-width: 30px; justify-content: flex-end; font-variant-numeric: tabular-nums; }
.hb-streak .ic { width: 13px; height: 13px; }

.spaces-grid { display: grid; gap: 14px; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
.spaces-grid.n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.spaces-grid.n1 { grid-template-columns: minmax(0, 1fr); }
.space-card { gap: 12px; position: relative; }
.space-ic { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; }
.space-ic.sm { width: 26px; height: 26px; border-radius: 8px; }
.space-ic.sm .ic { width: 15px; height: 15px; color: inherit !important; }
.space-ic.tone-green { background: var(--green-bg); } .space-ic.tone-pink { background: var(--pink-bg); } .space-ic.tone-blue { background: var(--blue-bg); }
.big-num { display: grid; gap: 1px; }
.big-num strong { font-size: 30px; font-weight: 600; letter-spacing: -.03em; line-height: 1.15; }
.chart-wrap { position: relative; margin: 0 -4px; }
.chart-area { width: 100%; height: 110px; display: block; overflow: visible; }
.chart-area .pt circle { fill: var(--surface); stroke: currentColor; stroke-width: 2; opacity: 0; transition: opacity .1s; vector-effect: non-scaling-stroke; }
.chart-area .pt:hover circle, .chart-area .pt:last-child circle { opacity: 1; }
.axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--faint); padding: 2px 4px 0; }
.chart-bars { width: 100%; height: 110px; display: block; }
.chart-bars .bar-a { fill: var(--blue); } .chart-bars .bar-b { fill: var(--blue-2); }
.chart-bars text { fill: var(--faint); font: 400 10px var(--font); }
.chart-bars g:hover rect { opacity: .75; }
.bar-a-k, .bar-b-k { display: inline-block; width: 8px; height: 8px; border-radius: 2px; }
.bar-a-k { background: var(--blue); } .bar-b-k { background: var(--blue-2); }
.stack { display: flex; height: 8px; border-radius: 99px; overflow: hidden; gap: 2px; background: var(--surface-2); }
.stack span { display: block; height: 100%; min-width: 0; }
.stack span:first-child { border-radius: 99px 0 0 99px; } .stack span:last-child { border-radius: 0 99px 99px 0; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.legend b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.mini-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.mini-grid > div { display: grid; gap: 1px; font-size: 12px; }
.mini-grid b { font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.mini-grid b small { font-size: 11px; color: var(--muted); font-weight: 500; }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.stat-grid > * { display: grid; gap: 1px; padding: 10px 12px; border-radius: 11px; background: var(--surface-2); font-size: 12px; transition: background .15s; }
.stat-grid > a:hover { background: var(--surface-3); }
.stat-grid b { font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.rows { list-style: none; margin: 0; padding: 0; display: grid; }
.rows li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: baseline; padding: 6px 0; border-top: 1px solid var(--line); font-size: 13px; }
.rows li:first-child { border-top: 0; }
.rows li > :first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rows li > span:nth-child(2) { font-size: 12px; white-space: nowrap; }
.rows li b { font-weight: 600; font-variant-numeric: tabular-nums; }
.rows li a:hover { text-decoration: underline; text-underline-offset: 3px; }
.goal { display: grid; gap: 5px; }
.goal-t { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; }
.goal-t span:first-child { font-weight: 500; }
.bar { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.bar span { display: block; height: 100%; border-radius: 99px; background: var(--green); }
.alert { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 10px; background: var(--warn-bg); color: var(--warn); font-size: 12.5px; }
.alert .ic { width: 15px; height: 15px; }
.age { position: absolute; right: 16px; bottom: 10px; font-size: 10.5px; color: var(--faint); }
.countdown { display: flex; align-items: center; gap: 16px; }
.cd-ring { position: relative; display: grid; place-items: center; flex: none; }
.cd-ring > span { position: absolute; display: grid; justify-items: center; line-height: 1.1; }
.cd-ring b { font-size: 17px; font-weight: 600; color: var(--text); }
.cd-ring small { font-size: 10.5px; color: var(--muted); }
.countdown > div:last-child { display: grid; gap: 2px; justify-items: start; }
.cd-days { font-size: 32px; font-weight: 600; letter-spacing: -.035em; line-height: 1.1; }
.cd-days small { font-size: 14px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.countdown .muted { font-size: 12px; }
.countdown .pill { margin-top: 4px; }

.week-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.wk-day { display: grid; align-content: start; gap: 4px; min-height: 118px; padding: 8px; border-radius: 11px; background: var(--surface-2); transition: background .15s; min-width: 0; }
.wk-day:hover { background: var(--surface-3); }
.wk-day.we { background: color-mix(in srgb, var(--surface-2) 55%, var(--surface)); }
.wk-day.today { background: var(--accent-bg); }
.wk-h { display: flex; justify-content: space-between; align-items: baseline; font-size: 11.5px; color: var(--muted); text-transform: capitalize; margin-bottom: 2px; }
.wk-h b { font-size: 16px; color: var(--text); font-weight: 600; }
.wk-day.today .wk-h, .wk-day.today .wk-h b { color: var(--accent); }
.wk-it { display: block; font-size: 11.5px; line-height: 1.3; padding: 3px 6px; border-radius: 6px; background: var(--surface); color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: inset 2.5px 0 0 currentColor; }
.wk-it { color: inherit; }
.wk-it.tone-green { box-shadow: inset 2.5px 0 0 var(--green); } .wk-it.tone-pink { box-shadow: inset 2.5px 0 0 var(--pink); } .wk-it.tone-blue { box-shadow: inset 2.5px 0 0 var(--blue); } .wk-it.tone-ink { box-shadow: inset 2.5px 0 0 var(--ink); }
.wk-it em { font-style: normal; color: var(--muted); margin-right: 4px; font-variant-numeric: tabular-nums; }
.wk-more { font-size: 11px; color: var(--muted); padding-left: 4px; }

.note-stack { display: grid; gap: 8px; }
.note-chip { display: grid; gap: 2px; text-align: left; padding: 10px 12px; border-radius: 11px; background: var(--surface-2); border: 0; cursor: pointer; transition: background .15s; }
.note-chip:hover { background: var(--surface-3); }
.note-chip strong { font-size: 13.5px; font-weight: 600; }
.note-chip span { font-size: 12.5px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.link-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 6px; }
.lnk { display: flex; align-items: center; gap: 8px; padding: 7px 9px; border-radius: 10px; background: var(--surface-2); font-size: 13px; font-weight: 500; border: 0; cursor: pointer; min-width: 0; transition: background .15s; }
.lnk:hover { background: var(--surface-3); }
.lnk > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lnk-i { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: var(--ink); color: var(--ink-text); font-size: 11px; font-weight: 600; flex: none; }
.lnk.add { color: var(--muted); background: transparent; border: 1px dashed var(--line-strong); }
.lnk.add .ic { width: 15px; height: 15px; }
.status { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.status li { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.status li a { flex: 1; font-weight: 500; }
.status li a:hover { text-decoration: underline; text-underline-offset: 3px; }
.status .muted { font-size: 12px; font-variant-numeric: tabular-nums; }
.st-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--surface-3); flex: none; }
.st-dot.ok { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-bg); }
.st-dot.bad { background: var(--bad); box-shadow: 0 0 0 3px var(--bad-bg); animation: blink 1.4s infinite; }
@keyframes blink { 50% { opacity: .35; } }

/* ---------- tareas ---------- */
.split { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 32px; align-items: start; }
.split-main { display: grid; gap: 20px; min-width: 0; max-width: 820px; }
.sub-nav { position: sticky; top: 24px; display: grid; gap: 1px; }
.sub-nav a { display: flex; align-items: center; gap: 9px; height: 32px; padding: 0 10px; border-radius: 8px; color: var(--muted); font-size: 13.5px; font-weight: 500; }
.sub-nav a:hover { background: var(--surface-2); color: var(--text); }
.sub-nav a.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow), inset 0 0 0 1px var(--line); }
.sub-nav a > span:not(.dot):not(.hash) { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sub-nav em { font-style: normal; font-size: 11.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
.sub-nav .ic { width: 16px; height: 16px; }
.sub-nav .hash { width: 16px; text-align: center; color: var(--faint); font-weight: 600; }
.sub-nav .dot { margin: 0 4px; }
.sub-nav .nav-label { margin-top: 14px; }
.group { display: grid; gap: 6px; }
.group h3 { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); padding: 0 6px; }
.group h3 span { color: var(--faint); font-weight: 500; }
.tasks { list-style: none; margin: 0; padding: 0; display: grid; border-top: 1px solid var(--line); }
.task { display: flex; align-items: flex-start; gap: 10px; padding: 9px 6px; border-bottom: 1px solid var(--line); transition: background .12s; }
.task:hover { background: var(--surface); }
.task-main { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; text-align: left; background: none; border: 0; padding: 1px 0; cursor: pointer; }
.task-main .it-title { font-size: 14px; }
.task.done .it-title { text-decoration: line-through; color: var(--faint); }
.flag { color: var(--p3); display: inline-grid; }
.flag .ic { width: 14px; height: 14px; }
.chips { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); }
.chip .ic { width: 13px; height: 13px; }
.chip.area { color: var(--accent); }
.chip.d-late .ic, .chip.d-today .ic { color: inherit; }

/* ---------- calendario ---------- */
.cal-page { gap: 18px; }
.cal-head { grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; }
.cal-title { display: flex; align-items: center; gap: 14px; }
.cal-title h1 { min-width: 200px; }
.layers { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.layer { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 99px; border: 1px solid var(--line); background: transparent; font-size: 12.5px; color: var(--faint); cursor: pointer; }
.layer .dot { opacity: .35; }
.layer.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.layer.on .dot { opacity: 1; }
.cal-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.cal { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow); }
.cal-wd { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.cal-wd span { padding: 8px 10px; font-size: 11.5px; color: var(--faint); font-weight: 500; text-transform: capitalize; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-d { display: grid; grid-template-rows: auto 1fr; gap: 3px; min-height: 112px; padding: 6px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); transition: background .12s; min-width: 0; }
.cal-d:nth-child(7n) { border-right: 0; }
.cal-d:hover { background: var(--surface-2); }
.cal-d.we { background: color-mix(in srgb, var(--surface-2) 40%, var(--surface)); }
.cal-d.out .cal-n { color: var(--faint); }
.cal-d.out .cal-its { opacity: .55; }
.cal-d.sel { box-shadow: inset 0 0 0 2px var(--accent); }
.cal-n { justify-self: start; display: grid; place-items: center; min-width: 24px; height: 24px; padding: 0 4px; border-radius: 99px; font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.cal-d.today .cal-n { background: var(--accent); color: #fff; }
.cal-its { display: grid; gap: 2px; align-content: start; min-width: 0; }
.cal-it { display: block; font-size: 11px; line-height: 1.3; padding: 2px 5px; border-radius: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: var(--surface-2); color: var(--text); }
.cal-it em { font-style: normal; color: var(--muted); margin-right: 3px; }
.cal-it.tone-ink { background: color-mix(in srgb, var(--ec, var(--ink)) 13%, var(--surface)); box-shadow: inset 2px 0 0 var(--ec, var(--ink)); }
.cal-it.tone-ink2 { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.cal-it.tone-green { background: var(--green-bg); } .cal-it.tone-pink { background: var(--pink-bg); } .cal-it.tone-blue { background: var(--blue-bg); }
.cal-it.t { background: transparent; box-shadow: inset 0 0 0 1px var(--line); color: var(--muted); }
.cal-it.t.tone-green { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--green) 40%, transparent); }
.cal-it.t.tone-pink { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--pink) 40%, transparent); }
.cal-it.t.tone-blue { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--blue) 40%, transparent); }
.cal-it.big { background: var(--pink); color: #fff; font-weight: 600; }
.cal-it.cont { opacity: .7; }
.cal-more { font-size: 10.5px; color: var(--muted); padding-left: 4px; }
.cal-dots { display: none; gap: 3px; }
.cal-dots i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.cal-side { position: sticky; top: 24px; }
.cal-side .card-head h2 { font-size: 14px; }
.side-acts { display: flex; gap: 6px; padding-top: 8px; border-top: 1px solid var(--line); }

/* ---------- notas ---------- */
.search-in { display: flex; align-items: center; gap: 8px; padding: 0 12px; border-radius: 11px; border: 1px solid var(--line); background: var(--surface); max-width: 420px; }
.search-in .ic { color: var(--faint); }
.search-in input { border: 0 !important; box-shadow: none !important; padding: 0 !important; }
.note-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; align-items: start; }
.note-card { text-align: left; cursor: pointer; font: inherit; color: inherit; gap: 8px; max-height: 300px; overflow: hidden; transition: border-color .15s, box-shadow .15s, transform .15s; }
.note-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.note-card.pinned { border-color: color-mix(in srgb, var(--accent) 30%, var(--line)); }
.note-top { display: flex; align-items: center; gap: 6px; }
.note-top strong { flex: 1; font-size: 14.5px; font-weight: 600; }
.pin-i { color: var(--accent); display: grid; } .pin-i .ic { width: 14px; height: 14px; }
.note-prev { font-size: 13px; color: var(--muted); overflow: hidden; -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
.note-foot { font-size: 11.5px; color: var(--faint); }
.md p, .md li, .md blockquote { margin: 0; line-height: 1.55; }
.md h3, .md h4, .md h5 { margin: 8px 0 2px; font-weight: 600; }
.md h3 { font-size: 17px; } .md h4 { font-size: 15px; } .md h5 { font-size: 13.5px; }
.md ul, .md ol { margin: 2px 0; padding-left: 20px; }
.md ul.md-check { list-style: none; padding-left: 0; }
.md-check li { display: flex; gap: 8px; align-items: flex-start; }
.md-box { flex: none; width: 16px; height: 16px; margin-top: 3px; border-radius: 4px; border: 1.75px solid var(--line-strong); background: var(--surface); padding: 0; cursor: pointer; position: relative; }
.md-box.on { background: var(--ink); border-color: var(--ink); }
.md-box.on::after { content: ''; position: absolute; left: 4px; top: 1px; width: 4px; height: 8px; border: solid var(--ink-text); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.md-box.on + span { text-decoration: line-through; color: var(--faint); }
.md blockquote { border-left: 3px solid var(--line-strong); padding-left: 10px; color: var(--muted); }
.md code { background: var(--surface-2); padding: 1px 5px; border-radius: 4px; }
.md a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.md-gap { height: 8px; }
.note-ed { gap: 12px; }
.note-bar { display: flex; align-items: center; gap: 4px; }
.note-body { min-height: 46vh; font-size: 14.5px; line-height: 1.6; border: 0 !important; box-shadow: none !important; padding: 0 !important; resize: none; background: transparent !important; }
.note-view { min-height: 46vh; font-size: 14.5px; }

/* ---------- hábitos ---------- */
.habit-card { gap: 14px; }
.hb-dot { width: 12px; height: 12px; border-radius: 4px; }
.hb-stats { display: flex; gap: 28px; }
.hb-stats div { display: grid; }
.hb-stats b { font-size: 22px; font-weight: 600; letter-spacing: -.02em; }
.hb-stats span { font-size: 12px; color: var(--muted); }
.heat { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 1fr); gap: 4px; justify-content: start; overflow-x: auto; padding-bottom: 2px; }
.heat button { width: 15px; height: 15px; border-radius: 4px; border: 0; padding: 0; background: var(--surface-3); cursor: pointer; transition: transform .1s; }
.heat button:hover:not(:disabled) { transform: scale(1.25); }
.heat button.on { background: var(--c); }
.heat button.rest { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.heat button.rest.on { background: color-mix(in srgb, var(--c) 60%, transparent); box-shadow: none; }
.heat button.fut { background: transparent; cursor: default; }
.heat button.now { outline: 2px solid var(--ink); outline-offset: 1px; }

/* ---------- cuenta y usuarios ---------- */
.profile { grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; }
.profile > div { display: grid; }
.profile strong { font-size: 15px; font-weight: 600; }
.keys { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; margin: 0; font-size: 13px; align-items: center; }
.keys dt { white-space: nowrap; } .keys dd { margin: 0; color: var(--muted); }
.city-res { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.city-res button { width: 100%; display: flex; gap: 8px; align-items: baseline; text-align: left; padding: 8px 10px; border-radius: 8px; border: 0; background: none; cursor: pointer; }
.city-res button:hover { background: var(--surface-2); }
.log { list-style: none; margin: 0; padding: 0; }
.log li { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, .9fr) 110px; gap: 12px; padding: 11px 20px; border-top: 1px solid var(--line); font-size: 13px; align-items: center; }
.log li:first-child { border-top: 0; }
.log li small { color: var(--faint); }
.log li.bad > span:first-child { color: var(--bad); }
.log li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty { padding: 20px; color: var(--faint); text-align: center; list-style: none; }
.log li.empty { display: block; }
.tr { display: grid; grid-template-columns: minmax(0, 2fr) 80px 90px minmax(0, 1.5fr) 110px 40px; gap: 12px; align-items: center; padding: 12px 20px; border-top: 1px solid var(--line); font-size: 13.5px; }
.tr.th { border-top: 0; padding-top: 10px; padding-bottom: 10px; background: var(--surface-2); color: var(--muted); font-size: 12px; font-weight: 500; }
.tr.off { opacity: .55; }
.sp-dots { display: flex; gap: 5px; align-items: center; }
.who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.who > span { display: grid; line-height: 1.3; min-width: 0; }
.who strong { font-weight: 500; }
.who small { color: var(--faint); }
.who.big strong { font-size: 15px; }
.actions { display: flex; justify-content: flex-end; }
.link-edit { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; max-height: 260px; overflow-y: auto; }
.link-edit li { display: flex; align-items: center; gap: 10px; padding: 6px 4px; border-bottom: 1px solid var(--line); }
.link-edit li span.grow { display: grid; min-width: 0; }
.link-edit small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- diálogos, buscador y avisos ---------- */
.modal { width: min(480px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); padding: 0; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); }
.modal.wide { width: min(640px, calc(100vw - 32px)); }
.modal[open] { animation: rise .18s ease; }
@keyframes rise { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.modal::backdrop, .palette::backdrop { background: rgba(15, 15, 14, .32); backdrop-filter: blur(3px); }
.modal-body { padding: 22px; display: grid; gap: 14px; }
.modal-body h2 { font-size: 17px; }
.modal-actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin-top: 4px; }
.menu-list { display: grid; border: 1px solid var(--line); border-radius: 11px; overflow: hidden; }
.menu-row { display: grid; gap: 2px; text-align: left; padding: 11px 14px; border: 0; border-top: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; cursor: pointer; }
.menu-row:first-child { border-top: 0; }
.menu-row:hover { background: var(--surface-2); }
.menu-row strong { font-weight: 500; font-size: 13.5px; }
.menu-row span { font-size: 12.5px; color: var(--muted); }
.menu-row.danger strong { color: var(--bad); }
.palette { width: min(620px, calc(100vw - 24px)); margin-top: 12vh; padding: 0; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); overflow: hidden; }
.palette[open] { animation: rise .14s ease; }
.pal-in { display: flex; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.pal-in .ic { color: var(--faint); }
.pal-in input { border: 0 !important; box-shadow: none !important; padding: 0 !important; height: 54px; font-size: 15.5px; background: transparent !important; }
.pal-list { list-style: none; margin: 0; padding: 6px; max-height: min(52vh, 440px); overflow-y: auto; }
.pal-g { padding: 10px 10px 4px; font-size: 11px; font-weight: 600; color: var(--faint); text-transform: uppercase; letter-spacing: .05em; }
.pal-it { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; border: 0; background: none; text-align: left; cursor: pointer; font-size: 13.5px; }
.pal-it .ic { color: var(--muted); width: 16px; height: 16px; }
.pal-it span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pal-it small { color: var(--faint); white-space: nowrap; }
.pal-it.sel, .pal-it:hover { background: var(--surface-2); }
.pal-it.sel { box-shadow: inset 2px 0 0 var(--accent); }
.pal-empty { padding: 24px; text-align: center; color: var(--faint); }
.pal-foot { display: flex; gap: 16px; padding: 9px 16px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--faint); }
.pal-foot span { display: inline-flex; align-items: center; gap: 4px; }
.pal-foot kbd { font-size: 10px; padding: 2px 4px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 12px); display: flex; align-items: center; gap: 14px; padding: 10px 16px; border-radius: 12px; background: var(--ink); color: var(--ink-text); font-size: 13.5px; font-weight: 500; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 50; max-width: calc(100vw - 32px); box-shadow: var(--shadow-lg); }
.toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast.bad { background: var(--bad); color: #fff; }
.toast-act { border: 0; background: none; color: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 0; opacity: .85; }

/* ---------- pantallas medianas y móvil ---------- */
@media (max-width: 1180px) {
  .spaces-grid, .spaces-grid.n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .spaces-grid .space-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .cal-wrap { grid-template-columns: 1fr; }
  .cal-side { position: static; }
}
@media (max-width: 960px) {
  .bento, .grid.two { grid-template-columns: 1fr; }
  .page { padding: 32px 24px 64px; }
  .split { grid-template-columns: 1fr; gap: 16px; }
  .sub-nav { position: static; display: flex; overflow-x: auto; gap: 4px; padding-bottom: 4px; scrollbar-width: none; }
  .sub-nav .nav-label { display: none; }
  .sub-nav a { flex: none; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
  .sub-nav a.on { background: var(--ink); color: var(--ink-text); box-shadow: none; }
  .sub-nav a.on em { color: inherit; }
  .cal-head { grid-template-columns: 1fr auto; }
  .layers { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; }
}
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .side { position: sticky; height: auto; padding: 10px 16px; border-right: 0; border-bottom: 1px solid var(--line); gap: 0; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); }
  .side-top { padding: 0; }
  .menu-btn { display: inline-grid; }
  .nav, .side-foot { display: none; }
  .side.open .nav { display: grid; padding: 14px 0 6px; max-height: calc(100dvh - 120px); }
  .side.open .side-foot { display: block; }
  .page { padding: 22px 16px 56px; gap: 20px; }
  h1 { font-size: 24px; }
  .hero { flex-direction: column; align-items: stretch; }
  .search-btn { width: 100%; }
  .brief { font-size: 14px; }
  .focus { height: auto; min-height: 46px; flex-wrap: wrap; padding: 8px 12px; }
  .focus input { flex-basis: 100%; height: 30px; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 8px; }
  .kpi { padding: 12px; }
  .kpi-v { font-size: 20px; }
  .kpi-chart { display: none; }
  .kpi-s { white-space: normal; flex-wrap: wrap; }
  .spaces-grid, .spaces-grid.n2 { grid-template-columns: 1fr; }
  .week-grid { grid-template-columns: repeat(7, 112px); overflow-x: auto; padding-bottom: 4px; scroll-snap-type: x mandatory; }
  .wk-day { scroll-snap-align: start; }
  .row-head { grid-template-columns: 1fr; align-items: start; }
  .profile { grid-template-columns: auto 1fr; }
  .profile .pill { grid-column: 1 / -1; justify-self: start; }
  .tr { grid-template-columns: minmax(0, 1fr) auto; row-gap: 6px; }
  .tr.th { display: none; }
  .tr > span:nth-child(2), .tr > span:nth-child(3), .tr > span:nth-child(5) { display: none; }
  .tr > span:nth-child(4) { grid-column: 1; grid-row: 2; padding-left: 38px; }
  .tr > .actions { grid-row: 1 / span 2; grid-column: 2; }
  .log li { grid-template-columns: minmax(0, 1fr) auto; padding: 10px 16px; }
  .log li > span:nth-child(2), .log li > span:nth-child(3) { display: none; }
  .row, .row3 { grid-template-columns: 1fr; }
  .auth-card { padding: 22px; }
  .cal-title h1 { min-width: 0; font-size: 21px; }
  .cal-head { grid-template-columns: 1fr; }
  .cal-head > .btn { justify-self: start; }
  .layers { grid-row: auto; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .layer { flex: none; }
  .cal-d { min-height: 54px; padding: 4px 2px; justify-items: center; }
  .cal-its { display: none; }
  .cal-dots { display: flex; }
  .cal-n { font-size: 12px; }
  .cal-wd span { padding: 6px 2px; text-align: center; }
  .hb-stats { gap: 18px; }
  .modal, .modal.wide { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); }
  .palette { margin-top: 8px; }
  .pal-foot { display: none; }
  .note-body, .note-view { min-height: 50vh; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* desglose del patrimonio por persona */
.owners { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.owners li { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto auto minmax(92px, auto); gap: 8px; align-items: center; font-size: 13px; padding: 3px 0; }
.owners i { width: 8px; height: 8px; border-radius: 2px; }
.owners .muted { font-size: 12px; font-variant-numeric: tabular-nums; }
.owners b { font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.owners .own-d { text-align: right; }
.owners .own-d .delta { font-size: 11.5px; }

/* ---------- logo ---------- */
.logo { width: 28px; height: 28px; border-radius: 7px; display: block; flex: none; }
.logo.lg { width: 44px; height: 44px; border-radius: 11px; box-shadow: var(--shadow-md); }
.auth-brand { font-size: 17px; }

/* ---------- gym ---------- */
:root { --gym: #F2683C; --gym-bg: #FDECE5; --gold: #B7791F; --gold-bg: #FBF1DC; }
@media (prefers-color-scheme: dark) { :root { --gym: #FF8A5C; --gym-bg: rgba(255, 138, 92, .14); --gold: #F2C14E; --gold-bg: rgba(242, 193, 78, .14); } }
.tone-gym { color: var(--gym); }
.space-ic.tone-gym { background: var(--gym-bg); }
.pill.gold { background: var(--gold-bg); color: var(--gold); }
.gym-page { max-width: 880px; }

/* foto del ejercicio: dos imágenes que se alternan para ver el movimiento */
.gx-ph { position: relative; display: block; flex: none; width: 56px; height: 56px; border-radius: 12px; overflow: hidden; background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.gx-ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.gx-ph img.b { animation: gxswap 2.4s steps(1) infinite; }
@keyframes gxswap { 0% { opacity: 0; } 50% { opacity: 1; } }
.gx-ph.sm { width: 52px; height: 52px; }
.gx-ph.lg { width: 140px; height: 140px; border-radius: 18px; }
.gx-ph.xl { width: 100%; height: auto; aspect-ratio: 4 / 3; border-radius: 14px; }
.gx-ph.none { display: grid; place-items: center; background: var(--surface-2); color: var(--faint); }

.gx-empty { justify-items: center; text-align: center; padding: 40px 24px; }
.gx-empty-ic { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 22px; background: var(--gym-bg); }
.gx-empty-ic .ic { color: var(--gym); }
.gx-empty p { max-width: 52ch; }
.back-l { display: inline-flex; align-items: center; gap: 2px; color: var(--muted); font-size: 13px; font-weight: 500; width: max-content; }
.back-l:hover { color: var(--text); } .back-l .ic { width: 16px; height: 16px; }
.gx-dayhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-left: 14px; box-shadow: inset 4px 0 0 var(--dc); }
.gx-dayhead h1 { color: var(--dc); }
.gx-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.gx-list a { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.gx-list a:hover { border-color: var(--line-strong); }
.gx-list a > .ic { color: var(--faint); }
.gx-li { flex: 1; display: grid; gap: 1px; min-width: 0; }
.gx-li strong { font-size: 14px; font-weight: 600; }
.gx-li .small { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.gx-li .small .ic { width: 13px; height: 13px; color: var(--gold); }
.pre { white-space: pre-line; }
.gx-exhead { display: flex; gap: 18px; align-items: center; }
.gx-exhead > div { display: grid; gap: 6px; }
.gx-alt { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 4px 0 0; font-size: 13px; }
.gx-alt dt { color: var(--muted); } .gx-alt dd { margin: 0; }
.gx-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.gx-stats .card { gap: 2px; }
.gx-stats b { font-size: 24px; font-weight: 700; letter-spacing: -.02em; }
.chart-wrap.tone-gym { color: var(--gym); }

.confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 100; }

/* gym en Inicio y en Hábitos */
.gym-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; margin: 0 -6px; border-radius: 12px; background: color-mix(in srgb, var(--gym) 8%, var(--surface)); }
.gym-row.rest { background: var(--surface-2); }
.gym-row > .ic { color: var(--faint); width: 16px; height: 16px; }
.gym-ic { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--gym); color: #fff; flex: none; }
.gym-ic .ic { width: 15px; height: 15px; }
.gym-row.rest .gym-ic { background: var(--surface-3); color: var(--muted); }
.gym-row .hb-name strong { font-weight: 700; }
.gym-habit { gap: 16px; }
.gh-who { display: flex; align-items: center; gap: 10px; }
.gh-who > span { display: grid; } .gh-who small { color: var(--muted); font-size: 12px; }

/* barra inferior en el móvil */
.tabbar { display: none; }
@media (max-width: 760px) {
  .tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
  .tabbar a, .tabbar button { display: grid; justify-items: center; gap: 2px; padding: 6px 0; border: 0; background: none; color: var(--faint); font-size: 10.5px; font-weight: 600; cursor: pointer; }
  .tabbar .ic { width: 22px; height: 22px; }
  .tabbar .on { color: var(--text); }
  .tabbar .tab-gym .ic { width: 26px; height: 26px; padding: 3px; border-radius: 9px; background: var(--gym); color: #fff; }
  .content { padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
  .toast { bottom: calc(84px + env(safe-area-inset-bottom)); }
  .side { padding-top: calc(10px + env(safe-area-inset-top)); }
  .gx-exhead { flex-direction: column; align-items: flex-start; }
  .gx-ph.lg { width: 100%; height: auto; aspect-ratio: 4 / 3; }
}


/* ---------- gym sencillo ---------- */
.gym-page.simple { max-width: 760px; gap: 18px; }
.gym-t { display: inline-flex; align-items: center; gap: 3px; color: var(--gym); font-weight: 600; }
.gym-t .ic { width: 15px; height: 15px; }

/* esta semana: cada día con su fecha */
.gweek-n { font: 700 14px var(--font); color: var(--muted); font-variant-numeric: tabular-nums; }
.gweek-n.ok { color: var(--ok); }
.gweek-g { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.gday { display: grid; justify-items: center; gap: 1px; padding: 10px 2px 8px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; transition: transform .12s, background .15s, border-color .15s; min-width: 0; }
.gday:not(:disabled):hover { border-color: var(--line-strong); transform: translateY(-1px); }
.gday:disabled { cursor: default; opacity: .55; }
.gday-wd { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.gday-n { font-size: 22px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.gday-m { font-size: 11px; color: var(--faint); }
.gday-what { margin-top: 4px; font-size: 11px; font-weight: 600; color: var(--faint); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gday.plan .gday-what { color: var(--dc); }
.gday-ok { display: grid; place-items: center; margin-top: 4px; height: 22px; min-width: 22px; padding: 0 6px; border-radius: 99px; font-size: 10.5px; font-weight: 600; color: var(--faint); background: var(--surface-2); }
.gday-ok .ic { width: 14px; height: 14px; stroke-width: 3; }
.gday.today { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.gday.today .gday-wd { color: var(--text); }
.gday.on { background: var(--dc); border-color: var(--dc); box-shadow: none; }
.gday.on .gday-wd, .gday.on .gday-n, .gday.on .gday-m, .gday.on .gday-what { color: #fff; }
.gday.on .gday-ok { background: rgba(255, 255, 255, .25); color: #fff; }
.gday.on:not(.plan) { --dc: var(--gym); }

/* apuntar pesos */
.gtabs { width: 100%; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; }
.gtabs span { justify-content: center; font-size: 13px; }
.gtabs input:checked + span { color: var(--dc); font-weight: 700; }
.gp-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.gp { border-radius: 14px; transition: background .15s; }
.gp.open { background: var(--surface-2); padding-bottom: 10px; }
.gp-h { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 12px; width: 100%; padding: 8px; border: 0; background: none; text-align: left; cursor: pointer; border-radius: 14px; }
.gp:not(.open) .gp-h:hover { background: var(--surface-2); }
.gp-txt { display: grid; min-width: 0; }
.gp-txt strong { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gp-txt small { font-size: 12px; color: var(--muted); }
.gp-spark { display: grid; }
.gp-now { display: grid; justify-items: end; gap: 2px; min-width: 70px; }
.gp-now b { font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.gp-d { font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 99px; white-space: nowrap; }
.gp-d.up { background: var(--ok-bg); color: var(--ok); } .gp-d.down { background: var(--bad-bg); color: var(--bad); } .gp-d.flat { color: var(--faint); }
.gp-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 4px 10px 0; }
.gp-step { display: flex; align-items: center; gap: 4px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px; padding: 3px; }
.gp-step button { width: 40px; height: 40px; border: 0; border-radius: 9px; background: var(--surface-2); font-size: 22px; font-weight: 500; cursor: pointer; color: var(--text); }
.gp-step button:active { background: var(--surface-3); }
.gp-step input { width: 76px !important; min-height: 40px; height: 40px; border: 0 !important; box-shadow: none !important; text-align: center; font: 700 20px var(--font) !important; padding: 0 !important; font-variant-numeric: tabular-nums; }
.gp-step span, .gp-reps span { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.gp-reps { display: flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px; padding: 3px 10px 3px 3px; }
.gp-reps input { width: 60px !important; min-height: 40px; height: 40px; border: 0 !important; box-shadow: none !important; text-align: center; font: 700 20px var(--font) !important; padding: 0 !important; }
.gp-save { height: 48px; padding: 0 18px; border-radius: 12px; font-size: 15px; margin-left: auto; }
.gp-today { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 10px 0; font-size: 12.5px; color: var(--muted); }
.chip-x { display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px 3px 9px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); font-size: 12.5px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.chip-x.pr { background: var(--gold-bg); border-color: transparent; color: var(--gold); }
.chip-x .ic { width: 13px; height: 13px; }
.chip-x button { display: grid; place-items: center; width: 20px; height: 20px; border: 0; border-radius: 50%; background: transparent; color: var(--faint); cursor: pointer; padding: 0; }
.chip-x button:hover { background: var(--bad-bg); color: var(--bad); }
.gp-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 10px 0; }
.gp-chart .chart-area { height: 170px; }

/* calendario del mes con números */
.gcal { display: grid; gap: 8px; }
.gcal-h { display: flex; justify-content: space-between; align-items: baseline; }
.gcal-t { font-weight: 600; font-size: 14px; }
.gcal-g { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.gcal-wd { text-align: center; font-size: 11px; font-weight: 600; color: var(--faint); padding-bottom: 2px; }
.gcal-d { display: grid; place-items: center; aspect-ratio: 1; max-height: 52px; border-radius: 12px; border: 0; background: var(--surface-2); font: 600 14px var(--font); color: var(--text); font-variant-numeric: tabular-nums; padding: 0; }
button.gcal-d { cursor: pointer; transition: transform .12s; }
button.gcal-d:hover { transform: scale(1.06); }
.gcal-d.out { background: transparent; }
.gcal-d.fut { color: var(--faint); background: transparent; }
.gcal-d.plan { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--c) 55%, transparent); background: transparent; }
.gcal-d.on { background: var(--c); color: #fff; box-shadow: none; }
.gcal-d.now { outline: 2px solid var(--ink); outline-offset: 2px; }
.gcal.compact .gcal-d { border-radius: 8px; font-size: 12px; max-height: 34px; }
.gcal.compact .gcal-g { gap: 3px; }
.gcal-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.gcal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.gcal-legend i { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }
.gcal-legend i.on { background: var(--gym); }
.gcal-legend i.plan { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--gym) 55%, transparent); }
.gcal-legend i.now { outline: 2px solid var(--ink); outline-offset: 1px; background: var(--surface-2); }
.gh-cals { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.gh-cals .gh-who { margin-bottom: 8px; }
.gh-cals .gh-who small { margin-left: auto; }

/* historial por fecha en la ficha del ejercicio */
.gp-hist { list-style: none; margin: 0; padding: 0; display: grid; }
.gp-hist li { display: grid; grid-template-columns: 44px 84px minmax(0, 1fr); align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.gp-hist li:first-child { border-top: 0; }
.gp-hd { display: grid; justify-items: center; padding: 3px 0; border-radius: 10px; background: var(--gym-bg); line-height: 1.1; }
.gp-hd b { font-size: 16px; color: var(--gym); } .gp-hd small { font-size: 10.5px; color: var(--muted); }
.gp-hw { font-size: 13px; color: var(--muted); }
.gp-hv { display: flex; flex-wrap: wrap; gap: 5px; }

@media (max-width: 760px) {
  .gweek-g { gap: 4px; }
  .gday { padding: 8px 0 6px; border-radius: 12px; }
  .gday-n { font-size: 19px; }
  .gday-ok { font-size: 9.5px; padding: 0 4px; }
  .gp-h { grid-template-columns: auto minmax(0, 1fr) auto; }
  .gp-spark { display: none; }
  .gp-form { padding: 4px 6px 0; }
  .gp-save { width: 100%; margin-left: 0; }
  .gp-hist li { grid-template-columns: 44px minmax(0, 1fr); }
  .gp-hw { display: none; }
}

/* ---------- Google Calendar (violeta) ---------- */
:root { --violet: #7C5CE6; --violet-bg: #EFEAFD; }
@media (prefers-color-scheme: dark) { :root { --violet: #A994FF; --violet-bg: rgba(169, 148, 255, .14); } }
.tone-violet { color: var(--violet); }
.tag-src.tone-violet, .src-dot.tone-violet, .cal-it.tone-violet { background: var(--violet-bg); }
.cal-it.t.tone-violet { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--violet) 40%, transparent); }
.wk-it.tone-violet { box-shadow: inset 2.5px 0 0 var(--violet); }
.howto summary { cursor: pointer; font-size: 13px; color: var(--accent); }
.howto ol { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.howto a { color: var(--accent); text-decoration: underline; }
.card h2 .ic, .card > h2 .ic { width: 17px; height: 17px; color: var(--faint); margin-right: 6px; vertical-align: -3px; }

/* ---------- elegir rutina ---------- */
.tpl-pick { display: grid; gap: 10px; width: 100%; max-width: 520px; text-align: left; }
.tpl-pick.small { display: flex; flex-wrap: wrap; justify-content: center; max-width: none; }
.tpl { display: grid; gap: 4px; padding: 14px 16px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; text-align: left; transition: border-color .15s, transform .12s; }
.tpl:hover { border-color: var(--gym); transform: translateY(-1px); }
.tpl strong { font-size: 15px; } .tpl span { font-size: 13px; color: var(--muted); }

/* ---------- peso corporal ---------- */
.gb-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.gb-now { display: grid; }
.gb-now b { font-size: 34px; font-weight: 700; letter-spacing: -.03em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.gb-now b small { font-size: 15px; color: var(--muted); font-weight: 500; letter-spacing: 0; }
.gb-facts { display: grid; justify-items: end; gap: 4px; text-align: right; }
.gb-bar span { background: var(--gym); }
.gb-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.gb-hist summary { cursor: pointer; font-size: 12.5px; color: var(--muted); }
.gb-hist .rows li { grid-template-columns: minmax(0, 1fr) auto auto auto; align-items: center; }

/* ---------- resumen de la semana ---------- */
.week-sum { background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 7%, var(--surface)), var(--surface) 60%); border-color: color-mix(in srgb, var(--accent) 22%, var(--line)); }
.week-sum .card-head h2 .ic { color: var(--accent); }
.wk-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.wk-t { display: grid; gap: 1px; padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.wk-t b { font-size: 22px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.wk-t small { font-size: 11.5px; color: var(--muted); }
.wk-t.ok b { color: var(--ok); } .wk-t.warn small { color: var(--warn); }

/* ---------- listas ---------- */
.lists-page { max-width: 720px; }
.list-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.list-tab { display: inline-flex; align-items: center; gap: 6px; flex: none; height: 34px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); font-weight: 500; font-size: 13.5px; cursor: pointer; color: var(--muted); }
.list-tab.on { background: var(--ink); color: var(--ink-text); border-color: var(--ink); }
.list-tab em { font-style: normal; font-size: 11px; font-weight: 700; min-width: 18px; height: 18px; display: grid; place-items: center; border-radius: 99px; background: var(--surface-3); color: var(--text); padding: 0 5px; }
.list-tab.on em { background: color-mix(in srgb, var(--ink-text) 25%, transparent); color: var(--ink-text); }
.list-tab .ic { width: 13px; height: 13px; }
.li-list { list-style: none; margin: 0; padding: 0; display: grid; }
.li-it { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 1px solid var(--line); }
.li-it:last-child { border-bottom: 0; }
.li-it .chk { width: 24px; height: 24px; margin: 0; border-radius: 8px; }
.li-txt { flex: 1; font-size: 15px; overflow-wrap: anywhere; }
.li-it.done .li-txt { text-decoration: line-through; color: var(--faint); }
.li-it .icon-btn { opacity: .5; } .li-it:hover .icon-btn { opacity: 1; }
.li-done-h { display: flex; justify-content: space-between; align-items: center; padding-top: 6px; }

/* ---------- interruptores (avisos) ---------- */
.sw-list { display: grid; gap: 2px; }
.sw-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); cursor: pointer; }
.sw-row:first-child { border-top: 0; }
.sw-row > span { display: grid; } .sw-row small { font-size: 12px; color: var(--muted); }
.toggle { appearance: none; -webkit-appearance: none; flex: none; width: 42px; height: 24px; border-radius: 99px; background: var(--surface-3); position: relative; cursor: pointer; transition: background .2s; margin: 0; }
.toggle::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: transform .2s; }
.toggle:checked { background: var(--ok); }
.toggle:checked::after { transform: translateX(18px); }
.toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
#push-card .pill, #backup-card .pill { width: max-content; }

@media (max-width: 760px) {
  .gb-now b { font-size: 30px; }
  .gb-facts { justify-items: start; text-align: left; }
  .gb-form .gp-save { width: 100%; }
}

/* ---------- entrar con Face ID ---------- */
.pk-box { display: grid; gap: 12px; margin-bottom: 14px; }
.pk-btn { height: 48px !important; font-size: 15px; gap: 8px; }
.pk-btn .ic { width: 22px; height: 22px; }
.pk-box .note { margin: 0; }
.or { display: flex; align-items: center; gap: 10px; color: var(--faint); font-size: 12px; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* =====================================================================
   v0.5 · rediseño: lo mejor de Things (acabado y tareas), Sunsama (planificar
   el día), Akiflow (bandeja única), Amie (agenda con horas) y Open Design
   (franja de «lo que necesita tu atención").
   ===================================================================== */
:root { --accent: #4F5BF0; --accent-bg: #ECEEFE; --focus: rgba(79, 91, 240, .3); --bg: #F6F6F3; --r-lg: 18px;
  --shadow: 0 1px 2px rgba(20, 20, 18, .045), 0 0 0 1px rgba(20, 20, 18, .015); --shadow-md: 0 10px 30px -12px rgba(20, 20, 18, .18); }
@media (prefers-color-scheme: dark) { :root { --accent: #8E98FF; --accent-bg: rgba(142, 152, 255, .14); --focus: rgba(142, 152, 255, .4); --bg: #0F0F10; --shadow: 0 0 0 1px rgba(255, 255, 255, .035); --shadow-md: 0 10px 30px -12px rgba(0, 0, 0, .7); } }
h1 { font-size: 30px; font-weight: 650; letter-spacing: -.03em; }
.card { border-radius: var(--r-lg); padding: 18px 20px; }
.card-head h2 { font-size: 14.5px; }
.list-h { display: flex; align-items: center; gap: 6px; }
.list-h .ic { width: 13px; height: 13px; }

/* tareas al estilo Things: filas limpias, sin rayas, con aire */
.tasks { border-top: 0; gap: 1px; }
.task { border-bottom: 0; border-radius: 10px; padding: 8px 8px; }
.task:hover { background: var(--surface-2); }
.split-main .task:hover { background: var(--surface); box-shadow: var(--shadow); }
.task-main .it-title { font-size: 14.5px; font-weight: 450; }
.chk { border-radius: 7px; width: 19px; height: 19px; }
.chk.sm { width: 17px; height: 17px; border-radius: 6px; margin-top: 0; }
.chk.sm .ic { width: 11px; height: 11px; }
.chk.on { animation: pop .3s ease; }
.task.done .chk.on, .chk.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip.ok { color: var(--ok); }
.chip.proj i { width: 7px; height: 7px; border-radius: 50%; background: var(--pc); display: inline-block; }
.chip.proj { color: var(--text); }
.group h3 { font-size: 13px; color: var(--text); padding: 0 8px; margin-top: 6px; }
.group h3 span { margin-left: 2px; }
.group.top3 h3 { color: var(--warn); }
.group.top3 h3 .ic { width: 14px; height: 14px; }
.tasks.top3 .task { background: color-mix(in srgb, var(--warn-bg) 55%, transparent); }
.done-list summary { cursor: pointer; font-size: 12.5px; color: var(--faint); padding: 8px; }
.done-list .it-title { text-decoration: line-through; color: var(--faint); }
.ph-txt { display: grid; gap: 6px; min-width: 0; }
.row-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 16px; }

/* sub-menú de tareas: proyectos con anillo de progreso */
.sub-nav .nav-label { display: flex; align-items: center; justify-content: space-between; padding-right: 4px; }
.icon-btn.xs { width: 22px; height: 22px; border-radius: 6px; }
.icon-btn.xs .ic { width: 13px; height: 13px; }
.pdot { color: var(--pc); display: grid; place-items: center; width: 16px; flex: none; }
.sub-add { display: flex; align-items: center; gap: 9px; height: 32px; padding: 0 10px; border-radius: 8px; border: 1px dashed var(--line-strong); background: none; color: var(--faint); font-size: 13px; cursor: pointer; }
.sub-add:hover { color: var(--text); border-color: var(--ink2); }
.proj-head { display: flex; align-items: center; gap: 14px; color: var(--pc); }
.proj-head h1, .proj-head .muted { color: initial; }
.proj-head h1 { color: var(--text); }
.proj-head .muted { color: var(--muted); }
.proj-ring { display: grid; }
.proj-goal { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); font-size: 13.5px; max-width: 70ch; }
.proj-goal .ic { color: var(--accent); width: 16px; height: 16px; margin-top: 2px; }

/* panel lateral de edición (escritorio) / hoja desde abajo (móvil) */
.modal.drawer { margin: 0 0 0 auto; height: 100dvh; max-height: 100dvh; width: min(480px, 100vw); border-radius: 18px 0 0 18px; border-width: 0 0 0 1px; }
.modal.drawer[open] { animation: slide-in .2s cubic-bezier(.2, .8, .2, 1); }
@keyframes slide-in { from { transform: translateX(24px); opacity: 0; } }
.modal.drawer .modal-body { min-height: 100%; align-content: start; padding: 18px 24px 22px; }
.modal.drawer .modal-actions { position: sticky; bottom: -22px; margin: 8px -24px -22px; padding: 12px 24px calc(14px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); }
.drawer-top { display: flex; align-items: center; justify-content: space-between; margin: -4px -8px 0 0; }
.field > span .ic { width: 14px; height: 14px; vertical-align: -2px; margin-right: 4px; }
.hint.kb { font-size: 11.5px; }
.day-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.pill-btn { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 11px; border-radius: 99px; border: 1px solid var(--line-strong); background: var(--surface); font: 500 12.5px/1 var(--font); color: var(--muted); cursor: pointer; white-space: nowrap; transition: background .12s, color .12s, border-color .12s; }
.pill-btn:hover { color: var(--text); border-color: var(--ink2); }
.pill-btn.on { background: var(--ink); border-color: var(--ink); color: var(--ink-text); }
.pill-btn em { font-style: normal; font-size: 11px; opacity: .7; }
.subs { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.sub { display: flex; align-items: center; gap: 8px; padding: 2px 0; }
.sub input { min-height: 32px !important; border-color: transparent !important; background: transparent !important; padding: 0 6px !important; }
.sub input:focus { border-color: var(--line-strong) !important; background: var(--surface) !important; }
.sub.on input { text-decoration: line-through; color: var(--faint); }
.sub .icon-btn { opacity: 0; }
.sub:hover .icon-btn, .sub:focus-within .icon-btn { opacity: 1; }
#sub-new { min-height: 34px; border-style: dashed; }
input[type=datetime-local] { font-family: var(--font); }

/* Inicio: franja de atención */
.attn { display: flex; gap: 8px; flex-wrap: wrap; }
.attn-t { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px 0 6px; border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); font-size: 13px; color: var(--muted); transition: transform .12s, box-shadow .12s; }
.attn-t:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); color: var(--text); }
.attn-t b { font-size: 15px; color: var(--text); font-variant-numeric: tabular-nums; }
.attn-ic { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; background: var(--surface-2); color: var(--muted); }
.attn-ic .ic { width: 15px; height: 15px; }
.attn-t.bad .attn-ic { background: var(--bad-bg); color: var(--bad); }
.attn-t.bad b { color: var(--bad); }
.attn-t.warn .attn-ic { background: var(--warn-bg); color: var(--warn); }
.attn-ic.tone-green { background: var(--green-bg); } .attn-ic.tone-pink { background: var(--pink-bg); } .attn-ic.tone-blue { background: var(--blue-bg); }
.attn.clear { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 12px; background: var(--ok-bg); color: var(--ok); font-size: 13px; font-weight: 500; width: max-content; max-width: 100%; }
.plan-btn { background: var(--accent); border-color: var(--accent); color: #fff; }
.plan-btn:hover { background: var(--accent); opacity: .9; }
.items.timeline { position: relative; padding-left: 4px; }
.items.timeline .it { position: relative; }
.items.timeline .it-when { font-weight: 600; color: var(--text); }
.tl-now { list-style: none; display: flex; align-items: center; gap: 8px; margin: 2px 0; color: var(--bad); font-size: 11px; font-weight: 600; }
.tl-now::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--bad); }
.tl-now::after { content: ''; flex: 1; height: 1px; background: color-mix(in srgb, var(--bad) 45%, transparent); }

/* Pendiente */
.att-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; align-items: start; }
.src-dot.tone-bad { background: var(--bad-bg); color: var(--bad); } .src-dot.tone-warn { background: var(--warn-bg); color: var(--warn); }
.nav-count.warn { background: var(--bad); color: #fff; }
.alert.warn { background: var(--warn-bg); color: var(--warn); }

/* planificar el día / revisar la semana */
.ritual h2 { font-size: 22px; letter-spacing: -.02em; }
.rit-steps { display: flex; gap: 4px; }
.rit-steps span { flex: 1; height: 4px; border-radius: 99px; background: var(--surface-3); transition: background .2s; }
.rit-steps span.done { background: color-mix(in srgb, var(--accent) 45%, var(--surface-3)); }
.rit-steps span.on { background: var(--accent); }
.rit-body { display: grid; gap: 10px; align-content: start; }
.tri-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.tri { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--surface-2); transition: opacity .2s, transform .2s; flex-wrap: wrap; }
.tri.gone { opacity: 0; transform: translateX(16px); }
.tri-t { flex: 1; min-width: 160px; font-weight: 500; }
.tri-b { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.star-btn { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; border: 0; background: var(--surface); color: var(--faint); cursor: pointer; }
.star-btn.on { background: var(--warn-bg); color: var(--warn); }
.star-btn.on .ic { fill: currentColor; }
.proj-rev { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.proj-rev li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.proj-rev li > div { flex: 1; display: grid; gap: 2px; min-width: 0; }
.proj-rev .pdot { margin-top: 2px; }
.next-step input { margin-top: 6px; min-height: 34px; }
.all-clear.big { flex-direction: column; text-align: center; padding: 30px 10px; }
.all-clear.big .ic { color: var(--accent); width: 44px; height: 44px; }

/* calendario con horas */
.cal-head { grid-template-columns: auto 1fr auto auto; }
.cal-head .layers { grid-column: 1 / -1; justify-content: flex-start; }
.cal-mode { justify-self: end; }
.tv-card { overflow: hidden; }
.tv { --tvl: 52px; }
.tv-head, .tv-all { display: grid; grid-template-columns: var(--tvl) repeat(var(--cols), minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.tv-dh { display: flex; align-items: baseline; justify-content: center; gap: 6px; padding: 10px 4px 8px; color: var(--muted); font-size: 12px; text-transform: capitalize; }
.tv-dh b { font-size: 18px; color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.tv-dh.today b { background: var(--accent); color: #fff; border-radius: 9px; padding: 0 7px; }
.tv-l { font-size: 10.5px; color: var(--faint); padding: 6px 6px 0 0; text-align: right; }
.tv-ad { display: grid; gap: 2px; align-content: start; padding: 4px 3px; min-height: 30px; border-left: 1px solid var(--line); min-width: 0; }
.tv-chip { display: block; width: 100%; text-align: left; border: 0; font: 500 11.5px/1.3 var(--font); padding: 3px 6px; border-radius: 6px; background: var(--surface-2); color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.tv-chip.t { background: transparent; box-shadow: inset 0 0 0 1px var(--line-strong); }
.tv-chip.tone-green { background: var(--green-bg); color: var(--green); } .tv-chip.tone-pink { background: var(--pink-bg); color: var(--pink); } .tv-chip.tone-blue { background: var(--blue-bg); color: var(--blue); } .tv-chip.tone-violet { background: var(--violet-bg); color: var(--violet); }
.tv-chip[style*='--ec'] { box-shadow: inset 3px 0 0 var(--ec); }
.tv-chip.big { background: var(--pink); color: #fff; }
.tv-body { position: relative; display: grid; grid-template-columns: var(--tvl) repeat(var(--cols), minmax(0, 1fr)); max-height: min(68vh, 760px); overflow-y: auto; overscroll-behavior: contain; }
.tv-hours { position: relative; }
.tv-hours span { position: absolute; right: 8px; transform: translateY(-50%); font-size: 10.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
.tv-hours span:first-child { transform: none; }
.tv-col { position: relative; border-left: 1px solid var(--line); background-image: repeating-linear-gradient(to bottom, var(--line) 0 1px, transparent 1px var(--px)); cursor: copy; }
.tv-col.today { background-color: color-mix(in srgb, var(--accent-bg) 45%, transparent); }
.tv-col.drop-hl, .tv-ad.drop-hl { background-color: var(--accent-bg); }
.tv-now { position: absolute; left: -1px; right: 0; height: 2px; background: var(--bad); z-index: 3; pointer-events: none; }
.tv-now::before { content: ''; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--bad); }
.tb { position: absolute; z-index: 2; display: grid; align-content: start; gap: 0; text-align: left; overflow: hidden; padding: 3px 6px; border-radius: 7px; border: 0; background: var(--surface-3); color: var(--text); font: 400 11px/1.3 var(--font); cursor: pointer; box-shadow: inset 3px 0 0 var(--ec, var(--ink)); touch-action: none; user-select: none; }
.tb b { font-weight: 600; font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb span { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb.t { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-strong), inset 3px 0 0 var(--ink2); }
.tb.tone-green { background: var(--green-bg); box-shadow: inset 3px 0 0 var(--green); } .tb.tone-pink { background: var(--pink-bg); box-shadow: inset 3px 0 0 var(--pink); }
.tb.tone-blue { background: var(--blue-bg); box-shadow: inset 3px 0 0 var(--blue); } .tb.tone-violet { background: var(--violet-bg); box-shadow: inset 3px 0 0 var(--violet); }
.tb:hover { filter: brightness(.97); z-index: 4; }
.tb.dragging, .tv-chip.dragging { z-index: 10; opacity: .85; box-shadow: var(--shadow-lg); cursor: grabbing; transition: none; position: relative; }
.tb.dragging { position: absolute; }
body.is-dragging { cursor: grabbing; user-select: none; }

/* archivos */
.file-bar { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.chips-row { display: flex; gap: 6px; flex-wrap: wrap; }
.search-in { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px; border-radius: 10px; background: var(--surface); box-shadow: var(--shadow); color: var(--faint); min-width: 220px; }
.search-in input { border: 0 !important; box-shadow: none !important; min-height: 0 !important; height: 32px; padding: 0 !important; background: transparent !important; }
.file-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.file-card { position: relative; display: grid; background: var(--surface); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; transition: transform .12s, box-shadow .12s; }
.file-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.file-thumb { display: grid; place-items: center; aspect-ratio: 4 / 3; background: var(--surface-2); overflow: hidden; }
.file-thumb img { width: 100%; height: 100%; object-fit: cover; }
.file-ext { display: grid; justify-items: center; gap: 4px; color: var(--faint); }
.file-ext b { font: 600 11px/1 var(--mono); letter-spacing: .05em; color: var(--muted); }
.file-meta { display: grid; gap: 3px; padding: 10px 12px 12px; text-align: left; border: 0; background: none; cursor: pointer; min-width: 0; }
.file-meta strong { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-meta .chip { margin-top: 2px; }
.file-dl { position: absolute; top: 8px; right: 8px; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(6px); opacity: 0; }
.file-card:hover .file-dl { opacity: 1; }
@media (hover: none) { .file-dl { opacity: 1; } }
.file-preview { width: 100%; max-height: 260px; object-fit: contain; border-radius: 12px; background: var(--surface-2); }
.drop-empty { display: grid; justify-items: center; gap: 10px; text-align: center; padding: 56px 20px; border: 2px dashed var(--line-strong); border-radius: 18px; color: var(--muted); }
.files-page { position: relative; }
.drop-over { display: none; position: fixed; inset: 12px; z-index: 40; border: 3px dashed var(--accent); border-radius: 22px; background: color-mix(in srgb, var(--accent-bg) 85%, transparent); place-items: center; align-content: center; gap: 8px; color: var(--accent); font-weight: 600; font-size: 16px; pointer-events: none; }
.files-page.over .drop-over { display: grid; }
.drop-over .ic { color: var(--accent); }

/* barra inferior: número de pendientes en Inicio */
.tabbar a { position: relative; }
.tab-n { position: absolute; top: 4px; left: calc(50% + 6px); min-width: 16px; height: 16px; padding: 0 4px; border-radius: 99px; background: var(--bad); color: #fff; font: 600 10px/16px var(--font); font-style: normal; text-align: center; }

@media (max-width: 960px) {
  .cal-head { grid-template-columns: 1fr auto; }
  .cal-mode { justify-self: start; }
}
@media (max-width: 760px) {
  h1 { font-size: 25px; }
  .row-head { grid-template-columns: 1fr; align-items: start; }
  .row-head .btn-group { flex-wrap: wrap; }
  .modal.drawer { margin: auto 0 0; width: 100vw; max-width: 100vw; height: auto; max-height: 92dvh; border-radius: 20px 20px 0 0; border-width: 1px 0 0; }
  .modal.drawer[open] { animation: sheet-up .22s cubic-bezier(.2, .8, .2, 1); }
  @keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } }
  .modal.drawer .modal-body { padding: 14px 16px 18px; }
  .modal.drawer .modal-actions { margin: 8px -16px -18px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
  .hint.kb { display: none; }
  .attn { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px 4px; }
  .attn-t { flex: none; }
  .att-grid { grid-template-columns: 1fr; }
  .search-in { min-width: 0; width: 100%; }
  .file-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .chips-row { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
  .chips-row .pill-btn { flex: none; }
  .tv { --tvl: 40px; }
  .tv-body { max-height: 64vh; }
  .tv-dh { flex-direction: column; align-items: center; gap: 0; padding: 6px 2px; }
  .tv-dh b { font-size: 15px; }
  .tb { padding: 2px 4px; }
  .tb span { display: none; }
  .tri-t { min-width: 100%; }
}
.sub-nav a > span.pdot { flex: none; width: 16px; overflow: visible; }
.file-meta .chip.d-soon { color: var(--warn); } .file-meta .chip.d-late { color: var(--bad); }
.seg.cal-mode { flex-wrap: nowrap; }

/* =====================================================================
   v0.6 · REDISEÑO
   - Cada sección con su color (menú, títulos, tarjetas), como Things.
   - Cabecera del Inicio con degradado según la hora y el tiempo dentro.
   - Tarjetas sin bordes, más aire, esquinas más redondas.
   - Tareas con casilla redonda; botones principales en color.
   - Móvil: barra inferior flotante.
   ===================================================================== */
:root {
  --bg: #F3F2EE; --surface: #FFFFFF; --surface-2: #F4F3EF; --surface-3: #E8E7E2; --line: #ECEBE6; --line-strong: #DAD9D3;
  --text: #17171A; --muted: #66665F; --faint: #9A9A93;
  --accent: #5B5CF0; --accent-2: #8B5CF6; --accent-bg: #EEEEFE; --focus: rgba(91, 92, 240, .28);
  --r: 12px; --r-lg: 22px;
  --shadow: 0 1px 2px rgba(23, 23, 26, .04), 0 4px 14px -6px rgba(23, 23, 26, .07);
  --shadow-md: 0 14px 34px -14px rgba(23, 23, 26, .22);
  /* color de cada sección */
  --c-inicio: #5B5CF0; --c-pendiente: #F0473D; --c-tareas: #2F80ED; --c-gym: #F2683C; --c-calendario: #E5484D;
  --c-listas: #22A06B; --c-notas: #E9A800; --c-archivos: #0EA5B7; --c-habitos: #8B5CF6; --c-usuarios: #6B6B66; --c-cuenta: #6B6B66;
  --f-bandeja: #2F80ED; --f-hoy: #E9A800; --f-semana: #E5484D; --f-programadas: #8B5CF6; --f-todas: #6B6B66; --f-hechas: #22A06B;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0C0C0E; --surface: #161619; --surface-2: #1E1E22; --surface-3: #2A2A2F; --line: #232328; --line-strong: #33333A;
    --text: #F1F1EE; --muted: #A5A59F; --faint: #6F6F6A;
    --accent: #8587FF; --accent-2: #A78BFA; --accent-bg: rgba(133, 135, 255, .14); --focus: rgba(133, 135, 255, .38);
    --shadow: 0 0 0 1px rgba(255, 255, 255, .04); --shadow-md: 0 16px 40px -14px rgba(0, 0, 0, .8);
    --c-inicio: #8587FF; --c-pendiente: #FF6B62; --c-tareas: #5AA2FF; --c-gym: #FF8A5C; --c-calendario: #FF6B6F;
    --c-listas: #3DD68C; --c-notas: #F5C542; --c-archivos: #2CCBDD; --c-habitos: #A78BFA; --c-usuarios: #A5A59F; --c-cuenta: #A5A59F;
    --f-bandeja: #5AA2FF; --f-hoy: #F5C542; --f-semana: #FF6B6F; --f-programadas: #A78BFA; --f-todas: #A5A59F; --f-hechas: #3DD68C;
  }
}
body { font-size: 14.5px; }
h1 { font-size: 32px; font-weight: 700; letter-spacing: -.035em; }

/* ---------- menú lateral ---------- */
@media (min-width: 761px) { .shell { grid-template-columns: 252px minmax(0, 1fr); } }
.side { background: var(--surface-2); border-right: 0; padding: 18px 12px 14px; gap: 10px; }
.brand { font-size: 16px; font-weight: 700; letter-spacing: -.02em; }
.logo { width: 30px; height: 30px; border-radius: 9px; }
.nav { gap: 18px; }
.nav-search { height: 38px; border-radius: 11px; border: 0; box-shadow: var(--shadow); font-size: 13.5px; }
.nav-item { height: 38px; gap: 11px; padding: 0 8px; border-radius: 11px; font-size: 14px; color: var(--text); font-weight: 500; }
.nav-item:hover { background: color-mix(in srgb, var(--surface) 70%, transparent); }
.nav-item.on { background: var(--surface); box-shadow: var(--shadow); font-weight: 600; }
.nav-ic { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: color-mix(in srgb, var(--nc) 14%, transparent); color: var(--nc); flex: none; transition: background .15s, color .15s; }
.nav-ic .ic { width: 16px; height: 16px; stroke-width: 2; }
.nav-item.on .nav-ic { background: var(--nc); color: #fff; }
.nav-item .dot { width: 26px; height: 26px; margin: 0; border-radius: 8px; background: color-mix(in srgb, currentColor 16%, transparent); position: relative; }
.nav-item .dot::after { content: ''; position: absolute; inset: 9px; border-radius: 3px; background: currentColor; }
.nav-label { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; font-weight: 600; padding-left: 10px; }
.nav-count { background: color-mix(in srgb, var(--nc, var(--muted)) 16%, transparent); color: var(--nc, var(--muted)); font-weight: 700; }
.nav-count.warn { background: var(--c-pendiente); color: #fff; }
.side-foot { border-top: 0; padding: 10px 6px 0; }
.me { padding: 8px; border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); }

/* ---------- títulos de página ---------- */
.page { padding: 44px 48px 80px; gap: 26px; }
.page-head h1 { display: flex; align-items: center; gap: 14px; }
.h1-ic { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; background: var(--nc); color: #fff; flex: none; box-shadow: 0 8px 20px -10px var(--nc); }
.h1-ic .ic { width: 22px; height: 22px; stroke-width: 2; }
.page-head .muted { font-size: 14.5px; }

/* ---------- tarjetas ---------- */
.card { border: 0; border-radius: var(--r-lg); padding: 22px 24px; box-shadow: var(--shadow); gap: 14px; }
.card-head { min-height: 32px; gap: 10px; }
.card-head h2 { font-size: 15.5px; font-weight: 650; letter-spacing: -.015em; gap: 10px; }
.card-head h2 > .ic { box-sizing: content-box; width: 16px; height: 16px; padding: 7px; border-radius: 10px; background: color-mix(in srgb, var(--hc, var(--muted)) 14%, transparent); color: var(--hc, var(--muted)); stroke-width: 2; }
.card.today { --hc: var(--f-hoy); } .card.wx { --hc: #0EA5E9; } .card.habits { --hc: var(--c-habitos); } .card.week { --hc: var(--c-calendario); }
.card.notes-mini { --hc: var(--c-notas); } .card.links { --hc: var(--c-archivos); } .card.week-sum { --hc: var(--accent); }
.card.att:nth-child(1) { --hc: var(--c-pendiente); } .card.att:nth-child(2) { --hc: var(--f-hoy); } .card.att { --hc: var(--accent); }
.list-h { font-size: 11px; letter-spacing: .07em; margin-top: 6px; }
.kpi { border: 0; border-radius: 18px; padding: 18px 18px 16px; box-shadow: var(--shadow); }
.kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.kpi-v { font-size: 28px; font-weight: 700; letter-spacing: -.035em; }

/* ---------- botones y campos ---------- */
.btn { height: 36px; border-radius: 11px; border-color: transparent; background: var(--surface); box-shadow: var(--shadow); font-weight: 600; }
.btn:hover { background: var(--surface-2); }
.btn.primary, .plan-btn { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 6px 16px -8px var(--accent); }
.btn.primary:hover, .plan-btn:hover { background: var(--accent); opacity: .92; }
.btn.ghost { box-shadow: none; }
.btn.sm { height: 30px; border-radius: 9px; }
input:not([type=checkbox]):not([type=radio]), select, textarea { border-radius: 11px; background: var(--surface-2); border-color: transparent; }
input:focus, select:focus, textarea:focus { background: var(--surface); }
.quick { border-radius: 14px; min-height: 46px; background: var(--surface-2); }
.quick.big { min-height: 52px; background: var(--surface); box-shadow: var(--shadow); }
.quick-ic { color: var(--accent); }
.seg { border-radius: 11px; }
.seg input:checked + span { border-radius: 8px; }
.pill-btn { border: 0; box-shadow: var(--shadow); height: 30px; font-weight: 600; }
.pill-btn.on { background: var(--accent); color: #fff; }

/* ---------- tareas: casilla redonda con el color de la prioridad ---------- */
.chk { width: 22px; height: 22px; border-radius: 50%; border-width: 2px; margin-top: 0; }
.chk .ic { width: 12px; height: 12px; }
.chk:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-bg); }
.chk.p1 { border-color: var(--p1); background: color-mix(in srgb, var(--p1) 10%, transparent); }
.chk.p2 { border-color: var(--p2); background: color-mix(in srgb, var(--p2) 10%, transparent); }
.chk.p3 { border-color: var(--p3); background: color-mix(in srgb, var(--p3) 12%, transparent); }
.chk.on, .task.done .chk.on { background: var(--ok); border-color: var(--ok); color: #fff; }
.chk.sm { width: 18px; height: 18px; }
.task { padding: 11px 10px; gap: 12px; align-items: center; border-radius: 14px; }
.task-main .it-title { font-size: 15px; font-weight: 500; }
.split-main .tasks { background: var(--surface); border-radius: 18px; box-shadow: var(--shadow); padding: 6px; }
.split-main .task:hover { box-shadow: none; background: var(--surface-2); }
.group { gap: 8px; }
.group h3 { font-size: 15px; font-weight: 700; padding: 0 4px; letter-spacing: -.01em; }
.chip { font-size: 12.5px; }
.it { padding: 8px 8px; border-radius: 12px; gap: 12px; }
.it-title { font-size: 14px; }
.src-dot { width: 26px; height: 26px; border-radius: 9px; }
.src-dot .ic { width: 14px; height: 14px; }

/* menú de Tareas con iconos de color */
.sub-nav { gap: 2px; }
.sub-nav a { height: 36px; border-radius: 11px; color: var(--text); }
.sub-nav a > .ic { color: var(--nc, var(--muted)); }
.sub-nav a.on { background: var(--surface); box-shadow: var(--shadow); font-weight: 600; }
.sub-nav a.on > .ic { color: var(--nc, var(--accent)); }

/* ---------- Inicio: cabecera con la hora del día ---------- */
.hero2 { position: relative; display: grid; gap: 22px; padding: 30px 32px 24px; border-radius: 28px; overflow: hidden; color: var(--text); box-shadow: var(--shadow); isolation: isolate; }
.hero2::before { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--hg); }
.hero2::after { content: ''; position: absolute; width: 420px; height: 420px; right: -120px; top: -220px; z-index: -1; border-radius: 50%; background: radial-gradient(closest-side, var(--hglow), transparent); }
.tod-morning { --hg: linear-gradient(135deg, #FFF3E2 0%, #FFE2D3 45%, #FDE7F1 100%); --hglow: rgba(255, 184, 108, .55); }
.tod-day { --hg: linear-gradient(135deg, #E9F3FF 0%, #E4ECFF 50%, #EFE9FF 100%); --hglow: rgba(120, 170, 255, .45); }
.tod-evening { --hg: linear-gradient(135deg, #FFE7E0 0%, #F4E1FA 55%, #E3E3FF 100%); --hglow: rgba(255, 140, 170, .45); }
.tod-night { --hg: linear-gradient(135deg, #E6E7FF 0%, #E9E2FA 60%, #DDE7F7 100%); --hglow: rgba(130, 120, 255, .4); }
@media (prefers-color-scheme: dark) {
  .tod-morning { --hg: linear-gradient(135deg, #2A1D14 0%, #2A1820 60%, #1B1622 100%); --hglow: rgba(255, 160, 90, .25); }
  .tod-day { --hg: linear-gradient(135deg, #14203A 0%, #171C38 55%, #1E1834 100%); --hglow: rgba(90, 140, 255, .28); }
  .tod-evening { --hg: linear-gradient(135deg, #2C1622 0%, #24183A 55%, #171A34 100%); --hglow: rgba(255, 110, 150, .25); }
  .tod-night { --hg: linear-gradient(135deg, #12132B 0%, #1A1533 60%, #0F1A2C 100%); --hglow: rgba(120, 110, 255, .3); }
}
.hero-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; }
.hero2 .hero-txt { display: grid; gap: 8px; }
.hero2 h1 { font-size: 40px; letter-spacing: -.04em; line-height: 1.05; }
.hero2 .eyebrow { font-weight: 600; color: color-mix(in srgb, var(--text) 60%, transparent); }
.hero2 .brief { font-size: 16px; color: color-mix(in srgb, var(--text) 75%, transparent); }
.hero-side { display: grid; gap: 10px; justify-items: end; flex: none; }
.hero-wx { display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 10px; border-radius: 16px; background: color-mix(in srgb, var(--surface) 62%, transparent); backdrop-filter: blur(10px); }
.hero-wx .ic { width: 30px; height: 30px; color: #F59E0B; stroke-width: 1.6; }
.hero-wx b { font-size: 26px; font-weight: 700; letter-spacing: -.04em; }
.hero-wx span { display: grid; font-size: 12px; color: var(--muted); line-height: 1.3; }
.hero-wx strong { color: var(--text); font-size: 13px; }
.hero2 .search-btn { background: color-mix(in srgb, var(--surface) 70%, transparent); border: 0; backdrop-filter: blur(10px); box-shadow: none; border-radius: 14px; height: 42px; }
.hero2 .attn-t { background: color-mix(in srgb, var(--surface) 72%, transparent); backdrop-filter: blur(10px); box-shadow: none; border-radius: 14px; height: 44px; }
.hero2 .attn-t:hover { background: var(--surface); }
.hero2 .attn.clear { background: color-mix(in srgb, var(--surface) 72%, transparent); }
.focus { border-radius: 16px; height: 50px; border: 0; background: var(--surface); box-shadow: var(--shadow); }
.focus .ic { color: var(--c-pendiente); }
.week-sum { background: var(--surface); }
.wk-t { border: 0 !important; background: var(--surface-2); border-radius: 14px; }

/* ---------- panel lateral ---------- */
.modal.drawer { border: 0; box-shadow: -30px 0 80px -30px rgba(0, 0, 0, .35); }
.modal.drawer .title-in { font-size: 24px !important; }
.modal { border-radius: 24px; border: 0; }

/* ---------- calendario / archivos ---------- */
.cal, .tv-card { border: 0; border-radius: 22px; box-shadow: var(--shadow); }
.layer { border: 0; background: var(--surface-2); }
.layer.on { box-shadow: var(--shadow); }
.file-card { border-radius: 18px; }
.drop-empty { border-radius: 22px; background: var(--surface); border-color: var(--line-strong); }

/* ---------- móvil ---------- */
@media (max-width: 960px) { .page { padding: 32px 24px 72px; } }
@media (max-width: 760px) {
  .side { background: color-mix(in srgb, var(--bg) 85%, transparent); padding: 10px 16px; }
  .page { padding: 18px 14px 120px; gap: 18px; }
  h1 { font-size: 26px; }
  .h1-ic { width: 36px; height: 36px; border-radius: 11px; }
  .h1-ic .ic { width: 19px; height: 19px; }
  .hero2 { padding: 22px 18px 18px; border-radius: 24px; gap: 16px; }
  .hero2 h1 { font-size: 30px; }
  .hero-top { flex-direction: column; gap: 14px; }
  .hero-side { justify-items: stretch; width: 100%; grid-template-columns: auto 1fr; align-items: center; }
  .hero2 .search-btn { width: 100%; }
  .hero2 .search-btn kbd { display: none; }
  .hero2 .attn { margin: 0 -18px; padding: 2px 18px 2px; }
  .card { padding: 18px 16px; border-radius: 20px; }
  .tabbar { left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); padding: 6px; border: 0; border-radius: 22px; background: color-mix(in srgb, var(--surface) 82%, transparent); backdrop-filter: blur(18px) saturate(1.6); box-shadow: 0 12px 34px -10px rgba(0, 0, 0, .3), 0 0 0 1px color-mix(in srgb, var(--text) 6%, transparent); }
  .tabbar a, .tabbar button { padding: 7px 0 6px; border-radius: 16px; color: var(--muted); }
  .tabbar .on { color: var(--accent); background: var(--accent-bg); }
  .tab-n { top: 3px; }
  .split-main .tasks { border-radius: 16px; }
  .sub-nav a { box-shadow: var(--shadow); background: var(--surface); }
  .sub-nav a.on { background: var(--accent); color: #fff; }
  .sub-nav a.on > .ic { color: #fff; }
  .toast { bottom: calc(96px + env(safe-area-inset-bottom)); }
}
.sub-nav a > span.pdot { flex: none !important; }
@media (max-width: 760px) {
  .hero-side { grid-template-columns: 1fr; }
  .hero-wx { justify-self: start; }
  .focus { height: auto; min-height: 50px; padding: 10px 14px; }
}
.card-head h2 > .space-ic.sm { width: 30px; height: 30px; border-radius: 10px; flex: none; line-height: 0; padding: 0; }
.card-head h2 > .space-ic.sm .ic { width: 16px; height: 16px; margin: 0; stroke-width: 2; }

/* gym: editor de la rutina */
.gx-days, .gx-rems { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.gx-days li { display: flex; align-items: center; gap: 6px; background: var(--surface); border-radius: 18px; box-shadow: var(--shadow); padding: 4px 8px 4px 4px; }
.gx-day { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; color: var(--text); }
.gx-day:hover { background: var(--surface-2); }
.gx-day > .ic { color: var(--faint); }
.gx-dot { width: 12px; height: 34px; border-radius: 6px; background: var(--dc); flex: none; }
.gx-li { flex: 1; min-width: 0; display: grid; gap: 2px; }
.gx-li strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gx-move { display: inline-flex; flex: none; }
.gx-move .ic { transform: rotate(90deg); }
.gx-move button:disabled { opacity: .25; cursor: default; }
.gx-list li { display: flex; align-items: center; gap: 4px; padding-right: 6px; }
.gx-list li > a { flex: 1; min-width: 0; }
.gx-rems li { display: flex; align-items: center; gap: 12px; padding: 10px 8px 10px 12px; border-radius: 14px; background: var(--surface-2); }
.gx-rem-h { font: 700 18px/1 var(--font); letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--c-gym); min-width: 52px; }
.gx-pic { display: flex; align-items: center; gap: 10px; }
.gx-pic input { flex: 1; }
.gx-pics { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; max-height: 300px; overflow-y: auto; }
.gx-pics:empty { display: none; }
.gx-pick { display: grid; gap: 4px; padding: 4px; border: 0; border-radius: 12px; background: var(--surface-2); cursor: pointer; text-align: left; }
.gx-pick:hover { background: var(--accent-bg); }
.gx-pick img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 9px; background: #fff; }
.gx-pick span { font-size: 11px; line-height: 1.25; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 760px) { .gx-dayhead { flex-wrap: wrap; } .gx-days li { padding-right: 4px; } }
.days-pick[hidden] { display: none; }
[hidden] { display: none !important; }
