:root {
  color-scheme: light;
  --bg: #f7f1e8; --paper: #fdfaf5; --ink: #4b3a30; --brown: #7a4a2a; --hand: #8a4b2c; --gold: #c9a24b; --gold-soft: #f1dfa0;
  --line: #e6dac9; --muted: #9a8878; --accent: #b5653b; --accent-hover: #9d522c; --sage: #eaebdc; --blush: #f6e3df;
  --card: #fff; --card-a: rgba(255,255,255,.55); --card-b: rgba(255,255,255,.6); --hover-card: #fffaf0;
  --on-accent: #fff; --on-brown: #fff; --ctl-border: #d9c3a0; --rule: #e3d7c4; --rule-dot: #cdbba2;
  --pill-bg: #fbf4e4; --pill-bd: #d8bf8a; --done-bg: #f3f6e6; --done-bd: #b7c79a; --na: #f3ede2;
  --dot-on: #d9a6b8; --dot-on-bd: #c27d97; --star-off: #e4d6bd; --drop-bd: #9ab8cc; --drop-on: #8fc1d9; --drop-on-bd: #6ea6c4;
  --ok: #6a8a5e; --danger: #a33; --glow: rgba(240,190,190,.3);
  --shadow: 0 18px 50px rgba(90,60,30,.14), 0 1px 0 #fff inset; --shadow-sm: 0 2px 8px rgba(90,60,30,.12);
  --body-bg:
    radial-gradient(ellipse at 8% 4%, rgba(240, 200, 195, .45), transparent 42%),
    radial-gradient(ellipse at 96% 12%, rgba(201, 162, 75, .22), transparent 38%),
    radial-gradient(ellipse at 80% 100%, rgba(150, 175, 160, .25), transparent 45%), var(--bg);
  --font-title: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  --font-hand: 'Caveat', 'Segoe Script', 'Bradley Hand', cursive;
  --font-ui: 'Roboto', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --base-size: 15px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; color: var(--ink); font: 400 var(--base-size)/1.5 var(--font-ui);
  background: var(--body-bg); background-attachment: fixed; min-height: 100vh;
}
a { color: inherit; }
.hidden { display: none !important; }
.loading { text-align: center; color: var(--muted); padding: 60px 0; font-family: var(--font-title); font-size: 1.4rem; }

/* sheet */
.sheet { max-width: 1100px; margin: 22px auto; background: var(--paper); border-radius: 22px; padding: 20px 34px 14px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.sheet::before { content: ''; position: absolute; inset: 0 auto auto 0; width: 260px; height: 260px; background: radial-gradient(circle, var(--glow), transparent 70%); pointer-events: none; }
.page { position: relative; min-height: 60vh; padding-bottom: 16px; }

/* top nav */
.topnav { position: relative; font-size: .78rem; letter-spacing: .06em; }
.toprow { display: flex; align-items: center; gap: 10px; }
.yearsw { display: flex; align-items: center; gap: 4px; color: var(--brown); font-weight: 500; }
.yearsw a { text-decoration: none; padding: 0 5px; font-size: 1.2rem; line-height: 1; color: var(--gold); }
.months { flex: 1; display: flex; justify-content: space-between; overflow-x: auto; scrollbar-width: none; }
.months a, .days a { text-decoration: none; color: var(--brown); padding: 3px 9px; border-radius: 12px; white-space: nowrap; }
.months a:hover, .days a:hover { background: var(--sage); }
.months a.now, .days a.now { background: linear-gradient(100deg, transparent 0, var(--gold-soft) 10%, var(--gold-soft) 90%, transparent 100%); font-weight: 700; }
.months a.sel { box-shadow: inset 0 -2px 0 var(--accent); }
.days { display: flex; justify-content: space-between; margin: 4px 36px 0 70px; overflow-x: auto; scrollbar-width: none; }
.days a { padding: 3px 6px; font-size: .74rem; }
.days a.sel { background: var(--brown); color: var(--on-brown); }
.burger { text-decoration: none; font-size: 1.5rem; color: var(--gold); padding: 0 4px; }

/* page head */
.phead { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin: 20px 0 14px; }
.ptitle .trow { display: flex; align-items: center; gap: 10px; }
.ptitle h1 { font: 500 2.3rem/1.1 var(--font-title); color: var(--brown); margin: 0; }
.ptitle .sub { margin: 2px 0 0; color: var(--muted); }
.crumb { font-size: .8rem; color: var(--muted); text-decoration: none; }
.crumb:hover { color: var(--accent); }
.pager { text-decoration: none; font-size: 1.8rem; color: var(--gold); line-height: 1; padding: 0 4px; }
.pactions { display: flex; gap: 8px; flex-wrap: wrap; }
.pill { display: inline-block; text-decoration: none; padding: 5px 14px; border: 1px solid var(--pill-bd); border-radius: 8px; background: var(--pill-bg); color: var(--brown); font: 500 .74rem var(--font-ui); letter-spacing: .08em; text-transform: uppercase; cursor: pointer; }
.pill:hover { background: var(--gold-soft); }
.pill.small { padding: 3px 9px; font-size: .7rem; }
.pill.now { background: var(--gold-soft); }

/* fields */
.doc { display: flex; flex-direction: column; gap: 16px; }
.cols { display: grid; gap: 26px; align-items: start; }
.cols-2 { grid-template-columns: 1fr 1fr; }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.field { min-width: 0; }
.flabel { background: var(--sage); border-radius: 4px; padding: 6px 12px; margin-bottom: 8px; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink); text-align: center; box-shadow: 0 1px 0 rgba(0,0,0,.05); }
.hint { margin: 0 0 8px; color: var(--muted); font-size: .85rem; }
.subhead { font: 500 1.4rem var(--font-title); color: var(--brown); margin: 8px 0 0; }
.hand, input.hand, textarea.hand { font-family: var(--font-hand); font-size: 1.3rem; line-height: 1.3; color: var(--hand); }
input[type=text], input[type=email], input[type=password], input[type=time], input[type=number], input[type=date], textarea, select {
  width: 100%; border: 0; border-bottom: 1px dotted var(--rule-dot); background: transparent; padding: 4px 6px; outline: none; color: inherit; font-family: inherit; font-size: inherit; border-radius: 0;
}
textarea { resize: vertical; border: 1px solid var(--line); border-radius: 8px; background: var(--card-a); padding: 8px 10px; }
input:focus-visible, textarea:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
textarea:focus, input[type=text]:focus { background: rgba(250, 240, 210, .35); }
.inline { display: flex; gap: 6px; align-items: center; }
.mini { border: 0; background: var(--blush); border-radius: 50%; width: 30px; height: 30px; cursor: pointer; flex: none; }
.mini.del { position: absolute; top: 6px; right: 6px; background: var(--card); font-size: 1.1rem; line-height: 1; }
.lines .line { display: flex; align-items: baseline; gap: 6px; }
.lines .num { color: var(--muted); font-size: .85rem; width: 16px; text-align: right; }
.lines-cols { display: grid; grid-template-columns: 1fr 1fr; column-gap: 28px; }
.prose { line-height: 1.7; } .prose p { margin: 0 0 .8em; } .prose .lede { font: italic 1.25rem var(--font-title); color: var(--brown); }
.prose .steps { padding-left: 1.2em; } .prose .steps li { margin: .4em 0; }

/* stars / checks */
.stars { display: flex; gap: 4px; }
.star { background: none; border: 0; font-size: 1.9rem; color: var(--star-off); cursor: pointer; padding: 0 2px; }
.star.on { color: var(--gold); }
.checks { display: flex; flex-direction: column; gap: 4px; }
.checks-2 { display: grid; grid-template-columns: 1fr 1fr; grid-auto-flow: column; grid-template-rows: repeat(7, auto); column-gap: 12px; }
.check { display: flex; align-items: flex-start; gap: 8px; cursor: pointer; font-size: .86rem; padding: 2px 0; }
.check input { position: absolute; opacity: 0; width: 0; height: 0; }
.box { flex: none; width: 15px; height: 15px; margin-top: 2px; border-radius: 50%; border: 1.5px solid var(--ctl-border); background: var(--card); }
.check input:checked + .box { background: var(--accent); border-color: var(--accent); box-shadow: inset 0 0 0 3px var(--card); }
.check input:focus-visible + .box { outline: 2px solid var(--gold); outline-offset: 2px; }

/* schedule */
.slot { display: flex; align-items: baseline; border-bottom: 1px solid var(--line); }
.hour { width: 50px; flex: none; color: var(--gold); font-size: .78rem; }

/* mood */
.moods { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.mood { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; border: 1.5px solid transparent; background: var(--card); border-radius: 12px; padding: 5px 8px; cursor: pointer; font: inherit; min-width: 56px; }
.mood .emoji { font-size: 1.4rem; line-height: 1; } .mood .mlabel { font-size: .68rem; color: var(--muted); }
.mood.on { border-color: var(--mc); background: color-mix(in srgb, var(--mc) 28%, var(--card)); }
.mood.sm { flex-direction: row; padding: 4px 10px; min-width: 0; } .mood.sm .emoji { font-size: 1rem; }

/* hydration drops */
.drops { display: flex; gap: 8px; flex-wrap: wrap; }
.drop { width: 22px; height: 22px; border: 1.5px solid var(--drop-bd); background: transparent; border-radius: 0 50% 50% 50%; transform: rotate(-45deg); cursor: pointer; padding: 0; margin: 3px; }
.drop.on { background: var(--drop-on); border-color: var(--drop-on-bd); }
.drop.sm { width: 15px; height: 15px; margin: 2px 4px; }

/* cells (challenges) */
.progress { display: block; color: var(--muted); font-size: .82rem; margin-bottom: 6px; }
.cells { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.cells-2 { grid-template-columns: 1fr 1fr; } .cells-4 { grid-template-columns: repeat(4, 1fr); } .cells-5 { grid-template-columns: repeat(5, 1fr); }
.cell { border: 1px solid var(--ctl-border); background: var(--card-b); border-radius: 8px; padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.cell.done { background: var(--done-bg); border-color: var(--done-bd); }
.cell-desc { margin: 0; font-size: .8rem; color: var(--muted); }
.cell textarea { font-size: 1.1rem; }

/* tables */
.table-wrap { overflow-x: auto; }
.grid-table, .period-table { border-collapse: collapse; width: 100%; font-size: .82rem; }
.grid-table th, .period-table th { background: var(--sage); font-weight: 500; padding: 5px 8px; text-align: left; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.grid-table td, .period-table td { border-bottom: 1px solid var(--line); padding: 0 4px; }
.grid-table td.rl { width: 36px; color: var(--muted); text-align: center; }
.grid-table input, .grid-table select { font-size: 1.1rem; }
.hydration th { background: none; text-align: center; } .hydration th a { text-decoration: none; color: var(--brown); }
.totals, .total { margin-top: 8px; display: inline-flex; gap: 18px; color: var(--brown); }
.calc { color: var(--accent); font-weight: 500; }
.period-table th { text-align: center; padding: 3px; } .period-table td { text-align: center; padding: 1px; border: 1px solid var(--line); }
.period-table td.na { background: var(--na); }
.pcell, .px { width: 100%; min-width: 18px; height: 18px; border: 0; background: transparent; cursor: pointer; padding: 0; display: block; }
i.pcell { display: inline-block; width: 14px; min-width: 14px; height: 14px; margin-right: 4px; vertical-align: middle; border-radius: 50%; }
.pcell.l1 { background: #f2c7c4; } .pcell.l2 { background: #e48e8a; } .pcell.l3 { background: #c4524f; }
.px { height: 20px; border-radius: 3px; }
.pixels td { padding: 1px; } .pixels .px:hover { outline: 1px solid var(--gold); }
.legend { display: flex; gap: 14px; margin-bottom: 8px; font-size: .8rem; align-items: center; color: var(--muted); } .legend.brush { flex-wrap: wrap; gap: 6px; }
.period-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 28px; }
.period-row { display: flex; align-items: baseline; gap: 8px; border-bottom: 1px solid var(--line); } .pm { width: 34px; color: var(--gold); font-size: .78rem; } .pc { width: 56px; font-size: .78rem; color: var(--muted); flex: none; }

/* habits */
.habit-row { display: grid; grid-template-columns: 190px 1fr 30px; gap: 10px; align-items: center; border-bottom: 1px solid var(--line); padding: 4px 0; }
.habit-days { display: grid; grid-template-columns: repeat(16, 1fr); gap: 3px; }
.dot { aspect-ratio: 1; border-radius: 50%; border: 1px solid var(--ctl-border); background: var(--card); font-size: .62rem; color: var(--muted); cursor: pointer; padding: 0; }
.dot.on { background: var(--dot-on); border-color: var(--dot-on-bd); color: var(--on-accent); }
.habit-count { color: var(--accent); font-weight: 500; text-align: center; }

/* scale */
.scale-row { display: flex; justify-content: space-between; gap: 14px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.scale-text { flex: 1 1 320px; } .rates { display: flex; gap: 5px; }
.rate { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--ctl-border); background: var(--card); cursor: pointer; font: inherit; color: var(--muted); }
.rate.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.scale-total { margin-top: 10px; font: 500 1.2rem var(--font-title); color: var(--brown); }

/* wheel */
.wheel { display: grid; grid-template-columns: minmax(260px, 420px) 1fr; gap: 24px; align-items: center; }
.wheel-svg svg { width: 100%; height: auto; }
.slider { display: grid; grid-template-columns: 150px 1fr 26px; align-items: center; gap: 10px; font-size: .85rem; margin: 6px 0; }
.slider input { accent-color: var(--accent); width: 100%; border: 0; }

/* breather */
.breather { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 10px; }
.orb-stage { position: relative; width: 190px; height: 190px; display: grid; place-items: center; }
.orb { position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff3d0, #e8c978 55%, #cf9f4e); box-shadow: 0 0 40px rgba(201, 162, 75, .4); transform: scale(.6); transition: transform 4s ease-in-out; }
.orb-label { position: relative; font: 500 1.5rem var(--font-title); color: var(--brown); }

/* vision */
.vision { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin-bottom: 10px; }
.vimg { position: relative; margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 6px; }
.vimg img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 5px; display: block; }

/* buttons */
.btn { border: 0; background: var(--accent); color: var(--on-accent); border-radius: 10px; padding: 9px 20px; font: 500 .9rem var(--font-ui); cursor: pointer; text-decoration: none; display: inline-block; }
.btn:hover { background: var(--accent-hover); } .btn:disabled { opacity: .6; cursor: wait; }
.btn.ghost { background: transparent; color: var(--accent); border: 1px solid var(--accent); } .btn.ghost:hover { background: var(--blush); }
.btn.danger { color: var(--danger); border-color: var(--danger); }
.link { background: none; border: 0; color: var(--accent); cursor: pointer; text-decoration: underline; font: inherit; }

/* calendar */
.calendar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 14px; }
.dow { text-align: center; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); }
.cd { position: relative; min-height: 70px; border: 1px solid var(--line); border-radius: 10px; padding: 6px 8px; text-decoration: none; background: rgba(255,255,255,.55); display: flex; flex-direction: column; justify-content: space-between; }
.cd:hover { border-color: var(--gold); background: var(--hover-card); } .cd.empty { border: 0; background: none; }
.cd.today { box-shadow: 0 0 0 2px var(--gold-soft); } .cd.filled .dn { color: var(--accent); font-weight: 700; }
.mdot { position: absolute; top: 8px; right: 8px; width: 12px; height: 12px; border-radius: 50%; } .wtr { font-size: .72rem; color: var(--drop-on-bd); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 18px; }
.stat { background: var(--sage); border-radius: 10px; padding: 10px 14px; display: flex; flex-direction: column; } .stat b { font: 500 1.6rem var(--font-title); color: var(--brown); } .stat span { font-size: .75rem; color: var(--muted); }

/* index / lists */
.index-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.band { background: var(--sage); text-align: center; font-weight: 400; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; padding: 6px; border-radius: 4px; margin: 16px 0 8px; }
.mrow { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-bottom: 8px; }
.isec h2 { font: 500 1.2rem var(--font-title); border-bottom: 1.5px solid var(--ink); padding-bottom: 4px; margin: 20px 0 6px; }
.links { list-style: none; padding: 0; margin: 0 0 12px; columns: 1; } .links li { padding: 3px 0; } .links a { text-decoration: none; font-size: .9rem; } .links a:hover { color: var(--accent); text-decoration: underline; }
.links::before { content: none; }
.page > div > .links { columns: 2; margin-bottom: 24px; } .page > div > .links a { font: 500 1.15rem var(--font-title); color: var(--brown); }

/* notes */
.newnotes { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; color: var(--muted); }
.notelist { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.notecard { border: 1px solid var(--line); border-radius: 10px; padding: 12px; text-decoration: none; background: var(--card-b); display: flex; flex-direction: column; gap: 4px; } .notecard:hover { border-color: var(--gold); } .notecard span { font-size: .85rem; color: var(--muted); } .notecard small { color: var(--gold); }
.note-title { font-size: 1.8rem !important; margin-bottom: 10px; }
.note-body { min-height: 460px; border: 1px solid var(--line); width: 100%; }
.tpl-lined { background: repeating-linear-gradient(transparent, transparent 31px, var(--rule) 32px) 0 6px; line-height: 32px !important; }
.tpl-grid { background-image: linear-gradient(var(--rule) 1px, transparent 1px), linear-gradient(90deg, var(--rule) 1px, transparent 1px); background-size: 24px 24px; line-height: 24px !important; }
.tpl-dots { background-image: radial-gradient(var(--rule-dot) 1.2px, transparent 1.4px); background-size: 24px 24px; line-height: 24px !important; }
.cornell { display: grid; grid-template-columns: 1fr 2.4fr; gap: 12px; } .cornell .cues { background-color: var(--pill-bg); }
.note-actions { margin-top: 12px; text-align: right; }
.acct-card { max-width: 480px; } .row { display: flex; gap: 10px; flex-wrap: wrap; }

/* footer */
.footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); font-size: .78rem; }
.acct { color: var(--muted); text-decoration: none; } .acct:hover { color: var(--accent); }
.save-status { color: var(--muted); } .save-status.ok { color: var(--ok); } .save-status.busy { color: var(--gold); } .save-status.err { color: var(--danger); font-weight: 500; }
.fmenu { display: flex; gap: 2px; background: var(--card); border-radius: 10px; padding: 4px 8px; box-shadow: var(--shadow-sm); }
.fmenu a { text-decoration: none; font-size: 1.2rem; padding: 4px 10px; border-radius: 8px; filter: grayscale(.5); } .fmenu a:hover { background: var(--sage); filter: none; }

/* auth */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.auth-card { width: 100%; max-width: 400px; background: var(--paper); border-radius: 22px; padding: 34px 32px; text-align: center; box-shadow: var(--shadow); }
.mandala { font-size: 3rem; color: var(--gold); line-height: 1; } .auth-brand { letter-spacing: .25em; text-transform: uppercase; font-size: .72rem; color: var(--muted); margin: 6px 0 14px; }
.auth-title { font: 500 2.2rem var(--font-title); color: var(--brown); margin: 0; } .auth-sub { color: var(--muted); margin: 4px 0 18px; }
.auth-form { display: flex; flex-direction: column; gap: 12px; text-align: left; } .auth-form input { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--card); }
.form-error { color: var(--danger); margin: 0; min-height: 1.2em; font-size: .88rem; }

@media (max-width: 820px) {
  .sheet { margin: 0; border-radius: 0; padding: 14px 14px 10px; }
  .cols-2, .cols-3, .index-grid, .wheel, .period-summary, .lines-cols, .cells-2 { grid-template-columns: 1fr; }
  .cells-4, .cells-5 { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: 1fr 1fr; }
  .days { margin: 4px 0 0; } .months { gap: 2px; justify-content: flex-start; }
  .habit-row { grid-template-columns: 1fr 30px; } .habit-days { grid-column: 1 / -1; grid-row: 2; grid-template-columns: repeat(11, 1fr); }
  .checks-2 { grid-template-columns: 1fr; grid-auto-flow: row; grid-template-rows: none; }
  .page > div > .links { columns: 1; } .cornell { grid-template-columns: 1fr; }
  .slider { grid-template-columns: 110px 1fr 24px; } .ptitle h1 { font-size: 1.8rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
@media print { .topnav, .footer, .pactions, .btn { display: none; } .sheet { box-shadow: none; } }

/* ---------- logo / brand ---------- */
.brand { display: flex; align-items: center; flex: none; margin-right: 4px; }
.brand img { width: 38px; height: 38px; display: block; filter: drop-shadow(0 2px 4px rgba(0,0,0,.25)); }
.auth-logo { width: 120px; height: 120px; display: block; margin: 0 auto 6px; filter: drop-shadow(0 6px 14px rgba(0,0,0,.3)); }
.acct-logo { width: 72px; height: 72px; float: right; margin: 0 0 8px 12px; }

/* ---------- settings ---------- */
.set-block { margin-bottom: 26px; }
.set-block > h2 { font: 500 1.5rem var(--font-title); color: var(--brown); margin: 0 0 4px; }
.themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-top: 10px; }
.tcard { text-align: left; border: 2px solid var(--line); border-radius: 14px; background: var(--card); padding: 10px; cursor: pointer; color: var(--ink); font: inherit; display: flex; flex-direction: column; gap: 8px; }
.tcard:hover { border-color: var(--gold); }
.tcard.on { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); }
.tcard .tname { font-weight: 500; display: flex; justify-content: space-between; align-items: center; }
.tcard .tdesc { font-size: .78rem; color: var(--muted); margin: 0; }
.tcard .tick { color: var(--accent); }
.tprev { height: 74px; border-radius: 9px; padding: 8px; display: flex; flex-direction: column; gap: 5px; border: 1px solid rgba(0,0,0,.15); }
.tprev .tp-sheet { flex: 1; border-radius: 6px; padding: 5px 6px; display: flex; flex-direction: column; gap: 4px; }
.tprev .tp-line { height: 5px; border-radius: 3px; opacity: .85; }
.tprev .tp-row { display: flex; gap: 4px; align-items: center; margin-top: auto; }
.tprev .tp-dot { width: 9px; height: 9px; border-radius: 50%; }
.tprev .tp-title { font-size: .8rem; line-height: 1; }

.set-tools { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 14px; }
.set-group { border: 1px solid var(--line); border-radius: 12px; background: var(--card-b); margin-bottom: 10px; overflow: hidden; }
.set-head { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: var(--sage); }
.set-head .sname { flex: 1; font: 500 1.15rem var(--font-title); color: var(--brown); }
.set-head .scount { font-size: .78rem; color: var(--muted); }
.set-head .expand { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 1rem; padding: 2px 6px; }
.set-kids { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0 18px; padding: 6px 14px 10px; }
.set-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.set-row .rname { flex: 1; font-size: .9rem; }
.set-group.collapsed .set-kids { display: none; }
.set-group.off .set-kids { opacity: .55; }
.switch { position: relative; width: 38px; height: 22px; flex: none; display: inline-block; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; width: 100%; height: 100%; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: 22px; background: var(--star-off); transition: background .15s; }
.switch i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--card); box-shadow: 0 1px 3px rgba(0,0,0,.35); transition: transform .15s; }
.switch input:checked + i { background: var(--accent); }
.switch input:checked + i::after { transform: translateX(16px); background: var(--on-accent); }
.switch input:indeterminate + i { background: color-mix(in srgb, var(--accent) 55%, var(--star-off)); }
.switch input:indeterminate + i::after { transform: translateX(8px); }
.switch input:focus-visible + i { outline: 2px solid var(--gold); outline-offset: 2px; }
.notice { border: 1px dashed var(--gold); border-radius: 12px; padding: 18px; text-align: center; background: var(--card-b); }
.notice p { margin: 0 0 10px; }
@media (max-width: 820px) { .brand img { width: 30px; height: 30px; } .set-kids { grid-template-columns: 1fr; } }
