/* 만세력 — ink & hanji */
@font-face {
  font-family: 'Manse Serif';
  src: url('../fonts/NotoSerifKR-Manse.woff2') format('woff2-variations'), url('../fonts/NotoSerifKR-Manse.woff2') format('woff2');
  font-weight: 400 800; font-style: normal; font-display: swap;
}
:root {
  --serif: 'Manse Serif', 'Noto Serif KR', 'Nanum Myeongjo', 'AppleMyungjo', 'Batang', serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Pretendard', 'Noto Sans KR', 'Malgun Gothic', system-ui, sans-serif;
  --r: 18px; --ease: cubic-bezier(.22,.8,.24,1);
  --dock-h: 68px; --safe-b: env(safe-area-inset-bottom, 0px);
}
html[data-theme="dark"] {
  --bg: #111113; --bg-2: #17171a; --card: #1b1b1f; --card-2: #222227; --ink: #ede6d6; --ink-2: #c9c1b0; --muted: #8f897d; --faint: #5b574f;
  --gold: #c9a55e; --gold-2: #e3c88a; --gold-dim: rgba(201,165,94,.34); --gold-wash: rgba(201,165,94,.08);
  --line: rgba(237,230,214,.08); --shadow: 0 18px 50px rgba(0,0,0,.55), 0 2px 8px rgba(0,0,0,.35);
  --e0: #66b89c; --e1: #e8694f; --e2: #d6a64c; --e3: #e9dfc4; --e4: #86a3d8;
  --sun: #e2765f; --sat: #8aa6d6; --seal: #b8392b;
  --paper: radial-gradient(1200px 600px at 80% -10%, rgba(201,165,94,.07), transparent 60%), radial-gradient(900px 500px at -10% 110%, rgba(110,140,190,.06), transparent 60%);
  color-scheme: dark;
}
html[data-theme="light"] {
  --bg: #f3ecdf; --bg-2: #efe6d6; --card: #fbf7ee; --card-2: #f6efe2; --ink: #2a2520; --ink-2: #4a4138; --muted: #7d7263; --faint: #b3a893;
  --gold: #9f7a34; --gold-2: #b98f40; --gold-dim: rgba(159,122,52,.38); --gold-wash: rgba(159,122,52,.08);
  --line: rgba(60,45,25,.10); --shadow: 0 18px 44px rgba(90,64,25,.16), 0 2px 6px rgba(90,64,25,.08);
  --e0: #2c7a64; --e1: #b53d27; --e2: #a26f1b; --e3: #857552; --e4: #213660;
  --sun: #b53d27; --sat: #2d4f8a; --seal: #b23a2a;
  --paper: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .35 0 0 0 0 .2 0 0 0 .06 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"), radial-gradient(1000px 600px at 85% -10%, rgba(185,143,64,.10), transparent 60%);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--paper), var(--bg); background-attachment: fixed; color: var(--ink);
  font-family: var(--sans); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  min-height: 100vh; transition: background-color .5s var(--ease), color .5s var(--ease);
}
body.locked { overflow: hidden; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; touch-action: manipulation; }
button:focus-visible { outline: 1.5px solid var(--gold); outline-offset: 2px; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.e0 { color: var(--e0); } .e1 { color: var(--e1); } .e2 { color: var(--e2); } .e3 { color: var(--e3); } .e4 { color: var(--e4); }
.gz { font-family: var(--serif); font-style: normal; letter-spacing: .02em; }
.gz i, .gzk i { font-style: normal; }

.app { max-width: 1240px; margin: 0 auto; padding: 0 14px calc(var(--dock-h) + var(--safe-b) + 12px); }

/* ---------- top ---------- */
.top { display: flex; align-items: center; justify-content: space-between; padding: 14px 2px 6px; gap: 10px; }
.brand { display: flex; align-items: center; gap: 11px; }
.seal {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 6px; background: var(--seal); color: #fbeee3;
  font-family: var(--serif); font-weight: 700; font-size: 13px; line-height: 1.02; text-align: center;
  box-shadow: inset 0 0 0 2px rgba(255,240,230,.18), 0 4px 14px rgba(178,58,42,.35); transform: rotate(-3deg);
}
.brand-text b { display: block; font-family: var(--serif); font-weight: 700; font-size: 19px; letter-spacing: .08em; }
.brand-text small { display: block; font-size: 11px; color: var(--muted); letter-spacing: .12em; margin-top: 1px; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.seg { display: flex; padding: 3px; border-radius: 999px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.seg button { min-width: 48px; height: 36px; padding: 0 12px; border-radius: 999px; font-size: 13px; color: var(--muted); letter-spacing: .05em; transition: all .35s var(--ease); }
.seg button.on { background: var(--gold-wash); color: var(--gold-2); box-shadow: inset 0 0 0 1px var(--gold-dim); font-weight: 600; }
.today-top { display: none; height: 38px; padding: 0 16px; border-radius: 999px; font-family: var(--serif); font-weight: 600; letter-spacing: .18em; color: var(--bg); background: var(--gold); box-shadow: 0 4px 14px var(--gold-dim); }
.icon-btn { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); color: var(--gold); }
.icon-btn svg { width: 19px; height: 19px; }
html[data-theme="dark"] .i-sun, html[data-theme="light"] .i-moon { display: none; }
.i-moon path { fill: currentColor; stroke: none; }

/* ---------- month head ---------- */
.cal { min-width: 0; }
.month-head { display: grid; grid-template-columns: 48px 1fr 48px; align-items: center; margin-top: 10px; }
.nav-btn { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; color: var(--gold); transition: background .25s; }
.nav-btn:hover { background: var(--gold-wash); }
.title { display: flex; align-items: baseline; justify-content: center; gap: 10px; padding: 6px 8px; border-radius: 14px; }
.t-kind { font-size: 11px; letter-spacing: .2em; color: var(--gold); border: 1px solid var(--gold-dim); border-radius: 999px; padding: 3px 8px 2px; align-self: center; }
.t-year { font-family: var(--serif); font-size: 20px; color: var(--ink-2); letter-spacing: .06em; }
.t-month { font-family: var(--serif); font-weight: 600; font-size: 44px; line-height: 1; letter-spacing: .01em; }
.t-month small { font-size: 18px; font-weight: 400; margin-left: 3px; color: var(--ink-2); }
.t-month .leap { font-style: normal; font-size: 22px; color: var(--gold-2); margin-right: 4px; }
.month-meta { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 6px 0 12px; font-size: 13px; color: var(--muted); }
.range { letter-spacing: .04em; display: inline-flex; align-items: center; gap: 6px; }
.pillars-line { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 10px; }
.mp { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.mp b { font-family: var(--serif); color: var(--gold); font-weight: 600; font-size: 12px; }
.mp .gz { font-size: 16px; font-weight: 600; }
.mp .arrow { color: var(--faint); font-size: 12px; }
.mp small { font-size: 11px; color: var(--muted); margin-left: 2px; }
.leap-chip, .fest-chip, .today-chip { display: inline-block; font-size: 11px; padding: 2px 7px; border-radius: 999px; color: var(--gold-2); border: 1px solid var(--gold-dim); letter-spacing: .05em; vertical-align: 1px; }
.today-chip { background: var(--gold); color: var(--bg); border-color: transparent; }

.rule { position: relative; height: 1px; margin: 0 4px 2px; background: linear-gradient(90deg, transparent, var(--gold-dim) 15%, var(--gold-dim) 85%, transparent); }
.rule span { position: absolute; left: 50%; top: -3px; width: 7px; height: 7px; transform: translateX(-50%) rotate(45deg); background: var(--bg); border: 1px solid var(--gold); }

.weekdays { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; padding: 10px 0 6px; font-family: var(--serif); font-size: 14px; color: var(--ink-2); }
.weekdays em { font-style: normal; font-family: var(--sans); font-size: 10px; color: var(--muted); margin-left: 3px; }
.weekdays .sun { color: var(--sun); } .weekdays .sat { color: var(--sat); }

/* ---------- grid ---------- */
.grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.grid.swap { animation: swap .5s var(--ease); }
@keyframes swap { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.cell {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  min-height: 84px; padding: 7px 1px 6px; border-radius: 12px; text-align: center; overflow: hidden;
  transition: background .25s, box-shadow .25s, transform .15s;
}
@media (hover: hover) { .cell:hover { background: var(--gold-wash); } }
.cell:active { transform: scale(.96); }
.cell.void { pointer-events: none; }
.sd { font-family: var(--serif); font-size: 19px; font-weight: 500; line-height: 1.15; width: 30px; height: 26px; display: grid; place-items: center; border-radius: 50%; }
.cell.sun .sd { color: var(--sun); } .cell.sat .sd { color: var(--sat); }
.ld { font-size: 10.5px; color: var(--muted); margin-top: 1px; letter-spacing: .01em; white-space: nowrap; }
.cell.l1 .ld, .cell.l15 .ld { color: var(--gold-2); font-weight: 700; }
.lunar-mode .cell.l1 .ld, .lunar-mode .cell.l15 .ld { color: var(--muted); font-weight: 400; }
.lunar-mode .cell.l1 .sd, .lunar-mode .cell.l15 .sd { color: var(--gold-2); font-weight: 700; }
.cell .gz { font-size: 13.5px; margin-top: 4px; font-weight: 600; line-height: 1.1; }
.cell .gzk { font-size: 9.5px; color: var(--muted); letter-spacing: .02em; margin-top: 1px; }
.cell .gzk i { color: inherit; }
.cell .tag { margin-top: auto; font-size: 9.5px; letter-spacing: .02em; padding: 1px 4px; border-radius: 4px; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.cell .tag.term { color: var(--gold-2); }
.cell .tag.term.jeol { box-shadow: inset 0 0 0 1px var(--gold-dim); }
.cell .tag.fest { color: var(--e1); }
.cell.has-term::before { content: ''; position: absolute; right: calc(50% + 19px); top: 11px; width: 4px; height: 4px; border-radius: 50%; background: var(--gold); }
.cell.other { opacity: .32; }
.cell.today .sd { background: var(--gold); color: var(--bg) !important; font-weight: 700; box-shadow: 0 0 0 3px var(--gold-wash), 0 4px 14px var(--gold-dim); }
.cell.sel { background: var(--card); box-shadow: inset 0 0 0 1px var(--gold-dim), var(--shadow); }
.moon { display: inline-block; width: 9px; height: 9px; border-radius: 50%; vertical-align: -1px; }
.cell .moon { position: absolute; top: 9px; left: calc(50% + 17px); }
.moon.full { background: radial-gradient(circle at 35% 35%, #fff6dc, var(--gold-2) 60%, var(--gold)); box-shadow: 0 0 8px var(--gold-dim); }
.moon.crescent { box-shadow: inset -2.5px 0 0 0 var(--gold-2); }
.moon.new { box-shadow: inset 0 0 0 1px var(--gold-dim); }
.moon.first { background: linear-gradient(90deg, transparent 50%, var(--gold-2) 50%); box-shadow: inset 0 0 0 1px var(--gold-dim); }
.moon.waxing { background: radial-gradient(circle at 70% 50%, var(--gold-2) 55%, transparent 58%); box-shadow: inset 0 0 0 1px var(--gold-dim); }
.moon.waning { background: radial-gradient(circle at 30% 50%, var(--gold-2) 55%, transparent 58%); box-shadow: inset 0 0 0 1px var(--gold-dim); }
.moon.last { background: linear-gradient(90deg, var(--gold-2) 50%, transparent 50%); box-shadow: inset 0 0 0 1px var(--gold-dim); }
.moon.old { box-shadow: inset 2.5px 0 0 0 var(--gold-2); }
.moon.big { width: 14px; height: 14px; margin-right: 6px; vertical-align: -2px; }
.moon.big.crescent { box-shadow: inset -4px 0 0 0 var(--gold-2); } .moon.big.old { box-shadow: inset 4px 0 0 0 var(--gold-2); }

.legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; margin: 16px 0 4px; font-size: 11.5px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.lg-el i { font-family: var(--serif); font-style: normal; font-weight: 600; font-size: 13px; margin: 0 2px; }
.dot-term { width: 5px; height: 5px; border-radius: 50%; background: var(--gold); display: inline-block; }

/* ---------- detail (mobile: bottom sheet) ---------- */
.backdrop { position: fixed; inset: 0; background: rgba(8,8,10,.5); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); opacity: 0; pointer-events: none; transition: opacity .4s var(--ease); z-index: 40; }
.backdrop.show { opacity: 1; pointer-events: auto; }
.detail, .picker {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; max-height: 88vh; max-height: 88dvh; display: flex; flex-direction: column;
  background: var(--card); border-radius: 26px 26px 0 0; box-shadow: 0 -20px 60px rgba(0,0,0,.35), inset 0 1px 0 var(--gold-dim);
  transform: translateY(105%); transition: transform .5s var(--ease); padding-bottom: var(--safe-b);
}
.detail.open, .picker.open { transform: none; }
.sheet-grip { display: grid; place-items: center; height: 26px; flex: none; cursor: grab; touch-action: none; }
.sheet-grip span { width: 42px; height: 4px; border-radius: 4px; background: var(--faint); opacity: .7; }
.detail-scroll { overflow-y: auto; overscroll-behavior: contain; padding: 0 18px 26px; -webkit-overflow-scrolling: touch; }

.d-head { position: relative; padding: 4px 44px 14px 2px; border-bottom: 1px solid var(--line); }
.d-solar { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; font-family: var(--serif); }
.d-y { font-size: 15px; color: var(--ink-2); }
.d-solar b { font-size: 27px; font-weight: 600; letter-spacing: .01em; }
.d-w { font-size: 15px; color: var(--muted); } .d-w.sun { color: var(--sun); } .d-w.sat { color: var(--sat); }
.d-lunar { margin-top: 6px; font-size: 14.5px; color: var(--ink-2); display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.d-ilji { margin-top: 8px; font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.gz.lg { font-size: 19px; font-weight: 600; }
.d-ilji-ko { color: var(--ink-2); }
.close-btn { position: absolute; right: -4px; top: 0; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); }
.close-btn:hover { background: var(--gold-wash); }

.saju { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 16px 0 6px; }
.pillar { position: relative; text-align: center; padding: 10px 4px 10px; border-radius: 16px; background: var(--card-2); box-shadow: inset 0 0 0 1px var(--line); transition: all .35s var(--ease); }
.pillar.day { box-shadow: inset 0 0 0 1px var(--gold-dim); }
.pillar.empty { opacity: .6; }
.p-k { font-family: var(--serif); color: var(--gold); font-size: 13px; font-weight: 600; letter-spacing: .1em; margin-bottom: 6px; }
.p-k small { display: block; font-family: var(--sans); font-size: 10px; color: var(--muted); font-weight: 400; letter-spacing: .08em; margin-top: 1px; }
.p-glyph { font-family: var(--serif); font-size: 34px; font-weight: 600; line-height: 1.22; }
.p-glyph.ph { color: var(--faint); }
.p-ko { margin-top: 4px; font-size: 12.5px; color: var(--ink-2); letter-spacing: .1em; }
.p-el { display: flex; justify-content: center; gap: 4px; margin-top: 6px; min-height: 19px; }
.chip { font-style: normal; font-family: var(--serif); font-size: 11px; width: 19px; height: 19px; display: grid; place-items: center; border-radius: 50%; box-shadow: inset 0 0 0 1px currentColor; opacity: .9; }
.note { margin: 10px 2px 0; font-size: 12.5px; color: var(--gold-2); line-height: 1.55; padding: 8px 12px; border-radius: 12px; background: var(--gold-wash); }

.block { margin-top: 22px; }
.block h3 { display: flex; align-items: baseline; gap: 10px; margin: 0 0 10px; font-family: var(--serif); font-size: 16px; font-weight: 600; letter-spacing: .06em; }
.block h3::before { content: ''; width: 14px; height: 1px; background: var(--gold); align-self: center; }
.block h3 small { font-family: var(--sans); font-weight: 400; font-size: 11px; color: var(--muted); letter-spacing: .03em; }
.fine { font-size: 11px; color: var(--muted); margin: 8px 2px 0; line-height: 1.5; }

.hours { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.hour { display: grid; grid-template-columns: auto 1fr auto; grid-template-rows: auto auto; align-items: center; column-gap: 8px; text-align: left; min-height: 54px; padding: 8px 12px; border-radius: 14px; background: var(--card-2); box-shadow: inset 0 0 0 1px var(--line); transition: all .25s var(--ease); }
.hour .h-name { font-family: var(--serif); font-size: 14px; font-weight: 600; grid-row: 1; }
.hour .h-range { grid-column: 1 / 3; grid-row: 2; font-size: 10.5px; color: var(--muted); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.hour .gz { grid-column: 3; grid-row: 1; font-size: 18px; font-weight: 600; text-align: right; }
.hour .h-ko { grid-column: 3; grid-row: 2; font-size: 10.5px; color: var(--muted); text-align: right; }
@media (hover: hover) { .hour:hover { box-shadow: inset 0 0 0 1px var(--gold-dim); } }
.hour.on { background: var(--gold-wash); box-shadow: inset 0 0 0 1.5px var(--gold); }

.wuxing { display: grid; gap: 9px; padding: 14px 14px; border-radius: 16px; background: var(--card-2); box-shadow: inset 0 0 0 1px var(--line); }
.wx-row { display: grid; grid-template-columns: 52px 1fr 22px; align-items: center; gap: 10px; }
.wx-name { font-family: var(--serif); font-size: 17px; font-weight: 600; }
.wx-name small { font-family: var(--sans); font-size: 11px; font-weight: 400; color: var(--muted); margin-left: 5px; }
.wx-track { height: 8px; border-radius: 8px; background: var(--line); overflow: hidden; }
.wx-bar { display: block; height: 100%; border-radius: 8px; transition: width .6s var(--ease); min-width: 0; }
.bg0 { background: linear-gradient(90deg, transparent, var(--e0)); } .bg1 { background: linear-gradient(90deg, transparent, var(--e1)); }
.bg2 { background: linear-gradient(90deg, transparent, var(--e2)); } .bg3 { background: linear-gradient(90deg, transparent, var(--e3)); }
.bg4 { background: linear-gradient(90deg, transparent, var(--e4)); }
.wx-n { font-family: var(--serif); font-size: 15px; text-align: right; font-variant-numeric: tabular-nums; }

.facts { list-style: none; margin: 0; padding: 0; border-radius: 16px; background: var(--card-2); box-shadow: inset 0 0 0 1px var(--line); }
.facts li { display: grid; grid-template-columns: 78px 1fr; gap: 10px; padding: 12px 14px; font-size: 13px; border-top: 1px solid var(--line); align-items: center; }
.facts li:first-child { border-top: 0; }
.facts b { font-weight: 600; color: var(--ink-2); font-size: 12.5px; }
.facts b.gold { color: var(--gold-2); font-family: var(--serif); grid-column: 1 / -1; font-size: 15px; }
.facts li:has(b.gold) { grid-template-columns: 1fr; gap: 3px; }
.facts span { color: var(--ink-2); line-height: 1.5; }
.dday { font-style: normal; font-size: 11px; color: var(--gold-2); margin-left: 4px; padding: 1px 6px; border-radius: 99px; border: 1px solid var(--gold-dim); }

/* ---------- picker ---------- */
.picker { padding: 0 18px calc(18px + var(--safe-b)); }
.pk-year { display: flex; align-items: center; justify-content: center; gap: 4px; margin-top: 4px; }
.pk-year .nav-btn { font-family: var(--serif); font-size: 20px; }
.pk-input { display: flex; align-items: baseline; gap: 4px; font-family: var(--serif); }
.pk-input input { width: 108px; text-align: center; font-family: var(--serif); font-size: 32px; font-weight: 600; color: var(--ink); background: transparent; border: 0; border-bottom: 1px solid var(--gold-dim); padding: 2px 0; -moz-appearance: textfield; appearance: textfield; }
.pk-input input::-webkit-inner-spin-button, .pk-input input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.pk-input input:focus { outline: none; border-color: var(--gold); }
.pk-input span { color: var(--muted); }
.pk-gz { display: flex; justify-content: center; align-items: center; gap: 8px; margin: 10px 0 14px; color: var(--muted); font-size: 13px; }
.pk-months { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.pk-months button { height: 54px; border-radius: 14px; background: var(--card-2); box-shadow: inset 0 0 0 1px var(--line); font-family: var(--serif); font-size: 19px; font-weight: 600; }
.pk-months button small { font-size: 12px; font-weight: 400; color: var(--muted); margin-left: 2px; }
.pk-months button.leapm { color: var(--gold-2); }
.pk-months button.on { box-shadow: inset 0 0 0 1.5px var(--gold); background: var(--gold-wash); }
.pk-today { display: block; width: 100%; height: 50px; margin-top: 14px; border-radius: 14px; color: var(--gold-2); box-shadow: inset 0 0 0 1px var(--gold-dim); letter-spacing: .1em; }

/* ---------- dock (thumb zone) ---------- */
.dock {
  position: fixed; left: 50%; bottom: calc(10px + var(--safe-b)); transform: translateX(-50%); z-index: 30;
  display: grid; grid-template-columns: 1fr 1.15fr 1fr; width: min(420px, calc(100% - 24px)); height: 58px; padding: 5px;
  border-radius: 999px; background: color-mix(in srgb, var(--card) 86%, transparent); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: var(--shadow), inset 0 0 0 1px var(--gold-dim);
}
.dock button { display: flex; align-items: center; justify-content: center; gap: 4px; border-radius: 999px; font-size: 14px; color: var(--ink-2); letter-spacing: .06em; }
.dock button svg { width: 19px; height: 19px; color: var(--gold); }
.dock .today-btn { background: var(--gold); color: var(--bg); font-weight: 700; font-family: var(--serif); letter-spacing: .2em; gap: 8px; box-shadow: 0 6px 18px var(--gold-dim); }
.today-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }

.foot { text-align: center; font-size: 11px; color: var(--faint); letter-spacing: .12em; padding: 18px 0 8px; font-family: var(--serif); }

/* ---------- larger screens ---------- */
@media (min-width: 560px) {
  .cell { min-height: 98px; padding-top: 9px; }
  .sd { font-size: 22px; width: 34px; height: 30px; }
  .ld { font-size: 11.5px; }
  .cell .gz { font-size: 15.5px; }
  .cell .gzk { font-size: 10.5px; }
  .cell .tag { font-size: 10.5px; }
  .grid { gap: 5px; }
  .hours { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1000px) {
  .app { padding-left: 32px; padding-right: 32px; }
  .top { padding: 26px 4px 10px; }
  .layout { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 28px; align-items: start; }
  .month-head { grid-template-columns: 52px 1fr 52px; }
  .t-month { font-size: 50px; }
  .cell .gz { font-size: 17px; } .sd { font-size: 23px; }
  .cell { min-height: 92px; }
  .detail {
    position: sticky; top: 18px; transform: none; max-height: calc(100vh - 36px); border-radius: 24px; z-index: 1;
    box-shadow: var(--shadow), inset 0 0 0 1px var(--gold-dim); margin-top: 10px;
  }
  .detail .sheet-grip, .close-btn { display: none; }
  .detail-scroll { padding: 22px 22px 26px; }
  .hours { grid-template-columns: repeat(2, 1fr); }
  .app { padding-bottom: 10px; }
  .dock { display: none; }
  .today-top { display: inline-block; }
  .top-actions { gap: 12px; }
  .picker { left: 50%; right: auto; bottom: 50%; width: 440px; transform: translate(-50%, 60%) scale(.96); opacity: 0; pointer-events: none; border-radius: 24px; padding-top: 10px; transition: all .4s var(--ease); }
  .picker.open { transform: translate(-50%, 50%); opacity: 1; pointer-events: auto; }
  .picker .sheet-grip { display: none; }
  .foot { padding-top: 28px; }
}
@media (min-width: 1000px) and (max-height: 860px) {
  .top { padding-top: 16px; } .cell { min-height: 80px; padding-top: 6px; } .month-head { margin-top: 0; } .t-month { font-size: 44px; }
  .month-meta { margin-bottom: 8px; } .legend { margin-top: 10px; } .foot { padding-top: 12px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
