:root {
  --ink: #15312c;
  --muted: #68766f;
  --line: #dbe2d7;
  --surface: #ffffff;
  --canvas: #f3f5ef;
  --green: #173f38;
  --green-2: #245f53;
  --lime: #d9f36a;
  --lime-soft: #eff8cf;
  --blue: #315f86;
  --blue-soft: #eaf2f8;
  --orange: #a6572b;
  --orange-soft: #fff0e7;
  --red: #a93c3c;
  --shadow: 0 12px 30px rgba(22, 49, 44, .08);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  font-family: Inter, Pretendard, "Apple SD Gothic Neo", "Noto Sans KR", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { background: #dfe5dc; color: var(--ink); }
body { margin: 0; min-height: 100dvh; background: #dfe5dc; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
.hidden { display: none !important; }
.app-shell { width: min(100%, 560px); min-height: 100dvh; margin: 0 auto; background: var(--canvas); position: relative; box-shadow: 0 0 50px rgba(18, 45, 39, .12); }
.app-header { height: calc(72px + env(safe-area-inset-top, 0px)); padding: env(safe-area-inset-top, 0px) 18px 0; display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 20; background: rgba(243,245,239,.94); backdrop-filter: blur(18px); border-bottom: 1px solid rgba(219,226,215,.8); }
.brand { display: flex; align-items: center; gap: 10px; border: 0; background: transparent; padding: 0; min-width: 0; text-align: left; cursor: pointer; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; background: var(--green); flex: 0 0 auto; }
.brand-mark svg { width: 32px; height: 32px; }
.brand-mark svg > path:first-child { fill: white; opacity: .96; }
.brand-mark svg path:not(:first-child) { fill: none; stroke: #8ebd4a; stroke-width: 2.1; stroke-linecap: round; }
.brand-mark svg circle { fill: var(--lime); }
.brand strong { font-size: 18px; letter-spacing: .08em; display: block; line-height: 1; }
.brand small { display: block; font-size: 9px; letter-spacing: .16em; color: var(--muted); margin-top: 5px; white-space: nowrap; }
.profile-button { margin-left: auto; width: 42px; height: 42px; border: 0; border-radius: 50%; background: var(--green); color: white; font-weight: 800; overflow: hidden; padding: 0; cursor: pointer; box-shadow: 0 0 0 3px white; }
.profile-button img { width: 100%; height: 100%; object-fit: cover; }
.icon-button { width: 40px; height: 40px; border: 0; border-radius: 12px; background: white; display: grid; place-items: center; cursor: pointer; }
.icon-button svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; }
#app { min-height: calc(100dvh - 72px); padding: 18px 16px calc(36px + var(--safe-bottom)); outline: none; }
#app.with-nav { padding-bottom: calc(106px + var(--safe-bottom)); }
.loading-screen { min-height: 62dvh; display: grid; place-content: center; justify-items: center; color: var(--muted); font-size: 14px; }
.loader { width: 34px; height: 34px; border: 3px solid var(--line); border-top-color: var(--green); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.eyebrow { margin: 0 0 8px; font-size: 11px; font-weight: 900; letter-spacing: .18em; color: var(--green-2); text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(28px, 8vw, 38px); line-height: 1.18; letter-spacing: -.04em; margin-bottom: 12px; }
h2 { font-size: 22px; letter-spacing: -.025em; margin-bottom: 8px; }
h3 { font-size: 16px; margin-bottom: 5px; }
.lead { color: var(--muted); font-size: 15px; line-height: 1.65; margin-bottom: 24px; }
.hero-panel { border-radius: 28px; padding: 26px 22px; color: white; background: radial-gradient(circle at 90% 8%, rgba(217,243,106,.35), transparent 28%), linear-gradient(145deg, #173f38, #245f53); box-shadow: var(--shadow); overflow: hidden; position: relative; }
.hero-panel .eyebrow { color: var(--lime); }
.hero-panel .lead { color: rgba(255,255,255,.75); margin-bottom: 0; }
.hero-orbit { width: 92px; height: 92px; border: 1px solid rgba(255,255,255,.17); border-radius: 50%; position: absolute; right: -18px; bottom: -22px; }
.hero-orbit::before { content: ""; width: 14px; height: 14px; background: var(--lime); border-radius: 50%; position: absolute; left: 4px; top: 12px; }
.portal-grid { display: grid; gap: 12px; margin-top: 16px; }
.portal-card { width: 100%; border: 1px solid var(--line); border-radius: 22px; background: white; padding: 18px; display: grid; grid-template-columns: 52px 1fr 24px; align-items: center; gap: 14px; text-align: left; cursor: pointer; box-shadow: 0 4px 14px rgba(22,49,44,.035); }
.portal-card:active { transform: scale(.99); }
.portal-card .portal-icon { width: 52px; height: 52px; border-radius: 17px; display: grid; place-items: center; background: var(--lime-soft); color: var(--green); }
.portal-card.guest .portal-icon { background: var(--blue-soft); color: var(--blue); }
.portal-card.officer .portal-icon { background: var(--orange-soft); color: var(--orange); }
.portal-icon svg, .menu-icon svg, .nav-icon svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.portal-card strong { display: block; font-size: 17px; margin-bottom: 4px; }
.portal-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.chevron { font-size: 24px; color: #9aa69f; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 12px; margin: 8px 2px 16px; }
.section-head p { margin: 0; color: var(--muted); font-size: 12px; }
.card { border: 1px solid var(--line); border-radius: 22px; background: var(--surface); padding: 18px; box-shadow: 0 4px 14px rgba(22,49,44,.035); }
.card + .card { margin-top: 12px; }
.soft-card { background: #f8faf5; }
.club-account-card { margin-top: 12px; background: linear-gradient(135deg, #f7faed, #ffffff); border-color: #cfdbb7; }
.club-account-copy { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.club-account-copy .eyebrow { margin-bottom: 5px; }
.club-account-copy h3 { margin: 0 0 7px; font-size: 14px; }
.club-account-copy strong { display: block; font-size: 16px; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.club-account-copy small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.club-account-copy .button { min-height: 42px; padding: 0 12px; font-size: 11px; white-space: nowrap; flex: 0 0 auto; }
.metric-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.metric { border: 1px solid var(--line); border-radius: 18px; background: white; padding: 15px; min-width: 0; }
.metric small { display: block; color: var(--muted); font-size: 11px; margin-bottom: 8px; }
.metric strong { display: block; font-size: 23px; letter-spacing: -.04em; overflow: hidden; text-overflow: ellipsis; }
.metric strong em { font-style: normal; font-size: 12px; font-weight: 700; margin-left: 3px; }
.metric-caption { display: block; margin-top: 6px; color: var(--muted); font-size: 9px; font-weight: 700; }
.metric.alert { background: #fff8f4; border-color: #efd6ca; color: var(--red); }
.member-identity { display: flex; gap: 14px; align-items: center; }
.avatar { width: 54px; height: 54px; border-radius: 18px; background: var(--green); color: white; display: grid; place-items: center; font-size: 20px; font-weight: 900; flex: 0 0 auto; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.chip { display: inline-flex; align-items: center; min-height: 24px; padding: 4px 9px; border-radius: 999px; background: var(--lime-soft); color: var(--green); font-size: 10px; font-weight: 800; }
.chip.gray { background: #eef1ed; color: #68766f; }
.chip.red { background: #fdeaea; color: var(--red); }
.status-strip { display: flex; align-items: center; gap: 12px; padding: 15px; margin-top: 12px; border-radius: 17px; background: var(--lime-soft); }
.status-dot { width: 12px; height: 12px; border-radius: 50%; background: #6e9d2e; box-shadow: 0 0 0 5px rgba(110,157,46,.13); }
.status-strip.unpaid { background: #fff0ec; }
.status-strip.unpaid .status-dot { background: var(--red); box-shadow: 0 0 0 5px rgba(169,60,60,.12); }
.status-strip strong { font-size: 14px; display: block; }
.status-strip small { color: var(--muted); font-size: 11px; }
.button { min-height: 48px; border: 1px solid var(--line); border-radius: 15px; background: white; padding: 0 16px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 14px; cursor: pointer; }
.button.primary { background: var(--green); border-color: var(--green); color: white; }
.button.kakao { background: #fee500; border-color: #fee500; color: #241d00; }
.button.google { background: white; }
.button.danger { color: var(--red); border-color: #edcaca; }
.button.block { width: 100%; }
.button-row { display: flex; gap: 9px; flex-wrap: wrap; }
.button-row > * { flex: 1 1 120px; }
.login-stack { display: grid; gap: 10px; margin-top: 18px; }
.google-g { font-size: 18px; font-weight: 900; color: #4285f4; }
.account-guide { border: 1px solid #d6e2c4; border-radius: 20px; background: #f5fae8; padding: 16px; display: grid; gap: 13px; margin-bottom: 12px; }
.account-guide.connected { grid-template-columns: 42px 1fr; align-items: center; background: var(--surface); border-color: var(--line); }
.account-guide strong { display: block; font-size: 14px; margin-bottom: 4px; }
.account-guide p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.account-guide-icon { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; color: var(--green); background: var(--lime-soft); }
.account-guide-icon svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.9; }
.form { display: grid; gap: 15px; }
label { display: grid; gap: 7px; font-size: 12px; font-weight: 800; }
input, select, textarea { width: 100%; min-width: 0; max-width: 100%; min-height: 50px; border: 1px solid var(--line); border-radius: 14px; background: white; padding: 12px 14px; color: var(--ink); font-size: 16px; outline: none; }
textarea { min-height: 94px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: #6c9c8d; box-shadow: 0 0 0 4px rgba(36,95,83,.09); }
.form-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; min-width: 0; }
.form-grid > * { min-width: 0; }
.helper { color: var(--muted); font-size: 11px; line-height: 1.55; margin: 0; }
.consent { display: flex; grid-template-columns: none; align-items: flex-start; gap: 9px; font-weight: 500; line-height: 1.5; }
.consent input { width: 20px; height: 20px; min-height: 0; flex: 0 0 auto; margin-top: 1px; }
.step-list { display: grid; gap: 10px; }
.step { display: grid; grid-template-columns: 36px 1fr; gap: 12px; align-items: start; }
.step-num { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--green); color: white; font-weight: 900; font-size: 12px; }
.step p { margin: 3px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.year-control { display: flex; align-items: center; gap: 7px; }
.year-control button { width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 11px; background: white; font-size: 18px; }
.year-control strong { min-width: 48px; text-align: center; font-size: 14px; }
.month-list, .list { display: grid; gap: 8px; }
.month-row, .list-row { min-height: 58px; border: 1px solid var(--line); border-radius: 15px; background: white; padding: 12px 13px; display: flex; align-items: center; gap: 11px; }
.month-label { width: 36px; height: 36px; border-radius: 11px; background: #eef3e9; display: grid; place-items: center; font-weight: 900; font-size: 12px; flex: 0 0 auto; }
.month-info, .list-main { min-width: 0; flex: 1; }
.month-info strong, .list-main strong { font-size: 13px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.month-info small, .list-main small { color: var(--muted); font-size: 10px; display: block; margin-top: 4px; }
.status-pill { border-radius: 999px; padding: 5px 8px; font-size: 10px; font-weight: 900; background: #edf6d8; color: #50782a; flex: 0 0 auto; }
.status-pill.unpaid { background: #fdeaea; color: var(--red); }
.status-pill.partial { background: #fff0dc; color: #9a5f12; }
.status-pill.na { background: #eef1ed; color: var(--muted); }
.search-wrap { position: relative; }
.search-wrap input { padding-left: 44px; }
.search-wrap svg { width: 20px; height: 20px; position: absolute; left: 15px; top: 15px; fill: none; stroke: var(--muted); stroke-width: 2; }
.segmented { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; background: #e7ebe3; border-radius: 15px; padding: 4px; margin: 12px 0; }
.segmented button { min-height: 40px; border: 0; border-radius: 11px; background: transparent; font-weight: 800; color: var(--muted); font-size: 12px; }
.segmented button.active { background: white; color: var(--ink); box-shadow: 0 2px 8px rgba(22,49,44,.08); }
.member-level-filter { display: flex; justify-content: flex-end; margin: 10px 0 12px; }
.member-level-filter select { width: min(100%, 180px); min-height: 46px; border-radius: 15px; padding: 9px 34px 9px 13px; font-size: 12px; font-weight: 800; }
.associate-photo-frame { width: 52px; height: 64px; border-radius: 15px; overflow: hidden; flex: 0 0 auto; background: var(--green); }
.associate-photo, .associate-photo-fallback { width: 100%; height: 100%; }
.associate-photo { display: block; object-fit: cover; }
.associate-photo-fallback { display: grid; place-items: center; color: white; font-size: 17px; font-weight: 900; }
.associate-details { display: flex; flex-wrap: wrap; gap: 3px 8px; margin-top: 5px; color: var(--muted); font-size: 9px; line-height: 1.35; }
.associate-details span { white-space: nowrap; }
.progress-dots { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; margin-top: 10px; }
.progress-dots span { height: 7px; border-radius: 99px; background: #e2e7df; }
.progress-dots span.done { background: #85af48; }
.card-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.card-title-row h3 { margin-bottom: 3px; }
.text-button { border: 0; background: transparent; color: var(--green-2); padding: 2px 0; font-size: 11px; font-weight: 900; white-space: nowrap; cursor: pointer; }
.quarter-unpaid-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.quarter-unpaid { min-height: 58px; padding: 11px; border: 1px solid var(--line); border-radius: 14px; background: #f8faf6; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.quarter-unpaid > span { min-width: 0; }
.quarter-unpaid > span:last-child { text-align: right; }
.quarter-unpaid strong, .quarter-unpaid b { display: block; color: var(--ink); font-size: 12px; }
.quarter-unpaid small { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; white-space: nowrap; }
.quarter-unpaid.has-unpaid { border-color: #efd6ca; background: #fff8f4; }
.quarter-unpaid.has-unpaid b { color: var(--red); }
.officer-dashboard { display: grid; gap: 16px; min-width: 0; }
.officer-dashboard > .section-head { margin: 8px 2px 0; }
.officer-dashboard > .card, .officer-dashboard > .metric-grid { margin: 0; min-width: 0; }
.officer-dashboard > .card + .card { margin-top: 0; }
.officer-dashboard > .dashboard-subhead { margin: 10px 2px -2px; }
.officer-dashboard > .footer-note { padding-top: 10px; }
.finance-metrics strong { font-size: 16px; white-space: nowrap; }
.finance-line-scroll { width: 100%; min-width: 0; overflow: hidden; margin-top: 15px; }
.finance-line-chart { display: block; width: 100%; max-width: 100%; min-width: 0; height: auto; overflow: hidden; }
.finance-grid-line { stroke: #e3e9df; stroke-width: 1; vector-effect: non-scaling-stroke; }
.finance-axis-line { stroke: #9aa89f; stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.finance-axis-label { fill: var(--muted); font-size: 10px; font-weight: 700; }
.finance-month-label { font-size: 9px; }
.finance-axis-title { fill: var(--muted); font-size: 10px; font-weight: 900; }
.finance-line { fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.finance-line.income { stroke: #3d826c; }
.finance-line.expense { stroke: #df7d55; }
.finance-dot { stroke: white; stroke-width: 2; vector-effect: non-scaling-stroke; }
.finance-dot.income { fill: #3d826c; }
.finance-dot.expense { fill: #df7d55; }
.legend { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin: 0 3px 0 7px; }
.legend:first-child { margin-left: 0; }
.legend.income { background: #62967b; }
.legend.expense { background: #e48a63; }
.opening-balance { border-top: 1px solid var(--line); margin-top: 15px; padding-top: 13px; display: flex; justify-content: space-between; gap: 10px; font-size: 11px; color: var(--muted); }
.opening-balance strong { color: var(--ink); }
.admin-metrics { margin-bottom: 14px; }
.admin-group { margin-top: 14px; border: 1px solid var(--line); border-radius: 22px; background: white; padding: 16px; }
.admin-group-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.admin-group-head h3 { margin: 0; }
.admin-group-head span { color: var(--muted); font-size: 9px; text-align: right; }
.admin-tool-list { display: grid; gap: 8px; }
.admin-tool { min-height: 62px; display: grid; grid-template-columns: 42px minmax(0, 1fr) 18px; align-items: center; gap: 11px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 15px; color: inherit; text-decoration: none; background: #fbfcf9; }
.admin-tool:active { transform: scale(.99); }
.admin-tool-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; background: var(--lime-soft); color: var(--green); font-size: 18px; font-weight: 900; }
.admin-tool strong { display: block; font-size: 13px; margin-bottom: 3px; }
.admin-tool small { display: block; color: var(--muted); font-size: 10px; line-height: 1.35; }
.admin-tool > b { color: var(--green-2); font-size: 15px; }
.admin-help { margin: 14px 3px 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.empty { padding: 30px 14px; text-align: center; border: 1px dashed #cbd4c8; border-radius: 18px; color: var(--muted); }
.empty strong { display: block; color: var(--ink); margin-bottom: 5px; }
.bottom-nav { position: fixed; z-index: 30; left: 0; right: 0; margin-inline: auto; bottom: 0; width: min(100%, 560px); height: calc(72px + var(--safe-bottom)); padding: 7px 10px var(--safe-bottom); background: rgba(255,255,255,.96); border-top: 1px solid var(--line); backdrop-filter: blur(18px); display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; }
.bottom-nav button { border: 0; background: transparent; border-radius: 13px; color: #849089; min-width: 0; display: grid; place-content: center; justify-items: center; gap: 4px; font-size: 9px; font-weight: 800; }
.bottom-nav button.active { color: var(--green); background: #f1f6e8; }
.nav-icon { height: 24px; display: grid; place-items: center; }
.nav-icon svg { width: 22px; height: 22px; }
.toast { position: fixed; z-index: 80; bottom: calc(92px + var(--safe-bottom)); left: 50%; transform: translate(-50%, 20px); width: min(calc(100% - 32px), 500px); background: #142923; color: white; padding: 13px 16px; border-radius: 14px; text-align: center; font-size: 12px; font-weight: 700; opacity: 0; pointer-events: none; transition: .2s ease; box-shadow: var(--shadow); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: #803636; }
.modal-layer { position: fixed; inset: 0; z-index: 70; background: rgba(17,35,30,.46); display: flex; align-items: flex-end; justify-content: center; padding-top: 24px; }
.modal { width: min(100%, 560px); max-height: calc(100dvh - 24px); overflow-y: auto; background: white; border-radius: 26px 26px 0 0; padding: 22px 18px calc(22px + var(--safe-bottom)); box-shadow: 0 -18px 50px rgba(15,36,30,.18); }
.modal-handle { width: 42px; height: 5px; border-radius: 99px; background: #d6ddd3; margin: -8px auto 19px; }
.account-menu { display: grid; gap: 10px; }
.notice { padding: 13px 14px; border-radius: 15px; background: #fff8e8; color: #765923; font-size: 12px; line-height: 1.55; }
.file-link { color: inherit; text-decoration: none; }
.file-link .list-row::after { content: "열기"; color: var(--green-2); font-size: 11px; font-weight: 900; }
.lookup-result { text-align: center; padding: 22px; background: var(--lime-soft); border-radius: 20px; }
.lookup-result strong { display: block; font-size: 42px; line-height: 1; margin: 12px 0 7px; }
.lookup-result strong em { font-size: 15px; font-style: normal; }
.lookup-result strong.status-word { font-size: 28px; }
.footer-note { text-align: center; color: #8a958f; font-size: 10px; line-height: 1.6; padding: 26px 0 6px; }
@media (max-width: 370px) {
  #app { padding-left: 12px; padding-right: 12px; }
  .app-header { padding-left: 12px; padding-right: 12px; }
  .form-grid { grid-template-columns: 1fr; }
  .club-account-copy { align-items: flex-start; flex-direction: column; }
  .club-account-copy .button { width: 100%; }
  .portal-card { grid-template-columns: 46px 1fr 18px; padding: 15px; gap: 10px; }
  .portal-card .portal-icon { width: 46px; height: 46px; }
}
@media (min-width: 561px) {
  .modal-layer { align-items: center; padding: 24px; }
  .modal { border-radius: 26px; max-width: 510px; padding-bottom: 24px; }
}
@media print {
  .app-header, .bottom-nav, .button, .profile-button { display: none !important; }
  body, html, .app-shell { background: white; box-shadow: none; }
  #app { padding: 0; }
}

/* Officer tools stay usable on narrow phones and desktop previews. */
.bottom-nav { overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; grid-auto-columns: minmax(46px, 1fr); }
.bottom-nav button { min-height: 44px; touch-action: manipulation; white-space: nowrap; }
.read-filters { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.read-filters .wide { grid-column: 1 / -1; }
.read-filters input, .read-filters select { width: 100%; min-width: 0; }
.read-filters .check-label { display: flex; align-items: center; gap: 8px; }
.read-filters .check-label input { width: auto; }
.read-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.read-memo { white-space: pre-wrap; overflow-wrap: anywhere; }
/* 거래 내역: 카드 간격은 부모 grid gap으로만 정하고, 카드 높이는 한 줄 제목·메모로 맞춘다. */
.read-stack { display: grid; gap: 12px; }
.read-stack > * { margin: 0; }
.read-stack .card + .card { margin-top: 0; }
.finance-read-metrics .balance-metric { grid-column: 1 / -1; }
.metric strong.negative { color: var(--red); }
.transaction-list { display: grid; gap: 10px; }
.transaction-card { display: grid; gap: 6px; padding: 14px 16px; min-width: 0; }
.transaction-card h3 { margin: 4px 0 0; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.transaction-card .helper { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.transaction-card .read-memo { margin: 0; min-height: 1.5em; font-size: 12px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dues-months .read-row { padding: 10px 0; border-top: 1px solid var(--line); font-size: 12px; }

/* Management forms share the same workflow on phones and desktop. */
.management-tools,.management-grid { display:grid; gap:12px; margin-bottom:20px; }
.management-tools .admin-tool { width:100%; text-align:left; color:inherit; font:inherit; cursor:pointer; }
.management-record { display:flex; justify-content:space-between; align-items:center; gap:14px; margin:0; min-width:0; }
.management-record > div { min-width:0; overflow-wrap:anywhere; }
.management-record .button { flex-shrink:0; }
.management-actions { display:flex; align-items:center; flex-wrap:wrap; gap:12px; margin:16px 0; }
.management-form { display:grid; grid-template-columns:minmax(0,1fr); gap:16px; margin-top:16px; }
.management-form label { display:grid; gap:7px; min-width:0; font-size:14px; font-weight:600; }
.management-form input,.management-form select { width:100%; min-width:0; min-height:44px; padding:10px 12px; border:1px solid #d9e1df; border-radius:10px; background:#fff; color:#173b32; font-size:16px; }
.management-full { grid-column:1/-1; }
#management-editor { scroll-margin-top:100px; }
@media(min-width:800px) {
  body.management-layout .app-shell { width:min(100%,1120px); }
  body.management-layout .bottom-nav { width:min(100%,1120px); }
  .management-tools,.management-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .management-form { grid-template-columns:repeat(2,minmax(0,1fr)); }
}

/* Workspace tiles: consistent icon, copy and arrow columns on both devices. */
.workspace-home { max-width:920px; margin:0 auto; padding:8px 0; }
.workspace-heading { margin-bottom:28px; }
.workspace-eyebrow { margin:0 0 8px; color:var(--green-2); font-size:12px; font-weight:700; letter-spacing:.04em; }
.workspace-heading h2 { margin:0 0 10px; font-size:26px; line-height:1.3; letter-spacing:-.035em; }
.workspace-heading > p:last-child { margin:0; color:var(--muted); font-size:14px; line-height:1.6; word-break:keep-all; }
.workspace-section + .workspace-section { margin-top:30px; }
.workspace-section-heading { display:flex; align-items:baseline; justify-content:space-between; gap:12px; margin-bottom:12px; }
.workspace-section-heading h3 { margin:0; font-size:15px; font-weight:700; line-height:1.5; }
.workspace-section-heading p { margin:0; color:var(--muted); font-size:12px; line-height:1.5; }
.workspace-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.workspace-tool { display:grid; grid-template-columns:40px minmax(0,1fr) 16px; align-items:center; gap:16px; min-width:0; min-height:104px; padding:20px; border:1px solid var(--line); border-radius:16px; background:var(--surface); color:var(--ink); text-align:left; text-decoration:none; cursor:pointer; box-shadow:0 2px 6px rgba(22,49,44,.025); transition:border-color .15s,background .15s; }
.workspace-tool:last-child:nth-child(odd) { grid-column:1/-1; }
.workspace-tool:hover { border-color:#a9bdb2; background:#fcfdfb; }
.workspace-tool:focus-visible { outline:3px solid var(--green-2); outline-offset:3px; }
.workspace-icon { display:grid; place-items:center; width:40px; height:40px; border-radius:12px; background:#eff4ec; color:var(--green-2); }
.workspace-icon svg { display:block; width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.workspace-copy { min-width:0; }
.workspace-copy strong { display:block; margin:0 0 5px; font-size:16px; font-weight:700; line-height:1.4; letter-spacing:-.025em; word-break:keep-all; }
.workspace-copy small { display:block; color:var(--muted); font-size:13px; font-weight:400; line-height:1.5; word-break:keep-all; overflow-wrap:break-word; }
.workspace-arrow { justify-self:end; color:#87988d; font-size:22px; font-weight:400; line-height:1; }
.workspace-secondary .workspace-tool { background:#f9fbf7; box-shadow:none; }
.workspace-secondary .workspace-icon { background:#edf0e9; }
@media(min-width:800px) {
  .workspace-home { padding:18px 16px; }
}
@media(max-width:799px) {
  .workspace-heading { margin-bottom:24px; }
  .workspace-heading h2 { font-size:23px; margin-bottom:8px; }
  .workspace-heading > p:last-child { font-size:13px; }
  .workspace-grid { grid-template-columns:minmax(0,1fr); gap:10px; }
  .workspace-tool { grid-template-columns:36px minmax(0,1fr) 14px; gap:12px; min-height:88px; padding:16px; border-radius:14px; }
  .workspace-icon { width:36px; height:36px; border-radius:10px; }
  .workspace-icon svg { width:20px; height:20px; }
  .workspace-copy strong { font-size:15px; margin-bottom:4px; }
  .workspace-copy small { font-size:12px; }
  .workspace-section-heading { gap:8px; }
  .workspace-section-heading h3 { font-size:14px; }
  .workspace-section-heading p { font-size:11px; }
  .workspace-section + .workspace-section { margin-top:26px; }
}

.dues-balance { display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:6px; font-size:13px; font-variant-numeric:tabular-nums; }
.status-pill.overpaid { background:var(--blue-soft); color:var(--blue); }

.management-member-picker { display:grid; align-content:start; gap:10px; min-width:0; }
.transaction-member { margin:8px 0; font-size:13px; color:var(--muted); line-height:1.5; }
.transaction-member strong { font-weight:600; color:var(--ink); }

.spouse-link { appearance: none; border: 0; padding: 0; background: none; font: inherit; font-weight: 700; color: var(--blue); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* 정회원 목록: 이름과 상태·레벨·성별·배우자를 한 줄에 표시하고, 화면이 좁을 때만 줄바꿈한다. */
.list-main.one-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.list-main.one-line strong { min-width: 0; max-width: 100%; }
.list-main.one-line small { margin-top: 0; font-size: 11px; }

/* 정회원 상세: 항목 이름과 값을 한 줄에 표시한다. */
.detail-lines .list-row { min-height: 46px; padding: 9px 13px; }
.detail-lines .list-main { display: flex; align-items: baseline; gap: 12px; }
.detail-lines .list-main small { margin-top: 0; flex: 0 0 4.5em; font-size: 11px; white-space: nowrap; }
.detail-lines .list-main strong { min-width: 0; }

/* 첫 화면: 성복 테니스 클럽 이름 + 원근 테니스 코트 그림 */
.hero-court { padding-bottom: 0; display: block; }
.hero-court .hero-copy { position: relative; z-index: 1; }
.hero-court h1 { font-size: clamp(30px, 8.5vw, 40px); line-height: 1.15; letter-spacing: -.04em; margin: 0 0 10px; }
.hero-court .lead { margin-bottom: 4px; }
.court-art { display: block; width: calc(100% + 44px); max-width: none; height: auto; aspect-ratio: 360 / 200; margin: 6px -22px 0; }

/* 상단 STC 로고: 검은 배경이 포함된 가로형 로고 이미지 */
.brand-mark.brand-logo { width: 63px; height: 42px; padding: 0; background: #000; overflow: hidden; }
.brand-mark.brand-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* 상단 로고: 투명 배경 로고 + 한글 명칭 */
.brand-mark.brand-logo { background: transparent; border-radius: 0; }
.brand-mark.brand-logo img { object-fit: contain; }
.brand strong { font-size: 16px; letter-spacing: -.02em; }
.brand small { font-size: 10px; letter-spacing: .02em; }

/* 배너: 문구 없이 코트 그림만 꽉 채운다. */
.hero-court { padding: 0; }
.hero-court .court-art { width: 100%; margin: 0; aspect-ratio: 360 / 210; }

/* 배너: 숲속 테니스 코트 일러스트 */
.hero-court { background: #2c6b57; }
.court-photo { display: block; width: 100%; height: auto; aspect-ratio: 2 / 1; object-fit: cover; object-position: center 42%; }
/* 상단 로고: 로고 원본의 파란색(#0046E6)으로 배경을 채운다. */
.brand-mark.brand-logo { background: #0046e6; border-radius: 12px; padding: 3px 4px; box-sizing: border-box; }

/* 상단 로고: 투명 바탕 + 파란 글자 STC 워드마크 */
.brand-mark.brand-logo { width: 96px; height: 42px; padding: 0; background: transparent; border-radius: 0; }
.brand-mark.brand-logo img { object-fit: contain; }

/* 배너: 코트 일러스트 + STC 워터마크 */
.hero-court { position: relative; }
.court-watermark { position: absolute; right: 12px; bottom: 10px; width: clamp(44px, 12%, 66px); height: auto; opacity: .92; filter: drop-shadow(0 1px 3px rgba(0,0,0,.45)) drop-shadow(0 0 1px rgba(0,0,0,.35)); pointer-events: none; }

/* 상단 로고 아래 SINCE 2018 */
.brand-mark.brand-logo { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; height: 42px; }
.brand-mark.brand-logo img { width: 100%; height: 28px; }
.brand-since { font-size: 8px; font-weight: 800; letter-spacing: .24em; line-height: 1; color: #0046e6; padding-left: .24em; white-space: nowrap; }

/* 배너 워터마크: 로고 + SINCE 2018 */
.court-watermark { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.court-watermark img { display: block; width: 100%; height: auto; }

/* 로고 아래 문구 TENNIS FOR LIFE: 15자라 자간을 줄여 로고 폭에 맞춘다. */
.brand-since { letter-spacing: .1em; padding-left: .1em; }

/* 자료실 폴더 */
.folder-row { width: 100%; min-height: 58px; border: 1px solid var(--line); border-radius: 15px; background: white; padding: 12px 13px; display: flex; align-items: center; gap: 11px; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.folder-row > b { color: var(--green-2); font-size: 18px; }
.folder-icon { background: #fff4d6; font-size: 17px; }
.folder-back { border: 0; background: transparent; color: var(--green-2); font: inherit; font-weight: 800; font-size: 13px; padding: 4px 0; cursor: pointer; }
.folder-title { margin: 6px 0 10px; font-size: 17px; }
.folder-title small { color: #849089; font-size: 12px; font-weight: 700; }
