:root {
  --bg: #f4f6f5;
  --paper: #ffffff;
  --ink: #203b33;
  --muted: #718078;
  --green: #176b56;
  --green-dark: #143f35;
  --mint: #e1efe7;
  --line: #e3e9e5;
  --amber: #c89853;
  --peach: #f5e9d9;
  --font: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --serif: var(--font);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 14px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; color: inherit; }
button:disabled { cursor: not-allowed; opacity: .45; }
a { color: var(--green); }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid #8dc7aa; outline-offset: 4px; }
svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
p { overflow-wrap: anywhere; }
.app-shell { display: flex; min-height: 100dvh; max-width: 1680px; margin: auto; }
.sidebar { width: 224px; flex-shrink: 0; background: #f9fbf9; border-right: 1px solid var(--line); padding: 37px 22px 28px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100dvh; }
.brand { display: inline-flex; align-items: center; gap: 10px; width: max-content; border: 0; background: none; padding: 0; text-decoration: none; font-size: 32px; font-weight: 800; letter-spacing: -1.6px; color: var(--green-dark); line-height: 1.2; }
.brand-mark { width: 34px; height: 36px; border-radius: 14px 14px 5px 14px; background: var(--green); color: #d6eebc; display: grid; place-items: center; transform: rotate(-7deg); }
.brand-mark svg { width: 23px; height: 23px; transform: rotate(7deg); }
.brand-caption { font-size: 11px; color: var(--muted); margin-top: 13px; padding-left: 2px; letter-spacing: .1px; }
.nav { display: flex; flex-direction: column; gap: 8px; margin-top: 51px; }
.nav-button { border: 0; background: transparent; padding: 13px 14px; min-height: 48px; display: flex; align-items: center; gap: 12px; border-radius: 12px; text-align: left; font-size: 13px; font-weight: 600; color: #77847e; transition: background .18s, color .18s; }
.nav-button:hover { background: #edf2ee; color: var(--green); }
.nav-button.active { background: var(--mint); color: var(--green); font-weight: 750; }
.nav-button.active svg { stroke-width: 2; }
.sidebar-bottom { margin-top: auto; padding: 30px 12px 0; }
.sidebar-bottom > svg { width: 26px; height: 26px; color: #91ac9c; }
.sidebar-quote { font-size: 14px; line-height: 1.8; color: #577163; }
.sidebar-foot { font-size: 10px; line-height: 1.7; color: #8a978e; margin-top: 21px; }
.main { width: calc(100% - 224px); max-width: 1300px; padding: 30px 44px 32px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 46px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.topbar-label { font-size: 11px; font-weight: 650; color: #7b8981; letter-spacing: .15px; }
.date-chip { display: flex; align-items: center; gap: 9px; color: #78877f; font-size: 11px; }
.date-chip > svg { width: 16px; height: 16px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #e6ede7; border: 1px solid #dbe5de; color: #4b6e5a; font-size: 12px; font-weight: 800; margin-left: 10px; }
.mobile-brand, .mobile-nav { display: none; }
.page-heading { padding: 30px 0 25px; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.page-heading h1 { font-size: clamp(28px, 2.9vw, 36px); font-weight: 750; letter-spacing: -1.25px; line-height: 1.25; margin: 0; }
.page-heading p { font-size: 12px; color: var(--muted); margin: 9px 0 0; }
.eyebrow { font-size: 10px; font-weight: 750; text-transform: uppercase; letter-spacing: 1.5px; color: #809184; margin: 0 0 10px; }
.card { min-width: 0; background: var(--paper); border: 1px solid var(--line); border-radius: 20px; padding: 25px; }
.card h2, .card h3 { font-size: 16px; line-height: 1.45; font-weight: 750; letter-spacing: -.4px; margin: 0; }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-header > svg { color: #8a9d90; width: 19px; height: 19px; }
.card-header + p, .section-description { color: var(--muted); font-size: 12px; margin: 9px 0 22px; line-height: 1.75; }
.primary, .secondary, .text-button, .danger-button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; border: 0; border-radius: 11px; min-height: 44px; padding: 12px 18px; text-decoration: none; font-size: 12px; line-height: 1.45; font-weight: 700; transition: background .18s, transform .18s; }
.primary { background: var(--green); color: #fff; }
.primary:hover { background: #125744; transform: translateY(-1px); }
.primary svg, .secondary svg { width: 18px; height: 18px; }
.secondary { background: #ecf2ee; color: var(--green); }
.secondary:hover { background: #e0ece4; }
.text-button { padding: 3px 0; min-height: 28px; background: none; color: var(--green); font-size: 11px; }
.text-button:hover { color: #0c4435; text-decoration: underline; text-underline-offset: 3px; }
.text-button svg { width: 15px; height: 15px; }
.danger-button { background: #f7eae4; color: #a25b44; }
.icon-button { display: grid; place-items: center; min-width: 36px; width: 36px; height: 36px; border: 1px solid var(--line); background: transparent; border-radius: 10px; padding: 8px; }
.icon-button:hover { background: #eef3ef; }
.icon-button svg { width: 17px; height: 17px; }
.button-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 20px; }
.progress-hero { min-height: 300px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 31px 28px; overflow: hidden; position: relative; border: 0; background: var(--green-dark); color: #fff; }
.progress-hero:before { content: ''; width: 240px; height: 240px; position: absolute; left: -130px; bottom: -170px; border: 1px solid #ffffff0c; border-radius: 50%; box-shadow: 0 0 0 30px #ffffff03, 0 0 0 60px #ffffff02; pointer-events: none; }
.hero-copy { position: relative; z-index: 1; min-width: 0; flex: 1; }
.progress-hero .eyebrow { color: #9bc3ae; letter-spacing: 1.35px; font-size: 9px; }
.progress-hero h2 { font-size: 25px; font-weight: 650; line-height: 1.3; letter-spacing: -.8px; max-width: 240px; }
.hero-copy > p:not(.eyebrow):not(.hero-note) { font-size: 12px; color: #b3cbbf; line-height: 1.75; max-width: 240px; }
.hero-note { color: #a9c3b6; font-size: 11px; line-height: 1.75; margin: 13px 0 0; max-width: 230px; }
.hero-ring { --progress: 0%; width: 204px; height: 204px; flex-shrink: 0; position: relative; border-radius: 50%; background: conic-gradient(from -90deg, #c9e9ad var(--progress), #ffffff16 0); display: grid; place-items: center; border: 7px solid #ffffff04; box-shadow: 0 0 0 11px #ffffff02; }
.hero-ring:before { content: ''; position: absolute; inset: 8px; border-radius: 50%; background: var(--green-dark); }
.hero-ring > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.ring-center { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; height: 100%; text-align: center; padding: 20px; z-index: 1; }
.ring-center strong { font-size: 66px; font-weight: 700; line-height: 1.12; letter-spacing: -3px; font-variant-numeric: tabular-nums; }
.ring-center span { color: #d0dfd7; font-size: 12px; line-height: 1.5; max-width: 125px; }
.ring-center small { color: #9cbdab; font-size: 10px; margin-top: 9px; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 23px; }
.hero-tag { display: inline-flex; align-items: center; gap: 6px; background: #ffffff0e; border: 1px solid #ffffff12; color: #d1e0d7; border-radius: 20px; font-size: 10px; padding: 5px 9px; }
.hero-tag svg { width: 13px; height: 13px; }
.metric-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.metric-card { position: relative; padding: 21px 19px 18px; display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; min-height: 142px; }
.metric-label { font-size: 11px; font-weight: 600; color: #7a8a80; display: flex; align-items: center; justify-content: space-between; gap: 7px; width: 100%; }
.metric-label svg { width: 16px; height: 16px; }
.metric-icon { display: grid; place-items: center; width: 31px; height: 31px; background: #edf5ef; color: #6b967a; border-radius: 10px; margin-bottom: 9px; }
.metric-icon svg { width: 17px; height: 17px; }
.metric-card:nth-child(2) .metric-icon { color: #a58a5c; background: #f8f1e7; }
.metric-number { font-size: clamp(26px, 2.5vw, 34px); font-weight: 750; letter-spacing: -1px; line-height: 1.25; margin-top: 9px; font-variant-numeric: tabular-nums; }
.metric-number small, .metric-number span { font-size: 12px; font-weight: 500; color: #829087; letter-spacing: 0; margin-left: 2px; }
.metric-caption { font-size: 10px; line-height: 1.65; color: #7a8a80; margin: 5px 0 0; }
.section-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 20px; margin-top: 20px; }
.two-column { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
.panel-stack { display: flex; flex-direction: column; gap: 20px; }
.wide-card { padding: 28px; }
.task-card { position: relative; display: flex; flex-direction: column; align-items: flex-start; }
.task-meta { display: flex; align-items: center; gap: 7px; font-size: 10px; font-weight: 650; color: #8b9b8e; margin: 0 0 13px; }
.task-meta svg { width: 14px; height: 14px; }
.task-card h2 { font-size: 19px; letter-spacing: -.5px; }
.task-card > p { color: var(--muted); font-size: 12px; line-height: 1.8; margin: 12px 0 20px; max-width: 450px; }
.task-card .button-row, .task-card > .primary, .task-card > .secondary { margin-top: auto; }
.task-done { display: flex; align-items: center; gap: 8px; padding: 10px 13px; border-radius: 10px; background: #e6f2e9; color: var(--green); font-size: 12px; }
.task-done svg { width: 18px; height: 18px; }
.goal-card { background: #f9f8f3; border-color: #ebe8dc; }
.goal-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.goal-heading > svg { color: var(--amber); width: 27px; height: 27px; }
.goal-heading h2 { font-size: 16px; }
.goal-heading p { font-size: 11px; margin: 5px 0 0; color: #9a9683; }
.goal-value { font-size: 27px; font-weight: 750; letter-spacing: -.7px; margin: 19px 0 13px; line-height: 1.4; }
.goal-value span, .goal-value small { font-size: 12px; font-weight: 500; color: #9b998a; letter-spacing: 0; }
.progress-track { width: 100%; height: 7px; border-radius: 10px; background: #e9e8de; overflow: hidden; }
.progress-fill { height: 100%; background: #bc9c63; border-radius: inherit; min-width: 0; max-width: 100%; transition: width .3s ease; }
.goal-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 10px; color: #8a8a78; margin-top: 11px; }
.goal-card > p { color: #909080; font-size: 11px; line-height: 1.75; }
.quick-check { margin-top: 20px; }
.check-options { display: flex; gap: 9px; margin-top: 19px; }
.check-option { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); background: #fbfcfb; border-radius: 11px; padding: 12px 10px; font-size: 11px; font-weight: 600; }
.check-option svg { width: 17px; height: 17px; color: #7c9a86; }
.check-option:hover, .check-option.selected { border-color: #9cbea9; background: #eaf4ee; color: var(--green); }
.sos-banner { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 21px 25px; border-radius: 17px; background: #e8f0eb; margin-top: 20px; }
.sos-banner h2, .sos-banner h3 { font-size: 14px; margin: 0; }
.sos-banner p { font-size: 11px; color: #6f8779; margin: 4px 0 0; }
.sos-banner .primary, .sos-banner .secondary { flex-shrink: 0; }
.insight-list { display: flex; flex-direction: column; margin-top: 17px; }
.insight { display: flex; align-items: flex-start; gap: 12px; padding: 14px 0; border-bottom: 1px solid #eef2ee; }
.insight:last-child { border-bottom: 0; padding-bottom: 0; }
.insight:first-child { padding-top: 0; }
.insight-icon { width: 34px; height: 34px; border-radius: 11px; background: #edf4ee; display: grid; place-items: center; flex-shrink: 0; color: #79a087; }
.insight-icon svg { width: 17px; height: 17px; }
.insight strong { display: block; font-size: 12px; font-weight: 650; }
.insight p { color: var(--muted); font-size: 11px; line-height: 1.7; margin: 5px 0 0; }
.achievement-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 20px; }
.achievement { text-align: center; border-radius: 14px; background: #f4f8f4; padding: 16px 9px; }
.achievement-icon { width: 45px; height: 45px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 11px; background: #e4eee0; color: #648d63; }
.achievement-icon svg { width: 22px; height: 22px; }
.achievement strong { font-size: 11px; line-height: 1.5; display: block; }
.achievement p, .achievement small { font-size: 10px; line-height: 1.6; color: #839084; margin: 5px 0 0; display: block; }
.achievement.locked { background: #f7f8f7; color: #8d9890; }
.achievement.locked .achievement-icon { background: #eef0ed; color: #a8b0a6; }
.daily-chart { display: flex; align-items: stretch; justify-content: space-between; gap: 13px; height: 156px; margin-top: 25px; padding: 0 5px; }
.chart-column { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 8px; position: relative; }
.chart-column > span:first-child { font-size: 10px; color: #7f9386; }
.chart-bar { width: 100%; max-width: 35px; min-height: 4px; border-radius: 6px 6px 3px 3px; background: #b9d5c0; }
.chart-column:nth-last-child(1) .chart-bar { background: var(--green); }
.chart-label { font-size: 10px; color: #87968b; flex-shrink: 0; }
.stat-explainer { font-size: 11px; color: #7f9083; margin-top: 16px; line-height: 1.75; padding: 12px 14px; background: #f4f7f3; border-radius: 10px; }
.field { display: flex; flex-direction: column; gap: 7px; margin: 0 0 19px; min-width: 0; }
.field label, .field-label { font-size: 12px; font-weight: 700; }
.field-hint { font-size: 11px; color: #7e8e82; margin: 0; line-height: 1.65; }
.field input, .field textarea, .field select { width: 100%; border: 1px solid #dce6de; background: #fbfcfb; border-radius: 10px; padding: 12px 13px; color: var(--ink); min-height: 46px; }
.field textarea { min-height: 103px; resize: vertical; line-height: 1.7; }
.field input::placeholder, .field textarea::placeholder { color: #a2ada5; }
.field input[type=checkbox] { width: 18px; min-height: 18px; accent-color: var(--green); }
.form-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 16px; }
.form-grid .full-width { grid-column: 1 / -1; }
.form-error { color: #a1634e; font-size: 12px; line-height: 1.7; white-space: pre-wrap; }
.inline-error { background: #f9eee7; border: 1px solid #e8d3c3; padding: 12px 15px; border-radius: 10px; color: #986047; font-size: 12px; margin: 15px 0; }
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0 22px; }
.pill-choice { display: flex; align-items: flex-start; gap: 9px; text-align: left; border: 1px solid #dfe7df; border-radius: 12px; background: #fbfcfb; padding: 13px 14px; font-size: 12px; }
.pill-choice:hover { background: #f1f7f2; }
.pill-choice.selected { border-color: #8bb69a; background: #eaf4ed; }
.pill-choice input { accent-color: var(--green); margin: 3px 0 0; }
.pill-choice svg { width: 19px; height: 19px; color: #74997f; }
.pill-choice strong { display: block; font-weight: 650; }
.pill-choice small { display: block; color: #7b8f81; font-size: 11px; line-height: 1.7; margin-top: 5px; }
.outcome-choices { display: flex; flex-direction: column; gap: 10px; }
.outcome-choices .pill-choice { padding: 16px; }
.onboarding { max-width: 620px; }
.onboard-progress { display: flex; align-items: center; gap: 7px; margin: 2px 0 25px; }
.onboard-dot { height: 4px; flex: 1; border-radius: 10px; background: #e8eee8; }
.onboard-dot.active { background: #6c9b7e; }
.mode-grid { display: grid; gap: 11px; margin: 21px 0 25px; }
.mode-card { display: flex; align-items: flex-start; gap: 13px; padding: 18px; border: 1px solid var(--line); background: #fbfcfb; border-radius: 14px; text-align: left; width: 100%; }
.mode-card > svg { color: #86a58f; width: 24px; height: 24px; margin-top: 3px; }
.mode-card strong { display: block; font-size: 14px; font-weight: 700; }
.mode-card p, .mode-card small, .mode-card span:not(:has(*)) { color: var(--muted); font-size: 12px; line-height: 1.7; margin: 5px 0 0; }
.mode-card.selected { border-color: #7da98b; background: #edf5ee; box-shadow: inset 0 0 0 1px #7da98b; }
.step-label { font-size: 10px; letter-spacing: 1.35px; text-transform: uppercase; color: #84a08d; margin: 0 0 9px; font-weight: 700; }
.support-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 20px; }
.support-main { padding: 30px; text-align: center; }
.support-main h2 { font-size: 25px; letter-spacing: -.7px; }
.support-main > p { max-width: 340px; margin: 10px auto; color: var(--muted); font-size: 12px; line-height: 1.8; }
.breathing-orb, .timer-face { width: 190px; height: 190px; border-radius: 50%; border: 1px solid #bfd6c5; box-shadow: 0 0 0 18px #edf5ee, 0 0 0 19px #deebe1, 0 0 0 36px #f6f9f5; background: #e1eee3; color: var(--green); display: flex; align-items: center; justify-content: center; flex-direction: column; margin: 52px auto; }
.timer-number { font-size: 48px; font-weight: 600; letter-spacing: -2px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.timer-label { font-size: 11px; color: #6d8b77; margin-top: 9px; }
.breathing-orb.running, .timer-running { animation: breathe 8s ease-in-out infinite; }
.support-main .button-row { justify-content: center; }
.support-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; margin-top: 18px; }
.action-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 17px; background: #f5f8f5; border: 1px solid #e5ece5; border-radius: 13px; text-align: left; }
.action-tile:hover { background: #eaf3ec; border-color: #a9c7b0; }
.action-tile svg { width: 23px; height: 23px; color: #7fa48a; }
.action-tile strong { font-size: 12px; font-weight: 650; }
.action-tile span, .action-tile small { font-size: 11px; color: #7b8e80; line-height: 1.65; }
.intensity { width: 100%; accent-color: var(--green); margin: 12px 0 5px; }
.range-labels { display: flex; justify-content: space-between; font-size: 10px; color: #8a9c8e; }
.craving-reminder { background: #f6f4e9; border: 1px solid #ece8d8; border-radius: 15px; padding: 23px; font-size: 18px; line-height: 1.8; font-weight: 500; color: #747051; white-space: pre-wrap; overflow-wrap: anywhere; margin: 20px 0; }
.done-content { text-align: center; }
.done-illustration { width: 76px; height: 76px; border-radius: 50%; background: #e4f0e5; color: #79a07c; display: grid; place-items: center; margin: 20px auto; }
.done-illustration svg { width: 34px; height: 34px; }
.done-content h3 { font-size: 23px; letter-spacing: -.6px; margin: 20px 0 10px; }
.done-content p { font-size: 12px; color: #7d9181; line-height: 1.8; }
.plan-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 15px 0 23px; }
.plan-chip { display: inline-flex; align-items: center; gap: 7px; background: #eef5ef; color: #6f8e78; border-radius: 20px; padding: 6px 11px; font-size: 11px; }
.plan-chip svg { width: 14px; height: 14px; }
.profile-form { margin-top: 22px; }
.section-title { font-size: 13px; font-weight: 750; margin: 27px 0 18px; padding-top: 22px; border-top: 1px solid var(--line); }
.section-title:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.segment-control { display: flex; gap: 3px; background: #edf2ee; padding: 4px; border-radius: 11px; margin: 12px 0 20px; }
.segment { flex: 1; border: 0; padding: 10px 8px; background: transparent; color: #7d9183; border-radius: 8px; font-size: 11px; font-weight: 600; }
.segment.active { background: #fff; color: var(--green); box-shadow: 0 2px 5px #183d2810; }
.reduction-card { border: 1px solid #dbe8dc; background: #f0f7f0; border-radius: 15px; padding: 20px; margin: 18px 0; }
.reduction-card strong { font-size: 24px; }
.reduction-card p { font-size: 12px; color: #6f8b77; margin: 8px 0 0; }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: 24px; }
.week-day { display: flex; flex-direction: column; align-items: center; gap: 10px; font-size: 10px; color: #88998d; }
.day-circle { width: 33px; height: 33px; border-radius: 50%; border: 1px solid #e4eae2; background: #f7f9f6; color: #98a397; display: grid; place-items: center; font-size: 11px; padding: 0; }
.day-circle.today { border-color: #8dad95; color: #55775e; box-shadow: 0 0 0 3px #f0f5ee; }
.day-circle.smoke-free { background: #dfeddf; color: #557b55; border-color: #dfeddf; }
.day-circle.resisted { background: #edf0d7; color: #8a904d; border-color: #e7ebcf; }
.day-circle.smoked { background: #f1e5d8; color: #a58564; border-color: #f1e5d8; }
.day-circle svg { width: 14px; height: 14px; }
.week-caption { font-size: 11px; color: #839486; margin: 18px 0 0; }
.calendar-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 19px; }
.calendar-header h3 { font-size: 14px; text-transform: capitalize; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 7px; }
.calendar-weekday { font-size: 10px; text-align: center; color: #8c9b8c; padding-bottom: 6px; }
.calendar-day { min-height: 39px; border: 0; border-radius: 9px; background: #f5f7f2; color: #93a18c; font-size: 11px; position: relative; }
.calendar-day.today { outline: 1px solid #7fa277; outline-offset: 1px; }
.calendar-day.smoke-free { background: #dfeddf; color: #557b55; }
.calendar-day.resisted { background: #edf0d7; color: #838b46; }
.calendar-day.smoked { background: #f1e5d8; color: #a58564; }
.calendar-day:disabled { opacity: .4; background: transparent; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; font-size: 10px; color: #86967f; }
.legend span { display: flex; align-items: center; gap: 6px; }
.legend i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #b8d2b7; }
.legend .resisted { background: #d5dcb2; }
.legend .smoked { background: #dcc7b2; }
.legend .blank { background: #f0f3e9; border: 1px solid #dfe6d6; }
.entry-list { display: flex; flex-direction: column; gap: 11px; margin-top: 20px; }
.entry { border: 1px solid var(--line); border-radius: 13px; padding: 16px; }
.entry-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.entry-title { font-size: 12px; font-weight: 700; }
.entry-date { font-size: 10px; color: #869782; }
.entry-status { font-size: 10px; color: #7a9177; display: flex; align-items: center; gap: 7px; margin-top: 5px; }
.entry-status svg { width: 13px; height: 13px; }
.entry-note { font-size: 12px; color: #718469; margin: 12px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.entry-actions { display: flex; gap: 6px; flex-shrink: 0; }
.details { font-size: 12px; color: #7d8f78; margin-top: 18px; }
.details summary { font-weight: 650; color: #5d7957; cursor: pointer; }
.details p { line-height: 1.8; }
.checkbox-row { display: flex; align-items: center; gap: 10px; font-size: 12px; }
.checkbox-row input { width: 17px; height: 17px; accent-color: var(--green); }
.settings-divider { height: 1px; background: var(--line); margin: 25px 0; }
.privacy-card { background: #f0f5ed; border: 1px solid #e2ebdd; border-radius: 13px; padding: 18px; color: #7b9071; font-size: 11px; line-height: 1.8; }
.privacy-card strong { color: #617c54; display: block; font-size: 12px; margin-bottom: 6px; }
.quiet-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 10px; padding: 4px 9px; border-radius: 20px; background: #edf5e9; color: #72935f; white-space: nowrap; }
.quiet-badge svg { width: 12px; height: 12px; }
.subtle-note { font-size: 11px; color: #7f9276; margin: 15px 0 0; line-height: 1.75; }
.empty-state { padding: 29px 16px; text-align: center; color: #889c80; font-size: 12px; }
.empty-state > svg { display: block; width: 31px; height: 31px; margin: 0 auto 15px; color: #99b28b; }
.empty-state h3 { font-size: 14px; font-weight: 650; color: #628153; margin: 0 0 10px; }
.empty-state p { max-width: 330px; margin: 0 auto 19px; line-height: 1.8; }
.footer { display: flex; justify-content: space-between; align-items: center; gap: 15px; padding-top: 27px; font-size: 10px; color: #8a9a84; }
.footer button { border: 0; background: none; color: #7e9673; font-size: 10px; padding: 6px; }
.save-status { display: flex; align-items: center; gap: 6px; }
.save-status svg { width: 13px; height: 13px; }
dialog { width: min(620px, calc(100% - 32px)); border: 1px solid #dfe7dd; border-radius: 23px; padding: 30px; color: var(--ink); background: var(--paper); max-height: 90dvh; overflow-y: auto; overscroll-behavior: contain; box-shadow: 0 20px 120px #173d2f26; }
dialog::backdrop { background: #1b302b65; backdrop-filter: blur(6px); }
.dialog-header, .dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; margin-bottom: 17px; }
.dialog-header h2, .dialog-heading h2 { font-size: 25px; line-height: 1.4; font-weight: 750; letter-spacing: -.7px; margin: 0; }
.dialog-header .icon-button, .dialog-heading .icon-button { flex-shrink: 0; background: #f0f5ee; border: 0; }
.dialog-description { font-size: 12px; color: #7b9172; line-height: 1.8; margin-bottom: 23px; }
.notifications { position: fixed; bottom: 25px; left: 50%; transform: translateX(-50%); z-index: 100; max-width: calc(100% - 30px); pointer-events: none; }
.toast { border: 1px solid #496d54; background: #294d3c; color: #fff; border-radius: 12px; padding: 13px 20px; box-shadow: 0 8px 35px #213c3020; font-size: 12px; max-width: 450px; animation: appear .2s ease; }
.toast.error { background: #885b47; border-color: #a87860; }
.boot { min-height: 100dvh; display: flex; align-items: center; justify-content: center; flex-direction: column; color: #859879; }
.boot-logo { font-size: 49px; font-weight: 800; letter-spacing: -3px; color: var(--green); }
.boot-logo span { color: #a0bd81; margin-left: 10px; }
.boot p { font-size: 12px; }
.error-card { max-width: 500px; margin: 10vh auto; padding: 35px; }
.no-margin { margin: 0; }
.mt-20 { margin-top: 20px; }
.full-width { width: 100%; }
.help-list { padding-left: 20px; font-size: 12px; line-height: 1.8; color: #7b9071; }
.result-stat { padding: 17px 0; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; font-size: 11px; color: #7f9476; }
.result-stat strong { font-size: 16px; font-weight: 650; color: #58784b; }
.result-stat:last-child { border-bottom: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@keyframes breathe { 0%, 100% { transform: scale(.96); } 50% { transform: scale(1.04); } }
@keyframes appear { from { transform: translateY(7px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@media (min-width: 1500px) { .main { padding-left: 54px; padding-right: 54px; } .progress-hero { min-height: 315px; padding: 32px; } .hero-ring { width: 220px; height: 220px; } }
@media (max-width: 1230px) { .main { padding: 28px 30px 32px; } .sidebar { width: 206px; padding-left: 18px; padding-right: 18px; } .main { width: calc(100% - 206px); } .hero-grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; } .hero-ring { width: 176px; height: 176px; } .ring-center strong { font-size: 56px; } .progress-hero { gap: 13px; padding: 26px 23px; } .progress-hero h2 { font-size: 22px; } .metric-card { padding: 18px 16px; } .metric-grid { gap: 12px; } .metric-number { font-size: 29px; } }
@media (max-width: 1050px) { .sidebar { width: 190px; padding: 31px 16px; } .main { width: calc(100% - 190px); padding: 25px; } .brand { font-size: 30px; } .brand-caption { font-size: 10px; } .nav-button { padding: 12px; font-size: 12px; gap: 10px; } .hero-grid { grid-template-columns: 1fr; } .progress-hero { min-height: 265px; padding: 30px; } .hero-ring { width: 200px; height: 200px; margin-right: 10px; } .progress-hero h2 { font-size: 27px; } .hero-copy > p:not(.eyebrow):not(.hero-note) { max-width: 300px; } .metric-grid { grid-template-columns: repeat(4, 1fr); gap: 10px; } .metric-card { min-height: 135px; padding: 17px 12px; border-radius: 16px; } .metric-number { font-size: 26px; } .metric-label { font-size: 10px; } .metric-caption { font-size: 10px; } .metric-icon { width: 27px; height: 27px; } .section-grid, .support-layout { gap: 16px; } .card { padding: 22px; } .progress-hero { padding: 30px; } .section-grid { grid-template-columns: 1fr 1fr; } .check-options { flex-wrap: wrap; } .check-option { flex-basis: 45%; } .check-option:last-child { flex-basis: 100%; } .support-actions { grid-template-columns: 1fr; } }
@media (max-width: 850px) { .sidebar { width: 175px; padding-left: 14px; padding-right: 14px; } .main { width: calc(100% - 175px); padding: 24px; } .brand { font-size: 28px; } .brand-mark { width: 30px; height: 33px; } .nav-button { font-size: 11px; gap: 9px; padding: 12px 10px; } .sidebar-quote { font-size: 12px; } .page-heading h1 { font-size: 30px; } .section-grid, .two-column, .support-layout { grid-template-columns: 1fr; } .metric-grid { grid-template-columns: 1fr 1fr; } .metric-card { min-height: 140px; padding: 21px; } .metric-label { font-size: 11px; } .metric-number { font-size: 31px; } .progress-hero { padding: 26px; min-height: 255px; gap: 17px; } .hero-ring { width: 168px; height: 168px; margin: 0; } .ring-center strong { font-size: 52px; } .ring-center span { font-size: 11px; } .progress-hero h2 { font-size: 24px; } .hero-note { font-size: 10px; } .hero-tags { margin-top: 16px; } .hero-tag { font-size: 9px; padding: 4px 7px; } .support-actions { grid-template-columns: 1fr 1fr; } .check-options { flex-wrap: nowrap; } .check-option, .check-option:last-child { flex-basis: 0; } .footer { align-items: flex-start; } }
@media (max-width: 680px) {
  body { font-size: 13px; }
  .app-shell { display: block; }
  .sidebar { display: none; }
  .main { width: 100%; padding: 20px 20px calc(105px + env(safe-area-inset-bottom)); }
  .topbar { min-height: 34px; padding: 0 0 22px; border: 0; }
  .topbar-label { display: none; }
  .mobile-brand { display: flex; }
  .brand { font-size: 29px; gap: 9px; letter-spacing: -1.5px; }
  .brand-mark { width: 29px; height: 31px; border-radius: 12px 12px 4px 12px; }
  .brand-mark svg { width: 20px; height: 20px; }
  .date-chip { font-size: 10px; gap: 5px; }
  .date-chip > svg { display: none; }
  .avatar { width: 29px; height: 29px; font-size: 10px; margin-left: 5px; }
  .page-heading { padding: 9px 0 22px; gap: 12px; align-items: flex-start; }
  .page-heading h1 { font-size: 30px; letter-spacing: -.9px; }
  .page-heading p { font-size: 12px; line-height: 1.75; max-width: 320px; margin-top: 8px; }
  .eyebrow { font-size: 9px; letter-spacing: 1.25px; margin-bottom: 10px; }
  .page-heading > .primary { min-width: max-content; min-height: 38px; font-size: 11px; padding: 9px 12px; }
  .hero-grid { gap: 14px; }
  .progress-hero { padding: 26px 24px; border-radius: 20px; min-height: 0; display: flex; align-items: center; flex-direction: column; gap: 22px; }
  .hero-copy { width: 100%; text-align: center; }
  .progress-hero .eyebrow { font-size: 9px; margin-bottom: 9px; }
  .progress-hero h2 { font-size: 25px; max-width: none; }
  .hero-copy > p:not(.eyebrow):not(.hero-note) { margin: 8px auto 0; max-width: 260px; font-size: 12px; }
  .hero-note { font-size: 11px; max-width: 270px; margin: 10px auto 0; }
  .hero-ring { width: 196px; height: 196px; margin: 1px 0 4px; }
  .ring-center strong { font-size: 64px; letter-spacing: -2.5px; }
  .ring-center span { font-size: 12px; }
  .ring-center small { font-size: 10px; }
  .hero-tags { margin-top: 17px; justify-content: center; }
  .hero-tag { font-size: 10px; padding: 5px 9px; }
  .metric-grid { gap: 12px; }
  .metric-card { min-height: 145px; padding: 18px; border-radius: 16px; }
  .metric-label { font-size: 11px; line-height: 1.5; }
  .metric-number { font-size: 30px; letter-spacing: -.8px; margin-top: 8px; }
  .metric-number small, .metric-number span { font-size: 12px; }
  .metric-caption { font-size: 11px; line-height: 1.6; margin-top: 6px; }
  .metric-icon { width: 29px; height: 29px; margin-bottom: 8px; }
  .section-grid { gap: 14px; margin-top: 14px; }
  .panel-stack, .two-column, .support-layout { gap: 14px; }
  .card { padding: 22px; border-radius: 18px; }
  .progress-hero { padding: 26px 24px; }
  .metric-card { padding: 18px; border-radius: 16px; }
  .card h2, .card h3 { font-size: 15px; }
  .progress-hero h2 { font-size: 25px; }
  .card-header + p, .section-description { font-size: 12px; }
  .task-card h2 { font-size: 19px; }
  .task-card > p { font-size: 13px; }
  .task-meta { font-size: 11px; }
  .primary, .secondary, .danger-button { font-size: 13px; min-height: 46px; }
  .text-button { font-size: 11px; }
  .goal-value { font-size: 28px; }
  .goal-footer { font-size: 11px; }
  .goal-heading p, .goal-card > p { font-size: 12px; }
  .quick-check, .sos-banner { margin-top: 14px; }
  .check-options { flex-direction: column; gap: 8px; margin-top: 17px; }
  .check-option { min-height: 45px; flex-basis: auto; justify-content: flex-start; font-size: 12px; padding: 11px 13px; }
  .check-option:last-child { flex-basis: auto; }
  .sos-banner { align-items: flex-start; gap: 16px; padding: 21px; }
  .sos-banner h2, .sos-banner h3 { font-size: 13px; }
  .sos-banner p { font-size: 11px; }
  .sos-banner .primary, .sos-banner .secondary { min-height: 41px; padding: 10px 13px; font-size: 11px; }
  .insight strong { font-size: 12px; }
  .insight p { font-size: 12px; }
  .achievement-grid { gap: 8px; }
  .achievement { padding: 15px 7px; }
  .achievement strong, .achievement small, .achievement p { font-size: 11px; }
  .achievement-icon { width: 42px; height: 42px; }
  .daily-chart { height: 150px; gap: 12px; }
  .chart-label { font-size: 11px; }
  .week-day, .week-caption, .legend, .calendar-weekday { font-size: 11px; }
  .week { gap: 4px; }
  .day-circle { width: 32px; height: 32px; }
  .footer { font-size: 10px; padding-top: 22px; gap: 10px; }
  .footer button { font-size: 10px; }
  .mobile-nav { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; padding: 9px 10px calc(10px + env(safe-area-inset-bottom)); background: #fbfdfbea; border-top: 1px solid #e0e8e1; backdrop-filter: blur(18px); box-shadow: 0 -4px 24px #253f2b04; }
  .mobile-nav .nav-button { display: flex; align-items: center; justify-content: center; flex-direction: column; min-width: 0; gap: 5px; padding: 7px 3px; font-size: 10px; font-weight: 600; line-height: 1.4; min-height: 54px; border-radius: 11px; text-align: center; }
  .mobile-nav .nav-button.active { background: #e7f1e8; color: var(--green); }
  .mobile-nav .nav-button svg { width: 21px; height: 21px; }
  .field { margin-bottom: 19px; }
  .field label, .field-label { font-size: 12px; }
  .field input, .field textarea, .field select { font-size: 16px; }
  .field-hint, .subtle-note { font-size: 11px; }
  .form-grid { gap: 0 12px; }
  .choice-grid { gap: 8px; }
  .pill-choice { padding: 12px 10px; font-size: 12px; gap: 7px; }
  .pill-choice small { font-size: 11px; }
  .button-row .primary, .button-row .secondary { flex: 1; }
  .support-main h2 { font-size: 24px; }
  .support-main > p { font-size: 13px; }
  .breathing-orb, .timer-face { width: 176px; height: 176px; margin: 50px auto; }
  .timer-number { font-size: 46px; }
  .support-actions { gap: 9px; }
  .action-tile { padding: 15px; }
  .action-tile strong { font-size: 12px; }
  .action-tile span, .action-tile small { font-size: 11px; }
  .craving-reminder { font-size: 17px; padding: 21px; }
  .mode-card { padding: 16px; gap: 12px; }
  .mode-card strong { font-size: 13px; }
  .mode-card p, .mode-card small { font-size: 12px; }
  .entry { padding: 14px; }
  .entry-title { font-size: 12px; }
  .entry-date, .entry-status { font-size: 11px; }
  .entry-note { font-size: 12px; }
  .entry-top { gap: 9px; }
  .privacy-card { font-size: 12px; }
  dialog { width: 100%; max-width: 100%; max-height: 90dvh; margin: auto 0 0; border-radius: 23px 23px 0 0; padding: 26px 22px calc(25px + env(safe-area-inset-bottom)); border-bottom: 0; }
  .dialog-header h2, .dialog-heading h2 { font-size: 23px; }
  .dialog-description { font-size: 13px; }
  .notifications { bottom: calc(94px + env(safe-area-inset-bottom)); width: max-content; }
  .toast { font-size: 12px; max-width: calc(100vw - 30px); text-align: center; }
  .error-card { margin: 10vh 20px; }
}
@media (max-width: 370px) { .main { padding-left: 15px; padding-right: 15px; } .date-chip { font-size: 9px; } .metric-card { padding: 16px; } .metric-number { font-size: 28px; } .page-heading h1 { font-size: 28px; } .card { padding: 20px; } .progress-hero { padding: 25px 20px; } .form-grid { grid-template-columns: 1fr; } .achievement-grid { gap: 5px; } .achievement { padding: 12px 5px; } .sos-banner { flex-wrap: wrap; } .sos-banner .primary, .sos-banner .secondary { width: 100%; } }
@media (prefers-reduced-motion: reduce) { *, *:before, *:after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* Bind the responsive visual system to the rendered application markup. */
[hidden] { display: none !important; }
.brand-dot { margin-left: -8px; }
.sidebar-quote > svg { display: block; margin-bottom: 14px; }
.sidebar-bottom .nav-button { margin: 21px -12px 0; width: calc(100% + 24px); }
.footer > span { display: flex; align-items: center; gap: 7px; }
.footer > span svg { width: 13px; height: 13px; }
.progress-hero { border-radius: 20px; min-width: 0; }
.progress-hero h2 { margin: 0; }
.ring-center .ring-number { color: white; font-size: 66px; font-weight: 700; line-height: 1.12; letter-spacing: -3px; font-variant-numeric: tabular-nums; max-width: 100%; }
.metric-label .metric-icon { margin: 0; flex-shrink: 0; }
.metric-label > span:first-child { min-width: 0; }
.progress-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.goal-heading { display: block; font-size: 13px; color: #8d8b76; margin-top: 17px; }
.goal-value { margin-top: 9px; }
.progress-fill { display: block; }
.section-grid > .quick-check { margin-top: 0; }
.quick-check .card-header { align-items: flex-start; }
.task-meta { width: 100%; flex-wrap: wrap; }
.task-meta > span:last-child { margin-left: auto; }
.task-meta .quiet-badge { font-size: 9px; white-space: normal; }
.setup-banner { display: flex; align-items: center; justify-content: space-between; gap: 20px; background: #e9f2eb; border: 1px solid #dce9df; border-radius: 17px; margin-bottom: 20px; padding: 20px 24px; }
.setup-banner strong { font-size: 14px; }
.setup-banner p { font-size: 12px; color: #738e7c; line-height: 1.75; margin: 4px 0 0; }
.setup-banner .secondary { flex-shrink: 0; background: #fff; }
.sos-banner > div { display: flex; align-items: center; gap: 14px; min-width: 0; }
.sos-banner > div > svg { width: 28px; height: 28px; color: #7c9e88; }
.sos-banner strong { display: block; font-size: 13px; line-height: 1.5; }
.sos-banner small { display: block; font-size: 11px; color: #6f8779; margin-top: 4px; line-height: 1.65; }
.insight h3 { font-size: 12px; line-height: 1.6; letter-spacing: -.1px; }
.achievement h3 { font-size: 12px; line-height: 1.5; letter-spacing: -.1px; }
.daily-chart { height: 174px; }
.chart-column { gap: 9px; }
.chart-value { min-height: 16px; line-height: 16px; }
.chart-bar-wrap { display: flex; align-items: flex-end; justify-content: center; flex: 1; width: 100%; min-height: 0; border-bottom: 1px solid #edf1eb; }
.chart-bar { display: block; background: #d9b892; }
.chart-column:nth-last-child(1) .chart-bar { background: #bd9871; }
.chart-bar.zero, .chart-column:nth-last-child(1) .chart-bar.zero { background: #a2c6a8; }
.chart-bar.unknown, .chart-column:nth-last-child(1) .chart-bar.unknown { background: #e6ece3; }
.chart-label { white-space: nowrap; font-size: 9px; }
.onboarding { width: calc(100% - 40px); max-width: 620px; margin: 48px auto; padding: 38px 44px 30px; border: 1px solid #e1e9e2; border-radius: 25px; background: var(--paper); box-shadow: 0 20px 70px #23493607; }
.onboard-brand { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 35px; }
.onboard-brand > span:last-child { font-size: 9px; font-weight: 700; letter-spacing: 1.3px; color: #91a18e; }
.onboarding > h1 { font-size: 31px; line-height: 1.3; font-weight: 750; letter-spacing: -1px; margin: 0 0 12px; }
.onboard-intro { font-size: 13px; line-height: 1.8; color: #7d9076; margin: 0 0 25px; }
.onboard-foot { display: flex; align-items: center; justify-content: center; gap: 7px; font-size: 10px; color: #8fa184; margin: 27px 0 0; }
.onboard-foot svg { width: 13px; height: 13px; }
.onboarding .button-row { margin-top: 24px; }
.onboarding .button-row > .primary { flex: 1; }
.onboarding .button-row > .text-button { padding: 10px 17px; }
.mode-card { align-items: center; cursor: pointer; position: relative; }
.mode-card > input[type=radio] { position: absolute; width: 1px; height: 1px; padding: 0; margin: 0; opacity: 0; pointer-events: none; }
.mode-card:focus-within { outline: 3px solid #8dc7aa; outline-offset: 4px; }
.mode-icon { display: grid; place-items: center; flex-shrink: 0; width: 37px; height: 37px; color: #80a286; background: #edf3eb; border-radius: 11px; }
.mode-icon svg { width: 22px; height: 22px; }
.mode-card > span:not(.mode-icon) { flex: 1; min-width: 0; }
.mode-card > svg:last-child { width: 18px; height: 18px; margin: 0; color: var(--green); visibility: hidden; }
.mode-card.selected > svg:last-child { visibility: visible; }
.mode-card.selected .mode-icon { background: #dfece0; }
.mode-card small { display: block; }
.support-actions { grid-template-columns: 1fr; }
.action-tile { display: grid; grid-template-columns: 23px minmax(0, 1fr) 14px; align-items: center; gap: 12px; }
.action-tile > span { min-width: 0; }
.action-tile strong, .action-tile small { display: block; }
.action-tile small { margin-top: 4px; }
.action-tile > svg:last-child { width: 14px; height: 14px; color: #98ac94; }
.action-tile:has(> span:first-child) { grid-template-columns: minmax(0, 1fr) 14px; }
.support-main > .breathing-orb > svg { width: 49px; height: 49px; stroke-width: 1.2; }
.timer-face { width: auto; height: auto; border: 0; border-radius: 0; background: none; box-shadow: none; margin: 0 0 24px; }
.timer-face .breathing-orb { margin: 37px auto 38px; }
.timer-face .timer-label { text-align: center; font-size: 11px; margin-top: 5px; }
.breathing-orb.is-breathing { animation: breathe 8s ease-in-out infinite; }
.field input[type=range] { padding: 0; border: 0; border-radius: 0; background: none; min-height: 25px; height: 25px; accent-color: var(--green); cursor: pointer; }
.field label output { font-size: 11px; color: #83a074; font-weight: 500; display: block; margin-top: 5px; }
fieldset.field { border: 0; padding: 0; margin: 0 0 20px; }
fieldset.field legend { padding: 0; font-size: 12px; font-weight: 700; }
fieldset.field .choice-grid { margin-bottom: 0; }
form > .subtle-note + button, form > .field-hint + button { margin-top: 18px; }
#profile-form > .card-header { margin-bottom: 24px; }
.plan-summary > span:not(.plan-chip) { color: #7e9074; font-size: 12px; }
.toggle-row { display: flex; align-items: center; gap: 10px; font-size: 12px; margin: 23px 0 10px; }
.toggle-row input { width: 18px; height: 18px; flex-shrink: 0; accent-color: var(--green); }
#settings-form > .form-grid { margin-top: 22px; }
@media (max-width: 1230px) { .ring-center .ring-number { font-size: 56px; } }
@media (max-width: 850px) { .ring-center .ring-number { font-size: 52px; } .progress-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) {
  .ring-center .ring-number { font-size: 64px; letter-spacing: -2.5px; }
  .onboarding { width: calc(100% - 28px); margin: 18px auto; padding: 25px 22px; border-radius: 21px; }
  .onboard-brand { margin-bottom: 28px; }
  .onboard-brand > span:last-child { font-size: 8px; letter-spacing: 1px; max-width: 88px; text-align: right; }
  .onboarding > h1 { font-size: 28px; letter-spacing: -.8px; }
  .onboard-intro { font-size: 13px; margin-bottom: 22px; }
  .onboard-foot { font-size: 10px; line-height: 1.7; margin-top: 25px; }
  .mode-card { gap: 10px; padding: 15px 12px; }
  .mode-card > svg:last-child { width: 16px; height: 16px; }
  .mode-icon { width: 32px; height: 34px; border-radius: 10px; }
  .mode-icon svg { width: 20px; height: 20px; }
  .mode-card strong { font-size: 13px; }
  .mode-card small { font-size: 11px; line-height: 1.65; }
  .setup-banner { padding: 19px; flex-direction: column; align-items: stretch; gap: 13px; margin-bottom: 14px; }
  .setup-banner .secondary { align-self: flex-start; }
  .sos-banner { flex-direction: column; gap: 16px; }
  .sos-banner > div { gap: 12px; }
  .sos-banner > div > svg { width: 25px; height: 25px; }
  .sos-banner strong { font-size: 13px; }
  .sos-banner small { font-size: 12px; }
  .sos-banner .secondary { width: 100%; min-height: 43px; font-size: 12px; }
  .task-meta { gap: 8px; }
  .task-meta > span:last-child { font-size: 10px; }
  .task-meta .quiet-badge { max-width: calc(100% - 50px); }
  .insight h3 { font-size: 13px; }
  .achievement h3 { font-size: 11px; }
  .chart-label { font-size: 9px; }
  .daily-chart { gap: 8px; padding: 0; }
  .action-tile { padding: 15px; }
  .timer-face { width: auto; height: auto; margin: 0 0 24px; }
  .timer-face .breathing-orb { margin: 36px auto 36px; }
  .field label output { font-size: 11px; }
  .plan-summary { gap: 10px 14px; }
  .toggle-row { font-size: 12px; line-height: 1.7; align-items: flex-start; }
  .toggle-row input { margin-top: 3px; }
}
@media (max-width: 370px) { .onboarding { padding: 23px 18px; } .mode-card { gap: 8px; padding: 14px 10px; } .mode-icon { width: 28px; } .mode-card strong { font-size: 12px; } .onboarding > h1 { font-size: 26px; } }
@media (prefers-reduced-motion: reduce) { .breathing-orb.is-breathing { animation: none; } }

/* SVG keeps the progress arc consistent in WebKit and Chromium. */
.hero-ring { background: none; border: 0; box-shadow: none; }
.hero-ring:before { display: none; }

@media (max-width: 680px) {
  .page-heading { padding: 24px 0; align-items: flex-start; }
  .page-heading h1 { font-size: 28px; }
  .page-heading > .secondary { padding: 10px 12px; font-size: 11px; }
  .progress-hero { display: grid; grid-template-columns: minmax(0, 1fr) 136px; gap: 12px; padding: 24px 20px; }
  .hero-copy { display: contents; }
  .hero-copy .eyebrow { grid-column: 1 / -1; text-align: left; margin: 0; }
  .hero-copy h2 { grid-column: 1; grid-row: 2; text-align: left; font-size: 21px; }
  .hero-copy .hero-note { grid-column: 1; grid-row: 3; text-align: left; font-size: 11px; margin: 0; }
  .hero-ring { grid-column: 2; grid-row: 2 / 4; width: 136px; height: 136px; margin: 0; }
  .ring-center { padding: 14px; }
  .ring-center .ring-number { font-size: 47px; }
  .ring-center span { font-size: 10px; }
  .ring-center small { font-size: 8px; margin-top: 5px; }
  .hero-tags { grid-column: 1 / -1; margin-top: 2px; justify-content: flex-start; }
  .field input, .field select, .field textarea { font-size: 16px; }
}

/* Telegram keeps one compact layout on mobile, desktop, and web clients. */
html[data-telegram="true"] {
  --bg: var(--app-tg-bg, #f4f6f5);
  --paper: var(--app-tg-surface, #fff);
  --ink: var(--app-tg-text, #203b33);
  --muted: var(--app-tg-muted, #718078);
  --app-inset-top: calc(max(env(safe-area-inset-top, 0px), var(--app-safe-top, 0px)) + var(--app-content-safe-top, 0px));
  --app-inset-right: calc(max(env(safe-area-inset-right, 0px), var(--app-safe-right, 0px)) + var(--app-content-safe-right, 0px));
  --app-inset-bottom: calc(max(env(safe-area-inset-bottom, 0px), var(--app-safe-bottom, 0px)) + var(--app-content-safe-bottom, 0px));
  --app-inset-left: calc(max(env(safe-area-inset-left, 0px), var(--app-safe-left, 0px)) + var(--app-content-safe-left, 0px));
  color-scheme: light;
  scroll-padding-top: calc(20px + var(--app-inset-top));
  scroll-padding-bottom: calc(100px + var(--app-inset-bottom));
}
html[data-telegram="true"] body { min-height: var(--app-viewport-stable-height, 100dvh); font-size: 13px; }
html[data-telegram="true"] .app-shell { display: block; min-height: var(--app-viewport-stable-height, 100dvh); max-width: 680px; }
html[data-telegram="true"] .sidebar { display: none; }
html[data-telegram="true"] .main { width: 100%; max-width: 680px; padding: calc(20px + var(--app-inset-top)) calc(20px + var(--app-inset-right)) calc(110px + var(--app-inset-bottom)) calc(20px + var(--app-inset-left)); }
html[data-telegram="true"] .topbar { min-height: 34px; padding: 0 0 8px; border: 0; }
html[data-telegram="true"] .topbar-label, html[data-telegram="true"] .date-chip > svg { display: none; }
html[data-telegram="true"] .mobile-brand { display: flex; }
html[data-telegram="true"] .brand { font-size: 29px; gap: 9px; letter-spacing: -1.5px; }
html[data-telegram="true"] .brand-mark { width: 29px; height: 31px; border-radius: 12px 12px 4px 12px; }
html[data-telegram="true"] .brand-mark svg { width: 20px; height: 20px; }
html[data-telegram="true"] .date-chip { font-size: 10px; gap: 5px; }
html[data-telegram="true"] .avatar { width: 32px; height: 32px; font-size: 11px; margin-left: 5px; }
html[data-telegram="true"] .page-heading { padding: 24px 0; align-items: flex-start; gap: 12px; }
html[data-telegram="true"] .page-heading > div { min-width: 0; }
html[data-telegram="true"] .page-heading h1 { font-size: 28px; letter-spacing: -.9px; }
html[data-telegram="true"] .page-heading > .secondary { padding: 10px 12px; font-size: 11px; }
html[data-telegram="true"] :is(.page-heading h1, .goal-heading, .goal-value, .metric-number) { max-width: 100%; overflow-wrap: anywhere; }
html[data-telegram="true"] .goal-footer > span { min-width: 0; overflow-wrap: anywhere; }
html[data-telegram="true"] .goal-footer .text-button { flex-shrink: 0; }
html[data-telegram="true"] :is(.hero-grid, .section-grid, .two-column, .support-layout) { grid-template-columns: minmax(0, 1fr); gap: 14px; }
html[data-telegram="true"] .section-grid { margin-top: 14px; }
html[data-telegram="true"] .panel-stack { gap: 14px; }
html[data-telegram="true"] .card { padding: 22px; border-radius: 18px; }
html[data-telegram="true"] .progress-hero { display: grid; grid-template-columns: minmax(0, 1fr) 136px; gap: 12px; padding: 24px 20px; min-height: 0; }
html[data-telegram="true"] .hero-copy { display: contents; }
html[data-telegram="true"] .hero-copy .eyebrow { grid-column: 1 / -1; text-align: left; margin: 0; }
html[data-telegram="true"] .hero-copy h2 { grid-column: 1; grid-row: 2; text-align: left; font-size: 21px; }
html[data-telegram="true"] .hero-copy .hero-note { grid-column: 1; grid-row: 3; text-align: left; font-size: 11px; margin: 0; }
html[data-telegram="true"] .hero-ring { grid-column: 2; grid-row: 2 / 4; width: 136px; height: 136px; margin: 0; }
html[data-telegram="true"] .ring-center { padding: 14px; }
html[data-telegram="true"] .ring-center .ring-number { font-size: 47px; }
html[data-telegram="true"] .ring-center span { font-size: 10px; }
html[data-telegram="true"] .ring-center small { font-size: 8px; margin-top: 5px; }
html[data-telegram="true"] .hero-tags { grid-column: 1 / -1; margin-top: 2px; justify-content: flex-start; }
html[data-telegram="true"] :is(.metric-grid, .progress-metrics) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
html[data-telegram="true"] .metric-card { padding: 18px; min-height: 145px; border-radius: 16px; }
html[data-telegram="true"] .metric-number { font-size: 30px; }
html[data-telegram="true"] :is(.metric-caption, .field-hint, .subtle-note) { font-size: 11px; }
html[data-telegram="true"] :is(.primary, .secondary, .danger-button) { min-height: 46px; font-size: 13px; }
html[data-telegram="true"] .check-options { flex-direction: column; gap: 8px; }
html[data-telegram="true"] .check-option { min-height: 45px; flex-basis: auto; justify-content: flex-start; font-size: 12px; padding: 11px 13px; }
html[data-telegram="true"] .week { grid-template-columns: repeat(7, minmax(0, 1fr)); }
html[data-telegram="true"] .week-day { min-width: 0; }
html[data-telegram="true"] .day-circle { width: min(32px, 100%); height: auto; aspect-ratio: 1; }
html[data-telegram="true"] :is(.setup-banner, .sos-banner) { flex-direction: column; align-items: stretch; gap: 14px; padding: 20px; }
html[data-telegram="true"] .sos-banner { margin-top: 14px; }
html[data-telegram="true"] .setup-banner .secondary { align-self: flex-start; }
html[data-telegram="true"] .mobile-nav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); position: fixed; z-index: 30; top: var(--app-viewport-stable-height, 100dvh); bottom: auto; left: 50%; right: auto; transform: translate(-50%, -100%); width: 100%; max-width: 680px; padding: 9px calc(10px + var(--app-inset-right)) calc(10px + var(--app-inset-bottom)) calc(10px + var(--app-inset-left)); background: var(--paper); border-top: 1px solid var(--line); box-shadow: 0 -4px 24px #253f2b04; }
html[data-telegram="true"] .mobile-nav .nav-button { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 0; gap: 5px; padding: 7px 3px; font-size: 10px; font-weight: 600; line-height: 1.4; min-height: 54px; border-radius: 11px; text-align: center; }
html[data-telegram="true"] .mobile-nav .nav-button.active { background: var(--mint); color: var(--green); }
html[data-telegram="true"] .mobile-nav .nav-button svg { width: 21px; height: 21px; }
html[data-telegram="true"] .onboarding { width: calc(100% - 28px - var(--app-inset-left) - var(--app-inset-right)); max-width: 620px; margin: calc(18px + var(--app-inset-top)) auto calc(18px + var(--app-inset-bottom)); padding: 25px 22px; border-radius: 21px; }
html[data-telegram="true"] .onboarding > h1 { font-size: 28px; }
html[data-telegram="true"] .onboard-brand { margin-bottom: 28px; }
html[data-telegram="true"] .onboard-brand > span:last-child { font-size: 8px; max-width: 88px; text-align: right; }
html[data-telegram="true"] .field :is(input, select, textarea) { font-size: 16px; }
/* Forms follow the visible viewport while the navigation stays anchored during drags. */
html[data-telegram="true"] dialog { width: min(620px, calc(100% - var(--app-inset-left) - var(--app-inset-right))); max-width: 100%; max-height: calc(min(100dvh, var(--app-viewport-height, 100dvh)) - var(--app-inset-top) - 14px); top: auto; bottom: max(0px, calc(100dvh - var(--app-viewport-height, 100dvh))); margin: auto auto 0; border-radius: 23px 23px 0 0; padding: 26px 22px calc(25px + var(--app-inset-bottom)); border-bottom: 0; scroll-padding-block: 16px; }
html[data-telegram="true"] .notifications { top: calc(min(100dvh, var(--app-viewport-height, 100dvh)) - 94px - var(--app-inset-bottom)); bottom: auto; transform: translate(-50%, -100%); width: max-content; }
html[data-telegram="true"] .boot { min-height: var(--app-viewport-stable-height, 100dvh); }

@media (max-width: 370px) {
  html[data-telegram="true"] .main { padding-left: calc(15px + var(--app-inset-left)); padding-right: calc(15px + var(--app-inset-right)); }
  html[data-telegram="true"] .card { padding: 18px; }
  html[data-telegram="true"] .progress-hero { grid-template-columns: minmax(0, 1fr) 110px; padding: 22px 18px; }
  html[data-telegram="true"] .hero-copy h2 { font-size: 20px; }
  html[data-telegram="true"] .hero-ring { width: 110px; height: 110px; }
  html[data-telegram="true"] .ring-center { padding: 10px; }
  html[data-telegram="true"] .ring-center .ring-number { font-size: 38px; }
  html[data-telegram="true"] .ring-center span { font-size: 9px; }
  html[data-telegram="true"] .ring-center small { font-size: 7px; margin-top: 3px; }
  html[data-telegram="true"] .metric-card { padding: 16px; }
  html[data-telegram="true"] .metric-number { font-size: 26px; }
  html[data-telegram="true"] .onboarding { padding: 23px 18px; }
  html[data-telegram="true"] .onboarding > h1 { font-size: 26px; }
}

/* A night palette keeps the emerald tracker while honoring Telegram's surfaces. */
html[data-telegram="true"][data-theme="dark"] { --green: #91d6b4; --mint: #263f33; --line: #33473d; --peach: #3b3427; --amber: #d7b77d; color-scheme: dark; }
html[data-telegram="true"][data-theme="dark"] :is(.brand, .boot-logo) { color: #a3dcbe; }
html[data-telegram="true"][data-theme="dark"] .brand-mark { background: #2a6d53; }
html[data-telegram="true"][data-theme="dark"] .primary { background: #2b7b60; color: #fff; }
html[data-telegram="true"][data-theme="dark"] .primary:hover { background: #23674f; }
html[data-telegram="true"][data-theme="dark"] :is(.secondary, .avatar, .task-done, .metric-icon, .insight-icon, .done-illustration, .plan-chip, .quiet-badge, .mode-icon, .mode-card.selected .mode-icon) { background: #263f33; color: #a3d5b8; border-color: var(--line); }
html[data-telegram="true"][data-theme="dark"] :is(.goal-card, .craving-reminder) { background: #302e23; border-color: #494331; color: #ddcfaa; }
html[data-telegram="true"][data-theme="dark"] :is(.goal-heading, .goal-heading p, .goal-value span, .goal-footer, .goal-card > p) { color: #bdb598; }
html[data-telegram="true"][data-theme="dark"] :is(.goal-value, .result-stat strong) { color: #e5d9b9; }
html[data-telegram="true"][data-theme="dark"] .progress-track { background: #4a4331; }
html[data-telegram="true"][data-theme="dark"] .progress-fill { background: #c8ad72; }
html[data-telegram="true"][data-theme="dark"] :is(.field input, .field textarea, .field select, .check-option, .pill-choice, .mode-card, .action-tile, .day-circle, .calendar-day) { background: #1b2c25; border-color: var(--line); color: var(--ink); }
html[data-telegram="true"][data-theme="dark"] :is(.field input::placeholder, .field textarea::placeholder) { color: #829a8d; }
html[data-telegram="true"][data-theme="dark"] :is(.check-option.selected, .pill-choice.selected, .mode-card.selected, .check-option:hover, .pill-choice:hover, .action-tile:hover) { background: #294b39; border-color: #689b7d; }
html[data-telegram="true"][data-theme="dark"] :is(.setup-banner, .sos-banner, .reduction-card, .privacy-card, .stat-explainer, .achievement, .segment-control) { background: #22372d; border-color: var(--line); }
html[data-telegram="true"][data-theme="dark"] :is(.setup-banner .secondary, .segment.active, .dialog-header .icon-button, .dialog-heading .icon-button, .icon-button:hover, .nav-button:hover) { background: #314b3e; color: #b0ddc4; }
html[data-telegram="true"][data-theme="dark"] :is(.achievement-icon, .day-circle.smoke-free, .calendar-day.smoke-free) { background: #31553c; color: #c2dfbe; border-color: #31553c; }
html[data-telegram="true"][data-theme="dark"] :is(.day-circle.resisted, .calendar-day.resisted) { background: #444c2e; color: #d9dfaf; border-color: #444c2e; }
html[data-telegram="true"][data-theme="dark"] :is(.day-circle.smoked, .calendar-day.smoked) { background: #4c382a; color: #e0bd99; border-color: #4c382a; }
html[data-telegram="true"][data-theme="dark"] .day-circle.today { box-shadow: 0 0 0 3px #273c30; }
html[data-telegram="true"][data-theme="dark"] :is(.achievement.locked, .achievement.locked .achievement-icon) { background: #28372e; color: #9bac9d; }
html[data-telegram="true"][data-theme="dark"] :is(.chart-bar.unknown, .chart-column:nth-last-child(1) .chart-bar.unknown) { background: #405345; }
html[data-telegram="true"][data-theme="dark"] :is(.insight, .chart-bar-wrap, .onboarding, dialog) { border-color: var(--line); }
html[data-telegram="true"][data-theme="dark"] :is(.danger-button, .inline-error) { background: #482e25; color: #efb79e; border-color: #754a38; }
html[data-telegram="true"][data-theme="dark"] .form-error { color: #efb79e; }
html[data-telegram="true"][data-theme="dark"] .breathing-orb { background: #294b38; color: #b9ddbc; border-color: #44674e; box-shadow: 0 0 0 18px #22382b, 0 0 0 19px #344b3a, 0 0 0 36px #1d3024; }
html[data-telegram="true"][data-theme="dark"] :is(.eyebrow, .date-chip, .metric-label, .metric-caption, .metric-number small, .metric-number span, .task-meta, .field-hint, .field label output, .pill-choice small, .action-tile span, .action-tile small, .range-labels, .timer-label, .timer-face .timer-label, .week-day, .week-caption, .calendar-weekday, .legend, .entry-date, .entry-status, .entry-note, .details, .subtle-note, .empty-state, .footer, .footer button, .onboard-intro, .onboard-foot, .onboard-brand > span:last-child, .setup-banner p, .sos-banner p, .sos-banner small, .reduction-card p, .privacy-card, .help-list, .dialog-description, .done-content p, .plan-summary > span:not(.plan-chip), .achievement p, .achievement small, .chart-label, .chart-value) { color: var(--muted); }
html[data-telegram="true"][data-theme="dark"] :is(.privacy-card strong, .details summary, .empty-state h3) { color: #b0d4bb; }
html[data-telegram="true"][data-theme="dark"] .onboard-dot { background: #34473b; }
html[data-telegram="true"][data-theme="dark"] .onboard-dot.active { background: #88bb98; }
html[data-telegram="true"][data-theme="dark"] .text-button:hover { color: #c0e7cc; }
html[data-telegram="true"][data-theme="dark"] .nav-button { color: #a4b6ac; }

/* WebKit's native macOS popup style ignores the shared field height and background. */
.field select, html[data-telegram="true"][data-theme] .field select {
  -webkit-appearance: none;
  appearance: none;
  min-height: 46px;
  padding: 12px 42px 12px 13px;
  line-height: 1.6;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23718078' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px 16px;
}
html[data-telegram="true"][data-theme="dark"] .field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23a4b6ac' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
}
