/* CrossThree — 3청년회 출석부
   밝은 바탕 · 검정 글자 · 로고 빨강 하나. 빨강은 '브랜드'와 '3청 출석'에만 쓴다. */

:root {
  color-scheme: light;
  --bg: #F6F6F4;
  --surface: #FFFFFF;
  --surface-2: #FAFAF8;
  --sunken: #F1F1EE;
  --ink: #111214;
  --ink-2: #474A52;
  --ink-3: #8A8D95;
  --ink-4: #BFC1C6;
  --line: #EBEAE6;
  --line-2: #DCDBD6;

  --logo-red: #FD0B00;          /* 로고 그대로 */
  --red: #E00A00;               /* 흰 글씨가 올라가는 면 (대비 5:1) */
  --red-hover: #C40900;
  --red-soft: #FFF0EE;
  --red-line: #FFD3CE;

  --male: #2a78d6;              /* 검증된 범주색 1 · 2 */
  --female: #eb6834;
  --male-soft: #E8F1FC;
  --female-soft: #FDEDE6;

  --good: #0F7B55;
  --good-soft: #E3F4EC;
  --warn: #A86500;
  --warn-soft: #FCF1DD;

  --r-xl: 24px;
  --r-lg: 18px;
  --r-md: 12px;
  --ease: cubic-bezier(.23, 1, .32, 1);
  --gutter: 16px;
  --top-h: 64px;
}
@media (min-width: 720px) { :root { --gutter: 32px; } }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-size: 15px; line-height: 1.5; letter-spacing: -0.012em;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss06", "tnum";
}
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
svg, img { display: block; }
.num { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 8px; }
::selection { background: var(--red-soft); }

.wordmark { font-family: Nunito, "Pretendard Variable", sans-serif; font-weight: 900; letter-spacing: -0.02em; }

/* ---------- 부팅 ---------- */
.boot { position: fixed; inset: 0; display: grid; place-items: center; background: var(--bg); z-index: 100; transition: opacity .3s var(--ease); }
.boot img { width: 56px; animation: breathe 1.4s ease-in-out infinite; }
.boot.out { opacity: 0; pointer-events: none; }
@keyframes breathe { 50% { transform: scale(.92); opacity: .6; } }

/* ---------- 버튼 · 입력 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 40px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--surface);
  font-weight: 650; font-size: 14px; white-space: nowrap;
  transition: transform .16s var(--ease), background-color .15s, border-color .15s, color .15s;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.btn-red { background: var(--red); border-color: var(--red); color: #fff; }
.btn-ink { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-good { background: var(--good); border-color: var(--good); color: #fff; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn-block { width: 100%; height: 50px; font-size: 15px; border-radius: 14px; }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { border-color: var(--ink-4); }
  .btn-red:hover { background: var(--red-hover); border-color: var(--red-hover); }
  .btn-ink:hover { background: #2A2C31; }
  .btn-good:hover { background: #0B6646; }
  .btn-ghost:hover { background: rgba(17, 18, 20, .05); border-color: transparent; }
}
.link-btn { border: 0; background: none; padding: 0; color: var(--ink-2); font-weight: 650; font-size: 13.5px; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--ink-4); }

.icon-btn { width: 36px; height: 36px; display: grid; place-items: center; border: 0; background: transparent; border-radius: 999px; transition: background-color .15s; flex: none; }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn svg circle { fill: currentColor; stroke: none; }
@media (hover: hover) { .icon-btn:hover { background: rgba(17, 18, 20, .06); } }

.field { display: grid; gap: 7px; min-width: 0; }
.field > span { font-size: 13px; font-weight: 650; color: var(--ink-2); }
.field > span em { font-style: normal; color: var(--red); margin-left: 2px; }
.input, .field input, .field select, .field textarea {
  width: 100%; height: 46px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: var(--r-md);
  background: var(--surface); font-size: 16px; transition: border-color .15s, box-shadow .15s;
}
.field select, select.input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238A8D95' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; padding-right: 38px; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 4px rgba(17, 18, 20, .07); }
.field .hint { font-size: 12px; color: var(--ink-3); }

.seg { display: inline-flex; padding: 3px; background: var(--sunken); border-radius: 999px; gap: 2px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { border: 0; background: transparent; height: 34px; padding: 0 14px; border-radius: 999px; font-weight: 650; font-size: 14px; color: var(--ink-2); transition: background-color .15s, color .15s, box-shadow .15s; white-space: nowrap; flex: none; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(17, 18, 20, .08), 0 0 0 1px rgba(17, 18, 20, .04); }
.seg.full { display: flex; } .seg.full button { flex: 1; height: 40px; }
.seg .cnt { color: var(--ink-3); font-weight: 600; margin-left: 3px; }

/* ---------- 로그인 ---------- */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 24px var(--gutter);
  background: radial-gradient(60% 50% at 50% 0%, #FFE9E6 0%, rgba(255, 233, 230, 0) 70%), var(--bg); }
.login-card { width: min(390px, 100%); background: var(--surface); border-radius: 28px; padding: 40px 30px 26px; display: grid; gap: 16px;
  border: 1px solid var(--line); box-shadow: 0 40px 80px -40px rgba(224, 10, 0, .25); }
.login-mark { width: 76px; height: 76px; object-fit: contain; margin: 0 auto -4px; }
.wordmark.lg { font-size: 30px; text-align: center; line-height: 1; }
.login-sub { margin: -8px 0 10px; text-align: center; color: var(--ink-3); font-size: 14px; font-weight: 500; line-height: 1.55; }
.login-error { margin: -6px 0 0; min-height: 1em; color: var(--red); font-size: 13px; font-weight: 650; }
.login-foot { margin: 0; text-align: center; font-size: 12px; color: var(--ink-3); }

/* ---------- 머리 ---------- */
.top { position: sticky; top: 0; z-index: 30; background: rgba(255, 255, 255, .84);
  backdrop-filter: saturate(1.6) blur(16px); -webkit-backdrop-filter: saturate(1.6) blur(16px); border-bottom: 1px solid var(--line); }
.top-in { max-width: 1280px; margin: 0 auto; height: var(--top-h); padding: 0 var(--gutter); display: flex; align-items: center; gap: 18px; }
.brand { display: flex; align-items: center; gap: 10px; flex: none; }
.brand-mark { width: 34px; height: 34px; object-fit: contain; }
.brand-text { display: grid; line-height: 1.05; }
.brand-text .wordmark { font-size: 19px; }
.brand-text small { font-size: 11.5px; color: var(--ink-3); font-weight: 650; margin-top: 2px; letter-spacing: 0; }

.tabs { display: none; align-self: stretch; gap: 2px; margin-left: 10px; }
.tabs a { position: relative; display: inline-flex; align-items: center; padding: 0 12px; font-weight: 700; font-size: 14.5px; color: var(--ink-3); transition: color .15s; }
.tabs a::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--red); transform: scaleX(0); transition: transform .25s var(--ease); }
.tabs a.on { color: var(--ink); }
.tabs a.on::after { transform: scaleX(1); }
@media (hover: hover) { .tabs a:hover { color: var(--ink); } }
.badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--red); color: #fff; font-size: 11px; font-weight: 780; display: inline-grid; place-items: center; }
.tabs .badge { margin-left: 6px; }

.top-right { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.week { display: flex; align-items: center; gap: 2px; background: var(--surface); border-radius: 999px; padding: 2px; border: 1px solid var(--line-2); }
.week .icon-btn { width: 32px; height: 32px; }
.week .icon-btn svg { width: 18px; height: 18px; }
.week .icon-btn:disabled { opacity: .25; pointer-events: none; }
.week-label { position: relative; padding: 0 6px; font-weight: 750; font-size: 14px; white-space: nowrap; cursor: pointer; }
.week-label input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.week-label input::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: 100%; height: 100%; cursor: pointer; }

.menu { position: relative; }
.menu-pop { position: absolute; right: 0; top: 44px; min-width: 230px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 6px;
  box-shadow: 0 24px 48px -16px rgba(17, 18, 20, .22); display: grid; transform-origin: top right; animation: pop .18s var(--ease); }
.menu-pop a, .menu-pop button { text-align: left; padding: 11px 12px; border-radius: 10px; border: 0; background: transparent; font-size: 14px; font-weight: 600; }
@media (hover: hover) { .menu-pop a:hover, .menu-pop button:hover { background: var(--surface-2); } }
@keyframes pop { from { opacity: 0; transform: scale(.96); } }

@media (min-width: 960px) { .tabs { display: flex; } .bottom-tabs { display: none !important; } }
@media (max-width: 560px) { .brand-text { display: none; } .top-in { gap: 8px; } .week-label { font-size: 13px; padding: 0 2px; } }

.bottom-tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--line); }
.bottom-tabs a { position: relative; display: grid; justify-items: center; gap: 3px; padding: 6px 0 4px; font-size: 11px; font-weight: 700; color: var(--ink-3); }
.bottom-tabs a svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.bottom-tabs a.on { color: var(--red); }
.bottom-tabs .badge { position: absolute; top: 0; left: calc(50% + 6px); min-width: 16px; height: 16px; font-size: 10px; }

body.solo .tabs, body.solo .bottom-tabs { display: none !important; }

/* ---------- 쪽 ---------- */
.page { max-width: 1280px; margin: 0 auto; padding: 28px var(--gutter) 120px; outline: none; }
@media (min-width: 960px) { .page { padding-bottom: 72px; } }
body.solo .page { padding-bottom: 40px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; margin: 8px 0 26px; }
.page-head h1 { margin: 0; font-size: clamp(30px, 4.6vw, 46px); letter-spacing: -0.045em; line-height: 1.08; font-weight: 800; }
.page-head p { margin: 10px 0 0; color: var(--ink-3); font-size: 14.5px; font-weight: 550; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 12.5px; font-weight: 780; color: var(--red); letter-spacing: .01em; }
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--red); }

.enter > * { animation: rise .45s var(--ease) both; }
.enter > *:nth-child(2) { animation-delay: 40ms; } .enter > *:nth-child(3) { animation-delay: 80ms; }
.enter > *:nth-child(4) { animation-delay: 120ms; } .enter > *:nth-child(n+5) { animation-delay: 160ms; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }

.grid { display: grid; gap: 16px; grid-template-columns: repeat(12, minmax(0, 1fr)); }
.card { background: var(--surface); border-radius: var(--r-xl); padding: 24px; border: 1px solid var(--line); min-width: 0; grid-column: span 12; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px 12px; margin-bottom: 18px; flex-wrap: wrap; }
.card-h h2 { margin: 0; font-size: 16px; font-weight: 780; letter-spacing: -0.02em; display: flex; align-items: center; gap: 8px; }
.card-h .sub { font-size: 13px; color: var(--ink-3); font-weight: 600; }
.card-h a.sub, .card-h button.sub { color: var(--ink-2); font-weight: 700; border: 0; background: none; padding: 0; }
@media (min-width: 960px) {
  .c-4 { grid-column: span 4; } .c-5 { grid-column: span 5; } .c-6 { grid-column: span 6; }
  .c-7 { grid-column: span 7; } .c-8 { grid-column: span 8; }
}
@media (max-width: 600px) { .card { padding: 18px; border-radius: 20px; } .grid { gap: 12px; } }
.note { font-size: 12.5px; color: var(--ink-3); margin: 16px 0 0; line-height: 1.6; }
.muted { color: var(--ink-3); }

/* ---------- 보고판 첫 줄 ---------- */
.hero { padding: 0; display: grid; grid-template-columns: 1fr; overflow: hidden; }
@media (min-width: 900px) { .hero { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); } }
.hero-main { position: relative; padding: 28px 30px 28px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 24px; align-items: center; }
.hero-main .label { grid-column: 1 / -1; font-size: 14px; font-weight: 750; color: var(--ink-2); display: flex; align-items: center; gap: 8px; }
.hero-main .label i { width: 8px; height: 8px; border-radius: 50%; background: var(--red); }
.hero-num { font-size: clamp(84px, 13vw, 150px); line-height: .86; font-weight: 820; letter-spacing: -0.065em; margin: 16px 0 4px; }
.hero-num small { font-size: clamp(18px, 2.2vw, 24px); letter-spacing: -0.02em; font-weight: 650; color: var(--ink-3); margin-left: 6px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; font-size: 14px; color: var(--ink-2); font-weight: 600; margin-top: 12px; }
.hero-meta b { color: var(--ink); font-weight: 780; }
.hero-bg { position: absolute; left: 38%; bottom: -70px; width: 220px; opacity: .045; pointer-events: none; }
@media (max-width: 899px) { .hero-bg { left: auto; right: -40px; } }
.ring { position: relative; width: 150px; height: 150px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .track { fill: none; stroke: var(--sunken); stroke-width: 12; }
.ring .arc { fill: none; stroke: var(--red); stroke-width: 12; stroke-linecap: round; transition: stroke-dashoffset 1.1s var(--ease); }
.ring .in { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring .in b { font-size: 30px; font-weight: 800; letter-spacing: -0.045em; line-height: 1; }
.ring .in small { font-size: 12px; color: var(--ink-3); font-weight: 700; margin-top: 5px; }
@media (max-width: 520px) { .ring { width: 104px; height: 104px; } .ring .in b { font-size: 21px; } .hero-main { padding: 22px 20px; } }

.hero-side { border-top: 1px solid var(--line); display: grid; }
@media (min-width: 900px) { .hero-side { border-top: 0; border-left: 1px solid var(--line); } }
.svc { padding: 22px 26px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: end; }
.svc + .svc { border-top: 1px solid var(--line); }
.svc .label { font-size: 13.5px; font-weight: 750; color: var(--ink-2); }
.svc .n { font-size: 46px; font-weight: 800; letter-spacing: -0.055em; line-height: 1; margin-top: 8px; }
.svc .n small { font-size: 15px; color: var(--ink-3); font-weight: 650; letter-spacing: -0.01em; margin-left: 3px; }
.svc .r { text-align: right; font-size: 13px; color: var(--ink-3); font-weight: 700; display: grid; gap: 6px; justify-items: end; }
.svc .bar { grid-column: 1 / -1; margin-top: 12px; }
@media (max-width: 899px) { .hero-side { grid-template-columns: 1fr 1fr; } .svc + .svc { border-top: 0; border-left: 1px solid var(--line); } }
@media (max-width: 520px) { .svc { padding: 16px 18px; grid-template-columns: 1fr; } .svc .n { font-size: 34px; } .svc .r { justify-items: start; text-align: left; grid-auto-flow: column; justify-content: start; align-items: center; } }

.bar { position: relative; height: 8px; background: var(--sunken); border-radius: 999px; overflow: hidden; }
.bar i { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: var(--ink); transform-origin: left; animation: grow .9s var(--ease) both; }
.bar.red i { background: var(--red); }
.bar.lite i { background: var(--ink-4); }
.bar.thin { height: 5px; }
@keyframes grow { from { transform: scaleX(0); } }

.delta { display: inline-flex; align-items: center; gap: 2px; font-size: 12.5px; font-weight: 750; padding: 3px 9px 3px 6px; border-radius: 999px; background: var(--sunken); color: var(--ink-2); white-space: nowrap; }
.delta svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.delta.up { color: var(--good); background: var(--good-soft); }

/* ---------- 검수 ---------- */
.review-head { display: flex; align-items: flex-end; gap: 10px 22px; flex-wrap: wrap; margin-bottom: 14px; }
.review-head .big { font-size: 42px; font-weight: 800; letter-spacing: -0.055em; line-height: 1; }
.review-head .big small { font-size: 16px; color: var(--ink-3); font-weight: 650; letter-spacing: -0.01em; margin-left: 4px; }
.review-head .counts { font-size: 13px; color: var(--ink-3); font-weight: 650; padding-bottom: 4px; }
.review-head .legend { margin-left: auto; padding-bottom: 4px; }
.segbar { display: flex; gap: 3px; height: 12px; margin-bottom: 20px; }
.segbar span { flex: 1; border-radius: 3px; background: var(--sunken); }
.segbar span.done { background: var(--good); }
.segbar span.doing { background: #E6A33A; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(144px, 1fr)); gap: 8px; }
.tile { position: relative; text-align: left; border: 1px solid var(--line); background: var(--surface-2); border-radius: 14px; padding: 12px 12px 11px; display: grid; gap: 5px;
  transition: transform .16s var(--ease), border-color .15s, background-color .15s; min-width: 0; }
.tile:active { transform: scale(.98); }
@media (hover: hover) { .tile:hover { border-color: var(--ink-4); background: var(--surface); } }
.tile .t1 { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 12px; font-weight: 750; color: var(--ink-3); }
.tile .t2 { font-size: 14px; font-weight: 750; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .t3 { display: flex; align-items: baseline; justify-content: space-between; font-size: 12px; color: var(--ink-3); font-weight: 650; }
.tile .t3 b { font-size: 17px; color: var(--ink); letter-spacing: -0.02em; font-weight: 800; }
.tile.done { background: var(--surface); border-color: #CDE9DC; }
.st { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 780; border-radius: 999px; padding: 2px 7px 2px 6px; white-space: nowrap; }
.st i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.st.done { color: var(--good); background: var(--good-soft); }
.st.doing { color: var(--warn); background: var(--warn-soft); }
.st.none { color: var(--ink-3); background: var(--sunken); }
@media (max-width: 600px) {
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .tile { padding: 9px 9px 8px; border-radius: 12px; gap: 4px; }
  .tile .t2 { font-size: 12px; }
  .tile .t3 span:last-child { display: none; }
  .tile .st { font-size: 0; padding: 0; gap: 0; background: none; }
  .tile .st i { width: 8px; height: 8px; }
  .review-head .big { font-size: 34px; }
  .review-head .legend { margin-left: 0; }
}

.legend { display: flex; gap: 6px 14px; font-size: 12.5px; color: var(--ink-2); font-weight: 650; flex-wrap: wrap; }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 6px; vertical-align: -.5px; }
.legend .ln { display: inline-block; width: 16px; height: 0; border-top: 2.5px solid var(--red); vertical-align: middle; margin-right: 6px; border-radius: 2px; }
.legend .ln.am { border-top: 2px solid var(--ink-3); }
.legend .ln.pm { border-top: 2px dashed var(--ink-3); }

/* ---------- 남녀 ---------- */
.gender-top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 12px; margin-bottom: 14px; }
.gender-top .side { display: grid; gap: 4px; }
.gender-top .side.r { text-align: right; }
.gender-top .who { font-size: 13px; font-weight: 750; display: flex; align-items: center; gap: 6px; color: var(--ink-2); }
.gender-top .side.r .who { justify-content: flex-end; }
.gender-top .who i { width: 9px; height: 9px; border-radius: 3px; }
.gender-top .n { font-size: 50px; font-weight: 800; letter-spacing: -0.06em; line-height: 1; }
.gender-top .n small { font-size: 16px; color: var(--ink-3); font-weight: 650; letter-spacing: -0.01em; margin-left: 4px; }
.gender-top .mid { text-align: center; font-size: 12.5px; color: var(--ink-3); font-weight: 700; padding-bottom: 6px; }
.gender-top .mid b { display: block; color: var(--ink); font-size: 20px; letter-spacing: -0.03em; font-weight: 800; }
.split { display: flex; gap: 3px; height: 44px; }
.split > div { display: flex; align-items: center; padding: 0 14px; color: #fff; font-weight: 780; font-size: 14px; min-width: 0; overflow: hidden; }
.split .m { background: var(--male); border-radius: 12px 4px 4px 12px; }
.split .f { background: var(--female); justify-content: flex-end; border-radius: 4px 12px 12px 4px; }
.split .u { background: var(--ink-4); border-radius: 4px; padding: 0; }
.split .empty { background: var(--sunken); border-radius: 12px; flex: 1; }
.split-rows { margin-top: 22px; display: grid; gap: 12px; }
.split-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) 76px; align-items: center; gap: 12px; font-size: 13px; }
.split-row .name { font-weight: 750; color: var(--ink-2); }
.split-row .sbar { display: flex; gap: 2px; height: 12px; }
.split-row .sbar span { border-radius: 2px; }
.split-row .sbar span:first-child { border-radius: 4px 2px 2px 4px; }
.split-row .sbar span:last-child { border-radius: 2px 4px 4px 2px; }
.split-row .sbar .m { background: var(--male); } .split-row .sbar .f { background: var(--female); } .split-row .sbar .u { background: var(--ink-4); }
.split-row .sbar .e { background: var(--sunken); flex: 1; border-radius: 4px; }
.split-row .val { text-align: right; color: var(--ink-3); font-weight: 650; }
.split-row .val b { color: var(--ink); font-weight: 780; }

/* ---------- 새가족 요약 ---------- */
.kpis { display: flex; gap: 10px 30px; flex-wrap: wrap; margin-bottom: 20px; }
.kpi .k { font-size: 12.5px; color: var(--ink-3); font-weight: 700; }
.kpi .v { font-size: 34px; font-weight: 800; letter-spacing: -0.055em; line-height: 1.1; margin-top: 2px; }
.kpi .v small { font-size: 14px; color: var(--ink-3); font-weight: 650; letter-spacing: 0; margin-left: 3px; }
.kpi.alert .v { color: var(--red); }
.weeks-bar { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; height: 112px; }
.weeks-bar .col { display: grid; grid-template-rows: 1fr auto; height: 100%; gap: 8px; text-align: center; }
.weeks-bar .stack { display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; transform-origin: bottom; animation: rise-y .7s var(--ease) both; }
.weeks-bar .stack i { display: block; }
.weeks-bar .stack .missed { background: var(--sunken); border-radius: 5px 5px 2px 2px; }
.weeks-bar .stack .came { background: var(--red); border-radius: 2px; }
.weeks-bar .stack .came:first-child { border-radius: 5px 5px 2px 2px; }
@keyframes rise-y { from { transform: scaleY(0); } }
.weeks-bar .lbl { font-size: 12px; color: var(--ink-3); font-weight: 700; }
.weeks-bar .lbl b { display: block; color: var(--ink); font-size: 15px; font-weight: 800; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-size: 13px; font-weight: 700; white-space: nowrap; }
.chip .dot { width: 7px; height: 7px; border-radius: 50%; }
.chip small { color: var(--ink-3); font-weight: 600; }
.subhead { font-size: 12.5px; font-weight: 780; color: var(--ink-3); margin: 22px 0 10px; display: flex; align-items: center; gap: 8px; }

/* ---------- 교구별 ---------- */
.parish { border-top: 1px solid var(--line); }
.parish:first-of-type { border-top: 0; }
.parish > button { width: 100%; border: 0; background: transparent; padding: 13px 6px; text-align: left; border-radius: 12px;
  display: grid; grid-template-columns: 62px minmax(0, 1fr) 70px 18px; gap: 14px; align-items: center; transition: background-color .15s; }
.parish > button:disabled { cursor: default; color: inherit; }
@media (hover: hover) { .parish > button:not(:disabled):hover { background: var(--surface-2); } }
.parish .no { font-weight: 800; font-size: 15px; letter-spacing: -0.02em; }
.parish .no small { display: block; font-size: 12px; color: var(--ink-3); font-weight: 650; letter-spacing: 0; }
.parish .bars { display: grid; gap: 7px; }
.parish .bars .row { display: grid; grid-template-columns: 30px 1fr; align-items: center; gap: 8px; font-size: 11px; color: var(--ink-3); font-weight: 700; }
.parish .pct { text-align: right; font-weight: 800; font-size: 20px; letter-spacing: -0.04em; }
.parish .pct small { display: block; font-size: 12px; color: var(--ink-3); font-weight: 650; letter-spacing: 0; }
.parish .chev { width: 18px; height: 18px; fill: none; stroke: var(--ink-3); stroke-width: 2; transition: transform .25s var(--ease); }
.parish.open .chev { transform: rotate(180deg); }
.cells { display: none; padding: 2px 6px 16px 82px; gap: 9px; }
.parish.open .cells { display: grid; }
.cell-row { display: grid; grid-template-columns: minmax(0, 1fr) 1.3fr 56px; gap: 12px; align-items: center; font-size: 13px; }
.cell-row .nm { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cell-row .nm small { color: var(--ink-3); font-weight: 750; margin-right: 6px; }
.cell-row .v { text-align: right; color: var(--ink-2); font-weight: 700; }
@media (max-width: 520px) { .parish > button { grid-template-columns: 52px minmax(0, 1fr) 58px 16px; gap: 10px; } .cells { padding-left: 6px; } }

/* ---------- 또래 ---------- */
.age-rows { display: grid; gap: 10px; }
.age-row { display: grid; grid-template-columns: 84px 1fr 54px; gap: 12px; align-items: center; font-size: 13px; }
.age-row .k { font-weight: 780; }
.age-row .k small { color: var(--ink-3); font-weight: 650; margin-left: 4px; }
.age-row .track { position: relative; height: 20px; background: var(--sunken); border-radius: 6px; }
.age-row .fill { position: absolute; inset: 0 auto 0 0; display: flex; gap: 2px; transform-origin: left; animation: grow .8s var(--ease) both; }
.age-row .fill span { height: 100%; }
.age-row .fill span:first-child { border-radius: 6px 2px 2px 6px; }
.age-row .fill span:last-child { border-radius: 2px 6px 6px 2px; }
.age-row .fill span:only-child { border-radius: 6px; }
.age-row .fill .m { background: var(--male); } .age-row .fill .f { background: var(--female); } .age-row .fill .u { background: var(--ink-4); }
.age-row .v { text-align: right; font-weight: 780; }

/* ---------- 추이 · 사유 ---------- */
.trend svg { width: 100%; height: 250px; overflow: visible; }
.trend .gl { stroke: var(--line); stroke-width: 1; }
.trend .ax { fill: var(--ink-3); font-size: 11px; font-weight: 650; }
.trend .s-youth { fill: none; stroke: var(--red); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.trend .s-am { fill: none; stroke: var(--ink-3); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.trend .s-pm { fill: none; stroke: var(--ink-3); stroke-width: 2; stroke-dasharray: 5 5; stroke-linejoin: round; stroke-linecap: round; }
.trend .dot { fill: var(--red); stroke: var(--surface); stroke-width: 2.5; }
.trend .end { font-size: 12px; font-weight: 750; fill: var(--ink-2); }
.trend .cross { stroke: var(--ink-4); stroke-width: 1; }
.trend .hit { fill: transparent; }
.empty { display: grid; place-items: center; text-align: center; min-height: 200px; color: var(--ink-3); font-size: 14px; border: 1px dashed var(--line-2); border-radius: var(--r-lg); padding: 24px; line-height: 1.55; }
.empty b { display: block; color: var(--ink-2); font-size: 15px; margin-bottom: 4px; font-weight: 750; }

.reasons { display: grid; }
.reason { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; font-size: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.reason:last-child { border-bottom: 0; }
.reason .t { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reason .n { font-weight: 780; color: var(--ink-2); }

/* ---------- 체크 ---------- */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.scroll-x { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px; margin: 0 -2px 18px; }
.scroll-x::-webkit-scrollbar { display: none; }
.pill { flex: none; height: 40px; padding: 0 15px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); font-weight: 750; font-size: 14px;
  display: inline-flex; align-items: center; gap: 7px; transition: background-color .15s, color .15s, border-color .15s; }
.pill small { color: var(--ink-3); font-weight: 650; font-size: 12.5px; }
.pill[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.pill[aria-pressed="true"] small { color: rgba(255, 255, 255, .62); }
.search { position: relative; flex: 1 1 240px; max-width: 380px; }
.search input { padding-left: 42px; height: 42px; border-radius: 999px; }
.search svg { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; fill: none; stroke: var(--ink-3); stroke-width: 2; stroke-linecap: round; }

.cell-card { padding: 0; }
.cell-card + .cell-card { margin-top: 16px; }
.cell-card > header { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .95);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); position: sticky; top: calc(var(--top-h) + 1px); z-index: 3; border-radius: var(--r-xl) var(--r-xl) 0 0; }
.cell-card > header h3 { margin: 0; font-size: 16.5px; font-weight: 800; letter-spacing: -0.025em; display: flex; align-items: center; gap: 8px; min-width: 0; white-space: nowrap; }
.cell-card > header h3 small { color: var(--ink-3); font-weight: 780; font-size: 13px; }
.cell-card > header .cnt { margin-left: auto; font-size: 13px; color: var(--ink-3); font-weight: 650; display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.cell-card > header .cnt b { color: var(--ink); font-size: 15px; font-weight: 800; }
.cell-card > header .mini { width: 64px; }
.tag { display: inline-flex; align-items: center; height: 21px; padding: 0 8px; border-radius: 6px; font-size: 11.5px; font-weight: 750; background: var(--sunken); color: var(--ink-2); white-space: nowrap; letter-spacing: 0; }
.tag.red { background: var(--red-soft); color: var(--red); }
.tag.good { background: var(--good-soft); color: var(--good); }

.person { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 14px; align-items: center; padding: 13px 20px; border-bottom: 1px solid var(--line); transition: background-color .25s; }
.person:last-child { border-bottom: 0; }
.person.err { background: #FFF5F4; }
.person .who { display: flex; align-items: center; gap: 12px; min-width: 0; border: 0; background: transparent; padding: 0; text-align: left; }
.avatar { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-size: 13.5px; font-weight: 780; background: var(--sunken); color: var(--ink-2); }
.avatar.m { background: var(--male-soft); color: #1A5AA8; }
.avatar.f { background: var(--female-soft); color: #A6431A; }
.person .nm-wrap { min-width: 0; }
.person .nm { font-weight: 780; font-size: 15.5px; letter-spacing: -0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 6px; }
.person .sub { display: block; font-size: 12.5px; color: var(--ink-3); font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.marks { display: inline-flex; padding: 3px; background: var(--sunken); border-radius: 13px; gap: 3px; }
.tg { height: 38px; min-width: 58px; padding: 0 12px; border-radius: 10px; border: 0; background: transparent; font-weight: 780; font-size: 13.5px; color: var(--ink-3);
  display: inline-flex; align-items: center; justify-content: center; gap: 4px; transition: background-color .14s, color .14s, transform .12s var(--ease), box-shadow .14s; }
.tg:active { transform: scale(.94); }
.tg svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; display: none; }
.tg[aria-pressed="true"] { background: var(--red); color: #fff; box-shadow: 0 2px 6px -2px rgba(224, 10, 0, .55); }
.tg[aria-pressed="true"] svg { display: block; }
@media (hover: hover) { .tg:not([aria-pressed="true"]):hover { background: rgba(255, 255, 255, .85); color: var(--ink-2); } }
.marks.sm { border-radius: 11px; }
.marks.sm .tg { height: 30px; min-width: 44px; font-size: 12px; border-radius: 8px; padding: 0 8px; }
.reason-in { grid-column: 1 / -1; display: flex; gap: 8px; align-items: center; margin-left: 48px; }
.reason-in input { height: 38px; font-size: 14px; border-radius: 10px; background: var(--surface-2); border-color: var(--line); }
.reason-in .reuse { flex: none; }
@media (max-width: 600px) {
  .person { grid-template-columns: 1fr; padding: 13px 16px; gap: 10px; }
  .marks { width: 100%; } .marks .tg { flex: 1; }
  .reason-in { margin-left: 0; }
  .cell-card > header { padding: 14px 16px; }
  .cell-card > header .mini { display: none; }
}

.save-chip { position: fixed; z-index: 40; top: calc(var(--top-h) + 10px); right: max(16px, calc((100vw - 1280px) / 2 + var(--gutter)));
  display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px; border-radius: 999px; font-size: 12.5px; font-weight: 750;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); box-shadow: 0 8px 20px -10px rgba(17, 18, 20, .25);
  opacity: 0; transform: translateY(-6px); pointer-events: none; transition: opacity .2s, transform .25s var(--ease); }
.save-chip.show { opacity: 1; transform: none; }
.save-chip i { width: 7px; height: 7px; border-radius: 50%; background: var(--good); }
.save-chip.busy i { background: var(--ink-4); animation: blink 1s infinite; }
.save-chip.fail { color: var(--red); border-color: var(--red-line); pointer-events: auto; cursor: pointer; }
.save-chip.fail i { background: var(--red); }
@keyframes blink { 50% { opacity: .3; } }

/* ---------- 구역장 화면 ---------- */
.my-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 16px; padding: 0; }
.my-stats > div { padding: 18px 22px; font-size: 13px; color: var(--ink-3); font-weight: 750; }
.my-stats > div + div { border-left: 1px solid var(--line); }
.my-stats b { display: block; font-size: 38px; color: var(--ink); letter-spacing: -0.055em; line-height: 1.1; font-weight: 800; margin-top: 4px; }
.my-stats b small { font-size: 15px; color: var(--ink-3); font-weight: 650; letter-spacing: 0; }
.my-stats .red b { color: var(--red); }
@media (max-width: 520px) { .my-stats > div { padding: 14px 16px; } .my-stats b { font-size: 28px; } }
.add-row { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; padding: 18px 0 4px; }
.submit-bar { position: sticky; bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 5; margin-top: 18px; padding: 12px 12px 12px 20px;
  background: rgba(255, 255, 255, .95); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid var(--line); border-radius: 20px;
  box-shadow: 0 24px 48px -20px rgba(17, 18, 20, .28); display: flex; gap: 10px 14px; align-items: center; justify-content: space-between; }
.submit-bar .msg { font-size: 14px; color: var(--ink); font-weight: 750; line-height: 1.35; min-width: 0; }
.submit-bar .msg small { display: block; color: var(--ink-3); font-weight: 550; font-size: 12.5px; }
.submit-bar .btn { height: 46px; padding: 0 20px; font-size: 15px; flex: none; }

/* ---------- 표 ---------- */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; font-weight: 780; color: var(--ink-3); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr.click { cursor: pointer; transition: background-color .12s; }
@media (hover: hover) { .table tbody tr.click:hover { background: var(--surface-2); } }
.table .r { text-align: right; }
.table-wrap { overflow-x: auto; margin: 0 -24px; padding: 0 24px; }
.who-cell { display: flex; align-items: center; gap: 10px; font-weight: 780; white-space: nowrap; }
.who-cell .avatar { width: 32px; height: 32px; font-size: 12.5px; }
.who-cell small { display: block; font-weight: 550; color: var(--ink-3); font-size: 12px; }
.phone { border: 0; background: transparent; padding: 0; color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (hover: hover) { .phone:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; } }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.status i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink); }
.status.new i { background: var(--red); } .status.away i { background: var(--ink-4); }
.progress { display: flex; gap: 3px; }
.progress i { width: 16px; height: 6px; border-radius: 3px; background: var(--sunken); }
.progress i.on { background: var(--red); }
.progress.done i.on { background: var(--good); }
.wk { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.wk b { font-size: 13px; font-weight: 780; }
.list-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; font-size: 13px; color: var(--ink-3); font-weight: 650; }
@media (max-width: 680px) {
  .table.stack thead { display: none; }
  .table.stack, .table.stack tbody, .table.stack tr, .table.stack td { display: block; width: 100%; }
  .table.stack tr { padding: 14px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; align-items: center; }
  .table.stack tr:last-child { border-bottom: 0; }
  .table.stack td { padding: 0; border: 0; }
  .table.stack td.wide { grid-column: 1 / -1; }
  .table.stack td.hide-m { display: none; }
  .table.stack .r { text-align: left; }
  .table-wrap { margin: 0; padding: 0; }
}

/* ---------- 중복 ---------- */
.dup-card { border-color: var(--red-line); background: linear-gradient(180deg, #FFF7F6 0%, var(--surface) 160px); }
.dup { display: grid; grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); }
.dup:first-of-type { border-top: 0; padding-top: 2px; }
.dup .p { display: flex; align-items: center; gap: 10px; min-width: 0; }
.dup .p b { font-weight: 780; }
.dup .p small { display: block; color: var(--ink-3); font-size: 12px; font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dup .vs { font-size: 12px; font-weight: 780; color: var(--ink-4); text-align: center; }
.dup .acts { display: flex; gap: 6px; justify-content: flex-end; }
@media (max-width: 680px) { .dup { grid-template-columns: 1fr; gap: 8px; } .dup .vs { display: none; } .dup .acts { justify-content: flex-start; } }
.pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pick label { position: relative; display: grid; gap: 3px; border: 1.5px solid var(--line-2); border-radius: 16px; padding: 14px; cursor: pointer; transition: border-color .15s, background-color .15s; font-size: 13px; color: var(--ink-2); line-height: 1.45; }
.pick label b { font-size: 16px; color: var(--ink); margin-bottom: 2px; }
.pick input { position: absolute; opacity: 0; pointer-events: none; }
.pick label:has(input:checked) { border-color: var(--red); background: var(--red-soft); }
.pick label:has(input:checked)::after { content: "남김"; position: absolute; top: 12px; right: 12px; font-size: 11px; font-weight: 780; color: #fff; background: var(--red); border-radius: 999px; padding: 2px 8px; }
@media (max-width: 480px) { .pick { grid-template-columns: 1fr; } }
.cand { display: grid; gap: 8px; }
.cand button { text-align: left; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; border: 1.5px solid var(--line-2); background: var(--surface); border-radius: 16px; padding: 12px 14px; transition: border-color .15s, background-color .15s; }
@media (hover: hover) { .cand button:not(:disabled):hover { border-color: var(--red); background: var(--red-soft); } }
.cand button:disabled { cursor: default; background: var(--surface-2); }
.cand b { font-size: 15px; }
.cand small { display: block; color: var(--ink-3); font-size: 12.5px; font-weight: 550; }
.cand .go { font-size: 12.5px; font-weight: 780; color: var(--red); white-space: nowrap; }
.cand button:disabled .go { color: var(--ink-3); }
.callout { border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); padding: 12px 14px; font-size: 13.5px; color: var(--ink-2); line-height: 1.6; }
.callout.red { background: var(--red-soft); border-color: var(--red-line); color: #8F1A12; }

/* ---------- 출석부(시트) ---------- */
.sheet-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.sheet-tools .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.zoom { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface); }
.zoom button { width: 36px; height: 38px; border: 0; background: transparent; font-weight: 780; font-size: 16px; color: var(--ink-2); }
.zoom span { font-size: 12.5px; font-weight: 750; color: var(--ink-3); min-width: 42px; text-align: center; }
.sheet-wrap { --fs: 12.5px; overflow: auto; max-height: calc(100dvh - 210px); border: 1px solid var(--line-2); border-radius: 16px; background: var(--surface); overscroll-behavior: contain; }
.xl { border-collapse: separate; border-spacing: 0; font-size: var(--fs); white-space: nowrap; }
.xl th, .xl td { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 0 8px; height: calc(var(--fs) * 2.3); text-align: center; }
.xl .ph th { position: sticky; top: 0; z-index: 3; background: var(--ink); color: #fff; font-weight: 780; height: calc(var(--fs) * 2.8); border-right-color: #2D2F33; font-size: calc(var(--fs) * 1.04); }
.xl .ph th .lead { color: rgba(255, 255, 255, .6); font-weight: 650; margin-left: 6px; }
.xl .ch td { background: var(--red-soft); color: #8F1A12; font-weight: 800; text-align: left; }
.xl .ch td small { color: var(--red); font-weight: 780; margin-right: 6px; }
.xl .hh td { background: var(--surface-2); color: var(--ink-3); font-weight: 750; font-size: calc(var(--fs) * .92); }
.xl .nm { text-align: left; font-weight: 750; min-width: calc(var(--fs) * 5); }
.xl .ph-n { font-variant-numeric: tabular-nums; color: var(--ink-2); }
.xl .ck { width: calc(var(--fs) * 3.2); cursor: pointer; padding: 0; }
.xl .ck span { display: inline-grid; place-items: center; width: calc(var(--fs) * 1.5); height: calc(var(--fs) * 1.5); border-radius: 5px; border: 1.5px solid var(--line-2); transition: background-color .12s, border-color .12s; vertical-align: middle; }
.xl .ck.on span { background: var(--red); border-color: var(--red); }
.xl .ck.on span::after { content: ""; width: 32%; height: 58%; border: solid #fff; border-width: 0 2px 2px 0; transform: translateY(-12%) rotate(45deg); }
.xl .ck.ro { cursor: default; }
.xl .rs { text-align: left; min-width: calc(var(--fs) * 9); padding: 0; }
.xl .rs input { width: 100%; height: calc(var(--fs) * 2.3 - 1px); border: 0; background: transparent; padding: 0 8px; font-size: var(--fs); color: var(--ink-2); }
.xl .rs input:focus { outline: 2px solid var(--ink); outline-offset: -2px; background: #fff; }
.xl .sum td { background: var(--surface-2); font-weight: 800; color: var(--ink); }
.xl .gap td { height: 12px; border-right: 0; background: var(--bg); }
.xl .pend { border-right: 2px solid var(--line-2); }
.xl .g-m { color: var(--male); font-weight: 780; } .xl .g-f { color: var(--female); font-weight: 780; }
.xl .ref { color: var(--red); font-weight: 750; }
.xl-title { display: flex; align-items: baseline; gap: 8px 18px; flex-wrap: wrap; margin: 0 0 12px; }
.xl-title b { font-size: 15px; font-weight: 800; }
.xl-title span { font-size: 13px; color: var(--ink-3); font-weight: 650; }
.xl-title span strong { color: var(--ink); font-weight: 800; }

/* ---------- 링크 ---------- */
.link-row { display: grid; grid-template-columns: 80px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.link-row:last-child { border-bottom: 0; }
.link-row .u { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.link-row .acts { display: flex; gap: 6px; }
@media (max-width: 600px) { .link-row { grid-template-columns: 1fr auto; } .link-row > b { grid-column: 1 / -1; } }

/* ---------- 대화상자 ---------- */
.sheet { border: 0; padding: 0; background: var(--surface); color: var(--ink); width: min(560px, calc(100% - 24px)); max-height: calc(100dvh - 48px);
  border-radius: 26px; box-shadow: 0 40px 100px -24px rgba(17, 18, 20, .4); }
.sheet::backdrop { background: rgba(17, 18, 20, .34); backdrop-filter: blur(3px); }
.sheet[open] { animation: sheet-in .26s var(--ease); }
@keyframes sheet-in { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.sheet form, .sheet .body { display: grid; gap: 16px; padding: 26px; }
.sheet h2 { margin: 0; font-size: 21px; letter-spacing: -0.035em; font-weight: 800; }
.sheet .lead { margin: -8px 0 0; color: var(--ink-3); font-size: 14px; line-height: 1.55; }
.sheet .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sheet .row3 { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 12px; }
.sheet .actions { display: flex; justify-content: space-between; gap: 8px; margin-top: 4px; flex-wrap: wrap; }
.sheet .actions .right { display: flex; gap: 8px; margin-left: auto; }
@media (max-width: 560px) {
  .sheet { width: 100%; max-width: 100%; margin: auto 0 0; border-radius: 26px 26px 0 0; max-height: 92dvh; }
  .sheet form, .sheet .body { padding: 24px 18px calc(22px + env(safe-area-inset-bottom)); }
  .sheet .row3 { grid-template-columns: 1fr 1fr; } .sheet .row3 > :first-child { grid-column: 1 / -1; }
}

/* ---------- 알림 · 풍선 ---------- */
.toast { position: fixed; left: 50%; bottom: 96px; transform: translate(-50%, 16px); opacity: 0; pointer-events: none; z-index: 60;
  background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 14px; font-size: 14px; font-weight: 650; max-width: calc(100vw - 32px); text-align: center;
  transition: opacity .2s, transform .3s var(--ease); box-shadow: 0 16px 40px -12px rgba(17, 18, 20, .45); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: var(--red); }
@media (min-width: 960px) { .toast { bottom: 36px; } }
body.solo .toast { bottom: 112px; }
.tip { position: fixed; z-index: 70; pointer-events: none; background: var(--ink); color: #fff; font-size: 12px; font-weight: 650;
  padding: 8px 11px; border-radius: 9px; opacity: 0; transition: opacity .12s; white-space: pre; line-height: 1.5; }
.tip.show { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0ms !important; transition-duration: .001ms !important; }
}
@media print {
  .top, .bottom-tabs, .submit-bar, .save-chip { display: none !important; }
  body { background: #fff; }
  .card { border: 1px solid var(--line); break-inside: avoid; }
  .sheet-wrap { max-height: none; overflow: visible; border: 0; }
}
@media (max-width: 520px) {
  .hero-num { font-size: 68px; white-space: nowrap; margin-top: 12px; }
  .hero-num small { font-size: 16px; margin-left: 4px; }
  .ring { width: 92px; height: 92px; }
  .ring .in b { font-size: 19px; }
  .ring .in small { font-size: 11px; margin-top: 3px; }
  .hero-main { gap: 4px 14px; }
}
