/* Rotation calendar — look matched to Heyno's calendar screen. */

:root {
  --surface: #FCFCFC;
  --pane: #FFFFFF;
  --text: #0a0a0a;
  --muted: #787774;
  --hair: rgba(0, 0, 0, 0.06);
  --hair-soft: rgba(0, 0, 0, 0.035);
  --divider: rgba(0, 0, 0, 0.14);
  --accent: #0d0d0d;
  --accent-soft: rgba(0, 0, 0, 0.06);
  --accent-line: rgba(0, 0, 0, 0.28);
  --hover: rgba(0, 0, 0, 0.04);
  --active: rgba(0, 0, 0, 0.05);
  --chip-on: rgba(0, 0, 0, 0.08);
  --glass: rgba(255, 255, 255, 0.25);
  --glass-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  --red: #FF3B30;
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'SF Pro Display', Inter, sans-serif;
  --sidebar: 255px;
  --gutter: 62px;
  --pane-w: 400px;
  --colw: 118px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --surface: #000000;
    --pane: #161618;
    --text: #ececed;
    --muted: #8e8e93;
    --hair: rgba(255, 255, 255, 0.06);
    --hair-soft: rgba(255, 255, 255, 0.035);
    --divider: rgba(255, 255, 255, 0.14);
    --accent: #ffffff;
    --accent-soft: rgba(255, 255, 255, 0.10);
    --accent-line: rgba(255, 255, 255, 0.28);
    --hover: rgba(255, 255, 255, 0.065);
    --active: rgba(255, 255, 255, 0.12);
    --chip-on: rgba(255, 255, 255, 0.14);
    --glass: rgba(20, 20, 22, 0.35);
    --glass-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  background: var(--surface);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow: hidden;
}
button, input, select { font: inherit; color: inherit; letter-spacing: inherit; }
button { background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* ---------------------------------------------------------------- shell */
.shell { display: flex; height: 100dvh; }

.sidebar {
  width: var(--sidebar); flex: none;
  border-right: 1px solid var(--hair);
  display: flex; flex-direction: column;
  padding: 14px 12px 12px;
  overflow: auto;
}
.wordmark { display: flex; align-items: baseline; gap: 8px; padding: 2px 10px 10px; }
.wordmark b { font-size: 21px; font-weight: 600; }
.wordmark span { font-size: 12px; color: var(--muted); }

/* Heyno's sidebar nav rows */
.navrows { padding: 0 0 6px; }
.nav-row {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 7px 10px; border-radius: 10px; margin-bottom: 2px;
  font-size: 14px; font-weight: 400; line-height: 18px; text-align: left; color: var(--text);
}
.nav-row:hover { background: var(--hover); }
.nav-row.on { background: var(--active); font-weight: 500; }

.sec-h {
  font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--muted); padding: 12px 10px 6px;
  display: flex; align-items: center; justify-content: space-between;
}
.sec-h button { font-size: 11px; color: var(--muted); text-transform: none; letter-spacing: 0; }
.sec-h button:hover { color: var(--text); }

.row {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 7px 10px; border-radius: 10px; margin-bottom: 2px;
  font-size: 13.5px; line-height: 18px; text-align: left; color: var(--text);
}
.row:hover { background: var(--hover); }
.row.on { background: var(--active); }
.row .n { margin-left: auto; font-size: 11px; color: var(--muted); white-space: nowrap; }
.row.off { opacity: .55; }
.dot {
  width: 8px; height: 8px; border-radius: 50%; flex: none;
  border: 1.5px solid var(--c); background: var(--c);
}
.row.off .dot { background: transparent; }
.row .today { width: 6px; height: 6px; border-radius: 50%; background: var(--red); }

.sidebar .foot { margin-top: auto; padding-top: 12px; }
.sidebar .foot button { font-size: 12px; color: var(--muted); padding: 6px 10px; }
.sidebar .foot button:hover { color: var(--text); }

/* ----------------------------------------------------------------- page */
.page { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar { display: flex; align-items: center; gap: 12px; padding: 14px 24px 10px; }
.tb-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.back-btn { width: 32px; height: 32px; border-radius: 50%; font-size: 24px; line-height: 1; color: var(--text); display: inline-flex; align-items: center; justify-content: center; padding-bottom: 3px; }
.back-btn:hover { background: var(--hover); }
.title { font-size: 26px; letter-spacing: -0.5px; line-height: 1.1; min-width: 0; text-align: left; padding: 2px 8px 2px 4px; border-radius: 10px; }
.title.pick:hover { background: var(--hover); }
.title .chev { display: inline-flex; color: var(--muted); margin: 0 10px 0 6px; vertical-align: 1px; transition: transform .15s; }
.title.open .chev { transform: rotate(90deg); }
.title .cnt { font-size: 13px; font-weight: 400; color: var(--muted); letter-spacing: -0.01em; }
.info-btn { display: inline-flex; color: var(--muted); margin-left: 10px; vertical-align: -1px; padding: 4px; border-radius: 50%; }
.info-btn:hover { color: var(--text); background: var(--hover); }
/* Fields, macOS System-Settings style (as in Darcy's editor): a grouped rounded card whose
   rows are label-left / value-right with inset hairline dividers; the name is a clean line. */
.iname { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.iname input { font-size: 22px; font-weight: 600; border: 0; background: transparent; padding: 4px 0; flex: 1; min-width: 0; outline: none; }
.fgroup { background: var(--accent-soft); border: none; border-radius: 12px; overflow: hidden; }
.frow { position: relative; display: flex; align-items: baseline; gap: 12px; font-size: 13px; padding: 9px 13px; }
.fgroup > .frow:not(:first-child)::before { content: ''; position: absolute; top: 0; left: 13px; right: 13px; height: 1px; background: var(--hair); }
.frow > span { flex: 0 0 auto; min-width: 104px; font-weight: 400; color: var(--muted); }
.frow input { flex: 1 1 auto; min-width: 0; background: transparent; border: none; border-radius: 0; color: var(--text); font-size: 13px; padding: 0; outline: none; }
.frow input::placeholder { color: var(--muted); opacity: .55; }
.title-wrap { position: relative; }
.menu {
  position: absolute; top: 100%; left: 0; z-index: 30; min-width: 220px; margin-top: 6px; padding: 6px;
  background: var(--pane); border: 1px solid var(--hair); border-radius: 12px; box-shadow: 0 12px 40px rgba(0,0,0,.14);
}
.menu .row { padding: 7px 10px; }
.menu .row.on { background: var(--active); }
.title b { font-weight: 600; }
.title span { font-weight: 400; color: var(--muted); }

.seg {
  display: inline-flex; align-items: center; height: 32px; padding: 3px; border-radius: 999px;
  background: var(--glass); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  box-shadow: var(--glass-shadow), inset 0 1px 0 rgba(255,255,255,0.35);
}
.seg button {
  height: 26px; padding: 4px 14px; border-radius: 999px; font-size: 14px; font-weight: 400;
  color: var(--text); white-space: nowrap;
}
.seg button.on { background: var(--chip-on); }
.seg .sep { width: 1px; height: 16px; background: var(--divider); opacity: .8; }
.seg .sep.hide { visibility: hidden; }

.nav {
  display: inline-flex; align-items: center; height: 32px; padding: 3px; border-radius: 999px;
  background: var(--glass); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  box-shadow: var(--glass-shadow), inset 0 1px 0 rgba(255,255,255,0.35);
}
.nav button { height: 26px; padding: 0 12px; border-radius: 999px; font-size: 14px; }
.nav button.arrow { width: 30px; padding: 0; font-size: 18px; line-height: 1; }
.nav button:hover { background: var(--hover); }

.chip {
  height: 32px; padding: 0 14px; border-radius: 999px; font-size: 13px; font-weight: 500;
  background: var(--accent-soft); color: var(--text);
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
.chip.red { background: var(--red); color: #fff; }
.chip.quiet { background: transparent; color: var(--muted); font-weight: 400; }
.chip:hover { filter: brightness(0.96); }
.chip:disabled { opacity: .4; cursor: default; }

/* ----------------------------------------------------------------- grid */
.grid-scroll { flex: 1; overflow: auto; position: relative; }
.grid-head {
  position: sticky; top: 0; z-index: 5;
  display: flex; min-width: max-content;
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  backdrop-filter: blur(24px) saturate(1.6); -webkit-backdrop-filter: blur(24px) saturate(1.6);
  border-bottom: 2px solid var(--divider);
}
.grid-head .gut { width: var(--gutter); flex: none; }
.col-h {
  flex: 1; min-width: var(--colw); width: var(--colw);
  padding: 6px 8px 7px;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  font-size: 12px; font-weight: 400; color: var(--muted); letter-spacing: 0.4px;
  white-space: nowrap; overflow: hidden;
}
.col-h b { font-weight: 500; color: var(--text); overflow: hidden; text-overflow: ellipsis; }
.col-h .cap { font-size: 10px; padding: 1px 5px; border-radius: 999px; background: var(--accent-soft); flex: none; }
.col-h .hrs { font-size: 10px; flex: none; }
.col-h .dot { width: 6px; height: 6px; }

.grid-body { display: flex; position: relative; min-width: max-content; }
.gutter { width: var(--gutter); flex: none; position: relative; }
.gutter .t {
  position: absolute; right: 8px;
  font-size: 12px; color: var(--muted); line-height: 1; text-align: right; white-space: nowrap;
}
.gutter .t small { font-size: 9px; margin-left: 1px; }

.col {
  flex: 1; min-width: var(--colw); width: var(--colw); position: relative;
  border-right: 1px solid var(--hair);
  background-image: repeating-linear-gradient(to bottom, var(--hair) 0 1px, transparent 1px var(--hourpx));
}
.col.target { background-color: var(--hover); }
.closed {
  position: absolute; left: 0; right: 0; z-index: 0; pointer-events: none;
  background: repeating-linear-gradient(135deg, transparent 0 7px, var(--hair-soft) 7px 8px);
}
.col.off .closed { background: repeating-linear-gradient(135deg, transparent 0 7px, var(--hair) 7px 8px); }
.off-label { position: absolute; left: 0; right: 0; top: 40%; text-align: center; font-size: 12px; color: var(--muted); pointer-events: none; }

.now {
  position: absolute; left: 0; right: 0; height: 2px; background: var(--red); z-index: 2; pointer-events: none;
}
.now::before { content: ''; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--red); }
.now-cap {
  position: absolute; right: 4px; transform: translateY(-50%);
  background: var(--red); color: #fff; font-size: 10px; font-weight: 500; padding: 2px 6px; border-radius: 8px; line-height: 1;
}

/* ---------------------------------------------------------------- blocks — Apple Calendar event */
.blk {
  position: absolute; z-index: 1;
  --ink: color-mix(in srgb, var(--c) 62%, #1c1c1e);
  background: color-mix(in srgb, var(--c) 18%, var(--surface));
  border-left: 2px solid var(--c);
  border-radius: 3px;
  padding: 2px 5px 2px 5px;
  overflow: hidden;
  color: var(--ink);
  text-align: left;
  transition: transform 0.08s;
  touch-action: none;
  user-select: none; -webkit-user-select: none;
  cursor: pointer;
}
@media (prefers-color-scheme: dark) {
  .blk { --ink: color-mix(in srgb, var(--c) 78%, #fff); background: color-mix(in srgb, var(--c) 24%, var(--surface)); }
}
.blk.r3 { border-radius: 2px; }
.blk.compact { padding: 0 5px; display: flex; align-items: center; }
.blk:hover { transform: translateY(-0.5px); }
.blk .t1 {
  font-size: 13px; font-weight: 600; line-height: 1.2;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: var(--lines, 1); overflow: hidden;
}
.blk .t2 { font-size: 11px; opacity: .9; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.blk .t3 { font-size: 10.5px; opacity: .75; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.blk.compact .t1 { font-size: var(--cfs, 11px); line-height: 1; -webkit-line-clamp: 1; }
.blk.bad { box-shadow: inset 0 0 0 1.5px var(--red); }
.blk.bad::after {
  content: ''; position: absolute; top: 3px; right: 3px; width: 6px; height: 6px; border-radius: 50%; background: var(--red);
}
.blk.sel { box-shadow: 0 0 0 2px var(--accent); z-index: 3; }
.blk.preview { border: 1.5px dashed var(--c); background: color-mix(in srgb, var(--c) 8%, var(--surface)); z-index: 3; }
.chip.pv { gap: 10px; padding-right: 6px; }
.chip.pv .apply { height: 24px; padding: 0 10px; border-radius: 999px; background: var(--accent); color: var(--surface); font-size: 12px; font-weight: 500; }
.chip.pv .x { color: var(--muted); font-size: 15px; line-height: 1; padding: 0 4px; }
.chip.pv .x:hover { color: var(--text); }
.sugg .preview-btn { height: 26px; padding: 0 12px; border-radius: 999px; background: var(--accent-soft); color: var(--text); font-size: 12.5px; font-weight: 500; flex: none; }
.blk.lifted { opacity: .35; }
.blk.moved { animation: settle .9s ease-out; }
@keyframes settle {
  0%   { box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 70%, transparent), 0 6px 18px rgba(0,0,0,.18); }
  100% { box-shadow: none; }
}

.ghost {
  position: absolute; z-index: 6; pointer-events: none;
  border-radius: 5px;
  border: 1.5px dashed var(--accent-line);
  background: color-mix(in srgb, var(--c) 22%, transparent);
  padding: 3px 6px; font-size: 11px; color: var(--text); line-height: 1.2; overflow: hidden;
}
.ghost.bad { border-color: var(--red); background: color-mix(in srgb, var(--red) 18%, transparent); }
.ghost .time { font-weight: 500; }
body.dragging { cursor: grabbing; }
body.dragging .blk { cursor: grabbing; }

/* ----------------------------------------------------------------- pane */
.pane {
  width: 0; flex: none; overflow: hidden;
  border-left: 1px solid var(--hair);
  background: var(--pane);
  transition: width 0.22s cubic-bezier(0.2, 0, 0, 1);
  display: flex; flex-direction: column;
}
.pane.open { width: var(--pane-w); }
.pane-in { width: var(--pane-w); flex: 1; overflow: auto; padding: 14px 16px 24px; }
.pane .close { float: right; font-size: 12px; color: var(--muted); padding: 4px 8px; border-radius: 8px; }
.pane .close:hover { background: var(--hover); color: var(--text); }
.pane .sec-h { padding-left: 0; padding-right: 0; }

.detail { padding: 8px 0 14px; border-bottom: 1px solid var(--hair); margin-bottom: 6px; }
.detail .name { font-size: 17px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.detail .name .dot { width: 10px; height: 10px; }
.detail .meta { font-size: 13px; color: var(--muted); margin-top: 4px; line-height: 1.5; }
.detail .raw { font-size: 11px; color: var(--muted); margin-top: 6px; opacity: .8; }
.detail .assign { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 12.5px; color: var(--muted); }
select.sel-in, input.txt-in, input.time-in {
  height: 30px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--hair); background: var(--surface); font-size: 13px;
}

.conf { margin: 0 0 16px; }
.conf h4 { font-size: 13.5px; font-weight: 600; line-height: 1.3; }
.conf .why { font-size: 12.5px; color: var(--muted); margin: 2px 0 8px; line-height: 1.4; }
.fix {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 10px 14px; min-height: 44px; border-radius: 12px; margin-bottom: 6px;
  background: var(--tile); border: none; font-size: 13.5px; font-weight: 300; line-height: 1.4; text-align: left;
  transition: background .12s;
}
.fix:hover { background: var(--tile-hover); }
.fix .why { font-size: 11px; color: var(--muted); margin-left: auto; white-space: nowrap; }
.fix.rule::before { content: '✎'; font-size: 11px; opacity: .6; }
.erow { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.erow select, .erow input { height: 30px; border: 0; border-radius: 8px; background: var(--accent-soft); padding: 0 8px; font-size: 13px; color: var(--text); }
.detail .nm-in { font-size: 17px; font-weight: 600; border: 0; background: transparent; padding: 2px 0; flex: 1; min-width: 0; }
.detail .nm-in:focus { outline: none; }
.row.quiet { color: var(--muted); }
.row .dot.plus { border-color: var(--muted); background: transparent; color: var(--muted); width: 12px; height: 12px; font-size: 11px; line-height: 9px; text-align: center; }

.allclear { font-size: 13px; color: var(--muted); padding: 6px 2px 10px; line-height: 1.5; }

.rule {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; min-height: 44px; border-radius: 12px; margin-bottom: 6px;
  background: var(--tile); border: none; font-size: 13.5px; font-weight: 300; line-height: 1.4;
}
.rule.note, .rule.applied { opacity: .7; }
.rule .x { margin-left: auto; color: var(--muted); font-size: 14px; line-height: 1; padding: 0 4px; }
.rule .x:hover { color: var(--text); }
.teach { display: flex; gap: 6px; margin-top: 8px; }
.teach input {
  flex: 1; min-width: 0; height: 34px; padding: 0 12px; border-radius: 10px;
  border: 1px solid var(--hair); background: var(--surface); font-size: 13px;
}
.teach input::placeholder { color: var(--muted); }
.teach button { height: 34px; padding: 0 14px; border-radius: 10px; background: var(--accent); color: var(--surface); font-size: 13px; font-weight: 500; }
.hint { font-size: 11.5px; color: var(--muted); margin-top: 6px; line-height: 1.4; }

/* coach editor */
.staff { padding: 10px 0 12px; border-bottom: 1px solid var(--hair); }
.staff-h { display: flex; align-items: center; gap: 8px; }
.staff-h .dot { width: 10px; height: 10px; }
.staff-h input { flex: 1; min-width: 0; font-weight: 600; font-size: 15px; }
.staff-h .del { font-size: 12px; color: var(--muted); padding: 4px 6px; border-radius: 8px; }
.staff-h .del:hover { color: var(--red); background: var(--hover); }
.hrow { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 12.5px; }
.hrow .d { width: 34px; color: var(--muted); }
.hrow .tg {
  height: 24px; padding: 0 9px; border-radius: 999px; font-size: 11.5px; background: var(--accent-soft); color: var(--muted);
}
.hrow .tg.on { background: var(--accent); color: var(--surface); }
.hrow input.time-in { height: 26px; font-size: 12px; padding: 0 6px; }
.hrow .dash { color: var(--muted); }
.hrow.off input { visibility: hidden; }
.addstaff { display: flex; gap: 6px; margin-top: 8px; padding: 0 4px; }
.addstaff input { flex: 1; min-width: 0; }
.col.hl { background-color: var(--hover); }
.addstaff button { height: 30px; padding: 0 12px; border-radius: 8px; background: var(--accent); color: var(--surface); font-size: 13px; font-weight: 500; }

/* -------------------------------------------------------------- coaches */
.coaches-main { flex: 1; overflow: auto; padding: 8px 24px 40px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; max-width: 1000px; }
.card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  padding: 14px 16px; border-radius: 14px; text-align: left;
  background: var(--pane); border: 1px solid var(--hair);
  transition: transform .08s, box-shadow .12s;
}
.card:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(0,0,0,.07); }
.card.new { border-style: dashed; background: transparent; align-items: center; justify-content: center; min-height: 96px; color: var(--muted); font-size: 26px; font-weight: 300; }
.card-h { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.avatar {
  width: 28px; height: 28px; border-radius: 50%; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--c) 18%, transparent); color: var(--c);
  font-size: 12px; font-weight: 600; letter-spacing: 0;
}
.avatar.tb { width: 32px; height: 32px; font-size: 13px; }
.card .nm { font-size: 16px; font-weight: 600; }
.card .ln { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.card .free { font-size: 12.5px; color: var(--text); }

.profile { max-width: 880px; margin: 0 auto; padding-top: 2px; }
/* Heyno's files tile: solid soft gray, radius 12, 52px, no border, darker on hover. */
:root { --tile: #F1F3F4; --tile-hover: #E8EAED; }
@media (prefers-color-scheme: dark) { :root { --tile: #161618; --tile-hover: #2c2c2f; } }
.sugg { display: flex; align-items: center; gap: 14px; padding: 10px 8px 10px 14px; min-height: 52px; border-radius: 12px; background: var(--tile); border: none; margin-bottom: 8px; font-size: 14px; font-weight: 300; line-height: 1.45; transition: background .12s; }
.sugg:hover { background: var(--tile-hover); }
.sugg .what { flex: 1; min-width: 0; color: var(--text); }
.sugg .what b { font-weight: 500; }
.sugg .apply { height: 26px; padding: 0 12px; border-radius: 999px; background: var(--accent); color: var(--surface); font-size: 12.5px; font-weight: 500; flex: none; }
.openline { font-size: 13px; color: var(--muted); line-height: 1.6; padding: 0 2px 8px; }
.openline b { color: var(--text); font-weight: 500; }
.overview { font-size: 14px; color: var(--muted); line-height: 1.5; padding: 2px 0 14px; }
.overview b { color: var(--text); font-weight: 500; }
.pactions { display: flex; gap: 18px; padding: 18px 0 0; }
.pactions button { font-size: 13px; color: var(--muted); }
.pactions button:hover { color: var(--text); }
.pactions button.danger { color: var(--red); }

/* grouped inset list, the way Settings on iOS lays out rows */
.group { background: var(--pane); border: 1px solid var(--hair); border-radius: 12px; overflow: hidden; margin-bottom: 18px; }
.drow { display: grid; grid-template-columns: 48px 44px 116px 116px 1fr 72px; gap: 10px; align-items: center; padding: 9px 14px; border-bottom: 1px solid var(--hair); font-size: 13.5px; }
.drow:last-child { border-bottom: 0; }
.drow .d { font-weight: 500; }
.sw { width: 36px; height: 22px; border-radius: 11px; background: var(--accent-line); position: relative; flex: none; transition: background .15s; }
.sw::after { content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: left .15s; }
.sw.on { background: #34C759; }
.sw.on::after { left: 16px; }
.drow .time-in { width: 116px; height: 28px; border: 0; border-radius: 8px; background: var(--accent-soft); padding: 0 8px; font-size: 13px; }
.drow.off .time-in, .drow.off .bar, .drow.off .fr, .drow.off .d { opacity: .35; }
.drow.off .time-in { pointer-events: none; }
.drow .fr { text-align: right; color: var(--muted); font-size: 13px; }
.bar { position: relative; height: 10px; border-radius: 5px; background: var(--accent-soft); overflow: hidden; }
.bar span { position: absolute; top: 0; bottom: 0; background: var(--c); opacity: .55; }
.bar span:hover { opacity: .8; }

.prow { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 0 2px; }
.pchip { height: 28px; padding: 0 12px; border-radius: 999px; font-size: 12.5px; display: inline-flex; align-items: center; gap: 6px; background: var(--accent-soft); color: var(--muted); }
.pchip .dot { width: 7px; height: 7px; }
.pchip.on { background: var(--accent); color: var(--surface); }
.pchip.on .dot { border-color: var(--surface); }
.codes input { width: 100%; height: 34px; border: 0; border-radius: 10px; background: var(--accent-soft); padding: 0 12px; font-size: 13px; }
.sub-h { font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); padding: 14px 0 6px; }
.btn { height: 32px; padding: 0 14px; border-radius: 999px; font-size: 13px; font-weight: 500; background: var(--accent); color: var(--surface); display: inline-flex; align-items: center; }
.btn.soft { background: var(--accent-soft); color: var(--text); }
.btn.danger { background: transparent; color: var(--red); }

/* settings overlay */
.overlay { position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,.28); display: flex; align-items: center; justify-content: center; padding: 20px; }
.sheet { width: min(560px, 100%); max-height: 90dvh; overflow: auto; background: var(--surface); border-radius: 18px; box-shadow: 0 20px 60px rgba(0,0,0,.25); padding: 18px 20px 20px; }
.sheet-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.sheet-h b { font-size: 20px; font-weight: 600; }
.sheet .drow { grid-template-columns: 56px 44px 1fr 1fr; }
.sheet .drow.off .time-in { visibility: hidden; }
.sheet .srow { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; font-size: 13.5px; }
.sidebar .foot .nav-row { color: var(--muted); }
.sidebar .foot .nav-row:hover { color: var(--text); }

/* --------------------------------------------------------------- mobile */
.mobilebar { display: none; }
@media (max-width: 900px) {
  .sidebar { display: none; }
  .mobilebar {
    display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 8px 12px;
    border-bottom: 1px solid var(--hair);
  }
  .mobilebar .days { display: flex; gap: 4px; width: 100%; justify-content: space-between; }
  .mobilebar .days button { height: 28px; flex: 1; padding: 0 6px; border-radius: 999px; font-size: 13px; }
  .mobilebar .days button.on { background: var(--red); color: #fff; }
  .mobilebar .chip { flex: none; height: 28px; font-size: 12px; margin-left: auto; }
  .topbar { padding: 8px 12px 6px; gap: 8px; flex-wrap: wrap; }
  .tb-right { width: 100%; margin-left: 0; flex-wrap: wrap; }
  .seg { height: 28px; }
  .seg button { height: 22px; padding: 0 10px; font-size: 13px; }
  .title { font-size: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .tb-right .chip { height: 28px; padding: 0 10px; font-size: 12px; }
  .nav { height: 28px; }
  .nav button { height: 22px; padding: 0 8px; font-size: 13px; }
  .nav button.arrow { width: 26px; }
  :root { --colw: 128px; --gutter: 50px; --pane-w: 100vw; }
  .pane { position: fixed; inset: auto 0 0 0; z-index: 30; height: 72dvh; width: 100vw; border-left: 0; border-top: 1px solid var(--divider);
          border-radius: 12px 12px 0 0; box-shadow: 0 -8px 30px rgba(0,0,0,.18);
          transition: transform .22s cubic-bezier(0.2,0,0,1); transform: translateY(100%); }
  .pane.open { transform: translateY(0); width: 100vw; }
  .pane-in { width: 100vw; padding-bottom: max(24px, env(safe-area-inset-bottom)); }
  .sidebar.open { display: flex; position: fixed; inset: 0; z-index: 25; width: 100vw; background: var(--pane); }
  .wordmark .mobile-only { display: inline-flex; margin-left: auto; height: 28px; }
}
.mobile-only { display: none; }
@media (prefers-reduced-motion: reduce) {
  * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
