:root {
  --bg: #F5F6F3;
  --card: #FFFFFF;
  --line: #E1E4DF;
  --line2: #EEF0EC;
  --ink: #1B211F;
  --ink2: #3C4441;
  --muted: #5B635F;
  --accent: #1F4FA0;
  --accent-bg: #E8EEF8;
  --orange: #B4531A;
  --orange-ink: #8E4014;
  --orange-bg: #FBEDE3;
  --green: #2C6A4A;
  --green-ink: #22573C;
  --green-bg: #E6F1EA;
  --red: #B3261E;
  --radius: 20px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body {
  font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); }
.num { font-variant-numeric: tabular-nums; }

#app { max-width: 520px; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; }
.screen { flex: 1; display: flex; flex-direction: column; padding: calc(18px + var(--safe-t)) 20px calc(100px + var(--safe-b)); gap: 14px; }
.screen.no-nav { padding-bottom: calc(24px + var(--safe-b)); }

/* header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 48px; }
.top h1 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -0.3px; }
.top .sub { font-size: 13px; color: var(--muted); }
.top-left { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.top-bar { display: flex; align-items: center; gap: 4px; min-height: 48px; margin-left: -10px; }
.top-bar h1 { margin: 0; font-size: 19px; font-weight: 800; flex: 1; }
.icon-btn { width: 44px; height: 44px; border-radius: 22px; border: 0; background: transparent; display: inline-flex; align-items: center; justify-content: center; color: var(--ink); position: relative; text-decoration: none; flex-shrink: 0; }
.icon-btn.bordered { background: var(--card); border: 1px solid var(--line); }
.badge { position: absolute; top: -2px; right: -2px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--orange); color: #fff; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.month-switch { display: inline-flex; align-items: center; gap: 0; font-size: 13px; color: var(--muted); margin-left: -12px; }
.month-switch button { width: 32px; height: 32px; border: 0; background: transparent; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; border-radius: 16px; }
.month-switch span { font-weight: 500; color: var(--ink2); }

/* cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.card h2, .sec-title { margin: 0; font-size: 15px; font-weight: 700; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.card-head a, .link { font-size: 13px; text-decoration: none; color: var(--accent); background: none; border: 0; padding: 0; }
.hero { background: var(--accent); color: #fff; border-radius: 22px; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.hero .label { font-size: 13px; opacity: 0.88; }
.hero .big { font-size: 32px; font-weight: 800; letter-spacing: -0.5px; line-height: 1.2; }
.hero .tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.hero .tile { background: rgba(255,255,255,0.14); border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.hero .tile span { font-size: 12px; opacity: 0.88; }
.hero .tile strong { font-size: 17px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.mini { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.mini .k { font-size: 12px; color: var(--muted); }
.mini .v { font-size: 18px; font-weight: 800; }
.mini .s { font-size: 12px; color: var(--muted); }

/* quick actions */
.quick-main { border: 0; text-decoration: none; background: var(--orange); color: #fff; border-radius: 22px; padding: 18px 20px; display: flex; align-items: center; gap: 14px; text-align: left; width: 100%; }
.quick-main .ic { width: 48px; height: 48px; border-radius: 24px; background: rgba(255,255,255,0.2); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.quick-main strong { font-size: 17px; display: block; }
.quick-main small { font-size: 13px; opacity: 0.92; }
.quick { text-decoration: none; min-height: 84px; border-radius: 18px; border: 1px solid var(--line); background: var(--card); color: var(--ink); display: flex; flex-direction: column; justify-content: space-between; padding: 14px 16px; gap: 8px; text-align: left; }
.quick span { font-size: 15px; font-weight: 700; }

/* lists */
.list { list-style: none; margin: 0; padding: 0; background: var(--card); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.list li + li { border-top: 1px solid var(--line2); }
.row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; width: 100%; background: none; border: 0; text-align: left; color: inherit; text-decoration: none; min-height: 60px; }
.av { width: 36px; height: 36px; border-radius: 18px; font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.row .mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.row .t { font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .d { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .amt { font-size: 14px; font-weight: 700; white-space: nowrap; }
.amt.in { color: var(--green); }
.tag { font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 9px; white-space: nowrap; }
.tag.warn { color: var(--orange-ink); background: var(--orange-bg); }
.tag.ok { color: var(--green-ink); background: var(--green-bg); }
.tag.gray { color: var(--ink2); background: var(--line2); }
.date-head { font-size: 12px; color: var(--muted); font-weight: 700; padding: 10px 4px 4px; }
.empty { text-align: center; color: var(--muted); font-size: 14px; padding: 28px 12px; }

/* bars */
.stack { display: flex; height: 12px; border-radius: 6px; overflow: hidden; gap: 2px; background: var(--line2); }
.stack > div { min-width: 3px; }
.legend { display: flex; flex-direction: column; gap: 7px; font-size: 13px; }
.legend .li { display: flex; align-items: center; gap: 8px; }
.dot { width: 9px; height: 9px; border-radius: 5px; flex-shrink: 0; }
.legend .li > strong { margin-left: auto; white-space: nowrap; padding-left: 8px; }
.cmp { display: flex; flex-direction: column; gap: 5px; }
.cmp .h { display: flex; justify-content: space-between; font-size: 13px; gap: 8px; }
.cmp .h span:last-child { color: var(--muted); text-align: right; }
.bar { height: 8px; border-radius: 4px; background: var(--line2); overflow: hidden; }
.bar > div { height: 8px; border-radius: 4px; }

/* calendar */
.cal-dow, .cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-dow { text-align: center; font-size: 11px; color: var(--muted); }
.cal-dow span:first-child { color: var(--red); }
.cal button { height: 58px; border-radius: 10px; border: 0; background: transparent; display: flex; flex-direction: column; align-items: center; padding: 6px 0 0; gap: 2px; font-size: 13px; color: var(--ink2); }
.cal button.today .dn { background: var(--ink); color: #fff; border-radius: 10px; padding: 0 6px; }
.cal button.sel { outline: 2px solid var(--accent); outline-offset: -2px; }
.cal button.has-in { background: var(--green-bg); }
.cal .ci { font-size: 10px; font-weight: 700; line-height: 1.15; }
.cal .co { font-size: 10px; color: var(--muted); line-height: 1.15; }

/* forms */
.seg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; background: #ECEEEA; border-radius: 14px; padding: 4px; }
.seg button { height: 44px; border: 0; border-radius: 11px; background: transparent; font-size: 15px; color: var(--muted); }
.seg button[aria-pressed="true"] { background: #fff; color: var(--ink); font-weight: 700; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.seg button.in[aria-pressed="true"] { color: var(--green); }
.amount-box { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 0 2px; }
.amount-box label { font-size: 13px; color: var(--muted); }
.amount-box .inp { display: flex; align-items: baseline; gap: 4px; justify-content: center; }
.amount-box input { width: 100%; max-width: 260px; border: 0; outline: 0; text-align: center; font-size: 38px; font-weight: 800; background: transparent; padding: 0; }
.amount-box .won { font-size: 24px; font-weight: 700; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 40px; padding: 8px 14px; border-radius: 20px; border: 1px solid #D5D9D3; background: #fff; font-size: 14px; color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); font-weight: 700; }
.grp-label { font-size: 12px; color: var(--muted); font-weight: 700; margin: 4px 0 -2px; }
.field-list { border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.field { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 16px; min-height: 54px; }
.field + .field { border-top: 1px solid var(--line2); }
.field > label, .field > .fl { font-size: 14px; color: var(--muted); flex-shrink: 0; }
.field input, .field select { flex: 1; min-width: 0; border: 0; outline: 0; text-align: right; font-size: 15px; background: transparent; padding: 14px 0; }
.who { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.who button { min-height: 36px; padding: 4px 12px; border-radius: 18px; border: 1px solid transparent; background: var(--line2); color: var(--ink2); font-size: 13px; }
.who button[aria-pressed="true"] { font-weight: 700; border-color: currentColor; }
.btn { height: 54px; border-radius: 16px; border: 0; background: var(--accent); color: #fff; font-size: 16px; font-weight: 700; width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.btn.green { background: var(--green); }
.btn.orange { background: var(--orange); }
.btn.ghost { background: #fff; color: var(--ink); border: 1px solid #D5D9D3; font-weight: 500; }
.btn.danger { background: #fff; color: var(--red); border: 1px solid #E8C9C6; font-weight: 500; }
.btn.kakao { background: #FEE500; color: #191600; }
.btn.toss { background: #0064FF; color: #fff; }
.btn.sm { height: 44px; font-size: 14px; border-radius: 12px; }
.btn:disabled { opacity: 0.55; }
.btns2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.input { width: 100%; height: 52px; border-radius: 14px; border: 1px solid #D5D9D3; background: #fff; padding: 0 14px; font-size: 16px; outline: none; }
.input:focus, textarea.input:focus { border-color: var(--accent); }
textarea.input { height: auto; min-height: 80px; padding: 12px 14px; resize: vertical; }
.lbl { font-size: 13px; color: var(--ink2); font-weight: 500; display: block; margin-bottom: 6px; }
.stack-form { display: flex; flex-direction: column; gap: 14px; }
.help { font-size: 13px; color: var(--muted); line-height: 1.55; margin: 0; }
.err { color: var(--red); font-size: 13px; margin: 0; }
.bottom-bar { position: sticky; bottom: 0; padding: 12px 0 calc(12px + var(--safe-b)); background: linear-gradient(to top, var(--bg) 70%, rgba(245,246,243,0)); margin-top: auto; }

/* nav */
nav.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: rgba(255,255,255,0.96); backdrop-filter: blur(10px); border-top: 1px solid var(--line); padding-bottom: var(--safe-b); }
nav.tabs .in { max-width: 520px; margin: 0 auto; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); height: 64px; }
nav.tabs a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; text-decoration: none; color: var(--muted); font-size: 11px; position: relative; }
nav.tabs a[aria-current="page"] { color: var(--accent); font-weight: 700; }
nav.tabs .badge { top: 6px; right: calc(50% - 22px); }
.fab { position: fixed; z-index: 21; right: max(20px, calc(50% - 240px)); bottom: calc(80px + var(--safe-b)); width: 58px; height: 58px; border-radius: 29px; border: 0; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 18px rgba(31,79,160,0.35); text-decoration: none; }

/* review / requests */
.req { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.req .head { display: flex; align-items: center; gap: 10px; }
.req .head .mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.req .head .d { font-size: 12px; color: var(--muted); }
.req .head .t { font-size: 15px; font-weight: 700; }
.req .head .a { font-size: 17px; font-weight: 800; white-space: nowrap; }
.bubble { margin: 0; font-size: 13px; color: var(--ink2); background: var(--bg); border-radius: 12px; padding: 10px 12px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.diff { display: flex; align-items: center; gap: 8px; font-size: 14px; flex-wrap: wrap; }
.diff s { color: var(--muted); }

/* auth */
.auth { justify-content: center; gap: 22px; }
.brand { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.brand img { width: 76px; height: 76px; border-radius: 20px; }
.brand h1 { margin: 0; font-size: 26px; font-weight: 800; }
.brand p { margin: 0; color: var(--muted); font-size: 14px; }

/* toast */
#toast { position: fixed; left: 50%; bottom: calc(150px + var(--safe-b)); transform: translateX(-50%) translateY(20px); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 14px; font-size: 14px; opacity: 0; pointer-events: none; transition: all .25s; z-index: 50; max-width: calc(100% - 40px); text-align: center; }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.banner { background: var(--accent-bg); border-radius: 16px; padding: 12px 14px; display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--ink2); }
.banner strong { color: var(--ink); display: block; font-size: 14px; }
.banner .mid { flex: 1; }
.loading { flex: 1; display: flex; align-items: center; justify-content: center; color: var(--muted); min-height: 60vh; }
.code { font-size: 28px; font-weight: 800; letter-spacing: 6px; text-align: center; padding: 6px 0; }
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; text-align: center; }
.week .w { font-size: 11px; color: var(--muted); }
.week .b { margin: 4px auto 0; width: 40px; height: 40px; border-radius: 12px; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; background: #F2F3F0; color: #9AA19D; }
.week .b.on { background: var(--orange-bg); color: var(--orange-ink); }
.week .b.today { outline: 2px solid var(--orange); outline-offset: -2px; }

/* ---------- 부부 탭 ---------- */
nav.tabs .in { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.cp-hero { background: linear-gradient(135deg, #FBE9EF, #F1EAFA); border: 0; align-items: center; text-align: center; }
.cp-big small { display: block; font-size: 13px; color: var(--muted); } .cp-big b { font-size: 30px; font-weight: 800; color: #C2416B; letter-spacing: -0.5px; }
.cp-next { font-size: 13px; color: var(--ink2); } .cp-next b { color: #7A4FB5; }
a.card { text-decoration: none; color: inherit; } .cp-qt { margin: 0; font-size: 16px; font-weight: 700; line-height: 1.5; } .cp-qt.big { font-size: 19px; }
.card-head h2 { display: flex; align-items: center; gap: 6px; }
.cp-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.cp-tile { background: var(--b); color: var(--c); border-radius: 18px; padding: 16px 14px; display: flex; flex-direction: column; gap: 4px; text-decoration: none; min-height: 112px; }
.cp-tile b { font-size: 15px; color: var(--ink); } .cp-tile small { font-size: 12px; color: var(--muted); } .cp-tile em { font-style: normal; font-weight: 700; color: var(--c); }
.cp-chat { gap: 10px; } .cp-msgs { display: flex; flex-direction: column; gap: 8px; }
.cp-m { display: flex; } .cp-m span { max-width: 82%; padding: 10px 13px; border-radius: 16px; font-size: 14px; line-height: 1.55; white-space: pre-wrap; word-break: break-word; }
.cp-m.ai span { background: #F1EAFA; color: var(--ink); border-top-left-radius: 4px; } .cp-m.me { justify-content: flex-end; } .cp-m.me span { background: var(--accent); color: #fff; border-top-right-radius: 4px; }
.cp-m.typing span { opacity: .6; } .cp-send { display: flex; gap: 8px; align-items: flex-end; } .cp-send textarea { flex: 1; min-height: 54px; }
.cp-ans { background: var(--bg); border-radius: 14px; padding: 10px 12px; } .cp-ans small { font-size: 12px; color: var(--muted); font-weight: 700; } .cp-ans p { margin: 2px 0 0; white-space: pre-wrap; } .cp-ans.me { background: var(--accent-bg); }
.cp-score { display: flex; align-items: center; justify-content: center; gap: 24px; text-align: center; } .cp-score small { display: block; color: var(--muted); font-size: 12px; } .cp-score b { font-size: 26px; } .cp-score span { font-size: 22px; color: var(--muted); }
.cp-players { display: flex; justify-content: center; gap: 12px; } .cp-players span { display: flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); font-size: 14px; } .cp-players span.on { border: 2px solid var(--accent); font-weight: 700; }
.st { width: 14px; height: 14px; border-radius: 50%; display: inline-block; } .st.b { background: #111; } .st.w { background: #fff; border: 1px solid #999; }
.cp-turn { margin: 0; text-align: center; font-weight: 700; color: var(--ink2); }

.auth-menu { display: flex; flex-direction: column; gap: 2px; margin-top: 4px; border-top: 1px solid var(--line); padding-top: 10px; }
.auth-menu button { background: none; border: 0; padding: 12px; font-size: 14px; color: var(--accent); font-weight: 600; text-align: center; border-radius: 12px; }
.auth-menu button:active { background: var(--accent-bg); }
.steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; font-size: 14px; color: var(--ink2); }
.steps b { display: block; color: var(--ink); }

.bal-card { flex-direction: row; align-items: center; gap: 10px; background: linear-gradient(135deg, #E8EEF8, #F1F4FA); border: 0; }
.bal-card .mid { flex: 1; display: flex; flex-direction: column; gap: 2px; } .bal-card b { font-size: 26px; font-weight: 800; color: var(--accent); letter-spacing: -0.4px; } .bal-card small { font-size: 12px; color: var(--muted); }
.bal-card.unset { background: var(--orange-bg); } .bal-card.unset strong { color: var(--orange-ink); }

/* ================= 소율이네 테마 (따뜻한 파스텔) ================= */
:root {
  --bg: #FFF7F2; --card: #FFFFFF; --line: #F3E6DF; --line2: #FBF1EC;
  --ink: #2E2422; --ink2: #4E403C; --muted: #8A7A74;
  --accent: #E8667A; --accent-bg: #FDECEF;
  --orange: #F29A5B; --orange-ink: #B4602A; --orange-bg: #FEF1E6;
  --green: #2E9E7A; --green-ink: #1F7A5C; --green-bg: #E6F6EF;
  --red: #E0574F; --radius: 24px;
  --shadow: 0 6px 22px rgba(232, 102, 122, 0.09), 0 1px 3px rgba(46, 36, 34, 0.04);
}
body { background: var(--bg); font-family: 'Pretendard', 'Noto Sans KR', -apple-system, sans-serif; }
.screen { gap: 16px; }
.top h1, .top-bar h1, .brand h1 { font-family: 'Jua', 'Noto Sans KR', sans-serif; font-weight: 400; letter-spacing: 0; }
.top h1 { font-size: 26px; display: flex; align-items: center; gap: 8px; }
.top h1::before { content: ''; width: 34px; height: 34px; border-radius: 50%; background: #FDECEF url(icons/icon-192.png?v=2) center 2px / 120% no-repeat; flex: none; box-shadow: 0 2px 6px rgba(232,102,122,.25); }
.top-bar h1 { font-size: 22px; }
.card, .list, .quick { border: 0; box-shadow: var(--shadow); }
.card { border-radius: var(--radius); }
.list { border-radius: 22px; }
.list li + li { border-top-color: var(--line2); }
.hero { background: linear-gradient(135deg, #F07A8C 0%, #F6A57E 100%); border-radius: 28px; box-shadow: 0 12px 30px rgba(240, 122, 140, 0.32); position: relative; overflow: hidden; }
.hero::after { content: ''; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%; background: rgba(255,255,255,0.12); }
.hero .big { font-size: 34px; }
.hero .tile { background: rgba(255,255,255,0.2); border-radius: 16px; }
.bal-card { background: linear-gradient(135deg, #E6F6EF, #F2FBF7); box-shadow: var(--shadow); border-radius: 24px; }
.bal-card b { color: var(--green); font-size: 28px; }
.bal-card.unset { background: linear-gradient(135deg, #FEF1E6, #FFF7F0); }
.quick { border-radius: 22px; min-height: 92px; }
.quick svg { color: var(--accent); background: var(--accent-bg); border-radius: 14px; padding: 8px; width: 40px; height: 40px; }
.quick-main { background: linear-gradient(135deg, #F29A5B, #F6B57A); border-radius: 26px; box-shadow: 0 10px 24px rgba(242, 154, 91, 0.3); }
.btn { border-radius: 18px; background: linear-gradient(135deg, #EC6F82, #F08A8F); box-shadow: 0 6px 16px rgba(232, 102, 122, 0.28); }
.btn.green { background: linear-gradient(135deg, #2E9E7A, #4CB896); box-shadow: 0 6px 16px rgba(46, 158, 122, 0.25); }
.btn.orange { background: linear-gradient(135deg, #F29A5B, #F5B07B); box-shadow: 0 6px 16px rgba(242, 154, 91, 0.28); }
.btn.ghost, .btn.danger { box-shadow: none; background: #fff; border-color: var(--line); }
.input, textarea.input { border-color: var(--line); border-radius: 16px; background: #fff; }
.input:focus, textarea.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-bg); }
.chip { border-color: var(--line); border-radius: 20px; }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); }
.seg { background: #F7E9E3; border-radius: 16px; }
.seg button[aria-pressed="true"] { color: var(--accent); }
.av { border-radius: 50%; }
.tag { border-radius: 10px; }
.banner { border-radius: 20px; background: var(--accent-bg); }
.fab { background: linear-gradient(135deg, #EC6F82, #F49A86); box-shadow: 0 10px 24px rgba(232, 102, 122, 0.42); }
nav.tabs { left: 12px; right: 12px; bottom: calc(10px + var(--safe-b)); padding-bottom: 0; border: 0; border-radius: 26px; background: rgba(255,255,255,0.97); box-shadow: 0 8px 28px rgba(46, 36, 34, 0.12); }
nav.tabs .in { height: 66px; padding: 0 6px; }
nav.tabs a { font-size: 10.5px; border-radius: 18px; margin: 7px 2px; gap: 2px; }
nav.tabs a[aria-current="page"] { color: var(--accent); background: var(--accent-bg); }
.screen { padding-bottom: calc(112px + var(--safe-b)); }
.fab { bottom: calc(92px + var(--safe-b)); }
.cal button.has-in { background: var(--green-bg); border-radius: 12px; }
.cal button.today .dn { background: var(--accent); }
.cal button.sel { outline-color: var(--accent); }
.month-switch span { font-weight: 700; }
.icon-btn.bordered { border: 0; box-shadow: var(--shadow); }
.cp-tile { border-radius: 22px; box-shadow: var(--shadow); }
.cp-hero { background: linear-gradient(135deg, #FDE3EA, #F1E6FB); box-shadow: var(--shadow); }
.auth .brand img { border-radius: 50%; background: #FDECEF; }

/* ---------- 밸런스 · 끝말잇기 · 퀴즈 ---------- */
.bal-vs { display: grid; grid-template-columns: 1fr auto 1fr; align-items: stretch; gap: 8px; width: 100%; margin: 6px 0; }
.bal-opt { border: 2px solid var(--line); background: #fff; border-radius: 20px; min-height: 120px; padding: 14px 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font-size: 16px; color: var(--ink); }
.bal-opt b { font-size: 17px; line-height: 1.35; } .bal-opt small { font-size: 12px; color: var(--accent); font-weight: 700; }
.bal-opt.on { border-color: var(--accent); background: var(--accent-bg); } .bal-opt.they { box-shadow: inset 0 0 0 2px #7A4FB5; } .bal-opt:disabled { color: var(--ink); opacity: 1; }
.bal-x { align-self: center; font-family: 'Jua', sans-serif; color: var(--accent); font-size: 20px; }
.wd-box { align-items: center; text-align: center; }
.wd-last small { display: block; font-size: 12px; color: var(--muted); } .wd-last b { font-size: 34px; font-family: 'Jua', sans-serif; font-weight: 400; } .wd-last em { font-style: normal; color: var(--accent); text-decoration: underline; text-underline-offset: 6px; }
.wd-box .cp-send { width: 100%; } .wd-box input { text-align: center; font-size: 20px; }
.wd-chain { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; justify-content: center; }
.wd-chain span { font-size: 13px; font-weight: 700; color: var(--c); background: #fff; border-radius: 12px; padding: 4px 9px; box-shadow: var(--shadow); } .wd-chain i { font-style: normal; color: var(--muted); font-size: 11px; }
.qz-q { font-size: 18px; line-height: 1.4; } .qz-ch { display: grid; gap: 8px; } .qz-ch button { text-align: left; border: 1.5px solid var(--line); background: #fff; border-radius: 14px; padding: 12px 14px; font-size: 15px; min-height: 48px; }
.qz-ch button:active { background: var(--accent-bg); border-color: var(--accent); }
.qz-opt { display: flex; align-items: center; gap: 8px; } .qz-opt input[type=radio] { width: 22px; height: 22px; accent-color: var(--accent); flex: none; }

.bal-cats { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; margin: 0 -20px; padding-left: 20px; padding-right: 20px; scrollbar-width: none; } .bal-cats .chip { flex: none; }
.bal-mk { display: grid; grid-template-columns: 1fr auto 1fr; gap: 6px; align-items: center; } .bal-mk span { font-family: 'Jua', sans-serif; color: var(--accent); }

/* ---------- 여러 날짜 한 번에 ---------- */
.multi-tg { align-self: flex-start; padding: 6px 4px; font-weight: 700; }
.multi-box { background: var(--bg); border-radius: 18px; padding: 12px; }
.mc-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; } .mc-head button { width: 36px; height: 36px; border: 0; background: #fff; border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.mc-dow, .mc-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; text-align: center; } .mc-dow span { font-size: 11px; color: var(--muted); }
.mc-grid button { height: 40px; border: 0; border-radius: 12px; background: #fff; font-size: 14px; } .mc-grid button.today { box-shadow: inset 0 0 0 1.5px var(--accent); }
.mc-grid button.on { background: var(--accent); color: #fff; font-weight: 800; }
.mc-list { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; } .mc-row { display: grid; grid-template-columns: 74px 1fr auto 36px; gap: 6px; align-items: center; } .mc-row span { font-size: 13px; } .mc-row .input { height: 42px; text-align: right; }
.mc-total { display: flex; justify-content: space-between; margin-top: 8px; padding: 10px 4px 0; border-top: 1px dashed var(--line); } .mc-total b { color: var(--accent); }
.bulk-link { display: block; text-align: center; font-size: 13.5px; font-weight: 700; color: var(--accent); text-decoration: none; background: var(--accent-bg); border-radius: 16px; padding: 12px; margin-top: -4px; }

/* ---------- 나눠서 기록 ---------- */
.split-box { display: flex; flex-direction: column; gap: 8px; background: var(--bg); border-radius: 18px; padding: 12px; }
.sp-row { display: grid; grid-template-columns: 1fr 120px 36px; gap: 6px; align-items: center; } .sp-row select.input { height: 46px; padding: 0 10px; font-size: 15px; } .sp-row input.input { height: 46px; text-align: right; }
.sp-rest { text-align: right; font-weight: 800; font-size: 15px; color: var(--accent); line-height: 1.1; } .sp-rest small { display: block; font-size: 10.5px; font-weight: 500; color: var(--muted); } .sp-rest.neg { color: var(--red); }

.seen { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); margin-top: 2px; } .seen i { width: 8px; height: 8px; border-radius: 50%; background: #C9BDB7; } .seen.on { color: var(--green-ink); font-weight: 700; } .seen.on i { background: #3CC48C; box-shadow: 0 0 0 3px rgba(60,196,140,.2); }
.bal-wait summary { cursor: pointer; font-size: 14px; list-style: none; } .bal-wait summary::-webkit-details-marker { display: none; } .bal-wait[open] summary { margin-bottom: 8px; }

/* ---------- 채팅 ---------- */
.ch-screen { padding-bottom: calc(10px + var(--safe-b)); height: 100dvh; gap: 8px; }
.ch-screen .top-bar { flex-wrap: wrap; } .ch-screen .top-bar .seen { flex-basis: 100%; margin-left: 52px; margin-top: -10px; }
.ch-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; padding: 4px 2px; }
.ch-day { text-align: center; margin: 10px 0 4px; } .ch-day span { font-size: 11.5px; color: var(--muted); background: #fff; padding: 3px 10px; border-radius: 10px; }
.ch-m { display: flex; align-items: flex-end; gap: 6px; } .ch-m.me { flex-direction: row-reverse; }
.ch-b { max-width: 74%; background: #fff; padding: 9px 13px; border-radius: 18px 18px 18px 6px; font-size: 15px; line-height: 1.45; white-space: pre-wrap; word-break: break-word; box-shadow: 0 1px 2px rgba(46,36,34,.06); }
.ch-m.me .ch-b { background: linear-gradient(135deg, #EC6F82, #F08A8F); color: #fff; border-radius: 18px 18px 6px 18px; }
.ch-m small { font-size: 10.5px; color: var(--muted); white-space: nowrap; display: flex; flex-direction: column; align-items: flex-end; } .ch-m:not(.me) small { align-items: flex-start; } .ch-m small em { font-style: normal; color: var(--accent); font-weight: 800; }
.ch-quick { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; } .ch-quick .chip { flex: none; min-height: 34px; padding: 5px 12px; font-size: 13px; }
.ch-send { display: flex; gap: 8px; align-items: flex-end; } .ch-send textarea { flex: 1; min-height: 46px; resize: none; padding: 12px 14px; } .ch-send .btn { width: 52px; height: 46px; flex: none; padding: 0; }
/* ---------- 돌림판 ---------- */
.sp-wrap { position: relative; width: min(300px, 80vw); aspect-ratio: 1; } .sp-wrap canvas { width: 100%; height: 100%; filter: drop-shadow(0 8px 18px rgba(232,102,122,.25)); }
.sp-pin { position: absolute; top: -6px; left: 50%; transform: translateX(-50%); width: 0; height: 0; border-left: 14px solid transparent; border-right: 14px solid transparent; border-top: 26px solid #E8667A; filter: drop-shadow(0 2px 2px rgba(0,0,0,.2)); }
