/* ============================================================================
   Stop smoking : feuille de style (Bootstrap 5.3 + tokens maison)
   Tokens repris de Sky Garden (fond #F6F5F2, texte #201F1C, vert #1E7F4F, rouge #C93A31),
   déclinés en mode sombre (prefers-color-scheme). Mobile-first : barre de navigation
   en bas sur mobile, onglets dans l'en-tête à partir de 992 px.
   ============================================================================ */

@font-face { font-family: 'Instrument Sans'; font-weight: 400; font-display: swap; src: url('../assets/fonts/instrument-sans-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Instrument Sans'; font-weight: 500; font-display: swap; src: url('../assets/fonts/instrument-sans-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Instrument Sans'; font-weight: 600; font-display: swap; src: url('../assets/fonts/instrument-sans-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Instrument Sans'; font-weight: 700; font-display: swap; src: url('../assets/fonts/instrument-sans-latin-700-normal.woff2') format('woff2'); }

:root {
    --bg: #F6F5F2;
    --surface: #FFFFFF;
    --surface-2: #F0EEE9;
    --line: #E6E4DE;
    --tx: #201F1C;
    --tx-2: #4B4943;
    --mut: #8A877E;
    --acc: #1E7F4F;
    --acc-soft: #E7F4EC;
    --acc-line: #BFDECB;
    --sos: #C93A31;
    --sos-soft: #FCEBE9;
    --sos-line: #F0C4BF;
    --blue: #1A66D0;
    --blue-soft: #EBF1FC;
    --warn: #A86A12;
    --warn-soft: #FDF3E1;
    --warn-line: #F1D8A8;
    --radius: 16px;
    --shadow: 0 1px 2px rgba(32, 31, 28, .04), 0 4px 16px rgba(32, 31, 28, .05);
    --bs-body-font-family: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
[data-bs-theme="dark"] {
    --bg: #111315;
    --surface: #1A1D20;
    --surface-2: #23272B;
    --line: #2F3439;
    --tx: #ECEEF0;
    --tx-2: #BAC0C6;
    --mut: #7F8790;
    --acc: #4CC283;
    --acc-soft: rgba(76, 194, 131, .13);
    --acc-line: rgba(76, 194, 131, .35);
    --sos: #F0645A;
    --sos-soft: rgba(240, 100, 90, .13);
    --sos-line: rgba(240, 100, 90, .4);
    --blue: #6FA4F2;
    --blue-soft: rgba(111, 164, 242, .13);
    --warn: #E9B85C;
    --warn-soft: rgba(233, 184, 92, .12);
    --warn-line: rgba(233, 184, 92, .35);
    --shadow: none;
    --bs-body-bg: #111315;
}

html { -webkit-text-size-adjust: 100%; }
body {
    background: var(--bg);
    color: var(--tx);
    font-family: var(--bs-body-font-family);
    -webkit-font-smoothing: antialiased;
    padding-bottom: calc(84px + env(safe-area-inset-bottom));
}
@media (min-width: 992px) { body { padding-bottom: 40px; } }
a { color: var(--blue); }
.ic { flex: none; vertical-align: -0.15em; }
.text-mut { color: var(--mut) !important; }
.text-acc { color: var(--acc) !important; }
.text-sos { color: var(--sos) !important; }
.small-caps { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--mut); font-weight: 600; }

/* ===== En-tête ===== */
.hd {
    position: sticky; top: 0; z-index: 1030;
    display: flex; align-items: center; gap: 18px;
    height: 56px; padding: 0 16px;
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}
.hd-brand { display: flex; align-items: center; gap: 8px; color: var(--tx); text-decoration: none; font-weight: 700; white-space: nowrap; }
.hd-brand img { border-radius: 7px; }
.hd-title { font-weight: 600; color: var(--tx-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; text-align: center; margin-right: 6px; }
.hd-brand + .hd-title { margin-left: -4px; }
@media (max-width: 991.98px) { .hd-brand span { display: none; } }
.hd-tabs { gap: 2px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.hd-tab { padding: 7px 11px; border-radius: 9px; color: var(--tx-2); text-decoration: none; font-weight: 500; font-size: .92rem; white-space: nowrap; }
.hd-tab:hover { background: var(--surface-2); color: var(--tx); }
.hd-tab.active { background: var(--acc-soft); color: var(--acc); font-weight: 600; }
.hd-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.hd-icon-btn { border: 0; background: transparent; color: var(--tx-2); width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; }
.hd-icon-btn:hover { background: var(--surface-2); }
.btn-sos { background: var(--sos); color: #fff; border: 0; font-weight: 700; align-items: center; gap: 6px; border-radius: 10px; }
.btn-sos:hover, .btn-sos.active { background: color-mix(in srgb, var(--sos) 85%, #000); color: #fff; }
.dropdown-item { display: flex; align-items: center; gap: 8px; }

/* ===== Page ===== */
.page { max-width: 1040px; margin: 0 auto; padding: 18px 16px 24px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head h1 { font-size: 1.55rem; font-weight: 700; margin: 0; letter-spacing: -.01em; }
.page-head p { color: var(--mut); margin: 2px 0 0; }
.source-tag { display: inline-flex; align-items: center; gap: 6px; font-size: .75rem; color: var(--mut); background: var(--surface-2); border-radius: 999px; padding: 2px 10px; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); margin-bottom: 14px; }
.panel h2 { font-size: 1.05rem; font-weight: 700; margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.panel h3 { font-size: .95rem; font-weight: 700; margin: 14px 0 6px; }
.panel-tight { padding: 14px; }
.panel-acc { background: var(--acc-soft); border-color: var(--acc-line); }
.panel-sos { background: var(--sos-soft); border-color: var(--sos-line); }
.panel-warn { background: var(--warn-soft); border-color: var(--warn-line); }
.grid-2 { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 768px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.grid-2 > .panel { margin-bottom: 0; }

ul.clean { list-style: none; padding: 0; margin: 0; }
ul.clean li { padding: 6px 0 6px 22px; position: relative; border-bottom: 1px dashed var(--line); }
ul.clean li:last-child { border-bottom: 0; }
ul.clean li::before { content: ''; position: absolute; left: 4px; top: 14px; width: 7px; height: 7px; border-radius: 50%; background: var(--acc); }
ul.clean.bad li::before { background: var(--sos); }
ul.clean.warn li::before { background: var(--warn); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; }
.kv dt { color: var(--mut); font-weight: 600; }
.kv dd { margin: 0; }

/* ===== Accueil : compteur ===== */
.hero { text-align: center; padding: 26px 16px 20px; background: linear-gradient(160deg, var(--acc-soft), var(--surface) 70%); }
.hero .small-caps { color: var(--acc); }
.counter { display: flex; justify-content: center; align-items: baseline; gap: 6px 14px; flex-wrap: wrap; margin: 6px 0 4px; font-variant-numeric: tabular-nums; }
.counter .u { display: inline-flex; align-items: baseline; gap: 3px; }
.counter b { font-size: clamp(2.4rem, 11vw, 3.6rem); font-weight: 700; line-height: 1; letter-spacing: -.02em; }
.counter .u:first-child b { color: var(--acc); }
.counter small { font-size: .95rem; color: var(--mut); font-weight: 600; }
.hero .since { color: var(--tx-2); font-size: .92rem; }
.progress-thin { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.progress-thin > span { display: block; height: 100%; background: var(--acc); border-radius: 99px; }

.sos-big {
    display: flex; align-items: center; justify-content: center; gap: 12px;
    width: 100%; padding: 18px; margin-bottom: 14px;
    background: var(--sos); color: #fff; border-radius: var(--radius);
    font-size: 1.15rem; font-weight: 700; text-decoration: none;
    box-shadow: 0 6px 20px color-mix(in srgb, var(--sos) 35%, transparent);
}
.sos-big:hover { color: #fff; filter: brightness(1.05); }
.sos-big small { display: block; font-weight: 500; font-size: .82rem; opacity: .85; }
.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.quick-btn {
    display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px;
    background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
    color: var(--tx); text-decoration: none; font-weight: 600; font-size: .85rem; text-align: center;
}
.quick-btn:hover { border-color: var(--acc-line); color: var(--tx); }
.quick-btn .ic { color: var(--acc); }
.quick-btn.bad .ic { color: var(--sos); }

.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 14px; }
@media (min-width: 768px) { .stats { grid-template-columns: repeat(3, 1fr); } }
.stats.stats-3 { grid-template-columns: repeat(3, 1fr); }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.stat .v { font-size: 1.45rem; font-weight: 700; line-height: 1.15; font-variant-numeric: tabular-nums; }
.stat .l { font-size: .8rem; color: var(--mut); }
.stat.over .v { color: var(--sos); }

/* Phase du plan opérationnel */
.phases { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin: 12px 0 6px; }
.phases > div { text-align: center; font-size: .7rem; color: var(--mut); }
.phases > div::before { content: ''; display: block; height: 6px; border-radius: 99px; background: var(--surface-2); margin-bottom: 5px; }
.phases > div.done::before { background: var(--acc-line); }
.phases > div.now { color: var(--tx); font-weight: 700; }
.phases > div.now::before { background: var(--acc); }
.phases > div.now.danger::before { background: var(--sos); }
.tone-danger { color: var(--sos); }
.tone-warn { color: var(--warn); }
.tone-ok, .tone-info { color: var(--acc); }

.key-phrase { text-align: center; font-size: 1.05rem; font-weight: 600; color: var(--tx-2); padding: 16px 12px; }
.key-phrase b { display: block; color: var(--tx); font-size: 1.15rem; }

/* ===== Pastilles (chips) ===== */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
    display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px;
    border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
    color: var(--tx-2); font-size: .85rem; font-weight: 500; cursor: pointer; user-select: none;
}
.chip:hover { border-color: var(--acc-line); }
.btn-check:checked + .chip { background: var(--acc); border-color: var(--acc); color: #fff; }
.btn-check:checked + .chip-bad { background: var(--sos); border-color: var(--sos); }
.btn-check:focus-visible + .chip { outline: 2px solid var(--blue); outline-offset: 2px; }
.tag { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: .75rem; background: var(--surface-2); color: var(--tx-2); margin: 2px 3px 2px 0; }
.tag-ok { background: var(--acc-soft); color: var(--acc); }
.tag-bad { background: var(--sos-soft); color: var(--sos); }

/* Boutons « Installer l'application » : visibles seulement si Chrome propose l'installation */
html:not(.can-install) [data-pwa-install] { display: none !important; }
.install-card img { border-radius: 10px; }

/* Débrief (modale craving ouverte depuis le SOS) et pensées pièges en un geste */
.debrief-note { background: var(--blue-soft); border-radius: 12px; padding: 10px 12px; font-size: .9rem; color: var(--tx-2); }
.trap-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chip-sm { padding: 3px 10px; font-size: .78rem; background: var(--surface-2); border-style: dashed; }

.relapse-note { background: var(--sos-soft); border: 1px solid var(--sos-line); border-radius: 12px; padding: 10px 12px; font-size: .9rem; }

/* ===== Notices ===== */
.notice-zone { position: fixed; left: 50%; top: 66px; transform: translateX(-50%); z-index: 3000; display: flex; flex-direction: column; gap: 8px; width: min(92vw, 460px); }
.notice { padding: 11px 14px; border-radius: 12px; color: #fff; font-weight: 500; box-shadow: 0 6px 20px rgba(0, 0, 0, .18); transition: opacity .4s, transform .4s; }
.notice-success { background: #1E7F4F; }
.notice-danger { background: #C93A31; }
.notice-info { background: #33363A; }
.notice.out { opacity: 0; transform: translateY(-8px); }

/* ===== Barre de navigation mobile ===== */
.bn {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030;
    display: grid; grid-template-columns: repeat(5, 1fr); align-items: end;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--surface) 95%, transparent); backdrop-filter: blur(10px);
    border-top: 1px solid var(--line);
}
.bn-item { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; color: var(--mut); text-decoration: none; font-size: .7rem; font-weight: 600; background: none; border: 0; }
.bn-item.active { color: var(--acc); }
.bn-sos {
    justify-self: center; display: grid; place-items: center; width: 62px; height: 62px; margin-top: -26px;
    border-radius: 50%; background: var(--sos); color: #fff; text-decoration: none; font-weight: 800; letter-spacing: .04em;
    box-shadow: 0 6px 18px color-mix(in srgb, var(--sos) 45%, transparent); border: 4px solid var(--bg);
}
.bn-sos:hover, .bn-sos.active { color: #fff; filter: brightness(1.06); }
.more-menu { height: auto !important; border-radius: 20px 20px 0 0; background: var(--surface); }
.more-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding-bottom: env(safe-area-inset-bottom); }
.more-item { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 6px; border-radius: 14px; background: var(--surface-2); color: var(--tx); text-decoration: none; font-size: .8rem; font-weight: 600; border: 0; text-align: center; }
.more-item.active { background: var(--acc-soft); color: var(--acc); }

/* ===== SOS ===== */
.sos-wrap { max-width: 640px; margin: 0 auto; }
.sos-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.sos-dots { display: flex; gap: 5px; flex-wrap: wrap; }
.sos-dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.sos-dots span.on { background: var(--sos); }
.sos-dots span.done { background: var(--sos-line); }
.sos-step { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 24px 20px; box-shadow: var(--shadow); margin-bottom: 14px; }
.sos-step .emoji { font-size: 2rem; line-height: 1; }
.sos-step h2 { font-size: 1.35rem; font-weight: 800; margin: 10px 0 14px; }
.sos-step .big-lines p { font-size: 1.2rem; font-weight: 600; margin: 0 0 10px; line-height: 1.35; }
.sos-step .big-lines p:first-child { color: var(--sos); }
.illusion q { display: block; font-size: 1.05rem; font-style: italic; color: var(--mut); text-decoration: line-through; margin: 4px 0; }
.illusion q::before, .illusion q::after { content: '“'; }
.illusion q::after { content: '”'; }
.chain { list-style: none; counter-reset: c; padding: 0; margin: 0; }
.chain li { counter-increment: c; display: flex; align-items: center; gap: 10px; padding: 7px 0; font-weight: 600; }
.chain li::before { content: counter(c); flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--sos-soft); color: var(--sos); font-size: .8rem; }
.chain li:last-child { color: var(--sos); }
.sos-mode .sos-step { display: none; }
.sos-mode .sos-step.current { display: block; animation: fadein .25s ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.sos-nav { position: sticky; bottom: calc(84px + env(safe-area-inset-bottom)); display: flex; gap: 10px; padding: 10px 0; background: linear-gradient(transparent, var(--bg) 30%); }
@media (min-width: 992px) { .sos-nav { bottom: 0; } }
.sos-nav .btn { flex: 1; padding: 12px; font-weight: 700; border-radius: 12px; }
.all-mode .sos-nav { display: none; }
.sos-mode #sos-cbt { display: none; }
.action-grid { display: grid; grid-template-columns: 1fr; gap: 6px; }
@media (min-width: 576px) { .action-grid { grid-template-columns: 1fr 1fr; } }
.action-grid .chip { border-radius: 12px; width: 100%; justify-content: flex-start; padding: 9px 12px; text-align: left; }
.action-grid .chip.suggested { border-color: var(--sos); box-shadow: 0 0 0 3px var(--sos-soft); }
.timer { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--surface-2); border-radius: 14px; padding: 10px 12px; margin-top: 12px; }
.timer .t { font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; min-width: 84px; }

/* ===== Urge surfing ===== */
.breath-wrap { display: grid; place-items: center; height: 230px; }
.breath {
    width: 120px; height: 120px; border-radius: 50%;
    background: radial-gradient(circle, var(--blue-soft), color-mix(in srgb, var(--blue) 35%, transparent));
    border: 2px solid color-mix(in srgb, var(--blue) 60%, transparent);
    display: grid; place-items: center; color: var(--blue); font-weight: 700;
    transition: transform 4s ease-in-out;
}
.breath.in { transform: scale(1.7); transition-duration: 4s; }
.breath.out { transform: scale(1); transition-duration: 6s; }
.wave-chart { width: 100%; height: 120px; display: block; }
.wave-chart polyline { fill: none; stroke: var(--blue); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.wave-chart .grid line { stroke: var(--line); stroke-width: 1; }
.checkin { background: var(--blue-soft); border-radius: 14px; padding: 12px 14px; margin-top: 12px; }
.step-list { list-style: none; padding: 0; margin: 0; counter-reset: s; }
.step-list li { counter-increment: s; display: grid; grid-template-columns: 30px 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.step-list li:last-child { border-bottom: 0; }
.step-list li::before { content: counter(s); width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); font-size: .8rem; font-weight: 700; }
.step-list li.on { background: var(--blue-soft); border-radius: 10px; }

/* ===== Plan / mécanisme ===== */
.mechanism { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.mechanism span { padding: 6px 12px; border-radius: 10px; background: var(--surface-2); font-weight: 600; font-size: .88rem; }
.mechanism span:last-child { background: var(--sos-soft); color: var(--sos); }
.mechanism i { color: var(--mut); font-style: normal; }
.timeline { display: grid; gap: 8px; }
.timeline > div { display: grid; grid-template-columns: 74px 1fr; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.timeline > div b { font-variant-numeric: tabular-nums; }
.timeline > div.now { background: var(--acc-soft); outline: 2px solid var(--acc); }
.timeline > div.now.danger { background: var(--sos-soft); outline-color: var(--sos); }
.rule-big { font-size: 1.1rem; font-weight: 700; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.rule-big:last-child { border-bottom: 0; }

/* ===== Raisons ===== */
.top-reasons { counter-reset: r; list-style: none; padding: 0; margin: 0; }
.top-reasons li { counter-increment: r; display: flex; gap: 12px; align-items: center; padding: 10px 0; font-weight: 600; font-size: 1.02rem; border-bottom: 1px dashed var(--line); }
.top-reasons li:last-child { border-bottom: 0; }
.top-reasons li::before { content: counter(r); flex: none; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--sos); color: #fff; font-size: .85rem; }
.insight { font-size: 1.1rem; font-weight: 600; text-align: center; padding: 6px 4px; }
.reason-group { margin-bottom: 12px; }
.reason-group h3 { margin-top: 4px; }
.nav-pills .nav-link { color: var(--tx-2); font-weight: 600; border-radius: 10px; }
.nav-pills .nav-link.active { background: var(--acc); color: #fff; }

/* ===== Pensées pièges ===== */
.trap { cursor: pointer; }
.trap .thought { font-size: 1.05rem; font-weight: 700; display: flex; justify-content: space-between; gap: 10px; }
.trap .thought::before { content: '“'; color: var(--mut); }
.trap .answer { display: none; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.trap.open .answer { display: block; }
.trap .answer p { margin: 0 0 4px; font-weight: 600; color: var(--acc); }
.trap .src { font-size: .75rem; color: var(--mut); margin-top: 6px; }

/* ===== Journal ===== */
.entry { display: grid; grid-template-columns: 40px 1fr auto; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.entry:last-child { border-bottom: 0; }
.entry .dot { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--acc-soft); color: var(--acc); }
.entry.smoked .dot, .entry.consumption .dot { background: var(--sos-soft); color: var(--sos); }
.entry.edible .dot { background: var(--warn-soft); color: var(--warn); }
.entry .meta { font-size: .8rem; color: var(--mut); }
.entry .txt { font-size: .9rem; color: var(--tx-2); margin-top: 3px; white-space: pre-line; }
.entry .edit-btn { border: 0; background: transparent; color: var(--mut); padding: 4px; border-radius: 8px; }
.entry .edit-btn:hover { background: var(--surface-2); color: var(--tx); }
.day-sep { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--mut); padding: 14px 0 2px; }
.bars { display: grid; gap: 6px; }
.bar-row { display: grid; grid-template-columns: minmax(110px, 40%) 1fr 28px; gap: 8px; align-items: center; font-size: .85rem; }
.bar-row .track { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.bar-row .track span { display: block; height: 100%; background: var(--acc); border-radius: 99px; }
.hours { display: grid; grid-template-columns: repeat(24, 1fr); gap: 2px; align-items: end; height: 70px; }
.hours span { background: var(--blue); border-radius: 3px 3px 0 0; min-height: 2px; opacity: .85; }
.hours-axis { display: grid; grid-template-columns: repeat(4, 1fr); font-size: .7rem; color: var(--mut); margin-top: 3px; }
.empty { color: var(--mut); text-align: center; padding: 18px 8px; }

/* ===== Resilience day ===== */
.streak-dots { display: flex; gap: 8px; }
.streak-dots span { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); color: var(--mut); font-weight: 700; }
.streak-dots span.on { background: var(--sos); color: #fff; }
.rd-days { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 768px) { .rd-days { grid-template-columns: repeat(2, 1fr); } }
.rd-day { border: 1px solid var(--line); border-radius: 14px; padding: 14px; background: var(--surface); }
.rd-day.today { border-color: var(--acc); box-shadow: 0 0 0 2px var(--acc-soft); }
.rd-day h3 { margin: 0; font-size: 1rem; display: flex; justify-content: space-between; align-items: center; }
.rd-day .sub { font-size: .8rem; color: var(--mut); margin-bottom: 8px; }
.check-row { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; cursor: pointer; }
.check-row input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--acc); flex: none; }
.check-row input:checked + span { color: var(--mut); text-decoration: line-through; }
.save-state { font-size: .75rem; color: var(--mut); }

/* ===== Login ===== */
.login-body { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.login-card { width: 100%; max-width: 380px; }
.login-card .logo { text-align: center; margin-bottom: 18px; }
.login-card .logo img { width: 76px; height: 76px; }
.login-card h1 { font-size: 1.35rem; font-weight: 700; margin: 10px 0 2px; }
