@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@500;600;700&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

/* ---------------------------------------------------------------
   Mousekeeping

   White paper, hairline rules, one warm accent. The app itself stays
   quiet — the only thing that gets loud is the flat being untidy,
   which creeps in around the edges as grey outline clutter and sends
   the mouse out for a run.
---------------------------------------------------------------- */

:root{
  --paper:#f2f2f0;          /* the page: very light grey */
  --surface:#ffffff;        /* cards sit on it in white */
  --raise:#f7f7f5;
  --line:#e6e4e0;
  --line-strong:#d8d5d0;

  --ink:#1b1a19;
  --ink-soft:#63605c;
  --ink-faint:#9c9893;

  --blush:#f7b3c4;          /* the accent: light pink */
  --blush-ink:#a8455f;      /* pink dark enough to read as text */
  --blush-soft:#fdeef2;
  --blush-line:#f2cdd7;
  --cheese:#e8a417;
  --cheese-soft:#fdf4e0;
  --leaf:#4f9068;
  --leaf-soft:#eaf3ed;
  --alert:#cc554e;
  --alert-soft:#fbecea;

  --scrap:#dad6d0;           /* the outline clutter */
  --glow:rgba(232,164,23,.30);

  --r:14px;
  --r-sm:10px;
  --safe-b:env(safe-area-inset-bottom,0px);

  --font-display:'Outfit','Plus Jakarta Sans',system-ui,-apple-system,'Segoe UI',sans-serif;
  --font-body:'Plus Jakarta Sans',system-ui,-apple-system,'Segoe UI',Roboto,sans-serif;
}

@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]){
    --paper:#121212;
    --surface:#191918;
    --raise:#202020;
    --line:#2b2a29;
    --line-strong:#3a3937;

    --ink:#f3f1ee;
    --ink-soft:#b3aea8;
    --ink-faint:#807b76;

    --blush:#e8a3b6;
    --blush-ink:#f2b9c8;
    --blush-soft:#2e2226;
    --blush-line:#4a333a;
    --cheese:#e8b64a;
    --cheese-soft:#2b2419;
    --leaf:#6fb287;
    --leaf-soft:#1b2620;
    --alert:#e0736c;
    --alert-soft:#2c1d1c;

    --scrap:#262524;
    --glow:rgba(232,182,74,.22);
  }
}

:root[data-theme="dark"]{
  --paper:#121212;
  --surface:#191918;
  --raise:#202020;
  --line:#2b2a29;
  --line-strong:#3a3937;

  --ink:#f3f1ee;
  --ink-soft:#b3aea8;
  --ink-faint:#807b76;

  --blush:#e8a3b6;
  --blush-ink:#f2b9c8;
  --blush-soft:#2e2226;
  --blush-line:#4a333a;
  --cheese:#e8b64a;
  --cheese-soft:#2b2419;
  --leaf:#6fb287;
  --leaf-soft:#1b2620;
  --alert:#e0736c;
  --alert-soft:#2c1d1c;

  --scrap:#262524;
  --glow:rgba(232,182,74,.22);
}

*{box-sizing:border-box; -webkit-tap-highlight-color:transparent}
html,body{margin:0; padding:0}
body{
  background:var(--paper);
  color:var(--ink);
  font-family:var(--font-body);
  font-size:16px;
  line-height:1.45;
  -webkit-font-smoothing:antialiased;
  overscroll-behavior-y:none;
}
h1,h2,h3{margin:0; font-family:var(--font-display); font-weight:600; letter-spacing:-.015em; text-wrap:balance}
button{font:inherit; color:inherit; cursor:pointer}
:focus-visible{outline:2px solid var(--blush); outline-offset:2px; border-radius:6px}

#app{position:relative; z-index:1; max-width:560px; margin:0 auto; min-height:100dvh; display:flex; flex-direction:column}

/* =============================================================
   THE FLAT'S MOOD — decoration layers, never interactive
============================================================= */

.critter-layer,
.run-layer,
.spark-layer{position:fixed; inset:0; pointer-events:none; overflow:hidden}

/* Clutter is drawn ON the paper, not behind it — on a phone the content
   column is the full width, so anything behind it would never be seen.
   Each scrap hangs mostly off the edge, so what lands on the page is a
   thin grey sliver rather than something competing with the text. */
.critter-layer{z-index:2; color:var(--scrap); opacity:.9}
.scrap{
  position:absolute; display:block; opacity:0;
  animation:scrapIn .8s cubic-bezier(.2,.7,.3,1) forwards;
}
.scrap svg{width:100%; height:100%; display:block}
@keyframes scrapIn{from{opacity:0; transform:scale(.9)} to{opacity:1}}

/* the mouse runs over the content, but under the tab bar */
.run-layer{z-index:25}
/* a good third of the screen wide — you cannot miss it going past */
.mouse-run{position:absolute; left:0; width:min(46vw,380px); will-change:transform}
.mouse-run.ltr{animation:runR var(--dur) linear forwards}
.mouse-run.rtl{animation:runL var(--dur) linear forwards}
@keyframes runR{from{transform:translateX(-50vw)} to{transform:translateX(150vw)}}
@keyframes runL{from{transform:translateX(150vw)} to{transform:translateX(-50vw)}}
.mouse-bob{animation:bob 170ms ease-in-out infinite; transform-origin:50% 50%}
@keyframes bob{
  0%,100%{transform:scale(var(--scale)) translateY(0)}
  50%    {transform:scale(var(--scale)) translateY(-2.5px)}
}
.mouse-bob svg{width:100%; height:auto; display:block}
.mouse-run.rtl .mouse-bob svg{transform:scaleX(-1)}
.mouse-run .m-tail{animation:wag 320ms ease-in-out infinite; transform-origin:30px 54px}
@keyframes wag{0%,100%{transform:rotate(-9deg)} 50%{transform:rotate(9deg)}}

/* the reward */
.spark-layer{z-index:60}
.sweep{
  position:absolute; top:-25%; left:-45%; width:45%; height:150%;
  background:linear-gradient(100deg, transparent 35%, var(--glow) 50%, transparent 65%);
  transform:rotate(6deg);
  animation:sweep 1.05s cubic-bezier(.35,0,.25,1) forwards;
}
@keyframes sweep{to{left:125%}}
.spark{
  position:absolute; color:var(--cheese); font-size:1.15rem; line-height:1;
  opacity:0; transform:scale(0); animation:sparkPop .72s ease-out forwards;
}
@keyframes sparkPop{
  0%  {opacity:0; transform:scale(.2)  rotate(0deg)}
  38% {opacity:1; transform:scale(var(--s)) rotate(20deg)}
  100%{opacity:0; transform:scale(.45) rotate(46deg)}
}

@media (prefers-reduced-motion: reduce){
  .scrap{animation:none; opacity:1}
  .mouse-run, .mouse-bob, .m-tail, .sweep, .spark{animation:none !important; display:none}
  *{animation-duration:.01ms !important; transition-duration:.01ms !important}
}

/* =============================================================
   CHROME
============================================================= */

.topbar{
  display:flex; align-items:center; gap:11px;
  padding:calc(env(safe-area-inset-top,0px) + 16px) 18px 12px;
  position:sticky; top:0; z-index:20;
  background:var(--paper);
  border-bottom:1px solid transparent;
}
.topbar-mouse{width:40px; height:40px; flex:0 0 40px}
.topbar-mouse svg{width:100%; height:100%; display:block}
.topbar-text{flex:1; min-width:0}
.topbar-text h1{font-size:1.18rem; font-weight:700}
.topbar-text p{margin:1px 0 0; font-size:.8rem; color:var(--ink-faint); font-weight:500}
.whoami{
  border:1px solid var(--line-strong); background:var(--surface);
  width:38px; height:38px; border-radius:50%; font-weight:700; font-size:.85rem;
  display:grid; place-items:center; flex:0 0 38px;
}

main{flex:1; padding:2px 18px calc(100px + var(--safe-b))}

.section-title{
  font-size:.7rem; text-transform:uppercase; letter-spacing:.1em;
  color:var(--ink-faint); font-weight:700; margin:26px 2px 10px;
  display:flex; align-items:center; justify-content:space-between; gap:8px;
}
.section-title:first-child{margin-top:10px}

.card{
  background:var(--surface); border:1px solid var(--line);
  border-radius:var(--r); padding:15px; margin-bottom:10px;
}
.card.flush{padding:0; overflow:hidden}

.empty{text-align:center; color:var(--ink-faint); padding:34px 16px; font-size:.9rem}
.empty .big{font-size:2rem; display:block; margin-bottom:10px; opacity:.5}

/* the one place with a tint */
.hero{
  border:1px solid var(--line); border-radius:18px; padding:18px;
  background:var(--surface);
  display:flex; gap:15px; align-items:center; margin:8px 0 4px;
}
.hero-mouse{width:78px; height:78px; flex:0 0 78px}
.hero-mouse svg{width:100%; height:100%}
.hero-copy h2{font-size:1.1rem; line-height:1.25; font-weight:700}
.hero-copy p{margin:6px 0 0; font-size:.86rem; color:var(--ink-soft)}

/* =============================================================
   OCCURRENCE ROWS
============================================================= */

.occ{
  display:flex; align-items:center; gap:13px; padding:14px 15px;
  border-bottom:1px solid var(--line);
}
.occ:last-child{border-bottom:none}
.occ.is-complete{opacity:.42}
.occ.is-complete .occ-title{text-decoration:line-through; text-decoration-color:var(--ink-faint)}
.occ-icon{
  width:36px; height:36px; flex:0 0 36px; border-radius:10px; display:grid; place-items:center;
  font-size:1.08rem; background:var(--raise); border:1px solid var(--line);
}
.occ-main{flex:1; min-width:0}
.occ-title{font-weight:600; font-size:.94rem; display:flex; align-items:center; gap:7px; flex-wrap:wrap}
.occ-sub{display:block; font-size:.78rem; color:var(--ink-faint); margin-top:3px}
.occ-sub b{color:var(--ink-soft); font-weight:600}

.pill{
  font-size:.65rem; font-weight:700; letter-spacing:.05em; text-transform:uppercase;
  padding:3px 8px; border-radius:6px; white-space:nowrap; border:1px solid transparent;
}
.pill.due{background:var(--alert-soft); color:var(--alert)}
.pill.late{background:var(--alert); color:#fff}
.pill.soon{background:var(--cheese-soft); color:var(--cheese)}
.pill.done{background:var(--leaf-soft); color:var(--leaf)}
.pill.mine{background:var(--blush-soft); color:var(--blush-ink)}

.tick{
  flex:0 0 auto; border:1.5px solid var(--line-strong); background:var(--surface);
  width:42px; height:42px; border-radius:50%; display:grid; place-items:center;
  font-size:1rem; color:var(--ink-faint);
  transition:transform .12s ease, background .12s ease, border-color .12s ease;
}
.tick:active{transform:scale(.9)}
.tick.is-done{background:var(--leaf); border-color:var(--leaf); color:#fff}

/* =============================================================
   PEOPLE
============================================================= */

.av{
  width:26px; height:26px; border-radius:50%; display:inline-grid; place-items:center;
  font-size:.68rem; font-weight:700; color:#2a2522; flex:0 0 auto;
}
.av.lg{width:36px; height:36px; font-size:.84rem}
.av.sm{width:20px; height:20px; font-size:.57rem}

/* =============================================================
   ROTA
============================================================= */

.rota-duty{margin-bottom:24px}
.rota-head{display:flex; align-items:center; gap:9px; margin:0 2px 10px}
.rota-head .occ-icon{width:30px; height:30px; flex:0 0 30px; font-size:.95rem; border-radius:9px}
.rota-head h3{font-size:.98rem; flex:1; font-weight:700}
.mode-tag{font-size:.65rem; color:var(--ink-faint); font-weight:600; text-transform:uppercase; letter-spacing:.07em}

/* Left column names the turn, right column holds the person.
   The right-hand tile is the thing you pick up and move. */
.period{
  display:grid; grid-template-columns:1fr 1.35fr; gap:12px; align-items:center;
  padding:10px 12px; border-bottom:1px solid var(--line);
}
.period:last-child{border-bottom:none}
.period.is-now{background:var(--blush-soft)}
.period.is-complete{opacity:.4}

.pcol-when{min-width:0}
.pcol-when b{display:block; font-weight:600; font-size:.88rem}
.pcol-when small{display:block; font-size:.73rem; color:var(--ink-faint); margin-top:1px}
.pcol-who{display:flex; flex-direction:column; gap:6px; min-width:0}

.name-tile{
  display:flex; align-items:center; gap:9px; min-width:0;
  padding:9px 12px; border-radius:12px;
  background:var(--surface); border:1px solid var(--line-strong);
  box-shadow:0 1px 2px rgba(0,0,0,.05);
  font-weight:600; font-size:.86rem;
  cursor:grab; user-select:none; touch-action:none;
}
.name-tile:active{cursor:grabbing}
.name-tile .nt-main{min-width:0; flex:1}
.name-tile .nt-main b{display:block; font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.name-tile .nt-main small{display:block; font-size:.7rem; color:var(--ink-faint); font-weight:500;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.name-tile.dragging{opacity:.25}
.name-tile.is-complete{opacity:.45}
.name-tile.unassigned{color:var(--ink-faint); font-style:italic}

/* the tile being carried: lifted, tilted, shadowed */
.ghost{
  position:fixed; z-index:999; pointer-events:none; margin:0;
  box-shadow:0 18px 38px rgba(0,0,0,.22), 0 3px 8px rgba(0,0,0,.12);
  transform:translate(-50%,-50%) scale(1.04) rotate(-2deg);
  opacity:1 !important;
}
.period.drop-target,
.name-tile.drop-target{
  outline:2px dashed var(--leaf); outline-offset:2px;
  background:var(--leaf-soft); border-radius:12px;
}

.hint{font-size:.78rem; color:var(--ink-faint); margin:9px 4px 0; line-height:1.5}

/* =============================================================
   STARS
============================================================= */

.starrow{display:flex; align-items:center; gap:12px; padding:13px 15px; border-bottom:1px solid var(--line)}
.starrow:last-child{border-bottom:none}
.starrow .rank{width:16px; text-align:center; font-weight:700; color:var(--ink-faint); font-size:.8rem}
.starrow .nm{flex:1; font-weight:600; min-width:0}
.starrow .nm small{display:block; font-weight:500; font-size:.73rem; color:var(--ink-faint); margin-top:1px}
.starcount{font-weight:700; font-size:1rem; display:flex; align-items:center; gap:3px; font-variant-numeric:tabular-nums}
.bar{display:block; height:5px; border-radius:99px; background:var(--line); overflow:hidden; margin-top:7px}
.bar > i{display:block; height:100%; border-radius:99px}

.logrow{display:flex; gap:12px; padding:12px 15px; border-bottom:1px solid var(--line); align-items:flex-start}
.logrow:last-child{border-bottom:none}
.logrow .lt{flex:1; font-size:.85rem; min-width:0}
.logrow .lt small{display:block; color:var(--ink-faint); font-size:.74rem; margin-top:2px}
.logrow .cov{color:var(--blush-ink); font-weight:600}

/* =============================================================
   FORMS
============================================================= */

label.f{display:block; margin:15px 0 0}
label.f > span{
  display:block; font-size:.7rem; font-weight:700; color:var(--ink-faint);
  margin-bottom:6px; text-transform:uppercase; letter-spacing:.09em;
}
input[type=text],input[type=number],input[type=date],select,textarea{
  width:100%; padding:11px 13px; border-radius:var(--r-sm);
  border:1px solid var(--line-strong); background:var(--raise); color:var(--ink); font:inherit;
}
input:focus,select:focus,textarea:focus{outline:2px solid var(--blush); outline-offset:0; border-color:transparent}

.btn{
  border:1px solid transparent; border-radius:var(--r-sm); padding:13px 16px; font-weight:600;
  background:var(--blush); color:#4a2029; width:100%;
}
.btn.alt{background:var(--surface); color:var(--ink); border-color:var(--line-strong)}
.btn.warn{background:transparent; color:var(--alert); border-color:var(--line-strong)}
.btn.cheese{background:var(--blush); color:#4a2029}
.btn:active{transform:translateY(1px)}
.btn-row{display:flex; gap:9px; margin-top:18px}

.seg{display:flex; gap:4px; background:var(--raise); border:1px solid var(--line); padding:3px; border-radius:11px}
.seg button{flex:1; border:none; background:transparent; padding:9px 6px; border-radius:8px; font-size:.82rem; font-weight:600; color:var(--ink-faint)}
.seg button.on{background:var(--surface); color:var(--ink); border:1px solid var(--line)}

.tiny{font-size:.76rem; color:var(--ink-faint); margin:8px 2px 0; line-height:1.5}
.tiny code{background:var(--raise); padding:1px 5px; border-radius:5px; border:1px solid var(--line); word-break:break-all}

.rowline{display:flex; align-items:center; gap:12px; padding:13px 15px; border-bottom:1px solid var(--line)}
.rowline:last-child{border-bottom:none}
.rowline .rl-main{flex:1; min-width:0}
.rowline .rl-main b{font-weight:600; font-size:.92rem}
.rowline .rl-main small{display:block; color:var(--ink-faint); font-size:.75rem; margin-top:1px}
.icon-btn{
  border:1px solid var(--line-strong); background:var(--surface); border-radius:8px;
  padding:7px 11px; font-size:.78rem; font-weight:600; text-decoration:none; color:var(--ink);
}

.switch{position:relative; width:44px; height:26px; flex:0 0 44px}
.switch input{opacity:0; width:100%; height:100%; margin:0; position:absolute; z-index:2}
.switch i{position:absolute; inset:0; background:var(--line-strong); border-radius:99px; transition:.16s}
.switch i::after{content:""; position:absolute; width:20px; height:20px; border-radius:50%; background:#fff; top:3px; left:3px; transition:.16s; box-shadow:0 1px 2px rgba(0,0,0,.2)}
.switch input:checked + i{background:var(--leaf)}
.switch input:checked + i::after{transform:translateX(18px)}

.occ-edit{display:flex; gap:8px; align-items:center; margin-top:9px}
.occ-edit input[type=text]{flex:2}
.occ-edit select{flex:1.4}
.occ-edit .del{border:1px solid var(--line-strong); background:var(--surface); border-radius:8px; padding:10px 12px}

/* =============================================================
   TAB BAR
============================================================= */

.tabbar{
  position:fixed; bottom:0; left:0; right:0; z-index:30;
  max-width:560px; margin:0 auto;
  display:flex; background:var(--paper);
  border-top:1px solid var(--line);
  padding:8px 6px calc(8px + var(--safe-b));
}
.tabbar button{
  flex:1; border:none; background:none; display:flex; flex-direction:column; align-items:center;
  gap:3px; font-size:.62rem; font-weight:600; color:var(--ink-faint); padding:4px 2px; border-radius:9px;
}
.tabbar button .ti{font-size:1.15rem; line-height:1; filter:grayscale(1); opacity:.55}
.tabbar button.active{color:var(--blush-ink)}
.tabbar button.active .ti{filter:none; opacity:1}

/* =============================================================
   SHEET
============================================================= */

.sheet-backdrop{
  position:fixed; inset:0; z-index:100; background:rgba(20,18,17,.42);
  display:flex; align-items:flex-end; justify-content:center;
  animation:fade .16s ease;
}
/* a class rule beats the UA [hidden] style, so say it again louder —
   without this the closed sheet stays a full-screen tap blocker */
.sheet-backdrop[hidden]{display:none}
@keyframes fade{from{opacity:0}to{opacity:1}}
.sheet{
  background:var(--paper); width:100%; max-width:560px;
  border-radius:20px 20px 0 0; max-height:90dvh; overflow:auto;
  padding:8px 20px calc(28px + var(--safe-b));
  animation:slideup .24s cubic-bezier(.2,.8,.3,1);
}
@keyframes slideup{from{transform:translateY(100%)}to{transform:none}}
.sheet-grip{width:36px; height:4px; border-radius:99px; background:var(--line-strong); margin:8px auto 16px}
.sheet h2{font-size:1.1rem; margin-bottom:4px; font-weight:700}
.sheet .sub{font-size:.84rem; color:var(--ink-soft); margin:0 0 10px}

/* =============================================================
   TOAST
============================================================= */

.toast-wrap{
  position:fixed; left:0; right:0; bottom:calc(88px + var(--safe-b)); z-index:200;
  display:flex; flex-direction:column; align-items:center; gap:8px; pointer-events:none; padding:0 18px;
}
.toast{
  background:var(--ink); color:var(--paper); padding:11px 15px; border-radius:11px;
  font-size:.85rem; font-weight:500;
  box-shadow:0 10px 28px rgba(0,0,0,.16);
  display:flex; align-items:center; gap:9px; max-width:100%;
  animation:pop .2s cubic-bezier(.2,.9,.3,1.2);
}
@keyframes pop{from{opacity:0; transform:translateY(10px) scale(.96)}to{opacity:1; transform:none}}
.toast .tm{width:24px; height:24px; flex:0 0 24px}

@keyframes burst{
  0%{transform:translate(-50%,-50%) scale(.3); opacity:1}
  100%{transform:translate(-50%,-50%) scale(2.2); opacity:0}
}
.burst{position:fixed; z-index:300; pointer-events:none; font-size:1.8rem; animation:burst .6s ease-out forwards}


/* =============================================================
   DUTY BADGES — a duty is its colour before it is its name
============================================================= */

.badge{
  border-radius:50%; display:grid; place-items:center; flex:0 0 auto;
  width:44px; height:44px; font-size:1.25rem; line-height:1;
  border:1px solid rgba(0,0,0,.06);
}
.badge.sm{width:30px; height:30px; font-size:.85rem}
.badge.lg{width:58px; height:58px; font-size:1.6rem}

.duty-row{display:flex; align-items:center; gap:14px; padding:14px 15px; border-bottom:1px solid var(--line)}
.duty-row:last-child{border-bottom:none}
.duty-row .dr-main{flex:1; min-width:0}
.duty-row .dr-main b{display:block; font-weight:600; font-size:.98rem}
.duty-row .dr-main small{display:block; color:var(--ink-faint); font-size:.77rem; margin-top:2px}
.duty-row .chev{color:var(--ink-faint); font-size:1.1rem}

/* the header shown when you open one duty */
.detail-head{display:flex; align-items:center; gap:14px; margin:10px 2px 4px}
.detail-head .dh-main{flex:1; min-width:0}
.detail-head h2{font-size:1.2rem; font-weight:700}
.detail-head p{margin:2px 0 0; font-size:.82rem; color:var(--ink-faint)}
.backlink{
  background:none; border:none; padding:6px 2px; margin-top:8px;
  color:var(--ink-faint); font-size:.84rem; font-weight:600;
  display:inline-flex; align-items:center; gap:6px;
}

/* =============================================================
   STARS
============================================================= */

.total-stars{
  text-align:center; padding:22px 16px 20px;
}
.total-stars .n{
  display:block; font-family:var(--font-display); font-weight:700;
  font-size:3.2rem; line-height:1; letter-spacing:-.03em; font-variant-numeric:tabular-nums;
}
.total-stars .cap{
  display:block; margin-top:6px; font-size:.75rem; font-weight:700;
  text-transform:uppercase; letter-spacing:.1em; color:var(--ink-faint);
}

.chart{padding:14px 15px; border-bottom:1px solid var(--line)}
.chart:last-child{border-bottom:none}
.chart-head{display:flex; align-items:center; gap:11px; margin-bottom:12px}
.chart-head b{flex:1; font-weight:600; font-size:.94rem}
.chart-head .tot{font-size:.78rem; color:var(--ink-faint); font-variant-numeric:tabular-nums}

.hbar{display:flex; align-items:center; gap:9px; margin-bottom:7px}
.hbar:last-child{margin-bottom:0}
.hbar .who{width:64px; flex:0 0 64px; font-size:.78rem; color:var(--ink-soft);
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.hbar .track{flex:1; height:16px; background:var(--raise); border-radius:5px; overflow:hidden}
.hbar .fill{display:block; height:100%; border-radius:5px; min-width:2px; transition:width .3s ease}
.hbar .val{width:22px; text-align:right; font-size:.78rem; font-weight:600;
  font-variant-numeric:tabular-nums; color:var(--ink-soft)}

/* =============================================================
   CALENDAR
============================================================= */

.cal-head{display:flex; align-items:center; gap:10px; margin:12px 2px 12px}
.cal-head h2{flex:1; font-size:1.1rem; font-weight:700; text-align:center}
.cal-nav{
  border:1px solid var(--line-strong); background:var(--surface);
  width:36px; height:36px; border-radius:9px; font-size:1rem; display:grid; place-items:center;
}

.cal-grid{display:grid; grid-template-columns:repeat(7,1fr); gap:3px}
.cal-dow{
  text-align:center; font-size:.63rem; font-weight:700; letter-spacing:.06em;
  text-transform:uppercase; color:var(--ink-faint); padding:4px 0 6px;
}
.cal-day{
  position:relative; aspect-ratio:1; border:1px solid transparent; border-radius:9px;
  background:none; display:flex; flex-direction:column; align-items:center; justify-content:flex-start;
  padding:5px 2px 2px; font-size:.82rem; font-weight:500; color:var(--ink);
  font-variant-numeric:tabular-nums;
}
.cal-day.pad{color:var(--ink-faint); opacity:.35}
.cal-day.today{border-color:var(--blush); background:var(--blush-soft); font-weight:700}
.cal-day.chosen{background:var(--ink); color:var(--paper)}
.cal-day.chosen .dots i{outline:1px solid var(--paper)}
.cal-day .dots{display:flex; gap:2px; margin-top:3px; flex-wrap:wrap; justify-content:center}
.cal-day .dots i{width:5px; height:5px; border-radius:50%; display:block}
.cal-day .away-mark{
  position:absolute; top:3px; right:4px; width:5px; height:5px; border-radius:50%;
  background:var(--ink-faint);
}

.day-panel{margin-top:14px}
.away-row{display:flex; align-items:center; gap:10px; padding:11px 15px; border-bottom:1px solid var(--line)}
.away-row:last-child{border-bottom:none}
.away-row .ar-main{flex:1; min-width:0; font-size:.86rem}
.away-row .ar-main small{display:block; color:var(--ink-faint); font-size:.75rem}

.warn-strip{
  display:flex; gap:9px; align-items:flex-start; padding:11px 14px;
  background:var(--alert-soft); border:1px solid var(--alert); border-radius:var(--r-sm);
  font-size:.82rem; color:var(--alert); margin-top:10px;
}

/* =============================================================
   MOUSE PICKER
============================================================= */

.mouse-pick{display:grid; grid-template-columns:repeat(auto-fit,minmax(96px,1fr)); gap:9px; margin-top:6px}
.mouse-opt{
  border:1.5px solid var(--line); background:var(--surface); border-radius:14px;
  padding:10px 6px 9px; text-align:center; cursor:pointer;
}
.mouse-opt.on{border-color:var(--blush); background:var(--blush-soft)}
.mouse-opt svg{width:100%; height:auto; max-width:70px; display:block; margin:0 auto 4px}
.mouse-opt b{display:block; font-size:.76rem; font-weight:600}
.mouse-opt small{display:block; font-size:.66rem; color:var(--ink-faint); line-height:1.3; margin-top:1px}


/* =============================================================
   DUTIES — a grid of big circles
============================================================= */

.duty-grid{
  display:grid; grid-template-columns:repeat(auto-fill, minmax(100px, 1fr));
  gap:18px 12px; margin-top:4px;
}
.duty-tile{
  background:none; border:none; padding:0;
  display:flex; flex-direction:column; align-items:center; gap:9px; text-align:center;
}
.duty-circle{
  width:84px; height:84px; border-radius:50%; display:grid; place-items:center;
  font-size:2.1rem; line-height:1; border:1px solid rgba(0,0,0,.05);
  box-shadow:0 1px 3px rgba(0,0,0,.06);
  transition:transform .12s ease;
}
.duty-tile:active .duty-circle{transform:scale(.94)}
.duty-tile b{font-size:.85rem; font-weight:600; line-height:1.25}
.duty-tile small{display:block; font-size:.72rem; color:var(--ink-faint); margin-top:2px; line-height:1.3}
.duty-tile .dot-due{
  display:inline-block; width:6px; height:6px; border-radius:50%;
  background:var(--alert); margin-right:4px; vertical-align:1px;
}

.duty-add{
  width:84px; height:84px; border-radius:50%;
  border:1.5px dashed var(--line-strong); background:none;
  display:grid; place-items:center; font-size:1.8rem; color:var(--ink-faint);
}


/* the join code, big enough to read down the phone */
.code-show{
  font-family:var(--font-mono, ui-monospace, 'SF Mono', Menlo, Consolas, monospace);
  font-size:1.15rem; font-weight:600; letter-spacing:.06em; text-align:center;
  background:var(--raise); border:1px solid var(--line-strong); border-radius:var(--r);
  padding:16px 12px; margin:14px 0 4px; user-select:all; word-break:break-all;
}
