:root {
  --bg: #fdf6f0; --card: #fff; --ink: #3a2e2e; --muted: #8a7a7a;
  --L: #e8798b; --R: #5b9bd5; --line: #eadfd8;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #1d1819; --card: #2a2324; --ink: #f2e9e6; --muted: #a39494; --line: #3a3132; }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.4 system-ui, -apple-system, sans-serif;
  padding: env(safe-area-inset-top) 16px env(safe-area-inset-bottom);
}
header { padding: 18px 0 8px; text-align: center; }
.since { font-size: 20px; font-weight: 600; }
.hint { color: var(--muted); font-size: 14px; min-height: 20px; }
main { max-width: 520px; margin: 0 auto; padding-bottom: 40px; }
.timers { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 12px 0; }
.breast {
  border: 3px solid transparent; border-radius: 24px; padding: 22px 8px; color: #fff;
  display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer;
  font: inherit; min-height: 190px; justify-content: center; opacity: .9;
}
#btn-L { background: var(--L); } #btn-R { background: var(--R); }
.breast .lbl { font-size: 22px; font-weight: 700; }
.breast .time { font-size: 40px; font-variant-numeric: tabular-nums; font-weight: 700; }
.breast .act { font-size: 14px; opacity: .9; }
.breast.running { opacity: 1; border-color: var(--ink); animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 9px rgba(0,0,0,.08); } }
.offline { text-align: center; color: #b00020; font-size: 13px; }
.list-head { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; }
h2 { font-size: 18px; margin: 0; }
button.link { background: none; border: 0; color: var(--L); font: inherit; font-weight: 600; padding: 8px 0; }
.day { margin-top: 14px; display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.item {
  display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 12px 14px; margin-top: 8px; width: 100%; text-align: left; font: inherit; color: inherit;
}
.dot { width: 34px; height: 34px; border-radius: 50%; color: #fff; display: grid; place-items: center; font-weight: 700; flex: none; }
.dot.L { background: var(--L); } .dot.R { background: var(--R); }
.item .main { flex: 1; } .item .sub { color: var(--muted); font-size: 13px; }
.item .dur { font-variant-numeric: tabular-nums; font-weight: 600; }
.import { margin-top: 28px; text-align: center; }
.empty { color: var(--muted); text-align: center; margin-top: 24px; }
dialog { border: 0; border-radius: 20px; padding: 20px; width: min(92vw, 400px); background: var(--card); color: var(--ink); }
dialog::backdrop { background: rgba(0,0,0,.45); }
h3 { margin: 0 0 12px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: block; text-align: center; padding: 10px; border: 2px solid var(--line); border-radius: 12px; font-weight: 600; }
.seg input:checked + span { border-color: var(--ink); background: var(--bg); }
.fld { display: block; font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.fld input { display: block; width: 100%; margin-top: 4px; font: 16px system-ui; padding: 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); }
.note { font-size: 12px; color: var(--muted); margin: 0 0 14px; }
.row { display: flex; gap: 8px; align-items: center; } .sp { flex: 1; }
.row button { font: inherit; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); }
.row .primary { background: var(--L); color: #fff; border-color: var(--L); font-weight: 600; }
.row .danger { color: #c62828; }
