/* Gather — Heart Religion Digital Library
   Theme variables; each theme overrides these on <html data-theme="...">. */

:root{
  --bg:#f6f1e7;
  --surface:#fffdf7;
  --ink:#2e2c26;
  --muted:#6d675c;
  --primary:#1d3b2e;
  --primary-soft:rgba(29,59,46,.08);
  --accent:#AB8B58;
  --border:#ddd3bd;
  --danger:#8c3b2e;
  --mustdo:#b07d2b; /* warm amber family for must-do coordination */
  --serif:"Cormorant Garamond",Georgia,"Times New Roman",serif;
  --sans:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  --script:"Pinyon Script","Snell Roundhand",cursive;
  --radius:14px;
}

html[data-theme="sage"]{
  --bg:#edf0e8; --surface:#fbfcf8; --ink:#31382f; --muted:#6a7263;
  --primary:#46594b; --primary-soft:rgba(70,89,75,.09);
  --accent:#AB8B58; --border:#cfd4c6; --danger:#8c3b2e;
}
html[data-theme="clay"]{
  --bg:#f5ebe1; --surface:#fffaf3; --ink:#382d25; --muted:#75655a;
  --primary:#74452f; --primary-soft:rgba(116,69,47,.09);
  --accent:#AB8B58; --border:#ddcbb8; --danger:#8c3b2e;
}
html[data-theme="slate"]{
  --bg:#edf0f2; --surface:#fafbfc; --ink:#2c333b; --muted:#666e77;
  --primary:#3a4a59; --primary-soft:rgba(58,74,89,.09);
  --accent:#AB8B58; --border:#cfd6dc; --danger:#8c3b2e;
}
html[data-theme="plum"]{
  --bg:#f2ebee; --surface:#fdf8fa; --ink:#352b33; --muted:#6f636b;
  --primary:#573a50; --primary-soft:rgba(87,58,80,.09);
  --accent:#AB8B58; --border:#d9c9d2; --danger:#8c3b2e;
}
html[data-theme="sand"]{
  --bg:#f3ebda; --surface:#fdf8ec; --ink:#38312a; --muted:#6f6455;
  --primary:#6a573a; --primary-soft:rgba(106,87,58,.10);
  --accent:#AB8B58; --border:#d9cba8; --danger:#8c3b2e;
}
html[data-theme="moss"]{
  --bg:#eef0e3; --surface:#fafbf3; --ink:#2f3324; --muted:#6b6f5c;
  --primary:#3d4a2c; --primary-soft:rgba(61,74,44,.09);
  --accent:#AB8B58; --border:#d3d6c2; --danger:#8c3b2e;
}
html[data-theme="spruce"]{
  --bg:#e9efec; --surface:#f7faf8; --ink:#2a332f; --muted:#64716c;
  --primary:#2c4a45; --primary-soft:rgba(44,74,69,.09);
  --accent:#AB8B58; --border:#c9d4cf; --danger:#8c3b2e;
}
html[data-theme="rosewood"]{
  --bg:#f4e9e7; --surface:#faf3f1; --ink:#362b2b; --muted:#6f6262;
  --primary:#6b4247; --primary-soft:rgba(107,66,71,.09);
  --accent:#AB8B58; --border:#dcc9c6; --danger:#8c3b2e;
}
html[data-theme="ochre"]{
  --bg:#f4ecdc; --surface:#faf5e9; --ink:#38312a; --muted:#6f6455;
  --primary:#7a5a28; --primary-soft:rgba(122,90,40,.10);
  --accent:#AB8B58; --border:#dccfae; --danger:#8c3b2e;
}
html[data-theme="linen"]{
  --bg:#f1ece1; --surface:#faf7ef; --ink:#33302a; --muted:#6e675c;
  --primary:#5c564a; --primary-soft:rgba(92,86,74,.09);
  --accent:#AB8B58; --border:#d8d0bd; --danger:#8c3b2e;
}
html[data-theme="dusk"]{
  --bg:#eceef1; --surface:#f7f8fa; --ink:#2c2f38; --muted:#676c78;
  --primary:#454b5e; --primary-soft:rgba(69,75,94,.09);
  --accent:#AB8B58; --border:#cfd4da; --danger:#8c3b2e;
}

html[data-theme="rosegold"]{
  --bg:#F7E9E4; --surface:#FFFBF9; --ink:#2A2C29; --muted:#7D766B;
  --primary:#A8606B; --primary-soft:#F0D5CD;
  --accent:#C9967F; --border:#EBD5D3; --danger:#8c3b2e;
}
html[data-theme="blush"]{
  --bg:#FAEDF0; --surface:#FFFBFC; --ink:#2A2C29; --muted:#7D766B;
  --primary:#B5586D; --primary-soft:#F5D9DF;
  --accent:color-mix(in srgb, #B5586D 50%, transparent); --border:#F0D8DD; --danger:#8c3b2e;
}
html[data-theme="peach"]{
  --bg:#FAEEE6; --surface:#FFFCF9; --ink:#2A2C29; --muted:#7D766B;
  --primary:#A95A38; --primary-soft:#F3DCCD;
  --accent:color-mix(in srgb, #A95A38 50%, transparent); --border:#EED9CD; --danger:#8c3b2e;
}
html[data-theme="champagne"]{
  --bg:#F7F0E1; --surface:#FFFDF8; --ink:#2A2C29; --muted:#7D766B;
  --primary:#8C6F3E; --primary-soft:#EEE0C3;
  --accent:color-mix(in srgb, #8C6F3E 50%, transparent); --border:#E8DDCA; --danger:#8c3b2e;
}
html[data-theme="sagemist"]{
  --bg:#ECF2E9; --surface:#FBFDFA; --ink:#2A2C29; --muted:#7D766B;
  --primary:#55754F; --primary-soft:#D8E5D3;
  --accent:color-mix(in srgb, #55754F 50%, transparent); --border:#D6E0D3; --danger:#8c3b2e;
}
html[data-theme="seafoam"]{
  --bg:#E8F3F0; --surface:#FAFDFC; --ink:#2A2C29; --muted:#7D766B;
  --primary:#3F7F72; --primary-soft:#CFE6E0;
  --accent:color-mix(in srgb, #3F7F72 50%, transparent); --border:#D0E2DE; --danger:#8c3b2e;
}
html[data-theme="sky"]{
  --bg:#EAF1F6; --surface:#FBFDFE; --ink:#2A2C29; --muted:#7D766B;
  --primary:#4A7494; --primary-soft:#D3E2EC;
  --accent:color-mix(in srgb, #4A7494 50%, transparent); --border:#D3DFE8; --danger:#8c3b2e;
}
html[data-theme="periwinkle"]{
  --bg:#ECEEF8; --surface:#FBFBFE; --ink:#2A2C29; --muted:#7D766B;
  --primary:#5A66A8; --primary-soft:#D8DCF0;
  --accent:color-mix(in srgb, #5A66A8 50%, transparent); --border:#D7DAEC; --danger:#8c3b2e;
}
html[data-theme="lavender"]{
  --bg:#F0ECF6; --surface:#FCFBFE; --ink:#2A2C29; --muted:#7D766B;
  --primary:#75609A; --primary-soft:#E0D8EE;
  --accent:color-mix(in srgb, #75609A 50%, transparent); --border:#DED8E9; --danger:#8c3b2e;
}
html[data-theme="lilac"]{
  --bg:#F5ECF4; --surface:#FEFBFE; --ink:#2A2C29; --muted:#7D766B;
  --primary:#8F5C8D; --primary-soft:#E9D6E8;
  --accent:color-mix(in srgb, #8F5C8D 50%, transparent); --border:#E6D7E5; --danger:#8c3b2e;
}
html[data-theme="dustyrose"]{
  --bg:#F7EAEA; --surface:#FFFBFB; --ink:#2A2C29; --muted:#7D766B;
  --primary:#A05A5A; --primary-soft:#EDD3D3;
  --accent:color-mix(in srgb, #A05A5A 50%, transparent); --border:#EAD5D5; --danger:#8c3b2e;
}
html[data-theme="pearl"]{
  --bg:#F2F0EC; --surface:#FDFCFB; --ink:#2A2C29; --muted:#7D766B;
  --primary:#6E675F; --primary-soft:#E4E0DA;
  --accent:color-mix(in srgb, #6E675F 50%, transparent); --border:#DFDCD8; --danger:#8c3b2e;
}

/* Text-size setting scales every rem-based measure. */
html[data-fontsize="small"]{font-size:14px;}
html[data-fontsize="medium"]{font-size:16px;}
html[data-fontsize="large"]{font-size:19px;}

*{box-sizing:border-box; margin:0; padding:0;}
html{-webkit-text-size-adjust:100%;}
body{
  background:var(--bg); color:var(--ink);
  font-family:var(--sans); line-height:1.55;
  min-height:100vh; padding-bottom:env(safe-area-inset-bottom);
  transition:background .25s ease, color .25s ease;
  overflow-x:clip;
}
button{font-family:var(--sans);}
[hidden]{display:none !important;}

/* Top bar: no header bar — open top with a journal dateline and a floating gear */
.topbar{
  max-width:720px; margin:0 auto;
  padding:calc(10px + env(safe-area-inset-top)) 16px 4px;
  display:flex; align-items:center; justify-content:space-between;
}
.dateline{
  font-family:var(--sans); font-style:normal; font-size:11px;
  color:var(--muted); letter-spacing:1.5px; text-transform:uppercase; font-weight:600;
}
.icon-btn{
  background:none; border:none;
  width:44px; height:44px; min-width:44px; min-height:44px; border-radius:50%;
  cursor:pointer; color:var(--muted);
  display:flex; align-items:center; justify-content:center; flex:none;
  padding:0;
}
.icon-btn:active{transform:scale(.92);}

/* Settings panel — a proper full-screen sheet when open; the page behind is scroll-locked */
.settings-panel{
  max-width:720px; margin:12px auto 0; background:var(--surface); color:var(--ink);
  border:1px solid var(--border); border-radius:var(--radius);
  padding:18px;
}
.settings-panel:not([hidden]){
  position:fixed; inset:0; z-index:80; max-width:none; margin:0;
  border:none; border-radius:0; background:var(--bg);
  overflow-y:auto; -webkit-overflow-scrolling:touch; overscroll-behavior:contain;
  padding:calc(14px + env(safe-area-inset-top)) 18px calc(30px + env(safe-area-inset-bottom));
}
.settings-panel:not([hidden]) > *{max-width:720px; margin-left:auto; margin-right:auto;}
/* scroll lock while the settings sheet is open */
html.locked{overflow:hidden; height:100%;}
html.locked body{position:fixed; left:0; right:0; overflow:hidden;}
.settings-panel h3{font-family:var(--serif); font-size:1.3rem; color:var(--ink); margin-bottom:4px;}
.set-section{padding:12px 0; border-top:1px solid var(--border);}
.set-section:first-of-type{border-top:none;}
.set-section h4{font-size:.8rem; letter-spacing:1.5px; text-transform:uppercase; color:var(--muted); margin-bottom:10px; font-weight:600;}
/* Settings accordion: section headers are dropdown buttons, collapsed by default */
.set-dropbtn{width:100%; display:flex; align-items:center; justify-content:space-between; gap:10px; border:none; background:transparent; padding:4px 0; cursor:pointer; font-family:var(--sans);}
.set-droplabel{font-size:.8rem; letter-spacing:1.5px; text-transform:uppercase; color:var(--muted); font-weight:600;}
.set-dropbtn .set-chev{color:var(--muted); transition:transform .3s ease; flex:none;}
.set-dropbtn[aria-expanded="true"] .set-chev{transform:rotate(90deg);}
.set-body{padding-top:2px;}
.set-head{display:flex; align-items:center; justify-content:space-between; margin-bottom:4px;}
.set-head h3{margin-bottom:0;}
.set-close{min-height:44px;}
/* ---- Theme picker: current row + dropdown groups ---- */
.theme-current{
  display:flex; align-items:center; gap:12px;
  background:var(--surface); border:0.5px solid var(--border); border-radius:14px;
  padding:12px 14px; margin-bottom:8px;
}
.theme-current-sw{
  width:28px; height:28px; border-radius:50%; flex:none;
  border:0.5px solid rgba(0,0,0,.15);
}
.theme-current-name{font-size:15px; color:var(--ink); font-weight:500; flex:1;}
.theme-default-tag{font-size:13px; color:var(--muted);}
.theme-group{border-bottom:0.5px solid var(--border);}
.theme-group:last-child{border-bottom:none;}
.theme-dropbtn{
  width:100%; height:50px; min-height:50px;
  display:flex; align-items:center; gap:8px;
  background:none; border:none; cursor:pointer; padding:0 4px;
  font-size:15px; color:var(--ink); text-align:left;
}
.theme-droplabel{font-weight:500;}
.theme-dropmeta{font-size:13px; color:var(--muted); margin-left:auto;}
.theme-chev{color:var(--muted); transition:transform .3s ease; flex:none;}
.theme-dropbtn.open .theme-chev{transform:rotate(90deg);}
.theme-dropwrap{max-height:0; overflow:hidden; transition:max-height .35s ease;}
.theme-dropwrap.open{max-height:320px;}
.theme-swatches{
  display:grid; grid-template-columns:repeat(6, 1fr); gap:10px;
  padding:6px 4px 16px; justify-items:center;
}
.theme-sw{
  width:38px; height:38px; border-radius:50%; cursor:pointer; padding:0; flex:none;
  border:0.5px solid rgba(0,0,0,.15);
}
.theme-sw[aria-checked="true"]{outline:2px solid var(--accent); outline-offset:3px;}
.seg{display:flex; border:none; border-radius:12px; overflow:hidden; background:var(--surface);}
.seg button{
  flex:1; background:var(--bg); border:none; color:var(--ink); cursor:pointer;
  padding:12px 4px; font-size:.95rem; min-height:48px;
}
.seg button + button{border-left:1px solid var(--border);}
.seg button[aria-pressed="true"]{
  background:var(--primary-soft);
  color:var(--primary) !important;
  box-shadow:none;
}
.seg button[aria-pressed="true"] span{color:var(--primary) !important;}
.name-row{display:flex; gap:10px;}
.name-row input{
  flex:1; font-size:1rem; padding:12px 14px; min-width:0;
  border:none; border-radius:14px; background:var(--surface); color:var(--ink);
  min-height:48px;
}
.name-row input:focus{outline:2px solid var(--primary); outline-offset:2px;}
.mini-primary{
  background:var(--primary); color:#fff; border:none; border-radius:10px;
  padding:12px 20px; font-size:.95rem; cursor:pointer; flex:none; min-height:48px;
}
/* Grouped settings sections */
.set-label{font-size:.82rem; letter-spacing:.6px; color:var(--muted); margin:14px 0 8px; font-weight:600;}
.set-row{display:flex; align-items:center; justify-content:space-between; gap:14px; padding:12px 0;}
button.set-row{width:100%; background:none; border:none; font:inherit; cursor:pointer; text-align:left; color:inherit;}
.tour-row{border-bottom:1px solid var(--border); margin-bottom:4px;}
.tour-q{
  flex:none; width:28px; height:28px; border-radius:50%;
  border:1.5px solid var(--muted); color:var(--muted);
  display:inline-flex; align-items:center; justify-content:center;
  font-weight:700; font-size:.95rem;
}
.set-row + .set-row{border-top:1px solid var(--border);}
.set-row-text{min-width:0; flex:1;}
.set-row-title{display:block; font-size:1rem; font-weight:600; color:var(--ink);}
.set-row-desc{display:block; font-size:.85rem; color:var(--muted); margin-top:3px; line-height:1.5;}
.trigger-add{display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin-top:12px;}
.trigger-add input{flex:1 1 120px; min-width:0; font-size:1rem; padding:12px 14px; border:none; border-radius:14px; background:var(--surface); color:var(--ink); min-height:48px;}
.trigger-add input:focus{outline:2px solid var(--primary); outline-offset:1px;}
.trigger-add .bdd{flex:none; max-width:160px;}
.seg-narrow{flex:none; width:220px;}
/* Toggle switch */
.toggle{
  position:relative; flex:none; width:56px; height:32px; min-width:56px; min-height:32px;
  border-radius:999px; background:var(--border); border:none; cursor:pointer; padding:0;
  transition:background .2s ease;
}
.toggle::after{
  content:''; position:absolute; top:3px; left:3px; width:26px; height:26px; border-radius:50%;
  background:var(--surface); transition:left .2s ease;
}
.toggle[aria-checked="true"]{background:var(--primary);}
.toggle[aria-checked="true"]::after{left:27px;}
/* Your data */
.data-actions{display:flex; flex-direction:column; gap:10px; margin-bottom:10px;}
.data-btn{
  width:100%; background:var(--surface); border:none; border-radius:12px;
  padding:14px; font-size:1rem; color:var(--ink); cursor:pointer; min-height:52px; text-align:center;
}
.data-btn:active{background:var(--primary-soft);}
.data-btn.danger{color:var(--danger); border-color:var(--danger);}
.data-note{margin-bottom:10px;}
.privacy-note{
  font-size:.85rem; color:var(--muted); line-height:1.6;
  border-top:1px dashed var(--border); padding-top:12px;
}

/* Install hint */
.install-hint{
  max-width:720px; margin:12px auto 0; padding:12px 16px;
  background:var(--surface); border:1px solid var(--border); border-left:3px solid var(--accent);
  border-radius:10px; display:flex; gap:12px; align-items:center; justify-content:space-between;
  font-size:.9rem;
}
.install-hint p{flex:1;}
.share-glyph{font-size:1.05em;}

/* Layout */
main{max-width:720px; margin:0 auto; padding:16px 20px calc(120px + env(safe-area-inset-bottom));}
.card{
  background:transparent;
  border:none;
  box-shadow:none;
  padding:0;
  margin-bottom:32px;
}
.card h2{font-family:var(--serif); font-size:1.45rem; font-weight:600; color:var(--ink); margin-bottom:10px;}
.section-head{display:flex; align-items:baseline; justify-content:space-between; gap:12px; margin-bottom:6px;}
.section-head h2{margin-bottom:0;}
.hint{font-size:.88rem; color:var(--muted); margin-bottom:12px;}
.empty{
  font-family:var(--serif); font-size:1.08rem; font-style:italic; color:var(--muted);
  text-align:center; padding:24px 12px; line-height:1.6;
  background:transparent; border:none; box-shadow:none;
}
.ref{display:block; font-style:normal; font-size:.82rem; margin-top:6px; font-family:var(--sans);}
.smallcaps{font-variant:small-caps; letter-spacing:1px; font-style:normal;}
#dumpInput{
  flex:1; font-size:1.05rem; padding:14px 16px;
  border:none; border-radius:14px; background:var(--surface); color:var(--ink);
  min-width:0; min-height:48px;
}
#dumpInput:focus{outline:2px solid var(--primary); outline-offset:1px; border-color:var(--primary);}
.mic-btn{
  flex:none; width:54px; height:54px; border-radius:50%;
  background:var(--primary); color:#fff; border:none; cursor:pointer;
  display:flex; align-items:center; justify-content:center;
}
.mic-btn:active{transform:scale(.96);}
.mic-btn.listening{background:var(--danger); animation:pulse 1.4s ease-in-out infinite;}
@keyframes pulse{0%,100%{opacity:1;}50%{opacity:.65;}}
.mic-status{min-height:1.2em; font-size:.85rem; color:var(--muted);}

/* Chips */
.chips{display:flex; flex-wrap:wrap; gap:8px; margin-top:10px;}
.chip{
  border:1px solid var(--border); background:var(--bg); color:var(--ink);
  border-radius:999px; padding:10px 18px; font-size:.95rem; cursor:pointer;
  min-height:44px; display:inline-flex; align-items:center; gap:8px;
}
.chip:active{background:var(--primary-soft);}
.chip .cdot{width:12px; height:12px; border-radius:50%; flex:none; border:1px solid rgba(0,0,0,.12);}
.chip.sel{background:var(--primary-soft); box-shadow:none;}

/* Buckets */
.bucket{
  border:1px solid var(--border); border-left:5px solid var(--bcolor, var(--border));
  border-radius:10px; margin-bottom:12px; overflow:hidden; background:var(--surface);
}
.bucket-head{
  display:flex; align-items:center; justify-content:space-between;
  padding:12px 14px; background:var(--primary-soft); gap:8px;
}
.bucket-dot{width:16px; height:16px; border-radius:50%; background:var(--bcolor, var(--border)); flex:none; border:1px solid rgba(0,0,0,.12);}
.bucket-name{font-family:var(--serif); font-size:1.15rem; font-weight:600; color:var(--ink); overflow-wrap:anywhere;}
.mini-btn{
  background:none; border:none; color:var(--muted); font-size:.85rem; cursor:pointer;
  padding:10px 8px; min-width:44px; min-height:44px; border-radius:8px;
}
.mini-btn:active{background:rgba(0,0,0,.06);}
.mini-btn.danger{color:var(--danger);}
.bcolors{
  display:flex; align-items:center; gap:8px; flex-wrap:wrap;
  padding:10px 14px; border-top:1px dashed var(--border);
}
.bsw{
  width:36px; height:36px; border-radius:50%; border:1px solid rgba(0,0,0,.15);
  cursor:pointer; padding:0; min-width:30px; min-height:30px;
}
.bsw[aria-pressed="true"]{outline:2px solid var(--ink); outline-offset:2px;}
.item{
  display:flex; align-items:center; gap:8px; padding:12px 14px;
  border-top:1px solid var(--border);
}
.item.dragging{opacity:.5;}
.item-main{flex:1; min-width:0;}
.item-text{display:block; font-size:1rem; overflow-wrap:anywhere; cursor:pointer;}
.item-text:focus{outline:2px solid var(--primary); outline-offset:2px; border-radius:4px;}
.item-meta{display:flex; align-items:center; gap:5px; font-size:.78rem; color:var(--muted); margin-top:3px; line-height:1.4;}
.item-meta .must-flag{color:var(--accent); font-size:.85rem; flex:none;}
.pill-meta .must-flag{color:var(--accent); font-weight:700;}
/* Must-do highlight: soft pastel wash derived from the active theme, plus ‼️.
   Inset shadow overlays any existing card background (bucket tints kept). */
.trow.mustdo, .bucket-detail-list .item.mustdo, .pill.mustdo{
  box-shadow:inset 0 0 0 999px color-mix(in srgb, var(--primary) 12%, transparent);
}
.trow.mustdo{ border-radius:14px; }
.item-meta.must{color:var(--accent); font-weight:700;}
.item-meta .overdue{color:var(--danger); font-weight:600;}
.item.done .item-text{text-decoration:line-through; color:var(--muted);}
.item-actions{display:flex; gap:2px; flex:none;}
.act{
  border:1px solid var(--border); background:var(--bg); border-radius:8px;
  min-width:44px; min-height:44px; font-size:1.05rem; cursor:pointer; color:var(--ink);
  display:flex; align-items:center; justify-content:center;
}
.act.done-btn{color:var(--primary); border-color:var(--primary);}
.bucket .empty-note{padding:12px 14px; font-size:.88rem; color:var(--muted); font-style:italic; font-family:var(--serif); text-align:center;}

/* Today: standalone rows floating on the page background — no shared container */
.today-items-wrap{margin-bottom:16px;}
.today-items-wrap h2{
  font-family:var(--serif); font-size:1.45rem; font-weight:600; color:var(--ink);
  letter-spacing:.2px; margin-bottom:2px;
}
.today-items-wrap h2::after{
  content:''; display:block; width:36px; height:2px; border-radius:2px;
  background:var(--accent); opacity:.55; margin-top:7px;
}
/* ---- Today's items: quiet editorial rows + add sheet (fixed tokens, matches planner & edit sheet) ---- */
#tab-today .today-items-wrap{
  --tbg:transparent; --taccent:var(--primary); --tink:var(--ink); --tmuted:var(--muted); --thairline:color-mix(in srgb, var(--ink) 10%, transparent);
  background:transparent;
  padding:10px 0 6px;
  margin:4px 0 32px;
}
.today-head{display:flex; align-items:baseline; justify-content:space-between; gap:12px; margin-bottom:2px;}
#tab-today .today-items-wrap h2{
  font-family:var(--serif); font-size:22px; font-weight:600; color:var(--tink); margin:0;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
#tab-today .today-items-wrap h2::after{
  content:''; display:block; width:36px; height:2px; border-radius:2px;
  background:var(--accent); opacity:.55; margin-top:7px;
}
#tab-today .done-count{font-size:.8rem; color:var(--tmuted); font-style:normal; margin:0; white-space:nowrap;}
/* rows: simple, separated by a hairline — no containers */
.trow{
  display:flex; align-items:center; gap:12px;
  min-height:48px; padding:10px 2px;
  border:none; background:none; box-shadow:none;
}
.trow + .trow{border-top:0.5px solid var(--thairline);}
.tcheck{
  flex:none; width:22px; height:22px; border-radius:50%;
  border:1.5px solid var(--tmuted); background:none; cursor:pointer; padding:0;
  display:flex; align-items:center; justify-content:center;
}
.tcheck:disabled{cursor:default;}
.trow.done .tcheck{background:var(--taccent); border-color:var(--taccent);}
.tmain{flex:1; min-width:0; display:flex; flex-direction:column; gap:2px;}
.ttitle{
  font-size:14px; font-weight:500; color:var(--tink); line-height:1.35;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis; cursor:pointer;
}
.ttitle:focus{outline:2px solid var(--taccent); outline-offset:2px; border-radius:4px;}
.ttime{font-size:12px; color:var(--tmuted);}
.trow.done{opacity:.7;}
.trow.done .ttitle{text-decoration:line-through; color:var(--tmuted); cursor:default;}
.tbucket{
  flex:none; display:inline-flex; align-items:center; gap:6px;
  font-size:12px; color:var(--tmuted); white-space:nowrap;
  border:none; background:none; padding:4px 2px; margin:-4px -2px;
  font-family:var(--sans); cursor:pointer; text-align:left;
}
.tbucket:active{opacity:.6;}
.tbucket .cdot{width:8px; height:8px; border-radius:50%; border:1px solid rgba(0,0,0,.12);}
.tdots{
  flex:none; border:none; background:none; color:var(--tmuted); cursor:pointer;
  font-size:1.05rem; letter-spacing:1px; min-width:44px; min-height:44px; padding:0;
  display:flex; align-items:center; justify-content:center;
}
/* full-width blush add button */
.today-addbtn{
  display:flex; align-items:center; justify-content:center; gap:8px;
  width:calc(100% - 36px); height:50px; min-height:50px;
  margin:14px 18px 10px; padding:0 16px;
  border:none; border-radius:12px; background:var(--primary-soft); box-shadow:none;
  cursor:pointer; font-family:var(--sans);
  -webkit-tap-highlight-color:transparent;
}
#todayEmpty:not([hidden]) + .today-addbtn{margin-top:16px;}
.today-addbtn:active{filter:brightness(.96);}
.today-addcircle{
  flex:none; width:22px; height:22px; border-radius:50%;
  background:var(--primary); color:#fff;
  display:flex; align-items:center; justify-content:center;
  font-size:15px; font-weight:400; line-height:1;
  position:relative; top:-1px;
}
.today-addlabel{font-size:14px; font-weight:500; color:var(--primary);}
/* add item bottom sheet */
.add-sheet{
  position:fixed; left:0; right:0; bottom:0; z-index:50;
  background:var(--surface); border-radius:18px 18px 0 0; border:none; box-shadow:none;
  padding:8px 16px calc(18px + env(safe-area-inset-bottom));
  max-width:640px; margin:0 auto;
  max-height:92dvh; overflow-y:auto; -webkit-overflow-scrolling:touch;
}
.add-handle{display:block; width:40px; height:4px; border-radius:999px; background:#DCD6C6; margin:2px auto 10px;}
.add-title{
  width:100%; border:none; background:none; font-family:var(--sans);
  font-size:1.25rem; color:var(--tink);
  border-bottom:1.5px solid var(--primary); padding:8px 2px; margin:0;
}
.add-title::placeholder{color:#B4AB99;}
.add-title:focus{outline:none; border-bottom-color:var(--primary);}
.add-error{color:var(--danger); font-size:.82rem; margin:6px 2px 0;}
.add-tiles{display:flex; gap:10px; margin:14px 0 2px;}
.add-tile{
  flex:1; min-width:0; height:46px;
  border:0.5px solid var(--border); border-radius:10px; background:var(--surface);
  display:flex; align-items:center; gap:8px; padding:0 12px;
  font-size:.92rem; color:var(--ink); cursor:pointer; font-family:var(--sans);
  box-shadow:none;
}
#addItemBucketDD{display:flex; flex:1; min-width:0;}
#addSheet .bdd{flex:1; min-width:0; position:relative;}
#addSheet .bdd-btn{
  width:100%; border:none; background:transparent; box-shadow:none; border-radius:0;
  padding:0; min-height:44px; font-size:.92rem; gap:8px; text-align:left;
}
#addSheet .bdd.compact .bdd-name{max-width:none;}
.add-timetile svg{flex:none; color:var(--muted);}
#addSheetTimeVal{overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
#addSheetTimeVal.empty{color:var(--muted);}
.vh-time{position:absolute; width:1px; height:1px; opacity:0; pointer-events:none;}
/* Time tile: the native time input covers the tile so a direct tap opens the
   iOS/Android picker (showPicker() is unreliable on mobile Safari). */
.add-timetile-wrap{position:relative; flex:1; min-width:0; display:flex;}
.add-timetile-wrap .add-timetile{flex:1;}
.add-timetile-wrap .vh-time{position:absolute; inset:0; width:100%; height:100%; opacity:0; pointer-events:auto; margin:0; cursor:pointer;}
.add-lengthwrap{margin-top:14px;}
.add-label{font-size:11px; text-transform:uppercase; letter-spacing:1.2px; color:var(--muted); margin-bottom:8px;}
.seglen{display:flex; background:#F1ECE1; border-radius:999px; padding:4px; gap:4px;}
.seglen button{
  flex:1; border:none; background:transparent; border-radius:999px;
  min-height:44px; font-size:.88rem; color:var(--muted); cursor:pointer;
  font-family:var(--sans); font-weight:600; padding:0 4px; box-shadow:none;
}
.seglen button[aria-pressed="true"]{background:var(--primary); color:#fff;}
.add-custom{display:flex; align-items:center; gap:8px; margin-top:10px; font-size:.9rem; color:var(--muted);}
.add-custom input{
  width:64px; min-height:44px; border:0.5px solid var(--border); border-radius:10px;
  text-align:center; font-size:1rem; color:var(--ink); background:var(--surface); font-family:var(--sans);
  box-shadow:none;
}
.add-range{font-size:.82rem; color:var(--muted); margin:10px 2px 0;}
.add-go{
  width:100%; height:48px; border:none; border-radius:12px; margin-top:20px;
  background:var(--primary); color:#fff; font-size:1rem; font-weight:600; cursor:pointer;
  font-family:var(--sans); box-shadow:none;
}
.add-go:active{filter:brightness(1.08);}
.add-cancel{display:block; margin:12px auto 0; min-height:44px; padding:0 16px;}
/* today row options menu */
.row-menu{
  position:fixed; z-index:70; min-width:160px;
  background:var(--surface); border:0.5px solid var(--border); border-radius:12px; box-shadow:none;
  padding:4px;
}
.row-menu button{
  display:block; width:100%; text-align:left; border:none; background:none;
  padding:12px 14px; font-size:.95rem; color:var(--ink); min-height:44px; cursor:pointer;
  border-radius:8px; font-family:var(--sans);
}
.row-menu button:active{background:var(--primary-soft);}
#rowMenuDelete{color:var(--danger);}
/* delete undo toast */
.undo-toast{
  position:fixed; left:16px; right:16px; bottom:calc(76px + env(safe-area-inset-bottom)); z-index:70;
  max-width:480px; margin:0 auto;
  background:var(--ink); color:#fff; border-radius:12px; border:none; box-shadow:none;
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding:8px 8px 8px 16px; font-size:.92rem;
}
#undoBtn{
  border:none; background:none; color:#fff; font-weight:700; font-size:.92rem;
  min-height:44px; min-width:64px; padding:0 12px; cursor:pointer;
  text-decoration:underline; font-family:var(--sans);
}

/* Done list */
.done-week{margin-bottom:14px;}
.done-week h3{font-family:var(--serif); font-size:1.1rem; color:var(--ink); margin-bottom:6px; font-weight:600;}
.done-week ul{list-style:none;}
.done-week li{
  padding:8px 4px; border-top:1px solid var(--border); font-size:.95rem;
  display:flex; gap:8px; align-items:baseline;
}
.done-week li:first-child{border-top:none;}
.done-check{color:var(--primary); flex:none;}

/* Buttons */
.text-btn{
  background:none; border:none; color:var(--primary); font-size:.95rem; cursor:pointer;
  padding:10px 6px; min-height:44px; text-decoration:underline; text-underline-offset:3px;
  white-space:nowrap;
}
.text-btn-small{font-size:.82rem; min-height:36px; padding:6px;}
#qcSheet .primary-btn{width:100%; margin-top:12px;}
#qcSheet .text-btn{display:block; margin:8px auto 0;}
#qcSheet .qc-heard{margin-bottom:12px;}
#qcSheet .verse-ref{
  font-size:12px; text-transform:uppercase; letter-spacing:1.2px; color:var(--accent);
  font-family:var(--sans); font-weight:600; margin:8px 0 4px;
}
#qcSheet .verse-text{font-family:var(--serif); font-size:17px; color:var(--ink); line-height:1.6; margin-bottom:8px;}
#qcSheet .qc-noref{font-size:14px; color:var(--muted); margin-bottom:12px;}
#qcSheet #qcVoiceWrap{margin-bottom:12px;}

/* Tab bar */
.tabbar{
  position:fixed; left:0; right:0; bottom:0; z-index:30;
  background:var(--surface); border:none;
  display:grid; grid-template-columns:repeat(5,1fr);
  padding-bottom:env(safe-area-inset-bottom);
}
.tabbar button{
  background:none; border:none; color:var(--muted); cursor:pointer;
  font-size:.76rem; letter-spacing:.2px; padding:12px 2px 10px;
  min-height:60px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:3px;
  border-top:3px solid transparent; line-height:1.25;
}
.tabbar button[aria-selected="true"]{color:var(--primary); font-weight:600; border-top-color:var(--accent);}
.tab-count{
  font-size:.72rem; background:var(--primary); color:#fff; border-radius:999px;
  min-width:22px; height:22px; display:inline-flex; align-items:center; justify-content:center; padding:0 6px;
}

/* Other apps */
.app-row{
  display:flex; align-items:center; gap:12px; padding:10px 4px;
  border-top:1px solid var(--border); text-decoration:none; color:var(--ink);
}
.app-row:first-child{border-top:none;}
a.app-row:active{background:var(--primary-soft);}
.app-row-icon{width:42px; height:42px; border-radius:11px; flex:none;}
.app-row-name{font-family:var(--serif); font-size:1.08rem; font-weight:600; color:var(--ink); line-height:1.25;}
.app-row-desc{font-size:.85rem; color:var(--muted); line-height:1.45;}
.app-row-mark{
  width:42px; height:42px; border-radius:11px; flex:none;
  border:1px dashed var(--border); color:var(--muted);
  display:flex; align-items:center; justify-content:center; font-size:1.3rem; letter-spacing:2px;
}

/* Onboarding */
.onboard{
  position:fixed; inset:0; z-index:60; background:var(--primary);
  display:flex; align-items:center; justify-content:center; padding:28px;
}
.onboard-card{
  background:var(--surface); border-radius:20px; border:1px solid var(--border);
  padding:36px 28px; max-width:420px; width:100%; text-align:center;
  box-shadow:none;
}
.ob-sub{font-size:.92rem; color:var(--muted); margin:6px 0 18px; line-height:1.5;}
.ob-addrow{display:flex; flex-wrap:wrap; gap:8px; margin-bottom:16px;}
.ob-addrow input{
  flex:1 1 150px; min-width:0; font:inherit; font-size:1rem; color:var(--ink);
  background:var(--surface-2); border:none; border-radius:12px; padding:12px 14px; min-height:47px;
}
.ob-addrow input:focus{outline:2px solid var(--primary); outline-offset:0;}
.ob-addbtn{flex:none; width:auto; padding:13px 20px;}
.ob-addrow .ob-addbtn{flex:0 0 auto; width:auto; min-height:47px; padding:12px 20px;}
.ob-progress{margin-bottom:18px;}
.ob-dots{display:flex; gap:7px; justify-content:center; margin-bottom:7px;}
.ob-dot{width:8px; height:8px; border-radius:50%; background:var(--border);}
.ob-dot.done{background:var(--muted);}
.ob-dot.on{background:var(--primary); transform:scale(1.25);}
.ob-steplabel{font-size:.78rem; letter-spacing:.06em; text-transform:uppercase; color:var(--muted);}
.ob-sprig{color:var(--primary); margin-bottom:8px;}
.ob-label{display:block; text-align:left; font-size:.85rem; font-weight:600; color:var(--muted); margin:14px 0 2px;}
.ob-opt{font-weight:400;}
.ob-nav{display:flex; gap:10px; margin-top:16px; align-items:stretch;}
.ob-nav .primary-btn{flex:1;}
.ob-nav-main{width:auto !important;}
.ob-nav .mini-btn{flex:0 0 auto;}
.ob-nav-skip{margin-left:auto;}
.ob-skip{display:block; margin:12px auto 0;}
.ob-swatches{display:flex; gap:8px; justify-content:center; flex-wrap:wrap; margin:2px 0 16px;}
.ob-swatches .bsw[aria-pressed="true"]{outline:2px solid var(--primary); outline-offset:2px;}
.ob-note{font-size:.82rem; color:var(--muted); margin-bottom:6px;}
.ob-tourlist{text-align:left; margin:0 0 20px; padding-left:20px; line-height:1.55; font-size:.95rem; color:var(--ink);}
.ob-tourlist li{margin-bottom:8px;}
.primary-btn:disabled{opacity:.45; cursor:default;}
.who-dot{display:inline-block; width:9px; height:9px; border-radius:50%; margin-right:6px;}
.spot-badge{display:inline-block; font-size:.68rem; font-weight:700; letter-spacing:.08em; text-transform:uppercase; background:var(--surface-2); color:var(--muted); border:1px solid var(--border); border-radius:999px; padding:3px 9px; margin-bottom:8px;}
.person-rename{font:inherit; font-size:.95rem; padding:6px 8px; border-radius:8px; border:1px solid var(--border); background:var(--bg); color:var(--ink); width:130px;}
.ob-chips{display:flex; flex-wrap:wrap; gap:8px; justify-content:center; margin-bottom:20px; min-height:8px;}
.ob-chip{
  display:inline-flex; align-items:center; gap:7px; max-width:100%;
  background:var(--surface-2); border:1px solid var(--border); border-radius:999px;
  padding:9px 8px 9px 13px; font-size:.84rem; font-weight:500; color:var(--ink);
  animation:obChipIn .18s ease-out;
}
.ob-chip .ob-name{min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
@keyframes obChipIn{from{opacity:0; transform:scale(.92);} to{opacity:1; transform:scale(1);}}
@media (prefers-reduced-motion: reduce){ .ob-chip{animation:none;} }
.ob-chip button{
  width:26px; height:26px; flex:none; border-radius:50%; border:none; cursor:pointer;
  background:transparent; color:var(--muted); font-size:.875rem; line-height:1;
  display:inline-flex; align-items:center; justify-content:center;
}
@media (max-width:640px){
  /* onboarding goes full-bleed on phones: no floating card, no squish */
  .onboard{padding:0; align-items:stretch;}
  .onboard-card{max-width:none; width:100%; border:none; border-radius:0; overflow-y:auto; padding:44px 22px calc(30px + env(safe-area-inset-bottom));}
  .ob-swatches .bsw{width:32px; height:32px;}
}
.onboard-card h2{
  font-family:var(--serif); font-size:1.7rem; font-weight:600; color:var(--ink);
  line-height:1.3; margin-bottom:6px;
}
.cursive-preview{
  font-family:var(--serif); font-size:2.4rem; color:var(--ink); font-weight:600;
  min-height:1.4em; margin-bottom:8px; overflow-wrap:anywhere;
}
.onboard-card input{
  width:100%; font-size:1.15rem; padding:14px 16px; text-align:center;
  border:1px solid var(--border); border-radius:12px; background:var(--bg); color:var(--ink);
  margin-bottom:14px;
}
.onboard-card input:focus{outline:2px solid var(--primary); outline-offset:1px;}
.primary-btn{
  width:100%; background:var(--primary); color:#fff; border:none; border-radius:12px;
  padding:15px; font-size:1.05rem; cursor:pointer; min-height:54px; letter-spacing:.3px;
}
.primary-btn:active{transform:scale(.98);}

/* Sheet */
.scrim{position:fixed; inset:0; background:rgba(0,0,0,.4); z-index:40;}
.sheet{
  position:fixed; left:0; right:0; bottom:0; z-index:41;
  background:var(--surface); border:none;
  border-radius:18px 18px 0 0; padding:20px 20px calc(24px + env(safe-area-inset-bottom));
  max-width:720px; margin:0 auto;
}
.sheet h3{font-family:var(--serif); font-size:1.3rem; color:var(--ink); margin-bottom:6px; text-align:center;}
.sheet .chips{justify-content:center;}
.sheet-cancel{display:block; margin:14px auto 0;}

/* Dictation sheet */
.dict-head{display:flex; align-items:center; justify-content:space-between; margin-bottom:12px;}
.dict-head h3{margin-bottom:0; text-align:left;}
.dict-area{position:relative; margin-bottom:6px;}
#dictText{
  width:100%; min-height:230px; font-size:1.05rem; line-height:1.65; font-family:var(--sans);
  padding:16px 16px 76px; border:1px solid var(--border); border-radius:14px;
  background:var(--bg); color:var(--ink); resize:vertical;
}
#dictText:focus{outline:2px solid var(--primary); outline-offset:1px; border-color:var(--primary);}
.dict-mic{position:absolute; right:14px; bottom:14px; box-shadow:none;}
.dict-mic:active{transform:scale(.94);}
.dict-hint{font-size:.88rem; color:var(--muted); margin:2px 0 14px;}
.dict-sheet .mic-status{margin-bottom:4px;}

/* Item edit sheet — full-screen on phones, same pattern as the settings sheet */
/* Item edit sheet — redesigned: deep sage header, cream body, white detail tiles.
   Full-screen on phones, same pattern as the settings sheet. */
.item-sheet{
  --esheet-sage:var(--primary);
  --esheet-cream:#F8F6F1;
  --esheet-titlecream:#fff;
  --esheet-tilebg:var(--surface);
  --esheet-tile:var(--surface);
  --esheet-line:#DCD4C2;
  --esheet-muted:var(--muted);
  --esheet-ink:var(--ink);
  --esheet-track:#ECE7D9;
  --esheet-red:#A83A32;
  max-width:720px; margin:12px auto 0; background:var(--esheet-cream); color:var(--esheet-ink);
  border:1px solid var(--esheet-line); border-radius:20px;
}
.item-sheet:not([hidden]){
  position:fixed; inset:0; z-index:80; max-width:none; margin:0;
  border:none; border-radius:0; background:var(--esheet-cream);
  display:flex; flex-direction:column; overflow:hidden;
  -webkit-overflow-scrolling:touch; overscroll-behavior:contain;
  padding-top:env(safe-area-inset-top);
}
.item-sheet:not([hidden]) > *{max-width:720px; width:100%; margin-left:auto; margin-right:auto;}
.esheet-scroll{flex:1 1 auto; overflow-y:auto; -webkit-overflow-scrolling:touch; overscroll-behavior:contain;}
/* Header: deep sage band */
.esheet-head{
  background:var(--esheet-sage);
  border-radius:20px 20px 0 0;
  padding:14px 20px 20px;
}
.item-sheet:not([hidden]) .esheet-head{border-radius:0;}
.esheet-headrow{display:flex; align-items:center; justify-content:space-between; min-height:44px;}
.esheet-bucketline{
  display:inline-flex; align-items:center; gap:8px;
  font-size:.72rem; letter-spacing:2.5px; text-transform:uppercase;
  color:var(--esheet-titlecream); opacity:.92; font-weight:600;
}
.esheet-bucketline .cdot{width:10px; height:10px; border-radius:50%; border:1px solid rgba(255,255,255,.35); flex:none;}
.esheet-x{
  width:44px; height:44px; flex:none; border:none; background:transparent;
  color:var(--esheet-titlecream); font-size:1.7rem; line-height:1; cursor:pointer;
  border-radius:50%;
}
.esheet-x:active{background:rgba(255,255,255,.12);}
.esheet-title{
  width:100%; border:none; background:transparent; margin-top:6px;
  font-family:var(--serif); font-size:21px; color:var(--esheet-titlecream);
  padding:6px 0; min-height:44px;
}
.esheet-title::placeholder{color:rgba(244,239,227,.45);}
.esheet-title:focus{outline:none; box-shadow:none;}
/* Body sections */
.esheet-body{padding:4px 20px 24px;}
.esheet-section{margin-top:24px;}
.esheet-label{
  font-size:11px; text-transform:uppercase; letter-spacing:2px;
  color:var(--esheet-muted); font-weight:600; margin-bottom:10px;
}
/* Details 2x2 tile grid */
.esheet-grid{display:grid; grid-template-columns:1fr 1fr; gap:8px;}
.tile{
  background:var(--esheet-tile); border:0.5px solid var(--esheet-line);
  border-radius:12px; padding:10px 12px; min-height:64px;
  display:flex; flex-direction:column; justify-content:center; gap:4px;
  cursor:pointer; text-align:left; width:100%; color:var(--esheet-ink);
  font-family:var(--sans);
}
.tile-label{font-size:11px; text-transform:uppercase; letter-spacing:1.5px; color:var(--esheet-muted); font-weight:600;}
.tile-value{display:flex; align-items:center; gap:8px; font-size:.95rem; min-height:24px;}
.tile-value .cdot{width:10px; height:10px; border-radius:50%; border:1px solid rgba(0,0,0,.12); flex:none;}
.tile-chev{margin-left:auto; color:var(--esheet-muted); font-size:1.1rem; flex:none; line-height:1;}
.tile-empty{color:var(--esheet-muted); font-size:.9rem;}
.who-init{
  width:22px; height:22px; border-radius:50%; flex:none;
  background:var(--esheet-track); color:var(--esheet-ink);
  display:inline-flex; align-items:center; justify-content:center;
  font-size:.72rem; font-weight:700;
}
.tile-value svg{flex:none;}
.vh-date{position:absolute; width:1px; height:1px; opacity:0; pointer-events:none;}
/* Due-date tile: the native date input covers the tile so a direct tap opens the
   iOS picker (showPicker() is unreliable on mobile Safari). */
.esheet-duewrap{position:relative; display:flex;}
.esheet-duewrap .tile{flex:1;}
.esheet-duewrap .vh-date{position:absolute; inset:0; width:100%; height:100%; opacity:0; pointer-events:auto; margin:0; cursor:pointer;}
/* Bucket dropdown rendered chromeless inside its tile */
.item-sheet .bdd{position:relative; flex:1; min-width:0;}
.item-sheet .bdd-btn{
  width:100%; border:none; background:transparent; border-radius:0;
  padding:0; min-height:24px; font-size:.95rem; gap:8px;
}
.item-sheet .bdd-btn .chev{color:var(--esheet-muted);}
.item-sheet .bdd-menu{
  background:var(--esheet-tile); border:0.5px solid var(--esheet-line);
  border-radius:12px; box-shadow:none;
}
/* Bucket menu as a fixed overlay popover (mirrors .esheet-menu): wide enough
   for full bucket names, solid, above all sheet content, no bleed-through. */
.item-sheet .bdd-menu.bdd-popover{
  position:fixed; top:auto; left:12px; right:12px; max-width:420px; margin:0 auto;
  z-index:95;
  background:var(--esheet-tile); border:0.5px solid var(--esheet-line);
  border-radius:12px; box-shadow:none;
  max-height:280px; overflow-y:auto; -webkit-overflow-scrolling:touch;
}
.item-sheet .bdd-row{color:var(--esheet-ink); border-top:1px solid var(--esheet-line);}
.item-sheet .bdd-row:first-child{border-top:none;}
/* Must-do full-width tile */
.tile-full{flex-direction:row; align-items:center; margin-top:24px; min-height:64px; cursor:pointer;}
/* Must-do ON state: unmistakable in the sheet, updates immediately on tap. */
#tileMustDo.must-on{
  background:color-mix(in srgb, var(--accent) 14%, var(--esheet-tile));
  border:1px solid var(--accent);
}
#tileMustDo.must-on .tile-label{color:var(--accent); font-weight:800;}
#tileMustDo.must-on .tile-caption{color:var(--accent); font-weight:600;}
.tile-musttext{display:flex; flex-direction:column; gap:2px; flex:1;}
.tile-musttext .tile-label{font-size:.95rem; text-transform:none; letter-spacing:.3px; color:var(--esheet-ink); font-weight:600;}
.tile-caption{font-size:.82rem; color:var(--esheet-muted);}
.item-sheet .toggle[aria-checked="true"]{background:var(--esheet-sage);}
/* Status segmented control */
.seg3{
  display:flex; background:var(--surface-2); border-radius:999px; padding:4px; gap:4px;
}
.seg3 button{
  flex:1; border:none; background:transparent; border-radius:999px;
  min-height:44px; font-size:.92rem; color:var(--esheet-muted); cursor:pointer;
  font-family:var(--sans); font-weight:600;
}
.seg3 button[aria-pressed="true"]{background:var(--primary-soft); color:var(--primary);}
/* Schedule day cells */
.daycells{display:grid; grid-template-columns:repeat(7, 1fr); gap:6px;}
.daycell{
  border:0.5px solid var(--esheet-line); background:var(--esheet-tile);
  border-radius:12px; min-height:52px; cursor:pointer;
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px;
  color:var(--esheet-ink); font-family:var(--sans); padding:6px 2px;
}
.daycell .dc-wd{font-size:.66rem; text-transform:uppercase; letter-spacing:1px; color:var(--esheet-muted);}
.daycell .dc-dn{font-size:1rem; font-weight:700;}
.daycell.sel{background:var(--esheet-sage); border-color:var(--esheet-sage); color:#fff;}
.daycell.sel .dc-wd{color:rgba(255,255,255,.75);}
/* Sheet picker popover (Who / Effort) */
.esheet-menu-backdrop{
  position:fixed; inset:0; z-index:94; background:transparent;
  cursor:default;
}
.esheet-menu{
  position:fixed; z-index:95; min-width:200px; max-width:calc(100vw - 16px); width:max-content;
  background:var(--esheet-tile); border:0.5px solid var(--esheet-line); border-radius:12px;
  max-height:280px; overflow-y:auto; -webkit-overflow-scrolling:touch;
}
.esheet-mrow{
  display:flex; align-items:center; gap:10px; width:100%;
  background:none; border:none; border-top:0.5px solid var(--esheet-line);
  padding:12px 16px; font-size:.95rem; color:var(--esheet-ink); cursor:pointer; text-align:left;
  min-height:48px; font-family:var(--sans);
}
.esheet-mrow:first-child{border-top:none;}
.esheet-mrow .cdot{width:10px; height:10px; border-radius:50%; border:1px solid rgba(0,0,0,.12); flex:none;}
.esheet-mrow .mcheck{margin-left:auto; color:var(--esheet-sage); font-weight:700;}
.esheet-mrow .tile-empty{margin:0;}
/* Footer */
.esheet-foot{
  flex:none; display:flex; gap:12px; align-items:stretch;
  background:var(--esheet-cream); border-top:0.5px solid var(--esheet-line);
  padding:12px 20px calc(16px + env(safe-area-inset-bottom));
}
.esheet-del{
  border:none; background:transparent; color:var(--esheet-red);
  font-size:.95rem; cursor:pointer; min-height:52px; padding:0 8px;
  font-family:var(--sans); flex:none;
}
.esheet-cal{
  border:none; background:transparent; color:var(--esheet-ink);
  font-size:.95rem; cursor:pointer; min-height:52px; padding:0 8px;
  font-family:var(--sans); flex:none; text-decoration:underline;
  text-underline-offset:3px;
}
.esheet-save{
  flex:1; border:none; border-radius:999px; cursor:pointer;
  background:var(--esheet-sage); color:var(--esheet-titlecream);
  font-size:1rem; font-weight:700; min-height:52px; font-family:var(--sans);
}
.esheet-save:active{opacity:.92;}
.sheet-actions{margin-top:4px;}
.empty-note{font-size:.88rem; color:var(--muted); font-style:italic; font-family:var(--serif); text-align:center; padding:8px 0;}

/* Footer */
.privacy{padding:20px 6px 40px; text-align:center;}
.privacy h2{font-family:var(--serif); font-size:1.2rem; color:var(--ink); margin-bottom:8px;}
.privacy h2::after{
  content:''; display:block; width:36px; height:2px; border-radius:2px;
  background:var(--accent); opacity:.55; margin-top:7px;
}
.privacy p{font-size:.9rem; color:var(--muted); max-width:52ch; margin:0 auto 14px;}
.privacy .verse{font-family:var(--serif); font-size:1.05rem; color:var(--ink);}
.colophon{font-size:.72rem !important; letter-spacing:3px; margin-top:20px !important;}
.field{display:block; margin-bottom:12px;}
.flabel{display:block; font-size:.78rem; letter-spacing:1.5px; text-transform:uppercase; color:var(--muted); margin-bottom:6px; font-weight:600;}
.field input, .field textarea{
  width:100%; font-size:1rem; padding:12px 14px; font-family:var(--sans);
  border:none; border-radius:14px; background:var(--surface); color:var(--ink);
  min-height:48px;
}
.field textarea{resize:vertical; min-height:84px; line-height:1.6;}
.field input:focus, .field textarea:focus{outline:2px solid var(--primary); outline-offset:2px; border:none;}
.form-actions{display:flex; gap:10px; align-items:center;}

.verse-card{
  border:1px solid var(--border); border-left:4px solid var(--accent);
  border-radius:10px; padding:16px; margin-bottom:12px; background:var(--surface);
}
.verse-ref{font-family:var(--serif); font-size:1.28rem; font-weight:600; color:var(--primary); margin-bottom:8px;}
.verse-text{font-family:var(--serif); font-size:1.12rem; line-height:1.7; margin-bottom:10px;}
.tchip.static{cursor:default;}
.chip[aria-pressed="true"]{background:var(--primary); color:#fff; border-color:var(--primary);}
.verse-actions{display:flex; gap:6px; margin-top:12px;}

#tagFilters{margin-bottom:12px;}
#tagFilters:empty{margin-bottom:0;}

/* Revisit — slow reflection, one verse at a time */
.revisit{
  position:fixed; inset:0; z-index:60; background:var(--primary);
  display:flex; align-items:center; justify-content:center; padding:24px;
}
.revisit-card{
  background:var(--surface); border-radius:20px; border:1px solid var(--accent);
  padding:38px 28px; max-width:520px; width:100%; text-align:center;
  box-shadow:none;
  max-height:86vh; overflow-y:auto;
}
/* Collections view (larger, scrollable) */
.revisit-collections{
  max-width:640px; text-align:left; padding:24px 20px;
}
.revisit-head{
  display:flex; align-items:center; justify-content:space-between;
  margin-bottom:16px;
}
/* Item 16: keep the title and close button visible while the list scrolls */
.revisit-head{
  position:sticky; top:-24px; z-index:5;
  background:var(--surface);
  margin:-24px -20px 16px; padding:14px 20px;
}
/* Item 6: one-time hint that the collection cards swipe */
.swipe-hint{
  font-size:.8rem; color:var(--muted); text-align:center;
  margin:2px 0 10px;
}
.revisit-head h3{
  font-family:var(--serif); font-size:1.4rem; color:var(--ink); margin:0;
}
.revisit-head .text-btn{font-size:1.5rem; padding:4px 10px; min-height:0;}
.book-filter-row{margin:12px 0;}
.book-filter-row select{
  width:100%; background:var(--card); border:none; border-radius:14px;
  padding:12px 14px; font-size:15px; color:var(--ink); min-height:48px;
}
.collections-grid{
  display:grid; grid-template-columns:1fr 1fr; gap:12px;
  margin-top:12px;
}
@media (max-width:480px){
  .collections-grid{grid-template-columns:1fr;}
}
.coll-card{
  background:var(--card); border-radius:16px; padding:16px;
  border:none;
}
.coll-card .verse-ref{
  font-size:11px; text-transform:uppercase; letter-spacing:1.2px;
  color:var(--accent); font-weight:600; margin-bottom:6px;
}
.coll-card .verse-text{
  font-family:var(--serif); font-size:15px; line-height:1.6;
  color:var(--ink); margin-bottom:8px;
}
.coll-card .verse-note{
  font-size:13px; color:var(--muted); line-height:1.5; margin-bottom:8px;
}
.coll-card .vn-player{margin-top:8px;}
.coll-tags{
  display:flex; flex-wrap:wrap; gap:6px; margin-top:8px;
}
.coll-tag{
  font-size:11px; background:var(--surface); color:var(--muted);
  padding:4px 10px; border-radius:999px;
}

/* ---- Minimal header: settings gear only ---- */
/* ---- Greeting: plain cursive on the page background ---- */
.greeting-script{
  font-family:var(--serif); font-weight:600;
  font-size:30px; line-height:1.2; color:var(--ink);
  text-align:left; margin:20px 0 16px; padding:0;
  overflow-wrap:anywhere;
}
.greeting-script::after{display:none;}

/* ---- Brain-dump field: flat white ---- */
.dump-pill{
  display:flex; align-items:center; gap:8px;
  background:var(--surface); border:0.5px solid var(--border); border-radius:14px;
  height:54px; min-height:54px;
  padding:0 8px 0 16px; margin:0;
  box-shadow:none; cursor:text;
}
.dump-pill:focus-within{outline:none; border-color:#d3c0c0;}
.dump-pill .mic-btn{
  flex:none; width:38px; height:38px; border-radius:50%;
  background:var(--primary); color:#fff; border:none; cursor:pointer;
  display:flex; align-items:center; justify-content:center; padding:0;
}
.dump-pill .mic-btn:active{transform:scale(.94);}
.dump-pill .mic-btn.listening{background:var(--danger); animation:pulse 1.4s ease-in-out infinite;}
#dumpInput{
  flex:1; background:transparent; border:none; color:var(--ink);
  font-size:15px; padding:12px 0; min-width:0;
}
#dumpInput::placeholder{color:var(--muted);}
#dumpInput:focus{outline:none; border:none;}

/* ---- Buckets: cute illustrated tiles ---- */
.buckets-head{align-items:center;}
#tab-buckets .buckets-head h2{
  font-family:var(--serif); font-weight:600; font-size:28px; color:var(--ink);
  text-align:left; margin:0;
}
#tab-buckets .buckets-head h2::after{
  content:''; display:block; width:36px; height:2px; border-radius:2px;
  background:var(--accent); opacity:.55; margin-top:7px;
}
.bucket-add-btn{
  background:var(--primary); border:none; cursor:pointer; color:#fff;
  width:40px; height:40px; min-width:40px; min-height:40px; border-radius:50%;
  display:flex; align-items:center; justify-content:center; flex:none; padding:0;
}
.bucket-add-btn:active{transform:scale(.94);}
.buckets-hint{font-size:14px; color:var(--muted); margin:0 0 16px;}
.bucket-grid{display:grid; grid-template-columns:repeat(2,1fr); gap:10px; margin-top:6px;}
.bucket-tile{
  background:var(--primary-soft); border:none; border-radius:18px;
  padding:14px; min-height:112px; text-align:left; cursor:pointer; position:relative;
  box-shadow:none; overflow:hidden;
  display:flex; flex-direction:column; align-items:flex-start;
  -webkit-touch-callout:none; user-select:none; -webkit-user-select:none;
}
.bucket-tile:active{transform:scale(.98);}
.bucket-tile .tile-icon{
  width:36px; height:36px; border-radius:50%; flex:none;
  display:flex; align-items:center; justify-content:center;
  margin-bottom:12px;
}
.bucket-tile .bname{
  font-family:var(--serif); font-size:19px; font-weight:600; color:var(--ink);
  overflow-wrap:anywhere; line-height:1.25;
  padding-right:54px; position:relative; z-index:1;
}
.bucket-tile .bcount{
  font-size:13px; color:var(--muted); margin-top:3px;
  padding-right:54px; position:relative; z-index:1;
}
.bucket-tile .tile-sprig{
  position:absolute; right:-8px; bottom:-10px; width:92px; height:auto;
  opacity:.28; pointer-events:none;
}

/* ---- Dedicated bucket view ---- */
.bucket-detail-head{display:flex; align-items:center; gap:14px; margin-bottom:2px;}
.bucket-detail-head h2{display:flex; align-items:center; gap:10px; font-family:var(--serif); font-size:1.6rem; color:var(--ink); margin:0;}
.bucket-detail-head .cdot{width:18px; height:18px; border-radius:50%; flex:none; border:1px solid rgba(0,0,0,.12);}
.bucket-detail-list{list-style:none; margin:14px 0 0; padding:0; display:flex; flex-direction:column; gap:10px;}
.planned-badge{
  flex:none; align-self:center; font-size:.75rem; font-weight:600;
  color:var(--muted); background:var(--surface-2);
  border-radius:999px; padding:4px 10px; margin-right:8px; white-space:nowrap;
}
.bucket-detail-list .item{
  background:var(--surface); border:1px solid var(--border); border-radius:14px;
  padding:14px 16px; flex-wrap:wrap; align-items:flex-start;
}
.bucket-detail-list .item-main{flex:1 1 100%; min-width:0;}
.bucket-detail-list .item-text{font-size:1.05rem;}
.bucket-detail-list .item-actions{flex:1 1 100%; justify-content:flex-start; margin-top:10px;}
.bucket-detail-list .act{min-width:44px; min-height:44px;}

/* ---- Planner: quiet editorial system (fixed tokens, like the sheet) ---- */
#tab-week{
  --plan-bg:var(--bg);
  --plan-accent:var(--primary);
  --plan-ink:var(--ink);
  --plan-muted:var(--muted);
  --plan-hairline:color-mix(in srgb, var(--ink) 10%, transparent);
  --plan-softsage:#B9C4B0;
  --plan-cream:#fff;
  background:var(--plan-bg);
  padding:0 16px 28px;
}
#tab-week .card.plan-plain{
  background:transparent; border:none; box-shadow:none;
  padding:0; margin:0; border-radius:0;
}
#tab-week .plan-head{margin:6px 0 0;}
#tab-week .plan-head h2{color:var(--plan-accent);}
#tab-week .plan-head h2::after{display:none;}
#tab-week .plan-hint{color:var(--plan-muted); font-size:.85rem; margin:12px 0 0;}
/* quiet text tabs, not pills */
#tab-week .view-switch{display:flex; gap:24px; margin:0; padding:0 2px;}
#tab-week .view-switch button{
  border:none; background:none; padding:10px 2px; min-height:44px; cursor:pointer;
  font-family:var(--sans); font-size:.95rem; color:var(--plan-muted);
  border-bottom:2px solid transparent; border-radius:0;
}
#tab-week .view-switch button[aria-pressed="true"]{
  color:var(--plan-accent); font-weight:700; border-bottom-color:var(--plan-accent);
  background:none; box-shadow:none;
}
/* calendar bar: serif title left; plain chevrons + text Today right */
#tab-week .cal-bar{display:flex; align-items:center; gap:2px; margin:4px 0 0;}
#tab-week .cal-title{
  flex:1; min-width:0; margin:0; text-align:left;
  font-family:var(--serif); line-height:1.25; font-weight:600;
}
#tab-week .cal-title .ct-main{font-size:1.4rem; color:var(--plan-accent);}
#tab-week .cal-title .ct-sub{font-size:1.02rem; color:var(--plan-muted); font-weight:400; margin-left:8px;}
#tab-week .nav-arrow{
  flex:none; border:none; background:none; color:var(--plan-muted);
  font-size:1.7rem; line-height:1; cursor:pointer; min-width:44px; min-height:44px;
  display:flex; align-items:center; justify-content:center; padding:0; border-radius:8px;
  box-shadow:none;
}
#tab-week .nav-arrow:active{color:var(--plan-accent); background:none;}
#tab-week .today-btn{
  flex:none; border:none; background:none; color:var(--plan-accent);
  font-size:.9rem; font-weight:600; cursor:pointer; min-height:44px; padding:0 8px;
  white-space:nowrap; font-family:var(--sans); border-radius:8px; box-shadow:none;
}
#tab-week .today-btn:active{background:none; opacity:.7;}

/* ---- Planner views ---- */
/* Week view: 7-day strip across the top */
.wstrip{
  display:flex; gap:2px; overflow-x:auto; padding:8px 0 6px;
  scroll-snap-type:x proximity; -webkit-overflow-scrolling:touch;
}
.wstrip-day{
  flex:1 0 44px; min-width:44px; min-height:64px; scroll-snap-align:center;
  border:none; background:none; cursor:pointer; border-radius:12px;
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:4px;
  font-family:var(--sans); padding:6px 0; box-shadow:none;
}
.wstrip-wd{font-size:.68rem; letter-spacing:1px; text-transform:uppercase; color:var(--plan-muted);}
.wstrip-num{
  font-size:1.02rem; color:var(--plan-ink); min-width:38px; height:38px;
  display:flex; align-items:center; justify-content:center; border-radius:50%;
  font-variant-numeric:tabular-nums;
}
.wstrip-day.sel .wstrip-num{background:var(--plan-accent); color:#fff; font-weight:700;}
.wstrip-day.sel .wstrip-wd{color:var(--plan-accent); font-weight:700;}
.wstrip-day.dragover .wstrip-num{outline:2px dashed var(--plan-accent); outline-offset:2px;}
/* Week view: selected-day detail */
.wdetail{padding:4px 0 0;}
.wdetail.dragover{outline:2px dashed var(--plan-accent); outline-offset:-2px; border-radius:8px;}
.wdetail-head{display:flex; align-items:baseline; gap:10px; margin:12px 0 14px;}
.wdetail-name{font-family:var(--serif); font-size:1.5rem; font-weight:600; color:var(--plan-accent);}
.wdetail-date{font-size:.95rem; color:var(--plan-muted);}
.wany-list{display:flex; flex-direction:column; gap:2px; margin-bottom:20px;}
/* timeline: hour gutter + hairline dividers, only hours with events */
.wtl-row{display:flex; gap:12px; align-items:stretch; padding:9px 0; border-top:0.5px solid var(--plan-hairline);}
.wtl-gutter{
  flex:none; width:54px; text-align:right; white-space:nowrap;
  font-size:.76rem; color:var(--plan-muted); padding-top:15px;
  font-variant-numeric:tabular-nums;
}
.wtl-slot{flex:1; min-width:0; display:flex; flex-direction:column; gap:8px;}
/* simple planner rows: [time] 3px bucket bar, title, quiet actions */
.plan-row{
  --bucket:var(--plan-accent);
  display:flex; align-items:center; gap:12px;
  min-height:44px; padding:8px 0; background:none; border:none;
}
.plan-row.dragging{opacity:.45;}
.plan-time{
  flex:none; width:66px; font-size:.75rem; color:var(--plan-muted);
  font-variant-numeric:tabular-nums;
}
.plan-bar{
  flex:none; width:3px; align-self:stretch; min-height:24px; border-radius:999px;
  background:var(--bucket);
}
.plan-main{flex:1; min-width:0; display:flex; flex-direction:column; gap:1px;}
.plan-title{
  font-size:.9rem; font-weight:500; color:var(--plan-ink); line-height:1.35;
  overflow-wrap:break-word; cursor:pointer;
}
.plan-title:focus{outline:2px solid var(--plan-accent); outline-offset:2px; border-radius:4px;}
.plan-bucketline{font-size:.75rem; color:var(--plan-muted);}
.plan-acts{display:flex; gap:2px; flex:none;}
.pact{
  border:none; background:none; color:var(--plan-muted); cursor:pointer;
  font-size:1rem; line-height:1; min-width:40px; min-height:40px;
  display:flex; align-items:center; justify-content:center; padding:0; border-radius:8px;
  box-shadow:none;
}
.pact:active{color:var(--plan-accent);}
/* timed blocks: soft tint, 3px bucket left border, sized by duration */
.plan-block{
  --bucket:var(--plan-accent);
  display:flex; gap:10px; align-items:flex-start;
  background:color-mix(in srgb, var(--bucket) 7%, var(--plan-bg));
  border-left:3px solid var(--bucket); border-radius:0;
  padding:10px 10px 10px 12px;
}
.plan-block.dragging{opacity:.45;}
.plan-block-main{flex:1; min-width:0; display:flex; flex-direction:column; gap:2px;}
.plan-block-title{font-size:.92rem; font-weight:600; color:var(--plan-ink); line-height:1.35; overflow-wrap:break-word; cursor:pointer;}
.plan-block-time{font-size:.75rem; color:var(--plan-muted); font-variant-numeric:tabular-nums;}
/* Day view */
.day-box{display:flex; flex-direction:column; padding:2px 0 0;}
.day-box.dragover{outline:2px dashed var(--plan-accent); outline-offset:-2px; border-radius:8px;}
.upnext-card{
  background:var(--plan-accent); border-radius:14px; padding:16px;
  margin:8px 0 24px;
}
.upnext-label{
  font-size:.7rem; letter-spacing:2px; text-transform:uppercase;
  color:var(--plan-softsage); margin:0 0 8px; font-variant-numeric:tabular-nums;
}
.upnext-title{
  font-family:var(--serif); font-size:1.25rem; color:var(--plan-cream);
  margin:0 0 4px; line-height:1.3; cursor:pointer;
}
.upnext-time{font-size:.82rem; color:var(--plan-softsage); margin:0;}
.upnext-empty{font-family:var(--serif); font-size:1.1rem; font-style:italic; color:var(--plan-cream); margin:0;}
.day-quiet-line{
  text-align:center; color:var(--plan-muted); font-style:italic; font-family:var(--serif);
  font-size:.95rem; margin:16px 0 24px;
}
.plan-sec-label{
  font-size:.69rem; letter-spacing:2px; text-transform:uppercase;
  color:var(--plan-muted); margin:0 0 4px;
}
.day-rows{display:flex; flex-direction:column; gap:2px; margin-bottom:24px;}
/* Month view: hairline grid, numbers top-left, 4px event bars */
.m-head{
  display:grid; grid-template-columns:repeat(7,minmax(0,1fr));
  margin:4px 0 2px;
}
.m-head span{
  text-align:left; font-size:.68rem; letter-spacing:1px; text-transform:uppercase;
  color:var(--plan-muted); padding:4px 0 4px 2px; min-width:0;
}
.m-grid{
  display:grid; grid-template-columns:repeat(7,minmax(0,1fr));
  border-top:0.5px solid var(--plan-hairline);
}
.m-cell{
  min-width:0; min-height:52px; overflow:hidden;
  border:none; border-bottom:0.5px solid var(--plan-hairline);
  background:none; border-radius:0; padding:6px 4px 8px 2px;
  display:flex; flex-direction:column; align-items:flex-start; gap:3px;
  cursor:pointer; font-family:var(--sans); text-align:left; box-shadow:none;
}
.m-cell.blank{cursor:default;}
.m-cell.dragover{background:color-mix(in srgb, var(--plan-accent) 8%, var(--plan-bg));}
.m-num{
  font-size:.8rem; line-height:22px; color:var(--plan-muted);
  min-width:22px; height:22px; text-align:center; font-variant-numeric:tabular-nums;
}
.m-cell.today .m-num{
  background:var(--plan-accent); color:#fff; border-radius:50%; font-weight:700;
}
.m-bar{
  height:4px; border-radius:999px; width:100%;
  flex:none;
}
/* Planner content width on desktop */
@media (min-width:900px){
  #tab-week .plan-plain{max-width:720px; margin:0 auto;}
}

/* ---- Coming up ---- */
.up-row{
  display:flex; gap:12px; align-items:baseline; width:100%;
  background:none; border:none; border-top:1px solid var(--border);
  padding:13px 4px; cursor:pointer; text-align:left; color:var(--ink);
  font-family:var(--sans); font-size:.95rem;
}
.up-row:first-of-type{border-top:none;}
.up-row:active{background:var(--primary-soft);}
.up-day{
  font-family:var(--serif); font-weight:600; color:var(--primary);
  flex:none; min-width:118px; font-size:1rem;
}
.up-items{flex:1; color:var(--muted); min-width:0; overflow-wrap:anywhere;}
.up-item{cursor:pointer;}
.up-item:active{text-decoration:underline;}
/* Coming Up header with Select toggle */
.up-head{display:flex; align-items:center; justify-content:space-between; margin-bottom:10px;}
.up-head h2{margin-bottom:0 !important;}
/* Selection mode: rows are static, items become toggle chips */
.up-row.selecting{cursor:default;}
.up-row.selecting:active{background:none;}
button.up-item{
  border:none; background:transparent; padding:2px 4px; margin:-2px -4px;
  font:inherit; color:inherit; text-align:left; cursor:pointer;
  border-radius:8px;
}
button.up-item.sel{
  background:var(--primary-soft); color:var(--primary); font-weight:700;
  padding:2px 10px; margin:-2px -2px;
}
button.up-item.sel::before{content:'\2713\00A0';}
/* Bottom action bar during selection */
.up-actionbar{display:flex; gap:10px; margin-top:12px; align-items:center;}
.up-actionbar .mini-primary{flex:1;}
.up-actionbar .mini-primary:disabled{opacity:.45; cursor:default;}

/* ---- Bucket dropdown: one long oval, opens a list ---- */
.bdd{position:relative;}
.bdd-btn{
  width:100%; display:flex; align-items:center; gap:10px;
  border:1px solid var(--border); background:#d6c7ab; color:var(--ink);
  border-radius:999px; padding:13px 20px; font-size:1rem; cursor:pointer; min-height:54px;
  text-align:left;
}
.bdd-btn .cdot{width:12px; height:12px; border-radius:50%; flex:none; border:1px solid rgba(0,0,0,.12);}
.bdd-ph{color:var(--muted);}
.bdd-btn .chev{margin-left:auto; color:var(--muted); font-size:.8rem; flex:none;}
.bdd-menu{
  position:absolute; left:0; right:0; top:calc(100% + 6px); z-index:60;
  background:var(--surface); border:1px solid var(--border); border-radius:14px;
  box-shadow:none;
  max-height:262px; /* roughly 5 bucket rows, then scroll */
  overflow-y:auto; -webkit-overflow-scrolling:touch; overscroll-behavior:contain;
}
.bdd-row{
  display:flex; align-items:center; gap:10px; width:100%;
  background:none; border:none; border-top:1px solid var(--border);
  padding:13px 18px; font-size:1rem; color:var(--ink); cursor:pointer; text-align:left; min-height:52px;
}
.bdd-row:first-child{border-top:none;}
.bdd-row:active{background:var(--primary-soft);}
.bdd-row .cdot{width:12px; height:12px; border-radius:50%; flex:none; border:1px solid rgba(0,0,0,.12);}

/* ---- Bucket dropdown: compact per-item variant ---- */
.bdd.compact{flex:none;}
.bdd.compact .bdd-btn{
  width:auto; min-height:44px; padding:9px 14px;
  font-size:.88rem; gap:8px;
}
.bdd.compact .bdd-name{
  max-width:104px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.bdd.compact .bdd-menu{left:auto; right:0; min-width:200px;}

/* ---- Brain-dump draft row: text on the left, bucket dropdown on the right ---- */
.dump-draft{display:flex; align-items:center; gap:10px; margin:10px 2px 4px;}
.dump-draft[hidden]{display:none;}
.dump-draft-text{
  flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
  color:var(--ink); font-size:.95rem; padding-left:2px;
}
.item-time{
  flex:none; font-size:.78rem; color:var(--muted);
  background:var(--primary-soft); border-radius:999px; padding:3px 10px; white-space:nowrap;
}

/* ---- Bucket customization modal ---- */
#bucketModal .bcolors{border-top:none; padding:4px 0 0;}

/* Bible search — a concordance, not a database */
.bible-search{margin-top:18px; padding-top:16px; border-top:1px solid var(--border);}
.bible-search h3{font-family:var(--serif); font-size:1.15rem; font-weight:600; color:var(--ink); margin-bottom:10px;}
.bible-search h3::after{
  content:''; display:block; width:36px; height:2px; border-radius:2px;
  background:var(--accent); opacity:.55; margin-top:7px;
}
.bible-search .seg{margin-bottom:4px;}
.bible-credit{font-size:.76rem; color:var(--muted); margin:8px 0 12px; line-height:1.5;}
.bible-status{font-size:.9rem; color:var(--muted); margin:12px 0;}
.bible-ref-row{display:flex; gap:8px; margin-bottom:14px;}
.bible-ref-row select{
  flex:1; min-width:0; font-size:1rem; padding:12px 10px; font-family:var(--sans);
  border:none; border-radius:14px; background:var(--surface); color:var(--ink);
  min-height:48px;
}
.bible-ref-row select:first-child{flex:1.7;}
#bibleSearch{
  width:100%; font-size:1rem; padding:12px 14px; font-family:var(--sans);
  border:none; border-radius:14px; background:var(--surface); color:var(--ink);
  min-height:48px; margin-bottom:4px; -webkit-appearance:none; appearance:none;
}
#bibleSearch:focus{outline:2px solid var(--primary); outline-offset:2px;}
#bibleSearch:focus, .bible-ref-row select:focus{outline:2px solid var(--primary); outline-offset:1px; border-color:var(--primary);}
.bible-results{max-height:340px; overflow-y:auto; -webkit-overflow-scrolling:touch;}
.bible-hit{
  display:block; width:100%; text-align:left; background:none; border:none;
  border-bottom:1px solid var(--border); padding:10px 2px; cursor:pointer;
}
.bible-hit-ref{font-family:var(--serif); font-weight:600; color:var(--primary); font-size:.98rem; display:block;}
.bible-hit-text{color:var(--ink); font-size:.92rem; display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; margin-top:2px;}
.bible-preview{
  margin-top:14px; padding:16px; border:1px solid var(--border); border-left:4px solid var(--accent);
  border-radius:10px; background:var(--surface);
}
.bible-preview .mini-primary{margin-top:6px;}
#manualVerseWrap{margin-top:10px;}

/* ============================================================
   Gather — Design System Refinement
   Warm, characterful, premium. Every token below derives from
   the theme variables above via color-mix, so all 12 themes
   keep working exactly as before.
   ============================================================ */

:root{
  --surface-2:color-mix(in srgb, var(--ink) 4.5%, var(--surface));
  --surface-3:color-mix(in srgb, var(--ink) 9%, var(--surface));
  --hairline:color-mix(in srgb, var(--ink) 12%, var(--border));
  --paper-grain:rgba(46,44,38,.016);
  --shadow-soft:0 1px 2px rgba(46,44,38,.05), 0 5px 16px rgba(46,44,38,.06);
  --shadow-lift:0 2px 6px rgba(46,44,38,.07), 0 12px 30px rgba(46,44,38,.10);
  --shadow-inset-hi:inset 0 1px 0 rgba(255,255,255,.55);
  --ring-brass:0 0 0 3px color-mix(in srgb, var(--accent) 38%, transparent);
}

/* ---- Warm paper surfaces ---- */
body{
  background:var(--bg);
}
.card h2{letter-spacing:.2px;}
.card h2::after{
  content:''; display:block; width:36px; height:2px; border-radius:2px;
  background:var(--accent); opacity:.55; margin-top:7px;
}

:focus-visible{outline:2px solid var(--accent); outline-offset:2px;}

/* (greeting flourish removed — see .greeting-script above) */

/* ---- Task capsules, everywhere tasks appear ---- */
/* Today schedule: single-line rows become soft bucket-tinted capsules — see the
   consolidated .today-row rules above (standalone rows, no shared container). */
/* Bucket detail list: capsule rows tinted by their bucket — soft wash, no strong outline */
.bucket-detail-list .item{
  border-radius:999px;
  background:color-mix(in srgb, var(--bucket, var(--primary)) 4%, var(--surface));
  border:none;
  box-shadow:none;
  padding:13px 18px;
  position:relative;
  flex-wrap:nowrap;
  align-items:center;
}
.bucket-detail-list .item-main{flex:1 1 auto; min-width:0;}
/* Bucket card ⋯ menu */
.item-menu-btn{
  flex:none; width:38px; height:38px; border:none; background:transparent;
  color:var(--muted); font-size:1.25rem; line-height:1; cursor:pointer;
  border-radius:50%; display:flex; align-items:center; justify-content:center;
  font-family:var(--sans); padding:0;
}
.item-menu-btn:hover{background:color-mix(in srgb, var(--ink) 8%, transparent);}
.item-menu-btn:focus-visible{outline:2px solid var(--accent); outline-offset:2px;}
.item-menu{
  position:absolute; right:12px; top:calc(100% - 6px); z-index:40;
  background:var(--surface); border:1px solid var(--border); border-radius:14px;
  box-shadow:0 10px 28px rgba(0,0,0,.16); padding:6px; min-width:160px;
  display:flex; flex-direction:column;
}
.item-menu-item{
  border:none; background:transparent; text-align:left; padding:11px 12px;
  font-size:.95rem; color:var(--ink); border-radius:9px; cursor:pointer; font-family:var(--sans);
}
.item-menu-item:hover{background:color-mix(in srgb, var(--ink) 7%, transparent);}
.item-menu-item.danger{color:var(--danger);}
/* Done list: quiet capsules, no strong outline */
.done-week li{
  border:none;
  border-radius:999px;
  background:color-mix(in srgb, var(--primary) 6%, var(--surface));
  box-shadow:none;
  padding:9px 16px;
  margin-bottom:8px;
}
.done-week h3{letter-spacing:.3px;}

/* Planner pills: richer tint, whisper of a bucket-hued edge, gentle lift */
.pill{
  background:color-mix(in srgb, var(--bucket) 17%, var(--surface));
  border:1px solid color-mix(in srgb, var(--bucket) 26%, transparent);
  box-shadow:none;
  padding:9px 9px 9px 16px;
  transition:transform .14s ease, box-shadow .14s ease;
}
.pill.done{background:color-mix(in srgb, var(--bucket) 8%, var(--surface));}
@media (hover:hover){
  .pill:not(.done):hover{transform:translateY(-1px); box-shadow:none;}
}

/* (planner chrome now lives in the quiet planner system above) */

/* ---- Segmented controls: soft pill groups ---- */
.seg{
  border-radius:999px; padding:3px; gap:2px;
  background:var(--surface-2);
  box-shadow:none;
}
.seg button{border-radius:999px; background:transparent; min-height:44px;}
.seg button + button{border-left:none;}

/* ---- Chips ---- */
.chip{
  background:var(--surface);
  box-shadow:none;
}
@media (hover:hover){
  .chip:not(.sel):hover{border-color:var(--hairline); transform:translateY(-1px);}
  .chip{transition:transform .14s ease, border-color .14s ease;}
}

/* ---- Buttons ---- */
.mini-primary, .primary-btn{
  background:var(--primary);
  box-shadow:none;
}
.mini-primary:active, .primary-btn:active{transform:translateY(1px); box-shadow:none;}
.icon-btn{border-radius:50%;}
.data-btn{
  background:var(--bg);
  border:1px solid var(--hairline);
  box-shadow:none;
}
.act{
  background:var(--bg);
  border:1px solid var(--hairline);
  box-shadow:none;
}
.tact{box-shadow:none;}
@media (hover:hover){
  .mini-primary:hover, .primary-btn:hover{filter:brightness(1.06);}
  .icon-btn:hover{background:var(--primary-soft); color:var(--primary);}
  .text-btn:hover{color:var(--accent);}
  .act:hover{border-color:var(--accent);}
}

/* ---- Inputs: warm, inset, paper-like ---- */
.field input, .field textarea, .name-row input, .trigger-add input,
#bibleSearch, .bible-ref-row select, #sheetDue{
  background:var(--surface);
  border:none;
  box-shadow:none;
}

/* ---- Bucket tiles: layered paper, gentle lift ---- */
/* (bucket-tile flourish/shadow overrides removed — flat cards, see above) */

/* ---- Tab bar: warm glass ---- */
.tabbar{
  background:color-mix(in srgb, var(--surface) 88%, transparent);
  -webkit-backdrop-filter:blur(14px); backdrop-filter:blur(14px);
  box-shadow:none;
}
.tabbar button{transition:color .15s ease;}

/* ---- Sheets & modals ---- */
.sheet{
  background:var(--surface);
  border:none;
  box-shadow:none;
}
.sheet::before{
  content:''; display:block; width:46px; height:4px; border-radius:999px;
  background:var(--border); margin:0 auto 14px;
}
.settings-panel:not([hidden]), .item-sheet:not([hidden]){
  background:var(--bg);
}
.set-section h4{color:var(--muted);}

/* ---- Commonplace: index-card warmth ---- */
.verse-card{
  background:var(--surface);
  box-shadow:none;
}
.verse-ref{letter-spacing:.2px;}
.verse-note{font-size:14px; color:var(--ink); line-height:1.5; margin-top:8px;}
.onboard-card, .revisit-card{
  background:var(--surface);
}

/* ---- Commonplace: quick capture ---- */
.quick-capture{margin:16px 0;}
.qc-mic.listening{background:var(--danger); animation:pulse 1.4s ease-in-out infinite;}
.qc-record-btn{
  width:100%; display:flex; align-items:center; justify-content:center; gap:12px;
  background:var(--card); border:none; border-radius:14px; padding:18px;
  font-size:16px; color:var(--ink); cursor:pointer; min-height:64px;
}
.qc-record-btn svg{color:var(--primary); flex:none;}
.qc-record-btn:active{transform:scale(.98);}
.qc-type-input{
  width:100%; background:var(--card); border:none; border-radius:14px;
  padding:14px 16px; font-size:16px; color:var(--ink); margin-bottom:10px;
  min-height:48px;
}
.qc-type-input:focus{outline:2px solid var(--primary); outline-offset:2px;}
#qcVoiceWrap .primary-btn{width:100%;}
.qc-hint{font-size:13px; color:var(--muted); margin-top:6px;}
.qc-status{font-size:13px; color:var(--muted); margin-top:6px; min-height:1.2em;}
/* Or divider */
.or-divider{
  text-align:center; margin:18px 0 14px; position:relative;
  font-size:13px; color:var(--muted); text-transform:lowercase; letter-spacing:.5px;
}
.or-divider::before, .or-divider::after{
  content:''; position:absolute; top:50%; width:32%; height:1px;
  background:var(--border); opacity:.5;
}
.or-divider::before{left:0;}
.or-divider::after{right:0;}
/* Small flabel (11px uppercase) */
.flabel-small{
  font-size:11px !important; text-transform:uppercase; letter-spacing:1.2px;
  color:var(--muted) !important; margin-bottom:8px;
}
/* Note row: mic + label + link */
.note-row{
  display:flex; align-items:center; gap:12px; margin-bottom:12px;
}
.note-mic{
  flex:none; width:44px; height:44px; border-radius:50%;
  background:var(--primary); color:#fff; border:none; cursor:pointer;
  display:flex; align-items:center; justify-content:center; padding:0;
}
.note-mic:active{transform:scale(.94);}
.note-label{font-size:14px; color:var(--ink);}
.text-btn-quiet{
  margin-left:auto; font-size:13px; color:var(--muted);
  text-decoration:underline; text-underline-offset:3px;
  background:none; border:none; cursor:pointer; padding:8px 4px;
}
.primary-btn-full{width:100%; margin-top:12px;}
.qc-heard{font-family:var(--serif); font-style:italic; color:var(--muted); font-size:15px; margin-bottom:12px;}
.qc-confirm .verse-ref{
  font-size:12px; text-transform:uppercase; letter-spacing:1.2px; color:var(--accent);
  font-family:var(--sans); font-weight:600; margin:8px 0 4px;
}
.qc-confirm .verse-text{font-family:var(--serif); font-size:17px; color:var(--ink); line-height:1.6; margin-bottom:8px;}
.qc-noref{font-size:14px; color:var(--muted); margin-bottom:12px;}
.qc-confirm .primary-btn{width:100%; margin-top:12px;}
.qc-confirm .text-btn{display:block; margin:8px auto 0;}
.flabel-opt{text-transform:none; letter-spacing:0; font-weight:400;}

/* ---- Commonplace: voice note player ---- */
.vn-player{
  background:#FFFFFF; border:0.5px solid #E2D8C4; border-radius:12px;
  padding:10px 12px; display:flex; align-items:center; gap:12px;
}
.vn-playbtn{
  flex:none; width:40px; height:40px; border-radius:50%;
  background:#233630; color:#fff; border:none; cursor:pointer; padding:0;
  display:flex; align-items:center; justify-content:center;
}
.vn-playbtn:active{transform:scale(.94);}
.vn-wave{flex:1; display:flex; align-items:center; gap:3px; height:26px; min-width:0;}
.vn-bar{width:3px; border-radius:2px; background:#AB8B58; flex:none;}
.vn-bar.played{background:#233630;}
.vn-dur{font-size:13px; color:#7D766B; flex:none; min-width:36px; text-align:right;}
.vn-links{display:flex; justify-content:space-between; margin-top:10px;}
.vn-link{
  background:none; border:none; cursor:pointer; padding:4px 0;
  font-size:13px; color:#233630; display:inline-flex; align-items:center; gap:6px;
  font-family:var(--sans);
}
.vn-empty{
  display:flex; align-items:center; gap:12px;
  background:#FFFFFF; border:0.5px solid #E2D8C4; border-radius:12px;
  padding:10px 12px; cursor:pointer; width:100%; text-align:left;
  font-family:var(--sans);
}
.vn-empty-label{font-size:15px; color:var(--ink);}
.vn-player.small .vn-playbtn{width:32px; height:32px;}
.vn-player.small .vn-wave{height:20px;}
.vn-player.small .vn-dur{font-size:12px; min-width:32px;}

/* ---- Commonplace: collection search ---- */
.cp-search-row{
  display:flex; align-items:center; gap:10px;
  background:var(--surface); border:none; border-radius:14px;
  padding:0 14px; margin-bottom:12px; min-height:48px; color:var(--muted);
}
.cp-search-row input{
  flex:1; border:none; background:transparent; font-size:15px; color:var(--ink);
  padding:12px 0; min-width:0; font-family:var(--sans);
}
.cp-search-row input::placeholder{color:var(--muted);}
.cp-search-row input:focus{outline:none;}
.cp-search-row svg{flex:none;}

/* ---- Gentle motion, respectfully reduced ---- */
@media (prefers-reduced-motion:reduce){
  *, *::before, *::after{transition:none !important; animation:none !important;}
}
.tl-row{display:flex; gap:10px; align-items:stretch; padding:7px 0;}
.tl-gutter{
  flex:none; width:58px; text-align:right; white-space:nowrap;
  font-size:.78rem; color:var(--muted); padding-top:11px;
  font-variant-numeric:tabular-nums;
}
.tl-slot{
  flex:1; min-width:0; display:flex; flex-direction:column; gap:6px;
  border-left:1px solid var(--hairline); padding-left:12px;
}

/* Quick Capture sheet: Lora serif, readable */
#qcSheet .qc-heard{ font-family:'Lora', Georgia, serif; font-style:normal; font-size:16px; color:var(--muted); line-height:1.5; }
#qcSheet .verse-text{ font-family:'Lora', Georgia, serif; font-size:18px; line-height:1.65; }
#qcNote{ font-family:var(--sans); font-size:16px; }

.coll-tag-btn{
  cursor:pointer; border:none; font:inherit;
}
.coll-tag-btn:hover{
  background:var(--accent); color:#fff;
}
.coll-tag-btn:active{
  transform:scale(0.95);
}

/* Voice memo toggle on confirmation sheet */
.qc-voice-toggle{
  display:flex; align-items:center; gap:8px;
  font-size:14px; color:var(--muted);
  margin:12px 0; cursor:pointer;
}
.qc-voice-toggle input{
  width:18px; height:18px; accent-color:var(--accent);
}
/* Collection cards: clearer separation */
.coll-card .verse-text{
  padding-bottom:12px; margin-bottom:12px;
  border-bottom:1px solid var(--border);
}
.coll-card .verse-note{
  font-style:italic; color:var(--ink);
  background:var(--surface); padding:10px 12px; border-radius:10px;
  margin-bottom:12px;
}

/* Voice memo on confirmation sheet */
#qcVoiceWrap{ margin:12px 0; }
#qcVoiceWrap .vn-player, #qcSheetVoiceWrap .vn-player{ background:var(--surface); }
.qc-voice-toggle{
  display:flex; align-items:center; gap:8px;
  font-size:14px; color:var(--muted);
  margin:8px 0 12px; cursor:pointer;
}
/* Collection cards: clearer chapter/note separation */
.coll-card .verse-text{
  padding-bottom:12px; margin-bottom:12px;
  border-bottom:1px solid var(--border);
}
.coll-card .verse-note{
  font-style:normal;
  background:var(--surface); padding:10px 12px; border-radius:10px;
  margin-bottom:12px;
}

/* Icon button for share */
.icon-btn{
  background:none; border:none; cursor:pointer;
  color:var(--muted); padding:8px;
  display:inline-flex; align-items:center; justify-content:center;
  border-radius:8px;
}
.icon-btn:hover{ color:var(--ink); background:var(--surface); }

/* Light chip/oval for tags */
.coll-tag{
  display:inline-block;
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:20px;
  padding:4px 12px;
  font-size:13px;
  color:var(--ink);
  margin:2px 4px 2px 0;
}
.coll-tag-btn{ cursor:pointer; }
.coll-tag-btn:hover{ background:var(--accent-soft); }




.swipe-row{position:relative; overflow:hidden; border-radius:16px; margin-bottom:12px;}
.swipe-act{
  position:absolute; top:0; bottom:0; width:92px; border:none; color:#fff;
  font:600 14px var(--sans); display:flex; align-items:center; justify-content:center;
}
/* Item 8: keep the action buttons hidden until a swipe starts, so their colors
   can't bleed through the card's rounded corners */
.swipe-act{visibility:hidden;}
.swipe-row.dragging .swipe-act,
.swipe-row.open .swipe-act{visibility:visible;}
.act-del{left:0; background:#6b6259;}
.act-share{right:0; background:#4a5d52;}
.swipe-row .coll-card{
  position:relative; z-index:1; touch-action:pan-y;
  transition:transform .22s ease; will-change:transform;
  background:var(--card-bg,#fff);
  user-select:none; -webkit-user-select:none;
  margin-bottom:0 !important;
}
.swipe-row .coll-card.dragging{transition:none;}

/* ---- Toast (non-blocking status) ---- */
.toast{
  position:fixed; left:16px; right:16px; bottom:calc(78px + env(safe-area-inset-bottom)); z-index:120;
  max-width:480px; margin:0 auto; background:var(--ink); color:#fff; border-radius:12px;
  padding:12px 16px; font-size:.92rem; line-height:1.45; box-shadow:0 6px 24px rgba(0,0,0,.18);
}
/* ---- In-page confirm ---- */
#confirmScrim{z-index:110;}
.confirm-sheet{z-index:111; padding-top:24px;}
.confirm-msg{font-size:1.02rem; line-height:1.55; color:var(--ink); margin-bottom:18px; text-align:center; text-wrap:balance;}
.confirm-actions{display:grid; grid-template-columns:1fr 1fr; gap:10px;}
.confirm-actions button{min-height:50px; font-size:1rem;}
.mini-primary.danger{background:var(--danger);}
.confirm-actions .mini-primary.danger{background:var(--danger);}
/* ---- AI sort review sheet ---- */
/* ---- Sort review sheet ("Here's how I sorted it") ---- */
.sort-sheet{
  max-height:88vh; overflow-y:auto; z-index:95;
  border-radius:24px 24px 0 0; padding:8px 20px 28px;
  background:color-mix(in srgb, var(--surface) 82%, transparent);
  -webkit-backdrop-filter:blur(20px) saturate(1.4); backdrop-filter:blur(20px) saturate(1.4);
}
#sortScrim{z-index:94;}
.sort-grabber{
  width:44px; height:5px; border-radius:999px; background:var(--border);
  margin:4px auto 14px; flex:none;
}
.sort-head{display:flex; align-items:flex-start; justify-content:space-between; gap:12px;}
.sort-head h3{font-family:var(--serif); font-size:1.65rem; font-weight:600; color:var(--ink); margin:0; text-align:left;}
.sort-x{
  border:none; background:none; color:var(--ink); font-size:1.6rem; line-height:1;
  width:40px; height:40px; border-radius:50%; cursor:pointer; flex:none;
  text-decoration:underline; text-underline-offset:3px;
}
.sort-subtitle{color:var(--muted); font-size:.95rem; margin:6px 0 14px;}
.sort-list{display:flex; flex-direction:column; gap:12px; margin:0 0 6px;}
.sort-thinking{color:var(--muted); text-align:center; padding:24px 0;}
.sort-card{background:var(--bg); border-radius:20px; padding:14px 14px 12px;}
.sort-card.off{opacity:.45;}
.sort-top{display:flex; align-items:center; gap:12px;}
.sort-check{
  flex:none; width:34px; height:34px; border-radius:11px; border:none; cursor:pointer;
  background:var(--surface-2); color:transparent; font-size:1.2rem; font-weight:700;
  display:inline-flex; align-items:center; justify-content:center; line-height:1;
}
.sort-check[aria-pressed="true"]{background:var(--ink); color:#fff;}
.sort-text{flex:1; min-width:0; border:none; background:transparent; font:600 1.02rem var(--sans); color:var(--ink); padding:8px 0; min-height:40px;}
.sort-text:focus{outline:2px solid var(--primary); outline-offset:2px; border-radius:6px;}
.sort-chips{display:flex; flex-wrap:wrap; gap:8px; margin:8px 0 2px 46px; align-items:center;}
.sort-bucket{
  display:inline-flex; align-items:center; gap:7px; border-radius:999px;
  background:var(--surface); border:1px solid var(--border);
  padding:4px 6px 4px 12px; min-height:38px; cursor:pointer;
}
.sort-bucket.unsure{border-style:dashed; border-width:1.5px; border-color:var(--accent);}
.sort-bucket select{
  border:none; background:transparent; font:600 .88rem var(--sans); color:var(--ink);
  min-height:30px; max-width:140px; appearance:none; -webkit-appearance:none; padding-right:2px; cursor:pointer;
}
.sort-bucket .cdot{width:11px; height:11px; border-radius:50%; flex:none;}
.sort-chev{color:var(--muted); font-size:.9rem; line-height:1; padding-right:6px;}
.sort-chip{
  display:inline-flex; align-items:center; gap:6px; border-radius:999px; background:var(--surface);
  border:1px solid var(--border); padding:4px 4px 4px 12px; font-size:.82rem; color:var(--ink); min-height:38px;
}
.sort-chip-x{border:none; background:none; color:var(--muted); font-size:1.05rem; width:28px; height:28px; cursor:pointer; border-radius:50%;}
.sort-chip-day{background:var(--primary-soft); border-color:transparent;}
.sort-chip-must{color:var(--mustdo); border-color:var(--mustdo);}
.sort-hint{font-size:.82rem; color:var(--muted); margin:8px 0 0 46px;}
.sort-effort{display:flex; gap:6px; margin:10px 0 0 46px; flex-wrap:wrap;}
.sort-eff{
  flex:1; border:1px solid var(--border); background:var(--surface); color:var(--muted);
  border-radius:999px; min-height:38px; font:600 .8rem var(--sans); cursor:pointer; padding:0 10px;
  white-space:nowrap;
}
.sort-eff[aria-pressed="true"]{background:var(--primary-soft); border-color:transparent; color:var(--primary);}
.sort-file-btn{
  width:100%; border:none; cursor:pointer; border-radius:18px; min-height:58px;
  background:var(--ink); color:var(--surface); font:600 1.08rem var(--sans); margin-top:14px;
}
.sort-file-btn:disabled{opacity:.5;}
.sort-cancel{
  display:block; margin:14px auto 0; border:none; background:none; cursor:pointer;
  color:var(--ink); font:500 .98rem var(--sans); text-decoration:underline; text-underline-offset:4px;
  min-height:44px; padding:0 16px;
}
/* ---- AI sorting settings ---- */
.ai-info{margin-top:10px; font-size:.9rem; line-height:1.55; color:var(--ink);}
.ai-info p{margin-bottom:6px;}
.ai-key-actions{display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin-bottom:6px;}
.ai-key-actions .data-btn{min-height:40px; padding:0 14px;}
/* ---- Storage meter ---- */
.storage-meter{margin-bottom:12px;}
.sm-bar{height:8px; border-radius:999px; background:var(--surface); overflow:hidden; border:1px solid var(--border);}
.sm-bar span{display:block; height:100%; width:2%; background:var(--primary); border-radius:999px; transition:width .4s ease;}
.sm-bar span.warn{background:var(--danger);}
.sm-stats{list-style:none; margin:8px 0 0; display:grid; grid-template-columns:1fr 1fr; gap:4px 12px; font-size:.82rem; color:var(--muted); padding:0;}
@media (max-width:380px){ .sm-stats{grid-template-columns:1fr;} }
/* ---- Person colors ---- */
.person-dot{flex:none; width:26px; height:26px; border-radius:50%; border:1px solid rgba(0,0,0,.15); cursor:pointer; padding:0;}
/* People as chips with a ⋯ menu */
#peopleList{display:flex; flex-wrap:wrap; gap:8px; align-items:center;}
.person-chip{position:relative; display:inline-flex; align-items:center; gap:8px; padding:6px 4px 6px 12px; border-radius:999px; background:var(--surface); border:1px solid var(--border);}
.person-chip .person-dot{width:22px; height:22px; cursor:default;}
.person-name{font-size:.92rem; color:var(--ink);}
.person-menu-btn{width:32px; height:32px; font-size:1.1rem;}
.person-chip .item-menu{right:0; top:calc(100% - 2px); z-index:60;}
#peopleList .person-swatches{flex:1 1 100%; padding:10px 0 4px;}
.person-swatches{display:flex; flex-wrap:wrap; gap:8px; padding:10px 0 4px 34px;}

/* ---- Topbar: tour button ---- */

/* ---- Settings: bucket management ---- */
.set-bucket{border:1px solid var(--border); border-radius:16px; background:var(--surface); margin-bottom:10px; overflow:hidden;}
.set-bucket-top{display:flex; align-items:center; gap:2px; padding:3px 6px 3px 0;}
.set-bucket-head{flex:1 1 auto; min-width:0; display:flex; align-items:center; gap:10px; padding:9px 6px 9px 12px; background:none; border:none; text-align:left; font:inherit; color:var(--ink); cursor:pointer; min-height:44px;}
.set-bucket-head:active{background:color-mix(in srgb, var(--ink) 5%, transparent);}
.set-bucket-dot{flex:none; width:22px; height:22px; border-radius:50%; border:1px solid rgba(0,0,0,.15);}
.set-bucket-name{flex:1 1 auto; min-width:0; font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
.set-bucket-count{flex:none; font-size:.8rem; color:var(--muted);}
.set-bucket-menuwrap{position:relative; flex:none;}
.set-bucket-menuwrap .item-menu{right:0; top:calc(100% - 2px); z-index:60;}
.set-bucket-words{display:none; flex-wrap:wrap; gap:6px; padding:2px 12px 12px;}
.set-bucket-words.open{display:flex;}
.tword{display:inline-flex; align-items:center; gap:2px; background:var(--bg); border:1px solid var(--border); border-radius:999px; padding:4px 4px 4px 10px; font-size:.82rem; color:var(--ink);}
.tword button{border:none; background:none; color:var(--muted); font-size:1.1rem; line-height:1; padding:4px 8px; border-radius:50%; cursor:pointer; font-family:var(--sans);}
.tword-add{display:flex; gap:6px; flex-basis:100%; margin-top:2px;}
.tword-add input{flex:1 1 auto; min-width:0; font-size:.9rem; padding:9px 10px; border:1px solid var(--border); border-radius:10px; background:#fff; color:var(--ink); min-height:44px;}
.tword-add input:focus{outline:2px solid var(--primary); outline-offset:1px;}

/* ---- Guided tour ---- */
.spot-ring{position:fixed; z-index:91; border:3px solid var(--primary); border-radius:14px; pointer-events:none; transition:top .25s ease, left .25s ease, width .25s ease, height .25s ease; box-shadow:0 0 0 2px rgba(255,255,255,.35); animation:spotPulse 1.8s ease-in-out infinite;}
@keyframes spotPulse{0%,100%{box-shadow:0 0 0 2px rgba(255,255,255,.35);} 50%{box-shadow:0 0 0 6px rgba(255,255,255,.12);}}
@media (prefers-reduced-motion: reduce){ .spot-ring{animation:none;} }
.spot-card{
  position:fixed; z-index:93; text-align:left;
  background:var(--surface); border:1px solid var(--border); border-radius:16px;
  box-shadow:0 14px 34px rgba(24,22,16,.30); padding:16px 16px 14px;
  max-height:46vh; overflow-y:auto;
}
.spot-card h3{font-family:var(--serif); font-size:1.25rem; font-weight:600; color:var(--ink); margin-bottom:4px;}
.spot-steps{font-size:.72rem; letter-spacing:.05em; text-transform:uppercase; color:var(--muted); margin-bottom:6px;}
.spot-body{font-size:.93rem; color:var(--ink); line-height:1.5; margin:2px 0 12px;}
.spot-actions{display:flex; align-items:center; gap:10px;}
.spot-actions .spot-spacer{flex:1;}
.spot-chip{
  position:fixed; left:12px; right:12px; bottom:calc(10px + env(safe-area-inset-bottom)); z-index:93;
  max-width:560px; margin:0 auto; display:flex; align-items:center; gap:10px;
  background:var(--surface); border:1px solid var(--border); border-radius:16px;
  box-shadow:0 10px 30px rgba(24,22,16,.28); padding:12px 12px 12px 16px;
}
.spot-chip.done{border-color:var(--primary);}
.spot-chip-main{flex:1; min-width:0; display:flex; flex-direction:column; gap:1px;}
.spot-chip-text{font-size:.92rem; color:var(--ink); line-height:1.35;}
.spot-chip-steps{font-size:.72rem; letter-spacing:.05em; text-transform:uppercase; color:var(--muted);}
.spot-chip .mini-btn, .spot-chip .mini-primary{flex:none;}
.spot-chip-x{
  flex:none; width:32px; height:32px; border:none; border-radius:50%; cursor:pointer;
  background:transparent; color:var(--muted); font-size:1.15rem; line-height:1;
  display:inline-flex; align-items:center; justify-content:center;
}