/* 색소폰 연습실 — 흰색·검정 기본 테마. 화면 오른쪽 위 버튼으로 자동 / 밝게 / 어둡게 */
:root {
  color-scheme: light;
  --bg: #f4f4f5;
  --card: #ffffff;
  --ink: #111111;
  --muted: #6b6b70;
  --line: #e2e2e5;
  --accent: #111111;
  --accent-ink: #ffffff;
  --accent-soft: #ebebed;
  --good: #1f9d63;
  --near: #c98a0e;
  --far: #dc3352;
  --track: #e8e8eb;
}
/* 어두운 화면: 휴대폰이 어두운 모드일 때(자동) 또는 직접 「어둡게」를 고르면 */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #000000;
    --card: #141416;
    --ink: #f2f2f3;
    --muted: #9a9aa1;
    --line: #2a2a2e;
    --accent: #f2f2f3;
    --accent-ink: #000000;
    --accent-soft: #26262a;
    --good: #3cc483;
    --near: #e8b03a;
    --far: #f0607a;
    --track: #26262a;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #000000;
  --card: #141416;
  --ink: #f2f2f3;
  --muted: #9a9aa1;
  --line: #2a2a2e;
  --accent: #f2f2f3;
  --accent-ink: #000000;
  --accent-soft: #26262a;
  --good: #3cc483;
  --near: #e8b03a;
  --far: #f0607a;
  --track: #26262a;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", system-ui, sans-serif;
  -webkit-tap-highlight-color: transparent;
  font-variant-emoji: text;
  overflow-x: hidden;
  word-break: keep-all; overflow-wrap: anywhere;
}
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { opacity: .45; cursor: default; }
input { font: inherit; color: inherit; }

.app {
  max-width: 480px;
  margin: 0 auto;
  padding: calc(12px + env(safe-area-inset-top)) 16px calc(96px + env(safe-area-inset-bottom));
}

.top { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.top h1 { flex: 1; }
.theme-btn {
  display: flex; align-items: center; gap: 4px; border: 1px solid var(--line); background: var(--card);
  border-radius: 99px; padding: 5px 10px 5px 8px; font-size: 13px; font-weight: 700; color: var(--muted);
}
.theme-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.top h1 { margin: 0; font-size: 20px; font-weight: 800; }
.top .tool { color: var(--muted); font-weight: 700; }

/* 공용 */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px; margin-bottom: 12px; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.row.sep { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.sep-top { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.label { font-weight: 800; }
.label.sm { font-size: 15px; }
.sublabel { font-size: 13px; font-weight: 700; color: var(--muted); margin: 12px 0 6px; }
.hint { font-size: 13px; color: var(--muted); }
.hint.warn { color: var(--near); margin: 8px 0 0; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.start {
  width: 100%; margin: 12px 0; padding: 16px; border: 0; border-radius: 16px;
  background: var(--accent); color: var(--accent-ink); font-size: 18px; font-weight: 800;
}
.start.on, .start.ghost { background: var(--card); color: var(--ink); border: 1px solid var(--line); }
.play { width: 100%; padding: 12px; border-radius: 12px; border: 1px solid var(--accent); background: transparent; color: var(--accent); font-weight: 800; margin-top: 12px; }
.play.on { background: var(--accent); color: var(--accent-ink); }
.link { border: 0; background: none; padding: 8px 0 0; color: var(--accent); font-weight: 700; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }
.error { background: color-mix(in srgb, var(--far) 14%, var(--card)); border: 1px solid var(--far); border-radius: 12px; padding: 10px 12px; margin: 0 0 12px; font-size: 15px; }

.stepper { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.stepper button, .ref > button, .cal-head > button {
  width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); font-size: 20px; font-weight: 700; flex-shrink: 0;
}
.stepper span { min-width: 44px; text-align: center; font-weight: 800; font-size: 18px; font-variant-numeric: tabular-nums; }

.seg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-top: 10px; }
.seg.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.seg.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.seg button { padding: 10px 4px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); font-size: 14px; font-weight: 700; min-width: 0; }
.seg button.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

.switch {
  flex-shrink: 0; width: 54px; height: 32px; border-radius: 99px; border: 0; padding: 0;
  background: var(--track); position: relative; transition: background .15s;
}
.switch::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s;
}
.switch[aria-pressed="true"] { background: var(--accent); }
.switch[aria-pressed="true"]::after { transform: translateX(22px); }

input[type="range"] { width: 100%; accent-color: var(--accent); height: 28px; margin: 0; }

.tips { font-size: 14px; color: var(--muted); padding: 0 4px; }
.tips b { color: var(--ink); }
.tips ul { margin: 6px 0 0; padding-left: 18px; }
.tips li { margin-bottom: 4px; }

.credits { margin: 20px 4px 0; font-size: 12px; color: var(--muted); }
.credits summary { cursor: pointer; font-weight: 700; }
.credits ul { margin: 6px 0 0; padding-left: 16px; }
.credits li { margin-bottom: 3px; }

/* 아래쪽 탭 */
.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: flex; justify-content: center; gap: 4px;
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
}
.tabs button {
  flex: 1; max-width: 120px; border: 0; background: transparent; border-radius: 12px; min-width: 0;
  padding: 6px 0 4px; font-size: 12px; font-weight: 700; color: var(--muted);
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.tabs svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tabs button.on { color: var(--accent); background: var(--accent-soft); }

/* 색소폰 종류 */
.saxes { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; margin-bottom: 12px; }
.saxes button {
  border: 1px solid var(--line); background: var(--card); border-radius: 12px; min-width: 0;
  padding: 8px 0; font-size: 13px; letter-spacing: -0.3px; font-weight: 700; line-height: 1.2;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.saxes button small { font-size: 12px; font-weight: 500; color: var(--muted); }
.saxes button.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.saxes button.on small { color: inherit; opacity: .8; }

/* ---------- 튜너 ---------- */
.meter { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 14px 12px 12px; --c: var(--muted); }
.meter[data-state="good"] { --c: var(--good); }
.meter[data-state="near"] { --c: var(--near); }
.meter[data-state="far"]  { --c: var(--far); }

.readout { display: grid; grid-template-columns: 1.35fr 1fr 1fr; align-items: end; text-align: center; }
.ro b { display: block; font-size: 30px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; letter-spacing: -0.5px; }
.ro small { display: block; font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: 1px; }
.ro.note { text-align: left; padding-left: 6px; line-height: 1; white-space: nowrap; }
.ro.note span { font-size: 46px; letter-spacing: -1px; font-weight: 800; color: var(--c); }
.ro.note sub { font-size: 22px; font-weight: 800; color: var(--muted); margin-left: 2px; vertical-align: -4px; }
#centsVal { color: var(--c); }
.meter[data-state="idle"] .ro.note span, .meter.stale .ro.note span, .meter[data-state="idle"] #centsVal, .meter.stale #centsVal { color: var(--muted); }
.note-sub { font-size: 13px; color: var(--muted); text-align: center; margin: 6px 0 8px; min-height: 20px; font-variant-numeric: tabular-nums; }

.graph-wrap { position: relative; }
#graph { display: block; width: 100%; height: clamp(260px, 46vh, 460px); border-radius: 12px; background: var(--bg); }
.axis { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); padding: 4px 4px 0; font-variant-numeric: tabular-nums; }

.advice { font-size: 17px; font-weight: 700; min-height: 26px; text-align: center; margin-top: 6px; }
.steady { font-size: 13px; color: var(--muted); text-align: center; min-height: 20px; font-variant-numeric: tabular-nums; }
.info-line { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); margin-top: 8px; padding: 8px 4px 0; }

.ref { display: flex; align-items: center; justify-content: space-between; margin: 10px 0; gap: 8px; }
.ref-note { text-align: center; min-width: 0; }
.ref-note span { display: block; font-size: 34px; font-weight: 800; line-height: 1.1; }
.ref-note small { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.oct button { padding: 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); font-weight: 700; font-size: 14px; }
.tonics { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 5px; }
.tonics button { padding: 8px 0; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); font-size: 14px; font-weight: 700; min-width: 0; }
.tonics button.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* ---------- 메트로놈 ---------- */
.mtop { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) 64px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 4px 6px; }
.spin { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.spin button { width: 100%; height: 34px; border: 0; background: none; font-size: 24px; font-weight: 700; line-height: 1; color: var(--ink); touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.spin button:active { background: var(--accent-soft); border-radius: 10px; }
.spin b { font-size: 34px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.spin small { font-size: 12px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.mplay { width: 56px; height: 56px; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-ink); display: flex; align-items: center; justify-content: center; justify-self: center; }
.mplay svg { width: 26px; height: 26px; fill: currentColor; }
.mplay .i-stop, .mplay.on .i-play { display: none; }
.mplay.on .i-stop { display: block; }

.mstage { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 20px; margin-top: 10px; padding: 8px 12px 12px; overflow: hidden; }
.mset { position: absolute; top: 8px; right: 8px; z-index: 2; width: 44px; height: 44px; border: 0; background: none; color: var(--ink); }
.mset svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.mflash { position: absolute; inset: 0; pointer-events: none; opacity: 0; background: var(--ink); }
.mflash.go { animation: mflash .16s ease-out; }
.mflash.go.first { background: var(--far); }
@keyframes mflash { from { opacity: .35; } to { opacity: 0; } }
.mtap { display: flex; justify-content: center; align-items: center; height: clamp(150px, 26vh, 240px); cursor: pointer; touch-action: manipulation; user-select: none; -webkit-user-select: none; border-radius: 16px; }
.mtap.tap { animation: tapfx .2s ease-out; }
@keyframes tapfx { from { background: var(--accent-soft); } }
.mbig { font-size: clamp(120px, 22vh, 200px); font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -4px; }
.mbig.first { color: var(--far); }
.mboxes { display: flex; gap: 8px; align-items: center; height: 120px; }
.mboxes i { flex: 1; min-width: 0; height: 88px; border: 3px solid var(--ink); border-radius: 14px; display: flex; align-items: center; justify-content: center; transition: height .06s, border-color .06s; font-style: normal; }
.mboxes i span { font-size: 20px; font-weight: 800; }
.mboxes i.on { height: 116px; border-color: var(--accent); background: var(--accent-soft); }
.mboxes i.first { border-color: var(--far); background: color-mix(in srgb, var(--far) 12%, transparent); }
.mboxes.many { gap: 4px; }
.mboxes.many i { border-width: 2px; border-radius: 10px; }
.mboxes.many i span { font-size: 14px; }
.hint.center { text-align: center; }
#mTapHint { margin-top: 4px; }

.mbottom { background: var(--card); border: 1px solid var(--line); border-radius: 20px; margin: 10px 0 12px; overflow: hidden; }
.marks { display: flex; overflow-x: auto; scrollbar-width: none; padding: 4px 40%; border-bottom: 1px solid var(--line); }
.marks::-webkit-scrollbar { display: none; }
.marks button { flex: 0 0 auto; width: 56px; padding: 10px 0; border: 0; background: none; font-size: 20px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.marks button.on { color: var(--far); font-weight: 800; }
.term-row { display: flex; align-items: center; gap: 8px; padding: 8px 6px; }
.term-row > button { width: 44px; height: 44px; border: 0; background: none; font-size: 20px; flex-shrink: 0; }
.term-row > div { flex: 1; min-width: 0; }
.term-row b { display: block; font-size: 20px; font-weight: 800; line-height: 1.2; }
.term-row span { display: block; font-size: 14px; color: var(--muted); }

/* 아래에서 올라오는 설정 창 */
.sheet { width: min(480px, 100%); max-width: 100%; max-height: 88svh; margin: auto auto 0; padding: 0; border: 0; border-radius: 20px 20px 0 0; background: var(--card); color: var(--ink); }
.sheet.small { margin: auto; border-radius: 20px; width: min(340px, calc(100% - 32px)); }
.sheet::backdrop { background: rgba(0, 0, 0, .45); }
.sheet[open] { animation: up .2s ease-out; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
.sheet-head { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; text-align: center; padding: 8px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--card); z-index: 1; }
.sheet-head button { width: 44px; height: 44px; border: 0; background: none; font-size: 22px; }
.sheet-head b { font-size: 17px; }
.sheet-body { padding: 4px 16px calc(20px + env(safe-area-inset-bottom)); }
.sheet-body h3 { font-size: 20px; margin: 16px 0 4px; }
.seg.snd { grid-template-columns: repeat(5, minmax(0, 1fr)); margin-top: 0; }
.seg.snd button { font-size: 13px; padding: 9px 2px; }
.big-input { width: 100%; font-size: 40px; font-weight: 800; text-align: center; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); margin: 10px 0 4px; font-variant-numeric: tabular-nums; }
.sheet .two .play { margin-top: 12px; }

/* ---------- 운지표 ---------- */
.fhead { padding-bottom: 10px; }
.fhead .ref { margin: 0 0 10px; }
.fhead .ref-note small b { color: var(--ink); }
.strip { display: flex; gap: 5px; overflow-x: auto; padding: 2px 0 6px; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.strip button {
  flex: 0 0 auto; min-width: 48px; padding: 6px 6px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg);
  font-weight: 800; font-size: 14px; line-height: 1.15; scroll-snap-align: center;
}
.strip button small { display: block; font-size: 11px; font-weight: 600; color: var(--muted); }
.strip button.acc { background: var(--track); }
.strip button.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.strip button.on small { color: inherit; opacity: .85; }

.fmain { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; align-items: start; }
.fcol { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 10px; }
.staff-svg { width: 100%; display: block; }
.staff-svg .staff, .staff-svg .ledger { stroke: var(--muted); stroke-width: 1.2; }
.staff-svg .head { fill: none; stroke: var(--ink); stroke-width: 2.4; }
.staff-svg .accid { fill: var(--ink); font-size: 17px; font-weight: 700; }
.fwords { font-size: 14px; font-weight: 700; margin-top: 6px; }
.fconcert { font-size: 12px; color: var(--muted); margin-top: 8px; }
.alts { grid-template-columns: 1fr; gap: 5px; margin-top: 8px; }
.alts button { padding: 7px 4px; font-size: 13px; }
#altTip { margin-top: 6px; }
.fcol .play { margin-top: 10px; padding: 10px; font-size: 14px; }

.finger-box { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 8px 6px 6px; }
.keys { width: 100%; display: block; }
.keys .key circle, .keys .key rect, .keys .key ellipse { fill: var(--card); stroke: var(--muted); stroke-width: 1.8; transition: fill .12s; }
.keys .key text { fill: var(--muted); font-size: 13px; font-weight: 800; text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.keys .key text.sm { font-size: 10px; }
.keys .key.on circle, .keys .key.on rect, .keys .key.on ellipse { fill: var(--accent); stroke: var(--accent); }
.keys .key.on text { fill: var(--accent-ink); }
.keys .key { cursor: pointer; outline: none; }
.keys .key:focus-visible circle, .keys .key:focus-visible rect, .keys .key:focus-visible ellipse { stroke: var(--ink); stroke-width: 3; }
.keys .hand { fill: var(--muted); font-size: 11px; font-weight: 700; }
.keys .split { stroke: var(--line); stroke-width: 1.5; stroke-dasharray: 4 4; }
.key-name { font-size: 12px; color: var(--muted); text-align: center; min-height: 34px; padding: 2px 2px 0; }
.finger-box .cover {
  display: none; position: absolute; inset: 0; border-radius: 16px; background: var(--card);
  align-items: center; justify-content: center; text-align: center; font-weight: 800; color: var(--accent); cursor: pointer;
}
.finger-box.covered .cover { display: flex; }

/* ---------- 연습 ---------- */
.today { display: flex; align-items: center; gap: 14px; }
.ring { width: 128px; height: 128px; flex-shrink: 0; }
.ring-bg { fill: none; stroke: var(--track); stroke-width: 10; }
.ring-bar { fill: none; stroke: var(--accent); stroke-width: 10; stroke-linecap: round; stroke-dasharray: 0 999; transition: stroke-dasharray .4s; }
.ring.done .ring-bar { stroke: var(--good); }
.ring-min { fill: var(--ink); font-size: 34px; font-weight: 800; text-anchor: middle; font-variant-numeric: tabular-nums; }
.ring-unit { fill: var(--muted); font-size: 13px; font-weight: 700; text-anchor: middle; }
.today-info { min-width: 0; flex: 1; }
.today-msg { font-weight: 700; }
.streak { color: var(--accent); font-weight: 800; font-size: 14px; margin: 2px 0 8px; }
.stepper.goal button { width: 38px; height: 38px; font-size: 18px; }
.stepper.goal span { font-size: 15px; min-width: 56px; }
.stepper.goal span b { font-size: 18px; }

.timer { text-align: center; }
.clock { font-size: 56px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; letter-spacing: -1px; }
.clock.paused { color: var(--muted); }
.memo, .add input {
  width: 100%; padding: 11px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); margin-top: 10px; font-size: 15px;
}
.timer .start { margin: 10px 0 0; padding: 14px; font-size: 16px; }
.flash { margin: 10px 0 0; padding: 8px 10px; border-radius: 10px; background: var(--accent-soft); font-size: 14px; font-weight: 700; }

.rec { width: 100%; margin-top: 10px; padding: 14px; border-radius: 12px; border: 1px solid var(--far); background: transparent; color: var(--far); font-weight: 800; font-size: 16px; }
.rec.on { background: var(--far); color: #fff; }
.rec-list { list-style: none; margin: 10px 0 0; padding: 0; }
.rec-list li { padding: 10px 0; border-top: 1px solid var(--line); }
.rec-list li.empty, .day-list li.empty { color: var(--muted); font-size: 14px; border: 0; padding: 6px 0; }
.rmeta { display: flex; align-items: center; gap: 10px; font-size: 14px; margin-bottom: 6px; }
.rmeta span { color: var(--muted); font-variant-numeric: tabular-nums; }
.rmeta a { margin-left: auto; color: var(--accent); font-weight: 700; font-size: 13px; }
.rec-list audio { width: 100%; height: 40px; }
.del { border: 1px solid var(--line); background: var(--bg); border-radius: 8px; padding: 4px 8px; font-size: 12px; color: var(--muted); }

/* 최근 7일 막대 — 한 가지 색(파랑), 목표 넘은 날은 초록, 값은 막대 위 */
.week { position: relative; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; height: 150px; margin-top: 10px; padding-top: 18px; }
.wbar { border: 0; background: none; padding: 0; display: flex; flex-direction: column; align-items: center; min-width: 0; height: 100%; }
.wval { font-size: 12px; font-weight: 700; height: 16px; font-variant-numeric: tabular-nums; }
.wtrack { flex: 1; width: 100%; max-width: 28px; display: flex; align-items: flex-end; }
.wfill { display: block; width: 100%; min-height: 0; background: var(--accent); border-radius: 4px 4px 0 0; opacity: .75; }
.wbar.met .wfill { background: var(--good); opacity: 1; }
.wbar.today .wfill { opacity: 1; }
.wday { font-size: 12px; color: var(--muted); margin-top: 4px; height: 18px; }
.wbar.today .wday { color: var(--ink); font-weight: 800; }
.goal-line {
  position: absolute; left: 0; right: 0; pointer-events: none;
  bottom: calc(22px + (100% - 18px - 16px - 22px) * var(--goal, 0) / 100%);
  border-top: 1.5px dashed var(--muted); opacity: .6;
}
.goal-line span { position: absolute; right: 0; top: -16px; font-size: 11px; color: var(--muted); }

.cal-head { display: flex; align-items: center; justify-content: space-between; text-align: center; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin-top: 10px; }
.cw { text-align: center; font-size: 12px; color: var(--muted); padding-bottom: 2px; }
.cd { aspect-ratio: 1; border: 0; border-radius: 10px; font-size: 14px; font-weight: 600; background: var(--bg); min-width: 0; padding: 0; font-variant-numeric: tabular-nums; }
.cd.lv1 { background: color-mix(in srgb, var(--accent) 22%, var(--bg)); }
.cd.lv2 { background: color-mix(in srgb, var(--accent) 50%, var(--bg)); }
.cd.lv3 { background: var(--accent); color: var(--accent-ink); }
.cd.today { box-shadow: inset 0 0 0 2px var(--ink); }
.cd.picked { outline: 3px solid var(--good); outline-offset: 1px; }
.cal-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; font-size: 12px; color: var(--muted); margin-top: 8px; }
.cal-legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; margin-left: 4px; }
.cal-legend .lv1 { background: color-mix(in srgb, var(--accent) 22%, var(--bg)); }
.cal-legend .lv2 { background: color-mix(in srgb, var(--accent) 50%, var(--bg)); }
.cal-legend .lv3 { background: var(--accent); }

.day-box { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); scroll-margin-bottom: 90px; }
.day-list { list-style: none; margin: 8px 0; padding: 0; }
.day-list li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.day-list .dt { color: var(--muted); font-variant-numeric: tabular-nums; }
.day-list .dm { font-weight: 800; white-space: nowrap; }
.day-list .dmemo { flex: 1; min-width: 0; color: var(--muted); }
.add { display: grid; grid-template-columns: 70px minmax(0, 1fr) auto; gap: 6px; align-items: end; }
.add input { margin-top: 0; padding: 10px; }
.add button { padding: 10px 12px; border-radius: 12px; border: 0; background: var(--accent); color: var(--accent-ink); font-weight: 800; white-space: nowrap; }
