:root {
  --ink: #102338;
  --muted: #64788e;
  --green: #153a66;
  --green-2: #205487;
  --lime: #72c7ff;
  --lime-soft: #dcefff;
  --paper: #f3f7fb;
  --card: #ffffff;
  --line: #d7e0e9;
  --red: #b7473f;
  --shadow: 0 20px 65px rgba(16, 35, 56, .09);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 13px;
  font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--paper); color: var(--ink); }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }

.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 800; letter-spacing: .12em; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--green); color: var(--lime); font-size: 16px; letter-spacing: 0; }
.brand-light { color: #fff; }
.brand-mark-light { background: var(--lime); color: var(--green); }
.eyebrow, .label { margin: 0; text-transform: uppercase; letter-spacing: .13em; font-weight: 750; font-size: 11px; color: var(--muted); }
.button { min-height: 48px; padding: 0 20px; border-radius: 999px; border: 1px solid transparent; display: inline-flex; align-items: center; justify-content: center; gap: 9px; font-weight: 720; cursor: pointer; transition: transform .2s, background .2s, border-color .2s; }
.button:hover { transform: translateY(-2px); }
.button-primary { background: var(--green); color: #fff; }
.button-primary:hover { background: var(--green-2); }
.button-accent { background: var(--lime); color: var(--green); }
.button-accent:hover { background: #9fd9ff; }
.button-ghost { background: transparent; border-color: #c5cac2; }
.button-ghost:hover { border-color: var(--green); }
.button.compact { min-height: 44px; padding: 0 17px; font-size: 13px; }
.text-link { font-size: 13px; font-weight: 700; border-bottom: 1px solid var(--ink); padding-bottom: 4px; }

/* Landing */
.landing-body { min-height: 100vh; overflow-x: hidden; background: var(--paper); }
.landing-nav { height: 94px; max-width: 1440px; padding: 0 6vw; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; }
.landing-main { max-width: 1440px; min-height: calc(100vh - 158px); padding: 5vh 6vw 7vh; margin: 0 auto; display: grid; grid-template-columns: .92fr 1.08fr; align-items: center; gap: 7vw; }
.landing-copy { padding-bottom: 4vh; position: relative; z-index: 2; }
.landing-copy h1 { margin: 18px 0 26px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(54px, 6.2vw, 98px); font-weight: 500; line-height: .93; letter-spacing: -.055em; }
.landing-copy h1 em { color: var(--green); font-weight: 500; }
.landing-lead { max-width: 590px; font-size: clamp(17px, 1.35vw, 21px); line-height: 1.65; color: #536b84; }
.landing-actions { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 12px; }
.privacy-note { margin-top: 52px; display: flex; align-items: flex-start; gap: 12px; color: #5c7187; font-size: 12px; line-height: 1.5; }
.privacy-note p { margin: 0; }
.privacy-note strong { color: var(--ink); }
.privacy-icon { color: var(--green); padding-top: 2px; }
.landing-preview { min-height: 680px; display: grid; place-items: center; position: relative; isolation: isolate; }
.landing-preview::before { content: ""; position: absolute; inset: 5% -15% 3% 4%; border-radius: 48% 48% 38% 56%; background: var(--green); transform: rotate(-3deg); z-index: -2; }
.landing-preview::after { content: ""; width: 180px; height: 180px; border-radius: 50%; position: absolute; right: -5%; top: 4%; background: var(--lime); z-index: -1; }
.phone-shell { width: min(390px, 68%); min-height: 660px; padding: 15px 17px 22px; border: 9px solid #0b1828; border-radius: 49px; background: #f8fbfe; box-shadow: 0 38px 90px rgba(0,0,0,.35); transform: rotate(2.8deg); }
.phone-topbar { height: 27px; display: flex; align-items: center; justify-content: space-between; font-size: 9px; font-weight: 700; padding: 0 7px; }
.phone-island { width: 88px; height: 22px; border-radius: 14px; background: #0b1828; }
.phone-appbar { display: flex; justify-content: space-between; align-items: center; padding: 12px 5px 29px; }
.mini-brand { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--green); color: var(--lime); font-weight: 900; }
.phone-avatar { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #e4e5dc; font-size: 10px; font-weight: 800; }
.phone-content { padding: 0 7px; }
.phone-content h2 { margin: 7px 0 20px; font-family: Georgia, serif; font-size: 29px; font-weight: 500; }
.phone-weight-card { background: var(--green); border-radius: 24px; padding: 22px; color: #fff; display: flex; flex-direction: column; align-items: flex-start; }
.phone-weight-card > span:first-child { font-size: 10px; text-transform: uppercase; letter-spacing: .12em; opacity: .65; }
.phone-weight-card strong { margin: 8px 0 12px; font-size: 47px; letter-spacing: -.05em; }
.phone-weight-card small { font-size: 16px; font-weight: 500; opacity: .7; }
.trend-pill { display: inline-flex; align-items: center; border-radius: 999px; background: var(--lime-soft); color: var(--green); padding: 7px 10px; font-size: 11px; font-weight: 800; }
.trend-pill.dark { background: rgba(114,199,255,.18); color: var(--lime); }
.phone-chart { margin-top: 20px; border-radius: 20px; background: #eeeee7; padding: 12px; }
.phone-chart svg { display: block; width: 100%; }
.phone-mini-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.phone-mini-grid > div { background: #fff; border: 1px solid #e1e2dc; border-radius: 16px; padding: 13px; display: flex; flex-direction: column; gap: 6px; }
.phone-mini-grid span { color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .1em; }
.phone-mini-grid strong { font-size: 15px; }
.floating-card { position: absolute; background: var(--card); border-radius: 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.floating-goal { left: -2%; top: 21%; padding: 20px 24px; transform: rotate(-6deg); }
.floating-goal span { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .12em; }
.floating-goal strong { margin-top: 7px; font-size: 26px; }
.floating-streak { right: -1%; bottom: 16%; min-width: 176px; padding: 18px; display: flex; flex-direction: row; align-items: center; gap: 12px; transform: rotate(5deg); }
.floating-streak strong { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; background: var(--lime); color: var(--green); font-size: 23px; }
.floating-streak span { font-size: 11px; line-height: 1.35; text-transform: uppercase; letter-spacing: .07em; font-weight: 750; }
.landing-footer { min-height: 64px; border-top: 1px solid #d4d6cd; max-width: 1440px; padding: 0 6vw; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; color: #727b74; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }

/* App shell */
.app-body { min-height: 100vh; background: #eeede6; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 20; width: 240px; padding: 34px 24px 24px; background: var(--green); color: rgba(255,255,255,.68); display: flex; flex-direction: column; }
.side-nav { margin-top: 72px; display: flex; flex-direction: column; gap: 8px; }
.side-link { min-height: 48px; padding: 0 14px; display: flex; align-items: center; gap: 13px; border-radius: 12px; color: rgba(255,255,255,.64); font-size: 13px; font-weight: 650; transition: color .2s, background .2s; }
.side-link:hover, .side-link.active { color: #fff; background: rgba(255,255,255,.09); }
.side-icon { width: 20px; font-size: 19px; text-align: center; color: var(--lime); }
.sidebar-bottom { margin-top: auto; }
.side-button { border: 0; width: 100%; background: transparent; cursor: pointer; }
.storage-chip { margin-top: 17px; border-top: 1px solid rgba(255,255,255,.12); padding: 21px 8px 0; display: flex; align-items: flex-start; gap: 10px; }
.status-dot { margin-top: 4px; width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 4px rgba(114,199,255,.12); }
.status-dot[data-mode="syncing"] { animation: syncPulse 1s ease-in-out infinite; }
.status-dot[data-mode="error"] { background: #ffb06b; box-shadow: 0 0 0 4px rgba(255,176,107,.12); }
@keyframes syncPulse { 50% { opacity: .35; } }
.storage-chip span:last-child { display: flex; flex-direction: column; gap: 3px; }
.storage-chip strong { font-size: 10px; color: #fff; text-transform: uppercase; letter-spacing: .08em; }
.storage-chip small { font-size: 10px; }
.app-shell { margin-left: 240px; min-height: 100vh; }
.app-header { position: sticky; top: 0; z-index: 12; min-height: 112px; padding: 24px clamp(25px, 4vw, 64px); border-bottom: 1px solid #d9dad3; background: rgba(238,237,230,.91); backdrop-filter: blur(16px); display: flex; align-items: center; justify-content: space-between; }
.header-date { margin: 0 0 4px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; font-size: 10px; font-weight: 750; }
.app-header h1 { margin: 0; font-family: Georgia, serif; font-size: 27px; font-weight: 500; letter-spacing: -.02em; }
.header-actions { display: flex; align-items: center; gap: 9px; }
.icon-button, .avatar-button { width: 44px; height: 44px; border-radius: 50%; border: 1px solid #c5cac2; background: transparent; cursor: pointer; }
.avatar-button { display: none; background: var(--green); color: var(--lime); border: 0; font-weight: 800; }
.mobile-brand { display: none; align-items: center; gap: 8px; font-weight: 850; letter-spacing: .12em; }
.dashboard { width: min(1180px, calc(100% - 7vw)); padding: 42px 0 120px; margin: 0 auto; }
.overview-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(250px, .7fr); gap: 18px; }
.hero-card, .countdown-card, .chart-card, .metric-card, .history-card { border: 1px solid #dbdcd5; box-shadow: 0 13px 40px rgba(24,48,38,.035); }
.hero-card { min-height: 342px; padding: 38px 42px 30px; border: 0; border-radius: var(--radius-lg); background: var(--green); color: #fff; position: relative; overflow: hidden; }
.hero-card::after { content: ""; position: absolute; width: 260px; height: 260px; border: 1px solid rgba(255,255,255,.08); border-radius: 50%; right: -90px; bottom: -125px; box-shadow: 0 0 0 38px rgba(255,255,255,.025), 0 0 0 78px rgba(255,255,255,.018); pointer-events: none; }
.hero-card .label { color: rgba(255,255,255,.57); }
.hero-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 35px; }
.big-weight { margin-top: 7px; display: flex; align-items: baseline; gap: 10px; }
.big-weight strong { font-size: clamp(63px, 6vw, 86px); line-height: 1; letter-spacing: -.065em; }
.big-weight span { font-size: 20px; color: rgba(255,255,255,.55); }
.change-line { margin-top: 14px; display: flex; align-items: center; gap: 10px; color: rgba(255,255,255,.48); font-size: 11px; }
.progress-ring { --progress: 0deg; width: 130px; height: 130px; flex: 0 0 auto; border-radius: 50%; background: conic-gradient(var(--lime) var(--progress), rgba(255,255,255,.12) 0); position: relative; display: grid; place-items: center; }
.progress-ring::before { content: ""; position: absolute; inset: 10px; border-radius: 50%; background: var(--green); }
.progress-ring > div { position: relative; display: flex; flex-direction: column; align-items: center; }
.progress-ring strong { font-size: 28px; letter-spacing: -.04em; }
.progress-ring span { color: rgba(255,255,255,.54); font-size: 9px; text-transform: uppercase; letter-spacing: .1em; }
.goal-track { height: 6px; border-radius: 6px; background: rgba(255,255,255,.12); margin-top: 35px; overflow: hidden; }
.goal-track span { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--lime); transition: width .6s ease; }
.hero-card-bottom { display: flex; justify-content: space-between; margin-top: 16px; }
.hero-card-bottom > div { display: flex; flex-direction: column; gap: 5px; }
.hero-card-bottom span { color: rgba(255,255,255,.45); font-size: 9px; text-transform: uppercase; letter-spacing: .11em; }
.hero-card-bottom strong { font-size: 14px; }
.hero-target { text-align: right; }
.hero-target strong { color: var(--lime); }
.demo-badge { position: absolute; top: 15px; right: 16px; padding: 5px 8px; border-radius: 999px; background: rgba(255,255,255,.1); color: rgba(255,255,255,.62); font-size: 8px; text-transform: uppercase; letter-spacing: .1em; }
.countdown-card { border-radius: var(--radius-lg); background: var(--card); padding: 27px; display: flex; flex-direction: column; }
.card-heading-row { display: flex; align-items: center; justify-content: space-between; }
.target-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--lime-soft); color: var(--green); font-size: 22px; }
.countdown-number { margin-top: auto; font-size: 64px; line-height: 1; letter-spacing: -.06em; }
.countdown-label { margin: 6px 0 20px; color: var(--muted); font-size: 12px; }
.countdown-divider { height: 1px; background: var(--line); }
.countdown-row { margin-top: 14px; display: flex; align-items: center; justify-content: space-between; font-size: 11px; color: var(--muted); }
.countdown-row strong { color: var(--ink); }
.chart-card { margin-top: 18px; border-radius: var(--radius-lg); background: var(--card); padding: 30px 34px 21px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.section-heading h2 { margin: 6px 0 0; font-family: Georgia, serif; font-size: 25px; font-weight: 500; }
.chart-summary { text-align: right; display: flex; flex-direction: column; gap: 4px; }
.chart-summary span { color: var(--muted); font-size: 10px; }
.chart-summary strong { font-size: 15px; }
.chart-wrap { margin-top: 22px; position: relative; overflow: hidden; }
.chart-wrap svg { width: 100%; display: block; overflow: visible; }
.chart-grid { stroke: #e2e3dc; stroke-width: 1; stroke-dasharray: 3 5; }
.chart-axis-label { fill: #8a918b; font-size: 9px; font-family: inherit; }
.chart-goal { stroke: #70a6d5; stroke-width: 1.4; stroke-dasharray: 6 5; }
.chart-goal-label { fill: #4d7ca8; font-size: 9px; font-weight: 750; }
.chart-line { fill: none; stroke: var(--green); stroke-width: 3.5; stroke-linejoin: round; stroke-linecap: round; }
.chart-area { fill: url(#chartArea); }
.chart-dot { fill: var(--card); stroke: var(--green); stroke-width: 2.8; cursor: pointer; }
.chart-dot.latest { fill: var(--lime); stroke-width: 4; }
.chart-dot-hit { fill: transparent; cursor: pointer; }
.chart-tooltip { position: absolute; pointer-events: none; z-index: 3; min-width: 120px; padding: 10px 12px; border-radius: 12px; background: var(--ink); color: #fff; box-shadow: var(--shadow); font-size: 10px; transform: translate(-50%, calc(-100% - 13px)); }
.chart-tooltip strong { display: block; color: var(--lime); font-size: 14px; margin-bottom: 3px; }
.chart-footer { min-height: 35px; border-top: 1px solid #ecece7; padding-top: 16px; display: flex; align-items: center; gap: 20px; color: var(--muted); font-size: 9px; }
.chart-footer > span { display: inline-flex; align-items: center; gap: 7px; }
.legend-line { width: 18px; height: 3px; border-radius: 4px; background: var(--green); }
.legend-goal { width: 18px; border-top: 1px dashed #6795bf; }
.last-updated { margin-left: auto; }
.metric-grid { margin-top: 18px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.metric-card { min-height: 178px; padding: 22px; border-radius: var(--radius-md); background: var(--card); display: flex; flex-direction: column; }
.metric-icon { display: grid; place-items: center; align-self: flex-end; width: 32px; height: 32px; border-radius: 50%; margin-bottom: -17px; background: #e7f1fa; color: var(--green); }
.metric-card strong { margin-top: auto; font-size: 28px; letter-spacing: -.04em; }
.metric-card strong.metric-date { font-size: 19px; letter-spacing: -.02em; }
.metric-card small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.history-card { margin-top: 18px; border-radius: var(--radius-lg); background: var(--card); padding: 28px 32px; }
.history-heading { align-items: center; }
.entry-count { padding: 7px 10px; border-radius: 999px; background: #eff0ea; color: var(--muted); font-size: 10px; }
.history-list { margin-top: 18px; }
.history-row { min-height: 62px; border-top: 1px solid #ecece6; display: grid; grid-template-columns: 1.2fr .8fr 1.5fr auto; align-items: center; gap: 14px; font-size: 12px; }
.history-row:first-child { border-top: 0; }
.history-date { display: flex; flex-direction: column; gap: 3px; }
.history-date strong { font-size: 12px; }
.history-date span, .history-note { color: var(--muted); font-size: 10px; }
.history-weight { font-size: 17px; font-weight: 800; }
.delete-entry { width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent; color: #a0a69f; cursor: pointer; opacity: 0; transition: opacity .2s, color .2s, background .2s; }
.history-row:hover .delete-entry { opacity: 1; }
.delete-entry:hover { color: var(--red); background: #f8e9e7; }
.mobile-nav { display: none; }

/* Dialogs and controls */
.modal { width: min(560px, calc(100% - 28px)); max-height: calc(100vh - 28px); padding: 0; border: 0; border-radius: 26px; background: var(--card); color: var(--ink); box-shadow: 0 40px 120px rgba(10,30,21,.3); }
.modal::backdrop { background: rgba(10,25,19,.58); backdrop-filter: blur(4px); }
.modal form { padding: 29px; }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 25px; }
.modal-header h2, .share-copy h2 { margin: 5px 0 0; font-family: Georgia, serif; font-size: 28px; font-weight: 500; }
.close-button { width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 50%; background: transparent; font-size: 22px; cursor: pointer; }
.field { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.field > span { color: #59655d; font-size: 11px; font-weight: 700; }
.field > span small { color: #969d97; font-weight: 500; }
.field input { width: 100%; min-height: 50px; border: 1px solid #cfd2ca; border-radius: 12px; background: #fbfaf5; padding: 0 14px; outline: 0; transition: border .2s, box-shadow .2s; }
.field input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(21,58,102,.1); }
.weight-field > div, .suffix-input { position: relative; }
.weight-field input { min-height: 86px; padding-right: 70px; font-size: 38px; font-weight: 800; letter-spacing: -.04em; }
.weight-field b, .suffix-input b { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 14px; }
.suffix-input input { padding-right: 53px; }
.form-error { margin: 12px 0 0; color: var(--red); font-size: 11px; }
.modal-actions { margin-top: 26px; display: flex; justify-content: flex-end; gap: 9px; }
.settings-modal { width: min(660px, calc(100% - 28px)); }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 15px; }
.data-note { margin-top: 20px; padding: 14px 16px; border-radius: 13px; background: #edf5fc; display: flex; align-items: flex-start; gap: 10px; }
.data-note > span { color: var(--green); }
.data-note p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.data-note strong { color: var(--ink); }
.settings-actions { align-items: center; }
.danger-link { padding: 0; border: 0; background: transparent; color: var(--red); font-size: 11px; font-weight: 700; cursor: pointer; }
.action-spacer { flex: 1; }
.share-modal form { text-align: center; }
.share-illustration { width: 74px; height: 74px; margin: 2px auto 18px; border-radius: 50%; background: var(--lime); color: var(--green); display: grid; place-items: center; font-size: 31px; }
.share-copy p { max-width: 410px; margin: 10px auto 22px; color: var(--muted); line-height: 1.55; font-size: 12px; }
.share-modal .field { text-align: left; }
.copy-field { position: relative; }
.copy-field input { padding-right: 94px; color: #69736c; font-size: 10px; }
.copy-field button { position: absolute; right: 6px; top: 6px; bottom: 6px; border: 0; border-radius: 9px; background: var(--green); color: #fff; padding: 0 13px; font-size: 10px; font-weight: 700; cursor: pointer; }
.share-hint { margin: 10px 0 0; text-align: left; color: #8b938d; font-size: 9px; }
.toast { position: fixed; left: 50%; bottom: 25px; z-index: 100; max-width: calc(100% - 28px); padding: 12px 18px; border-radius: 999px; background: var(--ink); color: #fff; box-shadow: var(--shadow); font-size: 11px; font-weight: 700; opacity: 0; transform: translate(-50%, 15px); pointer-events: none; transition: opacity .25s, transform .25s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Public share view */
.share-body { min-height: 100vh; }
.share-header { height: 88px; max-width: 1180px; padding: 0 28px; margin: 0 auto; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.readonly-badge { display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border: 1px solid #ccd0c8; border-radius: 999px; color: var(--muted); font-size: 10px; font-weight: 700; }
.readonly-badge i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.share-main { width: min(1080px, calc(100% - 40px)); margin: 0 auto; padding: 62px 0 45px; }
.share-title { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; }
.share-title h1 { margin: 8px 0 0; font-family: Georgia, serif; font-weight: 500; font-size: clamp(38px, 5vw, 62px); letter-spacing: -.045em; }
.shared-date { text-align: right; display: flex; flex-direction: column; gap: 4px; }
.shared-date span { color: var(--muted); text-transform: uppercase; letter-spacing: .1em; font-size: 9px; }
.shared-date strong { font-size: 12px; }
.share-overview { margin-top: 42px; display: grid; grid-template-columns: 1.05fr 1.1fr .85fr; gap: 14px; }
.shared-weight-card, .shared-progress-card, .shared-target-card { min-height: 205px; border-radius: 24px; padding: 27px; }
.shared-weight-card { background: var(--green); color: #fff; }
.shared-weight-card .label { color: rgba(255,255,255,.55); }
.shared-weight { margin: 16px 0 20px; display: flex; align-items: baseline; gap: 7px; }
.shared-weight strong { font-size: 57px; letter-spacing: -.06em; line-height: .9; }
.shared-weight span { color: rgba(255,255,255,.55); }
.shared-progress-card, .shared-target-card { border: 1px solid var(--line); background: var(--card); }
.shared-progress-card { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.shared-progress-copy { align-self: stretch; display: flex; flex-direction: column; }
.shared-progress-copy > strong { margin-top: auto; font-size: 31px; }
.shared-progress-copy p { margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.shared-ring { --progress: 0deg; width: 95px; height: 95px; flex: 0 0 auto; border-radius: 50%; background: conic-gradient(var(--green) var(--progress), #e3ebf3 0); display: grid; place-items: center; position: relative; }
.shared-ring::before { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: var(--card); }
.shared-ring span { position: relative; font-size: 15px; font-weight: 800; }
.shared-target-card { display: flex; flex-direction: column; }
.shared-target-card > strong { margin-top: auto; font-family: Georgia, serif; font-size: 25px; font-weight: 500; }
.shared-target-card p { margin: 8px 0 0; color: var(--muted); font-size: 10px; }
.shared-target-card p b { color: var(--green); font-size: 16px; }
.shared-chart-card { margin-top: 14px; padding: 31px 34px 22px; border: 1px solid var(--line); border-radius: 24px; background: var(--card); }
.share-chart-meta { display: flex; flex-direction: column; text-align: right; }
.share-chart-meta strong { font-size: 17px; }
.share-chart-meta span { color: var(--muted); font-size: 9px; }
.shared-stats { margin-top: 14px; display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: 20px; background: var(--card); }
.shared-stats div { min-height: 100px; padding: 23px 28px; border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 9px; }
.shared-stats div:first-child { border-left: 0; }
.shared-stats span { color: var(--muted); font-size: 10px; }
.shared-stats strong { font-size: 22px; }
.share-page-footer { margin-top: 50px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 10px; }
.share-page-footer a { color: var(--ink); font-weight: 700; }
.invalid-share { margin-top: 60px; min-height: 300px; border: 1px solid var(--line); border-radius: 24px; background: var(--card); display: grid; place-items: center; align-content: center; text-align: center; }
.invalid-share > span { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; background: #f6dedb; color: var(--red); font-weight: 900; }
.invalid-share h2 { margin: 15px 0 5px; font-family: Georgia, serif; font-weight: 500; }
.invalid-share p { margin: 0; color: var(--muted); font-size: 12px; }
.compact-empty { min-height: 210px; margin-top: 0; }
.floating-streak strong { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }

@media (max-width: 1050px) {
  .landing-main { grid-template-columns: 1fr 1fr; gap: 4vw; }
  .landing-preview { min-height: 590px; }
  .phone-shell { min-height: 570px; width: 72%; }
  .floating-goal { left: -7%; }
  .sidebar { width: 205px; }
  .app-shell { margin-left: 205px; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .overview-grid { grid-template-columns: 1fr; }
  .countdown-card { min-height: 230px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 20px; }
  .countdown-card .card-heading-row, .countdown-card .countdown-divider { grid-column: 1 / -1; }
  .countdown-number { margin-top: 20px; }
  .countdown-label { align-self: center; }
  .countdown-row { align-self: center; }
  .share-overview { grid-template-columns: 1fr 1fr; }
  .shared-target-card { grid-column: 1 / -1; min-height: 150px; }
}

@media (max-width: 780px) {
  .landing-nav { height: 76px; }
  .landing-nav .text-link { display: none; }
  .landing-main { padding-top: 7vh; grid-template-columns: 1fr; }
  .landing-copy { text-align: center; }
  .landing-copy h1 { font-size: clamp(53px, 16vw, 82px); }
  .landing-lead { margin-left: auto; margin-right: auto; font-size: 16px; }
  .landing-actions { justify-content: center; }
  .privacy-note { justify-content: center; text-align: left; }
  .landing-preview { min-height: 640px; }
  .phone-shell { width: min(360px, 80%); }
  .floating-goal { left: 1%; }
  .floating-streak { right: 0; }
  .landing-footer { margin-top: 35px; }
  .landing-footer span:last-child { display: none; }

  .sidebar { display: none; }
  .app-shell { margin-left: 0; }
  .app-header { min-height: 78px; padding: 13px 18px; }
  .app-header > div:nth-child(2) { display: none; }
  .mobile-brand { display: inline-flex; }
  .header-actions .button { display: none; }
  .header-actions .install-button, .avatar-button { display: inline-block; }
  .dashboard { width: calc(100% - 28px); padding: 20px 0 110px; }
  .hero-card { padding: 28px 24px 24px; min-height: 315px; }
  .big-weight strong { font-size: 64px; }
  .progress-ring { width: 105px; height: 105px; }
  .progress-ring strong { font-size: 23px; }
  .chart-card { padding: 24px 18px 18px; }
  .chart-wrap { overflow-x: auto; overflow-y: hidden; }
  .chart-wrap svg { min-width: 670px; }
  .metric-card { min-height: 155px; }
  .history-card { padding: 24px 18px; }
  .history-row { grid-template-columns: 1.2fr .7fr 1fr auto; }
  .delete-entry { opacity: 1; }
  .mobile-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; height: calc(76px + env(safe-area-inset-bottom)); padding: 8px 9px env(safe-area-inset-bottom); border-top: 1px solid #d8dad2; background: rgba(255,254,249,.94); backdrop-filter: blur(18px); display: grid; grid-template-columns: 1fr 1fr 64px 1fr 1fr; align-items: center; }
  .mobile-nav a, .mobile-nav button { border: 0; background: transparent; display: flex; flex-direction: column; align-items: center; gap: 3px; color: #808880; font-size: 8px; cursor: pointer; }
  .mobile-nav a > span, .mobile-nav button > span { font-size: 19px; }
  .mobile-nav a.active { color: var(--green); font-weight: 750; }
  .mobile-nav > button:nth-child(3) { width: 56px; height: 56px; margin-top: -27px; justify-self: center; border-radius: 50%; background: var(--lime); color: var(--green); box-shadow: 0 8px 22px rgba(21,58,102,.2); }
  .mobile-nav > button:nth-child(3) span { font-size: 28px; }

  .share-main { width: calc(100% - 28px); padding-top: 39px; }
  .share-title { align-items: flex-start; }
  .share-title h1 { font-size: 42px; }
  .share-overview { grid-template-columns: 1fr; }
  .shared-target-card { grid-column: auto; }
  .shared-weight-card, .shared-progress-card, .shared-target-card { min-height: 175px; }
  .shared-chart-card { padding: 25px 18px 18px; }
  .shared-chart-wrap svg { min-width: 0; }
  .shared-stats { grid-template-columns: 1fr; }
  .shared-stats div { border-left: 0; border-top: 1px solid var(--line); }
  .shared-stats div:first-child { border-top: 0; }
}

@media (max-width: 520px) {
  .landing-main { padding-left: 18px; padding-right: 18px; }
  .landing-copy h1 { font-size: 53px; }
  .landing-actions { flex-direction: column; }
  .landing-actions .button { width: 100%; }
  .landing-preview { min-height: 565px; }
  .phone-shell { min-height: 535px; width: 82%; border-width: 7px; border-radius: 40px; padding: 11px 13px 17px; }
  .phone-content h2 { font-size: 23px; }
  .phone-weight-card { padding: 18px; }
  .phone-weight-card strong { font-size: 40px; }
  .floating-goal { top: 26%; left: -3%; padding: 15px 17px; }
  .floating-goal strong { font-size: 20px; }
  .floating-streak { min-width: 145px; padding: 12px; }
  .floating-streak strong { width: 43px; height: 43px; }
  .landing-footer { padding: 0 20px; }

  .hero-card-top { gap: 10px; }
  .big-weight strong { font-size: 56px; }
  .big-weight span { font-size: 16px; }
  .progress-ring { width: 90px; height: 90px; }
  .progress-ring::before { inset: 8px; }
  .progress-ring strong { font-size: 20px; }
  .change-line { align-items: flex-start; flex-direction: column; gap: 5px; }
  .countdown-card { display: flex; min-height: 300px; }
  .countdown-number { margin-top: auto; }
  .metric-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .metric-card { min-height: 146px; padding: 17px; }
  .metric-card strong { font-size: 24px; }
  .metric-card strong.metric-date { font-size: 16px; }
  .chart-summary { display: none; }
  .history-row { grid-template-columns: 1.4fr .8fr auto; }
  .history-note { display: none; }
  .settings-grid { grid-template-columns: 1fr; }
  .modal form { padding: 23px 19px; }
  .modal-actions { flex-wrap: wrap; }
  .modal-actions .button { flex: 1; }
  .settings-actions .danger-link { width: 100%; text-align: left; margin-bottom: 6px; }
  .settings-actions .action-spacer { display: none; }
  .share-header { height: 75px; padding: 0 16px; }
  .share-title { flex-direction: column; }
  .shared-date { text-align: left; }
  .section-heading h2 { font-size: 22px; }
  .share-chart-meta { display: none; }
  .share-page-footer { align-items: flex-start; flex-direction: column; gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
