/* =========================================================
   信 Premium — 소장 작성 도우미
   Design system: Ink navy + Hanji ivory + Injoo (인주) red
   Type: Pretendard / Noto Serif KR / Cormorant Garamond
   ========================================================= */

@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css");

/* ===== CSS 변수 ===== */
:root {
    /* Ink palette */
    --ink-900: #0B1220;
    --ink-800: #14203A;
    --ink-700: #1F2D4D;
    --ink-600: #334155;
    --ink-500: #4B5A78;
    --ink-400: #7A8AA8;
    --ink-300: #B7C0D1;
    --ink-200: #DFE3EC;
    --ink-100: #ECEFF5;

    /* Hanji (paper) palette — warm ivory */
    --paper-50:  #FBF8F2;
    --paper-100: #F6F1E7;
    --paper-200: #ECE3CF;
    --paper-300: #D9CCAA;
    --paper-line: #E8DFC9;

    /* Injoo (인주) — Korean seal red */
    --injoo-700: #8E1B22;
    --injoo-600: #B0252C;
    --injoo-500: #C8333A;
    --injoo-100: #F8E5E5;

    /* Brass / gold accent (subtle) */
    --gold-600: #8B7338;
    --gold-500: #B89858;

    /* Semantic */
    --text-primary:   var(--ink-900);
    --text-secondary: var(--ink-500);
    --text-muted:     var(--ink-400);
    --bg-canvas:      var(--paper-50);
    --bg-card:        #FFFFFF;
    --bg-soft:        var(--paper-100);
    --border:         var(--paper-200);
    --border-strong:  var(--paper-300);
    --accent:         var(--injoo-600);
    --accent-soft:    var(--injoo-100);

    /* Radii */
    --r-sm: 4px;
    --r-md: 8px;
    --r-lg: 14px;
    --r-xl: 22px;

    /* Shadows */
    --shadow-1: 0 1px 2px rgba(11,18,32,0.04), 0 1px 1px rgba(11,18,32,0.03);
    --shadow-2: 0 6px 24px -8px rgba(11,18,32,0.12), 0 2px 6px rgba(11,18,32,0.04);
    --shadow-3: 0 22px 50px -18px rgba(11,18,32,0.28), 0 6px 16px rgba(11,18,32,0.08);

    /* Type scale */
    --font-sans: 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-serif-kr: 'Noto Serif KR', 'MaruBuri', 'Nanum Myeongjo', serif;
    --font-serif-en: 'Cormorant Garamond', 'Times New Roman', serif;
}

/* ===== Reset ===== */
*,
*::before,
*::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-sans);
    color: var(--text-primary);
    line-height: 1.65;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    background-color: var(--bg-canvas);
    background-image:
        radial-gradient(ellipse at 0% 0%, rgba(184,152,88,0.06), transparent 55%),
        radial-gradient(ellipse at 100% 0%, rgba(176,37,44,0.04), transparent 50%),
        url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220' viewBox='0 0 220 220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' seed='3'/><feColorMatrix values='0 0 0 0 0.45  0 0 0 0 0.4  0 0 0 0 0.3  0 0 0 0.06 0'/></filter><rect width='220' height='220' filter='url(%23n)'/></svg>");
    background-attachment: fixed;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, textarea { font-family: inherit; }

/* ===== 信 글자 (인장 톤) ===== */
.hanja-shin {
    font-family: var(--font-serif-kr);
    font-weight: 700;
    font-style: normal;
    display: inline-block;
    color: var(--injoo-600);
    line-height: 1;
    letter-spacing: 0;
    position: relative;
    top: 0.04em;
}

/* ============================================
   HEADER  ── 인장 + 미니멀 타이포 ──
   ============================================ */
.header {
    background: rgba(251, 248, 242, 0.85);
    backdrop-filter: saturate(140%) blur(10px);
    -webkit-backdrop-filter: saturate(140%) blur(10px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.85rem 1.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    transition: opacity 0.2s;
    padding: 0.35rem;
    margin: -0.35rem;
    border-radius: var(--r-md);
}
.header-left:hover { opacity: 0.78; }

/* 信 인장 (header) */
.brand-seal {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    background: var(--injoo-600);
    color: #FBF1E8;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-serif-kr);
    font-weight: 900;
    font-size: 1.45rem;
    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,0.18),
        inset 0 0 8px rgba(0,0,0,0.18),
        0 1px 1px rgba(11,18,32,0.18);
    position: relative;
    line-height: 1;
    padding-bottom: 2px;
}
.brand-seal::after {
    /* paper-press shadow */
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 4px;
    box-shadow: 0 0 0 0.5px rgba(142, 27, 34, 0.35);
    pointer-events: none;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    gap: 1px;
    white-space: nowrap;
}
.brand-name {
    font-family: var(--font-serif-kr);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--ink-900);
    letter-spacing: -0.01em;
}
.brand-name .firm-prefix {
    font-family: var(--font-sans);
    font-weight: 500;
    font-size: 0.78rem;
    color: var(--ink-500);
    margin-right: 0.35em;
    letter-spacing: 0.04em;
}
.brand-name .lawyer-name {
    font-family: var(--font-sans);
    font-weight: 500;
    font-size: 0.76rem;
    color: var(--ink-500);
    margin-left: 0.55em;
    letter-spacing: 0.01em;
    padding-left: 0.55em;
    border-left: 1px solid var(--paper-300);
}
.brand-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.7rem;
    color: var(--ink-500);
    font-weight: 500;
    letter-spacing: 0.04em;
}
.brand-meta .divider {
    width: 2px;
    height: 2px;
    border-radius: 50%;
    background: var(--ink-300);
}
.brand-meta .en {
    font-family: var(--font-serif-en);
    font-style: italic;
    font-weight: 500;
    font-size: 0.78rem;
    color: var(--ink-600);
    letter-spacing: 0.02em;
}

.header-tools {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.browser-tip {
    color: var(--ink-500);
    font-size: 0.95rem;
    background: transparent;
    border: 1px solid transparent;
    padding: 0.5rem 0.65rem;
    cursor: pointer;
    transition: all 0.18s;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border-radius: var(--r-sm);
    font-size: 0.78rem;
    font-weight: 500;
}
.browser-tip:hover {
    border-color: var(--border-strong);
    color: var(--ink-900);
    background: rgba(255,255,255,0.6);
}
.browser-tip span { white-space: nowrap; }
.browser-tip i { font-size: 0.85rem; color: var(--accent); }

/* ============================================
   MAIN
   ============================================ */
.main-content {
    flex: 1;
    width: 100%;
    max-width: 980px;
    margin: 0 auto;
    padding: 3rem 1.75rem 4rem;
}

/* ===== Page Header (출판물 격조) ===== */
.page-header {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}
.page-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-serif-en);
    font-style: italic;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--ink-500);
    letter-spacing: 0.08em;
    margin-bottom: 1rem;
    text-transform: lowercase;
}
.page-eyebrow::before,
.page-eyebrow::after {
    content: '';
    width: 28px;
    height: 1px;
    background: var(--ink-300);
}
.page-title {
    font-family: var(--font-serif-kr);
    font-size: clamp(2rem, 4vw, 2.6rem);
    font-weight: 600;
    color: var(--ink-900);
    line-height: 1.25;
    letter-spacing: -0.02em;
    margin-bottom: 0.85rem;
}
.page-title .accent-stroke {
    color: var(--injoo-600);
    font-style: normal;
}
.page-icon { display: none; } /* 아이콘 대신 타이포로 격조 */
.page-description {
    font-size: 0.98rem;
    color: var(--ink-500);
    max-width: 540px;
    margin: 0 auto;
    line-height: 1.7;
    font-weight: 400;
}

/* ============================================
   PROGRESS  ── 동양적 필획 라인 ──
   ============================================ */
.progress-container {
    margin: 0 auto 2.5rem;
    max-width: 720px;
}
.progress-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    position: relative;
    padding: 0 0.5rem;
}
.progress-steps::before {
    content: '';
    position: absolute;
    top: 18px;
    left: 12%;
    right: 12%;
    height: 1px;
    background: var(--paper-300);
    z-index: 0;
}
.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.65rem;
    background: transparent;
    position: relative;
    z-index: 1;
}
.progress-step-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-canvas);
    border: 1px solid var(--paper-300);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-serif-kr);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--ink-400);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.progress-step.active .progress-step-circle {
    background: var(--ink-900);
    color: #fff;
    border-color: var(--ink-900);
    box-shadow:
        0 0 0 4px var(--bg-canvas),
        0 0 0 5px var(--injoo-600);
    transform: scale(1.04);
}
.progress-step.completed .progress-step-circle {
    background: var(--injoo-600);
    color: #fff;
    border-color: var(--injoo-600);
}
.progress-step.completed .progress-step-circle::before {
    content: '';
    width: 10px;
    height: 6px;
    border-left: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(-45deg) translate(1px, -1px);
}
.progress-step.completed .progress-step-circle .step-num { display: none; }
.progress-step-label {
    font-size: 0.78rem;
    color: var(--ink-500);
    text-align: center;
    font-weight: 500;
    letter-spacing: 0.02em;
    white-space: nowrap;
    width: 100%;
}
.progress-step.active .progress-step-label {
    color: var(--ink-900);
    font-weight: 700;
}

/* ============================================
   WARNING / NOTICE
   ============================================ */
.warning-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 3px solid var(--injoo-600);
    border-radius: var(--r-md);
    padding: 0.95rem 1.15rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: start;
    gap: 0.85rem;
    box-shadow: var(--shadow-1);
}
.warning-box i {
    color: var(--injoo-600);
    font-size: 0.95rem;
    margin-top: 0.2rem;
    flex-shrink: 0;
}
.warning-box-title {
    font-family: var(--font-serif-kr);
    font-weight: 600;
    color: var(--ink-900);
    margin-bottom: 0.15rem;
    font-size: 0.92rem;
    letter-spacing: -0.01em;
}
.warning-box-text {
    font-size: 0.84rem;
    color: var(--ink-500);
    line-height: 1.6;
}

/* ============================================
   CARD
   ============================================ */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 2.5rem 2.25rem;
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-2);
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}
/* paper edge shimmer */
.card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(184,152,88,0.5), transparent);
    opacity: 0.6;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.85rem;
    padding-bottom: 1.15rem;
    border-bottom: 1px solid var(--border);
}
.card-header-left {
    display: flex;
    align-items: baseline;
    gap: 0.85rem;
}
.card-header .step-tag {
    font-family: var(--font-serif-en);
    font-style: italic;
    font-weight: 500;
    color: var(--injoo-600);
    font-size: 0.92rem;
    letter-spacing: 0.04em;
}
.card-header h3 {
    font-family: var(--font-serif-kr);
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--ink-900);
    letter-spacing: -0.015em;
}
.card-header i {
    color: var(--ink-400);
    font-size: 1.1rem;
}

/* Step Content */
.step-content { display: none; }
.step-content.active {
    display: block;
    animation: fadeUp 0.45s cubic-bezier(0.2, 0.7, 0.2, 1);
}
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ============================================
   STEP 1 — 소송 종류
   ============================================ */
.lawsuit-types {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}
.lawsuit-type-button {
    padding: 1.6rem 1.1rem 1.4rem;
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    background: var(--bg-card);
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: left;
    position: relative;
    overflow: hidden;
}
.lawsuit-type-button::before {
    /* serif numbering — 一 二 三 */
    content: attr(data-num);
    position: absolute;
    top: 12px;
    right: 14px;
    font-family: var(--font-serif-kr);
    color: var(--paper-300);
    font-size: 1.4rem;
    line-height: 1;
    transition: color 0.2s;
}
.lawsuit-type-button:hover {
    border-color: var(--ink-700);
    transform: translateY(-2px);
    box-shadow: var(--shadow-2);
}
.lawsuit-type-button:hover::before { color: var(--ink-400); }
.lawsuit-type-button.selected {
    border-color: var(--ink-900);
    background: var(--ink-900);
    color: #fff;
    box-shadow: var(--shadow-3);
}
.lawsuit-type-button.selected::before {
    color: var(--injoo-500);
}
.lawsuit-type-button.selected .lawsuit-type-title { color: #fff; }
.lawsuit-type-button.selected .lawsuit-type-desc  { color: rgba(255,255,255,0.65); }
.lawsuit-type-title {
    font-family: var(--font-serif-kr);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--ink-900);
    margin-bottom: 0.4rem;
    letter-spacing: -0.01em;
}
.lawsuit-type-desc {
    font-size: 0.82rem;
    color: var(--ink-500);
    line-height: 1.55;
}

/* ============================================
   PARTY / FORMS
   ============================================ */
.party-section { margin-bottom: 2rem; }
.party-section + .party-section { margin-top: 0.5rem; }

.party-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px dashed var(--border-strong);
}
.party-title {
    font-family: var(--font-serif-kr);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--ink-900);
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.party-title::before {
    content: '';
    width: 4px;
    height: 14px;
    background: var(--injoo-600);
    display: inline-block;
}

.add-party-button {
    padding: 0.5rem 0.95rem;
    background: transparent;
    color: var(--ink-700);
    border: 1px solid var(--border-strong);
    border-radius: var(--r-sm);
    font-size: 0.82rem;
    font-weight: 500;
    transition: all 0.18s;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}
.add-party-button:hover {
    background: var(--ink-900);
    color: #fff;
    border-color: var(--ink-900);
}
.add-party-button i { font-size: 0.7rem; }

.party-item {
    background: var(--paper-50);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 1.1rem 1.15rem;
    margin-bottom: 0.85rem;
    display: flex;
    gap: 0.85rem;
    align-items: start;
    transition: border-color 0.18s;
}
.party-item:hover { border-color: var(--border-strong); }

.party-input-group {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 0.85rem;
}

.input-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.input-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--ink-700);
    letter-spacing: 0.02em;
}
.input-field {
    padding: 0.75rem 0.95rem;
    border: 1px solid var(--border-strong);
    border-radius: var(--r-sm);
    font-size: 0.95rem;
    color: var(--ink-900);
    background-color: #fff;
    transition: all 0.18s;
}
.input-field:focus {
    outline: none;
    border-color: var(--ink-900);
    box-shadow: 0 0 0 3px rgba(11,18,32,0.08);
}
.input-field::placeholder {
    color: var(--ink-400);
    font-weight: 400;
}

.remove-party-button {
    padding: 0.5rem 0.55rem;
    background: transparent;
    color: var(--ink-400);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    transition: all 0.18s;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin-top: 1.25rem;
}
.remove-party-button:hover {
    color: var(--injoo-600);
    border-color: var(--injoo-600);
    background: var(--injoo-100);
}
.remove-party-button i { font-size: 0.7rem; }

/* ============================================
   STEP 3 — 작성 모드 카드
   ============================================ */
.mode-selection {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.15rem;
    margin-bottom: 1.5rem;
}
.mode-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 1.65rem 1.5rem;
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}
.mode-card::after {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 64px;
    height: 64px;
    background: radial-gradient(circle at top right, rgba(176,37,44,0.07), transparent 65%);
    opacity: 0;
    transition: opacity 0.25s;
    pointer-events: none;
}
.mode-card:hover {
    border-color: var(--ink-700);
    transform: translateY(-2px);
    box-shadow: var(--shadow-2);
}
.mode-card:hover::after { opacity: 1; }
.mode-card.selected {
    border-color: var(--ink-900);
    background: var(--ink-900);
    color: #fff;
    box-shadow: var(--shadow-3);
}
.mode-card.selected .mode-title { color: #fff; }
.mode-card.selected .mode-title i { color: var(--injoo-500); }
.mode-card.selected .mode-description { color: rgba(255,255,255,0.7); }
.mode-card.selected .mode-features li { color: rgba(255,255,255,0.7); }
.mode-card.selected .mode-features li::before { color: var(--injoo-500); }

.mode-title {
    font-family: var(--font-serif-kr);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--ink-900);
    margin-bottom: 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    letter-spacing: -0.01em;
}
.mode-title i {
    color: var(--injoo-600);
    font-size: 1rem;
}
.mode-description {
    font-size: 0.85rem;
    color: var(--ink-500);
    line-height: 1.6;
    margin-bottom: 1.05rem;
    padding-left: 1.7rem;
}
.mode-features {
    list-style: none;
    padding-left: 1.7rem;
}
.mode-features li {
    font-size: 0.82rem;
    color: var(--ink-500);
    padding: 0.18rem 0 0.18rem 1.1rem;
    position: relative;
}
.mode-features li::before {
    content: '・';
    position: absolute;
    left: 0;
    color: var(--injoo-600);
    font-weight: 700;
    font-size: 1rem;
    top: 0;
}

/* ============================================
   CHAT
   ============================================ */
.chat-container {
    background: var(--paper-50);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 1.4rem;
    height: 480px;
    display: flex;
    flex-direction: column;
    margin-bottom: 1rem;
}
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding-right: 0.5rem;
    margin-bottom: 1rem;
}
.chat-messages::-webkit-scrollbar { width: 6px; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--paper-300); border-radius: 3px; }

.chat-message {
    margin-bottom: 1rem;
    display: flex;
    gap: 0.65rem;
    animation: fadeUp 0.3s ease;
}
.chat-message.ai { justify-content: flex-start; }
.chat-message.user { justify-content: flex-end; }

.chat-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}
.chat-avatar.ai {
    background: var(--ink-900);
    color: #fff;
}
.chat-avatar.user {
    background: var(--injoo-600);
    color: #fff;
}

.chat-bubble {
    max-width: 72%;
    padding: 0.7rem 0.95rem;
    border-radius: var(--r-md);
    font-size: 0.9rem;
    line-height: 1.6;
}
.chat-bubble.ai {
    background: #fff;
    color: var(--ink-900);
    border: 1px solid var(--border);
    border-top-left-radius: 4px;
}
.chat-bubble.user {
    background: var(--ink-900);
    color: #fff;
    border-top-right-radius: 4px;
}

.chat-input-container {
    display: flex;
    gap: 0.6rem;
    background: #fff;
    border: 1px solid var(--border-strong);
    border-radius: var(--r-md);
    padding: 0.35rem 0.4rem 0.35rem 0.4rem;
    transition: border-color 0.18s;
}
.chat-input-container:focus-within { border-color: var(--ink-900); }
.chat-input {
    flex: 1;
    padding: 0.65rem 0.85rem;
    border: none;
    background: transparent;
    font-size: 0.92rem;
    color: var(--ink-900);
    outline: none;
}
.chat-send-button {
    padding: 0 1.15rem;
    background: var(--ink-900);
    color: #fff;
    border: none;
    border-radius: var(--r-sm);
    font-size: 0.85rem;
    font-weight: 500;
    transition: opacity 0.18s;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}
.chat-send-button:hover:not(:disabled) { opacity: 0.85; }
.chat-send-button:disabled { opacity: 0.4; cursor: not-allowed; }
.chat-send-button i { font-size: 0.78rem; }

.chat-thinking { display: flex; gap: 0.3rem; padding: 0.4rem; }
.chat-thinking span {
    width: 7px; height: 7px;
    background: var(--ink-400);
    border-radius: 50%;
    animation: thinking 1.4s infinite;
}
.chat-thinking span:nth-child(2) { animation-delay: 0.2s; }
.chat-thinking span:nth-child(3) { animation-delay: 0.4s; }
@keyframes thinking {
    0%, 80%, 100% { transform: scale(0.9); opacity: 0.4; }
    40% { transform: scale(1.15); opacity: 1; }
}

/* ============================================
   TEXTAREA — 직접 작성
   ============================================ */
.cause-textarea {
    width: 100%;
    padding: 1.15rem 1.25rem;
    border: 1px solid var(--border-strong);
    border-radius: var(--r-md);
    resize: vertical;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    color: var(--ink-900);
    background-color: #fff;
    line-height: 1.7;
    min-height: 280px;
    transition: all 0.18s;
}
.cause-textarea:focus {
    outline: none;
    border-color: var(--ink-900);
    box-shadow: 0 0 0 3px rgba(11,18,32,0.08);
}
.cause-textarea::placeholder {
    color: var(--ink-400);
}

.cause-examples {
    margin-top: 1rem;
    padding: 1.15rem 1.25rem;
    background: var(--paper-50);
    border: 1px solid var(--border);
    border-left: 3px solid var(--gold-500);
    border-radius: var(--r-sm);
    font-size: 0.85rem;
}
.cause-examples-title {
    font-family: var(--font-serif-kr);
    font-weight: 600;
    margin-bottom: 0.55rem;
    color: var(--ink-900);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.cause-examples-title i {
    color: var(--gold-600);
    font-size: 0.85rem;
}
.cause-examples-list {
    line-height: 1.85;
    color: var(--ink-500);
    font-size: 0.85rem;
}
.cause-examples-list strong {
    color: var(--ink-900);
    font-weight: 600;
}

/* ============================================
   NAV BUTTONS
   ============================================ */
.nav-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    gap: 0.85rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.nav-button {
    padding: 0.85rem 1.6rem;
    border-radius: var(--r-sm);
    font-size: 0.92rem;
    font-weight: 500;
    transition: all 0.18s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: 0.01em;
    border: 1px solid transparent;
}

.nav-button-prev {
    background: transparent;
    color: var(--ink-700);
    border-color: var(--border-strong);
}
.nav-button-prev:hover { background: var(--paper-100); color: var(--ink-900); }

.nav-button-next {
    background: var(--ink-900);
    color: #fff;
    border-color: var(--ink-900);
    margin-left: auto;
    position: relative;
}
.nav-button-next:hover:not(:disabled) {
    background: var(--ink-800);
    transform: translateX(2px);
}
.nav-button:disabled { opacity: 0.35; cursor: not-allowed; }
.nav-button i { font-size: 0.78rem; }

/* ============================================
   GENERATE — Hero CTA
   ============================================ */
.generate-screen {
    text-align: center;
    padding: 1rem 0 2rem;
}
.generate-screen .seal-large {
    width: 70px;
    height: 70px;
    margin: 0 auto 1.5rem;
    background: var(--injoo-600);
    color: #FBF1E8;
    font-family: var(--font-serif-kr);
    font-weight: 900;
    font-size: 2.6rem;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding-bottom: 4px;
    box-shadow:
        inset 0 0 0 2px rgba(255,255,255,0.18),
        inset 0 0 14px rgba(0,0,0,0.22),
        0 8px 24px -8px rgba(176,37,44,0.45);
    transform: rotate(-3deg);
    position: relative;
}
.generate-screen h4 {
    font-family: var(--font-serif-kr);
    font-size: 1.55rem;
    font-weight: 600;
    color: var(--ink-900);
    margin-bottom: 0.65rem;
    letter-spacing: -0.015em;
}
.generate-screen p {
    font-size: 0.95rem;
    color: var(--ink-500);
    line-height: 1.75;
    margin-bottom: 2rem;
    max-width: 460px;
    margin-left: auto;
    margin-right: auto;
}

.generate-button {
    padding: 1rem 2.5rem;
    background: var(--ink-900);
    color: #fff;
    border: none;
    border-radius: var(--r-sm);
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    letter-spacing: 0.01em;
    box-shadow: 0 6px 20px -6px rgba(11,18,32,0.45);
    position: relative;
    overflow: hidden;
}
.generate-button::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,0.12), transparent);
    transform: translateX(-100%);
    transition: transform 0.7s;
}
.generate-button:hover:not(:disabled)::before { transform: translateX(100%); }
.generate-button:hover:not(:disabled) { transform: translateY(-1px); }
.generate-button:disabled { opacity: 0.5; cursor: not-allowed; }
.generate-button i { color: var(--injoo-500); }

/* spinner */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.25);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.85s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================
   RESULT
   ============================================ */
.result-section {
    margin-top: 2rem;
    background: var(--paper-50);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 1.5rem;
}
.result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.2rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px dashed var(--border-strong);
}
.result-label {
    font-family: var(--font-serif-kr);
    font-size: 1rem;
    font-weight: 600;
    color: var(--ink-900);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.result-label::before {
    content: '草';
    font-family: var(--font-serif-kr);
    color: var(--injoo-600);
    font-weight: 700;
}

#fullLawsuit.result-content {
    font-family: 'Batang', '바탕', var(--font-serif-kr), serif !important;
    font-size: 0.95rem !important;
    line-height: 2 !important;
    white-space: pre-line;
    text-align: left;
    padding: 3rem 3.5rem !important;
    background: #fff !important;
    border: 1px solid var(--border) !important;
    min-height: 800px;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    box-shadow: 0 8px 30px -10px rgba(11,18,32,0.18) !important;
    border-radius: var(--r-sm);
    color: var(--ink-900);
    position: relative;
}

.result-buttons {
    display: flex;
    justify-content: space-between;
    gap: 0.85rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.copy-button {
    padding: 0.7rem 1.4rem;
    background: var(--ink-900);
    border: 1px solid var(--ink-900);
    border-radius: var(--r-sm);
    font-size: 0.88rem;
    color: #fff;
    transition: all 0.18s;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-weight: 500;
    margin-left: auto;
}
.copy-button:hover { background: var(--ink-800); }
.copy-button.copied {
    background: var(--injoo-600);
    border-color: var(--injoo-600);
}

/* Modify */
.modify-container {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 1.75rem 1.85rem;
    margin-top: 1.5rem;
}
.modify-title {
    font-family: var(--font-serif-kr);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--ink-900);
    margin-bottom: 0.4rem;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    letter-spacing: -0.01em;
}
.modify-title i { color: var(--injoo-600); font-size: 0.9rem; }
.modify-description {
    font-size: 0.85rem;
    color: var(--ink-500);
    margin-bottom: 1rem;
    line-height: 1.6;
}
.modify-textarea {
    width: 100%;
    padding: 0.95rem 1.1rem;
    border: 1px solid var(--border-strong);
    border-radius: var(--r-sm);
    resize: vertical;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    color: var(--ink-900);
    background-color: var(--paper-50);
    line-height: 1.65;
    min-height: 130px;
    transition: all 0.18s;
}
.modify-textarea:focus {
    outline: none;
    background-color: #fff;
    border-color: var(--ink-900);
    box-shadow: 0 0 0 3px rgba(11,18,32,0.08);
}

.modify-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 0.6rem;
    margin-top: 1rem;
}
.cancel-modify-button {
    padding: 0.65rem 1.15rem;
    background: transparent;
    color: var(--ink-700);
    border: 1px solid var(--border-strong);
    border-radius: var(--r-sm);
    font-size: 0.85rem;
    transition: all 0.18s;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 500;
}
.cancel-modify-button:hover { background: var(--paper-100); }
.apply-modify-button {
    padding: 0.65rem 1.4rem;
    background: var(--ink-900);
    color: #fff;
    border: none;
    border-radius: var(--r-sm);
    font-size: 0.85rem;
    transition: opacity 0.18s;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-weight: 500;
}
.apply-modify-button:hover:not(:disabled) { background: var(--ink-800); }
.apply-modify-button:disabled { opacity: 0.5; cursor: not-allowed; }

/* Error */
.error-message {
    background: var(--injoo-100);
    border: 1px solid #F0CACA;
    border-radius: var(--r-sm);
    padding: 0.85rem 1rem;
    color: var(--injoo-700);
    font-size: 0.86rem;
    margin-top: 1rem;
    display: flex;
    align-items: center;
    gap: 0.55rem;
}
.error-message i { font-size: 0.95rem; flex-shrink: 0; }

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: transparent;
    border-top: 1px solid var(--border);
    padding: 2rem 0 1.5rem;
    margin-top: auto;
}
.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.75rem;
    text-align: center;
}
.footer-links {
    display: inline-flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}
.footer-links a {
    color: var(--ink-500);
    font-size: 0.85rem;
    font-weight: 500;
    transition: color 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    letter-spacing: 0.01em;
}
.footer-links a:hover { color: var(--injoo-600); }
.footer-links a i { font-size: 0.78rem; color: var(--ink-400); transition: color 0.15s; }
.footer-links a:hover i { color: var(--injoo-600); }

.footer-copyright {
    color: var(--ink-400);
    font-size: 0.72rem;
    line-height: 1.7;
    max-width: 720px;
    margin: 0 auto;
}

/* ============================================
   LAWYER BANNER (FAB)
   ============================================ */
.lawyer-banner {
    position: fixed;
    bottom: 22px;
    right: 22px;
    background: var(--ink-900);
    padding: 10px 14px 10px 12px;
    border-radius: 999px;
    box-shadow: 0 14px 30px -10px rgba(11,18,32,0.45);
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 50;
    border: 1px solid rgba(255,255,255,0.08);
}
.lawyer-banner:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px -10px rgba(11,18,32,0.55);
}
.lawyer-icon-box {
    width: 32px;
    height: 32px;
    background: var(--injoo-600);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.9rem;
    flex-shrink: 0;
}
.lawyer-text-box {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
    padding-right: 4px;
    white-space: nowrap;
}
.lawyer-title {
    font-size: 0.78rem;
    font-weight: 600;
    color: #fff;
    letter-spacing: -0.005em;
}
.lawyer-subtitle {
    font-size: 0.65rem;
    color: rgba(255,255,255,0.65);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 3px;
}
.lawyer-subtitle::after {
    content: '→';
    font-size: 0.85em;
    transition: transform 0.2s;
}
.lawyer-banner:hover .lawyer-subtitle::after { transform: translateX(3px); }

/* ============================================
   MODALS
   ============================================ */
.success-modal,
.home-guide-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(11,18,32,0.55);
    backdrop-filter: blur(4px);
    z-index: 3000;
    animation: fadeIn 0.22s ease;
}
.success-modal.show,
.home-guide-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.96) translateY(8px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.success-modal-content {
    background: #fff;
    border-radius: var(--r-md);
    padding: 2.25rem 2rem;
    text-align: center;
    box-shadow: var(--shadow-3);
    animation: scaleIn 0.25s cubic-bezier(0.4,0,0.2,1);
    max-width: 320px;
}
.success-icon {
    font-size: 2.5rem;
    color: var(--injoo-600);
    margin-bottom: 0.85rem;
}
.success-title {
    font-family: var(--font-serif-kr);
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--ink-900);
    margin-bottom: 0.35rem;
}
.success-message {
    font-size: 0.88rem;
    color: var(--ink-500);
}

.home-guide-content {
    background: #fff;
    border-radius: var(--r-md);
    padding: 1.5rem 1.5rem 1.5rem;
    padding-top: 4.25rem;
    max-width: 400px;
    width: 100%;
    box-shadow: var(--shadow-3);
    position: relative;
    animation: scaleIn 0.25s cubic-bezier(0.4,0,0.2,1);
}
.service-link-copy {
    position: absolute;
    top: 14px;
    left: 16px;
    right: 50px;
    background: var(--ink-900);
    border: none;
    border-radius: var(--r-sm);
    padding: 9px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: opacity 0.18s;
    font-size: 12px;
    color: #fff;
    font-weight: 500;
}
.service-link-copy:hover { opacity: 0.88; }
.service-link-copy.copied { background: var(--injoo-600); }
.service-link-copy strong { font-weight: 700; }

.guide-header { text-align: center; margin-bottom: 18px; }
.guide-header h3 {
    font-family: var(--font-serif-kr);
    font-size: 1.15rem;
    color: var(--ink-900);
    margin-bottom: 5px;
    font-weight: 600;
    line-height: 1.45;
    padding: 0 30px;
}
.guide-header p {
    color: var(--ink-500);
    font-size: 13px;
}

.guide-close {
    position: absolute;
    top: 14px;
    right: 14px;
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: var(--ink-400);
    transition: all 0.2s;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}
.guide-close:hover { background: var(--paper-100); color: var(--ink-900); }

.browser-section {
    margin-bottom: 12px;
    padding: 11px 13px;
    background: var(--paper-50);
    border-radius: var(--r-sm);
    border: 1px solid var(--border);
}
.browser-section h4 {
    font-size: 13px;
    color: var(--ink-900);
    margin-bottom: 7px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}
.browser-icon {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.samsung-icon {
    background: #1428A0;
    color: white;
    border-radius: 50%;
    font-size: 10px;
    font-weight: bold;
}
.guide-steps { list-style: none; }
.guide-steps li {
    font-size: 12px;
    color: var(--ink-500);
    padding: 2px 0;
    padding-left: 14px;
    position: relative;
}
.guide-steps li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 9px;
    width: 3px;
    height: 3px;
    background: var(--injoo-600);
    border-radius: 50%;
}
.guide-footer {
    text-align: center;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}
.guide-benefit {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--injoo-600);
    font-size: 12px;
    font-weight: 600;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .main-content { padding: 1.75rem 1rem 3rem; }
    .header-container { padding: 0.65rem 1rem; }
    .brand-meta .en { display: none; }
    .browser-tip span { display: none; }

    .page-title { font-size: 1.6rem; }
    .page-description { font-size: 0.88rem; }
    .page-eyebrow { font-size: 0.82rem; }
    .page-eyebrow::before, .page-eyebrow::after { width: 18px; }

    .card { padding: 1.5rem 1.15rem; border-radius: var(--r-md); }
    .card-header h3 { font-size: 1.1rem; }
    .card-header { flex-wrap: wrap; }

    .lawsuit-types { grid-template-columns: repeat(3, 1fr); gap: 0.55rem; }
    .lawsuit-type-button { padding: 1rem 0.55rem; }
    .lawsuit-type-button::before { font-size: 1rem; top: 6px; right: 8px; }
    .lawsuit-type-title { font-size: 0.92rem; margin-bottom: 0; }
    .lawsuit-type-desc { display: none; }

    .party-input-group { grid-template-columns: 1fr; }
    .party-item { padding: 0.95rem; }
    .input-field { font-size: 16px; padding: 0.7rem 0.85rem; }

    .progress-step-circle { width: 30px; height: 30px; font-size: 0.85rem; }
    .progress-steps::before { top: 15px; }
    .progress-step-label { font-size: 0.7rem; }

    .mode-selection { grid-template-columns: 1fr; gap: 0.85rem; }

    .chat-container { height: 420px; padding: 1rem; }
    .chat-bubble { max-width: 86%; font-size: 0.88rem; }
    .chat-input { font-size: 16px; }

    .cause-textarea { font-size: 16px; padding: 1rem; }
    .modify-textarea { font-size: 16px; }

    .footer-links { gap: 1.5rem; }

    .result-buttons { flex-direction: column; gap: 0.55rem; }
    .result-buttons button { width: 100%; justify-content: center; margin-left: 0 !important; }

    #fullLawsuit.result-content {
        padding: 1.5rem 1.25rem !important;
        font-size: 0.88rem !important;
        min-height: 600px !important;
    }

    .modify-buttons { flex-direction: column; gap: 0.55rem; }
    .modify-buttons button { width: 100%; justify-content: center; }

    .lawyer-banner { bottom: 16px; right: 16px; padding: 8px 12px 8px 10px; }
    .lawyer-icon-box { width: 28px; height: 28px; font-size: 0.78rem; }
    .lawyer-title { font-size: 0.72rem; }
    .lawyer-subtitle { font-size: 0.6rem; }

    .generate-screen .seal-large { width: 56px; height: 56px; font-size: 2.05rem; }
    .generate-screen h4 { font-size: 1.25rem; }
}

@media (max-width: 480px) {
    .page-title { font-size: 1.4rem; }
    .card { padding: 1.25rem 1rem; }
    .header-container { padding: 0.55rem 0.85rem; }
    .brand-seal { width: 32px; height: 32px; font-size: 1.2rem; }
    .brand-name { font-size: 0.95rem; }
    .brand-name .firm-prefix { font-size: 0.7rem; }
    .brand-meta { font-size: 0.65rem; }
}

/* ============================================
   PRINT
   ============================================ */
@media print {
    .header, .footer, .progress-container, .warning-box,
    .nav-buttons, .generate-button, .copy-button, .modify-container,
    .lawyer-banner, .home-guide-modal, .success-modal { display: none !important; }
    body { background: #fff; }
    .card { box-shadow: none; border: none; padding: 0; }
}

/* ============================================================
   사용량 배지 (印 인주도장 + 잔여 도트)
   ──────────────────────────────────────────────
   Gemini API 일일 한도 시스템 — 헌법 §12-A 표준 패턴
   정본: 2.계약서검토 (2026-05-23 도입). 묵향 폴백값 박힌 횡전개 버전.
   ⚠️ HTTP 헤더는 Latin-1 only (한글 금지). CSS는 무관.
   ============================================================ */
.usage-badge {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 14px 18px 14px 14px;
    background: var(--card, #FBF9F4);
    border: 1px solid var(--accent, #8B2520);
    border-radius: var(--radius-xs, 2px);
    box-shadow: var(--shadow-card, 0 1px 0 rgba(20,17,13,0.04), 0 8px 24px -12px rgba(20,17,13,0.10));
    font-family: var(--font-serif, 'Noto Serif KR', 'MaruBuri', serif);
    color: var(--ink-soft, #3A352D);
    transition: var(--transition, all 0.25s cubic-bezier(0.2, 0.7, 0.2, 1));
    background-image: linear-gradient(180deg, transparent 0%, rgba(20,17,13,0.015) 100%);
}
.usage-badge[hidden] { display: none !important; }

.usage-badge__stamp {
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent, #8B2520);
    color: var(--paper, #F4F1EA);
    border-radius: var(--radius-xs, 2px);
    transform: rotate(-3deg);
    box-shadow:
        inset 0 0 6px rgba(0, 0, 0, 0.22),
        inset 1px 1px 0 rgba(255, 255, 255, 0.08),
        0 2px 4px rgba(139, 37, 32, 0.28);
    position: relative;
}
.usage-badge__stamp::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: var(--radius-xs, 2px);
    background: var(--accent, #8B2520);
    opacity: 0.10;
    z-index: -1;
    filter: blur(2px);
}
.usage-badge__stamp-char {
    font-family: var(--font-serif, 'Noto Serif KR', serif);
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -1px;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.25);
}

.usage-badge__content {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 120px;
}
.usage-badge__label {
    font-size: 12px;
    color: var(--ink-mute, #6B6358);
    letter-spacing: 0.08em;
    font-weight: 500;
    margin-bottom: 1px;
}
.usage-badge__dots {
    display: flex;
    gap: 5px;
    margin: 2px 0 3px;
    flex-wrap: wrap;
    max-width: 180px;
}
.usage-badge__dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--accent, #8B2520);
    transition: background 0.4s ease, transform 0.3s ease;
}
.usage-badge__dot--used {
    background: var(--rule-soft, #DDD5C2);
}
.usage-badge__remaining {
    font-size: 13px;
    color: var(--ink-soft, #3A352D);
    line-height: 1.2;
}
.usage-badge__remaining strong {
    font-size: 20px;
    font-weight: 700;
    color: var(--accent, #8B2520);
    margin-right: 3px;
    font-variant-numeric: tabular-nums;
}
.usage-badge__reset {
    font-size: 10.5px;
    color: var(--ink-light, #9A8F80);
    letter-spacing: 0.04em;
    margin-top: 1px;
}

.usage-badge--critical .usage-badge__stamp {
    animation: usage-stamp-pulse 2.2s ease-in-out infinite;
}
.usage-badge--critical .usage-badge__dot:not(.usage-badge__dot--used) {
    background: var(--accent-deep, #6B1C18);
}
.usage-badge--critical .usage-badge__remaining strong {
    color: var(--accent-deep, #6B1C18);
}
@keyframes usage-stamp-pulse {
    0%, 100% { transform: rotate(-3deg) scale(1); }
    50%      { transform: rotate(-3deg) scale(1.06); }
}

.usage-badge--exhausted .usage-badge__stamp {
    opacity: 0.5;
    animation: none;
}
.usage-badge--exhausted .usage-badge__dot {
    background: var(--rule-soft, #DDD5C2);
}
.usage-badge--exhausted .usage-badge__remaining strong {
    color: var(--ink-light, #9A8F80);
}

.usage-badge--warn {
    border-color: var(--warning, #946A1F);
}
.usage-badge--warn .usage-badge__stamp {
    background: var(--warning, #946A1F);
}
.usage-badge--warn .usage-badge__stamp::after {
    background: var(--warning, #946A1F);
}

@media (max-width: 640px) {
    .usage-badge {
        top: 12px;
        right: 12px;
        padding: 10px 14px 10px 10px;
        gap: 10px;
    }
    .usage-badge__stamp {
        width: 38px;
        height: 38px;
    }
    .usage-badge__stamp-char {
        font-size: 19px;
    }
    .usage-badge__content {
        min-width: 100px;
    }
    .usage-badge__dot {
        width: 7px;
        height: 7px;
    }
    .usage-badge__remaining strong {
        font-size: 17px;
    }
}

@media print {
    .usage-badge { display: none !important; }
}

/* 초기화 버튼 — 복사 버튼과 시각 구분 위해 보조 톤 (2026-05-24) */
.copy-button.reset-button {
    background: transparent;
    color: var(--ink-700, #1F2D4D);
    border: 1px solid var(--ink-300, #B7C0D1);
    box-shadow: none;
}
.copy-button.reset-button:hover {
    background: var(--paper-100, #F6F1E7);
    border-color: var(--ink-500, #4B5A78);
    color: var(--ink-900, #0B1220);
}
