/* Smart Family Calendar — liquid glass, matte palette.
   Glass is used for chrome (rail, header, sheets, cards) and never for dense
   content: a blurred backdrop behind a week grid costs legibility and paint
   time, and this runs on an old tablet. */

:root {
  --base:      #F1EDE7;   /* matte paper the glass sits on */
  --ink:       #1D1B18;
  --ink-2:     #6B655C;
  --ink-3:     #A39B90;
  --line:      rgba(29, 27, 24, .09);
  --line-soft: rgba(29, 27, 24, .05);
  --accent:    #3B6FD4;
  --now:       #D9453F;
  --ok:        #3E9B74;
  --warn:      #C08A2E;

  --glass:        rgba(255, 255, 255, .55);
  --glass-strong: rgba(255, 255, 255, .74);
  --glass-blur:   blur(22px) saturate(175%);
  /* top highlight + hairline rim + lift: the three layers that read as glass */
  --glass-edge:
    inset 0 1px 0 rgba(255, 255, 255, .85),
    inset 0 0 0 1px rgba(255, 255, 255, .35),
    0 1px 2px rgba(29, 27, 24, .04),
    0 8px 24px rgba(29, 27, 24, .07);

  --r-sm: 12px; --r-md: 18px; --r-lg: 26px; --r-xl: 34px;
  --display: 'Bricolage Grotesque', system-ui, sans-serif;
  --body: 'Inter', system-ui, -apple-system, sans-serif;
}

* { margin: 0; box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  background: var(--base);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: none; cursor: pointer; }
/* Without border:0 the browser's own control border sits on top of the
   inset hairline and reads as a hard black outline. */
input, select, textarea { -webkit-appearance: none; appearance: none; border: 0; }

/* Soft colour blooms — without something behind it, glass has nothing to pick
   up and just looks like flat grey. */
body::before {
  content: ''; position: fixed; inset: -20%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(38% 42% at 12% 8%,  rgba(95, 163, 212, .20), transparent 70%),
    radial-gradient(34% 38% at 88% 14%, rgba(222, 116, 168, .16), transparent 70%),
    radial-gradient(44% 40% at 78% 88%, rgba(79, 181, 140, .16), transparent 70%),
    radial-gradient(36% 36% at 18% 92%, rgba(229, 163, 63, .15), transparent 70%);
  filter: blur(20px);
}

.glass {
  background: var(--glass);
  box-shadow: var(--glass-edge);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  contain: paint;                     /* keeps the blur's paint bounds bounded */
}
@supports not (backdrop-filter: blur(1px)) {
  .glass { background: rgba(255, 255, 255, .93); }
}

/* ══════════ shell ══════════ */
#app { display: grid; height: 100%; grid-template-columns: 84px 1fr; gap: 12px; padding: 12px; }

.rail {
  border-radius: var(--r-lg);
  display: flex; flex-direction: column; align-items: center;
  padding: 14px 0 10px; gap: 4px;
}
.rail .brand {
  width: 34px; height: 34px; border-radius: 11px; margin-bottom: 10px;
  background: linear-gradient(140deg, #5FA3D4, #9B87DC);
  display: grid; place-items: center; color: #fff; font-size: 16px;
}
.rail button {
  width: 60px; height: 58px; border-radius: var(--r-md);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; color: var(--ink-3); transition: background .16s, color .16s;
}
.rail button svg { width: 21px; height: 21px; }
.rail button span { font-size: 9.5px; font-weight: 600; }
.rail button.on { background: rgba(255, 255, 255, .72); color: var(--accent); }
.rail .spacer { flex: 1; }

.pane { display: flex; flex-direction: column; min-width: 0; gap: 12px; }

/* ══════════ header ══════════ */
.head {
  border-radius: var(--r-lg); padding: 12px 18px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.head .fam { font-size: 19px; font-weight: 700; letter-spacing: -.01em; }
.head .sub { font-size: 12.5px; color: var(--ink-2); margin-top: 1px; }
.head-right { display: flex; align-items: center; gap: 14px; }
.head .clock { font-family: var(--display); font-size: 27px; font-weight: 700; line-height: 1; }
.head .wx { font-size: 15px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.head .wx i { font-style: normal; margin-right: 4px; }

.me {
  display: flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px;
  border-radius: 999px; background: rgba(255, 255, 255, .6);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .5);
  font-size: 14px; font-weight: 600;
}
.av {
  width: 28px; height: 28px; border-radius: 50%; flex: none;
  background: var(--c, var(--ink-3)); color: #fff;
  display: grid; place-items: center; font-size: 11px; font-weight: 700;
}
.av.lg { width: 46px; height: 46px; font-size: 16px; }

/* ══════════ toolbar ══════════ */
.bar {
  border-radius: var(--r-lg); padding: 9px 14px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.who { display: flex; gap: 6px; flex-wrap: wrap; min-width: 0; }
.who button {
  display: flex; align-items: center; gap: 7px; padding: 5px 12px 5px 5px;
  border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--ink-2);
  box-shadow: inset 0 0 0 1px var(--line);
}
.who button.plain { padding: 7px 14px; }
.who button.on {
  color: var(--ink); background: color-mix(in srgb, var(--c) 15%, #fff);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 42%, transparent);
}
.nav { display: flex; align-items: center; gap: 6px; flex: none; }
.seg { display: flex; background: rgba(29, 27, 24, .055); border-radius: var(--r-sm); padding: 3px; }
.seg button { padding: 6px 13px; border-radius: 9px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.step {
  width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center;
  color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line);
}
.today-btn { padding: 8px 14px; border-radius: 11px; font-size: 14px; font-weight: 600; box-shadow: inset 0 0 0 1px var(--line); }

/* ══════════ views ══════════ */
.view { flex: 1; min-height: 0; display: flex; gap: 12px; }
.view[hidden] { display: none; }
.card { border-radius: var(--r-lg); padding: 16px 18px; }
.main-col { flex: 1; min-width: 0; display: flex; flex-direction: column; border-radius: var(--r-lg); overflow: hidden; }
.scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 16px; }

h3.lbl {
  font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 10px;
}
.empty { color: var(--ink-3); font-size: 14.5px; padding: 8px 0; }

/* ── calendar grid: kept crisp, no blur behind dense content ── */
.days, .allday, .slots { display: grid; }
.days { border-bottom: 1px solid var(--line); }
.gutter-head { border-right: 1px solid var(--line-soft); }
.dayhead { padding: 9px 10px; border-right: 1px solid var(--line-soft); }
.dayhead:last-child { border-right: none; }
.dayhead .dow { font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.dayhead .dnum { font-family: var(--display); font-size: 25px; font-weight: 700; line-height: 1.1; }
.dayhead.is-today .dow { color: var(--now); }
.dayhead.is-today .dnum { color: #fff; background: var(--now); border-radius: 10px; display: inline-block; padding: 0 9px; }
.is-weekend { background: rgba(29, 27, 24, .022); }
.is-focus { background: rgba(59, 111, 212, .045); }

.allday { border-bottom: 1px solid var(--line); min-height: 32px; }
.allday .gutter {
  border-right: 1px solid var(--line-soft); font-size: 10px; font-weight: 700;
  color: var(--ink-3); text-transform: uppercase; letter-spacing: .08em;
  display: flex; align-items: center; justify-content: flex-end; padding-right: 8px;
}
.allday .cell { border-right: 1px solid var(--line-soft); padding: 4px; display: flex; flex-direction: column; gap: 3px; }
.allday .cell:last-child { border-right: none; }

.pill {
  border-radius: 7px; padding: 3px 8px; font-size: 13.5px; font-weight: 600;
  background: color-mix(in srgb, var(--c) 17%, #fff);
  color: color-mix(in srgb, var(--c) 72%, #000);
  border-left: 3px solid var(--c);
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis; cursor: pointer;
}
.pill.done { opacity: .45; text-decoration: line-through; }

.grid-wrap { flex: 1; min-height: 0; position: relative; overflow: hidden; }
.slots { position: absolute; inset: 0; }
.hour-gutter { border-right: 1px solid var(--line-soft); position: relative; }
.hour-gutter .hr { position: absolute; right: 8px; transform: translateY(-50%); font-size: 11.5px; font-weight: 600; color: var(--ink-3); white-space: nowrap; }
.daycol { border-right: 1px solid var(--line-soft); position: relative; }
.daycol:last-child { border-right: none; }
.hline { position: absolute; left: 0; right: 0; border-top: 1px solid var(--line-soft); }

.block {
  position: absolute; left: 3px; right: 3px; border-radius: 9px; padding: 5px 8px;
  overflow: hidden; cursor: pointer;
  background: color-mix(in srgb, var(--c) 17%, #fff);
  border-left: 3px solid var(--c);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6);
}
.block .t {
  font-size: 14px; font-weight: 700; line-height: 1.2;
  color: color-mix(in srgb, var(--c) 74%, #000);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.block.no-sub .t { -webkit-line-clamp: 1; }
.block .s { font-size: 12px; font-weight: 500; margin-top: 1px; color: color-mix(in srgb, var(--c) 58%, #000); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.block.tiny { padding: 2px 8px; }
.block.tiny .t { font-size: 12.5px; -webkit-line-clamp: 1; white-space: nowrap; text-overflow: ellipsis; }
.block.done { opacity: .45; }
.block.done .t { text-decoration: line-through; }

.nowline { position: absolute; left: 0; right: 0; border-top: 2px solid var(--now); z-index: 3; pointer-events: none; }
.nowline::before { content: ''; position: absolute; left: -5px; top: -5px; width: 9px; height: 9px; border-radius: 50%; background: var(--now); }

/* ── side rail ── */
.side { width: 262px; flex: none; display: flex; flex-direction: column; gap: 12px; overflow: hidden; }
.pay { display: flex; align-items: center; gap: 9px; padding: 7px 0; border-bottom: 1px solid var(--line-soft); cursor: pointer; }
.pay:last-child { border-bottom: none; }
.pay .txt { flex: 1; min-width: 0; }
.pay .n { font-size: 14.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pay .d { font-size: 12px; color: var(--ink-3); }
.pay .amt { font-family: var(--display); font-size: 16px; font-weight: 700; }
.tag { font-size: 10.5px; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: rgba(29,27,24,.06); color: var(--ink-2); }
.tag.soon { background: rgba(192,138,46,.15); color: #8C6215; }
.tag.due  { background: rgba(217,69,63,.14); color: #A5322D; }
.tag.paid { background: rgba(62,155,116,.15); color: #2C6B43; }
.pay.is-paid { opacity: .45; }

.cd { display: flex; align-items: baseline; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line-soft); }
.cd:last-child { border-bottom: none; }
.cd .num { font-family: var(--display); font-size: 27px; font-weight: 800; line-height: 1; color: var(--c); min-width: 42px; }
.cd .num small { font-family: var(--body); font-size: 10.5px; font-weight: 600; color: var(--ink-3); display: block; }
.cd .n { font-size: 14.5px; font-weight: 600; }
.cd .d { font-size: 12px; color: var(--ink-3); }

/* ══════════ chores / lists / meals ══════════ */
.cols { display: grid; gap: 12px; align-items: start; }
.person-card .top { display: flex; align-items: center; gap: 10px; margin-bottom: 11px; }
.person-card .nm { font-size: 17px; font-weight: 700; flex: 1; }
.stars { font-size: 14px; font-weight: 700; color: #A8781F; white-space: nowrap; }
.task {
  display: flex; align-items: center; gap: 11px; width: 100%; text-align: left;
  padding: 10px; border-radius: 13px; background: rgba(255,255,255,.5); margin-bottom: 6px;
}
.task .box {
  width: 25px; height: 25px; border-radius: 8px; flex: none;
  box-shadow: inset 0 0 0 2px var(--c); display: grid; place-items: center;
  color: #fff; font-size: 14px; font-weight: 700;
}
.task.done .box { background: var(--c); }
.task .lbl2 { flex: 1; font-size: 15.5px; font-weight: 600; }
.task.done .lbl2 { text-decoration: line-through; color: var(--ink-3); }
.task .pts { font-size: 12.5px; font-weight: 700; color: #A8781F; }

.meal-grid { display: grid; gap: 7px; }
.meal-grid .rowlab { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); display: flex; align-items: center; }
.meal-grid .dh { text-align: center; padding-bottom: 3px; }
.meal-grid .dh .dow { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.meal-grid .dh .dnum { font-family: var(--display); font-size: 19px; font-weight: 700; }
.meal-grid .dh.is-today .dnum { color: var(--now); }
.meal {
  border-radius: 13px; padding: 9px; min-height: 56px; font-size: 14.5px; font-weight: 600;
  line-height: 1.35; background: rgba(255,255,255,.5); box-shadow: inset 0 0 0 1px var(--line-soft);
  cursor: pointer; text-align: left; width: 100%;
}
.meal:empty::after { content: '+'; color: var(--ink-3); font-weight: 500; font-size: 18px; }

.li { display: flex; align-items: center; gap: 11px; width: 100%; text-align: left; padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
.li:last-of-type { border-bottom: none; }
.li .box { width: 22px; height: 22px; border-radius: 7px; flex: none; box-shadow: inset 0 0 0 2px var(--ink-3); display: grid; place-items: center; font-size: 13px; color: #fff; }
.li.done .box { background: var(--ok); box-shadow: inset 0 0 0 2px var(--ok); }
.li .lbl2 { flex: 1; font-size: 15.5px; }
.li.done .lbl2 { text-decoration: line-through; color: var(--ink-3); }
.li .x { color: var(--ink-3); font-size: 17px; padding: 0 4px; }
.additem { display: flex; gap: 8px; margin-top: 9px; }
.additem input { flex: 1; }
.additem button { flex: none; width: 42px; border-radius: 12px; background: var(--accent); color: #fff; font-size: 21px; }

/* ══════════ FAB ══════════ */
.fab {
  position: fixed; right: 22px; bottom: 22px; z-index: 12;
  width: 58px; height: 58px; border-radius: 20px;
  background: linear-gradient(150deg, #4C7EE0, #3B6FD4);
  color: #fff; font-size: 29px; line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 10px 26px rgba(59,111,212,.38);
}
.fab:active { transform: scale(.95); }

/* ══════════ sheets ══════════ */
.scrim { position: fixed; inset: 0; z-index: 20; background: rgba(29,27,24,.28); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.sheet {
  position: fixed; z-index: 21; right: 12px; top: 12px; bottom: 12px; width: 440px; max-width: calc(100vw - 24px);
  border-radius: var(--r-xl); display: flex; flex-direction: column; overflow: hidden;
  background: var(--glass-strong); box-shadow: var(--glass-edge);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
}
.sheet-top { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 12px; flex: none; }
.sheet-top h2 { font-size: 20px; font-weight: 700; }
.sheet-body { flex: 1; min-height: 0; overflow-y: auto; padding: 0 20px 16px; }
.sheet-foot { flex: none; display: flex; gap: 9px; padding: 12px 20px calc(16px + env(safe-area-inset-bottom)); }
.icon-btn { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-size: 16px; box-shadow: inset 0 0 0 1px var(--line); }

.field { display: block; margin-top: 14px; }
.field > span, .field-label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.field-label { margin-top: 14px; }
input[type=text], input[type=email], input[type=password], input[type=date],
input[type=time], input[type=number], select, textarea {
  width: 100%; border-radius: 13px; padding: 12px 13px; font-size: 16px; outline: none;
  background: rgba(255,255,255,.72); box-shadow: inset 0 0 0 1px var(--line);
  color-scheme: light;
}
input:focus, select:focus, textarea:focus { box-shadow: inset 0 0 0 2px var(--accent); }
textarea { min-height: 72px; resize: vertical; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
select { background-image: none; }

.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip { border-radius: 999px; padding: 8px 14px; font-size: 14.5px; font-weight: 600; color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); background: rgba(255,255,255,.5); }
.chip.on { color: var(--ink); background: color-mix(in srgb, var(--c, var(--accent)) 16%, #fff); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--c, var(--accent)) 46%, transparent); }
.chips.days .chip { padding: 8px 0; width: 40px; text-align: center; }
.chips.people .chip { display: flex; align-items: center; gap: 7px; padding: 5px 13px 5px 5px; }
.chips.people .chip .av { width: 24px; height: 24px; font-size: 10px; }

.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-radius: 14px; padding: 12px 13px; margin-top: 14px; background: rgba(255,255,255,.55); box-shadow: inset 0 0 0 1px var(--line); }
.t-label { font-size: 15px; font-weight: 600; }
.t-sub { font-size: 12px; color: var(--ink-2); margin-top: 2px; }
.switch { position: relative; width: 44px; height: 26px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; }
.switch .knob { position: absolute; inset: 0; border-radius: 999px; background: rgba(29,27,24,.16); transition: background .15s; pointer-events: none; }
.switch .knob::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.switch input:checked + .knob { background: var(--accent); }
.switch input:checked + .knob::after { transform: translateX(18px); }

.btn { flex: 1; border-radius: 15px; padding: 14px; font-size: 16px; font-weight: 700; }
.btn.save { background: var(--accent); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 6px 16px rgba(59,111,212,.3); }
.btn.ghost { background: rgba(255,255,255,.55); box-shadow: inset 0 0 0 1px var(--line); }
.btn.del { flex: 0 0 54px; background: rgba(217,69,63,.12); color: var(--now); font-size: 18px; }
.btn.del.confirm { flex: 0 0 auto; padding: 14px 16px; background: var(--now); color: #fff; font-size: 14.5px; }
.btn:disabled { opacity: .55; }

.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch { width: 38px; height: 38px; border-radius: 50%; background: var(--c); position: relative; box-shadow: inset 0 1px 0 rgba(255,255,255,.4); }
.swatch.on::after { content: '✓'; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 17px; font-weight: 700; }

.row-card { display: flex; align-items: center; gap: 11px; width: 100%; text-align: left; border-radius: 15px; padding: 11px 13px; margin-bottom: 7px; background: rgba(255,255,255,.55); box-shadow: inset 0 0 0 1px var(--line); }
.row-card .grow { flex: 1; min-width: 0; }
.row-card .title { font-size: 15.5px; font-weight: 600; }
.row-card .sub { font-size: 12.5px; color: var(--ink-2); margin-top: 1px; }

/* ══════════ auth ══════════ */
#gate { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 20px; overflow-y: auto; }
.gate-box { width: 100%; max-width: 400px; border-radius: var(--r-xl); padding: 28px; }
.gate-mark { width: 48px; height: 48px; border-radius: 15px; background: linear-gradient(140deg, #5FA3D4, #9B87DC); display: grid; place-items: center; color: #fff; font-size: 22px; margin-bottom: 16px; }
.gate-box h1 { font-size: 25px; font-weight: 700; letter-spacing: -.02em; }
.gate-box .lede { color: var(--ink-2); font-size: 14.5px; margin-top: 6px; line-height: 1.5; }
.gate-err { color: var(--now); font-size: 13.5px; font-weight: 600; margin-top: 12px; min-height: 18px; }
.gate-alt { text-align: center; margin-top: 16px; font-size: 14px; color: var(--ink-2); }
.gate-alt button { color: var(--accent); font-weight: 700; }
.people-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; margin-top: 18px; }
.pick {
  border-radius: var(--r-md); padding: 14px 8px; display: flex; flex-direction: column;
  align-items: center; gap: 8px; background: rgba(255,255,255,.55);
  box-shadow: inset 0 0 0 1px var(--line); font-size: 13.5px; font-weight: 600;
}
.pick .role { font-size: 11px; color: var(--ink-3); font-weight: 500; }

/* ══════════ toast ══════════ */
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 30;
  background: rgba(29,27,24,.9); color: #fff; border-radius: 13px; padding: 11px 18px;
  font-size: 14px; font-weight: 600; opacity: 0; transition: opacity .2s;
  pointer-events: none; max-width: 86vw; text-align: center;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.toast.show { opacity: 1; }

/* ══════════ sleep ══════════ */
#sleep { position: fixed; inset: 0; z-index: 35; background: #06070A; color: #333A48; display: grid; place-items: center; }
#sleep .t { font-family: var(--display); font-size: 82px; font-weight: 800; line-height: 1; text-align: center; }
#sleep .d { font-size: 16px; font-weight: 500; text-align: center; margin-top: 6px; }
#sleep .hint { position: absolute; bottom: 24px; left: 0; right: 0; text-align: center; font-size: 12px; color: #212632; }

.tabs { display: none; }

/* ══════════ phone ══════════ */
@media (max-width: 1023px) {
  #app { grid-template-columns: 1fr; padding: 8px 8px 0; gap: 8px; }
  .rail { display: none; }
  .side { display: none; }
  .pane { gap: 8px; padding-bottom: 74px; }
  .head { padding: 10px 14px; }
  .head .fam { font-size: 17px; }
  .head .clock { font-size: 21px; }
  .head .wx { display: none; }
  .bar { padding: 8px 10px; }
  .who { display: none; }
  .seg button { padding: 6px 11px; font-size: 13.5px; }
  .sheet { right: 0; left: 0; top: auto; bottom: 0; width: auto; max-width: none; border-radius: var(--r-xl) var(--r-xl) 0 0; max-height: 94vh; }
  .fab { right: 16px; bottom: 84px; }
  .tabs {
    position: fixed; left: 8px; right: 8px; bottom: 8px; z-index: 11;
    display: grid; grid-template-columns: repeat(5, 1fr); border-radius: var(--r-lg);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .tabs button { padding: 6px 0; display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--ink-3); font-size: 9.5px; font-weight: 600; border-radius: 13px; }
  .tabs button svg { width: 20px; height: 20px; }
  .tabs button.on { color: var(--accent); background: rgba(255,255,255,.6); }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ══════════ subscription banner ══════════ */
.banner {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  border-radius: var(--r-md); padding: 10px 16px; font-size: 14.5px; font-weight: 600;
  background: rgba(59,111,212,.10); color: #24457F;
  box-shadow: inset 0 0 0 1px rgba(59,111,212,.18);
}
.banner.warn { background: rgba(192,138,46,.13); color: #7A5410; box-shadow: inset 0 0 0 1px rgba(192,138,46,.22); }
.banner button {
  flex: none; padding: 7px 15px; border-radius: 999px; font-size: 13.5px; font-weight: 700;
  background: var(--accent); color: #fff;
}
.banner.warn button { background: #A8761E; }

.offline-flag {
  font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: 4px 9px; border-radius: 999px; background: rgba(29,27,24,.08); color: var(--ink-2);
}
.rail .brand { display: grid; place-items: center; text-decoration: none; }
.rail .brand img { width: 34px; height: 34px; border-radius: 11px; }
.stamp { position: fixed; right: 10px; bottom: 4px; font-size: 10px; color: var(--ink-3); }
@media (max-width: 1023px) { .stamp { display: none; } }
