/* ============================================================
   짠짠 계산기 — MINT
   라이트 우선 · 머니 민트(에메랄드) + 골드 액센트 · 글래스 카드
   ============================================================ */

:root,
[data-theme="light"] {
    --z-bg:            #f4f8f6;
    --z-bg-2:          #eaf2ee;
    --z-surface:       #ffffff;
    --z-surface-2:     #f7faf8;
    --z-border:        rgba(16, 60, 45, 0.10);
    --z-border-strong: rgba(16, 60, 45, 0.20);
    --z-text:          #0f2b22;
    --z-text-soft:     #4a6258;
    --z-text-dim:      #8aa096;

    --z-mint:          #10b981;
    --z-mint-deep:     #059669;
    --z-gold:          #f5a623;
    --z-blue:          #2f80ed;
    --z-rose:          #ef476f;

    --z-grad:          linear-gradient(135deg, #10b981 0%, #34d399 100%);
    --z-grad-gold:     linear-gradient(135deg, #f5a623 0%, #ffce5a 100%);
    --z-glow:          0 10px 30px rgba(16, 185, 129, 0.22);

    --z-r-sm: 10px;
    --z-r:    16px;
    --z-r-lg: 22px;
    --z-shadow:  0 10px 34px rgba(16, 60, 45, 0.10);
    --z-shadow-s: 0 3px 12px rgba(16, 60, 45, 0.07);
    --z-top-h: 62px;
}

[data-theme="dark"] {
    --z-bg:            #0b1512;
    --z-bg-2:          #0f1c17;
    --z-surface:       #14211c;
    --z-surface-2:     #182a23;
    --z-border:        rgba(140, 200, 175, 0.12);
    --z-border-strong: rgba(140, 200, 175, 0.24);
    --z-text:          #e8f4ee;
    --z-text-soft:     #a8c3b7;
    --z-text-dim:      #6f8c80;
    --z-shadow:  0 14px 40px rgba(0, 0, 0, 0.5);
    --z-shadow-s: 0 3px 12px rgba(0, 0, 0, 0.35);
    --z-glow:    0 10px 30px rgba(16, 185, 129, 0.3);
}

* { box-sizing: border-box; }

html, body {
    margin: 0; padding: 0;
    background: var(--z-bg);
    color: var(--z-text);
    font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
}
body {
    min-height: 100vh;
    background:
        radial-gradient(820px 520px at 8% -10%, rgba(16, 185, 129, 0.10), transparent 60%),
        radial-gradient(720px 480px at 100% 0%, rgba(245, 166, 35, 0.08), transparent 55%),
        var(--z-bg);
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3 { margin: 0; }

#zc_app { min-height: 100vh; display: flex; flex-direction: column; }

/* ───────────── 상단 바 ───────────── */
.zc-top {
    position: sticky; top: 54px; z-index: 40; /* ZZAN Top Bar(54px) 아래에 스택 */
    height: var(--z-top-h);
    background: color-mix(in srgb, var(--z-surface) 86%, transparent);
    backdrop-filter: saturate(1.4) blur(12px);
    border-bottom: 1px solid var(--z-border);
}
.zc-top__inner {
    max-width: 1080px; height: 100%; margin: 0 auto; padding: 0 20px;
    display: flex; align-items: center; gap: 18px;
}
.zc-logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; letter-spacing: -0.02em; }
.zc-logo__mark {
    width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center;
    color: #fff; box-shadow: var(--z-glow);
}
.zc-logo__mark svg { width: 20px; height: 20px; }
.zc-logo__text { color: var(--z-text); }

.zc-nav { display: flex; gap: 4px; margin-left: 8px; }
.zc-nav__item {
    display: flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 999px;
    color: var(--z-text-soft); font-weight: 600; font-size: 14.5px; transition: .15s;
}
.zc-nav__item svg { width: 18px; height: 18px; }
.zc-nav__item:hover { background: var(--z-surface-2); color: var(--z-text); }
.zc-nav__item.is-active { background: color-mix(in srgb, var(--z-mint) 14%, transparent); color: var(--z-mint-deep); }
[data-theme="dark"] .zc-nav__item.is-active { color: #5eead4; }

.zc-top__controls { margin-left: auto; display: flex; align-items: center; gap: 8px; }

/* 아이콘 버튼 (테마 토글) */
.zc-iconbtn {
    width: 38px; height: 38px; border-radius: 11px; border: 1px solid var(--z-border);
    background: var(--z-surface); color: var(--z-text-soft); display: grid; place-items: center; transition: .15s;
}
.zc-iconbtn:hover { color: var(--z-text); border-color: var(--z-border-strong); }
.zc-iconbtn svg { width: 19px; height: 19px; }
.zc-ico-moon { display: none; }
[data-theme="dark"] .zc-ico-sun { display: none; }
[data-theme="dark"] .zc-ico-moon { display: block; }

/* 버튼 */
.zc-btn {
    display: inline-flex; align-items: center; gap: 7px; justify-content: center;
    padding: 10px 18px; border-radius: 999px; border: 1px solid transparent;
    font-weight: 700; font-size: 14.5px; transition: .15s; white-space: nowrap;
}
.zc-btn svg { width: 17px; height: 17px; }
.zc-btn--sm { padding: 8px 14px; font-size: 13.5px; }
.zc-btn--lg { padding: 14px 26px; font-size: 16px; }
.zc-btn--primary { background: var(--z-grad); color: #fff; box-shadow: var(--z-glow); }
.zc-btn--primary:hover { filter: brightness(1.05); transform: translateY(-1px); }
.zc-btn--ghost { background: var(--z-surface); color: var(--z-text); border-color: var(--z-border); }
.zc-btn--ghost:hover { border-color: var(--z-border-strong); }

/* ───────────── 메인 ───────────── */
.zc-main { flex: 1; width: 100%; max-width: 1080px; margin: 0 auto; padding: 30px 20px 56px; }

/* ───────────── 허브: 히어로 ───────────── */
.zc-hero { text-align: center; padding: 26px 0 30px; }
.zc-hero__eyebrow { color: var(--z-mint-deep); font-weight: 700; font-size: 14px; margin: 0 0 10px; }
[data-theme="dark"] .zc-hero__eyebrow { color: #5eead4; }
.zc-hero__title { font-size: clamp(30px, 6vw, 46px); font-weight: 900; letter-spacing: -0.03em; }
.zc-hero__sub { color: var(--z-text-soft); font-size: 16px; margin: 12px 0 0; }
.zc-search { margin: 24px auto 0; max-width: 460px; }
.zc-search input {
    width: 100%; padding: 14px 18px; border-radius: 999px; border: 1px solid var(--z-border-strong);
    background: var(--z-surface); color: var(--z-text); font-size: 15.5px; box-shadow: var(--z-shadow-s);
}
.zc-search input:focus { outline: none; border-color: var(--z-mint); box-shadow: 0 0 0 4px color-mix(in srgb, var(--z-mint) 18%, transparent); }

/* ───────────── 허브: 분류 + 그리드 ───────────── */
.zc-cat { margin-top: 34px; }
.zc-cat__title { display: flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 800; margin-bottom: 16px; }
.zc-cat__ico { font-size: 22px; }
.zc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }

.zc-card {
    position: relative; display: flex; flex-direction: column;
    background: var(--z-surface); border: 1px solid var(--z-border); border-radius: var(--z-r);
    padding: 20px; box-shadow: var(--z-shadow-s); transition: .18s; overflow: hidden;
}
.zc-card::before {
    content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--z-grad); opacity: 0; transition: .18s;
}
.zc-card:hover { transform: translateY(-3px); box-shadow: var(--z-shadow); border-color: var(--z-border-strong); }
.zc-card:hover::before { opacity: 1; }
.zc-card__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.zc-card__ico { font-size: 30px; line-height: 1; }
.zc-card__badge { background: var(--z-grad-gold); color: #5a3a00; font-weight: 800; font-size: 11px; padding: 4px 9px; border-radius: 999px; letter-spacing: .03em; }
.zc-card__count { color: var(--z-text-dim); font-size: 12px; font-weight: 600; }
.zc-card__name { font-size: 17px; font-weight: 800; letter-spacing: -0.01em; }
.zc-card__desc { color: var(--z-text-soft); font-size: 13.5px; line-height: 1.5; margin: 8px 0 16px; flex: 1; }
.zc-card__go { color: var(--z-mint-deep); font-weight: 700; font-size: 14px; }
[data-theme="dark"] .zc-card__go { color: #5eead4; }

.zc-empty { text-align: center; color: var(--z-text-soft); padding: 36px 0; }

/* ───────────── 계산기 페이지 ───────────── */
.zc-back { display: inline-flex; align-items: center; gap: 5px; color: var(--z-text-soft); font-weight: 600; font-size: 14px; margin-bottom: 16px; }
.zc-back svg { width: 18px; height: 18px; }
.zc-back:hover { color: var(--z-text); }

.zc-calc { max-width: 640px; margin: 0 auto; }
.zc-calc__head { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.zc-calc__ico { font-size: 40px; line-height: 1; }
.zc-calc__name { font-size: 25px; font-weight: 900; letter-spacing: -0.02em; }
.zc-calc__tag { color: var(--z-text-soft); font-size: 14.5px; margin: 5px 0 0; }
.zc-calc__body { background: var(--z-surface); border: 1px solid var(--z-border); border-radius: var(--z-r-lg); padding: 24px; box-shadow: var(--z-shadow-s); }

/* 폼 */
.zc-form { display: flex; flex-direction: column; gap: 16px; }
.zc-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.zc-field { display: flex; flex-direction: column; gap: 7px; }
.zc-field__label { font-weight: 700; font-size: 14px; color: var(--z-text); }
.zc-field__label .zc-hint, .zc-hint { color: var(--z-text-dim); font-weight: 500; font-size: 12px; font-style: normal; }
.zc-field__input { position: relative; display: flex; align-items: center; }
.zc-field__input input {
    width: 100%; padding: 13px 44px 13px 14px; border-radius: var(--z-r-sm); border: 1px solid var(--z-border-strong);
    background: var(--z-surface-2); color: var(--z-text); font-size: 16px; font-weight: 600;
}
.zc-field__input input:focus { outline: none; border-color: var(--z-mint); background: var(--z-surface); box-shadow: 0 0 0 3px color-mix(in srgb, var(--z-mint) 16%, transparent); }
.zc-field__unit { position: absolute; right: 14px; color: var(--z-text-dim); font-size: 13.5px; font-weight: 600; pointer-events: none; }
.zc-field__select select {
    width: 100%; padding: 13px 14px; border-radius: var(--z-r-sm); border: 1px solid var(--z-border-strong);
    background: var(--z-surface-2); color: var(--z-text); font-size: 15.5px; font-weight: 600; appearance: none;
}
.zc-field__select { position: relative; }
.zc-field__select::after { content: "▾"; position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--z-text-dim); pointer-events: none; }
.zc-field--check { flex-direction: row; align-items: center; gap: 10px; cursor: pointer; }
.zc-field--check input { width: 18px; height: 18px; accent-color: var(--z-mint); }
.zc-field--check span { font-size: 14.5px; color: var(--z-text); }

.zc-note { color: var(--z-text-dim); font-size: 12.5px; line-height: 1.55; margin: 2px 0 0; }
.zc-form__actions { display: flex; gap: 10px; margin-top: 8px; }
.zc-form__actions .zc-btn--lg { flex: 1; }

/* 안내 배너 (최저시급 등) */
.zc-infobar { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--z-r-sm); background: color-mix(in srgb, var(--z-mint) 10%, var(--z-surface)); border: 1px solid color-mix(in srgb, var(--z-mint) 30%, transparent); margin-bottom: 4px; }
.zc-infobar__ico { font-size: 18px; line-height: 1; flex: none; }
.zc-infobar__text { font-size: 13px; color: var(--z-text-soft); line-height: 1.5; }
.zc-infobar__text b { color: var(--z-mint-deep); font-weight: 800; }
[data-theme="dark"] .zc-infobar__text b { color: #5eead4; }

/* 숫자 변수 탭 스테퍼 (− / +) */
.zc-field__input.zc-stepper { gap: 8px; }
.zc-field__input.zc-stepper input { flex: 1; min-width: 0; text-align: center; padding-left: 8px; padding-right: 8px; }
.zc-field__input.zc-stepper .zc-field__unit { position: static; flex: none; }
.zc-step { flex: none; width: 46px; height: 48px; border-radius: var(--z-r-sm); border: 1px solid var(--z-border-strong); background: var(--z-surface-2); color: var(--z-text); font-size: 22px; font-weight: 700; line-height: 1; display: grid; place-items: center; user-select: none; }
.zc-step:hover { border-color: var(--z-mint); color: var(--z-mint-deep); }
.zc-step:active { transform: scale(.93); }
/* 네이티브 숫자 스피너 제거 (스테퍼로 대체) */
.zc-field__input input[type=number]::-webkit-inner-spin-button,
.zc-field__input input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.zc-field__input input[type=number] { -moz-appearance: textfield; }

/* 적용 요율 패널 */
.zc-rates { margin-top: 4px; border: 1px solid var(--z-border); border-radius: var(--z-r-sm); background: var(--z-surface-2); overflow: hidden; }
.zc-rates__summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 15px; cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--z-text); list-style: none; }
.zc-rates__summary::-webkit-details-marker { display: none; }
.zc-rates__summary b { color: var(--z-mint-deep); }
[data-theme="dark"] .zc-rates__summary b { color: #5eead4; }
.zc-rates__hint { color: var(--z-text-dim); font-size: 12.5px; font-weight: 500; }
.zc-rates[open] .zc-rates__hint { display: none; }
.zc-rates__desc { margin: 0; padding: 0 15px; color: var(--z-text-dim); font-size: 12.5px; line-height: 1.5; }
.zc-rates__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 12px 15px 4px; }
.zc-rates__grid label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; font-weight: 600; color: var(--z-text-soft); }
.zc-rates__grid input { width: 100%; padding: 9px 11px; border-radius: 9px; border: 1px solid var(--z-border-strong); background: var(--z-surface); color: var(--z-text); font-size: 14px; font-weight: 600; box-sizing: border-box; }
.zc-rates__grid input:focus { outline: none; border-color: var(--z-mint); box-shadow: 0 0 0 3px color-mix(in srgb, var(--z-mint) 14%, transparent); }
.zc-rates__reset { margin: 8px 15px 14px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--z-border-strong); background: var(--z-surface); color: var(--z-text-soft); font-size: 12.5px; font-weight: 600; }
.zc-rates__reset:hover { border-color: var(--z-mint); color: var(--z-mint-deep); }

/* 기본 계산기 위젯 */
.zc-basic { max-width: 380px; margin: 0 auto; }
.zc-basic__display { background: var(--z-surface-2); border: 1px solid var(--z-border-strong); border-radius: var(--z-r); padding: 18px 18px 14px; text-align: right; margin-bottom: 14px; }
.zc-basic__expr { color: var(--z-text-dim); font-size: 14px; min-height: 20px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zc-basic__out { color: var(--z-text); font-size: 34px; font-weight: 800; letter-spacing: -0.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 4px; }
.zc-basic__pad { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }
.zc-bk { height: 62px; border-radius: var(--z-r-sm); border: 1px solid var(--z-border); background: var(--z-surface); color: var(--z-text); font-size: 21px; font-weight: 700; transition: .1s; }
.zc-bk:hover { background: var(--z-surface-2); }
.zc-bk:active { transform: scale(.96); }
.zc-bk--fn { background: var(--z-surface-2); color: var(--z-text-soft); }
.zc-bk--op { color: var(--z-mint-deep); font-size: 24px; }
[data-theme="dark"] .zc-bk--op { color: #5eead4; }
.zc-bk--zero { grid-column: span 2; }
.zc-bk--eq { background: var(--z-grad); color: #fff; border: none; box-shadow: var(--z-glow); }
.zc-bk--eq:hover { filter: brightness(1.05); }

/* 결과 영역 */
.zc-result { margin-top: 20px; animation: zc-pop .28s ease; }
@keyframes zc-pop { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.zc-res-hero {
    text-align: center; padding: 22px; border-radius: var(--z-r);
    background: var(--z-grad); color: #fff; box-shadow: var(--z-glow);
}
.zc-res-hero__label { font-size: 14px; font-weight: 600; opacity: .9; }
.zc-res-hero__value { font-size: clamp(30px, 8vw, 44px); font-weight: 900; letter-spacing: -0.02em; margin: 4px 0; }
.zc-res-hero__sub { font-size: 14px; opacity: .92; }
.zc-res-rows { margin-top: 16px; border: 1px solid var(--z-border); border-radius: var(--z-r); overflow: hidden; }
.zc-res-row { display: flex; justify-content: space-between; align-items: center; padding: 13px 16px; font-size: 14.5px; }
.zc-res-row + .zc-res-row { border-top: 1px solid var(--z-border); }
.zc-res-row__k { color: var(--z-text-soft); }
.zc-res-row__v { font-weight: 700; }
.zc-res-row.is-minus .zc-res-row__v { color: var(--z-rose); }
.zc-res-row.is-total { background: var(--z-surface-2); }
.zc-res-row.is-total .zc-res-row__k, .zc-res-row.is-total .zc-res-row__v { font-weight: 800; font-size: 16px; }
.zc-res-note { color: var(--z-text-dim); font-size: 12.5px; margin-top: 12px; line-height: 1.5; }

/* 게이지 (백분위/점수) */
.zc-gauge { margin-top: 16px; }
.zc-gauge__track { height: 14px; border-radius: 999px; background: var(--z-surface-2); border: 1px solid var(--z-border); overflow: hidden; }
.zc-gauge__fill { height: 100%; border-radius: 999px; background: var(--z-grad); transition: width .6s cubic-bezier(.2,.8,.2,1); }
.zc-gauge__scale { display: flex; justify-content: space-between; color: var(--z-text-dim); font-size: 11.5px; margin-top: 6px; }

.zc-res-share { margin-top: 16px; }
.zc-res-share .zc-btn { width: 100%; }

/* 관련 계산기 */
.zc-related { margin: 28px auto 0; max-width: 640px; }
.zc-related__title { font-size: 16px; font-weight: 800; margin-bottom: 12px; }
.zc-related__list { display: flex; flex-wrap: wrap; gap: 10px; }
.zc-related__item { display: inline-flex; align-items: center; gap: 7px; padding: 9px 15px; border-radius: 999px; background: var(--z-surface); border: 1px solid var(--z-border); font-weight: 600; font-size: 14px; transition: .15s; }
.zc-related__item:hover { border-color: var(--z-mint); color: var(--z-mint-deep); }
.zc-related__ico { font-size: 16px; }

/* ───────────── 공유 결과 페이지 ───────────── */
.zc-resultpage { max-width: 560px; margin: 0 auto; }
.zc-rcard { background: var(--z-surface); border: 1px solid var(--z-border); border-radius: var(--z-r-lg); padding: 32px 26px; text-align: center; box-shadow: var(--z-shadow); }
.zc-rcard__ico { font-size: 50px; line-height: 1; }
.zc-rcard__calc { color: var(--z-text-soft); font-weight: 700; font-size: 14px; margin: 12px 0 6px; }
.zc-rcard__title { font-size: clamp(24px, 6vw, 32px); font-weight: 900; letter-spacing: -0.02em; line-height: 1.25; }
.zc-rcard__summary { color: var(--z-text-soft); font-size: 15px; margin: 12px 0 0; line-height: 1.6; }
.zc-rcard__detail { margin-top: 18px; text-align: left; }
.zc-rcard__meta { color: var(--z-text-dim); font-size: 12.5px; margin: 18px 0 0; }
.zc-rcta { display: flex; gap: 10px; margin-top: 18px; }
.zc-rcta .zc-btn--lg { flex: 1; }

/* ───────────── 랭킹 / 내 기록 ───────────── */
.zc-rankhead { text-align: center; margin-bottom: 26px; }
.zc-rankhead__title { display: inline-flex; align-items: center; gap: 10px; font-size: 28px; font-weight: 900; letter-spacing: -0.02em; }
.zc-rankhead__ico { width: 28px; height: 28px; color: var(--z-gold); }
.zc-rankhead__sub { color: var(--z-text-soft); margin-top: 8px; }

.zc-panel { max-width: 640px; margin: 0 auto 22px; background: var(--z-surface); border: 1px solid var(--z-border); border-radius: var(--z-r-lg); padding: 22px; box-shadow: var(--z-shadow-s); }
.zc-panel__title { font-size: 17px; font-weight: 800; margin-bottom: 14px; }
.zc-ranklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.zc-rankrow { display: flex; align-items: center; gap: 12px; padding: 12px 4px; }
.zc-rankrow + .zc-rankrow { border-top: 1px solid var(--z-border); }
.zc-rankrow__no { width: 26px; height: 26px; flex: none; display: grid; place-items: center; border-radius: 8px; background: var(--z-surface-2); color: var(--z-text-soft); font-weight: 800; font-size: 13px; }
.zc-rankrow__no.is-top { background: var(--z-grad-gold); color: #5a3a00; }
.zc-rankrow__ico { font-size: 20px; }
.zc-rankrow__name { font-weight: 700; flex: 1; }
.zc-rankrow__name:hover { color: var(--z-mint-deep); }
.zc-rankrow__stat { color: var(--z-text-dim); font-size: 12.5px; }
.zc-rankrow__score { font-weight: 800; color: var(--z-mint-deep); }
[data-theme="dark"] .zc-rankrow__score { color: #5eead4; }

.zc-mylist { max-width: 640px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.zc-myitem { display: flex; align-items: center; gap: 12px; background: var(--z-surface); border: 1px solid var(--z-border); border-radius: var(--z-r); padding: 14px 16px; }
.zc-myitem__ico { font-size: 24px; }
.zc-myitem__body { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.zc-myitem__calc { color: var(--z-text-dim); font-size: 12px; font-weight: 600; }
.zc-myitem__title { font-weight: 700; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zc-myitem__views { color: var(--z-text-dim); font-size: 12px; }
.zc-myitem__del { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--z-border); background: var(--z-surface-2); color: var(--z-text-dim); display: grid; place-items: center; }
.zc-myitem__del:hover { color: var(--z-rose); border-color: var(--z-rose); }
.zc-myitem__del svg { width: 15px; height: 15px; }
.zc-pagination { text-align: center; margin-top: 22px; }
.zc-pagination a, .zc-pagination strong { display: inline-block; padding: 6px 11px; margin: 0 2px; border-radius: 8px; color: var(--z-text-soft); }
.zc-pagination a:hover { background: var(--z-surface-2); color: var(--z-text); }
.zc-pagination a.is-active, .zc-pagination strong { background: var(--z-mint); color: #fff; }

/* ───────────── 가계부 (Beta) ───────────── */
.zc-nav__beta { font-size: 9px; font-weight: 800; background: var(--z-gold); color: #4a2f00; padding: 1px 5px; border-radius: 999px; margin-left: 3px; letter-spacing: .02em; line-height: 1.4; }
.zc-beta { font-size: 13px; font-weight: 800; background: var(--z-grad-gold); color: #5a3a00; padding: 2px 10px; border-radius: 999px; vertical-align: middle; margin-left: 4px; }

.zc-ledger { max-width: 640px; margin: 0 auto; }
.zc-ledger-nav { display: flex; align-items: center; justify-content: center; gap: 16px; margin-bottom: 18px; }
.zc-ledger-nav__arrow { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--z-border); background: var(--z-surface); display: grid; place-items: center; font-size: 22px; color: var(--z-text-soft); }
.zc-ledger-nav__arrow:hover { border-color: var(--z-mint); color: var(--z-mint-deep); }
.zc-ledger-nav__label { font-size: 18px; font-weight: 800; min-width: 130px; text-align: center; }

.zc-ledger-sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
.zc-lsum { background: var(--z-surface); border: 1px solid var(--z-border); border-radius: var(--z-r); padding: 14px 10px; text-align: center; box-shadow: var(--z-shadow-s); }
.zc-lsum span { display: block; font-size: 12px; color: var(--z-text-dim); font-weight: 600; margin-bottom: 5px; }
.zc-lsum b { font-size: 17px; font-weight: 800; letter-spacing: -0.02em; }
.zc-lsum--in b { color: var(--z-blue); }
.zc-lsum--ex b { color: var(--z-rose); }
.zc-lsum--bal b { color: var(--z-text); }

.zc-ledger-form { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }
.zc-ltype { display: flex; gap: 8px; }
.zc-ltype__opt { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 10px; border-radius: var(--z-r-sm); border: 1px solid var(--z-border-strong); background: var(--z-surface-2); font-weight: 700; font-size: 14px; cursor: pointer; }
.zc-ltype__opt input { accent-color: var(--z-mint); }
.zc-ledger-form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.zc-ledger-form__grid .zc-field__input { display: flex; align-items: center; }
.zc-linput { width: 100%; padding: 12px 13px; border-radius: var(--z-r-sm); border: 1px solid var(--z-border-strong); background: var(--z-surface-2); color: var(--z-text); font-size: 15px; font-weight: 600; box-sizing: border-box; }
.zc-linput:focus { outline: none; border-color: var(--z-mint); background: var(--z-surface); box-shadow: 0 0 0 3px color-mix(in srgb, var(--z-mint) 16%, transparent); }

.zc-ledger-list { display: flex; flex-direction: column; }
.zc-litem { display: flex; align-items: center; gap: 12px; padding: 13px 4px; border-bottom: 1px solid var(--z-border); }
.zc-litem__date { flex: none; width: 42px; color: var(--z-text-dim); font-size: 13px; font-weight: 600; }
.zc-litem__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.zc-litem__cat { font-weight: 700; font-size: 14.5px; }
.zc-litem__memo { font-size: 12.5px; color: var(--z-text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zc-litem__amt { flex: none; font-weight: 800; font-size: 15px; }
.zc-litem__amt.is-in { color: var(--z-blue); }
.zc-litem__amt.is-ex { color: var(--z-rose); }
.zc-litem__del { display: inline; flex: none; }
.zc-litem__del button { width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--z-border); background: var(--z-surface-2); color: var(--z-text-dim); display: grid; place-items: center; }
.zc-litem__del button:hover { color: var(--z-rose); border-color: var(--z-rose); }
.zc-litem__del svg { width: 13px; height: 13px; }
@media (max-width: 480px) {
    .zc-ledger-sum { grid-template-columns: 1fr; }
    .zc-ledger-form__grid { grid-template-columns: 1fr; }
}

/* ───────────── 모달 / 토스트 ───────────── */
.zc-modal { position: fixed; inset: 0; z-index: 80; display: none; align-items: center; justify-content: center; padding: 20px; background: rgba(8, 20, 16, 0.55); backdrop-filter: blur(4px); }
.zc-modal.is-open { display: flex; }
.zc-modal__card { position: relative; width: 100%; max-width: 420px; background: var(--z-surface); border: 1px solid var(--z-border); border-radius: var(--z-r-lg); padding: 26px; box-shadow: var(--z-shadow); animation: zc-pop .2s ease; }
.zc-modal__close { position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; border-radius: 9px; border: none; background: var(--z-surface-2); color: var(--z-text-soft); display: grid; place-items: center; }
.zc-modal__close svg { width: 17px; height: 17px; }
.zc-modal__title { font-size: 19px; font-weight: 800; }
.zc-modal__desc { color: var(--z-text-soft); font-size: 14px; margin: 8px 0 18px; line-height: 1.55; }
.zc-share-link { display: flex; gap: 8px; }
.zc-share-link input { flex: 1; min-width: 0; padding: 11px 13px; border-radius: var(--z-r-sm); border: 1px solid var(--z-border-strong); background: var(--z-surface-2); color: var(--z-text-soft); font-size: 13px; }
.zc-share-sns { display: flex; gap: 8px; margin-top: 14px; }
.zc-share-sns a { flex: 1; text-align: center; padding: 11px; border-radius: var(--z-r-sm); font-weight: 700; font-size: 13.5px; color: #fff; }
.zc-share-login { margin-top: 16px; padding: 16px; border-radius: var(--z-r-sm); background: color-mix(in srgb, var(--z-mint) 9%, var(--z-surface-2)); border: 1px solid color-mix(in srgb, var(--z-mint) 26%, transparent); text-align: center; }
.zc-share-login__msg { margin: 0 0 12px; font-size: 13.5px; line-height: 1.6; color: var(--z-text-soft); }
.zc-share-login__msg b { color: var(--z-mint-deep); font-weight: 800; }
[data-theme="dark"] .zc-share-login__msg b { color: #5eead4; }
.zc-share-login .zc-btn { width: 100%; }

.zc-sns-kakao { background: #fee500; color: #3a2a00 !important; }
.zc-sns-x { background: #111; }
.zc-sns-facebook { background: #1877f2; }

.zc-toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px); z-index: 90; background: #0f2b22; color: #fff; padding: 12px 20px; border-radius: 999px; font-weight: 600; font-size: 14px; opacity: 0; pointer-events: none; transition: .25s; }
.zc-toast.is-show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ───────────── 푸터 ───────────── */
.zc-foot { text-align: center; color: var(--z-text-dim); font-size: 12.5px; padding: 22px 20px; border-top: 1px solid var(--z-border); }
.zc-foot span { font-weight: 700; color: var(--z-text-soft); }

/* ───────────── 전체공지 바 ───────────── */
.zc-globalbar { display: flex; align-items: center; gap: 9px; padding: 9px 20px; color: #fff; font-weight: 600; font-size: 13.5px; }
.zc-globalbar__ico { width: 17px; height: 17px; flex: none; }
.zc-globalbar__text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zc-globalbar:hover { filter: brightness(1.04); }

/* ───────────── 공지사항 목록 ───────────── */
.zc-notice-actions { max-width: 640px; margin: 0 auto 16px; text-align: right; }
.zc-notice-list { max-width: 640px; margin: 0 auto; background: var(--z-surface); border: 1px solid var(--z-border); border-radius: var(--z-r); box-shadow: var(--z-shadow-s); overflow: hidden; }
.zc-notice-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 18px; }
.zc-notice-row + .zc-notice-row { border-top: 1px solid var(--z-border); }
.zc-notice-row:hover { background: var(--z-surface-2); }
.zc-notice-row__l { display: flex; align-items: center; gap: 8px; min-width: 0; }
.zc-notice-row__title { font-weight: 700; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zc-notice-row__date { flex: none; color: var(--z-text-dim); font-size: 12.5px; }
.zc-tag { flex: none; display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 800; }
.zc-tag--global { background: var(--z-grad); color: #fff; }
.zc-tag--pin { background: var(--z-grad-gold); color: #5a3a00; }

/* ───────────── 공지 상세 / 작성 ───────────── */
.zc-notice-detail { max-width: 640px; margin: 0 auto; }
.zc-notice-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.zc-notice-eyebrow { color: var(--z-mint-deep); font-weight: 700; font-size: 12.5px; letter-spacing: .02em; }
[data-theme="dark"] .zc-notice-eyebrow { color: #5eead4; }
.zc-notice-title { font-size: 24px; font-weight: 900; letter-spacing: -0.02em; margin: 10px 0 4px; line-height: 1.3; }
.zc-notice-title--form { text-align: center; margin-bottom: 18px; }
.zc-notice-meta { color: var(--z-text-dim); font-size: 13px; margin-bottom: 20px; }
.zc-notice-body { font-size: 16px; line-height: 1.8; color: var(--z-text-soft); word-break: break-word; }
.zc-notice-body img { max-width: 100%; height: auto; border-radius: var(--z-r-sm); margin: 10px 0; }
.zc-notice-body h3 { font-size: 18px; font-weight: 800; color: var(--z-text); margin: 22px 0 8px; }
.zc-notice-body a { color: var(--z-mint-deep); text-decoration: underline; }
.zc-notice-body ul { padding-left: 20px; }

/* 에디터 */
.zc-noticeform { max-width: 640px; margin: 0 auto; }
.zc-nfield { margin-bottom: 16px; }
.zc-nfield label, .zc-nlabel { display: block; font-size: 13px; font-weight: 700; color: var(--z-text); margin-bottom: 7px; }
.zc-ninput { width: 100%; padding: 12px 14px; border-radius: var(--z-r-sm); border: 1px solid var(--z-border-strong); background: var(--z-surface-2); color: var(--z-text); font-size: 15px; font-weight: 600; box-sizing: border-box; }
.zc-ninput:focus { outline: none; border-color: var(--z-mint); background: var(--z-surface); box-shadow: 0 0 0 3px color-mix(in srgb, var(--z-mint) 16%, transparent); }
.zc-ed-toolbar { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; background: var(--z-surface-2); border: 1px solid var(--z-border-strong); border-bottom: none; border-radius: var(--z-r-sm) var(--z-r-sm) 0 0; }
.zc-ed-btn { padding: 6px 11px; border-radius: 8px; border: 1px solid var(--z-border); background: var(--z-surface); color: var(--z-text); font-size: 13px; }
.zc-ed-btn:hover { border-color: var(--z-mint); color: var(--z-mint-deep); }
.zc-ed-area { min-height: 240px; padding: 16px; border: 1px solid var(--z-border-strong); border-radius: 0 0 var(--z-r-sm) var(--z-r-sm); background: var(--z-surface); color: var(--z-text); font-size: 16px; line-height: 1.8; overflow-y: auto; }
.zc-ed-area:focus { outline: none; border-color: var(--z-mint); }
.zc-ed-area img { max-width: 100%; height: auto; border-radius: var(--z-r-sm); }
.zc-nchecks { margin-top: 16px; display: flex; gap: 20px; flex-wrap: wrap; align-items: center; }
.zc-nchecks label { font-size: 14px; display: inline-flex; align-items: center; gap: 6px; }
.zc-nchecks input { width: 17px; height: 17px; accent-color: var(--z-mint); }
.zc-ncheck-global { color: var(--z-mint-deep); font-weight: 600; }
.zc-nactions { margin-top: 20px; display: flex; gap: 10px; }

/* ───────────── 반응형 ───────────── */
@media (max-width: 720px) {
    .zc-nav__item span, .zc-nav__beta { display: none; }
    .zc-nav__item { padding: 8px 11px; }
    .zc-logo__text { display: none; }
    .zc-field-row { grid-template-columns: 1fr; }
    .zc-rcta, .zc-form__actions { flex-direction: column; }
}
@media (max-width: 420px) {
    .zc-main { padding: 22px 14px 44px; }
    .zc-calc__body { padding: 18px; }
}
