/* 우리 둘 — 두 사람의 색(산딸기·코발트)이 화면 곳곳에서 "누구의 것인지"를 알려 준다 */
:root {
  --ink: #2b2140;
  --muted: #7a6f8a;
  --paper: #fbf7fb;
  --card: #ffffff;
  --line: #eadfee;
  --c0: #d6336c;
  --c1: #3b5bdb;
  --gold: #e8a400;
  --danger: #c92a2a;
  --serif: 'Gowun Batang', 'Noto Serif KR', serif;
  --sans: 'Pretendard Variable', Pretendard, -apple-system, 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
  --tab-h: 60px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--paper); }
body { margin: 0; color: var(--ink); font: 16px/1.55 var(--sans); overscroll-behavior-y: contain; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 2px solid var(--c1); outline-offset: 2px; }
[hidden] { display: none !important; }

#view { max-width: 560px; margin: 0 auto; padding: 0 20px calc(var(--tab-h) + var(--safe-b) + 28px); min-height: 100dvh; }

/* 아래 탭 */
#tabs { position: fixed; inset: auto 0 0 0; height: calc(var(--tab-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  display: grid; grid-template-columns: repeat(5, 1fr); background: rgba(251, 247, 251, .94); backdrop-filter: blur(12px);
  border-top: 1px solid var(--line); z-index: 10; }
#tabs a { display: grid; place-items: center; align-content: center; gap: 2px; text-decoration: none; font-size: 11px; color: var(--muted); }
#tabs a svg { width: 24px; height: 24px; }
#tabs a[aria-current='page'] { color: var(--ink); font-weight: 700; }

/* 머리 */
.top { display: flex; align-items: center; justify-content: space-between; padding: calc(env(safe-area-inset-top, 0px) + 18px) 0 10px; }
.top h1 { font: 700 22px/1.2 var(--serif); }
.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; margin-right: -10px; }
.icon-btn svg { width: 24px; height: 24px; }
.icon-btn:active { background: var(--line); }

/* 홈: 함께한 날 */
.hero { position: relative; padding: 26px 0 30px; overflow: hidden; }
.hero .rings { position: absolute; right: -34px; top: 2px; width: 210px; height: 150px; pointer-events: none; }
.hero .rings i { position: absolute; top: 0; width: 132px; height: 132px; border-radius: 50%; mix-blend-mode: multiply; opacity: .2; }
.hero .rings i:first-child { left: 0; background: var(--c0); }
.hero .rings i:last-child { right: 0; background: var(--c1); }
.hero .names { display: flex; gap: 14px; font-size: 15px; font-weight: 600; }
.hero .count { font: 700 clamp(72px, 26vw, 120px)/1 var(--serif); letter-spacing: -.03em; margin: 14px 0 6px -4px; font-variant-numeric: lining-nums; }
.hero .count small { font-size: .26em; letter-spacing: 0; margin-left: 8px; }
.hero .since { color: var(--muted); font-size: 14px; }
.who { display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); flex: none; }
.dot.c0 { background: var(--c0); } .dot.c1 { background: var(--c1); } .dot.gold { background: var(--gold); }
.dot.both { background: linear-gradient(90deg, var(--c0) 50%, var(--c1) 50%); }

.live-btn { width: 100%; display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 18px; background: var(--ink); color: #fff; text-align: left; }
.live-btn svg { width: 26px; height: 26px; flex: none; }
.live-btn b { display: block; font-size: 16px; }
.live-btn span { font-size: 13px; opacity: .72; }

section { margin-top: 34px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 6px; }
.sec-head h2 { font: 700 18px/1.3 var(--serif); }
.link { color: var(--c1); font-size: 14px; font-weight: 600; padding: 8px 0 8px 12px; }

/* 줄 목록 */
.rows { border-top: 1px solid var(--line); }
.row { width: 100%; display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); text-align: left; min-height: 56px; }
.row .main { flex: 1; min-width: 0; }
.row .main b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .main span { display: block; color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row.done .main b { text-decoration: line-through; color: var(--muted); }
.dday { font: 700 15px/1 var(--serif); padding: 7px 10px; border-radius: 999px; background: #f3ebf5; white-space: nowrap; }
.dday.today { background: var(--gold); color: #fff; }
.empty { color: var(--muted); padding: 22px 0; font-size: 15px; }
.check { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; flex: none; color: #fff; }
.check.on { background: var(--ink); border-color: var(--ink); }
.check svg { width: 16px; height: 16px; }

/* 단추 */
.btn { min-height: 48px; padding: 0 20px; border-radius: 14px; background: var(--ink); color: #fff; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.danger { background: transparent; color: var(--danger); border: 1px solid #f1c7c7; }
.btn.wide { width: 100%; }
.btn:disabled { opacity: .45; }
.btn svg { width: 20px; height: 20px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.btn-row .btn { flex: 1; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 20px; margin: 0 -20px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips.wrap { flex-wrap: wrap; overflow: visible; }
.chip { flex: none; min-height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font-size: 14px; white-space: nowrap; }
.chip[aria-pressed='true'] { background: var(--ink); color: #fff; border-color: var(--ink); }
.fab { position: fixed; right: max(20px, calc(50vw - 260px)); bottom: calc(var(--tab-h) + var(--safe-b) + 18px); width: 58px; height: 58px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; box-shadow: 0 8px 22px rgba(43, 33, 64, .28); z-index: 9; }
.fab svg { width: 26px; height: 26px; }

/* 입력 */
label.field { display: block; margin-top: 14px; font-size: 13px; color: var(--muted); font-weight: 600; }
label.field input, label.field select, label.field textarea, .input { display: block; width: 100%; margin-top: 6px; min-height: 48px; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); font-size: 16px; color: var(--ink); font-weight: 400; }
textarea { resize: vertical; min-height: 92px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; min-height: 44px; }
.switch input { width: 22px; height: 22px; accent-color: var(--ink); }
.hint { color: var(--muted); font-size: 13px; margin-top: 8px; }

/* 달력 */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 10px; }
.cal-head h2 { font: 700 24px/1.2 var(--serif); }
.cal-head div { display: flex; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.cal .dow { text-align: center; font-size: 12px; color: var(--muted); padding: 6px 0; }
.cal .day { aspect-ratio: 1 / 1.08; display: flex; flex-direction: column; align-items: center; gap: 4px; padding-top: 7px; border-radius: 12px; font-size: 15px; }
.cal .day.out { color: #c9bfd3; }
.cal .day.today span:first-child { font-weight: 800; text-decoration: underline; text-underline-offset: 4px; }
.cal .day.sel { background: var(--ink); color: #fff; }
.cal .day .marks { display: flex; gap: 3px; height: 7px; }
.cal .day .marks i { width: 6px; height: 6px; border-radius: 50%; }
.cal .day.sel .marks i { outline: 1px solid rgba(255, 255, 255, .7); }

.cal .day.has-cover { background-size: cover; background-position: center; color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .75); font-weight: 700; justify-content: space-between; padding-bottom: 5px; }
.cal .day.has-cover.out { opacity: .45; }
.cal .day.has-cover.sel { background-color: transparent; outline: 3px solid var(--ink); outline-offset: -3px; }
.day-slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.slot { width: 100%; aspect-ratio: 3 / 4; border-radius: 14px; background: #efe7f2 center / cover no-repeat; display: grid; place-items: center; color: var(--muted); font-size: 13px; }
.slot svg { width: 26px; height: 26px; }
.slot-name { text-align: center; font-size: 13px; font-weight: 600; margin-top: 6px; }

/* 사진 */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; margin: 0 -20px; }
.month { font: 700 16px/1 var(--serif); margin: 26px 0 10px; }
.thumb { position: relative; aspect-ratio: 1; background: #efe7f2; overflow: hidden; display: block; width: 100%; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .owner { position: absolute; left: 6px; bottom: 6px; width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid #fff; }
.thumb .play { position: absolute; right: 6px; top: 6px; color: #fff; width: 20px; height: 20px; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .5)); }
.thumb .pick { position: absolute; right: 6px; top: 6px; width: 24px; height: 24px; border-radius: 50%; border: 2px solid #fff; background: rgba(0, 0, 0, .2); display: grid; place-items: center; color: #fff; }
.thumb.picked .pick { background: var(--c1); }
.thumb.picked img { transform: scale(.86); border-radius: 8px; }
.thumb .pick svg { width: 14px; height: 14px; }
.pick-bar { position: fixed; left: 0; right: 0; bottom: calc(var(--tab-h) + var(--safe-b)); background: var(--ink); color: #fff; display: flex; align-items: center; gap: 6px; padding: 8px 12px 8px 20px; z-index: 9; }
.pick-bar b { flex: 1; }
.pick-bar button { color: #fff; min-height: 44px; padding: 0 12px; font-weight: 600; }

.viewer { position: fixed; inset: 0; background: #0d0a14; color: #fff; z-index: 40; display: flex; flex-direction: column; }
.viewer .v-top, .viewer .v-bot { display: flex; align-items: center; gap: 8px; padding: 10px 12px; }
.viewer .v-top { padding-top: calc(env(safe-area-inset-top, 0px) + 10px); }
.viewer .v-bot { padding-bottom: calc(var(--safe-b) + 12px); justify-content: space-around; }
.viewer .v-top .meta { flex: 1; min-width: 0; font-size: 13px; opacity: .8; }
.viewer .stage { flex: 1; min-height: 0; display: grid; place-items: center; position: relative; }
.viewer .stage img, .viewer .stage video { max-width: 100%; max-height: 100%; object-fit: contain; }
.viewer button, .viewer a { color: #fff; min-width: 48px; min-height: 48px; display: inline-grid; place-items: center; text-decoration: none; font-size: 12px; gap: 2px; }
.viewer svg { width: 24px; height: 24px; }
.viewer .nav { position: absolute; top: 50%; transform: translateY(-50%); opacity: .7; }
.viewer .nav.prev { left: 2px; } .viewer .nav.next { right: 2px; }

a.row { text-decoration: none; }
.cover { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; background: #efe7f2; flex: none; display: block; }
.btn.on { background: var(--c0); color: #fff; border-color: var(--c0); }

/* 일상 */
.composer { border: 1px solid var(--line); background: var(--card); border-radius: 18px; padding: 14px; margin-top: 6px; }
.composer textarea { width: 100%; border: 0; outline: 0; background: transparent; min-height: 64px; padding: 0; font-size: 16px; }
.composer .bar { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.attach { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.attach img, .attach .ph { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; background: #efe7f2; display: grid; place-items: center; font-size: 11px; color: var(--muted); }
.post { padding: 22px 0; border-bottom: 1px solid var(--line); }
.post header { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.post header b { font-weight: 700; }
.post header time { color: var(--muted); flex: 1; }
.post .text { margin-top: 10px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 16px; }
.post .pics { display: grid; gap: 3px; margin-top: 12px; border-radius: 14px; overflow: hidden; grid-template-columns: repeat(3, 1fr); }
.post .pics.one { grid-template-columns: 1fr; } .post .pics.two { grid-template-columns: 1fr 1fr; }
.post .pics.one .thumb { aspect-ratio: 4 / 3; }
.post .acts { display: flex; align-items: center; gap: 16px; margin-top: 10px; }
.heart { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--muted); font-weight: 600; }
.heart svg { width: 22px; height: 22px; }
.heart.on { color: var(--c0); }
.heart.on svg { fill: currentColor; }
.cmt { display: flex; gap: 8px; font-size: 15px; padding: 5px 0; align-items: baseline; }
.cmt b { flex: none; font-weight: 700; }
.cmt p { flex: 1; overflow-wrap: anywhere; }
.cmt button { color: var(--muted); font-size: 12px; padding: 4px; }
.cmt-form { display: flex; gap: 8px; margin-top: 8px; }
.cmt-form input { flex: 1; min-height: 44px; border-radius: 999px; border: 1px solid var(--line); padding: 0 16px; background: var(--card); font-size: 15px; min-width: 0; }
.cmt-form button { color: var(--c1); font-weight: 700; padding: 0 8px; }

/* 플랜·AI */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: #f1e9f4; border-radius: 14px; padding: 4px; margin: 6px 0 18px; }
.seg button { min-height: 40px; border-radius: 11px; font-weight: 600; font-size: 14px; color: var(--muted); }
.seg button[aria-pressed='true'] { background: var(--card); color: var(--ink); box-shadow: 0 1px 4px rgba(43, 33, 64, .1); }
.tag { font-size: 12px; padding: 3px 8px; border-radius: 999px; background: #f1e9f4; color: var(--muted); white-space: nowrap; }
.tag.run { background: #e7ecff; color: var(--c1); }
.tag.err { background: #fdeaea; color: var(--danger); }
.stop { display: grid; grid-template-columns: 54px 1fr; gap: 10px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.stop time { font: 700 15px/1.5 var(--serif); }
.stop h3 { font-size: 16px; font-weight: 700; }
.stop p { font-size: 14px; margin-top: 3px; }
.stop .sub { color: var(--muted); }
.maps { display: flex; gap: 12px; margin-top: 6px; font-size: 13px; font-weight: 600; color: var(--c1); }
.maps a { padding: 4px 0; }
.prose { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15.5px; line-height: 1.7; }
.note { background: #f6f0f8; border-radius: 12px; padding: 12px 14px; font-size: 14px; margin-top: 14px; }

/* 데이트 중 */
.mic { width: 96px; height: 96px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; margin: 18px auto 8px; }
.mic svg { width: 40px; height: 40px; }
.mic.on { background: var(--c0); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 16px rgba(214, 51, 108, .16); } }
.heard { text-align: center; color: var(--muted); min-height: 24px; font-size: 15px; }
.ask-line { display: flex; gap: 8px; margin-top: 12px; }
.ask-line input { flex: 1; min-width: 0; }
.answer { border: 1px solid var(--line); background: var(--card); border-radius: 18px; padding: 16px; margin-top: 14px; }
.answer .q { color: var(--muted); font-size: 13px; display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.answer .a { font-size: 18px; font-weight: 600; line-height: 1.5; margin-top: 8px; }
.facts { margin-top: 12px; border-top: 1px solid var(--line); }
.facts div { display: grid; grid-template-columns: 84px 1fr; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.facts .key dd { font-weight: 700; }
.srcs { font-size: 12px; color: var(--muted); margin-top: 10px; overflow-wrap: anywhere; }
.srcs a { display: block; padding: 3px 0; }

/* 시트 */
.backdrop { position: fixed; inset: 0; background: rgba(43, 33, 64, .42); z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: 100%; max-width: 560px; max-height: 92dvh; overflow-y: auto; background: var(--paper); border-radius: 24px 24px 0 0; padding: 8px 20px calc(var(--safe-b) + 24px); animation: up .22s ease-out; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
.sheet .grab { width: 40px; height: 4px; border-radius: 2px; background: var(--line); margin: 6px auto 10px; }
.sheet .s-head { display: flex; align-items: center; justify-content: space-between; }
.sheet .s-head h2 { font: 700 20px/1.3 var(--serif); }
.sheet h3.sub { font: 700 16px/1.3 var(--serif); margin-top: 28px; }

#toast { position: fixed; left: 50%; top: calc(env(safe-area-inset-top, 0px) + 14px); transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 999px; font-size: 14px; z-index: 60; max-width: calc(100vw - 40px); text-align: center; }

/* 로그인 */
.login { min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; padding-bottom: 12vh; }
.login .mark { position: relative; width: 108px; height: 72px; margin-bottom: 26px; }
.login .mark i { position: absolute; top: 0; width: 72px; height: 72px; border-radius: 50%; mix-blend-mode: multiply; }
.login .mark i:first-child { left: 0; background: var(--c0); } .login .mark i:last-child { right: 0; background: var(--c1); }
.login h1 { font: 700 34px/1.2 var(--serif); }
.login p { color: var(--muted); margin-top: 8px; }
.login form { margin-top: 18px; }
.error { color: var(--danger); font-size: 14px; margin-top: 12px; min-height: 22px; }

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