/* Focus Digital Planner (app edition) */
@font-face { font-family: Lora; src: url(fonts/Lora-Variable.woff2) format('woff2'); font-weight: 400 700; font-display: swap; }
@font-face { font-family: Lora; font-style: italic; src: url(fonts/Lora-Italic-Variable.woff2) format('woff2'); font-weight: 400 700; font-display: swap; }
@font-face { font-family: Poppins; src: url(fonts/Poppins-Regular.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: Poppins; src: url(fonts/Poppins-Medium.woff2) format('woff2'); font-weight: 500 600; font-display: swap; }
@font-face { font-family: Poppins; src: url(fonts/Poppins-Bold.woff2) format('woff2'); font-weight: 700; font-display: swap; }

:root { --sans: Poppins, system-ui, -apple-system, "Segoe UI", sans-serif; --serif: Lora, Georgia, serif; --r: 18px; --side: 236px;
  --bg: #E6DDEF; --paper: #FCFAFE; --ink: #3B3150; --shadow-c: rgb(40 28 70 / .07); --on-acc: #fff; color-scheme: light; }
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 400 14px/1.45 var(--sans); -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body.dragging, body.dragging * { cursor: grabbing !important; user-select: none; -webkit-user-select: none; }
body.modal-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: var(--ink); }
input::placeholder, textarea::placeholder { color: var(--txt3); opacity: 1; }
:focus-visible { outline: 2px solid var(--acc-dk); outline-offset: 2px; }
svg { flex: none; }
.grow { flex: 1; }
kbd { font: 500 10.5px var(--sans); padding: 2px 6px; border-radius: 6px; background: var(--shade); color: var(--txt2); border: 1px solid var(--line2); }

/* ---------------- shell */
#app { min-height: 100vh; min-height: 100dvh; }
.side { position: fixed; inset: 0 auto 0 0; width: var(--side); padding: 20px 14px 14px; display: flex; flex-direction: column; gap: 4px; z-index: 10; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.logo { display: flex; align-items: center; gap: 10px; font: 600 21px var(--serif); letter-spacing: -.01em; padding: 0 10px 14px; }
.logo span { width: 30px; height: 30px; border-radius: 10px; background: var(--acc-dk); color: var(--on-acc); display: grid; place-items: center; }
.logo em { font-style: italic; font-weight: 400; color: var(--acc-dk); }
.quick-btn { display: flex; align-items: center; gap: 8px; background: var(--ink); color: var(--paper); border-radius: 14px; padding: 11px 14px; font-weight: 500; margin-bottom: 10px; }
.quick-btn kbd { margin-left: auto; background: rgb(255 255 255 / .14); border-color: transparent; color: inherit; }
.side nav { display: flex; flex-direction: column; gap: 2px; }
.side nav a, .side-f a[data-nav] { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 12px; color: var(--tab-txt); font-weight: 500; }
.side nav a:hover, .side-f a[data-nav]:hover { background: color-mix(in srgb, var(--paper) 55%, transparent); }
.side nav a.on, .side-f a.on { background: var(--paper); color: var(--ink); box-shadow: 0 1px 2px var(--shadow-c); }
.side nav a.on svg, .side-f a.on svg { color: var(--acc-dk); }
.side nav a.soon { opacity: .62; }
.side nav a em { margin-left: auto; font: 500 9.5px var(--sans); letter-spacing: .06em; text-transform: uppercase; font-style: normal; color: var(--txt3); }
.side-f { margin-top: auto; padding-top: 10px; display: flex; flex-direction: column; gap: 2px; }
.brandl { font-size: 11.5px; color: var(--txt2); padding: 4px 12px; }
#main { margin-left: var(--side); padding: 26px 30px 60px 8px; max-width: calc(1420px + var(--side)); min-width: 0; }
.bnav { display: none; }
.tpill { position: fixed; right: 20px; bottom: 20px; z-index: 30; display: flex; align-items: center; gap: 8px; background: var(--paper); color: var(--ink); padding: 10px 16px; border-radius: 99px; box-shadow: 0 6px 22px var(--shadow-c), 0 0 0 1px var(--line2); font-variant-numeric: tabular-nums; }
.tpill[hidden] { display: none; }
.tpill.run { background: var(--acc-dk); color: var(--on-acc); }
.tpill b { font-weight: 600; }

/* ---------------- headers */
.hero, .phead { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px 20px; flex-wrap: wrap; margin: 4px 0 16px; }
.eyebrow { margin: 0 0 4px; font: 500 12px var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--txt2); }
h1 { font: 600 clamp(26px, 3.2vw, 36px)/1.1 var(--serif); margin: 0; letter-spacing: -.015em; }
.lede { margin: 6px 0 0; color: var(--txt2); }
.lede a { color: var(--acc-dk); font-weight: 500; }
.phead-r { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.navbtns { display: flex; align-items: center; gap: 4px; }
.datepick { position: relative; overflow: hidden; }
.datepick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.wstrip { display: flex; gap: 4px; background: var(--paper); padding: 4px; border-radius: 14px; box-shadow: 0 1px 2px var(--shadow-c); }
.wstrip a { width: 38px; height: 44px; border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; font: 600 14px/1.1 var(--sans); position: relative; }
.wstrip a small { font: 500 10px var(--sans); color: var(--txt3); }
.wstrip a:hover { background: var(--shade); }
.wstrip a.tdy { color: var(--acc-dk); }
.wstrip a.on { background: var(--acc-dk); color: var(--on-acc); }
.wstrip a.on small { color: inherit; opacity: .75; }
.wstrip a i { position: absolute; bottom: 4px; width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: .5; }

/* ---------------- buttons & bits */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 40px; padding: 0 16px; border-radius: 12px; background: var(--paper); border: 1px solid var(--line2); font-weight: 500; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--shade); }
.btn.primary { background: var(--acc-dk); color: var(--on-acc); border-color: transparent; }
.btn.primary:hover { filter: brightness(1.07); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--shade); }
.btn.danger { color: #B44A3E; }
.btn.sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn.round { width: 54px; height: 54px; border-radius: 50%; padding: 0; }
.icon-btn { width: 38px; height: 38px; display: inline-grid; place-items: center; border-radius: 11px; color: var(--txt2); flex: none; }
.icon-btn:hover { background: var(--shade); color: var(--ink); }
.icon-btn.sm { width: 30px; height: 30px; border-radius: 9px; }
.phead .icon-btn { background: var(--paper); box-shadow: 0 1px 2px var(--shadow-c); }
.link { color: var(--acc-dk); font-weight: 500; font-size: 13px; display: inline-flex; align-items: center; gap: 5px; }
.link:hover { text-decoration: underline; }
.link.sm { margin-top: 10px; font-size: 12.5px; }
.seg { display: inline-flex; background: var(--shade); border-radius: 12px; padding: 3px; gap: 2px; }
.seg button, .seg label span { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 9px; font: 500 12.5px var(--sans); color: var(--txt2); cursor: pointer; }
.seg button.on, .seg label input:checked + span { background: var(--paper); color: var(--ink); box-shadow: 0 1px 3px var(--shadow-c); }
.seg label input { position: absolute; opacity: 0; pointer-events: none; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 99px; background: var(--shade); color: var(--txt2); font: 500 12px var(--sans); }
.chip.hi { color: #B44A3E; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
button.chip:hover { background: var(--band); color: var(--ink); }
.empty { color: var(--txt2); font-size: 13.5px; margin: 4px 0; }
.note { color: var(--txt2); font-size: 12.5px; margin: 0; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.hint-s { font-size: 11.5px; color: var(--txt3); }
.count { font: 500 12px var(--sans); color: var(--txt3); }

/* ---------------- layout */
.dash { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(300px, 1.1fr) minmax(290px, 1fr); gap: 18px; align-items: start; }
.dayg { display: grid; grid-template-columns: minmax(300px, 1.35fr) minmax(280px, 1fr) minmax(280px, 1fr); gap: 18px; align-items: start; }
.col { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.card { background: var(--paper); border-radius: var(--r); padding: 16px 18px 18px; box-shadow: 0 1px 2px var(--shadow-c), 0 8px 26px var(--shadow-c); min-width: 0; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; min-height: 26px; }
.card-h:empty, .card-h:has(h3:empty):not(:has(*:not(h3))) { display: none; }
.card-h h3 { margin: 0; font: 600 17px var(--serif); }
.warn-card { box-shadow: 0 0 0 1.5px color-mix(in srgb, #D07A5F 45%, transparent), 0 8px 26px var(--shadow-c); }
.tl-card { padding: 14px 10px 10px 14px; }
.tl-card .card-h { padding-right: 6px; }
.tl-card.wk .card-h { display: none; }

/* ---------------- quick add */
.quick { display: flex; align-items: center; gap: 10px; background: var(--paper); border-radius: 16px; padding: 0 12px 0 16px; height: 54px; box-shadow: 0 1px 2px var(--shadow-c), 0 8px 26px var(--shadow-c); border: 1.5px solid transparent; transition: border-color .15s; }
.quick:focus-within { border-color: var(--acc); }
.quick-i { color: var(--acc-dk); display: grid; }
.quick input { flex: 1; border: 0; background: transparent; font-size: 15.5px; height: 50px; outline: none; min-width: 0; }
.qprev { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-height: 34px; padding: 8px 4px 6px; margin-bottom: 6px; }
.qprev .qt { font-weight: 500; margin-left: 4px; }
.qprev .qhint { margin-left: auto; font-size: 11.5px; color: var(--txt3); }
.examples { margin: 4px 0 0; padding-left: 18px; color: var(--txt2); font-size: 13px; columns: 2; }
.examples li { margin: 3px 0; }

/* ---------------- tasks */
.tlist { display: flex; flex-direction: column; gap: 4px; min-height: 40px; border-radius: 12px; padding: 2px; transition: background .12s; }
.tlist.over { background: color-mix(in srgb, var(--acc) 14%, transparent); }
.tlist-empty { color: var(--txt3); font-size: 12.5px; padding: 10px; border: 1.5px dashed var(--line); border-radius: 12px; text-align: center; }
.task { display: flex; align-items: center; gap: 6px; background: var(--paper); border-radius: 12px; padding: 6px 8px 6px 2px; border: 1px solid var(--line2); min-height: 44px; }
.task:hover { border-color: var(--line); }
.task .grip { color: var(--txt3); cursor: grab; touch-action: none; display: grid; place-items: center; width: 22px; align-self: stretch; border-radius: 8px; opacity: .55; }
.task:hover .grip { opacity: 1; }
.task .grip:hover { background: var(--shade); color: var(--ink); }
.tck { width: 21px; height: 21px; flex: none; border-radius: 50%; border: 1.6px solid var(--chk); display: grid; place-items: center; color: transparent; transition: .12s; }
.tck:hover { border-color: var(--acc-dk); color: var(--acc); }
.tck.on { background: var(--acc-dk); border-color: var(--acc-dk); color: var(--on-acc); }
.tt { flex: 1; min-width: 0; text-align: left; display: flex; flex-direction: column; gap: 1px; padding: 2px 4px; }
.tt span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tt small { display: flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--txt2); }
.tt small em { color: #B44A3E; font-style: normal; font-weight: 500; margin-right: 4px; }
.task.done .tt span { text-decoration: line-through; color: var(--txt3); }
.flag { color: #C0584A; display: grid; }
.task.is-src { opacity: .35; }
.task.ghost { position: fixed; left: 0; top: 0; z-index: 100; pointer-events: none; box-shadow: 0 14px 30px rgb(0 0 0 / .18); border-color: var(--acc); }
.drop-line { height: 3px; border-radius: 3px; background: var(--acc-dk); margin: 1px 6px; }
.addrow { display: flex; align-items: center; gap: 8px; color: var(--txt3); padding: 4px 10px; margin-top: 6px; border-radius: 12px; background: var(--shade); }
.addrow input { flex: 1; border: 0; background: transparent; height: 38px; outline: none; min-width: 0; font-size: 14px; }
.addrow:focus-within { color: var(--acc-dk); }

/* ---------------- timeline */
.tgrid { --lab: 50px; }
.thead { display: grid; grid-template-columns: var(--lab) repeat(7, minmax(0, 1fr)); gap: 0; padding-right: 8px; margin-bottom: 6px; }
.thead a { display: flex; flex-direction: column; align-items: center; padding: 4px 0; border-radius: 10px; line-height: 1.15; }
.thead a small { font: 500 10.5px var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--txt3); }
.thead a b { font: 600 18px var(--sans); }
.thead a.is-today b { background: var(--acc-dk); color: var(--on-acc); border-radius: 50%; width: 32px; height: 32px; display: grid; place-items: center; }
.tscroll { overflow-y: auto; overscroll-behavior: contain; padding-right: 6px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.tbody { position: relative; display: grid; grid-template-columns: var(--lab) repeat(var(--n, 1), minmax(0, 1fr)); }
.tgrid.multi .tbody { --n: 7; }
.tlabels { position: relative; }
.tlabels span { position: absolute; right: 8px; transform: translateY(-50%); font: 500 10.5px var(--sans); color: var(--txt3); white-space: nowrap; }
.tcol { position: relative; background-image: linear-gradient(var(--line2) 1px, transparent 1px); background-size: 100% var(--hh); border-left: 1px solid var(--line2); cursor: cell; touch-action: pan-y; }
.tcol.is-today { background-color: color-mix(in srgb, var(--acc) 6%, transparent); }
.now { position: absolute; left: -4px; right: 0; height: 2px; background: #D0584A; z-index: 3; pointer-events: none; }
.now::before { content: ""; position: absolute; left: -2px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: #D0584A; }
.blk { position: absolute; z-index: 2; border-radius: 10px; padding: 4px 8px 4px 9px; overflow: hidden; cursor: grab; display: flex; flex-direction: column; gap: 0;
  background: color-mix(in srgb, var(--c) 22%, var(--paper)); border-left: 3.5px solid var(--c); color: var(--ink); box-shadow: 0 1px 2px var(--shadow-c); transition: box-shadow .12s; }
.blk:hover { box-shadow: 0 4px 14px var(--shadow-c); z-index: 4; }
.blk b { font-weight: 600; font-size: 12.5px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-right: 14px; }
.blk .bt { font-size: 11px; color: var(--txt2); white-space: nowrap; }
.blk.short { flex-direction: row; align-items: center; gap: 6px; padding-top: 0; padding-bottom: 0; }
.blk.short .bt { display: none; }
.blk .bell { position: absolute; top: 5px; right: 6px; color: var(--txt3); display: grid; }
.blk .bck { position: absolute; top: 5px; right: 5px; width: 16px; height: 16px; border-radius: 50%; border: 1.4px solid var(--c); background: var(--paper); display: grid; place-items: center; color: transparent; z-index: 1; }
.blk .bck.on { background: var(--c); color: #fff; }
.blk .bck ~ .bell { display: none; }
.blk.done b { text-decoration: line-through; opacity: .6; }
.blk .rz { position: absolute; left: 0; right: 0; bottom: 0; height: 9px; cursor: ns-resize; touch-action: none; }
.blk .rz::after { content: ""; position: absolute; left: 50%; bottom: 3px; width: 22px; height: 3px; margin-left: -11px; border-radius: 3px; background: var(--c); opacity: 0; transition: opacity .12s; }
.blk:hover .rz::after { opacity: .6; }
.blk.moving { box-shadow: 0 12px 28px rgb(0 0 0 / .2); z-index: 9; opacity: .95; }
.ghostblk { background: color-mix(in srgb, var(--acc) 20%, transparent); border: 2px dashed var(--acc-dk); border-left-width: 2px; box-shadow: none; pointer-events: none; z-index: 5; --c: var(--acc-dk); }
.tgrid.multi .blk { padding-left: 6px; padding-right: 4px; }
.tgrid.multi .blk b { font-size: 11.5px; }

/* ---------------- check-in, journal, habits */
.ci-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line2); flex-wrap: wrap; }
.ci-row:first-child { border-top: 0; padding-top: 0; }
.ci-row > span { font: 500 11.5px var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--txt2); width: 70px; flex: none; }
.ci-row .in { flex: 1; min-width: 160px; }
.moods { display: flex; gap: 2px; flex-wrap: wrap; }
.moods button { color: var(--chk); padding: 3px; border-radius: 10px; display: grid; transition: transform .12s; }
.moods button:hover { color: var(--acc-dk); transform: translateY(-1px); }
.moods button.on { color: var(--acc-dk); background: var(--band); }
.water { display: flex; align-items: center; gap: 0; }
.water button { color: var(--line); padding: 1px; display: grid; }
.water button.on { color: var(--acc); }
.water button.on svg { fill: currentColor; }
.water small { margin-left: 8px; color: var(--txt3); font-size: 12px; }
.energy { display: flex; gap: 4px; }
.energy button { width: 26px; height: 14px; border-radius: 5px; background: var(--shade); border: 1px solid var(--line2); }
.energy button.on { background: var(--acc); border-color: var(--acc); }
.in { width: 100%; border: 0; border-bottom: 1px solid var(--line2); background: transparent; height: 34px; padding: 2px; outline: none; font-size: 14px; }
.in:focus { border-bottom-color: var(--acc-dk); }
textarea.in { height: auto; resize: none; line-height: 1.55; padding-top: 6px; overflow: hidden; }
.jf { display: flex; flex-direction: column; gap: 2px; margin-top: 12px; }
.jf label { font: 500 11.5px var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--txt2); }
.habits { display: flex; flex-direction: column; gap: 6px; }
.hab { display: flex; align-items: center; gap: 12px; padding: 6px 4px; }
.hab-ck { width: 36px; height: 36px; border-radius: 12px; border: 2px solid color-mix(in srgb, var(--c) 55%, transparent); color: transparent; display: grid; place-items: center; flex: none; transition: .15s; }
.hab-ck:hover { background: color-mix(in srgb, var(--c) 12%, transparent); color: var(--c); }
.hab-ck.on { background: var(--c); border-color: var(--c); color: #fff; transform: scale(1.02); }
.hab-m { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.hab-m b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hab-w { display: flex; gap: 4px; }
.hab-w i { width: 12px; height: 12px; border-radius: 4px; background: var(--shade2); }
.hab-w i.on { background: var(--c); }
.hab-w i.off { opacity: .35; }
.hab-w i.cur { box-shadow: 0 0 0 1.5px var(--paper), 0 0 0 2.5px var(--c); }
.hab-s { display: flex; align-items: center; gap: 3px; font: 600 13px var(--sans); color: var(--c); }

/* ---------------- stats */
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.kpis div { background: var(--shade); border-radius: 12px; padding: 10px 12px; }
.kpis b { display: block; font: 600 21px var(--serif); font-variant-numeric: tabular-nums; }
.kpis b small { font: 500 12px var(--sans); color: var(--txt2); margin-left: 1px; }
.kpis span { font-size: 11.5px; color: var(--txt2); }
.bars { width: 100%; height: auto; display: block; }
.bars rect { fill: color-mix(in srgb, var(--acc) 70%, var(--paper)); }
.bars rect.cur { fill: var(--acc-dk); }
.bars rect.zero { fill: var(--shade2); }
.bars text { font: 600 10px var(--sans); fill: var(--txt2); text-anchor: middle; }
.bars text.lb { font-weight: 500; fill: var(--txt3); }
.mstrip-h { display: flex; justify-content: space-between; font: 500 11.5px var(--sans); color: var(--txt2); margin: 12px 0 6px; }
.mstrip { display: grid; grid-template-columns: repeat(14, 1fr); gap: 4px; }
.mstrip a { aspect-ratio: 1; border-radius: 6px; }
.mstrip a.none { background: var(--shade); }
.wstats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.wstats div { background: var(--paper); border-radius: 16px; padding: 12px 16px; box-shadow: 0 1px 2px var(--shadow-c); position: relative; overflow: hidden; }
.wstats b { display: block; font: 600 22px var(--serif); }
.wstats b small { font: 500 12px var(--sans); color: var(--txt2); }
.wstats span { font-size: 12px; color: var(--txt2); }
.wstats i { position: absolute; left: 0; bottom: 0; height: 4px; width: var(--p); background: var(--acc-dk); border-radius: 0 4px 4px 0; }

/* ---------------- timer */
.timer { display: flex; align-items: center; gap: 18px; }
.ring { position: relative; width: 128px; height: 128px; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 8; }
.ring .track { stroke: var(--shade2); }
.ring .prog { stroke: var(--acc-dk); stroke-linecap: round; transition: stroke-dashoffset .9s linear; }
.ring-t { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring-t small { font: 500 11px var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--txt2); }
.ring-t b { font: 600 28px var(--sans); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.timer-c { flex: 1; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.timer-c .seg button { padding: 0 9px; height: 28px; font-size: 12px; }
.sel { display: flex; flex-direction: column; gap: 2px; font-size: 11px; color: var(--txt2); }
.sel span { letter-spacing: .06em; text-transform: uppercase; font-weight: 500; }
.sel select { border: 1px solid var(--line2); border-radius: 10px; background: var(--paper); height: 34px; padding: 0 8px; font-size: 13px; max-width: 100%; }
.timer-b { display: flex; align-items: center; gap: 6px; }
.timer.big { flex-direction: column; padding: 8px 0 4px; }
.timer.big .ring { width: 210px; height: 210px; }
.timer.big .ring-t b { font-size: 44px; }
.timer.big .timer-c { align-items: center; width: 100%; }
.timer.big .sel { width: 100%; max-width: 340px; }

/* ---------------- week board */
.wboard { display: grid; grid-template-columns: repeat(8, minmax(190px, 1fr)); gap: 12px; overflow-x: auto; padding: 2px 2px 14px; align-items: start; scrollbar-width: thin; }
.wcol { background: color-mix(in srgb, var(--paper) 55%, transparent); border-radius: 18px; padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 280px; }
.wcol.is-today { background: var(--paper); box-shadow: 0 0 0 2px var(--acc-dk); }
.wcol.past { opacity: .82; }
.wcol.someday { background: color-mix(in srgb, var(--shade2) 70%, transparent); }
.wcol-h { display: flex; align-items: baseline; gap: 6px; padding: 2px 4px 4px; }
.wcol-h small { font: 500 11.5px var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--txt2); }
.wcol-h b { font: 600 20px var(--serif); }
.wcol-h span { margin-left: auto; font-size: 11.5px; color: var(--txt3); }
.wev { display: flex; flex-direction: column; gap: 4px; }
.evchip { text-align: left; font-size: 12px; padding: 5px 8px; border-radius: 9px; background: color-mix(in srgb, var(--c) 20%, var(--paper)); border-left: 3px solid var(--c); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.evchip span { color: var(--txt2); margin-right: 5px; font-size: 11px; }
.wcol .task { min-height: 40px; }
.wcol .tt span { white-space: normal; overflow-wrap: anywhere; }
.wcol .addrow { background: transparent; margin-top: 0; }
.wcol .addrow input { height: 32px; font-size: 13px; }

/* ---------------- settings & sheets */
.sgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)); gap: 18px; align-items: start; }
.themes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.thm { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 6px; border-radius: 14px; font-size: 12.5px; background: var(--g); color: #333; border: 2px solid transparent; }
.thm i { width: 52px; height: 30px; border-radius: 9px; background: linear-gradient(90deg, var(--p) 0 50%, var(--a) 50%); box-shadow: inset 0 0 0 1px rgb(0 0 0 / .06); }
.thm.on { border-color: var(--acc-dk); }
.srow { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; border-top: 1px solid var(--line2); flex-wrap: wrap; }
.srow:first-child { border: 0; }
.srow > span { display: flex; flex-direction: column; }
.srow small { font-size: 11.5px; color: var(--txt3); }
.srow .in { width: 200px; }
.srow select { border: 1px solid var(--line2); border-radius: 10px; height: 36px; padding: 0 8px; background: var(--paper); }
.switch { width: 44px; height: 26px; border-radius: 99px; background: var(--shade2); position: relative; transition: .15s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / .2); transition: .15s; }
.switch.on { background: var(--acc-dk); }
.switch.on::after { left: 21px; }
.btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.keys { list-style: none; padding: 0; margin: 0 0 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; font-size: 13px; color: var(--txt2); }
.soon-card { max-width: 640px; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.soon-card p { margin: 0; font-size: 15px; }
#modal { position: fixed; inset: 0; z-index: 60; background: rgb(25 18 40 / .38); display: grid; place-items: center; padding: 16px; animation: fade .15s; }
#modal[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(16px); opacity: .6; } }
.sheet { background: var(--paper); border-radius: 22px; width: min(520px, 100%); max-height: min(90vh, 860px); overflow: auto; box-shadow: 0 24px 70px rgb(0 0 0 / .25); animation: up .18s ease-out; }
.sheet.wide { width: min(720px, 100%); }
.ed { display: flex; flex-direction: column; gap: 14px; padding: 18px 20px 20px; }
.ed-h { display: flex; align-items: center; gap: 8px; }
.ed-h h2 { margin: 0; font: 600 21px var(--serif); flex: 1; }
.ed-t { flex: 1; border: 0; font: 600 22px var(--serif); outline: none; background: transparent; min-width: 0; padding: 4px 0; border-bottom: 2px solid var(--line2); }
.ed-t:focus { border-bottom-color: var(--acc-dk); }
.ed label, .ed .lab { display: flex; flex-direction: column; gap: 6px; font: 500 11.5px var(--sans); letter-spacing: .05em; text-transform: uppercase; color: var(--txt2); }
.ed label small { text-transform: none; letter-spacing: 0; color: var(--txt3); font-weight: 400; }
.ed input:not([type="radio"]):not([type="checkbox"]):not(.ed-t):not(.in), .ed select, .ed textarea { border: 1px solid var(--line2); border-radius: 11px; background: var(--paper); height: 42px; padding: 0 12px; font-size: 14.5px; text-transform: none; letter-spacing: 0; color: var(--ink); width: 100%; }
.ed textarea { height: auto; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.ed-g { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.ed-f { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-top: 4px; }
.ed .seg { align-self: flex-start; }
.ed .chk { flex-direction: row; align-items: center; gap: 10px; text-transform: none; letter-spacing: 0; font-size: 14px; color: var(--ink); }
.ed .chk input { width: 18px; height: 18px; accent-color: var(--acc-dk); }
.sw { display: flex; gap: 6px; flex-wrap: wrap; }
.sw label { position: relative; }
.sw input { position: absolute; opacity: 0; pointer-events: none; }
.sw i { display: block; width: 26px; height: 26px; border-radius: 50%; background: var(--c); cursor: pointer; }
.sw input:checked + i { box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--c); }
.sw input:focus-visible + i { outline: 2px solid var(--ink); outline-offset: 3px; }
.hrows { display: flex; flex-direction: column; gap: 8px; }
.hrow { display: grid; grid-template-columns: minmax(140px, 1fr) auto auto auto; align-items: center; gap: 10px; padding: 8px 10px; background: var(--shade); border-radius: 14px; }
.hrow .sw i { width: 20px; height: 20px; }
.dpick { display: flex; gap: 3px; }
.dpick label { position: relative; }
.dpick input { position: absolute; opacity: 0; pointer-events: none; }
.dpick span { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--paper); font: 500 11px var(--sans); color: var(--txt3); cursor: pointer; letter-spacing: 0; }
.dpick input:checked + span { background: var(--acc-dk); color: var(--on-acc); }

/* ---------------- alerts & toast */
#alerts { position: fixed; top: 16px; right: 16px; z-index: 70; display: flex; flex-direction: column; gap: 10px; width: min(360px, calc(100% - 32px)); }
.alert { display: flex; gap: 12px; align-items: flex-start; background: var(--paper); border-radius: 16px; padding: 14px; box-shadow: 0 14px 40px rgb(0 0 0 / .18); border-left: 4px solid var(--acc-dk); animation: up .2s ease-out; }
.alert-i { color: var(--acc-dk); display: grid; padding-top: 2px; }
.alert > div { flex: 1; min-width: 0; }
.alert b { display: block; }
.alert p { margin: 2px 0 0; font-size: 13px; color: var(--txt2); }
.alert-a { display: flex; gap: 12px; margin-top: 8px; }
.alert-a button, .alert-a a { font: 500 12.5px var(--sans); color: var(--acc-dk); }
#toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translate(-50%, 14px); background: var(--ink); color: var(--paper); padding: 10px 18px; border-radius: 14px; font-size: 13.5px; opacity: 0; pointer-events: none; transition: .2s; z-index: 80; max-width: calc(100% - 32px); text-align: center; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------------- responsive */
@media (max-width: 1280px) {
  .dash { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .dash > .col:first-child { grid-column: 1 / -1; }
  .dayg { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
  .dayg > .col:last-child { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
}
@media (max-width: 900px) {
  :root { --side: 0px; }
  .side { display: none; }
  #main { margin: 0; padding: max(16px, env(safe-area-inset-top)) 14px calc(96px + env(safe-area-inset-bottom)); }
  .bnav { display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--paper) 92%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-top: 1px solid var(--line2); }
  .bnav a, .bnav .bn-more { display: flex; flex-direction: column; align-items: center; gap: 1px; font: 500 10.5px var(--sans); color: var(--txt2); padding: 4px 0; }
  .bnav a.on, .bnav .bn-more.on { color: var(--acc-dk); }
  .fab { justify-self: center; width: 52px; height: 52px; border-radius: 18px; background: var(--acc-dk); color: var(--on-acc); display: grid; place-items: center; box-shadow: 0 8px 20px color-mix(in srgb, var(--acc-dk) 40%, transparent); margin-top: -18px; }
  .tpill { bottom: calc(84px + env(safe-area-inset-bottom)); right: 14px; }
  .dash, .dayg { grid-template-columns: minmax(0, 1fr); }
  .dayg > .col:last-child { display: flex; }
  .dayg > .col:nth-child(2) { order: 1; }
  .dayg > .col:first-child { order: 2; }
  .dayg > .col:last-child { order: 3; }
  .wstats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quick kbd { display: none; }
  .wboard { grid-template-columns: repeat(8, minmax(240px, 82vw)); scroll-snap-type: x mandatory; margin: 0 -14px; padding: 2px 14px 14px; }
  .wcol { scroll-snap-align: start; }
  .tgrid.multi { overflow-x: auto; }
  .tgrid.multi .thead, .tgrid.multi .tscroll { min-width: 760px; }
  .phead-r { width: 100%; justify-content: space-between; }
  #alerts { top: auto; bottom: calc(150px + env(safe-area-inset-bottom)); right: 16px; }
}
@media (max-width: 520px) {
  .wstrip a { width: 34px; }
  .timer { flex-direction: column; }
  .timer-c { width: 100%; }
  .examples { columns: 1; }
  .hrow { grid-template-columns: 1fr auto; }
  .hrow .dpick { grid-column: 1 / -1; }
  .hrow .sw { justify-self: end; }
  .kpis b { font-size: 18px; }
  .ci-row > span { width: 100%; }
  .qprev .qhint { display: none; }
}
@media (pointer: coarse) { .task .grip { opacity: .9; width: 30px; } }

/* ======================================================================== stage 2 pages */
.search { display: flex; align-items: center; gap: 8px; background: var(--paper); border-radius: 12px; padding: 0 12px; height: 40px; color: var(--txt3); box-shadow: 0 1px 2px var(--shadow-c); min-width: 220px; }
.search input { border: 0; background: transparent; outline: none; flex: 1; height: 38px; font-size: 14px; min-width: 0; }
.checks { display: flex; flex-direction: column; gap: 2px; }
.chk-row { display: flex; align-items: center; gap: 10px; padding: 6px 2px; border-bottom: 1px solid var(--line2); }
.chk-row > span, .chk-row .tt { flex: 1; min-width: 0; }
.chk-row.done > span, .chk-row.done .tt span { text-decoration: line-through; color: var(--txt3); }
.chk-row em { font-style: normal; font-weight: 600; font-size: 13px; font-variant-numeric: tabular-nums; }
.chk-row .icon-btn { opacity: 0; } .chk-row:hover .icon-btn { opacity: 1; }
@media (hover: none) { .chk-row .icon-btn { opacity: .6; } }
.kpis.two { grid-template-columns: repeat(2, 1fr); }
.in.big { font: 600 24px var(--serif); height: 46px; }
.in.short { width: 70px !important; text-align: center; }
.empty.sm { font-size: 12px; margin: 6px 4px; }
.pos { color: #3F8F6B !important; } .neg { color: #C0584A !important; }

/* month */
.mgrid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
.mcal { padding: 14px; }
.mhead { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin-bottom: 6px; }
.mhead span { text-align: center; font: 500 11px var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--txt3); }
.mbody { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-auto-rows: minmax(118px, auto); gap: 6px; }
.mcell { position: relative; background: var(--shade); border-radius: 12px; padding: 6px; display: flex; flex-direction: column; gap: 3px; min-width: 0; min-height: 118px; }
.mcell.out { background: transparent; box-shadow: inset 0 0 0 1px var(--line2); }
.mcell.out .mc-d { color: var(--txt3); }
.mcell.is-today { background: var(--paper); box-shadow: 0 0 0 2px var(--acc-dk); }
.mcell.over { background: color-mix(in srgb, var(--acc) 22%, var(--paper)); }
.mc-h { display: flex; align-items: center; gap: 5px; }
.mc-d { font: 600 13px var(--sans); width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; }
.mc-d:hover { background: var(--band); }
.mcell.is-today .mc-d { background: var(--acc-dk); color: var(--on-acc); }
.mc-m { width: 9px; height: 9px; border-radius: 50%; }
.mc-add { margin-left: auto; width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; color: var(--txt3); opacity: 0; }
.mcell:hover .mc-add { opacity: 1; } .mc-add:hover { background: var(--band); color: var(--ink); }
.mcell .evchip { font-size: 11px; padding: 3px 6px; cursor: grab; touch-action: none; }
.mcell .evchip span { font-size: 10px; }
.task.mt { min-height: 0; padding: 2px 4px 2px 0; gap: 3px; border-radius: 8px; font-size: 11.5px; }
.task.mt .grip { width: 14px; }
.task.mt .tck { width: 14px; height: 14px; border-width: 1.3px; }
.task.mt .tt { padding: 0 2px; }
.mc-more { font-size: 11px; color: var(--acc-dk); padding-left: 4px; }
.mc-dots { display: none; gap: 3px; justify-content: center; margin-top: auto; }
.mc-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--acc-dk); }
.mcell .drop-line { margin: 1px 2px; }
.moodbar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; gap: 2px; }
.moodbar em { font-size: 12px; color: var(--txt3); font-style: normal; }
.wcol.over { box-shadow: 0 0 0 2px var(--acc); }

/* year */
.ygrid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); gap: 18px; align-items: start; }
.pix-wrap { overflow-x: auto; }
.pix { display: grid; grid-template-columns: 34px repeat(31, minmax(13px, 1fr)); gap: 3px; min-width: 520px; }
.pix-n { font: 500 9.5px var(--sans); color: var(--txt3); text-align: center; }
.pix-m { font: 500 11px var(--sans); color: var(--txt2); align-self: center; }
.pix-c, .pix-x { aspect-ratio: 1; border-radius: 4px; background: var(--shade2); }
.pix-x { background: transparent; }
.pix-c.fut { background: var(--shade); }
.pix-c.tdy { box-shadow: 0 0 0 2px var(--paper), 0 0 0 3.5px var(--acc-dk); }
.pix-c:hover { transform: scale(1.25); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px; font-size: 12px; color: var(--txt2); }
.legend span { display: flex; align-items: center; gap: 5px; }
.legend i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
.legend i.none { background: var(--shade2); }
.goals { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(270px, 100%), 1fr)); gap: 14px; }
.goal { border: 1px solid var(--line2); border-radius: 16px; padding: 12px 14px; }
.goal-h { display: flex; align-items: center; gap: 12px; }
.goal-h > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.goal-h b { font: 600 16px var(--serif); }
.goal-m { font-size: 12px; color: var(--txt2); }
.goal-why { font-size: 13px; color: var(--txt2); font-style: italic; margin: 8px 0 4px; }
.goal .addrow { background: transparent; padding-left: 2px; }
.pring .track { fill: none; stroke: var(--shade2); }
.pring .prog { fill: none; stroke: var(--c, var(--acc-dk)); stroke-linecap: round; }
.pring text { font: 600 12px var(--sans); fill: var(--ink); text-anchor: middle; }
.vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.vtile { position: relative; margin: 0; }
.vtile img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; display: block; }
.vtile figcaption { font-size: 12px; color: var(--txt2); margin-top: 4px; }
.vdel { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 50%; background: rgb(255 255 255 / .9); display: grid; place-items: center; opacity: 0; }
.vtile:hover .vdel { opacity: 1; }
@media (hover: none) { .vdel { opacity: 1; } }
.vadd { aspect-ratio: 1; border-radius: 12px; border: 1.5px dashed var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--txt3); font-size: 12px; cursor: pointer; }
.vadd:hover { border-color: var(--acc-dk); color: var(--acc-dk); }

/* habits */
.hgrid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(260px, 1fr); gap: 18px; align-items: start; }
.hc-h { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.hc-h h3 { margin: 0; font: 600 17px var(--serif); flex: 1; min-width: 0; }
.hc-h .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--c); }
.hc-h .pct { font: 600 14px var(--sans); color: var(--c); min-width: 40px; text-align: right; }
.hdays { display: grid; grid-template-columns: repeat(auto-fill, minmax(34px, 1fr)); gap: 5px; margin-bottom: 8px; }
.hd { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 42px; border-radius: 10px; background: var(--shade); font: 600 12.5px/1.1 var(--sans); color: var(--ink); }
.hd small { font: 500 9px var(--sans); color: var(--txt3); }
.hd:hover:not(:disabled) { background: color-mix(in srgb, var(--c) 18%, var(--paper)); }
.hd.on { background: var(--c); color: #fff; } .hd.on small { color: rgb(255 255 255 / .8); }
.hd.off:not(.on) { opacity: .4; }
.hd:disabled { opacity: .35; cursor: default; }
.hd.tdy:not(.on) { box-shadow: inset 0 0 0 2px var(--c); }
.hbars { display: flex; flex-direction: column; gap: 10px; }
.hb { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; font-size: 13px; }
.hb-l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-v { font-weight: 600; font-variant-numeric: tabular-nums; } .hb-v small { color: var(--txt3); font-weight: 400; }
.hb-v.over { color: #C0584A; }
.hb > i { grid-column: 1 / -1; height: 8px; border-radius: 4px; background: var(--shade2); overflow: hidden; }
.hb > i b { display: block; height: 100%; border-radius: 4px; background: var(--acc-dk); }

/* journal */
.jgrid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 18px; align-items: start; }
.jentry { display: block; }
.jentry:hover { box-shadow: 0 0 0 1.5px var(--acc), 0 8px 26px var(--shadow-c); }
.jentry header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.jentry header b { font: 600 17px var(--serif); display: block; }
.jentry header small { color: var(--txt3); font-size: 11.5px; }
.jmood { display: grid; }
.jf1 { margin: 4px 0; font-size: 14px; }
.jf1 em, .jg li svg { font-style: normal; font: 500 10.5px var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--txt2); margin-right: 6px; }
.jg { list-style: none; padding: 0; margin: 6px 0; display: flex; flex-direction: column; gap: 3px; font-size: 14px; }
.jg li { display: flex; align-items: center; gap: 6px; }
.jg li svg { color: var(--acc); margin: 0; }
.jn { margin: 8px 0 0; font-size: 14px; color: var(--txt2); white-space: pre-line; display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.prompt { font: italic 600 19px/1.35 var(--serif); margin: 0 0 8px; color: var(--acc-dk); }

/* budget */
.bgrid { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(280px, 1fr) minmax(280px, 1fr); gap: 18px; align-items: start; }
.txform { display: flex; flex-direction: column; gap: 10px; }
.txform .seg { align-self: flex-start; }
.txrow { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.txrow select.in { border: 0; border-bottom: 1px solid var(--line2); background: transparent; }
.txday { font: 500 11px var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--txt3); margin: 12px 0 4px; }
.txday:first-child { margin-top: 0; }
.txi { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 8px 4px; border-radius: 10px; }
.txi:hover { background: var(--shade); }
.txi > i { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.txi span { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.txi span b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.txi span small { font-size: 11.5px; color: var(--txt3); }
.txi em { font-style: normal; font-weight: 600; font-variant-numeric: tabular-nums; }
.dbar { width: 100%; height: 90px; display: block; }
.dbar rect { fill: color-mix(in srgb, var(--acc) 75%, var(--paper)); } .dbar rect.cur { fill: var(--acc-dk); }
.dbar-l { display: flex; justify-content: space-between; font-size: 11px; color: var(--txt3); }
.sgoal { display: flex; align-items: center; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line2); }
.sgoal .tt { flex: 1; }
.bgrid .chk-row .tt { text-align: left; display: flex; flex-direction: column; }
.bgrid .chk-row .tt small { font-size: 11.5px; color: var(--txt3); }

/* collections */
.csecs { display: flex; flex-direction: column; gap: 22px; }
.csec header { display: flex; align-items: baseline; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.csec h2 { margin: 0; font: 600 21px var(--serif); }
.csec header span { color: var(--txt2); font-size: 13px; }
.ctiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(210px, 100%), 1fr)); gap: 10px; }
.ctile { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 8px; background: var(--paper); border-radius: 14px; padding: 12px 14px; box-shadow: 0 1px 2px var(--shadow-c); }
.ctile:hover { box-shadow: 0 0 0 1.5px var(--acc), 0 6px 18px var(--shadow-c); }
.ctile b { font-weight: 500; } .ctile small { grid-row: 2; font-size: 12px; color: var(--txt3); } .ctile > svg { grid-row: 1 / 3; grid-column: 2; color: var(--txt3); }
.ctile[hidden] { display: none; }
.eyebrow a { color: var(--acc-dk); }
.csum { margin-bottom: 14px; max-width: 520px; }
.warnnote { margin-bottom: 12px; color: #A0574A; }
.clist { display: flex; flex-direction: column; gap: 6px; }
.clist.jgrid2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 10px; }
.clist-card .addrow { margin: 0 0 12px; }
.citem { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--line2); background: var(--paper); }
.citem:hover { border-color: var(--line); }
.citem .tt { text-align: left; }
.citem .tt small { flex-wrap: wrap; } .citem .tt small i { color: var(--txt3); margin: 0 2px; font-style: normal; }
.citem .tt p { margin: 4px 0 0; font-size: 13px; color: var(--txt2); white-space: pre-line; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.citem.jr { align-items: flex-start; padding: 12px 14px; }
.citem.jr .tt span { font: 600 16px var(--serif); white-space: normal; }
.citem.done .tt span { text-decoration: line-through; color: var(--txt3); }
.citem.prog { flex-wrap: wrap; }
.citem.prog .tt { flex: 1 1 200px; }
.pbar { flex: 1 1 100%; order: 3; height: 10px; border-radius: 5px; background: var(--shade2); overflow: hidden; }
.pbar b { display: block; height: 100%; background: var(--acc-dk); border-radius: 5px; }
.cthumb { width: 54px; height: 54px; object-fit: cover; border-radius: 10px; flex: none; }
.stars { display: inline-flex; gap: 1px; } .stars i { color: var(--line); display: grid; } .stars i.on { color: var(--acc-dk); } .stars i.on svg { fill: currentColor; }
.url { color: var(--acc-dk); }
.cgroups { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: 12px; align-items: start; }
.cgroup { background: var(--shade); border-radius: 14px; padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.cgroup h3 { margin: 0 0 2px 4px; font: 600 14px var(--sans); display: flex; justify-content: space-between; }
.cform label.full, .cform .full { grid-column: 1 / -1; }
.cprev { width: 120px; height: 90px; object-fit: cover; border-radius: 10px; }
.chal-top { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.chal-top > div { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 6px; }
.chal-top b { font: 600 18px var(--serif); }
.chal { display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 6px; }
.chal.env { grid-template-columns: repeat(auto-fill, minmax(54px, 1fr)); }
.chal button { height: 46px; border-radius: 12px; background: var(--shade); font: 600 13px var(--sans); color: var(--txt2); }
.chal button:hover { background: var(--band); }
.chal button.on { background: var(--acc-dk); color: var(--on-acc); }
.lchart { width: 100%; height: auto; display: block; }
.lchart line { stroke: var(--line2); }
.lchart .ln { fill: none; stroke: var(--acc-dk); stroke-width: 2.2; stroke-linejoin: round; }
.lchart .area { fill: color-mix(in srgb, var(--acc) 22%, transparent); }
.lchart circle { fill: var(--paper); stroke: var(--acc-dk); stroke-width: 2; }
.lchart .ax { font: 500 11px var(--sans); fill: var(--txt3); text-anchor: end; } .lchart .ax.s { text-anchor: start; }

@media (max-width: 1280px) {
  .bgrid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .bgrid > .col:last-child { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
  .mgrid { grid-template-columns: minmax(0, 1fr) 260px; }
}
@media (max-width: 1080px) { .mgrid, .ygrid, .hgrid, .jgrid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 900px) {
  .bgrid, .bgrid > .col:last-child { grid-template-columns: minmax(0, 1fr); display: grid; }
  .mbody { grid-auto-rows: minmax(58px, auto); gap: 4px; }
  .mcell { min-height: 58px; padding: 4px; align-items: center; }
  .mcell .evchip, .mcell .task.mt, .mc-more, .mc-add, .mcell .drop-line { display: none; }
  .mc-dots { display: flex; }
  .mc-d::after { content: ""; position: absolute; inset: 0; }
  .mhead { gap: 4px; } .mhead span { font-size: 10px; letter-spacing: .02em; }
  .phead-r .search { flex: 1; min-width: 0; }
}
@media (max-width: 520px) { .txrow { grid-template-columns: 1fr; } .kpis.two { grid-template-columns: 1fr 1fr; } }


/* ======================================================================== v2.1: menu groups, pins, banner, help, dark, print */
.side-g { margin-top: 10px; display: flex; flex-direction: column; }
.side-l { display: flex; align-items: center; gap: 6px; padding: 4px 12px 4px; font: 600 10.5px var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--txt3); }
a.side-l { border-radius: 10px; }
a.side-l span { margin-left: auto; font-weight: 500; letter-spacing: .02em; text-transform: none; font-size: 11.5px; color: var(--acc-dk); }
a.side-l:hover { background: color-mix(in srgb, var(--paper) 55%, transparent); }
a.side-l.on { color: var(--ink); background: var(--paper); }
.side nav.sub a { padding: 6px 12px; gap: 10px; font-size: 13px; border-radius: 10px; min-width: 0; }
.side nav.sub a i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.side nav.sub a i.pin { border-radius: 3px; transform: rotate(45deg); width: 7px; height: 7px; }
.side nav.sub a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; }
.side-f a.brandl { padding: 6px 12px 0; flex-basis: 100%; }
.side-f { flex-direction: row; flex-wrap: wrap; }
.side-f a[data-nav] { flex: 1; gap: 8px; padding: 8px 10px; font-size: 13.5px; }
.side nav.sub.two { display: grid; grid-template-columns: 1fr 1fr; gap: 1px 2px; }
.side nav.sub.two a { padding: 6px 4px 6px 10px; gap: 7px; font-size: 12.5px; }
.cdot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: none; }
.secnav { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 10px; margin-bottom: 8px; scrollbar-width: none; }
.secnav::-webkit-scrollbar { display: none; }
.secnav a { display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; border-radius: 99px; background: var(--paper); font-weight: 500; font-size: 13px; white-space: nowrap; box-shadow: 0 1px 2px var(--shadow-c); }
.secnav a:hover { box-shadow: 0 0 0 1.5px var(--acc); }
.secnav a.on { background: var(--ink); color: var(--paper); }
.csec h2 a { display: inline-flex; align-items: center; gap: 10px; }
.csec h2 a:hover { color: var(--acc-dk); }
.csec h2 .cdot { width: 10px; height: 10px; }
.sec-tag { margin: 0 0 14px; color: var(--txt2); font-size: 13px; padding-left: 12px; border-left: 3px solid var(--c); }
.sec-tag svg { vertical-align: -1px; }
.ctiles.big .ctile { padding: 16px 16px; }
.ctile b { display: flex; align-items: center; gap: 6px; }
.ctile .pinned { color: var(--acc-dk); display: grid; }
.pinbtn svg { color: var(--txt3); }
.pinbtn.on { background: color-mix(in srgb, var(--acc) 22%, var(--paper)); border-color: transparent; }
.pinbtn.on svg { color: var(--acc-dk); fill: var(--acc-dk); }
.pins { display: flex; gap: 6px; flex-wrap: wrap; margin: -4px 0 14px; }
.pinchip { background: var(--paper); color: var(--ink); padding: 6px 12px; font-size: 12.5px; box-shadow: 0 1px 2px var(--shadow-c); gap: 7px; }
.pinchip:hover { box-shadow: 0 0 0 1.5px var(--acc); }
.pinchip.all { background: transparent; box-shadow: none; color: var(--txt2); }
.banner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: color-mix(in srgb, var(--acc) 20%, var(--paper)); border-radius: 16px; padding: 12px 14px; margin: 0 0 14px; box-shadow: 0 0 0 1px color-mix(in srgb, var(--acc) 40%, transparent); }
.banner > svg { color: var(--acc-dk); }
.banner > div { flex: 1; min-width: 200px; display: flex; flex-direction: column; }
.banner span { color: var(--txt2); font-size: 12.5px; }
.store { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0 8px; }
.store div { background: var(--shade); border-radius: 12px; padding: 9px 12px; }
.store b { display: block; font: 600 16px var(--serif); }
.store span { font-size: 11.5px; color: var(--txt2); }
.meter { height: 6px; border-radius: 6px; background: var(--shade); overflow: hidden; margin-bottom: 12px; }
.meter i { display: block; height: 100%; min-width: 3px; background: var(--acc-dk); border-radius: 6px; }
.mgridm { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 4px 0 16px; }
.mtile { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 4px 12px; border-radius: 14px; background: var(--shade); font: 500 12px var(--sans); }
.mtile svg { color: var(--acc-dk); }
.mtile:hover { background: var(--shade2); }
.ed .side-l { padding-left: 0; margin: 4px 0 8px; }
.ed .chips { margin-bottom: 14px; }
.ed .chips .chip { padding: 7px 12px; font-size: 12.5px; color: var(--ink); gap: 7px; }
.blk .rp { position: absolute; right: 6px; bottom: 4px; color: var(--txt3); display: grid; }
.blk.short .rp, .blk .bck ~ .rp { display: none; }
.tt small svg { color: var(--txt3); }
.hgrid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.help p { margin: 0 0 10px; color: var(--txt2); line-height: 1.6; }
.help p b, .help li b { color: var(--ink); font-weight: 600; }
.help ul { margin: 0 0 10px; padding-left: 18px; color: var(--txt2); line-height: 1.6; }
.help li { margin-bottom: 4px; }
.help li small { color: var(--txt3); }
.help > :last-child { margin-bottom: 0; }
.help svg { vertical-align: -1px; }
@media (max-width: 900px) { .hgrid2 { grid-template-columns: minmax(0, 1fr); } .pins { flex-wrap: nowrap; overflow-x: auto; margin: -4px -14px 14px; padding: 2px 14px 4px; scrollbar-width: none; } .pins::-webkit-scrollbar { display: none; } .pinchip { white-space: nowrap; flex: none; } .store { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 520px) { .mgridm { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; } .mtile { font-size: 11px; padding: 12px 2px 10px; } .store b { font-size: 14px; } .banner .btn { flex: 1; } }

/* ---------------- dark mode */
:root.dark { --on-acc: #19161F; }
:root.dark .quick-btn kbd { background: rgb(0 0 0 / .12); }
:root.dark #modal { background: rgb(0 0 0 / .55); }
:root.dark .sheet { box-shadow: 0 24px 70px rgb(0 0 0 / .6), 0 0 0 1px var(--line); }
:root.dark .card, :root.dark .ctile, :root.dark .secnav a, :root.dark .pinchip { box-shadow: 0 0 0 1px var(--line2), 0 8px 24px var(--shadow-c); }
:root.dark .pos { color: #72C9A0 !important; } :root.dark .neg, :root.dark .hb-v.over { color: #EE8D7F !important; }
:root.dark .btn.danger, :root.dark .chip.hi, :root.dark .tt small em, :root.dark .flag { color: #EE8D7F; }
:root.dark .warnnote { color: #E3A595; }
:root.dark .vdel { background: rgb(28 26 34 / .9); }
:root.dark .thm { color: #333; }
:root.dark img { opacity: .94; }
:root.dark input[type="date"], :root.dark input[type="time"], :root.dark select { color-scheme: dark; }
:root.dark .evchip { background: color-mix(in srgb, var(--c) 26%, var(--paper)); }

/* ---------------- printing */
#print { display: none; }
@media print {
  :root { color-scheme: light !important; }
  html, body { background: #fff !important; }
  body > *:not(#print) { display: none !important; }
  #print { display: block; color: #2B2533; font: 400 10pt/1.35 var(--sans); -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
.p-page { display: flex; flex-direction: column; min-height: 100%; }
.p-h { display: flex; justify-content: space-between; align-items: flex-end; border-bottom: 2px solid var(--print-acc, #7E6AA6); padding-bottom: 6pt; margin-bottom: 10pt; }
.p-h small { font: 600 8pt var(--sans); letter-spacing: .14em; text-transform: uppercase; color: #6F6880; }
.p-h h1 { font: 600 22pt/1.1 var(--serif); margin: 2pt 0 0; color: #2B2533; }
.p-brand { font: 600 12pt var(--serif); color: #2B2533; }
.p-brand em { font-weight: 400; color: var(--print-acc, #7E6AA6); }
.p-cols { display: grid; grid-template-columns: 1.15fr 1fr; gap: 16pt; }
#print h2 { font: 600 8pt var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--print-acc, #7E6AA6); margin: 10pt 0 4pt; }
#print section > h2:first-child { margin-top: 0; }
.p-hr { display: grid; grid-template-columns: 38pt 1fr; border-bottom: .6pt solid #D9D4E2; min-height: 34pt; }
.p-hr span { font: 500 7.5pt var(--sans); color: #8A8399; padding-top: 3pt; }
.p-hr div { padding: 3pt 0; font-size: 9pt; }
.p-hr b { font-weight: 600; color: var(--print-acc, #7E6AA6); }
.p-ln { border-bottom: .6pt solid #D9D4E2; height: 22pt; }
.p-ln.t { height: auto; min-height: 20pt; padding: 4pt 0 2pt; font-size: 9.5pt; }
.p-list { list-style: none; margin: 0; padding: 0; }
.p-list li { display: flex; align-items: flex-end; gap: 7pt; min-height: 22pt; border-bottom: .6pt solid #D9D4E2; padding: 3pt 0 2pt; font-size: 9.5pt; }
.p-list li .p-ln { border: 0; height: auto; flex: 1; }
.p-list.two { display: grid; grid-template-columns: 1fr 1fr; column-gap: 12pt; }
.p-list .dn { text-decoration: line-through; color: #8A8399; }
.p-box { width: 9pt; height: 9pt; border: 1pt solid #8A8399; border-radius: 2.5pt; flex: none; display: grid; place-items: center; font: 600 7pt/1 var(--sans); font-style: normal; color: var(--print-acc, #7E6AA6); margin-bottom: 2pt; }
.p-water { display: flex; gap: 6pt; }
.p-water i { width: 14pt; height: 18pt; border: 1pt solid #A9A2B8; border-radius: 3pt 3pt 6pt 6pt; }
.p-water i.on { background: color-mix(in srgb, var(--print-acc, #7E6AA6) 35%, #fff); }
.p-notes { margin: 4pt 0; font-size: 9.5pt; white-space: pre-wrap; }
.p-week { display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: 1fr 1fr; gap: 8pt; flex: 1; }
.p-day { border: .8pt solid #CFC9D9; border-radius: 6pt; padding: 6pt 8pt; overflow: hidden; break-inside: avoid; }
.p-day h3 { display: flex; justify-content: space-between; align-items: baseline; margin: 0 0 4pt; padding-bottom: 3pt; border-bottom: 1.4pt solid var(--print-acc, #7E6AA6); font: 600 10pt var(--serif); color: #2B2533; }
.p-day h3 b { font: 500 8pt var(--sans); color: #6F6880; }
.p-day h4 { font: 600 7.5pt var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--print-acc, #7E6AA6); margin: 6pt 0 0; }
.p-ev { font-size: 8.5pt; padding: 2pt 0; border-bottom: .6pt solid #E3DEEA; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-ev b { color: var(--print-acc, #7E6AA6); font-weight: 600; margin-right: 3pt; }
.p-day .p-list li { min-height: 16pt; font-size: 8.5pt; }
.p-day .p-ln { height: 16pt; }
#print footer { margin-top: 10pt; text-align: center; font: 500 7pt var(--sans); letter-spacing: .1em; color: #A39DB0; }
.srow + .themes { margin-top: 12px; }

/* 2.1.1: recovery screen + toast button */
.recover { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.recover .card { width: 100%; max-width: 460px; padding: 26px 24px 22px; }
.recover h2 { font: 600 24px/1.2 var(--serif); margin: 0 0 10px; }
.recover p { margin: 0 0 18px; color: var(--txt2); }
.recover .note { margin: 0; }
.rc-btns { display: grid; gap: 10px; margin-bottom: 16px; }
#toast .tact { margin-left: 12px; padding: 4px 2px; background: none; border: 0; color: inherit; font: 600 13.5px var(--sans); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
#toast.show .tact { pointer-events: auto; }
