:root {
  --bg: #F7F5EF;
  --card: #ffffff;
  --ink: #0B1D48;
  --ink-soft: #62708F;
  --line: #0B1D48;            /* focus rings, "today" outlines */
  --line-soft: #E8E4DB;
  --track: #F1F2F4;
  --brand: #2FA66B;           /* aggregate charts, "done" */
  --brand-soft: #E7F6ED;
  --brand-light: #BDE4CC;
  --brand-ink: #187845;
  --red: #F05A61;
  --red-soft: #FDEBEC;
  --bonus: #F3B84B;
  --btn: #0B1D48;
  --nav-on: #eaf0f6;
  --acc: var(--brand);
  --warn: var(--red);
  /* goal identity: validated categorical order (green, amber, blue, orange, violet) */
  --g1: #1baf7a; --g2: #eda100; --g3: #2a78d6; --g4: #eb6834; --g5: #4a3aa7;
  /* one-hue sequential ramp for the calendar */
  --h0: #eeeae0; --h1: #cfe8d9; --h2: #8fcba9; --h3: #4eae7b; --h4: #25794f;
  --shadow: 0 1px 2px rgba(11, 29, 72, .04), 0 8px 24px rgba(11, 29, 72, .055);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12151f; --card: #1b2030; --ink: #eef0f8; --ink-soft: #9aa3bd; --line: #9db0ff;
    --line-soft: #2b3248; --track: #2a3045; --brand: #3fb27a; --brand-soft: #1f3b2e; --brand-light: #2c5a43; --brand-ink: #8fd6b0;
    --red: #ef6c64; --red-soft: #402326; --bonus: #d9a22a; --btn: #9db0ff; --nav-on: #232a3f;
    --g1: #199e70; --g2: #c98500; --g3: #3987e5; --g4: #d95926; --g5: #9085e9;
    --h0: #2a3045; --h1: #1e4d35; --h2: #2c7a53; --h3: #3f9f6d; --h4: #8fd0ac;
    --shadow: none;
  }
}
.g1 { --gc: var(--g1); --on: #06251a; }
.g2 { --gc: var(--g2); --on: #2b2000; }
.g3 { --gc: var(--g3); --on: #fff; }
.g4 { --gc: var(--g4); --on: #fff; }
.g5 { --gc: var(--g5); --on: #fff; }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--bg); }
body {
  margin: 0; color: var(--ink); background: var(--bg);
  font: 16px/1.4 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
  min-height: 100vh; padding-bottom: calc(84px + env(safe-area-inset-bottom)); overscroll-behavior-y: none;
}
body.nobar { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
#app { max-width: 1240px; margin: 0 auto; padding: calc(14px + env(safe-area-inset-top)) 16px 24px; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0; }
.hand { font-family: inherit; font-weight: 700; }
.muted { color: var(--ink-soft); }
[hidden] { display: none !important; }
.only-d { display: none; }

/* ---------- navigation: bottom bar (phone) -> icon rail (tablet) -> sidebar (desktop) ---------- */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; justify-content: center; gap: 4px; background: var(--card); border-top: 1px solid var(--line-soft); padding: 6px 12px calc(8px + env(safe-area-inset-bottom)); }
.tabbar button { flex: 1; max-width: 200px; border: 0; background: transparent; display: grid; justify-items: center; gap: 2px; font-size: 12px; color: var(--ink-soft); padding: 7px 0; border-radius: 12px; }
.tabbar button svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.tabbar em { font-style: normal; }
.tabbar button.on { color: var(--ink); font-weight: 600; background: var(--nav-on); }
.tabbar .nav-logo, .tabbar .nav-settings { display: none; }

@media (min-width: 760px) {
  body { padding-bottom: 24px; padding-left: 76px; }
  body.nobar { padding-left: 0; }
  .tabbar { top: 0; right: auto; width: 76px; flex-direction: column; justify-content: flex-start; align-items: center; border-top: 0; border-right: 1px solid var(--line-soft); padding: 18px 10px; gap: 8px; }
  .tabbar button { flex: none; width: 52px; height: 48px; max-width: none; display: grid; place-items: center; padding: 0; }
  .tabbar em { display: none; }
  .tabbar .nav-logo { display: block; font-size: 24px; font-weight: 800; margin: 2px 0 18px; letter-spacing: -.02em; }
  .nav-logo span { display: none; }
  .tabbar .nav-settings { display: grid; margin-top: auto; }
  #app { padding: 28px 28px 32px; }
}
@media (min-width: 1100px) {
  body { padding-left: 224px; }
  body.nobar { padding-left: 0; }
  .tabbar { width: 224px; align-items: stretch; padding: 22px 16px; }
  .tabbar button { width: auto; height: 46px; display: flex; align-items: center; gap: 14px; padding: 0 14px; font-size: 15px; font-weight: 500; color: var(--ink); }
  .tabbar button svg { color: var(--ink-soft); }
  .tabbar button.on svg { color: var(--ink); }
  .tabbar em { display: inline; }
  .tabbar .nav-logo { font-size: 26px; margin: 0 0 22px 10px; }
  .nav-logo span { display: inline; }
  .tabbar .nav-settings { display: flex; }
}

/* ---------- common ---------- */
.top { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; margin-bottom: 14px; flex-wrap: wrap; }
.top h1 { font-size: 26px; }
.range { font-size: 14px; color: var(--ink-soft); margin-top: 2px; }
.nav { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line-soft); background: var(--card); display: grid; place-items: center; padding: 0; }
.icon-btn svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn.on { background: var(--btn); color: var(--card); border-color: var(--btn); }
.icon-btn:disabled, .pill-btn:disabled { opacity: .4; }
.pill-btn { border: 1px solid var(--line-soft); background: var(--card); border-radius: 12px; padding: 0 16px; height: 40px; font-size: 14px; }
.avatar { width: 46px; height: 46px; border-radius: 50%; border: 0; background: #ece6d6; color: #5c5240; font-weight: 700; font-size: 16px; display: grid; place-items: center; padding: 0; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .avatar { background: #2c3350; color: #cdd5f5; } }

.card { background: var(--card); border: 1px solid var(--line-soft); border-radius: 16px; padding: 16px; margin-bottom: 14px; box-shadow: var(--shadow); }
.card h3 { font-size: 16px; margin-bottom: 12px; }
.card.strong { border-color: var(--line-soft); }
.field, .card textarea, .sheet textarea, .wiz textarea, .wiz input, .sheet input, .sheet select, .wiz select {
  width: 100%; border: 1px solid var(--line-soft); background: var(--bg); color: var(--ink);
  border-radius: 12px; padding: 11px 12px; font: inherit; min-height: 46px;
}
textarea, input, select, button { font-family: inherit; }
textarea { resize: none; display: block; font: inherit; }
::placeholder { color: var(--ink-soft); opacity: .8; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--line); outline-offset: 1px; }
.primary { background: var(--btn); color: var(--card); border: 0; border-radius: 12px; padding: 12px; font-weight: 600; min-height: 48px; width: 100%; }
.primary:disabled { opacity: .6; }
.ghost { background: transparent; border: 1px solid var(--line-soft); border-radius: 12px; padding: 12px; min-height: 48px; width: 100%; }
.ghost:disabled { opacity: .4; }
.danger { color: var(--red); }
.lbl-s { display: grid; gap: 4px; font-size: 12px; color: var(--ink-soft); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.stack { display: grid; gap: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chipbtn { border: 1px solid var(--line-soft); background: var(--card); border-radius: 99px; padding: 8px 14px; font-size: 14px; min-height: 40px; }
.chipbtn.on { background: var(--btn); color: var(--card); border-color: var(--btn); }
.linkbtn { background: none; border: 0; color: var(--ink); text-decoration: underline; padding: 6px; font-size: 14px; }
.empty-note { text-align: center; color: var(--ink-soft); padding: 22px 12px; }
.section-title { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft); margin: 18px 2px 8px; }
.tipdot { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--ink-soft); color: var(--ink-soft); font-size: 11px; font-weight: 700; margin-left: 8px; vertical-align: 2px; cursor: help; }

/* ---------- landing ---------- */
.hero { padding: 28px 0 12px; max-width: 640px; margin: 0 auto; }
.hero h1 { font-size: 42px; line-height: 1.05; margin-bottom: 12px; font-weight: 800; }
.hero h1 span { color: var(--brand); }
.hero p.lead { font-size: 18px; color: var(--ink-soft); margin-bottom: 20px; }
.steps { display: grid; gap: 10px; margin: 0 0 22px; padding: 0; list-style: none; counter-reset: s; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 36px 1fr; gap: 12px; align-items: start; background: var(--card); border: 1px solid var(--line-soft); border-radius: 16px; padding: 14px; box-shadow: var(--shadow); }
.steps li::before { content: counter(s); width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-ink); font-weight: 700; }
.steps b { display: block; }
.steps span { font-size: 14px; color: var(--ink-soft); }
.fine { font-size: 13px; color: var(--ink-soft); text-align: center; margin-top: 12px; }

/* ---------- wizard ---------- */
.wiz { max-width: 640px; margin: 0 auto; }
.wiz-top { display: flex; align-items: center; gap: 12px; margin: 0 auto 16px; max-width: 640px; }
.dots { display: flex; gap: 6px; flex: 1; }
.dots i { height: 6px; flex: 1; border-radius: 99px; background: var(--track); }
.dots i.on { background: var(--brand); }
.wiz h2 { font-size: 28px; line-height: 1.15; margin-bottom: 6px; }
.wiz .hint { color: var(--ink-soft); font-size: 15px; margin-bottom: 14px; }
.wiz-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--card); border-top: 1px solid var(--line-soft); padding: 10px 16px calc(12px + env(safe-area-inset-bottom)); }
.wiz-nav > div { max-width: 640px; margin: 0 auto; display: grid; grid-template-columns: 1fr 2fr; gap: 10px; }
.wgoal { border-left: 6px solid var(--gc); }
.wgoal-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font-weight: 600; }
.wres { background: var(--bg); border: 1px solid var(--line-soft); border-radius: 12px; padding: 10px; display: grid; gap: 8px; margin-bottom: 8px; }
.add-line { display: block; width: 100%; margin-top: 4px; padding: 11px; border: 1.5px dashed var(--line-soft); border-radius: 12px; background: transparent; color: var(--ink-soft); }
.sample { margin-bottom: 14px; }

/* ---------- home (dashboard) ---------- */
.brandrow { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.brandrow b { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.pagehead { display: none; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 18px; }
.pagehead h1 { font-size: 34px; font-weight: 800; }
.greet { font-size: 36px; font-weight: 800; line-height: 1.1; margin: 4px 0 6px; }
.focus-card { display: grid; grid-template-columns: 52px 1fr; gap: 12px; align-items: center; padding: 12px 14px; }
.circle { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.circle svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.c-green { background: var(--brand-soft); color: var(--brand); }
.c-blue { background: #e3edfb; color: #2a78d6; }
.c-orange { background: #fdeed9; color: #e07b1f; }
.c-violet { background: #ebe8f7; color: #5a4cc0; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { } :root:not([data-theme="light"]) .c-blue { background: #1f3555; color: #7db1f5; } :root:not([data-theme="light"]) .c-orange { background: #4a3419; color: #f1a65d; } :root:not([data-theme="light"]) .c-violet { background: #2e2a4f; color: #b4abf2; } }
.focus-card .fl { font-weight: 700; font-size: 15px; }
.focus-card textarea { border: 0; background: transparent; padding: 2px 0; min-height: 24px; font-size: 15px; color: var(--ink-soft); }
.focus-card textarea:focus { outline: 0; color: var(--ink); }

.home-grid { display: grid; gap: 0; }
.col-main, .col-side { display: contents; }
.col-main > *:nth-child(1) { order: 1; } /* combo (phone) / tiles (desktop) */
.ring-combo { order: 1; }
.today-card { order: 2; }
.goals-card { order: 3; }
.dyn-card { order: 4; }
.rhythm-card { order: 5; }

.ring-combo { display: grid; grid-template-columns: 1fr 1fr; gap: 0; padding: 0; overflow: hidden; }
.ring-combo .rc-ring { display: grid; justify-items: center; gap: 4px; padding: 14px; text-align: center; font-size: 15px; font-weight: 500; }
.ring-combo .rc-side { border-left: 1px solid var(--line-soft); display: grid; }
.rc-row { display: grid; grid-template-columns: 56px 1fr; gap: 10px; align-items: center; padding: 12px 14px; }
.rc-row + .rc-row { border-top: 1px solid var(--line-soft); }
.rc-row .circle { width: 48px; height: 48px; }
.rc-row b { font-size: 22px; display: block; line-height: 1.1; }
.rc-row span { font-size: 13px; color: var(--ink-soft); }
.tiles-d { display: none; }
.tile { display: grid; grid-template-columns: 52px 1fr; gap: 12px; align-items: center; padding: 14px; margin: 0; }
.tile b { font-size: 28px; line-height: 1.05; display: block; font-weight: 800; }
.tile span { font-size: 13px; color: var(--ink-soft); }
.tile b small { font-size: 18px; font-weight: 700; }
.week-card { display: none; }

.today-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.today-head h3 { margin: 0; font-size: 18px; }
.today-head small { color: var(--ink-soft); font-size: 13px; }
.trow { display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; width: 100%; background: none; border: 0; border-top: 1px solid var(--line-soft); padding: 11px 0; text-align: left; }
.trow:first-of-type { border-top: 0; }
.tcheck { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--track); color: var(--ink-soft); }
.tcheck svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.trow.done .tcheck { background: var(--brand); color: #fff; }
.trow.miss .tcheck { background: var(--red); color: #fff; }
.trow.bonus .tcheck { background: var(--bonus); color: #2b2000; }
.ttitle { font-size: 15px; font-weight: 500; overflow-wrap: break-word; }
.pill { font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: 8px; background: var(--track); color: var(--ink-soft); white-space: nowrap; }
.trow.done .pill { background: var(--brand-soft); color: var(--brand-ink); }
.trow.miss .pill { background: var(--red-soft); color: var(--red); }
.trow.bonus .pill { background: #fbf0d3; color: #8a6200; }
.tprog { margin-top: 10px; font-size: 14px; }
.tprog .bar { margin-top: 8px; height: 8px; }
.tprog .bar i { background: var(--brand); }
.link-more { background: none; border: 0; color: #2a62c9; font-size: 14px; padding: 0; text-decoration: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .link-more { color: #8db4f5; } }

.card-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 12px; }
.card-head h3 { margin: 0; }
.goals-card { container-type: inline-size; }
.grow { display: grid; grid-template-columns: 48px minmax(0, 1fr) 90px 44px auto 14px; gap: 10px; align-items: center; width: 100%; background: var(--bg); border: 1px solid var(--line-soft); border-radius: 12px; padding: 10px 12px; text-align: left; margin-bottom: 8px; }
.gicon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--gc) 16%, var(--card)); color: var(--gc); }
.gicon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.g-name { font-weight: 700; font-size: 15px; overflow-wrap: anywhere; }
.g-sub { font-size: 13px; color: var(--ink-soft); }
.g-bar { height: 10px; }
.g-pct { font-weight: 700; font-size: 16px; text-align: right; }
.g-trend { font-size: 13px; color: var(--brand-ink); white-space: nowrap; }
.g-trend.neg { color: var(--ink-soft); }
.g-chev { width: 14px; height: 14px; stroke: var(--ink-soft); fill: none; stroke-width: 2; }
.grow .g-mid { display: contents; }
@container (max-width: 560px) {
  .grow { grid-template-columns: 44px minmax(0, 1fr) auto 12px; grid-template-areas: "icon text pct chev" "icon bar bar bar"; row-gap: 8px; }
  .grow .gicon { grid-area: icon; align-self: start; }
  .grow .g-text { grid-area: text; }
  .grow .g-bar { grid-area: bar; }
  .grow .g-pct { grid-area: pct; }
  .grow .g-chev { grid-area: chev; }
  .g-trend { display: none; }
}

.rhythm { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; text-align: center; }
.rhythm .rd b { display: block; font-size: 12px; font-weight: 600; }
.rhythm .rd small { display: block; font-size: 11px; color: var(--ink-soft); margin: 1px 0 6px; white-space: nowrap; }
.rcell { height: 46px; border-radius: 10px; display: grid; place-items: center; background: var(--track); color: var(--ink-soft); }
.rcell svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.rcell.full { background: var(--brand); color: #fff; }
.rcell.part { background: var(--brand-light); color: var(--brand-ink); }
.rcell.miss { background: var(--red-soft); color: var(--red); }
.rcell.bonus { background: #fbf0d3; color: #8a6200; }
.rcell.today { outline: 2px solid var(--line); outline-offset: 1px; }
.dots-legend { display: flex; gap: 6px 12px; flex-wrap: wrap; font-size: 11px; color: var(--ink-soft); margin-top: 12px; }
.dots-legend span { display: inline-flex; align-items: center; gap: 5px; }
.dots-legend i { width: 11px; height: 11px; border-radius: 50%; display: inline-block; background: var(--track); }
.dots-legend i.full { background: var(--brand); } .dots-legend i.part { background: var(--brand-light); } .dots-legend i.miss { background: var(--red); }

@media (min-width: 1000px) {
  .brandrow { display: none; }
  .pagehead { display: flex; }
  .only-m { display: none !important; }
  .only-d { display: block; }
  .tiles-d { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
  .week-card { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 20px; }
  .home-grid { grid-template-columns: minmax(0, 1fr) 320px; gap: 0 16px; align-items: start; }
  .col-main, .col-side { display: block; }
  .col-main > *, .col-side > * { order: 0; }
  .greet { font-size: 44px; margin-top: 0; }
}
@media (min-width: 1000px) and (max-width: 1199px) {
  .tiles-d { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tiles-d .tile:nth-child(4) { display: none; }
  .tile { grid-template-columns: 44px 1fr; padding: 12px; }
  .tile .circle { width: 44px; height: 44px; }
  .tile b { font-size: 24px; }
  .week-card { grid-template-columns: 170px minmax(0, 1fr); }
}
.wk-ring { display: grid; justify-items: center; gap: 6px; align-content: center; font-size: 15px; font-weight: 500; }
.wk-chart h4 { margin: 0 0 6px; font-size: 14px; font-weight: 700; }

/* ---------- week screen ---------- */
.ringcard { display: grid; grid-template-columns: 104px 1fr; gap: 14px; align-items: center; }
.ringcard .t1 { font-size: 13px; color: var(--ink-soft); }
.ringcard .t2 { font-size: 15px; margin-top: 4px; }
.ringcard .t2 b { font-weight: 700; }
.ringcard .ok { color: var(--brand-ink); }
.focus label.hand { display: block; font-size: 16px; margin-bottom: 6px; }
.focus textarea { width: 100%; border: 1px solid var(--line-soft); background: var(--card); color: var(--ink); border-radius: 12px; padding: 11px 12px; min-height: 46px; font: inherit; }
.days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 14px; }
.day { text-align: center; background: var(--card); border: 1px solid var(--line-soft); border-radius: 12px; padding: 6px 0 7px; }
.day b { display: block; font-size: 11px; font-weight: 600; color: var(--ink-soft); text-transform: uppercase; }
.day span { display: block; font-size: 16px; font-weight: 700; }
.day i { display: block; font-style: normal; font-size: 11px; color: var(--ink-soft); margin-top: 1px; }
.day.today { border: 2px solid var(--line); padding: 5px 0 6px; }
.day.free { background: transparent; border-style: dashed; }
.day.free i { color: var(--ink); font-weight: 600; }
.week-wrap { display: grid; gap: 0; }
@media (min-width: 900px) { .week-blocks { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 16px; align-items: start; } .week-blocks .block { margin: 0; } }

.block { background: var(--card); border: 1px solid var(--line-soft); border-top: 6px solid var(--gc); border-radius: 16px; padding: 12px 14px 6px; margin-bottom: 16px; box-shadow: var(--shadow); }
.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.block-head h2 { font-size: 20px; line-height: 1.2; overflow-wrap: anywhere; }
.block-pct { font-weight: 700; font-size: 18px; white-space: nowrap; }
.block-pct small { display: block; font-weight: 400; font-size: 12px; color: var(--ink-soft); text-align: right; }
.bonus-n { color: var(--ink); font-weight: 600; }
.habit { padding: 10px 0 12px; border-top: 1px solid var(--line-soft); }
.habit:first-of-type { border-top: 0; }
.habit-title { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.habit-title span { flex: 1; font-size: 15px; font-weight: 500; overflow-wrap: anywhere; }
.cells { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cell { height: 42px; border-radius: 10px; border: 1.5px solid var(--line-soft); background: var(--track); padding: 0; position: relative; transition: transform .08s; }
.cell:active { transform: scale(.92); }
.cell:disabled { opacity: .35; }
.cell.done { background: var(--gc); border-color: var(--gc); }
.cell.off { background: transparent; border: 1.5px dashed var(--ink-soft); }
.cell.missed { background: repeating-linear-gradient(135deg, transparent 0 5px, color-mix(in srgb, var(--red) 24%, transparent) 5px 7px), var(--track); }
.cell.free { background: transparent; border-style: dashed; }
.cell.bonus { background: color-mix(in srgb, var(--gc) 22%, var(--card)); border: 2px solid var(--gc); }
.cell.today:not(.done):not(.bonus) { border: 2px solid var(--line); }
.cell.future { opacity: .6; }
.cell svg { width: 20px; height: 20px; fill: none; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; position: absolute; inset: 0; margin: auto; }
.cell.done svg { stroke: var(--on); }
.cell.bonus svg { stroke: var(--ink); }
.cell.off svg { stroke: var(--ink-soft); }
.add-habit { display: block; width: 100%; margin: 4px 0 8px; padding: 11px; border: 1.5px dashed var(--line-soft); border-radius: 12px; background: transparent; color: var(--ink-soft); }
.legend { display: flex; gap: 6px 14px; flex-wrap: wrap; font-size: 13px; color: var(--ink-soft); margin: 2px 2px 16px; align-items: center; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 16px; height: 16px; border-radius: 5px; display: inline-block; border: 1.5px solid var(--line-soft); }
.legend i.d { background: var(--g1); border-color: var(--g1); }
.legend i.b { background: color-mix(in srgb, var(--g1) 22%, var(--card)); border: 2px solid var(--g1); }
.legend i.m { background: repeating-linear-gradient(135deg, transparent 0 3px, color-mix(in srgb, var(--red) 30%, transparent) 3px 5px), var(--track); }
.legend i.o { background: transparent; border: 1.5px dashed var(--ink-soft); }

/* ---------- goals screen ---------- */
.goals-wrap { display: grid; gap: 14px; }
@media (min-width: 900px) { .goals-wrap { grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); align-items: start; } }
.goal { background: var(--card); border: 1px solid var(--line-soft); border-left: 8px solid var(--gc); border-radius: 16px; padding: 14px; box-shadow: var(--shadow); }
.goal-top { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.goal-title { font-size: 18px; font-weight: 700; overflow-wrap: anywhere; }
.goal-note { font-size: 13px; color: var(--ink-soft); margin-top: 2px; }
.goal-stats { display: flex; gap: 16px; font-size: 14px; margin: 8px 0 2px; color: var(--ink-soft); }
.goal-stats b { color: var(--ink); }
.results { margin-top: 10px; display: grid; gap: 8px; }
.result { display: block; width: 100%; text-align: left; background: var(--bg); border: 1px solid var(--line-soft); border-radius: 12px; padding: 10px 12px; }
.r-top { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; margin-bottom: 8px; }
.r-title { font-weight: 500; }
.bar { position: relative; height: 10px; background: var(--track); border-radius: 99px; }
.bar i { display: block; height: 100%; border-radius: 99px; background: var(--gc, var(--brand)); }
.bar u { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink); border-radius: 2px; text-decoration: none; }
.r-nums { font-size: 13px; margin-top: 7px; font-weight: 600; }
.r-nums span { font-weight: 400; color: var(--ink-soft); }
.add-result { background: transparent; border: 1px dashed var(--line-soft); border-radius: 12px; padding: 10px; color: var(--ink-soft); font-size: 14px; }
.tactics { margin: 10px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.tactics li { font-size: 13px; padding: 4px 10px; border-radius: 99px; background: color-mix(in srgb, var(--gc) 14%, var(--card)); border: 1px solid color-mix(in srgb, var(--gc) 40%, var(--line-soft)); }

/* ---------- analytics ---------- */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.tiles .tile2 { background: var(--card); border: 1px solid var(--line-soft); border-radius: 16px; padding: 12px; box-shadow: var(--shadow); }
.tile2 b { display: block; font-size: 26px; line-height: 1.1; font-weight: 800; }
.tile2 span { font-size: 12px; color: var(--ink-soft); line-height: 1.2; display: block; margin-top: 3px; }
.an-grid { display: grid; gap: 0; }
@media (min-width: 900px) { .an-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; align-items: start; } .an-grid .wide { grid-column: 1 / -1; } }
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart text { fill: var(--ink-soft); font: 10px Inter, -apple-system, system-ui, sans-serif; }
.chart text.strong { fill: var(--ink); font-weight: 700; }
.chart text.lab { fill: var(--ink); font-size: 11px; }
.chart .gl { stroke: var(--line-soft); stroke-width: 1; }
.chart .hit { fill: transparent; }
.legend2 { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--ink-soft); margin-top: 8px; align-items: center; }
.legend2 span { display: inline-flex; align-items: center; gap: 6px; }
.legend2 svg { width: 22px; height: 10px; }
.chart-title { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; margin-bottom: 6px; font-size: 15px; font-weight: 700; }
.chart-title small { font-weight: 400; color: var(--ink-soft); font-size: 12px; white-space: nowrap; }
details.tbl { margin-top: 8px; font-size: 13px; color: var(--ink-soft); }
details.tbl summary { cursor: pointer; padding: 4px 0; }
details.tbl table { width: 100%; border-collapse: collapse; margin-top: 4px; }
details.tbl td, details.tbl th { text-align: left; padding: 3px 4px; border-bottom: 1px solid var(--line-soft); font-weight: 400; }
.finish { text-align: center; }
.finish b { font-size: 42px; display: block; }
#tip { position: fixed; z-index: 60; pointer-events: none; background: var(--ink); color: var(--bg); font-size: 13px; padding: 6px 10px; border-radius: 8px; opacity: 0; transition: opacity .1s; max-width: 70vw; }
#tip.on { opacity: 1; }

/* ---------- sheet & toast ---------- */
.sheet-bg { position: fixed; inset: 0; background: rgba(10, 14, 30, .45); display: flex; align-items: flex-end; justify-content: center; z-index: 50; }
.sheet { width: 100%; max-width: 560px; max-height: 92vh; overflow: auto; background: var(--card); border-radius: 20px 20px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); display: grid; gap: 10px; }
@media (min-width: 760px) { .sheet-bg { align-items: center; } .sheet { border-radius: 20px; } }
.sheet h3 { font-size: 18px; }
.sheet p.note { font-size: 14px; color: var(--ink-soft); }
.sheet .keybox { word-break: break-all; font-family: ui-monospace, Menlo, monospace; font-size: 13px; background: var(--bg); border: 1px dashed var(--line); border-radius: 12px; padding: 10px; }
#toast { position: fixed; left: 50%; bottom: calc(92px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(20px); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-size: 14px; opacity: 0; pointer-events: none; transition: .2s; z-index: 70; max-width: 90vw; }
#toast.show { opacity: 1; transform: translateX(-50%); }
@media (min-width: 760px) { #toast { bottom: 28px; } }

.dyn-card .chart { max-width: 600px; margin: 0 auto; }

/* ========================================================================== */
/* Premium responsive product layer                                           */
/* ========================================================================== */

html { scroll-behavior: smooth; }
body {
  font-family: Manrope, Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: -.006em;
}
#app { max-width: 1320px; }
button, input, textarea, select { font: inherit; }
button { min-height: 44px; }
button, a, input, textarea, select { outline: none; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, [tabindex="0"]:focus-visible {
  outline: 3px solid #5B8DEF;
  outline-offset: 2px;
}
button:not(:disabled):active { transform: translateY(1px); }
button[aria-busy="true"] { cursor: wait; opacity: .76; }
.primary, .ghost, .pill-btn, .icon-btn, .chipbtn, .add-line, .add-habit, .link-more, .menu-row, .notice-row, .status-option {
  transition: background-color .16s ease, border-color .16s ease, color .16s ease, transform .12s ease, box-shadow .16s ease;
}
@media (hover:hover) {
  .primary:not(:disabled):hover { background: #142B63; box-shadow: 0 6px 16px rgba(11,29,72,.18); }
  .ghost:not(:disabled):hover, .icon-btn:not(:disabled):hover, .pill-btn:not(:disabled):hover { border-color: #C8D0E0; background: #F8FAFE; }
  .trow:hover, .grow:hover, .menu-row:hover, .notice-row:hover { background: #F8FAFC; }
}
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
.skip-link { position: fixed; z-index: 200; top: 8px; left: 8px; transform: translateY(-150%); background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 10px; }
.skip-link:focus { transform: translateY(0); }
.offline-banner { position: sticky; top: 0; z-index: 80; padding: 8px 16px; text-align: center; background: #FFF4D8; color: #684900; font-size: 13px; border-bottom: 1px solid #F1D99C; }
.field-error { color: #C5363E; font-size: 13px; margin: 6px 0 0; font-weight: 600; }
.inline-warning { color: #795600; background: #FFF5DA; border: 1px solid #F4D99A; border-radius: 12px; padding: 10px 12px; font-size: 13px; margin: 8px 0; }
.finish-date { color: var(--ink); font-weight: 700; font-size: 14px; }
.char-counter { justify-self: end; color: var(--ink-soft); font-size: 12px; }
.destructive { background: #C73B43; color: #fff; }
.destructive:not(:disabled):hover { background: #AD2F37; }

/* Landing */
.landing-shell { max-width: 1120px; margin: 0 auto; }
.landing-brand { display: flex; align-items: baseline; gap: 10px; padding: 10px 0 26px; }
.landing-brand b { font-size: 23px; font-weight: 800; letter-spacing: -.04em; }
.landing-brand span { color: var(--ink-soft); font-size: 13px; }
.landing-shell .hero { max-width: none; padding: 10px 0 32px; display: grid; gap: 26px; align-items: center; }
.hero-copy { max-width: 660px; }
.hero .eyebrow { display: inline-block; color: var(--brand-ink); background: var(--brand-soft); padding: 7px 11px; border-radius: 99px; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 14px; }
.landing-shell .hero h1 { color: var(--ink); font-size: clamp(38px, 7vw, 68px); line-height: 1.02; letter-spacing: -.055em; max-width: 760px; }
.landing-shell .hero .lead { max-width: 620px; font-size: clamp(17px, 2.4vw, 21px); line-height: 1.55; }
.hero-cta { max-width: 330px; margin-top: 4px; min-height: 56px; font-size: 16px; }
.trust { display: flex; align-items: flex-start; gap: 7px; margin-top: 13px !important; color: var(--ink-soft); font-size: 13px; }
.trust span { color: var(--brand); font-weight: 800; }
.hero-visual { display: none; background: var(--card); border: 1px solid var(--line-soft); border-radius: 24px; padding: 24px; box-shadow: var(--shadow); justify-items: center; gap: 8px; position: relative; overflow: hidden; }
.hero-visual::before { content: ""; position: absolute; width: 220px; height: 220px; border-radius: 50%; background: var(--brand-soft); right: -90px; top: -90px; opacity: .7; }
.hero-week { justify-self: stretch; font-size: 13px; color: var(--ink-soft); font-weight: 700; }
.hero-visual strong { font-size: 15px; }
.mini-bars { width: 100%; height: 70px; display: grid; grid-template-columns: repeat(6,1fr); gap: 8px; align-items: end; border-bottom: 1px solid var(--line-soft); padding: 0 8px; }
.mini-bars i { display: block; background: linear-gradient(#61BE8E,#2FA66B); border-radius: 6px 6px 0 0; }
.explain { padding: 22px 0; }
.explain h2 { font-size: 25px; margin-bottom: 14px; }
.landing-shell .steps { grid-template-columns: 1fr; }
.landing-shell .steps li { min-height: 116px; align-content: center; }
.landing-shell .steps b { font-size: 16px; margin-bottom: 4px; }
.landing-shell .steps span { line-height: 1.55; }
.access-card { max-width: 640px; margin: 20px auto 50px; padding: 22px; }
.access-card h3 { font-size: 20px; }
.access-card .muted { margin-bottom: 12px; font-size: 14px; }
.access-card input { width: 100%; min-height: 50px; border: 1px solid var(--line-soft); border-radius: 12px; background: var(--bg); color: var(--ink); padding: 12px 14px; }
.access-card .ghost { margin-top: 10px; }

/* Navigation */
.tabbar { box-shadow: 0 -8px 26px rgba(11,29,72,.06); }
.tabbar .nav-logo { min-height: 0; border: 0; background: none; color: var(--ink); }
@media (max-width:767px) {
  #app { padding-left: 16px; padding-right: 16px; }
  .tabbar .nav-logo, .tabbar .nav-settings { display: none; }
  .tabbar { gap: 2px; }
  .tabbar button { min-width: 0; min-height: 56px; }
}
@media (min-width:768px) {
  body { padding-left: 80px; }
  body.nobar { padding-left: 0; }
  .tabbar { width: 80px; }
  .tabbar button { width: 56px; min-height: 52px; }
  #app { padding: 28px 30px 36px; }
}
@media (min-width:768px) and (max-width:1199px) {
  .tabbar { align-items: center; padding: 18px 10px; }
  .tabbar button { display: grid; place-items: center; padding: 0; gap: 0; font-size: 12px; }
  .tabbar em, .tabbar .nav-logo span { display: none; }
  .tabbar .nav-logo { font-size: 24px; margin: 2px 0 18px; }
  .tabbar .nav-settings { display: grid; }
}
@media (min-width:1200px) {
  body { padding-left: 232px; }
  body.nobar { padding-left: 0; }
  .tabbar { width: 232px; }
  .tabbar button { width: auto; }
}

/* Wizard */
.wiz-top { max-width: 720px; align-items: flex-start; }
.wiz-progress { display: grid; gap: 7px; flex: 1; color: var(--ink-soft); font-size: 13px; font-weight: 700; }
.wiz { max-width: 720px; }
.wiz h2 { font-size: clamp(28px,5vw,38px); color: var(--ink); letter-spacing: -.04em; }
.wiz .hint { font-size: 16px; line-height: 1.55; }
.wiz .card { padding: 18px; }
.wiz-nav { box-shadow: 0 -8px 22px rgba(11,29,72,.06); }
.action-editor { display: grid; grid-template-columns: 24px minmax(0,1fr) auto 40px; gap: 8px; align-items: center; margin: 8px 0; padding: 7px; border: 1px solid var(--line-soft); border-radius: 12px; background: var(--bg); }
.action-editor.dragging { opacity: .55; }
.action-editor input { background: var(--card); min-height: 44px; }
.drag-handle { color: var(--ink-soft); font-size: 22px; cursor: grab; text-align: center; }
.action-order { display: flex; gap: 3px; }
.icon-mini { width: 36px; min-height: 36px; border: 1px solid var(--line-soft); background: var(--card); border-radius: 9px; padding: 0; }

/* Dashboard */
.brand-actions { display: flex; align-items: center; gap: 10px; }
.notification { position: relative; }
.notification i { position: absolute; width: 7px; height: 7px; background: var(--red); border: 2px solid var(--card); border-radius: 50%; right: 8px; top: 7px; }
.greet { letter-spacing: -.045em; }
.focus-card { border-left: 4px solid var(--brand); }
.tile { border: 1px solid var(--line-soft); width: 100%; text-align: left; color: var(--ink); }
.rc-row { border: 0; text-align: left; background: transparent; color: var(--ink); width: 100%; }
.rc-row + .rc-row { border-top: 1px solid var(--line-soft); }
.trow { grid-template-columns: minmax(0,1fr) auto; padding: 9px 0; }
.task-main { display: grid; grid-template-columns: 38px minmax(0,1fr); gap: 10px; align-items: center; text-align: left; border: 0; background: transparent; color: var(--ink); padding: 0; min-width: 0; }
.trow .pill { border: 0; min-height: 36px; cursor: pointer; }
.trow.excluded .pill { background: var(--track); color: var(--ink-soft); }
.trow.excluded .tcheck { background: var(--track); }
.profile-head { display: flex; align-items: center; gap: 12px; padding: 4px 0 12px; border-bottom: 1px solid var(--line-soft); }
.profile-head .avatar { flex: none; }
.profile-head b, .profile-head span { display: block; }
.profile-head span { color: var(--ink-soft); font-size: 13px; }
.menu-row, .notice-row { width: 100%; border: 0; border-bottom: 1px solid var(--line-soft); background: transparent; color: var(--ink); display: flex; justify-content: space-between; align-items: center; text-align: left; padding: 12px 4px; }
.notice-row > span:first-child { color: var(--brand); font-size: 11px; margin-right: 10px; }
.notice-row > span:last-child { margin-left: auto; color: var(--ink-soft); }

/* Sheets, status and history */
.sheet-bg { backdrop-filter: blur(3px); }
.sheet { box-shadow: 0 -16px 50px rgba(11,29,72,.18); }
.sheet-actions, .button-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sheet-kicker { color: var(--ink-soft); font-size: 13px; font-weight: 700; }
.sheet input.keybox { width: 100%; background: var(--bg); color: var(--ink); min-height: 50px; }
.status-option { display: flex; justify-content: flex-start; align-items: center; text-align: left; gap: 10px; width: 100%; border: 1px solid var(--line-soft); background: var(--card); color: var(--ink); border-radius: 12px; padding: 10px 12px; font-weight: 700; }
.status-option.done { color: var(--brand-ink); background: var(--brand-soft); }
.status-option.missed { color: #C5363E; background: var(--red-soft); }
.status-option.off { color: var(--ink-soft); background: var(--track); }
.history-list { display: grid; }
.history-list > div, .history-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-bottom: 1px solid var(--line-soft); padding: 9px 0; font-size: 14px; }
.status-text.done { color: var(--brand-ink); }
.status-text.missed { color: var(--red); }
.status-text.off, .status-text.empty { color: var(--ink-soft); }
.goal-chip { align-self: start; color: var(--gc); background: color-mix(in srgb,var(--gc) 12%,#fff); border-radius: 99px; padding: 6px 10px; font-size: 12px; font-weight: 800; }
#toast { display: flex; align-items: center; gap: 16px; }
#toast button { border: 0; color: #A8CBFF; background: transparent; font-weight: 800; padding: 0; min-height: 28px; }

/* Week: one selected day on mobile, matrix on larger screens */
.days { overflow-x: auto; grid-template-columns: repeat(7,minmax(62px,1fr)); scrollbar-width: none; }
.day { min-height: 64px; color: var(--ink); cursor: pointer; }
.day.selected { background: var(--ink); color: #fff; border-color: var(--ink); }
.day.selected b, .day.selected i { color: #DDE5F6; }
.mobile-day-list { display: grid; gap: 12px; margin-bottom: 16px; }
.mobile-day-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.mobile-day-head h2 { font-size: 18px; }
.mobile-day-head span { color: var(--ink-soft); font-size: 12px; white-space: nowrap; }
.mobile-goal-group { background: var(--card); border: 1px solid var(--line-soft); border-top: 5px solid var(--gc); border-radius: 16px; padding: 12px 14px; box-shadow: var(--shadow); }
.mobile-goal-group h3 { font-size: 15px; margin-bottom: 4px; }
.mobile-action { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line-soft); }
.mobile-action-name { border: 0; background: transparent; text-align: left; color: var(--ink); padding: 0; }
.mobile-action .pill { border: 0; min-height: 36px; }
.mobile-action.done .pill { background: var(--brand-soft); color: var(--brand-ink); }
.mobile-action.missed .pill { background: var(--red-soft); color: var(--red); }
.mobile-action.off .pill { background: var(--track); color: var(--ink-soft); }
.week-blocks, .week-wrap > .legend { display: none; }
.review-card .muted { font-size: 14px; margin-bottom: 10px; }
.review-card textarea { margin-bottom: 10px; }
@media (min-width:768px) {
  .mobile-day-list { display: none; }
  .week-blocks { display: grid; }
  .week-wrap > .legend, .legend { display: flex; }
  .days { overflow: visible; }
}

/* Goals */
.vision-card p { font-size: 16px; line-height: 1.65; color: #26385E; }
.goal { padding: 18px; }
.goal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.goal-actions .ghost { min-height: 42px; padding: 9px; font-size: 13px; }

/* Analytics */
.tiles { grid-template-columns: repeat(2,minmax(0,1fr)); }
.segmented { display: inline-flex; background: var(--track); border-radius: 10px; padding: 3px; }
.segmented button { min-height: 34px; border: 0; background: transparent; color: var(--ink-soft); padding: 5px 9px; border-radius: 8px; font-size: 12px; }
.segmented button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 4px rgba(11,29,72,.09); font-weight: 800; }
.chart-title-controls { align-items: center; }
.chart-caption { color: var(--ink-soft); font-size: 12px; margin-top: 8px; }
.table-wrap { overflow-x: auto; }
.table-wrap table { width: 100%; border-collapse: collapse; }
.table-wrap th, .table-wrap td { padding: 10px 8px; border-bottom: 1px solid var(--line-soft); text-align: left; }
.heat-legend { gap: 9px 14px; }
.chart rect[role="button"] { cursor: pointer; }
.progress-ring { animation: ring-in .65s ease-out both; }
@keyframes ring-in { from { stroke-dasharray: 0 252; } }

/* Settings, empty and loading */
.settings-grid { display: grid; gap: 14px; }
.settings-card { display: grid; gap: 12px; margin: 0; }
.settings-card h2 { font-size: 19px; }
.settings-card .muted { font-size: 14px; }
.settings-card input, .settings-card textarea, .settings-card select { width: 100%; min-height: 48px; border: 1px solid var(--line-soft); border-radius: 12px; padding: 11px 12px; color: var(--ink); background: var(--bg); }
.masked-key { font-family: ui-monospace,SFMono-Regular,Menlo,monospace; letter-spacing: .14em; background: var(--bg); border: 1px dashed var(--line-soft); border-radius: 12px; padding: 13px; overflow: hidden; }
.danger-zone { border-color: #F5C7CA; margin-top: 14px; }
.empty-state, .error-screen { text-align: center; display: grid; justify-items: center; gap: 8px; padding: 44px 20px; }
.empty-state.compact { padding: 22px 12px; }
.empty-state p, .error-screen p { color: var(--ink-soft); max-width: 480px; }
.empty-icon, .error-icon { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-size: 28px; font-weight: 800; }
.error-icon { background: var(--red-soft); color: var(--red); }
.error-screen { min-height: 65vh; align-content: center; }
.error-screen .primary { max-width: 260px; }
.skeleton-screen { max-width: 1080px; margin: 20px auto; display: grid; gap: 16px; }
.skeleton { position: relative; overflow: hidden; background: #ECEAE4; border-radius: 16px; }
.skeleton::after { content:""; position:absolute; inset:0; transform:translateX(-100%); background:linear-gradient(90deg,transparent,rgba(255,255,255,.65),transparent); animation:shimmer 1.2s infinite; }
.sk-title { width: 52%; height: 46px; }
.sk-focus { height: 90px; }
.skeleton-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.sk-card { height: 240px; }
.sk-list { height: 320px; }
@keyframes shimmer { to { transform:translateX(100%); } }

@media (min-width:768px) {
  .landing-shell .steps { grid-template-columns: repeat(3,1fr); }
  .tiles { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .settings-grid { grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start; }
  .skeleton-grid { grid-template-columns: 1fr 1fr; }
  .home-grid { grid-template-columns: minmax(0,1.15fr) minmax(280px,.85fr); gap: 0 14px; align-items: start; }
  .home-grid .col-main, .home-grid .col-side { display: block; }
  .home-grid .col-main > *, .home-grid .col-side > * { order: initial; }
  .home-grid .today-card, .home-grid .rhythm-card { width: 100%; }
}
@media (min-width:1000px) {
  .landing-shell .hero { grid-template-columns: minmax(0,1.45fr) minmax(320px,.7fr); padding: 50px 0; }
  .hero-visual { display: grid; }
}
@media (min-width:1200px) {
  .settings-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .danger-zone { grid-column: 1 / -1; }
}
@media (max-width:460px) {
  .sheet-actions, .button-row, .goal-actions { grid-template-columns: 1fr; }
  .action-editor { grid-template-columns: 22px minmax(0,1fr) 40px; }
  .action-order { display: none; }
  .greet { font-size: 31px; }
  .ring-combo { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }
  .rc-row { grid-template-columns: 44px minmax(0,1fr); padding: 10px; }
  .rc-row .circle { width: 42px; height: 42px; }
  .rc-row b { font-size: 18px; }
}
@media (prefers-reduced-motion:reduce) {
  *, *::before, *::after { animation-duration:.01ms !important; animation-iteration-count:1 !important; transition-duration:.01ms !important; scroll-behavior:auto !important; }
}
