*{ box-sizing:border-box; -webkit-tap-highlight-color:transparent; }
html,body{ margin:0; height:100%; }
body{
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(176,108,255,.18), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(108,140,255,.18), transparent 55%),
    var(--bg);
  color:var(--ink);
  font:16px/1.45 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  -webkit-font-smoothing:antialiased;
}
.wrap{ max-width:560px; margin:0 auto; min-height:100%; padding:0 16px calc(96px + env(safe-area-inset-bottom)); }
button{ font:inherit; color:inherit; cursor:pointer; border:none; background:none; }
.hidden{ display:none !important; }

/* ---------- Header ---------- */
.top{ display:flex; align-items:center; gap:10px; padding:18px 4px 12px; position:sticky; top:0; z-index:5;
      background:linear-gradient(var(--bg), rgba(15,18,32,.0)); }
.top .home{ font-size:22px; font-weight:800; letter-spacing:.2px; }
.top .date{ color:var(--muted); font-size:13px; margin-left:auto; text-align:right; }
.ver{ font-size:11px; color:var(--muted); border:1px solid var(--line); padding:2px 7px; border-radius:999px; }

/* ---------- Cards ---------- */
.card{ background:linear-gradient(160deg,var(--card),var(--card2)); border:1px solid var(--line);
       border-radius:var(--radius); box-shadow:var(--shadow); padding:16px; margin:14px 0; }
.card h2{ margin:0 0 4px; font-size:15px; }
.sub{ color:var(--muted); font-size:13px; }

/* ---------- Member (home) ---------- */
.person{ display:flex; align-items:center; gap:12px; margin-bottom:10px; }
.avatar{ width:46px; height:46px; border-radius:50%; display:grid; place-items:center; font-weight:800; font-size:18px; color:#fff; flex:none; box-shadow:inset 0 0 0 2px rgba(255,255,255,.15); }
.person .meta{ flex:1; min-width:0; }
.person .nm{ font-weight:700; }
.progress{ height:8px; border-radius:999px; background:rgba(255,255,255,.08); overflow:hidden; margin-top:6px; }
.progress > i{ display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,var(--pop1),var(--pop2)); transition:width .4s ease; }
.pcount{ font-size:12px; color:var(--muted); white-space:nowrap; }

/* ---------- Item rows ---------- */
.items{ list-style:none; margin:6px 0 0; padding:0; }
.row{ position:relative; display:flex; align-items:center; gap:12px; padding:11px 6px; border-top:1px solid var(--line); }
.row:first-child{ border-top:none; }
.check{ width:28px; height:28px; border-radius:50%; border:2px solid var(--muted); flex:none; display:grid; place-items:center; transition:.15s; }
.check.on{ background:var(--good); border-color:var(--good); }
.check svg{ width:16px; height:16px; opacity:0; transform:scale(.6); transition:.15s; }
.check.on svg{ opacity:1; transform:scale(1); }
.row .t{ flex:1; min-width:0; }
.row .t .ttl{ font-weight:600; }
.row.done .t .ttl{ text-decoration:line-through; color:var(--muted); }
.row .t .meta{ font-size:12px; color:var(--muted); display:flex; gap:8px; flex-wrap:wrap; }
.pill{ font-size:11px; padding:2px 8px; border-radius:999px; background:rgba(255,255,255,.07); }
.pill.med{ background:rgba(255,107,138,.16); color:#ffb3c4; }
.pill.task{ background:rgba(108,140,255,.16); color:#b9c7ff; }
.pill.chore{ background:rgba(57,217,138,.16); color:#a6f0c9; }
.pill.reminder{ background:rgba(255,206,90,.16); color:#ffe6a8; }
.pill.late{ background:rgba(255,107,138,.22); color:#ffb3c4; }
.empty{ text-align:center; color:var(--muted); padding:18px 8px; }

/* ---------- My Day ---------- */
.hero{ text-align:center; padding:8px 0 2px; }
.hero .hi{ font-size:22px; font-weight:800; }
.levelbar{ display:flex; align-items:center; gap:10px; margin-top:8px; }
.levelbar .lvl{ font-weight:800; font-size:13px; padding:4px 10px; border-radius:999px; background:linear-gradient(90deg,var(--pop1),var(--pop2)); color:#fff; }
.xpwrap{ flex:1; }
.bigrow{ padding:15px 8px; }
.bigrow .check{ width:34px; height:34px; }

/* ---------- Add form ---------- */
label.fld{ display:block; margin:12px 0 0; }
label.fld > span{ display:block; font-size:13px; color:var(--muted); margin-bottom:6px; }
input,textarea,select{ width:100%; background:var(--bg2); color:var(--ink); border:1px solid var(--line);
      border-radius:14px; padding:13px 14px; font:inherit; outline:none; }
input:focus,textarea:focus,select:focus{ border-color:var(--accent); }
textarea{ resize:vertical; min-height:64px; }
.chips{ display:flex; gap:8px; flex-wrap:wrap; }
.chip{ padding:10px 14px; border-radius:14px; background:var(--bg2); border:1px solid var(--line); font-weight:600; font-size:14px; }
.chip.on{ background:linear-gradient(160deg,var(--pop1),var(--pop2)); border-color:transparent; color:#fff; }
.btn{ display:block; width:100%; text-align:center; margin-top:16px; padding:15px; border-radius:16px; font-weight:800;
      background:linear-gradient(160deg,var(--pop1),var(--pop2)); color:#fff; box-shadow:var(--shadow); }
.btn.ghost{ background:var(--bg2); color:var(--ink); border:1px solid var(--line); box-shadow:none; }
.btn:active{ transform:translateY(1px); }

/* ---------- Bottom nav ---------- */
.nav{ position:fixed; left:0; right:0; bottom:0; z-index:20;
      padding:8px 10px calc(8px + env(safe-area-inset-bottom));
      background:rgba(20,24,42,.86); backdrop-filter:blur(14px); border-top:1px solid var(--line); }
.nav .inner{ max-width:560px; margin:0 auto; display:flex; }
.nav button{ flex:1; display:flex; flex-direction:column; align-items:center; gap:3px; padding:6px 0; color:var(--muted); font-size:11px; font-weight:600; }
.nav button.on{ color:var(--ink); }
.nav .ic{ font-size:20px; }
.nav .fab{ flex:none; width:54px; }
.nav .fab .ic{ width:46px; height:46px; border-radius:16px; display:grid; place-items:center; margin-top:-18px;
      background:linear-gradient(160deg,var(--pop1),var(--pop2)); color:#fff; font-size:26px; box-shadow:var(--shadow); }
.navbtn.refresh .ic{ display:inline-block; font-size:22px; }
.navbtn.refresh.spinning .ic{ animation:spin .7s linear infinite; }

/* ---------- Login ---------- */
.center{ min-height:100vh; display:flex; flex-direction:column; justify-content:center; align-items:center; padding:24px; }
.pickgrid{ display:grid; grid-template-columns:1fr 1fr; gap:14px; width:100%; max-width:420px; margin-top:8px; }
.pcard{ background:linear-gradient(160deg,var(--card),var(--card2)); border:1px solid var(--line); border-radius:22px; padding:22px 12px; text-align:center; box-shadow:var(--shadow); }
.pcard .avatar{ width:64px; height:64px; font-size:26px; margin:0 auto 10px; }
.pcard .nm{ font-weight:700; }
.pcard .rl{ font-size:12px; color:var(--muted); }
.pad{ display:grid; grid-template-columns:repeat(3,1fr); gap:12px; width:100%; max-width:300px; margin-top:18px; }
.pad button{ aspect-ratio:1; border-radius:50%; background:var(--bg2); border:1px solid var(--line); font-size:24px; font-weight:700; }
.pad button:active{ background:var(--card2); }
.dots{ display:flex; gap:14px; margin-top:18px; }
.dot{ width:16px; height:16px; border-radius:50%; border:2px solid var(--muted); }
.dot.f{ background:var(--accent); border-color:var(--accent); }
.err{ color:var(--bad); font-size:14px; min-height:20px; margin-top:10px; }
.link{ color:var(--muted); text-decoration:underline; font-size:14px; margin-top:18px; }
.toast{ position:fixed; left:50%; bottom:96px; transform:translateX(-50%); background:var(--card2); border:1px solid var(--line);
        padding:10px 16px; border-radius:14px; box-shadow:var(--shadow); font-size:14px; z-index:60; opacity:0; transition:.25s; pointer-events:none; }
.toast.show{ opacity:1; }
@keyframes spin{ to{ transform:rotate(360deg); } }
.spin{ width:22px; height:22px; border:3px solid var(--line); border-top-color:var(--accent); border-radius:50%; animation:spin .8s linear infinite; margin:30px auto; }

/* ---------- Admin toggle ---------- */
.toggle{ display:flex; align-items:center; gap:12px; }
.toggle .sw{ width:48px; height:28px; border-radius:999px; background:rgba(255,255,255,.12); position:relative; transition:.2s; flex:none; }
.toggle .sw::after{ content:""; position:absolute; top:3px; left:3px; width:22px; height:22px; border-radius:50%; background:#fff; transition:.2s; }
.toggle.on .sw{ background:linear-gradient(90deg,var(--pop1),var(--pop2)); }
.toggle.on .sw::after{ transform:translateX(20px); }
.adminbadge{ font-size:11px; font-weight:800; letter-spacing:.4px; padding:2px 8px; border-radius:999px; background:linear-gradient(90deg,var(--pop1),var(--pop2)); color:#fff; }

/* ---------- Servers (admin) ---------- */
.srv-head{ display:flex; align-items:baseline; gap:10px; margin:6px 4px 2px; }
.srv-head h2{ margin:0; font-size:20px; letter-spacing:.5px; }
.srv-grid{ display:grid; grid-template-columns:1fr; gap:12px; }
@media(min-width:520px){ .srv-grid{ grid-template-columns:1fr 1fr; } }
.srv{ background:linear-gradient(160deg,var(--card),var(--card2)); border:1px solid var(--line); border-radius:18px; padding:15px; }
.srv .top2{ display:flex; align-items:center; gap:8px; margin-bottom:12px; }
.srv .dot{ width:11px; height:11px; border-radius:50%; background:var(--muted); flex:none; box-shadow:0 0 0 0 rgba(57,217,138,.5); }
.srv.up .dot{ background:var(--good); animation:pulse 2s infinite; }
.srv.down .dot{ background:var(--bad); }
@keyframes pulse{ 0%{box-shadow:0 0 0 0 rgba(57,217,138,.45);} 70%{box-shadow:0 0 0 7px rgba(57,217,138,0);} 100%{box-shadow:0 0 0 0 rgba(57,217,138,0);} }
.srv .nm{ font-weight:700; flex:1; }
.srv .st{ font-size:11px; font-weight:800; letter-spacing:.5px; padding:3px 9px; border-radius:999px; }
.srv .st.up{ background:rgba(57,217,138,.16); color:#a6f0c9; }
.srv .st.down{ background:rgba(255,107,138,.18); color:#ffb3c4; }
.srv .metrics{ display:grid; grid-template-columns:1fr 1fr; gap:10px 14px; }
.srv .metrics .k{ font-size:10px; letter-spacing:.4px; color:var(--muted); text-transform:uppercase; }
.srv .metrics .v{ font-size:17px; font-weight:700; }
.srv .spark{ display:flex; align-items:flex-end; gap:2px; height:34px; margin-top:12px; }
.srv .spark i{ flex:1; background:linear-gradient(var(--pop1),var(--pop2)); border-radius:2px 2px 0 0; min-height:2px; opacity:.85; }
.srv .desc{ font-size:12px; color:var(--muted); margin-top:10px; }

/* ---------- More hub + Calendar ---------- */
.hubcard{ text-align:left; cursor:pointer; }
.hubcard .hubic{ font-size:26px; }
.hubcard .hubt{ font-weight:700; margin-top:6px; }
.hubcard[data-soon]{ opacity:.5; }
.caldate{ font-size:12px; font-weight:800; letter-spacing:.4px; color:var(--muted); text-transform:uppercase; margin:16px 4px 6px; }
.evrow{ display:flex; align-items:center; gap:12px; padding:12px 14px; }
.evdot{ width:12px; height:12px; border-radius:50%; flex:none; }
.evrow .et{ flex:1; min-width:0; cursor:pointer; }
.evrow .ettl{ font-weight:600; }
.evrow .emeta{ font-size:12px; color:var(--muted); }
.evdel{ width:30px; height:30px; border-radius:8px; background:var(--bg2); border:1px solid var(--line); flex:none; }

/* ---------- Lists (Apple Reminders style) ---------- */
.listgrid{ display:grid; grid-template-columns:1fr 1fr; gap:12px; }
@media(min-width:700px){ .listgrid{ grid-template-columns:1fr 1fr 1fr; } }
.listcard{ text-align:left; cursor:pointer; position:relative; }
.listcard .lic{ width:42px; height:42px; border-radius:12px; display:grid; place-items:center; font-size:22px;
      background:linear-gradient(160deg,var(--pop1),var(--pop2)); }
.listcard .lnm{ font-weight:700; margin-top:10px; }
.listcard .lct{ font-size:13px; color:var(--muted); margin-top:2px; }
.li-head{ display:flex; align-items:center; gap:12px; margin:2px 4px 10px; }
.li-head .lic{ width:38px; height:38px; border-radius:11px; display:grid; place-items:center; font-size:20px; flex:none;
      background:linear-gradient(160deg,var(--pop1),var(--pop2)); }
.li-head h2{ margin:0; font-size:20px; flex:1; }
.li-back{ font-size:14px; color:var(--muted); margin:2px 4px 8px; display:inline-flex; align-items:center; gap:6px; }
.li-row{ position:relative; display:flex; align-items:center; gap:12px; padding:12px 6px; border-top:1px solid var(--line); }
.li-row:first-child{ border-top:none; }
.li-row.done .li-ttl{ text-decoration:line-through; color:var(--muted); }
.li-ck{ width:26px; height:26px; border-radius:50%; border:2px solid var(--muted); flex:none; display:grid; place-items:center; transition:.15s; }
.li-ck.on{ background:var(--good); border-color:var(--good); }
.li-ck svg{ width:15px; height:15px; opacity:0; transform:scale(.6); transition:.15s; }
.li-ck.on svg{ opacity:1; transform:scale(1); }
.li-ttl{ flex:1; min-width:0; font-weight:600; }
.li-ttl .sub2{ display:block; font-weight:400; font-size:12px; color:var(--muted); }
.li-add{ display:flex; gap:8px; margin-top:12px; }
.li-add input{ flex:1; }
.li-add button{ flex:none; width:52px; border-radius:14px; font-size:24px; font-weight:700;
      background:linear-gradient(160deg,var(--pop1),var(--pop2)); color:#fff; }
.completed-hd{ font-size:12px; font-weight:800; letter-spacing:.4px; color:var(--muted); text-transform:uppercase; margin:16px 4px 4px; }

/* ---------- Meals (week plan) ---------- */
.wknav{ display:flex; align-items:center; gap:10px; margin:2px 4px 12px; }
.wknav .wkarrow{ width:40px; height:40px; border-radius:12px; background:var(--bg2); border:1px solid var(--line); font-size:20px; font-weight:700; flex:none; }
.wknav .wklbl{ flex:1; text-align:center; font-weight:700; }
.daycard{ padding:12px 14px; }
.daycard .dhd{ display:flex; align-items:center; gap:8px; margin-bottom:6px; }
.daycard .dhd .dnm{ font-weight:700; flex:1; }
.daycard.today .dhd .dnm{ color:var(--accent); }
.daycard .dhd .dadd{ font-size:13px; font-weight:700; color:var(--accent); }
.mealrow{ display:flex; align-items:center; gap:10px; padding:8px 0; border-top:1px solid var(--line); }
.mealrow:first-of-type{ border-top:none; }
.mealrow .mslot{ font-size:10px; font-weight:800; letter-spacing:.4px; text-transform:uppercase; color:var(--muted); width:62px; flex:none; }
.mealrow .mttl{ flex:1; min-width:0; cursor:pointer; }
.mealrow .mttl .ming{ display:block; font-size:12px; color:var(--muted); }
.mealrow .mtolist{ font-size:12px; font-weight:700; padding:6px 10px; border-radius:999px; background:var(--bg2); border:1px solid var(--line); flex:none; }
.dayempty{ font-size:13px; color:var(--muted); padding:4px 0; }

/* ---------- Bottom sheet (pickers) ---------- */
#sheetBack{ position:fixed; inset:0; background:rgba(0,0,0,.5); z-index:55; opacity:0; pointer-events:none; transition:.2s; }
#sheetBack.open{ opacity:1; pointer-events:auto; }
#sheet{ position:fixed; left:0; right:0; bottom:0; z-index:56; transform:translateY(102%); transition:transform .25s ease;
      background:linear-gradient(160deg,var(--card),var(--card2)); border-top:1px solid var(--line);
      border-radius:22px 22px 0 0; box-shadow:var(--shadow);
      padding:18px 16px calc(20px + env(safe-area-inset-bottom)); max-width:560px; margin:0 auto; }
#sheet.open{ transform:none; }
#sheet h3{ margin:0 0 12px; font-size:16px; }
.sheet-opt{ display:flex; align-items:center; gap:10px; width:100%; text-align:left; padding:13px 12px; border-radius:13px; font-weight:600; border:1px solid var(--line); background:var(--bg2); margin-top:8px; }
.sheet-opt:active{ background:var(--card2); }

/* ---------- Rewards ---------- */
.xpbanner{ display:flex; align-items:center; gap:12px; }
.xpbanner .bigstar{ font-size:30px; }
.xpbanner .bal{ font-weight:800; font-size:22px; }
.rwdgrid{ display:grid; grid-template-columns:1fr 1fr; gap:12px; }
@media(min-width:700px){ .rwdgrid{ grid-template-columns:1fr 1fr 1fr; } }
.rwd{ position:relative; text-align:left; }
.rwd .ric{ font-size:30px; }
.rwd .rttl{ font-weight:700; margin-top:6px; }
.rwd .rcost{ font-size:13px; color:var(--warn); font-weight:700; margin-top:2px; }
.rwd .rbtn{ margin-top:10px; width:100%; padding:9px; border-radius:12px; font-weight:800; font-size:13px;
      background:linear-gradient(160deg,var(--pop1),var(--pop2)); color:#fff; }
.rwd .rbtn:disabled{ opacity:.4; }
.rwd .radmin{ position:absolute; top:8px; right:8px; display:flex; gap:5px; }
.redrow{ display:flex; align-items:center; gap:10px; padding:11px 6px; border-top:1px solid var(--line); }
.redrow:first-child{ border-top:none; }
.redrow .ric{ font-size:20px; flex:none; }
.redrow .rinfo{ flex:1; min-width:0; }
.redrow .rwho{ font-weight:600; }
.redrow .rmeta{ font-size:12px; color:var(--muted); }
.stat{ font-size:11px; font-weight:800; letter-spacing:.4px; padding:3px 9px; border-radius:999px; }
.stat.pending{ background:rgba(255,206,90,.18); color:#ffe6a8; }
.stat.approved{ background:rgba(57,217,138,.16); color:#a6f0c9; }
.stat.denied{ background:rgba(255,107,138,.18); color:#ffb3c4; }
.yn{ width:34px; height:34px; border-radius:10px; border:1px solid var(--line); background:var(--bg2); font-size:15px; flex:none; }
.yn.ok{ background:rgba(57,217,138,.16); }
.yn.no{ background:rgba(255,107,138,.16); }

/* ---------- Board (messages) ---------- */
.postbox{ display:flex; gap:8px; }
.postbox textarea{ flex:1; min-height:44px; }
.postbox button{ flex:none; align-self:flex-end; padding:13px 16px; border-radius:14px; font-weight:800;
      background:linear-gradient(160deg,var(--pop1),var(--pop2)); color:#fff; }
.msg{ display:flex; gap:11px; padding:12px 6px; border-top:1px solid var(--line); }
.msg:first-child{ border-top:none; }
.msg .mbody{ flex:1; min-width:0; }
.msg .mwho{ font-size:12px; color:var(--muted); margin-bottom:2px; }
.msg .mtxt{ white-space:pre-wrap; word-wrap:break-word; }
.msg.pin{ background:rgba(255,206,90,.06); border-radius:12px; }
.msg .mact{ display:flex; gap:5px; flex:none; }
.msgmini{ width:30px; height:30px; border-radius:9px; background:var(--bg2); border:1px solid var(--line); font-size:13px; flex:none; }

/* ---------- Notes ---------- */
.notegrid{ display:grid; grid-template-columns:1fr 1fr; gap:12px; }
@media(min-width:700px){ .notegrid{ grid-template-columns:1fr 1fr 1fr; } }
.note{ position:relative; border-radius:18px; padding:14px; border:1px solid var(--line); cursor:pointer;
      background:linear-gradient(160deg,var(--card),var(--card2)); border-left:4px solid var(--accent); }
.note .ntt{ font-weight:700; margin-bottom:4px; }
.note .nbd{ font-size:13px; color:var(--muted); white-space:pre-wrap; word-wrap:break-word; max-height:120px; overflow:hidden; }
.note .nfoot{ font-size:11px; color:var(--muted); margin-top:8px; }

/* ---------- Archive (admin) ---------- */
.arcgrp{ font-size:12px; font-weight:800; letter-spacing:.4px; color:var(--muted); text-transform:uppercase; margin:14px 4px 4px; }
.arcrow{ display:flex; align-items:center; gap:10px; padding:11px 6px; border-top:1px solid var(--line); }
.arcrow:first-of-type{ border-top:none; }
.arcrow .ainfo{ flex:1; min-width:0; }
.arcrow .albl{ font-weight:600; }
.arcrow .asub{ font-size:12px; color:var(--muted); }
.arcrow .arestore{ font-size:12px; font-weight:700; padding:6px 12px; border-radius:999px; background:var(--bg2); border:1px solid var(--line); flex:none; }

/* ---------- Sidebar (More) ---------- */
#sbBackdrop{ position:fixed; inset:0; background:rgba(0,0,0,.5); z-index:39; opacity:0; pointer-events:none; transition:opacity .25s; }
#sbBackdrop.open{ opacity:1; pointer-events:auto; }
#sidebar{ position:fixed; top:0; left:0; bottom:0; width:284px; max-width:85vw; z-index:40;
          background:linear-gradient(160deg,var(--card),var(--bg2)); border-right:1px solid var(--line);
          transform:translateX(-102%); transition:transform .25s ease; display:flex; flex-direction:column;
          padding:calc(20px + env(safe-area-inset-top)) 0 calc(14px + env(safe-area-inset-bottom)); box-shadow:var(--shadow); }
#sidebar.open{ transform:none; }
.sb-head{ padding:0 20px 12px; font-weight:800; font-size:18px; }
.sb-items{ flex:1; overflow-y:auto; padding:6px 12px; }
.sb-item{ display:flex; align-items:center; gap:13px; width:100%; text-align:left; padding:13px 12px; border-radius:13px; font-weight:600; font-size:15px; color:var(--ink); }
.sb-item:active{ background:rgba(255,255,255,.06); }
.sb-item.on{ background:linear-gradient(90deg,rgba(108,140,255,.28),transparent); }
.sb-item .ic{ font-size:18px; width:22px; text-align:center; flex:none; }
.sb-item .soon{ margin-left:auto; font-size:10px; color:var(--muted); border:1px solid var(--line); padding:1px 7px; border-radius:999px; }
.sb-user{ display:flex; align-items:center; gap:11px; padding:13px 18px 0; margin:6px 14px 0; border-top:1px solid var(--line); }
.sb-user .avatar{ width:40px; height:40px; font-size:16px; }
.sb-user .nm{ font-weight:700; font-size:14px; }
.sb-user .rl{ font-size:12px; color:var(--muted); }
.sb-logout{ margin-left:auto; font-size:13px; font-weight:700; color:var(--bad); }
@media (hover:hover){ .sb-item:hover{ background:rgba(255,255,255,.06); } }
/* Desktop: pin the sidebar open as a permanent column */
@media (min-width:1100px){
  #sidebar{ transform:none; box-shadow:none; }
  #sbBackdrop.open{ opacity:0; pointer-events:none; }
  .wrap{ padding-left:300px; }
  .nav .inner{ padding-left:284px; }
  #navMore{ display:none; }
}

/* ---------- Time stepper ---------- */
.timepick{ display:flex; align-items:center; gap:10px; }
.tstep{ width:46px; height:46px; border-radius:14px; background:var(--bg2); border:1px solid var(--line); font-size:24px; font-weight:700; flex:none; }
.tstep:active{ background:var(--card2); }
.tdisp{ flex:1; text-align:center; font-weight:800; font-size:18px; background:var(--bg2); border:1px solid var(--line); border-radius:14px; padding:12px; }
.tdisp.empty{ color:var(--muted); font-weight:600; }
.tquick{ margin-top:8px; }
.tquick .chip{ padding:8px 12px; font-size:13px; }
.tquick .chip.clear{ margin-left:auto; }

/* ---------- Pill group (same-time meds) ---------- */
.medgroup{ list-style:none; }
.medgroup-head{ display:flex; align-items:center; gap:10px; padding:10px 6px 2px; }
.medgroup-head .lbl{ font-size:12px; font-weight:800; color:var(--muted); letter-spacing:.3px; flex:1; }
.allbtn{ font-size:12px; font-weight:800; padding:7px 13px; border-radius:999px; background:linear-gradient(90deg,var(--pop1),var(--pop2)); color:#fff; }
.allbtn.done{ background:rgba(57,217,138,.18); color:#a6f0c9; }
.medgroup .items{ margin:0; padding-left:8px; border-left:2px solid var(--line); margin-left:6px; }

/* ---------- Swipe to delete (iOS style) ---------- */
.swipe{ position:relative; overflow:hidden; list-style:none; }
.swipe .del{ position:absolute; top:0; right:0; bottom:0; width:84px; display:flex; align-items:center; justify-content:center;
             background:var(--bad); color:#fff; font-weight:800; font-size:14px; border:none; }
.swipe .fg{ position:relative; background:var(--card); transition:transform .22s ease; will-change:transform; touch-action:pan-y; }
.swipe.open .fg{ transform:translateX(-84px); }
.swipe .fg .row{ border-top:none; }
.swipe + .swipe .fg .row{ border-top:1px solid var(--line); }

/* ---------- Row inline actions (desktop) ---------- */
/* Overlay on the right so hover NEVER reflows the row */
.rowact{ position:absolute; right:4px; top:50%; transform:translateY(-50%); display:flex; gap:6px; align-items:center;
         opacity:0; pointer-events:none; transition:opacity .15s; padding-left:24px;
         background:linear-gradient(90deg, rgba(28,33,64,0), var(--card) 30%); }
.ract{ width:32px; height:32px; border-radius:9px; background:var(--bg2); border:1px solid var(--line); font-size:14px; flex:none; }
.ract:hover{ background:var(--card2); }

/* ---------- Responsive: iPhone / iPad / desktop ---------- */
/* iPad & up: roomier column, 2-up family cards, hover controls */
@media (min-width:700px){
  .wrap{ max-width:780px; }
  .nav .inner{ max-width:780px; }
  #homeList{ display:grid; grid-template-columns:1fr 1fr; gap:14px; align-items:start; }
  #homeList .card{ margin:0; }
}
/* Desktop: wide, 3-up cards, mouse hover reveals Edit/Delete (swipe not needed) */
@media (min-width:1100px){
  .wrap{ max-width:1060px; }
  .nav .inner{ max-width:1060px; }
  #homeList{ grid-template-columns:1fr 1fr 1fr; }
}
@media (hover:hover) and (pointer:fine){
  .row:hover .rowact{ opacity:1; pointer-events:auto; }
}
