/* Clepsidra web app. Tokens copied from the v7.23 mock-up (maqueta-hoy-v7-23-2026-11-18.html), the same
   ones the Android app's ClepsidraColors.kt takes (Arcilla today; the other three arrive there in phase 3b).
   Component sizes follow the mock-up's phone values; wide screens only rearrange them into columns. */
html.t-arc { --bg: #F0CDB9; --on: #3A160A; --onv: #6B3A26; --pri: #AE5332; --onPri: #FFFFFF; --low: #FFF8F4; --lowest: #FFF8F4; --high: #F8E3D7; --outV: #C99A82; --act: #EE9A72; --onAct: #4A1A06; --rail: #EBBFA7; --sheet: #FFF8F4; --late: #8A2346; --lateBg: #FFF8F4; --ok: #3F6B3A; --water: #EE9A72; color-scheme: light; }
html.t-arcm { --bg: #000000; --on: #DDE7E8; --onv: #A8B8BB; --pri: #D39072; --onPri: #2E1004; --low: #111A21; --lowest: #0B1116; --high: #18232B; --outV: #506067; --act: #873E21; --onAct: #EBCDBC; --rail: #0B1116; --sheet: #111A21; --late: #E8735A; --lateBg: #2A1712; --ok: #8CC08A; --water: #873E21; color-scheme: dark; }
html.t-clr { --bg: #F7F3F0; --on: #1D1A18; --onv: #4F4844; --pri: #B5694B; --onPri: #FFFFFF; --low: #F3EEEA; --lowest: #FFFFFF; --high: #EEE6E0; --outV: #7B716B; --act: #EDD3C5; --onAct: #3A1405; --rail: #EAE0D9; --sheet: #F7F3F0; --late: #8A2346; --lateBg: #F3EEEA; --ok: #2E7D32; --water: #EDD3C5; color-scheme: light; }
html.t-oscn { --bg: #070C11; --on: #DDE7E8; --onv: #A8B8BB; --pri: #A35A3A; --onPri: #FFFFFF; --low: #142022; --lowest: #0D151B; --high: #202D36; --outV: #506067; --act: #7A3A20; --onAct: #F3DED3; --rail: #0D151B; --sheet: #142022; --late: #E8735A; --lateBg: #2A1712; --ok: #74B98A; --water: #7A3A20; color-scheme: dark; }
/* In the darks the Now card sits on the raised charcoal; in the lights, 16 % of the accent over the card. */
html { --now: color-mix(in srgb, var(--pri) 16%, var(--low)); }
html.t-arcm, html.t-oscn { --now: var(--high); --shadow: rgba(0, 0, 0, .5); }

body { background: var(--bg); }
/* Only after the first paint, so a dark page does not fade in from the light default on load. */
body.ready { transition: background-color .25s; }

/* =================== Door (same layout as Caudal's) =================== */
.door { min-height: 100dvh; display: flex; flex-direction: column; }
.door-top { display: flex; justify-content: space-between; align-items: center; padding: 16px 24px; }
.door-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--on); font-weight: 800; text-decoration: none; }
.door-brand img { width: 30px; height: 30px; border-radius: 9px; }
.door-main { flex: 1; width: 100%; max-width: 1100px; margin: 0 auto; padding: 24px 24px 40px; display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.door-icon { width: 88px; height: 88px; border-radius: 24px; box-shadow: 0 14px 34px rgba(90, 36, 12, .22); }
.door-name { margin: 22px 0 6px; color: var(--pri); font-weight: 800; letter-spacing: .02em; }
.door h1 { font-size: clamp(34px, 5vw, 56px); font-weight: 800; letter-spacing: -.03em; line-height: 1.04; }
.door-sub { margin-top: 16px; max-width: 30em; color: var(--onv); font-size: 18px; }
.door-pts { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 12px; }
.door-pts li { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.door-pts .ic { color: var(--pri); }
.door-card { padding: 28px; border-radius: 28px; background: var(--low); box-shadow: 0 0 0 1px color-mix(in srgb, var(--outV) 50%, transparent), 0 24px 60px var(--shadow, rgba(90, 36, 12, .14)); }
.door-card h2 { font-size: 22px; font-weight: 800; }
.door-card > p { color: var(--onv); margin: 8px 0 20px; font-size: 15px; }
.or { display: flex; align-items: center; gap: 12px; margin: 14px 0; color: var(--onv); font-size: 13px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--outV); }
.fine { margin-top: 14px; color: var(--onv); font-size: 13px; }
.fine.links { display: flex; gap: 18px; }
.door-water { width: 100%; height: 90px; }
.door-water path:first-child { fill: var(--water); }
@media (max-width: 899px) {
  .door-main { grid-template-columns: 1fr; gap: 32px; padding-top: 8px; }
  .door-icon { width: 72px; height: 72px; border-radius: 20px; }
}

/* =================== Bar =================== */
.bar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; min-height: 72px; padding: 8px 20px;
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.bar-brand img { width: 36px; height: 36px; border-radius: 10px; }
.day-t { min-width: 0; }
.day-t b { display: block; font-size: 22px; line-height: 28px; font-weight: 700; letter-spacing: -.3px; }
.day-t small { display: block; font-size: 13px; line-height: 18px; color: var(--onv); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.streak { height: 26px; padding: 0 10px; border-radius: 13px; background: var(--low); font-weight: 700; font-size: 13px; display: grid; place-items: center; }
.grow { flex: 1; }
.clock-chip {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border: 0; border-radius: 18px;
  background: var(--low); color: var(--on); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--outV) 60%, transparent);
}
.clock-chip b { font-size: 16px; font-variant-numeric: tabular-nums; }
.clock-chip small { color: var(--onv); font-size: 12px; font-weight: 600; }
.sync { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border-radius: 15px; color: var(--onv); font-size: 12px; font-weight: 700; box-shadow: inset 0 0 0 1px var(--outV); white-space: nowrap; }
.sync .ic { width: 15px; height: 15px; }
#who { display: inline-flex; }
#who .av { cursor: pointer; }

/* =================== Layout: three columns on wide screens =================== */
.hoy {
  display: grid; grid-template-columns: minmax(340px, 1.1fr) minmax(320px, 1fr) 320px; gap: 24px; align-items: start;
  max-width: 1400px; margin: 0 auto; padding: 6px 24px 40px;
}
.c-side { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 16px; }
.card { border-radius: 20px; background: var(--low); }
.side-card { padding: 16px; }
.side-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.side-h b { font-size: 16px; font-weight: 800; }
.side-note { margin: 6px 0 12px; color: var(--onv); font-size: 13px; line-height: 18px; }
.adv { display: flex; gap: 8px; }
.adv .btn { flex: 1; padding: 0 8px; font-size: 14px; }

/* section heads (.hh in the mock-up) */
.hh { display: flex; justify-content: space-between; align-items: baseline; margin: 22px 4px 8px; }
.c-day > .hh:first-child { margin-top: 10px; }
.hh b { font-size: 18px; line-height: 24px; font-weight: 700; }
.hh small { font-size: 13px; color: var(--onv); }
.lnk { min-height: 44px; padding: 0 12px; border: 0; background: none; color: var(--pri); font-weight: 600; display: inline-flex; align-items: center; }
.hh .lnk { font-size: 13px; padding: 0; min-height: 36px; }

/* =================== Ahora (hero) =================== */
.pause-strip { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; margin-top: 10px; border-radius: 16px; background: var(--act); color: var(--onAct); font-weight: 700; }
.pause-strip small { display: block; font-weight: 500; font-size: 13px; }
.pause-strip .lnk { color: var(--onAct); text-decoration: underline; }
.hero { border-radius: 24px; padding: 18px 16px 16px; margin: 10px 0 0; background: var(--now); }
.hero.late { background: var(--low); box-shadow: inset 3px 0 0 var(--late); }
html.t-arcm .hero.late, html.t-oscn .hero.late { background: var(--high); }
/* Web only: in the darks the secondary buttons are the card's own colour (also in the mock-up), so they get a hairline. */
html.t-arcm .hero .btn:not(.p), html.t-oscn .hero .btn:not(.p) { box-shadow: inset 0 0 0 1px var(--outV); }
.eyb { display: flex; align-items: center; gap: 6px; font-size: 13px; line-height: 18px; font-weight: 600; color: var(--onv); }
.hero.late .eyb { color: var(--late); }
.ht { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.ht > div { min-width: 0; overflow-wrap: anywhere; }
.ht img { width: 48px; height: 48px; flex: none; }
.ht b { display: block; font-size: 26px; line-height: 32px; font-weight: 700; letter-spacing: -.5px; }
.ht small { display: block; font-size: 14px; line-height: 20px; color: var(--onv); }
.msg { margin-top: 12px; font-size: 16px; line-height: 22px; font-weight: 600; }
.count { margin-top: 12px; font-weight: 700; font-size: 52px; line-height: 60px; letter-spacing: -2px; font-variant-numeric: tabular-nums; }
.count small { font-size: 26px; font-weight: 600; letter-spacing: -.5px; color: var(--onv); }
.note { margin-top: 6px; color: var(--onv); font-size: 14px; line-height: 20px; }
.acts { display: flex; gap: 8px; margin-top: 16px; }
.acts.two { margin-top: 8px; }
.acts .btn { flex: 1; min-width: 0; height: 52px; padding: 0 8px; border-radius: 26px; font-weight: 700; font-size: 16px; white-space: normal; line-height: 1.15; }
.acts .btn.p { flex: 1.4; }
.acts.two .btn { height: 48px; border-radius: 24px; font-weight: 600; font-size: 15px; }
.links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin-top: 6px; }
.hero.late .lnk { color: var(--on); }
.under { display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 6px; padding: 8px 12px; border: 0; border-radius: 14px; background: var(--low); color: var(--on); text-align: left; }
.under img { width: 24px; height: 24px; flex: none; }
.under b { display: block; font-size: 14px; line-height: 19px; font-weight: 600; }
.under small { display: block; font-size: 12px; line-height: 16px; color: var(--onv); }
.sim { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; color: var(--onv); font-size: 12px; font-weight: 600; }
.sim .ic { width: 14px; height: 14px; }

/* =================== Sí o sí =================== */
.list { padding: 0 6px 0 14px; }
.must { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; border: 0; background: none; color: var(--on); text-align: left; padding: 0; }
.must + .must, .must + .rv, .rv + .must { border-top: 1px solid color-mix(in srgb, var(--outV) 50%, transparent); }
.must .g { flex: 1; min-width: 0; padding: 8px 0; overflow-wrap: anywhere; }
.must .g b { display: block; font-size: 16px; line-height: 22px; font-weight: 600; }
.must .g small { display: block; font-size: 12px; line-height: 16px; color: var(--onv); }
.must .ck { width: 48px; height: 48px; flex: none; display: grid; place-items: center; }
.must .ck i { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--outV); display: grid; place-items: center; }
.must.done .ck i { background: var(--ok) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4L18 8'/%3E%3C/svg%3E") center / 16px no-repeat; border-color: var(--ok); }
.must.done .g b { text-decoration: line-through; color: var(--onv); font-weight: 500; }
.addrow { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px; padding: 0; border: 0; border-top: 1px solid color-mix(in srgb, var(--outV) 50%, transparent); background: none; color: var(--pri); font-weight: 600; }
.addrow .ic { width: 18px; height: 18px; }
.list > .addrow:first-child { border-top: 0; }

/* Por revisar and musts asking: answered in place, with the late mark at their start */
.revbox { margin: 0 0 10px; }
.rv-title { font-weight: 700; font-size: 14px; line-height: 20px; padding: 4px 2px 8px; color: var(--late); }
.rv { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 12px 10px 16px; margin: 0 0 6px; border-radius: 16px; background: var(--low); box-shadow: inset 4px 0 0 var(--late); }
.rv > img { width: 30px; height: 30px; flex: none; }
.rv .g { flex: 1; min-width: 0; overflow-wrap: anywhere; border: 0; background: none; padding: 0; text-align: left; color: inherit; }
.rv .g b { display: block; font-size: 15px; line-height: 20px; font-weight: 600; }
.rv .g small { display: block; font-size: 12px; line-height: 16px; color: var(--onv); }
.rv .acts { flex: 1 1 100%; display: flex; gap: 6px; margin: 0; }
.rv .btn { flex: 1; min-height: 40px; height: auto; font-size: 13px; padding: 6px 10px; border-radius: 20px; }
.rv .btn.more { flex: 0 0 auto; padding: 6px 16px; background: none; box-shadow: inset 0 0 0 1px var(--outV); }
.list .rv.must-ask { margin: 6px 0 6px -8px; }

/* =================== El día =================== */
.row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; margin-bottom: 6px; padding: 10px 12px; border: 0; border-radius: 16px; background: var(--low); color: var(--on); text-align: left; }
.row .tm { width: 46px; flex: none; font-weight: 600; font-size: 13px; font-variant-numeric: tabular-nums; }
.row .tm s { display: block; font-size: 11px; line-height: 14px; font-weight: 500; color: var(--onv); }
.row .tm small.night { display: block; font-size: 10px; font-weight: 600; color: var(--onv); }
.row > img { width: 30px; height: 30px; flex: none; }
.row .g { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.row .g b { display: block; font-size: 15px; line-height: 20px; font-weight: 600; }
.row .g small { display: block; font-size: 12px; line-height: 16px; color: var(--onv); }
.row .st { flex: none; font-size: 11px; line-height: 16px; font-weight: 600; color: var(--onv); }
.row.done, .row.skipped, .row.notDone { background: none; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--outV) 60%, transparent); }
.row.done .g b, .row.done .tm { color: var(--onv); font-weight: 500; }
.row.done .st { color: var(--ok); }
.row.skipped .g b { color: var(--onv); font-weight: 500; text-decoration: line-through; }
.row.skipped .st { color: var(--late); }
.row.notDone .g b { color: var(--onv); font-weight: 500; }
.row.cur { box-shadow: inset 0 0 0 2px var(--pri); }
.row.cur .st { height: 24px; padding: 0 10px; border-radius: 12px; background: var(--pri); color: var(--onPri); display: flex; align-items: center; }
.row.done > img, .row.skipped > img { opacity: .55; }
.row.nested { margin-left: 18px; width: calc(100% - 18px); }
.row.flash { animation: flash 1.4s ease-out; }
@keyframes flash { from { box-shadow: inset 0 0 0 3px var(--act); } }
.empty-day { padding: 22px 16px; border-radius: 16px; text-align: center; color: var(--onv); border: 1.5px dashed color-mix(in srgb, var(--outV) 70%, transparent); }

/* =================== Simulated notifications =================== */
.nt { padding: 12px; border-radius: 14px; background: var(--lowest); margin-top: 8px; box-shadow: 0 0 0 1px color-mix(in srgb, var(--outV) 40%, transparent); }
.nt .app { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--onv); }
.nt .tt { font-weight: 700; margin-top: 2px; overflow-wrap: anywhere; }
.nt .bd { font-size: 13px; color: var(--onv); }
.nt .na { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.nt .na .btn { flex: 1; min-height: 38px; padding: 4px 10px; font-size: 13px; border-radius: 19px; white-space: normal; }
.nt.quiet { background: none; border: 1.5px dashed color-mix(in srgb, var(--outV) 60%, transparent); }
.pb { height: 6px; border-radius: 3px; background: var(--high); margin-top: 8px; overflow: hidden; }
.pb i { display: block; height: 100%; background: var(--pri); }

/* =================== Sheets (dialogs) =================== */
.dz-dlg { background: var(--sheet); }
.dz-dlg p { margin-top: 4px; }
.da { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.da .btn { flex: 1 1 auto; min-height: 48px; height: auto; padding: 10px 14px; white-space: normal; }
.fs { margin: 16px 0 6px; font-size: 13px; font-weight: 700; color: var(--onv); }
.fc { display: flex; flex-wrap: wrap; gap: 6px; }
.fch { display: inline-flex; align-items: center; justify-content: center; min-width: 48px; height: 44px; padding: 0 14px; border: 0; border-radius: 12px; background: var(--high); color: var(--on); font-weight: 500; }
.fch.on { background: color-mix(in srgb, var(--pri) 28%, var(--high)); box-shadow: inset 0 0 0 2px var(--pri); font-weight: 600; }
.fch.day { min-width: 40px; padding: 0 10px; }
.chips-tight .fch { min-width: 0; padding: 0 12px; height: 38px; font-size: 13px; }
.rail { display: flex; gap: 4px; padding: 4px; border-radius: 16px; background: var(--rail); margin-top: 12px; }
.rail button { flex: 1; height: 40px; border: 0; border-radius: 12px; background: transparent; color: var(--onv); font-weight: 700; }
.rail button.on { background: var(--act); color: var(--onAct); }
.rail button:disabled { opacity: .4; cursor: default; }
.name-row { display: flex; align-items: center; gap: 10px; }
.name-row img { width: 40px; height: 40px; flex: none; }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.field-pair label { display: block; font-size: 13px; font-weight: 600; color: var(--onv); }
.field-pair .inp { margin-top: 6px; }
details.more { margin-top: 14px; border-top: 1px solid color-mix(in srgb, var(--outV) 50%, transparent); }
details.more summary { display: flex; flex-direction: column; padding: 12px 0 4px; cursor: pointer; font-weight: 700; list-style: none; }
details.more summary small { font-weight: 500; color: var(--onv); font-size: 13px; }
.checkline { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; font-size: 14px; }
.checkline input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--pri); }
.icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 6px; }
.icon-grid button { height: 46px; border: 0; border-radius: 12px; background: var(--high); display: grid; place-items: center; }
.icon-grid button.on { background: var(--act); box-shadow: inset 0 0 0 2px var(--pri); }
.icon-grid img { width: 28px; height: 28px; }
.form-error { min-height: 1.2em; margin-top: 10px; color: var(--late); font-size: 14px; font-weight: 600; }
.sum { font-weight: 700; font-size: 64px; line-height: 72px; letter-spacing: -2px; margin-top: 8px; }
.sum small { font-size: 28px; font-weight: 600; letter-spacing: -.5px; color: var(--onv); }
.lst { list-style: none; padding: 0; margin: 12px 0 0; }
.lst li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid color-mix(in srgb, var(--outV) 45%, transparent); font-size: 14px; }
.lst li span:last-child { color: var(--onv); }
.review-note { margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: var(--high); font-size: 14px; }
.themes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.theme { display: flex; align-items: center; gap: 10px; padding: 8px; border: 0; border-radius: 14px; background: var(--high); color: var(--on); font-weight: 700; font-size: 14px; text-align: left; }
.theme i { width: 40px; height: 40px; border-radius: 10px; flex: none; background: var(--sbg); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .1); position: relative; }
.theme i::after { content: ""; position: absolute; right: 6px; bottom: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--spri); }
.theme.on { box-shadow: inset 0 0 0 2px var(--pri); }
.acc-row { display: flex; align-items: center; gap: 12px; }
.acc-row b { display: block; }
.acc-row small { display: block; color: var(--onv); font-size: 13px; }
.plan-pill { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 11px; font-size: 11px; font-weight: 800; background: var(--high); color: var(--onv); margin-top: 4px; }
.plan-pill.on { background: var(--act); color: var(--onAct); }

/* =================== Narrower screens =================== */
.dock { display: none; }
@media (max-width: 1199px) {
  .hoy { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .c-side { grid-column: 1 / -1; position: static; display: grid; grid-template-columns: 1fr 1fr; }
}
@media (max-width: 759px) {
  .bar { gap: 6px; padding: 8px 12px; min-height: 64px; }
  .bar-brand, .sync, .add-top, .sw-btn, .bar .th-btn, .streak { display: none; }
  #who .btn { min-height: 40px; padding: 0 14px; }
  .hoy { grid-template-columns: 1fr; gap: 0; padding: 0 16px 110px; }
  .c-side { grid-template-columns: 1fr; margin-top: 22px; scroll-margin-top: 76px; }
  .dock {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; gap: 8px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--bg) 92%, transparent);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  }
  .dock .btn { flex: 1; height: 52px; border-radius: 26px; font-size: 15px; }
  .dock .btn.p { flex: 1.4; }
  .badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--late); color: #fff; font-size: 12px; font-weight: 800; display: inline-grid; place-items: center; }
  .dz-toast { bottom: 96px; }
}

/* Mid widths: the sync chip keeps its icon and says the rest in its tooltip (and in Ajustes). */
@media (max-width: 999px) {
  .sync span { display: none; }
  .sync { padding: 0 8px; }
  /* The test clock keeps saying so when room is short: the time over its label, without the icon. */
  .clock-chip { flex-direction: column; justify-content: center; gap: 0; height: 42px; padding: 0 12px; line-height: 1.15; }
  .clock-chip .ic { display: none; }
  .clock-chip small { font-size: 10px; }
  .day-t small { white-space: normal; line-height: 16px; }
}
