/* 에브리 캘린더 — 유리판처럼 겹쳐지는 달력 */
:root {
  --bg: #F3F1EC;
  --bg-2: #ECE9E2;
  --surface: #FFFFFF;
  --surface-2: #F8F7F3;
  --line: rgba(22, 19, 14, .08);
  --line-2: rgba(22, 19, 14, .15);
  --ink: #16140F;
  --ink-2: #3A362F;
  --muted: #6E685F;
  --faint: #A29C92;
  --sun: #C2410C;
  --sat: #2F64C8;
  --btn: #16140F;
  --btn-ink: #FFFFFF;
  --shadow: 0 1px 0 rgba(255,255,255,.7) inset, 0 0 0 1px rgba(22,19,14,.06), 0 10px 30px -14px rgba(40,30,15,.22);
  --shadow-lg: 0 0 0 1px rgba(22,19,14,.06), 0 30px 80px -30px rgba(40,30,15,.45);
  --sans: "Pretendard Variable", Pretendard, -apple-system, "Apple SD Gothic Neo", "Noto Sans KR", system-ui, sans-serif;
  --ease: cubic-bezier(.2, .7, .1, 1);
  --spring: cubic-bezier(.34, 1.4, .64, 1);
  --r: 16px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0C0C0E; --bg-2: #121215; --surface: #16161A; --surface-2: #1D1D22;
  --line: rgba(255,255,255,.07); --line-2: rgba(255,255,255,.14);
  --ink: #F2F0EB; --ink-2: #D8D4CC; --muted: rgba(242,240,235,.62); --faint: rgba(242,240,235,.38);
  --sun: #FF8A65; --sat: #7EA6FF; --btn: #F2F0EB; --btn-ink: #121214;
  --shadow: 0 0 0 1px rgba(255,255,255,.06), 0 12px 30px -16px rgba(0,0,0,.7);
  --shadow-lg: 0 0 0 1px rgba(255,255,255,.08), 0 30px 80px -30px rgba(0,0,0,.9);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0C0C0E; --bg-2: #121215; --surface: #16161A; --surface-2: #1D1D22;
    --line: rgba(255,255,255,.07); --line-2: rgba(255,255,255,.14);
    --ink: #F2F0EB; --ink-2: #D8D4CC; --muted: rgba(242,240,235,.62); --faint: rgba(242,240,235,.38);
    --sun: #FF8A65; --sat: #7EA6FF; --btn: #F2F0EB; --btn-ink: #121214;
    --shadow: 0 0 0 1px rgba(255,255,255,.06), 0 12px 30px -16px rgba(0,0,0,.7);
    --shadow-lg: 0 0 0 1px rgba(255,255,255,.08), 0 30px 80px -30px rgba(0,0,0,.9);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 15px; line-height: 1.55; word-break: keep-all; overflow-wrap: anywhere; -webkit-font-smoothing: antialiased; overflow-x: hidden; min-height: 100vh; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
svg { width: 18px; height: 18px; flex: none; }
[hidden] { display: none !important; }
.num { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 8px; }

/* ── 공통 버튼 ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 44px; padding: 0 18px; border-radius: 12px; font-weight: 650; font-size: 15px; letter-spacing: -.01em; white-space: nowrap; transition: transform .16s var(--ease), background .2s, box-shadow .2s, opacity .2s; }
.btn:active { transform: scale(.97); }
.btn.sm { height: 36px; padding: 0 12px; font-size: 13.5px; border-radius: 10px; }
.btn.lg { height: 52px; padding: 0 26px; font-size: 16px; border-radius: 14px; }
.btn.primary { background: var(--btn); color: var(--btn-ink); box-shadow: 0 8px 20px -10px rgba(0,0,0,.5); }
.btn.primary:hover { box-shadow: 0 12px 26px -10px rgba(0,0,0,.55); transform: translateY(-1px); }
.btn.soft { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn.soft:hover { background: var(--surface-2); }
.btn.ghost { box-shadow: inset 0 0 0 1px var(--line-2); }
.btn.danger { background: #C8341F; color: #fff; }
.btn.danger.soft { background: transparent; color: #C8341F; box-shadow: inset 0 0 0 1px rgba(200,52,31,.35); }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn svg { width: 16px; height: 16px; }
.icon-btn { width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: 11px; color: var(--ink-2); transition: background .2s; }
.icon-btn:hover { background: var(--line); }
.link { color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-2); }
.link.sm { font-size: 13px; color: var(--muted); text-decoration: none; padding: 6px 4px; }
.link.sm:hover { color: var(--ink); }

.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 750; font-size: 16px; letter-spacing: -.02em; text-decoration: none; }
.logo { position: relative; width: 24px; height: 24px; transform: rotateX(55deg) rotateZ(-40deg); transform-style: preserve-3d; }
.logo i { position: absolute; inset: 3px; border-radius: 4px; }
.logo i:nth-child(1) { background: #2F7DE1; transform: translateZ(0); opacity: .9; }
.logo i:nth-child(2) { background: #D9497A; transform: translateZ(5px); opacity: .85; }
.logo i:nth-child(3) { background: #E8743B; transform: translateZ(10px); opacity: .92; }

/* ── 3D 레이어 스택 (대표 인터랙션) ── */
.stack { --gap: 16px; --size: 150px; position: relative; height: calc(var(--size) * .9 + var(--n, 3) * var(--gap) * .55); display: grid; place-items: center; perspective: 900px; perspective-origin: 50% 0%; margin: 4px 0 6px; transition: --gap .5s; }
.stack.big { --size: min(360px, 74vw); --gap: 34px; height: calc(var(--size) * 1.1 + var(--n, 4) * 18px); animation: breathe 7s var(--ease) infinite; }
@keyframes breathe { 0%, 100% { --gap: 46px; } 45%, 55% { --gap: 4px; } }
@property --gap { syntax: "<length>"; inherits: true; initial-value: 16px; }
.stack-rot { position: relative; width: var(--size); height: calc(var(--size) * .78); transform-style: preserve-3d; transform: rotateX(58deg) rotateZ(-38deg) translateZ(calc(var(--n, 3) * var(--gap) * -.5)); transition: transform .6s var(--ease); }
.stack:hover .stack-rot { transform: rotateX(54deg) rotateZ(-34deg) translateZ(calc(var(--n, 3) * var(--gap) * -.5)); }
.sheet { position: absolute; inset: 0; border-radius: 12px; transform: translateZ(calc(var(--i, 0) * var(--gap) + var(--enter, 0) * 80px)); opacity: calc(1 - var(--enter, 0)); background: color-mix(in oklab, var(--c, #888) 13%, color-mix(in oklab, var(--surface) 22%, transparent)); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--c, #888) 55%, transparent), 0 18px 30px -18px color-mix(in oklab, var(--c, #000) 70%, transparent); backdrop-filter: blur(2px); transition: transform .6s var(--spring), opacity .45s var(--ease), background .3s, box-shadow .3s; padding: 9% 8% 8%; }
.sheet::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(135deg, rgba(255,255,255,.55), rgba(255,255,255,0) 45%); opacity: .55; pointer-events: none; }
.sheet.base { background: var(--surface); box-shadow: var(--shadow-lg); transform: translateZ(0); }
.sheet.base::before { display: none; }
.sheet.off { transform: translateZ(calc(var(--i, 0) * var(--gap) + 70px)); opacity: .14; box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--c) 60%, transparent); background: transparent; }
.sheet.lift { transform: translateZ(calc(var(--i, 0) * var(--gap) + 26px)); box-shadow: inset 0 0 0 1.5px var(--c), 0 30px 40px -20px color-mix(in oklab, var(--c) 80%, transparent); }
.sg { position: relative; display: grid; grid-template-columns: repeat(7, 1fr); gap: 7%; height: 100%; }
.sg i { border-radius: 2px; background: color-mix(in oklab, var(--ink) 7%, transparent); }
.sheet:not(.base) .sg i { background: transparent; }
.sg i[style] { background: var(--k) !important; box-shadow: 0 0 0 1px color-mix(in oklab, var(--k) 40%, transparent); }
.sheet-label { position: absolute; left: 6%; top: -2px; transform: translateY(-100%); font-size: 11px; font-weight: 700; color: var(--c); white-space: nowrap; letter-spacing: -.01em; opacity: 0; transition: opacity .3s; }
.sheet.lift .sheet-label { opacity: 1; }

/* ── 처음 화면 ── */
.welcome { min-height: 100vh; padding: 0 max(16px, 4vw) 40px; max-width: 1240px; margin: 0 auto; }
.w-top { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.w-grid { display: grid; grid-template-columns: 1.02fr 1fr; gap: clamp(24px, 4vw, 64px); align-items: center; min-height: calc(100vh - 220px); padding: 20px 0 40px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px; border-radius: 99px; font-size: 13px; color: var(--muted); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: linear-gradient(135deg, #E8743B, #D9497A 50%, #2F7DE1); }
.welcome h1 { margin-top: 20px; font-size: clamp(44px, 7.4vw, 92px); line-height: 1.02; letter-spacing: -.055em; font-weight: 850; }
.welcome h1 em { font-style: normal; background: linear-gradient(100deg, #E8743B 0%, #D9497A 45%, #2F7DE1 90%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { margin-top: 22px; max-width: 30em; font-size: clamp(15.5px, 1.3vw, 17.5px); color: var(--muted); line-height: 1.75; }
.w-start { margin-top: 30px; display: flex; gap: 10px; align-items: flex-end; max-width: 480px; }
.w-start .field { flex: 1; }
.w-alt { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13.5px; color: var(--muted); }
.w-alt .link { font-size: 13.5px; }
.w-stage { position: relative; display: grid; place-items: center; min-height: 420px; }
.w-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 8px; }
.w-legend span { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); padding: 5px 10px; border-radius: 99px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.w-legend i { width: 8px; height: 8px; border-radius: 3px; background: var(--c); }
.w-feats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--line); }
.w-feats div { padding: 22px 22px 6px 0; display: grid; gap: 6px; }
.w-feats div + div { padding-left: 22px; border-left: 1px solid var(--line); }
.w-feats b { font-size: 15px; letter-spacing: -.02em; }
.w-feats span { font-size: 14px; color: var(--muted); line-height: 1.65; }
.invite-card { margin-top: 26px; display: flex; gap: 14px; align-items: center; padding: 16px 18px; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); max-width: 480px; }
.invite-card .sw { width: 40px; height: 40px; border-radius: 12px; background: var(--c); flex: none; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08), 0 8px 18px -8px var(--c); }
.invite-card b { display: block; font-size: 16px; letter-spacing: -.02em; }
.invite-card small { color: var(--muted); font-size: 13px; }
.invite-card.err { color: #B4321E; }

/* ── 입력 ── */
.field { display: grid; gap: 6px; }
.field > span { font-size: 13px; font-weight: 600; color: var(--muted); }
.field input, .field select, .field textarea { width: 100%; height: 48px; padding: 0 14px; border-radius: 12px; border: 0; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-2); font-size: 16px; transition: box-shadow .2s; }
.field textarea { height: auto; min-height: 84px; padding: 12px 14px; resize: vertical; line-height: 1.6; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; box-shadow: inset 0 0 0 2px var(--ink); }
.field input[type="date"], .field input[type="time"] { min-width: 0; -webkit-appearance: none; appearance: none; }
.field small { font-size: 12.5px; color: var(--faint); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.code-in { font-family: ui-monospace, SFMono-Regular, Menlo, monospace !important; letter-spacing: .08em; text-transform: uppercase; }

/* ── 앱 레이아웃 ── */
.app { display: grid; grid-template-columns: 296px minmax(0, 1fr) 320px; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; overscroll-behavior: contain; padding: 18px 18px 24px; border-right: 1px solid var(--line); background: var(--bg-2); display: flex; flex-direction: column; gap: 6px; scrollbar-width: thin; }
.side-head { display: flex; align-items: center; justify-content: space-between; height: 40px; }
.side-sec { padding: 10px 0; }
.side-sec + .side-sec { border-top: 1px solid var(--line); }
.sec-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.sec-h h2 { font-size: 12.5px; font-weight: 700; color: var(--muted); letter-spacing: .02em; }
.cal-list { list-style: none; display: grid; gap: 2px; }
.cal-row { position: relative; display: flex; align-items: center; gap: 4px; border-radius: 11px; transition: background .2s; }
.cal-row:hover { background: var(--line); }
.cal-tog { flex: 1; min-width: 0; display: flex; align-items: center; gap: 11px; min-height: 44px; padding: 6px 8px; text-align: left; border-radius: 11px; }
.box { width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; flex: none; background: var(--c); color: #fff; box-shadow: inset 0 0 0 1.5px var(--c); transition: background .2s, transform .25s var(--spring); }
.box svg { width: 14px; height: 14px; transition: opacity .15s, transform .25s var(--spring); }
.cal-row.off .box { background: transparent; }
.cal-row.off .box svg { opacity: 0; transform: scale(.4); }
.cal-tog:active .box { transform: scale(.88); }
.cal-name { min-width: 0; display: grid; }
.cal-name b { font-size: 14.5px; font-weight: 650; letter-spacing: -.015em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-name small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-row.off .cal-name b { color: var(--muted); }
.only-btn { font-size: 12px; font-weight: 650; color: var(--muted); padding: 6px 8px; border-radius: 8px; opacity: 0; transition: opacity .15s, background .2s; white-space: nowrap; }
.cal-row:hover .only-btn, .only-btn:focus-visible { opacity: 1; }
.only-btn:hover { background: var(--surface); color: var(--ink); }
.cal-more { width: 36px; height: 36px; }
.side-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.up-list { list-style: none; display: grid; gap: 2px; }
.up-list li { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-radius: 10px; }
.up-list .bar { width: 3px; align-self: stretch; border-radius: 3px; background: var(--c); flex: none; }
.up-list .t { flex: 1; min-width: 0; display: grid; }
.up-list .t b { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.up-list .t small { font-size: 12px; color: var(--muted); }
.up-list .d { font-size: 13px; font-weight: 750; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.up-list .d.soon { color: var(--sun); }
.up-empty { font-size: 13px; color: var(--faint); padding: 6px; }
.me-sec { margin-top: auto; }
.me-btn { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; text-align: left; transition: background .2s; }
.me-btn:hover { background: var(--line); }
.me-btn > svg:first-child { width: 34px; height: 34px; padding: 8px; border-radius: 50%; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.me-btn span { flex: 1; display: grid; }
.me-btn b { font-size: 14px; }
.me-btn small { font-size: 12px; color: var(--muted); }
.me-btn .chev { color: var(--faint); }

.main { min-width: 0; padding: 14px clamp(16px, 2.4vw, 32px) 32px; }
.top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-height: 56px; }
.title { display: flex; align-items: baseline; gap: 8px; margin-right: auto; letter-spacing: -.045em; line-height: 1; }
.title b { font-size: clamp(30px, 3.4vw, 40px); font-weight: 850; }
.title span { font-size: 16px; font-weight: 600; color: var(--muted); letter-spacing: -.01em; }
.nav { display: flex; align-items: center; gap: 2px; }
.seg { position: relative; display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 3px; border-radius: 12px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.seg button { position: relative; z-index: 1; height: 34px; padding: 0 14px; font-size: 13.5px; font-weight: 650; color: var(--muted); border-radius: 9px; transition: color .2s; white-space: nowrap; }
.seg button[aria-selected="true"] { color: var(--btn-ink); }
.seg-ind { position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc((100% - 6px) / 3); border-radius: 9px; background: var(--btn); transition: transform .35s var(--spring); }
.sync { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); padding: 0 6px; white-space: nowrap; }
.sync i { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.sync.live i { background: #1FA971; box-shadow: 0 0 0 3px rgba(31,169,113,.18); }
.sync.off i { background: #D97706; }
.banner { margin: 8px 0; padding: 11px 14px; border-radius: 12px; font-size: 13.5px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-2); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.banner b { font-weight: 700; }
.banner .btn { margin-left: auto; }
.chips { display: none; gap: 8px; overflow-x: auto; padding: 6px 0 10px; scrollbar-width: none; margin: 0 calc(-1 * clamp(16px, 2.4vw, 32px)); padding-left: clamp(16px, 2.4vw, 32px); padding-right: clamp(16px, 2.4vw, 32px); }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 13px 0 10px; border-radius: 99px; font-size: 13.5px; font-weight: 650; background: color-mix(in oklab, var(--c) 14%, var(--surface)); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--c) 45%, transparent); white-space: nowrap; transition: background .2s, color .2s, box-shadow .2s; }
.chip i { width: 9px; height: 9px; border-radius: 3px; background: var(--c); transition: transform .25s var(--spring); }
.chip.off { background: transparent; color: var(--faint); box-shadow: inset 0 0 0 1px var(--line-2); }
.chip.off i { transform: scale(.6); opacity: .5; }

/* 커플 디데이 히어로 (항상 어두운 판) */
.hero { margin: 6px 0 14px; display: grid; gap: 10px; }
.hero-card { position: relative; overflow: hidden; display: grid; grid-template-columns: auto 1fr; gap: 6px 22px; align-items: center; padding: 18px 20px; border-radius: 20px; color: #F4EEE6; background: radial-gradient(120% 140% at 0% 0%, color-mix(in oklab, var(--c) 42%, #15100E) 0%, #120E0D 55%, #0B0A0A 100%); box-shadow: 0 24px 50px -28px color-mix(in oklab, var(--c) 80%, #000), inset 0 0 0 1px rgba(255,255,255,.06); isolation: isolate; }
.hero-card::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, rgba(255,255,255,.035) 0 1px, transparent 1px 22px); mask: linear-gradient(90deg, transparent, #000 60%); pointer-events: none; z-index: -1; }
.hero-l small { display: block; font-size: 12.5px; color: rgba(244,238,230,.65); margin-bottom: 8px; font-weight: 600; }
.hero-l small b { color: #fff; }
.hero-n { display: flex; align-items: flex-end; gap: 6px; }
.flaps { display: inline-flex; gap: 4px; perspective: 400px; }
.flap { position: relative; width: 38px; height: 54px; border-radius: 8px; font-size: 40px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.flap .h { position: absolute; left: 0; right: 0; height: 50%; overflow: hidden; background: linear-gradient(180deg, #2A2320, #1E1917); box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); backface-visibility: hidden; }
.flap .hu { top: 0; border-radius: 8px 8px 0 0; transform-origin: 50% 100%; }
.flap .hd { bottom: 0; border-radius: 0 0 8px 8px; transform-origin: 50% 0%; background: linear-gradient(180deg, #1A1513, #231D1A); }
.flap .h b { position: absolute; left: 0; right: 0; height: 200%; display: grid; place-items: center; color: #FBF6EE; }
.flap .hu b { top: 0; }
.flap .hd b { bottom: 0; }
.flap::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: rgba(0,0,0,.55); z-index: 3; }
.flap .fold { z-index: 2; animation: fold linear both; }
.flap .unfold { z-index: 2; animation: unfold linear both; transform: rotateX(90deg); }
@keyframes fold { to { transform: rotateX(-90deg); } }
@keyframes unfold { from { transform: rotateX(90deg); } to { transform: rotateX(0); } }
.flap-sep { font-size: 30px; font-weight: 800; color: rgba(251,246,238,.5); align-self: flex-end; line-height: 1; padding-bottom: 6px; }
.hero-n .unit { font-size: 18px; font-weight: 700; padding-bottom: 6px; color: rgba(251,246,238,.85); }
.hero-r { display: grid; gap: 10px; min-width: 0; }
.hero-next { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: rgba(244,238,230,.7); }
.hero-next b { color: #fff; font-weight: 700; }
.prog { height: 4px; border-radius: 4px; background: rgba(255,255,255,.1); overflow: hidden; }
.prog i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, color-mix(in oklab, var(--c) 70%, #fff), #fff); transform-origin: left; transition: transform 1.2s var(--ease); }
.note-btn { text-align: left; display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); font-size: 14px; color: #F4EEE6; min-height: 44px; }
.note-btn:hover { background: rgba(255,255,255,.1); }
.note-btn small { color: rgba(244,238,230,.55); font-size: 12px; white-space: nowrap; margin-left: auto; }
.note-btn span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── 월 보기 ── */
.month { border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.wk { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.wk-h { font-size: 12px; font-weight: 650; color: var(--muted); text-align: center; padding: 10px 0 8px; border-bottom: 1px solid var(--line); }
.wk-h:first-child { color: var(--sun); }
.wk-h:last-child { color: var(--sat); }
.mrow { position: relative; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-template-rows: 30px repeat(var(--slots, 3), 23px) 1fr; min-height: var(--rowh, 110px); border-bottom: 1px solid var(--line); }
.mrow:last-child { border-bottom: 0; }
.cell { position: relative; grid-row: 1 / -1; padding: 5px 5px 4px; border-right: 1px solid var(--line); text-align: left; display: flex; flex-direction: column; min-width: 0; transition: background .2s; }
.cell[style*="grid-column:7"] { border-right: 0; }
.mb { position: relative; z-index: 2; display: flex; align-items: center; gap: 5px; min-width: 0; height: 20px; margin: 1px 4px 2px; padding: 0 7px; border-radius: 6px; font-size: 12px; font-weight: 600; line-height: 1; white-space: nowrap; overflow: hidden; text-align: left; background: color-mix(in oklab, var(--c) 15%, transparent); color: color-mix(in oklab, var(--c) 62%, var(--ink)); transition: filter .15s, transform .15s; }
.mb:hover { filter: brightness(1.06) saturate(1.1); }
.mb:active { transform: scale(.98); }
.mb.allday { background: var(--c); color: #fff; }
.mb.anniv { background: transparent; box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--c) 60%, transparent); color: color-mix(in oklab, var(--c) 70%, var(--ink)); }
.mb.cl { margin-left: 0; border-top-left-radius: 0; border-bottom-left-radius: 0; padding-left: 12px; clip-path: polygon(7px 0, 100% 0, 100% 100%, 7px 100%, 0 50%); }
.mb.cr { margin-right: 0; border-top-right-radius: 0; border-bottom-right-radius: 0; padding-right: 12px; clip-path: polygon(0 0, calc(100% - 7px) 0, 100% 50%, calc(100% - 7px) 100%, 0 100%); }
.mb.cl.cr { clip-path: polygon(7px 0, calc(100% - 7px) 0, 100% 50%, calc(100% - 7px) 100%, 7px 100%, 0 50%); }
.mb em { font-style: normal; font-weight: 500; opacity: .75; font-variant-numeric: tabular-nums; }
.mb span { overflow: hidden; text-overflow: ellipsis; }
.mb.pending { opacity: .55; }
.more-btn { position: relative; z-index: 2; align-self: center; justify-self: start; height: 20px; margin: 0 4px; padding: 0 6px; border-radius: 6px; font-size: 12px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.more-btn:hover { background: var(--line); color: var(--ink); }
.cell:hover { background: var(--surface-2); }
.cell.out { background: color-mix(in oklab, var(--bg) 40%, var(--surface)); }
.cell.out .dn { color: var(--faint); }
.dn { align-self: flex-start; display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 5px; border-radius: 99px; font-size: 13.5px; font-weight: 650; font-variant-numeric: tabular-nums; }
.cell.sun .dn { color: var(--sun); }
.cell.sat .dn { color: var(--sat); }
.cell.today .dn { background: var(--btn); color: var(--btn-ink); }
.cell.sel { background: color-mix(in oklab, var(--ink) 5%, var(--surface)); box-shadow: inset 0 0 0 2px var(--ink); z-index: 1; }
.dots { display: none; justify-content: center; margin-top: auto; padding-bottom: 2px; }
.dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 1.5px var(--surface); }
.dots i + i { margin-left: -3px; }
.anniv-tag { display: none; }

/* ── 주 보기 ── */
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.wcol { border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); padding: 10px 8px; min-height: 320px; display: flex; flex-direction: column; gap: 5px; min-width: 0; text-align: left; }
.wcol.sel { box-shadow: inset 0 0 0 2px var(--ink); }
.wcol-h { display: flex; align-items: baseline; gap: 6px; padding: 2px 4px 8px; }
.wcol-h small { font-size: 12px; color: var(--muted); font-weight: 650; }
.wcol-h b { font-size: 22px; font-weight: 800; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.wcol.today .wcol-h b { color: var(--sun); }
.wev { display: grid; gap: 1px; padding: 7px 8px; border-radius: 10px; background: color-mix(in oklab, var(--c) 13%, transparent); box-shadow: inset 3px 0 0 var(--c); font-size: 12.5px; min-width: 0; }
.wev b { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wev small { color: var(--muted); font-size: 11.5px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wev.anniv { background: transparent; box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--c) 50%, transparent); }
.wempty { font-size: 12px; color: var(--faint); padding: 4px; }

/* ── 목록 보기 · 날짜 패널 ── */
.agenda { display: grid; gap: 14px; }
.ag-day { display: grid; grid-template-columns: 64px 1fr; gap: 12px; }
.ag-d { text-align: left; padding-top: 6px; }
.ag-d b { display: block; font-size: 26px; font-weight: 800; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.ag-d small { font-size: 12px; color: var(--muted); font-weight: 600; }
.ag-day.today .ag-d b { color: var(--sun); }
.ag-list { display: grid; gap: 6px; }
.empty { text-align: center; padding: 40px 16px; color: var(--muted); font-size: 14px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 10px 14px 10px 12px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); text-align: left; transition: transform .15s var(--ease); min-width: 0; }
.item:active { transform: scale(.985); }
.item .bar { width: 4px; align-self: stretch; border-radius: 4px; background: var(--c); flex: none; }
.item .t { flex: 1; min-width: 0; display: grid; gap: 1px; }
.item .t b { font-size: 15px; font-weight: 650; letter-spacing: -.015em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .t small { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .r { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.item .r svg { width: 14px; height: 14px; vertical-align: -2px; }
.item.anniv { background: transparent; box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--c) 45%, transparent); }
.item.pending { opacity: .6; }
.dayp { position: sticky; top: 0; height: 100vh; overflow-y: auto; border-left: 1px solid var(--line); padding: 22px 18px; display: flex; flex-direction: column; gap: 12px; }
.dayp-h { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.dayp-h b { display: block; font-size: 28px; font-weight: 850; letter-spacing: -.045em; line-height: 1.05; }
.dayp-h small { display: block; font-size: 13px; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.dayp-list { display: grid; gap: 8px; }
.dayp-empty { font-size: 14px; color: var(--muted); padding: 18px 4px; }

.fab { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(18px, env(safe-area-inset-bottom)); width: 58px; height: 58px; border-radius: 20px; display: grid; place-items: center; background: var(--btn); color: var(--btn-ink); box-shadow: 0 16px 34px -12px rgba(0,0,0,.6); z-index: 30; transition: transform .2s var(--spring); }
.fab:active { transform: scale(.92); }
.fab svg { width: 24px; height: 24px; }

/* ── 시트(대화상자) ── */
dialog.modal { position: fixed; inset: auto 0 0 0; margin: 0 auto; width: 100%; max-width: 520px; max-height: min(92vh, 900px); border: 0; padding: 0; background: var(--surface); color: var(--ink); border-radius: 24px 24px 0 0; box-shadow: var(--shadow-lg); overflow: hidden; }
dialog.modal[open] { animation: up .38s var(--ease); display: flex; flex-direction: column; }
dialog.modal.closing { animation: down .22s var(--ease) forwards; }
dialog.modal::backdrop { background: rgba(10, 8, 6, .42); backdrop-filter: blur(3px); animation: fade .3s; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
@keyframes down { to { transform: translateY(40px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
.sheet-in { overflow-y: auto; overscroll-behavior: contain; padding: 10px 20px max(20px, env(safe-area-inset-bottom)); }
.grab { width: 40px; height: 5px; border-radius: 3px; background: var(--line-2); margin: 0 auto 10px; }
.sh-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 0 12px; }
.sh-head h2 { font-size: 21px; font-weight: 800; letter-spacing: -.035em; }
.sh-body { display: grid; gap: 16px; }
.sh-foot { display: flex; gap: 8px; padding-top: 18px; flex-wrap: wrap; }
.sh-foot .grow { flex: 1; }
.sh-note { font-size: 13.5px; color: var(--muted); line-height: 1.7; }
.sh-note b { color: var(--ink); }
.sh-sec { display: grid; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.sh-sec h3 { font-size: 13px; font-weight: 700; color: var(--muted); }
.pick { display: flex; flex-wrap: wrap; gap: 8px; }
.pick label { position: relative; }
.pick input { position: absolute; opacity: 0; pointer-events: none; }
.pick span { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 13px; border-radius: 11px; font-size: 14px; font-weight: 600; box-shadow: inset 0 0 0 1px var(--line-2); transition: background .2s, box-shadow .2s, color .2s; cursor: pointer; white-space: nowrap; }
.pick span i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.pick input:checked + span { background: var(--btn); color: var(--btn-ink); box-shadow: none; }
.pick input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.pick.cals input:checked + span { background: color-mix(in oklab, var(--c) 18%, var(--surface)); color: var(--ink); box-shadow: inset 0 0 0 2px var(--c); }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatches label { position: relative; }
.swatches input { position: absolute; opacity: 0; }
.swatches span { display: block; width: 36px; height: 36px; border-radius: 12px; background: var(--c); cursor: pointer; transition: transform .2s var(--spring), box-shadow .2s; }
.swatches input:checked + span { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--c); transform: scale(.9); }
.swatches input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 4px; }
.kinds { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kinds label { position: relative; }
.kinds input { position: absolute; opacity: 0; }
.kinds span { display: grid; gap: 4px; padding: 14px; border-radius: 14px; box-shadow: inset 0 0 0 1px var(--line-2); cursor: pointer; min-height: 92px; transition: box-shadow .2s, background .2s; }
.kinds span b { font-size: 15.5px; }
.kinds span small { font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.kinds input:checked + span { box-shadow: inset 0 0 0 2px var(--ink); background: var(--surface-2); }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; font-size: 15px; font-weight: 600; cursor: pointer; }
.switch input { appearance: none; -webkit-appearance: none; width: 48px; height: 28px; border-radius: 99px; background: var(--line-2); position: relative; cursor: pointer; transition: background .25s; flex: none; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.25); transition: transform .3s var(--spring); }
.switch input:checked { background: var(--btn); }
.switch input:checked::after { transform: translateX(20px); background: var(--btn-ink); }
.code-box { display: grid; gap: 10px; padding: 16px; border-radius: 16px; background: #141110; color: #F4EEE6; }
.code-box code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: clamp(16px, 4.6vw, 21px); letter-spacing: .06em; font-weight: 600; word-break: break-all; }
.code-box small { color: rgba(244,238,230,.6); font-size: 12.5px; }
.code-box .btns { display: flex; gap: 8px; flex-wrap: wrap; }
.code-box .btn.soft { background: rgba(255,255,255,.08); color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.14); }
.members { list-style: none; display: grid; gap: 4px; }
.members li { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.av { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 12.5px; font-weight: 700; color: #fff; background: var(--c); flex: none; }
.members li > span:not(.av) { flex: 1; min-width: 0; }
.members li small { color: var(--muted); font-size: 12px; margin-left: 6px; }
.err-msg { font-size: 13.5px; color: #C8341F; min-height: 0; }
.detail-row { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; }
.detail-row svg { margin-top: 3px; color: var(--muted); }
.detail-memo { white-space: pre-wrap; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); font-size: 14.5px; }

.toast { position: fixed; left: 50%; bottom: calc(max(18px, env(safe-area-inset-bottom)) + 70px); transform: translate(-50%, 20px); opacity: 0; pointer-events: none; padding: 12px 16px; border-radius: 14px; background: var(--btn); color: var(--btn-ink); font-size: 14px; font-weight: 600; box-shadow: 0 16px 40px -12px rgba(0,0,0,.5); transition: transform .35s var(--spring), opacity .25s; z-index: 100; max-width: calc(100vw - 32px); text-align: center; }
.toast.on { transform: translate(-50%, 0); opacity: 1; }

.foot { padding: 28px max(16px, 4vw) 40px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); display: grid; gap: 10px; text-align: center; justify-items: center; }
.foot .priv { max-width: 62em; line-height: 1.7; }
.foot .links { display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: center; }
.foot a { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; font-weight: 600; color: var(--ink-2); }
.foot a:hover { text-decoration: underline; }
.foot svg { width: 16px; height: 16px; }

.only-m { display: none !important; }

/* ── 반응형 ── */
@media (max-width: 1279px) {
  .app { grid-template-columns: 280px minmax(0, 1fr); }
  .dayp { position: static; height: auto; border-left: 0; grid-column: 2; padding: 0 clamp(16px, 2.4vw, 32px) 32px; }
}
@media (max-width: 1023px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .dayp { grid-column: 1; }
  .side { position: fixed; z-index: 60; inset: 0 auto 0 0; width: min(340px, 88vw); transform: translateX(-104%); transition: transform .38s var(--ease); box-shadow: var(--shadow-lg); }
  .side.open { transform: none; }
  .scrim { position: fixed; inset: 0; z-index: 55; background: rgba(10,8,6,.4); backdrop-filter: blur(2px); }
  .only-m { display: inline-grid !important; }
  .only-d { display: none !important; }
  .chips { display: flex; }
  .top { gap: 6px; }
  .seg { order: 5; width: 100%; }
  .sync { order: 4; }
  .w-grid { grid-template-columns: 1fr; min-height: 0; }
  .w-stage { order: -1; min-height: 0; }
  .w-feats { grid-template-columns: 1fr; }
  .w-feats div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .w-feats div { padding: 16px 0; }
  .fab.only-m { display: grid !important; }
}
@media (max-width: 767px) {
  .mrow { grid-template-rows: 64px; min-height: 0; }
  .cell { padding: 4px 2px; align-items: center; }
  .mb, .more-btn { display: none; }
  .dn { font-size: 13px; min-width: 26px; padding: 0; }
  .dots { display: flex; }
  .anniv-tag { display: block; width: 4px; height: 4px; border-radius: 50%; background: var(--c); position: absolute; top: 6px; right: 6px; }
  .week { grid-template-columns: 1fr; gap: 8px; }
  .wcol { min-height: 0; flex-direction: row; align-items: flex-start; gap: 10px; padding: 10px; }
  .wcol-h { flex-direction: column; align-items: center; gap: 0; padding: 2px 6px; width: 40px; flex: none; }
  .wcol-list { flex: 1; min-width: 0; display: grid; gap: 5px; }
  .hero-card { grid-template-columns: 1fr; padding: 16px; }
  .flap { width: 34px; height: 48px; font-size: 34px; }
  .welcome h1 { font-size: clamp(42px, 13vw, 60px); }
  .w-start { flex-direction: column; align-items: stretch; }
  .stack.big { --size: min(220px, 60vw); height: calc(var(--size) * 1.05 + var(--n, 4) * 16px); }
  .w-stage { margin-top: -6px; }
  .w-legend { margin-top: 0; }
  .ag-day { grid-template-columns: 48px 1fr; gap: 10px; }
  .ag-d b { font-size: 22px; }
  .title b { font-size: 28px; }
  .sync em { display: none; }
  .sync { padding: 0 4px; }
}
@media (min-width: 768px) {
  dialog.modal { inset: 0; margin: auto; border-radius: 24px; max-height: min(86vh, 860px); }
  .grab { display: none; }
  .wcol-list { display: grid; gap: 5px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .stack.big { animation: none; }
}
