/* DEVDHLABS - Dark Austerity Design System */

/* Pretendard */
@font-face {
    font-family: 'Pretendard';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-Thin.woff2') format('woff2');
    font-weight: 100;
    font-display: swap;
}
@font-face {
    font-family: 'Pretendard';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-ExtraLight.woff2') format('woff2');
    font-weight: 200;
    font-display: swap;
}
@font-face {
    font-family: 'Pretendard';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-Light.woff2') format('woff2');
    font-weight: 300;
    font-display: swap;
}
@font-face {
    font-family: 'Pretendard';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-Regular.woff2') format('woff2');
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: 'Pretendard';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-Medium.woff2') format('woff2');
    font-weight: 500;
    font-display: swap;
}
@font-face {
    font-family: 'Pretendard';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-SemiBold.woff2') format('woff2');
    font-weight: 600;
    font-display: swap;
}
@font-face {
    font-family: 'Pretendard';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-Bold.woff2') format('woff2');
    font-weight: 700;
    font-display: swap;
}
@font-face {
    font-family: 'Pretendard';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-ExtraBold.woff2') format('woff2');
    font-weight: 800;
    font-display: swap;
}
@font-face {
    font-family: 'Pretendard';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-Black.woff2') format('woff2');
    font-weight: 900;
    font-display: swap;
}

/* Paperlogy: DESIGN.md uses the family name "Paperozi". */
@font-face {
    font-family: 'Paperozi';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/2408-3@1.0/Paperlogy-1Thin.woff2') format('woff2');
    font-weight: 100;
    font-display: swap;
}
@font-face {
    font-family: 'Paperozi';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/2408-3@1.0/Paperlogy-2ExtraLight.woff2') format('woff2');
    font-weight: 200;
    font-display: swap;
}
@font-face {
    font-family: 'Paperozi';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/2408-3@1.0/Paperlogy-3Light.woff2') format('woff2');
    font-weight: 300;
    font-display: swap;
}
@font-face {
    font-family: 'Paperozi';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/2408-3@1.0/Paperlogy-4Regular.woff2') format('woff2');
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: 'Paperozi';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/2408-3@1.0/Paperlogy-5Medium.woff2') format('woff2');
    font-weight: 500;
    font-display: swap;
}
@font-face {
    font-family: 'Paperozi';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/2408-3@1.0/Paperlogy-6SemiBold.woff2') format('woff2');
    font-weight: 600;
    font-display: swap;
}
@font-face {
    font-family: 'Paperozi';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/2408-3@1.0/Paperlogy-7Bold.woff2') format('woff2');
    font-weight: 700;
    font-display: swap;
}
@font-face {
    font-family: 'Paperozi';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/2408-3@1.0/Paperlogy-8ExtraBold.woff2') format('woff2');
    font-weight: 800;
    font-display: swap;
}
@font-face {
    font-family: 'Paperozi';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/2408-3@1.0/Paperlogy-9Black.woff2') format('woff2');
    font-weight: 900;
    font-display: swap;
}

@font-face {
    font-family: 'ChosunIlboMyungjo';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_one@1.0/Chosunilbo_myungjo.woff') format('woff');
    font-weight: 400;
    font-display: swap;
}

:root {
    --bg-app: #000000;
    --bg-topbar: #000000;
    --bg-panel: #0a0a0a;
    --bg-card: #0a0a0a;
    --bg-input: #ffffff;
    --bg-dark: var(--bg-app);
    
    --text-primary: #ffffff;
    --text-secondary: #f0f0fa;
    --text-muted: #b8b8c2;
    
    --accent: #ffffff;
    --accent-hover: #f0f0fa;
    --accent-light: rgba(255, 255, 255, 0.1);
    
    --doc-accent: #000000;
    
    --emerald: #10b981;
    --emerald-hover: #059669;
    --danger: #f43f5e;
    --danger-light: rgba(244, 63, 94, 0.1);
    --success: #10b981;
    
    --border: #3a3a3f;
    --border-strong: #5a5a5f;
    
    /* Layout Variables */
    --sidebar-width: 440px;
    --topbar-height: 56px;
    --font-sans: 'Pretendard', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --radius-xl: 16px;
    
    --transition: 0.15s ease-out;
    --transition-speed: 0.15s;
    --shadow-sm: none;
    --shadow-md: none;
}

/* Light Mode Variables - Pure White & Rich Black High Contrast Monochrome */
body.light-mode,
body.light-theme {
    --bg-app: #f0f0fa;
    --bg-topbar: #ffffff;
    --bg-panel: #ffffff;
    --bg-card: #ffffff;
    --bg-input: #ffffff;
    --bg-dark: var(--bg-app);
    
    --text-primary: #000000;
    --text-secondary: #343943;
    --text-muted: #5a5a5f;
    
    --accent: #000000;
    --accent-hover: #343943;
    --accent-light: rgba(0, 0, 0, 0.06);
    
    --border: #e0e0e8;
    --border-strong: #000000;
    --shadow-sm: none;
    --shadow-md: none;
}

/* Reset and Global Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-app);
    color: var(--text-primary);
    overflow: hidden;
    height: 100vh;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* App Container Layout */
.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
}

/* Topbar Navigation */
.app-topbar {
    height: var(--topbar-height);
    background-color: var(--bg-topbar);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 50;
    flex-shrink: 0;
}

.brand-zone {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-symbol {
    width: 32px;
    height: 32px;
    background: #0f172a;
    color: #ffffff;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 13px;
    letter-spacing: -0.5px;
}

body.light-theme .brand-symbol {
    background: #0f172a;
    color: #ffffff;
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-weight: 700;
    font-size: 14px;
    letter-spacing: -0.3px;
    color: var(--text-primary);
}

.brand-sub {
    font-size: 10px;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.topbar-center {
    display: flex;
    align-items: center;
}

.auto-save-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-secondary);
    background: var(--bg-card);
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid var(--border);
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
}
.status-dot.green {
    background-color: var(--emerald);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.theme-accent-selector {
    display: flex;
    align-items: center;
    gap: 6px;
}

.accent-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform var(--transition);
}

.accent-dot:hover {
    transform: scale(1.15);
}

.accent-dot.active {
    border-color: #ffffff;
    box-shadow: 0 0 0 1px var(--border-strong);
}

.divider {
    width: 1px;
    height: 20px;
    background-color: var(--border);
}

.topbar-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-primary);
    width: 34px;
    height: 34px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition);
}

.topbar-btn:hover {
    background: var(--bg-card);
    border-color: var(--border-strong);
}

/* Main Workspace */
.main-workspace {
    display: flex;
    flex: 1;
    height: calc(100vh - var(--topbar-height));
    overflow: hidden;
}

/* Sidebar Editor Panel */
.editor-panel {
    width: var(--sidebar-width);
    background-color: var(--bg-panel);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    height: 100%;
}

.panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.panel-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: var(--bg-card);
    padding: 16px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.card-actions {
    display: flex;
    flex-direction: row;
    gap: 8px;
    padding: 12px;
}

.section-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.section-title .lucide {
    color: var(--accent);
    width: 14px;
    height: 14px;
}

.lucide {
    width: 15px;
    height: 15px;
    stroke-width: 2px;
    vertical-align: -0.15em;
}

/* Form Control Styling */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.col-span-2 {
    grid-column: span 2;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-group label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
}

input[type="text"],
input[type="number"],
input[type="date"],
input[type="email"],
input[type="password"],
select,
textarea {
    width: 100%;
    background-color: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 8px 10px;
    font-size: 12.5px;
    border-radius: var(--radius-md);
    font-family: var(--font-sans);
    transition: all var(--transition);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-light);
}

select option {
    background-color: var(--bg-panel);
    color: var(--text-primary);
}

input::placeholder,
textarea::placeholder {
    color: var(--text-muted);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 12.5px;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: var(--radius-md);
    cursor: pointer;
    border: 1px solid transparent;
    transition: all var(--transition);
    font-family: var(--font-sans);
}

.btn-emerald {
    background-color: var(--emerald);
    color: #ffffff;
}
.btn-emerald:hover {
    background-color: var(--emerald-hover);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.btn-secondary-sm {
    flex: 1;
    background-color: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text-primary);
    font-size: 12px;
    padding: 7px 10px;
}
.btn-secondary-sm:hover {
    background-color: var(--bg-panel);
    border-color: var(--border-strong);
}

.btn-danger-outline-sm {
    background-color: transparent;
    border: 1px solid rgba(244, 63, 94, 0.3);
    color: var(--danger);
    font-size: 12px;
    padding: 7px 10px;
}
.btn-danger-outline-sm:hover {
    background-color: var(--danger-light);
}

.btn-primary-sm {
    background-color: var(--accent);
    color: #ffffff;
    font-size: 11px;
    padding: 5px 10px;
}
.btn-primary-sm:hover {
    background-color: var(--accent-hover);
}

.btn-icon-link {
    background: none;
    border: none;
    color: var(--accent);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Custom Toggle Group */
.toggle-group {
    display: flex;
    background-color: var(--bg-input);
    padding: 3px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.toggle-group input[type="radio"] {
    display: none;
}

.toggle-btn {
    flex: 1;
    text-align: center;
    padding: 7px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

.toggle-group input[type="radio"]:checked + .toggle-btn {
    background-color: var(--accent);
    color: #ffffff;
}

/* Work Item Items Table Editor */
.items-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.item-row {
    background-color: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
}

.item-row-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.item-num {
    font-size: 11px;
    font-weight: 700;
    color: var(--accent);
}

.btn-remove-item {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 2px;
}
.btn-remove-item:hover {
    color: var(--danger);
}

.panel-footer {
    padding: 14px 20px;
    border-top: 1px solid var(--border);
    font-size: 11px;
    color: var(--text-muted);
    text-align: center;
    background-color: var(--bg-topbar);
}

/* Preview Main Area */
.preview-area {
    flex: 1;
    background-color: var(--bg-app);
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow-y: auto;
    padding: 20px 20px 60px 20px;
}

/* Canvas Toolbar */
.canvas-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 210mm;
    max-width: 100%;
    margin-bottom: 12px;
    padding: 6px 12px;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.toolbar-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.zoom-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
}

.icon-btn-sm {
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text-primary);
    width: 26px;
    height: 26px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.icon-btn-sm:hover {
    background: var(--bg-card);
}

/* A4 Paper Canvas Container */
.a4-container {
    perspective: 1000px;
    transition: transform var(--transition);
    transform-origin: top center;
}

.a4-page {
    width: 210mm;
    min-height: 297mm;
    background-color: #ffffff;
    color: #1e293b;
    padding: 20mm 18mm;
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(0, 0, 0, 0.05);
    border-radius: 2px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    position: relative;
    font-size: 12px;
}

/* Document Printable Styling (Clean Paper Spec) */
.doc-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 2px solid var(--doc-accent);
    padding-bottom: 12px;
    margin-bottom: 20px;
}

.doc-header h1 {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: 4px;
    color: var(--doc-accent);
    margin: 0;
}

.meta-table {
    border-collapse: collapse;
    font-size: 11px;
}

.meta-table th {
    text-align: left;
    padding: 2px 8px 2px 0;
    color: #64748b;
    font-weight: 600;
}

.meta-table td {
    font-weight: 700;
    color: #0f172a;
}

/* Parties Info Layout */
.parties-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.buyer-info-box {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid #e2e8f0;
    padding: 12px;
    border-radius: 4px;
    background-color: #f8fafc;
}

.client-name {
    font-size: 16px;
    font-weight: 800;
    color: #0f172a;
}

.project-title-box {
    margin-top: 8px;
    font-size: 11.5px;
}

.project-title-box .label {
    color: #64748b;
    font-weight: 600;
}

.project-title-box .val {
    font-weight: 700;
    color: #0f172a;
}

.greeting-text {
    margin-top: 10px;
    font-size: 11px;
    color: #475569;
}

.seller-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 10.5px;
    border: 1px solid #cbd5e1;
}

.seller-table th, .seller-table td {
    border: 1px solid #cbd5e1;
    padding: 5px 8px;
}

.seller-table th {
    background-color: #f1f5f9;
    color: #334155;
    font-weight: 600;
    text-align: center;
}

.seller-table .title-col {
    background-color: var(--doc-accent);
    color: #ffffff;
    width: 24px;
    text-align: center;
    font-weight: 700;
    line-height: 1.2;
}

.relative-cell {
    position: relative;
}

.seal-image-container {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.seal-image-container img {
    max-height: 38px;
    object-fit: contain;
}

.fallback-seal-stamp {
    width: 32px;
    height: 32px;
    border: 2px solid #dc2626;
    color: #dc2626;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 12px;
    transform: rotate(-10deg);
    opacity: 0.85;
}

/* Financial Banner */
.financial-summary-banner {
    background-color: #f8fafc;
    border: 2px solid var(--doc-accent);
    padding: 10px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-radius: 4px;
}

.sum-label {
    font-size: 11px;
    font-weight: 700;
    color: #475569;
}

.sum-value {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.krw-word {
    font-size: 15px;
    font-weight: 800;
    color: var(--doc-accent);
}

.krw-number {
    font-size: 13px;
    font-weight: 700;
    color: #334155;
}

/* Details Table */
.details-table-container {
    margin-bottom: 20px;
    flex: 1;
}

.details-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 10.5px;
}

.details-table th {
    background-color: var(--doc-accent);
    color: #ffffff;
    padding: 7px 8px;
    font-weight: 700;
    border: 1px solid var(--doc-accent);
    text-align: center;
}

.details-table td {
    padding: 7px 8px;
    border: 1px solid #e2e8f0;
    color: #1e293b;
}

.details-table tbody tr:nth-child(even) {
    background-color: #f8fafc;
}

.details-table tfoot td {
    background-color: #f1f5f9;
    border: 1px solid #cbd5e1;
    padding: 6px 8px;
}

.details-table tfoot tr.total-row td {
    background-color: #e2e8f0;
    font-size: 11.5px;
}

.text-right { text-align: right; }
.text-center { text-align: center; }
.font-bold { font-weight: 700; }
.white-space-pre { white-space: pre-line; }

/* Terms Table */
.terms-remarks-container {
    margin-bottom: 20px;
}

.terms-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 10.5px;
    border: 1px solid #e2e8f0;
}

.terms-table th {
    width: 15%;
    background-color: #f8fafc;
    color: #475569;
    padding: 6px 10px;
    border: 1px solid #e2e8f0;
    text-align: left;
    font-weight: 600;
}

.terms-table td {
    padding: 6px 10px;
    border: 1px solid #e2e8f0;
    color: #0f172a;
}

/* Bottom Sign off */
.bottom-sign-off {
    margin-top: auto;
    text-align: center;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}

.date-line {
    font-size: 12px;
    font-weight: 700;
    color: #475569;
    margin-bottom: 12px;
}

.bottom-seal-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.company-line {
    font-size: 14px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: 0.5px;
}

.hidden { display: none !important; }

/* Footer Legal Links */
.legal-footer-links {
    margin-top: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 11px;
}

.legal-footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition);
}

.legal-footer-links a:hover {
    color: var(--accent);
    text-decoration: underline;
}

.bullet {
    color: var(--border-strong);
}

.legal-badge-notice {
    font-size: 10px;
    font-weight: 700;
    color: var(--accent);
    background: var(--accent-light);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
}

.section-desc {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

/* User Profile Badge */
.user-profile-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 4px 10px;
    border-radius: var(--radius-md);
    font-size: 12px;
}

.user-name-text {
    font-weight: 700;
    color: var(--text-primary);
}

.btn-logout-icon {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 2px;
    transition: color var(--transition);
}
.btn-logout-icon:hover {
    color: var(--danger);
}

/* Modal Backdrop */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(9, 11, 18, 0.75);
    backdrop-filter: blur(6px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Auth Modal Card */
.auth-modal-card {
    width: 100%;
    max-width: 420px;
    background-color: var(--bg-panel);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    padding: 28px;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.modal-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    transition: color var(--transition);
}
.modal-close-btn:hover {
    color: var(--text-primary);
}

.auth-header {
    text-align: center;
}

.brand-symbol-sm {
    width: 36px;
    height: 36px;
    background: #0f172a;
    color: #ffffff;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
    margin-bottom: 8px;
}

.auth-header h2 {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}

.auth-sub {
    font-size: 11.5px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Auth Tabs */
.auth-tab-group {
    display: flex;
    background-color: var(--bg-input);
    padding: 3px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.auth-tab {
    flex: 1;
    background: transparent;
    border: none;
    padding: 8px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

.auth-tab.active {
    background-color: var(--bg-card);
    color: var(--text-primary);
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* Auth Form */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.required-star {
    color: var(--danger);
}

.input-password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-password-wrapper input {
    padding-right: 36px;
}

.btn-toggle-pw {
    position: absolute;
    right: 8px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
}
.btn-toggle-pw:hover {
    color: var(--text-primary);
}

.form-row-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11.5px;
}

.btn-full {
    width: 100%;
    padding: 10px;
    margin-top: 4px;
}

/* Legal Consent Box */
.legal-consent-box {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
}

.consent-header {
    font-size: 12px;
}

.select-all-label span {
    color: var(--text-primary);
}

.consent-divider {
    height: 1px;
    background: var(--border);
    margin: 2px 0;
}

.consent-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 11.5px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: var(--text-secondary);
}

.checkbox-label input[type="checkbox"] {
    width: 14px;
    height: 14px;
    accent-color: var(--emerald);
    cursor: pointer;
}

.tag-required {
    color: var(--danger);
    font-weight: 700;
}

.tag-optional {
    color: var(--text-muted);
    font-weight: 600;
}

.legal-view-link {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 10.5px;
    text-decoration: underline;
    cursor: pointer;
}
.legal-view-link:hover {
    color: var(--accent);
}

/* Legal Modal (약관 팝업) */
.legal-modal-card {
    width: 100%;
    max-width: 600px;
    max-height: 80vh;
    background-color: var(--bg-panel);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.legal-modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.legal-modal-header h3 {
    font-size: 15px;
    font-weight: 800;
    color: var(--text-primary);
}

.legal-modal-body {
    padding: 20px;
    overflow-y: auto;
    font-size: 12px;
    line-height: 1.6;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.legal-modal-body h4 {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 8px;
}

/* ======================================================== */
/* Pure White & Rich Black Light Mode Specific Overrides    */
/* ======================================================== */
body.light-mode,
body.light-theme {
    background-color: #fafafa;
    color: #09090b;
}

body.light-mode select option,
body.light-theme select option {
    background-color: #ffffff;
    color: #09090b;
}

body.light-mode .brand-symbol,
body.light-mode .brand-symbol-sm,
body.light-theme .brand-symbol,
body.light-theme .brand-symbol-sm {
    background-color: #09090b;
    color: #ffffff;
    border-color: #09090b;
}

body.light-mode .btn-emerald,
body.light-theme .btn-emerald {
    background-color: #09090b;
    color: #ffffff;
    border: 1px solid #09090b;
}

body.light-mode .btn-emerald:hover,
body.light-theme .btn-emerald:hover {
    background-color: #18181b;
    box-shadow: 0 4px 14px rgba(9, 9, 11, 0.2);
}

body.light-mode .toggle-group input[type="radio"]:checked + .toggle-btn,
body.light-theme .toggle-group input[type="radio"]:checked + .toggle-btn {
    background-color: #09090b;
    color: #ffffff;
}

body.light-mode .preview-area,
body.light-theme .preview-area {
    background-color: #f4f4f5;
}

body.light-mode .canvas-toolbar,
body.light-theme .canvas-toolbar {
    background-color: #ffffff;
    border-color: #e4e4e7;
}

body.light-mode .a4-page,
body.light-theme .a4-page {
    border: 1px solid #e4e4e7;
    box-shadow: 0 16px 36px rgba(9, 9, 11, 0.08), 0 0 0 1px rgba(9, 9, 11, 0.04);
}

body.light-mode .auth-modal-card,
body.light-mode .legal-modal-card,
body.light-theme .auth-modal-card,
body.light-theme .legal-modal-card {
    background-color: #ffffff;
    border: 1px solid #09090b;
    color: #09090b;
    box-shadow: 0 25px 50px -12px rgba(9, 9, 11, 0.2);
}

body.light-mode .auth-tab.active,
body.light-theme .auth-tab.active {
    background-color: #ffffff;
    color: #09090b;
    box-shadow: 0 1px 3px rgba(9, 9, 11, 0.15);
}

body.light-mode input:focus,
body.light-mode select:focus,
body.light-mode textarea:focus,
body.light-theme input:focus,
body.light-theme select:focus,
body.light-theme textarea:focus {
    border-color: #09090b;
    box-shadow: 0 0 0 2px rgba(9, 9, 11, 0.15);
}

/* ----------------------------------------------------
   Marketing site
---------------------------------------------------- */
body.marketing-page {
    min-height: 100vh;
    height: auto;
    overflow-x: hidden;
    overflow-y: auto;
    background:
        radial-gradient(circle at 82% 9%, rgba(37, 99, 235, 0.08), transparent 28rem),
        #f8fafc;
    color: #0f172a;
}

.skip-link {
    position: fixed;
    top: 8px;
    left: 8px;
    z-index: 1000;
    padding: 9px 12px;
    border-radius: 7px;
    background: #0f172a;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transform: translateY(-150%);
}

.skip-link:focus {
    transform: translateY(0);
}

.marketing-page .site-header {
    width: min(1180px, calc(100% - 32px));
    margin: 16px auto 0;
    padding: 10px 12px 10px 16px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 10px 35px rgba(15, 23, 42, 0.06);
}

.marketing-page .header-logo-symbol {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: #0f172a;
}

.marketing-page .header-nav {
    gap: 4px;
}

.marketing-page .header-nav a {
    padding: 8px 11px;
    border-radius: 8px;
    color: #475569;
}

.marketing-page .header-nav a:hover,
.marketing-page .header-nav a.active {
    background: #f1f5f9;
    color: #0f172a;
}

.marketing-page .header-nav .btn-emerald {
    margin-left: 6px;
    background: #0f172a;
    color: #ffffff;
    border-color: #0f172a;
}

.marketing-page .hero-section {
    width: min(1180px, calc(100% - 48px));
    max-width: none;
    min-height: 660px;
    margin: 0 auto;
    padding: 88px 0 72px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(520px, 1.02fr);
    align-items: center;
    gap: 48px;
    text-align: left;
}

.marketing-page .hero-copy {
    min-width: 0;
}

.marketing-page .hero-badge {
    margin-bottom: 24px;
    padding: 7px 11px;
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
    font-size: 12px;
    letter-spacing: -0.01em;
}

.marketing-page .hero-title {
    max-width: 620px;
    margin: 0 0 22px;
    color: #0f172a;
    font-size: clamp(42px, 4.5vw, 56px);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.055em;
    word-break: keep-all;
}

.marketing-page .hero-title span {
    color: #2563eb;
    white-space: nowrap;
}

.marketing-page .hero-desc {
    max-width: 560px;
    margin: 0 0 30px;
    color: #475569;
    font-size: 17px;
    font-weight: 450;
    line-height: 1.75;
    word-break: keep-all;
}

.marketing-page .hero-ctas {
    justify-content: flex-start;
    gap: 10px;
}

.marketing-page .hero-primary-cta,
.marketing-page .hero-secondary-cta {
    min-height: 48px;
    padding: 0 18px;
    border-radius: 10px;
    font-size: 14px;
    text-decoration: none;
}

.marketing-page .hero-primary-cta {
    background: #0f172a;
    border-color: #0f172a;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.18);
}

.marketing-page .hero-secondary-cta {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #334155;
}

.marketing-page .hero-trust {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    margin-top: 24px;
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
}

.marketing-page .hero-trust span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.marketing-page .hero-trust .lucide {
    width: 14px;
    height: 14px;
    color: #059669;
}

.marketing-page .hero-product {
    overflow: hidden;
    border: 1px solid #dbe3ef;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 35px 80px rgba(15, 23, 42, 0.14);
    transform: rotate(0.7deg);
}

.marketing-page .hero-product-toolbar {
    height: 52px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #e2e8f0;
    background: #ffffff;
    font-size: 12px;
}

.marketing-page .hero-product-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #334155;
    font-weight: 700;
}

.marketing-page .hero-product-mark {
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    background: #0f172a;
    color: #ffffff;
    font-size: 9px;
}

.marketing-page .hero-product-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #64748b;
}

.marketing-page .hero-product-status span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10b981;
}

.marketing-page .hero-product-body {
    min-height: 430px;
    padding: 22px;
    display: grid;
    grid-template-columns: 0.78fr 1.22fr;
    gap: 18px;
    background: #f1f5f9;
}

.marketing-page .hero-form-demo {
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #ffffff;
}

.marketing-page .demo-label {
    margin-top: 9px;
    color: #64748b;
    font-size: 10px;
    font-weight: 700;
}

.marketing-page .demo-field {
    padding: 10px 11px;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    color: #334155;
    background: #f8fafc;
    font-size: 11px;
}

.marketing-page .demo-amount {
    color: #0f172a;
    font-weight: 800;
}

.marketing-page .demo-button {
    margin-top: auto;
    padding: 10px;
    border-radius: 7px;
    background: #0f172a;
    color: #ffffff;
    text-align: center;
    font-size: 11px;
    font-weight: 700;
}

.marketing-page .hero-document-demo {
    min-height: 380px;
    padding: 30px 26px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    border: 1px solid #dbe3ef;
    background: #ffffff;
    color: #0f172a;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.marketing-page .doc-demo-kicker {
    color: #94a3b8;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.2em;
    text-align: center;
}

.marketing-page .hero-document-demo strong {
    margin: 7px 0 28px;
    font-size: 25px;
    letter-spacing: 0.3em;
    text-align: center;
}

.marketing-page .doc-demo-line {
    width: 72%;
    height: 7px;
    margin-bottom: 9px;
    border-radius: 10px;
    background: #e2e8f0;
}

.marketing-page .doc-demo-line.wide {
    width: 100%;
    height: 2px;
    margin-bottom: 20px;
    background: #0f172a;
}

.marketing-page .doc-demo-line.short {
    width: 48%;
}

.marketing-page .doc-demo-table {
    margin-top: 22px;
    display: grid;
    grid-template-columns: 1.5fr 0.6fr 0.8fr;
    border-top: 1px solid #cbd5e1;
    border-left: 1px solid #cbd5e1;
}

.marketing-page .doc-demo-table span {
    height: 34px;
    border-right: 1px solid #cbd5e1;
    border-bottom: 1px solid #cbd5e1;
}

.marketing-page .doc-demo-total {
    margin-top: auto;
    padding: 11px;
    border-radius: 6px;
    background: #eff6ff;
    color: #1e40af;
    font-size: 12px;
    font-weight: 800;
    text-align: right;
}

.marketing-page .section-container {
    width: min(1180px, calc(100% - 48px));
    max-width: none;
    margin: 0 auto;
    padding: 82px 0;
}

.marketing-page #document-tools {
    border-top: 1px solid #e2e8f0;
}

.marketing-page .section-header {
    max-width: 660px;
    margin: 0 auto 38px;
}

.marketing-page .section-eyebrow {
    display: block;
    margin-bottom: 8px;
    color: #2563eb;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.14em;
}

.marketing-page .section-header h2 {
    color: #0f172a;
    font-size: clamp(28px, 3vw, 38px);
    letter-spacing: -0.045em;
}

.marketing-page .section-header p {
    margin-top: 10px;
    color: #64748b;
    font-size: 15px;
}

.marketing-page .tools-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.marketing-page .tool-card {
    min-height: 225px;
    padding: 22px;
    border-color: #e2e8f0;
    border-radius: 14px;
    background: #ffffff;
}

.marketing-page .tool-card:hover {
    border-color: #93c5fd;
    transform: translateY(-4px);
    box-shadow: 0 18px 35px rgba(15, 23, 42, 0.09);
}

.marketing-page .tool-icon {
    width: 44px;
    height: 44px;
    border-color: #dbeafe;
    border-radius: 11px;
    background: #eff6ff;
    color: #2563eb;
}

.marketing-page .tool-title {
    color: #0f172a;
}

.marketing-page .tool-title > .lucide {
    color: #94a3b8;
}

.marketing-page .tool-desc {
    color: #64748b;
}

.marketing-page .feature-item {
    position: relative;
    min-height: 180px;
    padding: 26px;
    border-color: #e2e8f0;
    border-radius: 14px;
    background: #ffffff;
}

.marketing-page .feature-number {
    display: block;
    margin-bottom: 24px;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
}

.marketing-page .feature-item h3 {
    color: #0f172a;
    font-size: 16px;
}

.marketing-page .feature-item h3 .lucide {
    color: #2563eb;
}

.marketing-page .feature-item p {
    margin-top: 10px;
    color: #64748b;
    font-size: 13px;
    line-height: 1.7;
}

.marketing-page .site-footer {
    margin-top: 30px;
    border-color: #e2e8f0;
    background: #ffffff;
}

/* ----------------------------------------------------
   Responsive document editor
---------------------------------------------------- */
.mobile-workspace-tabs {
    display: none;
}

.app-editor-page .auth-login-link {
    text-decoration: none;
}

.app-editor-page .panel-section {
    box-shadow: var(--shadow-sm);
}

body.content-page {
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --accent-light: rgba(37, 99, 235, 0.1);
    min-height: 100vh;
    height: auto;
    overflow-x: hidden;
    overflow-y: auto;
    background-color: #f8fafc;
}

.content-page .site-header {
    background: rgba(255, 255, 255, 0.94);
    border-bottom-color: #e2e8f0;
}

.content-page .site-header .header-logo {
    color: #0f172a;
}

.content-page .site-header .header-nav {
    gap: 4px;
}

.content-page .site-header .header-nav a {
    padding: 7px 9px;
    border-radius: 7px;
    color: #475569;
    white-space: nowrap;
}

.content-page .site-header .header-nav a:hover,
.content-page .site-header .header-nav a.active {
    background: #eff6ff;
    color: #2563eb;
}

.content-page .nav-bar {
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 1px 0 #e2e8f0;
}

.content-page .auth-card,
.content-page .admin-card,
.content-page .contract-card,
.content-page .article-card,
.content-page .blog-card {
    border-color: #e2e8f0;
    box-shadow: var(--shadow-sm);
}

.content-page .auth-card {
    border-radius: 16px;
}

.content-page.auth-page input {
    min-height: 44px;
}

.content-page .btn-primary {
    background: #0f172a;
    border-color: #0f172a;
    color: #ffffff;
}

.app-editor-page .btn:focus-visible,
.app-editor-page .topbar-btn:focus-visible,
.app-editor-page .mobile-workspace-tab:focus-visible,
.marketing-page a:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.28);
    outline-offset: 2px;
}

@media (max-width: 1100px) {
    .marketing-page .hero-section {
        grid-template-columns: 1fr;
        gap: 46px;
        padding-top: 70px;
    }

    .marketing-page .hero-copy {
        max-width: 720px;
    }

    .marketing-page .hero-product {
        width: min(720px, 100%);
        transform: none;
    }

    .marketing-page .tools-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.guide-library {
    padding: 38px 0 10px;
}

.guide-list {
    min-height: 260px;
    border-top: 1px solid var(--product-line-strong);
}

.guide-row {
    min-height: 112px;
    padding: 20px 4px;
    display: grid;
    grid-template-columns: 50px minmax(0, 1fr) 110px 24px;
    align-items: center;
    gap: 20px;
    border-bottom: 1px solid var(--product-line);
    color: var(--product-ink);
    text-decoration: none;
}

.guide-row:hover {
    background: #fff;
}

.guide-row__index,
.guide-row time {
    color: var(--product-slate);
    font-family: var(--font-utility);
    font-size: 10px;
}

.guide-row strong {
    font-size: 17px;
    letter-spacing: -0.025em;
}

.guide-row p {
    margin-top: 5px;
    color: var(--product-slate);
    font-size: 13px;
}

.guide-row > .lucide {
    color: var(--product-action);
}

.guide-empty {
    min-height: 320px;
    display: flex;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    text-align: center;
}

.guide-empty > .lucide {
    width: 30px;
    height: 30px;
    margin-bottom: 15px;
    color: var(--product-action);
}

.guide-empty h2 {
    font-size: 18px;
}

.guide-empty p {
    margin-top: 6px;
    color: var(--product-slate);
    font-size: 13px;
}

.article-shell {
    width: min(760px, calc(100% - 40px));
    margin: 0 auto;
    padding: 48px 0 20px;
}

.article-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--product-graphite);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.article-back .lucide {
    width: 15px;
}

.guide-article {
    margin-top: 30px;
}

.guide-article__header {
    padding-bottom: 32px;
    border-bottom: 1px solid var(--product-line-strong);
}

.guide-article__header > span {
    color: var(--product-action);
    font-family: var(--font-utility);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.14em;
}

.guide-article__header h1 {
    margin-top: 14px;
    font-size: clamp(32px, 5vw, 48px);
    line-height: 1.25;
    letter-spacing: -0.055em;
    word-break: keep-all;
}

.guide-article__meta {
    margin-top: 15px;
    color: var(--product-slate);
    font-family: var(--font-utility);
    font-size: 10px;
}

.guide-article > .form-message {
    margin-top: 22px;
}

.guide-article__body {
    padding: 38px 0;
    color: var(--product-graphite);
    font-size: 16px;
    line-height: 1.9;
}

.guide-article__body :where(h2, h3, h4) {
    margin: 1.8em 0 0.6em;
    color: var(--product-ink);
    line-height: 1.4;
    letter-spacing: -0.035em;
}

.guide-article__body :where(p, ul, ol, blockquote, pre) {
    margin: 1em 0;
}

.guide-article__body :where(ul, ol) {
    padding-left: 1.4em;
}

.guide-article__body blockquote {
    padding: 14px 18px;
    border-left: 3px solid var(--product-action);
    background: #eef3ff;
}

.guide-article__body a {
    color: var(--product-action);
}

.guide-article__body pre {
    padding: 18px;
    overflow-x: auto;
    background: var(--product-ink);
    color: #fff;
    font-family: var(--font-utility);
    font-size: 13px;
}

.guide-article__footer {
    padding: 24px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    border-top: 1px solid var(--product-line);
}

.guide-article__footer p {
    max-width: 510px;
    color: var(--product-slate);
    font-size: 12px;
}

@media (max-width: 640px) {
    .guide-row {
        grid-template-columns: 32px 1fr 20px;
        gap: 12px;
    }

    .guide-row time {
        display: none;
    }

    .guide-row strong {
        font-size: 15px;
    }

    .guide-row p {
        display: -webkit-box;
        overflow: hidden;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }

    .article-shell {
        width: calc(100% - 28px);
    }

    .guide-article__footer {
        align-items: flex-start;
        flex-direction: column;
    }
}

.admin-panel {
    margin-top: 30px;
    border: 1px solid var(--product-line);
    background: #fff;
}

.admin-panel__header {
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 1px solid var(--product-line);
}

.admin-panel__header h2 {
    font-size: 18px;
}

.admin-panel__header p {
    color: var(--product-slate);
    font-size: 12px;
}

.admin-panel > .form-message {
    margin: 18px 20px 0;
}

.admin-table-wrap {
    overflow-x: auto;
}

.admin-product-table {
    width: 100%;
    min-width: 860px;
    border-collapse: collapse;
    font-size: 13px;
}

.admin-product-table th {
    padding: 11px 14px;
    background: #f8fafc;
    color: var(--product-slate);
    font-size: 11px;
    text-align: left;
}

.admin-product-table td {
    padding: 14px;
    border-top: 1px solid var(--product-line);
    color: var(--product-graphite);
}

.admin-product-table td:first-child strong,
.admin-product-table td:first-child span,
.admin-product-table td:first-child small {
    display: block;
}

.admin-product-table td:first-child strong {
    color: var(--product-ink);
}

.admin-product-table td:first-child span,
.admin-product-table td:first-child small {
    color: var(--product-slate);
    font-size: 11px;
}

.admin-product-table select {
    min-height: 38px;
    padding: 0 9px;
    border: 1px solid var(--product-line-strong);
    border-radius: 6px;
    background: #fff;
    color: var(--product-ink);
    font-family: var(--font-product);
}

.admin-number {
    font-family: var(--font-utility);
}

.admin-status {
    display: inline-flex;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 750;
}

.admin-status--active {
    background: #e9f7f1;
    color: var(--product-verified);
}

.admin-status--suspended {
    background: #fff0f0;
    color: var(--product-danger);
}

.admin-product-table .product-button {
    min-height: 36px;
    padding: 0 10px;
    font-size: 11px;
}

@media (max-width: 1100px) {
    body.app-editor-page {
        height: 100dvh;
        overflow: hidden;
    }

    .app-editor-page .app-topbar {
        height: 58px;
        padding: 0 12px;
    }

    .app-editor-page .brand-sub,
    .app-editor-page .topbar-center,
    .app-editor-page .theme-accent-selector,
    .app-editor-page .divider,
    .app-editor-page .auth-bar-zone {
        display: none;
    }

    .app-editor-page .topbar-actions {
        gap: 8px;
    }

    .app-editor-page .topbar-actions > .btn-emerald {
        min-height: 36px;
        padding: 7px 12px;
    }

    .mobile-workspace-tabs {
        height: 48px;
        padding: 5px;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 4px;
        flex-shrink: 0;
        border-bottom: 1px solid var(--border);
        background: var(--bg-topbar);
    }

    .mobile-workspace-tab {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        border: 0;
        border-radius: 7px;
        background: transparent;
        color: var(--text-muted);
        font-family: var(--font-sans);
        font-size: 12px;
        font-weight: 700;
        cursor: pointer;
    }

    .mobile-workspace-tab.active {
        background: var(--bg-card);
        color: var(--text-primary);
        box-shadow: var(--shadow-sm);
    }

    .app-editor-page .main-workspace {
        height: calc(100dvh - 106px);
    }

    .app-editor-page .editor-panel {
        width: 100%;
        border-right: 0;
    }

    .app-editor-page .panel-body {
        padding: 12px 12px 88px;
        gap: 12px;
    }

    .app-editor-page .panel-section {
        padding: 15px;
        border-radius: 10px;
    }

    .app-editor-page .panel-footer {
        display: none;
    }

    .app-editor-page .preview-area {
        display: none;
        width: 100%;
        padding: 12px 12px 90px;
        align-items: flex-start;
        overflow: auto;
    }

    .app-editor-page[data-mobile-workspace="preview"] .editor-panel {
        display: none;
    }

    .app-editor-page[data-mobile-workspace="preview"] .preview-area {
        display: flex;
    }

    .app-editor-page .a4-container {
        transform-origin: top left;
    }

    .app-editor-page .a4-page {
        transform-origin: top left;
    }

    .app-editor-page .print-control-overlay {
        position: fixed;
        right: 12px;
        bottom: 14px;
        left: 12px;
        z-index: 80;
    }

    .app-editor-page .print-control-overlay .btn {
        width: 100%;
        min-height: 46px;
        box-shadow: 0 12px 30px rgba(15, 23, 42, 0.22);
    }
}

@media (max-width: 680px) {
    .content-page .nav-bar {
        padding: 12px 16px;
        align-items: flex-start;
        gap: 12px;
    }

    .content-page .nav-links {
        display: flex;
        justify-content: flex-end;
        flex-wrap: wrap;
        gap: 8px 12px;
    }

    .content-page .site-header {
        padding: 10px 14px;
        align-items: stretch;
        flex-direction: column;
        gap: 8px;
    }

    .content-page .site-header .header-logo {
        font-size: 16px;
    }

    .content-page .site-header .header-nav {
        width: 100%;
        padding-bottom: 2px;
        overflow-x: auto;
    }

    .content-page .site-header .header-nav a {
        padding: 6px 8px;
        font-size: 12px;
    }

    .content-page .container,
    .content-page .article-container {
        margin-top: 24px;
        padding-right: 14px;
        padding-left: 14px;
    }

    .content-page .admin-card {
        overflow-x: auto;
    }

    .content-page .coupang-partners-widget {
        align-items: flex-start;
        flex-direction: column;
        gap: 14px;
    }

    .content-page.auth-page {
        padding: 14px;
    }

    .content-page .auth-card {
        padding: 28px 20px;
    }

    .marketing-page .site-header {
        width: calc(100% - 20px);
        margin-top: 10px;
        align-items: flex-start;
        gap: 10px;
    }

    .marketing-page .header-logo {
        padding-top: 2px;
    }

    .marketing-page .header-logo > span {
        display: none;
    }

    .marketing-page .header-nav {
        max-width: none;
        flex: 1;
        justify-content: flex-end;
        flex-wrap: nowrap;
    }

    .marketing-page .header-nav a {
        padding: 7px 8px;
        font-size: 11px;
    }

    .marketing-page .header-nav a.active {
        display: none;
    }

    .marketing-page .header-nav a[href="/blog"] {
        display: none;
    }

    .marketing-page .header-nav .btn-emerald {
        margin-left: 0;
    }

    .marketing-page .hero-section,
    .marketing-page .section-container {
        width: calc(100% - 32px);
    }

    .marketing-page .hero-section {
        min-height: 0;
        padding: 64px 0 52px;
    }

    .marketing-page .hero-title {
        font-size: clamp(36px, 11vw, 48px);
        line-height: 1.12;
    }

    .marketing-page .hero-title span {
        white-space: normal;
    }

    .marketing-page .hero-desc {
        font-size: 15px;
    }

    .marketing-page .hero-ctas {
        display: grid;
        grid-template-columns: 1fr;
    }

    .marketing-page .hero-primary-cta,
    .marketing-page .hero-secondary-cta {
        width: 100%;
    }

    .marketing-page .hero-product-body {
        min-height: 390px;
        padding: 12px;
        grid-template-columns: 0.72fr 1.28fr;
        gap: 9px;
    }

    .marketing-page .hero-form-demo {
        padding: 12px 9px;
    }

    .marketing-page .hero-document-demo {
        min-height: 360px;
        padding: 22px 14px;
    }

    .marketing-page .hero-document-demo strong {
        font-size: 18px;
    }

    .marketing-page .tools-grid,
    .marketing-page .features-grid {
        grid-template-columns: 1fr;
    }

    .marketing-page .section-container {
        padding: 62px 0;
    }

    .marketing-page .section-header {
        text-align: left;
    }

    .app-editor-page .form-grid {
        grid-template-columns: 1fr;
    }

    .app-editor-page .col-span-2 {
        grid-column: auto;
    }

    .app-editor-page .card-actions {
        flex-wrap: wrap;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

/* ========================================================
   Shared light / dark appearance
======================================================== */
.product-brand {
    margin-right: auto;
}

.product-header__actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.product-theme-toggle {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border: 1px solid var(--product-line);
    border-radius: 9999px;
    background: transparent;
    color: #ffffff;
    cursor: pointer;
    transition: background-color var(--transition), border-color var(--transition), color var(--transition);
}

.product-theme-toggle:hover {
    border-color: #ffffff;
    background: var(--product-surface);
}

.product-theme-toggle svg {
    width: 17px;
    height: 17px;
}

html[data-theme="light"] {
    --product-ink: #16181d;
    --product-graphite: #343943;
    --product-slate: #69717d;
    --product-canvas: #f7f8fa;
    --product-surface: #ffffff;
    --product-line: #e3e6ea;
    --product-line-strong: #c6cbd2;
    --product-action: #16181d;
    --product-action-hover: #343943;
    --product-shadow: none;
}

html[data-theme="light"] .product-page {
    background: var(--product-canvas);
    color: var(--product-ink);
}

html[data-theme="light"] .product-header {
    border-bottom-color: var(--product-line);
    background: rgba(255, 255, 255, 0.94);
}

html[data-theme="light"] :where(.product-brand, .product-brand__text strong) {
    color: var(--product-ink);
}

html[data-theme="light"] :where(.product-brand__mark, .mini-brand-mark) {
    border-color: var(--product-ink);
    background: var(--product-ink);
    color: #ffffff;
}

html[data-theme="light"] :where(.product-nav a, .product-nav__logout) {
    color: var(--product-graphite);
}

html[data-theme="light"] :where(
    .product-nav a:hover,
    .product-nav__logout:hover,
    .product-nav a[aria-current="page"]
) {
    background: #eef0f3;
    color: var(--product-ink);
}

html[data-theme="light"] .product-nav__account {
    border-color: var(--product-ink);
    background: var(--product-ink) !important;
    color: #ffffff !important;
}

html[data-theme="light"] :where(.product-theme-toggle, .product-nav-toggle) {
    border-color: var(--product-line-strong);
    background: #ffffff;
    color: var(--product-ink);
}

html[data-theme="light"] .product-theme-toggle:hover {
    border-color: var(--product-ink);
    background: #eef0f3;
}

html[data-theme="light"] .product-footer {
    border-top-color: var(--product-line);
    background: #ffffff;
}

html[data-theme="light"] :where(.product-footer strong, .product-footer a) {
    color: var(--product-ink);
}

html[data-theme="light"] :where(.product-button--primary, .product-button--action) {
    border-color: var(--product-ink);
    background: var(--product-ink);
    color: #ffffff;
}

html[data-theme="light"] :where(.product-button--primary, .product-button--action):hover {
    background: var(--product-graphite);
    color: #ffffff;
}

html[data-theme="light"] .product-button--secondary {
    border-color: var(--product-line-strong);
    background: #ffffff;
    color: var(--product-ink);
}

html[data-theme="light"] :where(
    .product-field input,
    .product-field select,
    .product-field textarea,
    .admin-product-table select
) {
    border-color: var(--product-line-strong);
    background: #ffffff;
    color: var(--product-ink);
}

html[data-theme="light"] :where(
    .product-field input,
    .product-field select,
    .product-field textarea,
    .admin-product-table select
):focus {
    border-color: var(--product-ink);
    box-shadow: 0 0 0 3px rgba(22, 24, 29, 0.12);
}

html[data-theme="light"] .product-page :where(a, button, input, select, textarea):focus-visible {
    outline-color: var(--product-ink);
}

html[data-theme="light"] :where(.product-home, .home-hero, .auth-product-page) {
    background: var(--product-canvas);
}

html[data-theme="light"] :where(
    .home-hero h1,
    .home-section-heading h2,
    .stamp-callout__copy h2,
    .auth-intro h1,
    .product-page-heading h1,
    .guide-article__header h1,
    .home-hero h1 span,
    .home-hero__label,
    .home-section-heading > div > span,
    .stamp-callout__copy > span,
    .product-page-heading__eyebrow,
    .auth-intro__label,
    .guide-article__header > span,
    .document-type
) {
    color: var(--product-ink);
}

html[data-theme="light"] .document-workflow-preview,
html[data-theme="light"] .workflow-form,
html[data-theme="light"] .stamp-callout {
    border-color: var(--product-line);
    background: #ffffff;
}

html[data-theme="light"] :where(.document-workflow-preview__body, .workflow-field, .stamp-callout__preview) {
    border-color: var(--product-line);
    background: #f0f2f5;
    color: var(--product-ink);
}

html[data-theme="light"] .workflow-field--amount {
    border-color: var(--product-ink);
    background: var(--product-ink);
    color: var(--product-ink);
}

html[data-theme="light"] .tool-directory__row {
    border-bottom-color: var(--product-line);
    color: var(--product-ink);
}

html[data-theme="light"] .tool-directory__row:hover,
html[data-theme="light"] .guide-row:hover {
    background: #eef0f3;
}

html[data-theme="light"] :where(.tool-directory__category, .tool-directory__action, .home-flow__steps span) {
    color: var(--product-ink);
}

html[data-theme="light"] :where(
    .auth-panel,
    .settings-section,
    .dashboard-summary,
    .document-library,
    .admin-panel,
    .library-empty__document
) {
    border-color: var(--product-line);
    background: #ffffff;
}

html[data-theme="light"] :where(
    .auth-panel__header h1,
    .auth-panel__header h2,
    .auth-privacy-note strong,
    .auth-trust-list dt,
    .settings-section__header h2,
    .settings-account-meta strong,
    .document-library__header h2,
    .document-table td:first-child strong,
    .document-amount,
    .admin-panel__header h2,
    .admin-product-table td:first-child strong,
    .guide-row,
    .guide-empty h2
) {
    color: var(--product-ink) !important;
}

html[data-theme="light"] .auth-icon {
    border-color: var(--product-line);
    background: #f0f2f5;
    color: var(--product-ink);
}

html[data-theme="light"] :where(
    .field-label-row a,
    .auth-panel__footer a,
    .consent-row a,
    .settings-index > a,
    .guide-article__body a
) {
    color: var(--product-ink);
}

html[data-theme="light"] .dashboard-summary {
    border-left-color: var(--product-ink);
}

html[data-theme="light"] :where(.document-table th, .admin-product-table th) {
    background: #f0f2f5;
    color: var(--product-slate);
}

html[data-theme="light"] .guide-article__body :where(h2, h3, h4) {
    color: var(--product-ink);
}

html[data-theme="light"] .guide-article__body blockquote {
    border-left-color: var(--product-ink);
    background: #f0f2f5;
    color: var(--product-graphite);
}

html[data-theme="light"] .guide-article__body pre {
    border-color: var(--product-line);
    background: #f0f2f5;
}

html[data-theme="light"] .stamp-product-page {
    color: var(--product-ink);
}

html[data-theme="light"] :where(.stamp-product-page .studio-title h1, .stamp-product-page .tab-btn.active) {
    color: var(--product-ink);
}

html[data-theme="light"] :where(.stamp-product-page .studio-card, .stamp-product-page .controls-panel) {
    border-color: var(--product-line);
    background: #ffffff;
}

html[data-theme="light"] .stamp-product-page .btn-primary {
    border-color: var(--product-ink);
    background: var(--product-ink);
    color: #ffffff;
}

html[data-theme="light"] .stamp-product-page .btn-secondary {
    border-color: var(--product-line-strong);
    background: #ffffff;
    color: var(--product-ink);
}

html[data-theme="light"] .admin-entry {
    background: #ffffff;
}

html[data-theme="light"] .app-editor-page {
    --bg-app: #f0f0fa;
    --bg-topbar: #ffffff;
    --bg-panel: #ffffff;
    --bg-card: #ffffff;
    --bg-input: #ffffff;
    --text-primary: #000000;
    --text-secondary: #343943;
    --text-muted: #69717d;
    --accent: #000000;
    --accent-hover: #343943;
    --accent-light: rgba(0, 0, 0, 0.07);
    --border: #e0e0e8;
    --border-strong: #5a5a5f;
}

@media (max-width: 760px) {
    .product-header__inner {
        gap: 10px;
    }

    .product-nav {
        z-index: 2;
    }

    html[data-theme="light"] .product-nav {
        border-bottom-color: var(--product-line);
        background: #ffffff;
    }
}

/* Print Media Queries */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background-color: #ffffff !important;
        color: #000000 !important;
        overflow: visible !important;
    }
    
    .app-container, .main-workspace, .preview-area {
        display: block !important;
        height: auto !important;
        padding: 0 !important;
        overflow: visible !important;
        background: transparent !important;
    }
    
    .a4-container {
        transform: none !important;
    }
    
    .a4-page {
        box-shadow: none !important;
        padding: 10mm 15mm !important;
        margin: 0 !important;
        width: 100% !important;
        min-height: auto !important;
        page-break-after: avoid !important;
    }
}

/* ========================================================
   Commercial product foundation
======================================================== */
:root {
    --product-ink: #000000;
    --product-graphite: #f0f0fa;
    --product-slate: #b8b8c2;
    --product-canvas: #000000;
    --product-surface: #0a0a0a;
    --product-line: #3a3a3f;
    --product-line-strong: #5a5a5f;
    --product-action: #ffffff;
    --product-action-hover: #f0f0fa;
    --product-verified: #16805d;
    --product-danger: #c73838;
    --product-warning: #a15c0b;
    --product-radius: 8px;
    --product-shadow: none;
    --font-display: "Paperozi", "Pretendard", sans-serif;
    --font-product: "Pretendard", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-editorial: "ChosunIlboMyungjo", serif;
    --font-utility: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.product-page {
    min-height: 100vh;
    height: auto;
    overflow-x: hidden;
    overflow-y: auto;
    background: var(--product-canvas);
    color: var(--product-ink);
    font-family: var(--font-product);
    line-height: 1.6;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.product-header {
    position: sticky;
    top: 0;
    z-index: 90;
    border-bottom: 1px solid rgba(216, 222, 232, 0.9);
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(14px);
}

.product-header__inner {
    width: min(1200px, calc(100% - 40px));
    min-height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.product-brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    color: var(--product-ink);
    text-decoration: none;
}

.product-brand__mark {
    width: 38px;
    min-width: 38px;
    height: 38px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--product-ink);
    color: #fff;
    border-radius: 9px;
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 900;
    line-height: 0.88;
    letter-spacing: -0.12em;
    white-space: nowrap;
}

.product-brand__mark > span,
.app-editor-page .brand-symbol > span {
    display: block;
}

.product-brand__text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.product-brand__text strong {
    font-size: 15px;
    letter-spacing: -0.02em;
}

.product-brand__text small {
    margin-top: 3px;
    color: var(--product-slate);
    font-family: var(--font-utility);
    font-size: 9px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.product-nav {
    display: flex;
    align-items: center;
    gap: 3px;
}

.product-nav a,
.product-nav__logout {
    min-height: 38px;
    padding: 0 11px;
    display: inline-flex;
    align-items: center;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--product-graphite);
    font: 650 13px/1 var(--font-product);
    text-decoration: none;
    cursor: pointer;
}

.product-nav a:hover,
.product-nav__logout:hover,
.product-nav a[aria-current="page"] {
    background: #edf2f7;
    color: var(--product-ink);
}

.product-nav__account {
    margin-left: 5px;
    background: var(--product-ink) !important;
    color: #fff !important;
}

.product-nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--product-line);
    border-radius: 8px;
    background: #fff;
    color: var(--product-ink);
}

.product-main {
    width: min(1200px, calc(100% - 40px));
    margin: 0 auto;
}

.product-footer {
    margin-top: 88px;
    border-top: 1px solid var(--product-line);
    background: #fff;
}

.product-footer__inner {
    width: min(1200px, calc(100% - 40px));
    margin: 0 auto;
    padding: 32px 0;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px 32px;
    color: var(--product-slate);
    font-size: 13px;
}

.product-footer strong {
    color: var(--product-ink);
}

.product-footer p {
    margin-top: 4px;
}

.product-footer nav {
    display: flex;
    gap: 16px;
}

.product-footer a {
    color: var(--product-graphite);
    text-decoration: none;
}

.product-footer small {
    grid-column: 1 / -1;
}

.product-button {
    min-height: 46px;
    padding: 0 17px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid transparent;
    border-radius: 8px;
    font: 700 14px/1 var(--font-product);
    text-decoration: none;
    cursor: pointer;
    transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.product-button--primary {
    background: var(--product-ink);
    color: #fff;
}

.product-button--primary:hover {
    background: #000;
}

.product-button--action {
    background: var(--product-action);
    color: #fff;
}

.product-button--action:hover {
    background: var(--product-action-hover);
}

.product-button--secondary {
    border-color: var(--product-line-strong);
    background: #fff;
    color: var(--product-ink);
}

.product-button--danger {
    border-color: #efc7c7;
    background: #fff;
    color: var(--product-danger);
}

.product-button:disabled,
.product-nav__logout:disabled {
    cursor: wait;
    opacity: 0.66;
}

.product-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.product-field label {
    color: var(--product-graphite);
    font-size: 13px;
    font-weight: 700;
}

.product-field input,
.product-field select,
.product-field textarea {
    width: 100%;
    min-height: 46px;
    padding: 10px 12px;
    border: 1px solid var(--product-line-strong);
    border-radius: 8px;
    background: #fff;
    color: var(--product-ink);
    font: 500 15px/1.45 var(--font-product);
    outline: none;
}

.product-field textarea {
    min-height: 110px;
    resize: vertical;
}

.product-field input:focus,
.product-field select:focus,
.product-field textarea:focus {
    border-color: var(--product-action);
    box-shadow: 0 0 0 3px rgba(36, 95, 234, 0.14);
}

.product-field__hint {
    color: var(--product-slate);
    font-size: 12px;
}

.password-field {
    position: relative;
}

.password-field input {
    padding-right: 48px;
}

.password-field button {
    position: absolute;
    top: 50%;
    right: 7px;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: var(--product-slate);
    cursor: pointer;
}

.form-message {
    padding: 11px 13px;
    border: 1px solid;
    border-radius: 7px;
    font-size: 13px;
}

.form-message--error {
    border-color: #efc7c7;
    background: #fff5f5;
    color: #9f2525;
}

.form-message--success {
    border-color: #b9dccf;
    background: #f1fbf7;
    color: #116247;
}

.button-spinner {
    width: 15px;
    height: 15px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: product-spin 0.65s linear infinite;
}

.toast-region {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 500;
    display: grid;
    gap: 8px;
}

.product-toast {
    max-width: min(380px, calc(100vw - 36px));
    padding: 12px 14px;
    transform: translateY(8px);
    border: 1px solid var(--product-line);
    border-radius: 8px;
    background: var(--product-ink);
    color: #fff;
    box-shadow: var(--product-shadow);
    font-size: 13px;
    opacity: 0;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.product-toast.is-visible {
    transform: translateY(0);
    opacity: 1;
}

.product-toast--error {
    background: #8f2424;
}

@keyframes product-spin {
    to { transform: rotate(360deg); }
}

.product-page :where(a, button, input, select, textarea):focus-visible {
    outline: 3px solid rgba(36, 95, 234, 0.24);
    outline-offset: 2px;
}

@media (max-width: 760px) {
    .product-header__inner {
        width: calc(100% - 28px);
        min-height: 62px;
    }

    .product-brand__text small {
        display: none;
    }

    .product-nav-toggle {
        display: inline-flex;
    }

    .product-nav {
        position: absolute;
        top: calc(100% + 1px);
        right: 0;
        left: 0;
        padding: 10px 14px 14px;
        display: none;
        align-items: stretch;
        flex-direction: column;
        border-bottom: 1px solid var(--product-line);
        background: #fff;
        box-shadow: var(--product-shadow);
    }

    .product-nav.is-open {
        display: flex;
    }

    .product-nav a,
    .product-nav__logout {
        width: 100%;
        min-height: 44px;
        justify-content: flex-start;
    }

    .product-nav__account {
        margin-left: 0;
    }

    .product-main,
    .product-footer__inner {
        width: calc(100% - 28px);
    }

    .product-footer__inner {
        grid-template-columns: 1fr;
    }

    .product-footer small {
        grid-column: auto;
    }
}

.product-home {
    background: #f7f9fc;
}

.home-hero {
    border-bottom: 1px solid var(--product-line);
    background:
        linear-gradient(rgba(36, 95, 234, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(36, 95, 234, 0.04) 1px, transparent 1px),
        #f7f9fc;
    background-size: 32px 32px;
}

.home-hero__inner {
    width: min(1200px, calc(100% - 40px));
    min-height: 700px;
    margin: 0 auto;
    padding: 76px 0;
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(520px, 1.08fr);
    align-items: center;
    gap: 64px;
}

.home-hero__label,
.home-section-heading > div > span,
.stamp-callout__copy > span {
    color: var(--product-action);
    font-family: var(--font-utility);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.15em;
}

.home-hero h1 {
    margin-top: 17px;
    color: var(--product-ink);
    font-size: clamp(45px, 5vw, 64px);
    font-weight: 790;
    line-height: 1.07;
    letter-spacing: -0.065em;
    word-break: keep-all;
}

.home-hero h1 span {
    color: var(--product-action);
}

.home-hero__description {
    max-width: 590px;
    margin-top: 24px;
    color: var(--product-graphite);
    font-size: 17px;
    line-height: 1.8;
    word-break: keep-all;
}

.home-hero__actions {
    margin-top: 30px;
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.home-proof-list {
    margin-top: 25px;
    display: flex;
    flex-wrap: wrap;
    gap: 9px 18px;
    color: var(--product-slate);
    font-size: 12px;
    list-style: none;
}

.home-proof-list li {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.home-proof-list .lucide {
    width: 14px;
    color: var(--product-verified);
}

.document-workflow-preview {
    overflow: hidden;
    border: 1px solid var(--product-line-strong);
    border-radius: 14px;
    background: #fff;
    box-shadow: var(--product-shadow);
}

.document-workflow-preview__top,
.document-workflow-preview__foot {
    min-height: 52px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--product-line);
    color: var(--product-graphite);
    font-size: 11px;
    font-weight: 700;
}

.document-workflow-preview__top > span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.mini-brand-mark {
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: var(--product-ink);
    color: #fff;
    font-family: var(--font-utility);
    font-size: 8px;
}

.document-workflow-preview__body {
    min-height: 430px;
    padding: 22px;
    display: grid;
    grid-template-columns: 0.72fr 1.28fr;
    gap: 16px;
    background: #eef2f6;
}

.workflow-form {
    position: relative;
    padding: 20px 14px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    border: 1px solid var(--product-line);
    border-radius: 9px;
    background: #fff;
}

.workflow-field-label {
    margin-top: 10px;
    color: var(--product-slate);
    font-size: 9px;
    font-weight: 750;
}

.workflow-field {
    padding: 10px;
    border: 1px solid var(--product-line);
    border-radius: 6px;
    background: #fafbfc;
    color: var(--product-graphite);
    font-size: 10px;
}

.workflow-field--amount {
    border-color: #aebff0;
    color: var(--product-action);
    font-family: var(--font-utility);
    font-weight: 800;
}

.workflow-paper {
    position: relative;
    min-height: 380px;
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    border: 1px solid #cbd3df;
    background: #fff;
    box-shadow: 0 8px 20px rgba(17, 24, 39, 0.07);
}

.workflow-paper__meta {
    align-self: flex-end;
    color: var(--product-slate);
    font-family: var(--font-utility);
    font-size: 7px;
}

.workflow-paper > strong {
    margin: 8px 0 32px;
    font-size: 22px;
    letter-spacing: 0.28em;
    text-align: center;
}

.workflow-paper__recipient {
    font-size: 10px;
    font-weight: 750;
}

.workflow-paper__rule {
    height: 2px;
    margin: 12px 0 20px;
    background: var(--product-ink);
}

.workflow-paper__table {
    display: grid;
    grid-template-columns: 1.5fr 0.6fr 0.8fr;
    border-top: 1px solid var(--product-line-strong);
    border-left: 1px solid var(--product-line-strong);
}

.workflow-paper__table span {
    height: 38px;
    border-right: 1px solid var(--product-line-strong);
    border-bottom: 1px solid var(--product-line-strong);
}

.workflow-paper__total {
    margin-top: auto;
    padding: 11px;
    display: flex;
    justify-content: space-between;
    background: #eef3ff;
    color: var(--product-action);
    font-size: 10px;
}

.workflow-paper__total strong {
    font-family: var(--font-utility);
}

.document-workflow-preview__foot {
    min-height: 44px;
    justify-content: center;
    gap: 9px;
    border-top: 1px solid var(--product-line);
    border-bottom: 0;
    font-family: var(--font-utility);
    font-size: 9px;
    letter-spacing: 0.05em;
}

.document-workflow-preview__foot .lucide {
    width: 12px;
    color: var(--product-action);
}

.home-tools,
.home-flow {
    width: min(1200px, calc(100% - 40px));
    margin: 0 auto;
    padding: 92px 0;
}

.home-section-heading {
    margin-bottom: 36px;
    display: grid;
    grid-template-columns: 1fr minmax(320px, 500px);
    align-items: end;
    gap: 40px;
}

.home-section-heading h2 {
    margin-top: 8px;
    font-size: clamp(30px, 3.4vw, 44px);
    letter-spacing: -0.055em;
}

.home-section-heading > p {
    color: var(--product-slate);
    font-size: 14px;
    line-height: 1.75;
}

.tool-directory {
    border-top: 1px solid var(--product-line-strong);
}

.tool-directory__row {
    min-height: 110px;
    padding: 20px 4px;
    display: grid;
    grid-template-columns: 120px 200px minmax(0, 1fr) 110px;
    align-items: center;
    gap: 20px;
    border-bottom: 1px solid var(--product-line);
    color: var(--product-ink);
    text-decoration: none;
    transition: padding 0.16s ease, background 0.16s ease;
}

.tool-directory__row:hover {
    padding-right: 14px;
    padding-left: 14px;
    background: #fff;
}

.tool-directory__category {
    color: var(--product-action);
    font-family: var(--font-utility);
    font-size: 10px;
    font-weight: 800;
}

.tool-directory__row > strong {
    font-size: 17px;
    letter-spacing: -0.025em;
}

.tool-directory__row > p {
    color: var(--product-slate);
    font-size: 13px;
}

.tool-directory__action {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
    font-size: 12px;
    font-weight: 750;
}

.tool-directory__action .lucide {
    width: 14px;
}

.stamp-callout {
    width: min(1200px, calc(100% - 40px));
    min-height: 390px;
    margin: 10px auto 0;
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    border: 1px solid var(--product-line-strong);
    background: #fff;
}

.stamp-callout__preview {
    position: relative;
    min-height: 390px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-right: 1px solid var(--product-line);
    background: #f2f3f5;
}

.stamp-document-preview {
    width: min(270px, calc(100% - 64px));
    min-height: 220px;
    padding: 30px 32px 26px;
    display: flex;
    flex-direction: column;
    border: 1px solid #d9dce2;
    border-radius: 3px;
    background: #ffffff;
    box-shadow: 0 22px 55px rgba(0, 0, 0, 0.2);
    color: #20242c;
    transform: rotate(-2deg);
}

.stamp-document-preview__eyebrow {
    margin-bottom: 9px;
    color: #707782;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.14em;
}

.stamp-document-preview > strong {
    margin-bottom: 24px;
    font-size: 18px;
    letter-spacing: -0.04em;
}

.stamp-document-preview__line {
    height: 1px;
    margin-top: 13px;
    background: #dfe2e7;
}

.stamp-document-preview__line--short {
    width: 72%;
}

.stamp-document-preview__approval {
    position: relative;
    min-height: 76px;
    margin-top: 24px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    border-top: 1px solid #bfc4cc;
    color: #5e6672;
    font-size: 11px;
    font-weight: 700;
}

.stamp-mark {
    width: 62px;
    height: 62px;
    margin-left: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #bd2d2d;
    border-radius: 50%;
    color: #bd2d2d;
    font-family: "Noto Serif KR", serif;
    transform: rotate(-6deg);
}

.stamp-mark::before {
    position: absolute;
    inset: 4px;
    border: 1px solid currentColor;
    border-radius: inherit;
    content: "";
}

.stamp-mark > span {
    position: relative;
    z-index: 1;
    font-size: 27px;
    font-weight: 700;
    line-height: 1;
}

.stamp-callout__copy {
    padding: 58px;
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
}

.stamp-callout__copy h2 {
    margin-top: 10px;
    font-size: clamp(29px, 3vw, 42px);
    line-height: 1.25;
    letter-spacing: -0.05em;
}

.stamp-callout__copy p {
    max-width: 550px;
    margin: 18px 0 25px;
    color: var(--product-slate);
    font-size: 15px;
}

.home-flow {
    padding-bottom: 42px;
}

.home-flow__steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-top: 1px solid var(--product-line-strong);
    list-style: none;
}

.home-flow__steps li {
    min-height: 190px;
    padding: 24px 28px 24px 0;
    border-bottom: 1px solid var(--product-line);
}

.home-flow__steps li + li {
    padding-left: 28px;
    border-left: 1px solid var(--product-line);
}

.home-flow__steps span {
    color: var(--product-action);
    font-family: var(--font-utility);
    font-size: 10px;
}

.home-flow__steps strong {
    margin-top: 30px;
    display: block;
    font-size: 17px;
}

.home-flow__steps p {
    margin-top: 8px;
    color: var(--product-slate);
    font-size: 13px;
}

@media (max-width: 1000px) {
    .home-hero__inner {
        grid-template-columns: 1fr;
    }

    .document-workflow-preview {
        width: min(720px, 100%);
    }

    .tool-directory__row {
        grid-template-columns: 100px 180px 1fr 90px;
    }
}

@media (max-width: 700px) {
    .home-hero__inner {
        width: calc(100% - 28px);
        min-height: 0;
        padding: 56px 0;
        gap: 42px;
    }

    .home-hero h1 {
        font-size: 40px;
    }

    .home-hero__description {
        font-size: 15px;
    }

    .home-hero__actions {
        display: grid;
    }

    .document-workflow-preview__body {
        min-height: 360px;
        padding: 12px;
        grid-template-columns: 0.72fr 1.28fr;
        gap: 8px;
    }

    .workflow-form {
        padding: 11px 8px;
    }

    .workflow-paper {
        min-height: 330px;
        padding: 20px 12px;
    }

    .workflow-paper > strong {
        font-size: 17px;
    }

    .home-tools,
    .home-flow,
    .stamp-callout {
        width: calc(100% - 28px);
    }

    .home-tools,
    .home-flow {
        padding: 68px 0;
    }

    .home-section-heading {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .tool-directory__row {
        padding: 19px 2px;
        grid-template-columns: 1fr auto;
        gap: 5px 14px;
    }

    .tool-directory__category,
    .tool-directory__row > p {
        grid-column: 1 / -1;
    }

    .tool-directory__action {
        grid-column: 2;
        grid-row: 2;
    }

    .stamp-callout {
        grid-template-columns: 1fr;
    }

    .stamp-callout__preview {
        min-height: 280px;
        border-right: 0;
        border-bottom: 1px solid var(--product-line);
    }

    .stamp-callout__copy {
        padding: 34px 24px;
    }

    .home-flow__steps {
        grid-template-columns: 1fr;
    }

    .home-flow__steps li,
    .home-flow__steps li + li {
        min-height: 150px;
        padding: 22px 0;
        border-left: 0;
    }

    .home-flow__steps strong {
        margin-top: 20px;
    }
}

body.stamp-product-page {
    min-height: 100vh;
    height: auto;
    overflow-y: auto;
    background: var(--product-canvas);
    color: var(--product-ink);
    font-family: var(--font-product);
}

.stamp-product-page .studio-container {
    width: min(1080px, calc(100% - 40px));
    max-width: none;
    margin: 0 auto;
    padding: 62px 0 20px;
}

.stamp-product-page .studio-title {
    max-width: 720px;
    margin: 0 0 30px;
    text-align: left;
}

.stamp-product-page .studio-title h1 {
    font-size: clamp(32px, 4vw, 48px);
    line-height: 1.2;
    letter-spacing: -0.055em;
}

.stamp-product-page .studio-title p {
    margin-top: 10px;
    color: var(--product-slate);
    font-size: 15px;
}

.stamp-product-page .tab-controls {
    margin: 0 0 18px;
    justify-content: flex-start;
    gap: 0;
    border-bottom: 1px solid var(--product-line-strong);
}

.stamp-product-page .tab-btn {
    min-height: 48px;
    padding: 0 18px;
    border: 0;
    border-bottom: 3px solid transparent;
    border-radius: 0;
    background: transparent;
    color: var(--product-slate);
    font: 700 14px/1 var(--font-product);
}

.stamp-product-page .tab-btn.active {
    border-bottom-color: var(--product-action);
    background: transparent;
    color: var(--product-ink);
}

.stamp-product-page .studio-card {
    padding: 0;
    overflow: hidden;
    grid-template-columns: minmax(300px, 0.85fr) minmax(420px, 1.15fr);
    align-items: stretch;
    gap: 0;
    border: 1px solid var(--product-line);
    border-radius: 12px;
    background: #fff;
}

.stamp-product-page .controls-panel {
    padding: 30px;
    gap: 18px;
}

.stamp-product-page .form-group label {
    color: var(--product-graphite);
    font-family: var(--font-product);
    font-size: 13px;
}

.stamp-product-page .form-group input[type="text"],
.stamp-product-page .form-group select {
    min-height: 46px;
    padding: 10px 12px;
    border: 1px solid var(--product-line-strong);
    border-radius: 8px;
    background: #fff;
    color: var(--product-ink);
    font: 500 14px/1.4 var(--font-product);
}

.stamp-product-page .form-group input:focus,
.stamp-product-page .form-group select:focus {
    border-color: var(--product-action);
    outline: 3px solid rgba(36, 95, 234, 0.14);
}

.stamp-product-page .canvas-preview-panel {
    min-height: 460px;
    padding: 34px;
    border: 0;
    border-left: 1px solid var(--product-line);
    border-radius: 0;
    background:
        linear-gradient(45deg, #eef1f4 25%, transparent 25%),
        linear-gradient(-45deg, #eef1f4 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #eef1f4 75%),
        linear-gradient(-45deg, transparent 75%, #eef1f4 75%),
        #f8fafc;
    background-position: 0 0, 0 8px, 8px -8px, -8px 0;
    background-size: 16px 16px;
}

.stamp-product-page .canvas-preview-panel canvas {
    max-width: 100%;
}

.stamp-product-page #stamp-canvas {
    width: min(320px, 100%);
    height: auto;
    filter: drop-shadow(0 6px 10px rgba(111, 20, 20, 0.08));
}

.stamp-field-help {
    display: block;
    margin-top: 7px;
    color: var(--product-slate);
    font-size: 11px;
    line-height: 1.55;
}

.stamp-preview-heading {
    width: min(460px, 100%);
    margin-bottom: 20px;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    color: var(--product-graphite);
}

.stamp-preview-heading > span {
    font-size: 13px;
    font-weight: 800;
}

.stamp-preview-heading > small {
    color: var(--product-slate);
    font-size: 10px;
    text-align: right;
}

.stamp-product-page .actions-row {
    max-width: 460px;
    flex-wrap: wrap;
}

.stamp-product-page .actions-row .btn {
    min-height: 44px;
    border-radius: 8px;
}

@media (max-width: 800px) {
    .stamp-product-page .studio-container {
        width: calc(100% - 28px);
        padding-top: 42px;
    }

    .stamp-product-page .studio-card {
        grid-template-columns: 1fr;
    }

    .stamp-product-page .canvas-preview-panel {
        min-height: 360px;
        border-top: 1px solid var(--product-line);
        border-left: 0;
    }

    .stamp-product-page .tab-controls {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .stamp-product-page .tab-btn {
        padding: 0 10px;
        justify-content: center;
        font-size: 12px;
    }

    .stamp-preview-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .stamp-preview-heading > small {
        text-align: left;
    }
}

/* Document editor: commercial workspace refinement */
.app-editor-page {
    --sidebar-width: 470px;
    --topbar-height: 62px;
    --font-sans: "Pretendard Variable", Pretendard, "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.app-editor-page.light-mode,
.app-editor-page.light-theme {
    --bg-app: #eef1f5;
    --bg-topbar: #ffffff;
    --bg-panel: #ffffff;
    --bg-card: #ffffff;
    --bg-input: #ffffff;
    --text-primary: #111827;
    --text-secondary: #374151;
    --text-muted: #64748b;
    --accent: #245fea;
    --accent-hover: #1949bd;
    --accent-light: rgba(36, 95, 234, 0.09);
    --border: #d8dee8;
    --border-strong: #aeb8c7;
}

.app-editor-page .app-topbar {
    padding: 0 18px;
}

.app-editor-page.light-mode .app-topbar,
.app-editor-page.light-theme .app-topbar {
    border-bottom-color: #d8dee8;
}

.app-editor-page .brand-symbol {
    border-radius: 8px;
    font-family: var(--font-utility);
}

.app-editor-page .brand-name {
    font-size: 13px;
}

.app-editor-page .brand-sub {
    font-family: var(--font-utility);
    font-size: 8px;
    letter-spacing: 0.1em;
}

.app-editor-page .user-name-text {
    color: var(--text-primary);
    text-decoration: none;
}

.app-editor-page .accent-dot {
    padding: 0;
    appearance: none;
}

.app-editor-page .panel-body {
    padding: 4px 24px 40px;
    gap: 0;
}

.app-editor-page .panel-section {
    padding: 22px 0;
    gap: 14px;
    border: 0;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.app-editor-page .panel-section.card-actions {
    margin: 18px 0 4px;
    padding: 14px;
    flex-direction: column;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #f8fafc;
}

.app-editor-page .section-title {
    color: var(--text-primary);
    font-size: 13px;
    letter-spacing: -0.01em;
    text-transform: none;
}

.app-editor-page .section-title .lucide {
    color: var(--accent);
}

.app-editor-page .form-group label {
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 700;
}

.app-editor-page.light-mode input,
.app-editor-page.light-mode select,
.app-editor-page.light-mode textarea,
.app-editor-page.light-theme input,
.app-editor-page.light-theme select,
.app-editor-page.light-theme textarea {
    border-color: #aeb8c7;
    background: #ffffff;
    color: #111827;
}

.app-editor-page.light-mode input::placeholder,
.app-editor-page.light-mode textarea::placeholder,
.app-editor-page.light-theme input::placeholder,
.app-editor-page.light-theme textarea::placeholder {
    color: #8a95a5;
    opacity: 1;
}

.app-editor-page.light-mode input:focus,
.app-editor-page.light-mode select:focus,
.app-editor-page.light-mode textarea:focus,
.app-editor-page.light-theme input:focus,
.app-editor-page.light-theme select:focus,
.app-editor-page.light-theme textarea:focus {
    border-color: #245fea;
    box-shadow: 0 0 0 3px rgba(36, 95, 234, 0.14);
}

.app-editor-page .btn {
    min-height: 40px;
    border-radius: 7px;
}

.app-editor-page.light-mode .btn-primary,
.app-editor-page.light-theme .btn-primary {
    border-color: #111827;
    background: #111827;
    color: #fff;
}

.app-editor-page.light-mode .btn-primary:hover,
.app-editor-page.light-theme .btn-primary:hover {
    background: #000;
}

.app-editor-page.light-mode .preview-area,
.app-editor-page.light-theme .preview-area {
    background:
        linear-gradient(rgba(100, 116, 139, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(100, 116, 139, 0.07) 1px, transparent 1px),
        #eef1f5;
    background-size: 24px 24px;
}

.app-editor-page .canvas-toolbar {
    border-radius: 7px;
    box-shadow: 0 6px 18px rgba(17, 24, 39, 0.08);
}

.app-editor-page .toolbar-label,
.app-editor-page #zoom-level-text {
    font-family: var(--font-utility);
}

.app-editor-page .a4-page {
    box-shadow: 0 20px 50px rgba(17, 24, 39, 0.14);
}

.app-editor-page .btn-icon-link {
    min-height: 32px;
    padding: 0 6px;
    border-radius: 5px;
}

.app-editor-page .file-upload-wrapper {
    border-color: var(--border-strong);
    background: #f8fafc;
}

@media (max-width: 1100px) {
    .app-editor-page .panel-body {
        padding: 0 16px 92px;
    }

    .app-editor-page .panel-section {
        padding: 20px 0;
        border-radius: 0;
    }

    .app-editor-page .panel-section.card-actions {
        margin-top: 14px;
        padding: 13px;
        border-radius: 9px;
    }

    .app-editor-page .preview-area {
        padding-right: 12px;
        padding-left: 12px;
    }
}

.auth-product-page {
    background:
        linear-gradient(90deg, transparent calc(50% - 1px), rgba(216, 222, 232, 0.45) 50%, transparent calc(50% + 1px)),
        var(--product-canvas);
}

.auth-shell {
    width: min(1040px, calc(100% - 40px));
    min-height: calc(100vh - 68px);
    margin: 0 auto;
    padding: 72px 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 440px;
    align-items: center;
    gap: 90px;
}

.auth-shell--register {
    padding-top: 56px;
    padding-bottom: 56px;
}

.auth-shell--single {
    width: min(460px, calc(100% - 32px));
    grid-template-columns: 1fr;
}

.auth-intro__label {
    color: var(--product-action);
    font-family: var(--font-utility);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.15em;
}

.auth-intro h1 {
    margin-top: 16px;
    color: var(--product-ink);
    font-size: clamp(36px, 4.2vw, 54px);
    font-weight: 780;
    line-height: 1.12;
    letter-spacing: -0.055em;
    word-break: keep-all;
}

.auth-intro > p {
    max-width: 510px;
    margin-top: 22px;
    color: var(--product-graphite);
    font-size: 16px;
    line-height: 1.8;
    word-break: keep-all;
}

.auth-trust-list {
    margin-top: 38px;
    border-top: 1px solid var(--product-line);
}

.auth-trust-list div {
    padding: 16px 0;
    display: grid;
    grid-template-columns: 145px 1fr;
    gap: 20px;
    border-bottom: 1px solid var(--product-line);
}

.auth-trust-list dt {
    color: var(--product-ink);
    font-size: 13px;
    font-weight: 750;
}

.auth-trust-list dd {
    color: var(--product-slate);
    font-size: 13px;
}

.auth-privacy-note {
    margin-top: 34px;
    padding: 18px 0;
    display: flex;
    gap: 12px;
    border-top: 1px solid var(--product-line);
    border-bottom: 1px solid var(--product-line);
    color: var(--product-slate);
    font-size: 13px;
}

.auth-privacy-note .lucide {
    flex: 0 0 auto;
    color: var(--product-verified);
}

.auth-privacy-note strong {
    color: var(--product-ink);
}

.auth-panel {
    padding: 32px;
    border: 1px solid var(--product-line);
    border-radius: 14px;
    background: #fff;
    box-shadow: var(--product-shadow);
}

.auth-panel__header {
    margin-bottom: 26px;
    display: flex;
    align-items: center;
    gap: 13px;
}

.auth-panel__header h1,
.auth-panel__header h2 {
    color: var(--product-ink);
    font-size: 21px;
    font-weight: 780;
    letter-spacing: -0.03em;
}

.auth-panel__header p {
    margin-top: 2px;
    color: var(--product-slate);
    font-size: 13px;
}

.auth-icon {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border: 1px solid #c9d7fb;
    border-radius: 9px;
    background: #eef3ff;
    color: var(--product-action);
}

.auth-product-form {
    margin-top: 18px;
    display: grid;
    gap: 17px;
}

.field-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.field-label-row a,
.auth-panel__footer a,
.consent-row a {
    color: var(--product-action);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.auth-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.product-field label > span {
    margin-left: 4px;
    color: var(--product-slate);
    font-size: 11px;
    font-weight: 500;
}

.consent-row {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    color: var(--product-graphite);
    font-size: 12px;
    line-height: 1.6;
    cursor: pointer;
}

.consent-row input {
    width: 16px;
    height: 16px;
    margin-top: 2px;
    accent-color: var(--product-action);
}

.auth-submit {
    width: 100%;
    margin-top: 3px;
}

.auth-panel__footer {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--product-line);
    color: var(--product-slate);
    font-size: 13px;
    text-align: center;
}

@media (max-width: 840px) {
    .auth-product-page {
        background: var(--product-canvas);
    }

    .auth-shell {
        width: min(520px, calc(100% - 28px));
        min-height: auto;
        padding: 42px 0 64px;
        grid-template-columns: 1fr;
        gap: 34px;
    }

    .auth-intro h1 {
        font-size: 36px;
    }

    .auth-intro > p {
        font-size: 15px;
    }
}

@media (max-width: 520px) {
    .auth-panel {
        padding: 24px 20px;
    }

    .auth-form-grid {
        grid-template-columns: 1fr;
    }

    .auth-trust-list div {
        grid-template-columns: 1fr;
        gap: 4px;
    }
}

.product-page-heading {
    padding: 62px 0 34px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    border-bottom: 1px solid var(--product-line);
}

.product-page-heading__eyebrow {
    color: var(--product-action);
    font-family: var(--font-utility);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.14em;
}

.product-page-heading h1 {
    margin-top: 8px;
    color: var(--product-ink);
    font-size: clamp(30px, 4vw, 44px);
    font-weight: 780;
    line-height: 1.15;
    letter-spacing: -0.05em;
}

.product-page-heading p {
    margin-top: 9px;
    color: var(--product-slate);
    font-size: 15px;
}

.settings-layout {
    padding-top: 34px;
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    gap: 54px;
    align-items: start;
}

.settings-index {
    position: sticky;
    top: 100px;
    display: grid;
    border-top: 1px solid var(--product-line-strong);
}

.settings-index > a {
    padding: 12px 2px;
    border-bottom: 1px solid var(--product-line);
    color: var(--product-graphite);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.settings-index > a:hover {
    color: var(--product-action);
}

.settings-account-meta {
    margin-top: 22px;
    display: grid;
    gap: 3px;
}

.settings-account-meta span,
.settings-account-meta small {
    color: var(--product-slate);
    font-size: 11px;
}

.settings-account-meta strong {
    overflow: hidden;
    color: var(--product-ink);
    font-size: 12px;
    text-overflow: ellipsis;
}

.settings-content {
    display: grid;
    gap: 22px;
}

.settings-section {
    padding: 28px;
    border: 1px solid var(--product-line);
    border-radius: 12px;
    background: #fff;
}

.settings-section__header {
    margin-bottom: 24px;
    padding-bottom: 18px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 1px solid var(--product-line);
}

.settings-section__header h2 {
    font-size: 20px;
    letter-spacing: -0.03em;
}

.settings-section__header p {
    margin-top: 3px;
    color: var(--product-slate);
    font-size: 13px;
}

.settings-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--product-verified);
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.settings-form {
    margin-top: 20px;
}

.settings-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.settings-form-grid__wide {
    grid-column: 1 / -1;
}

.settings-form--narrow {
    max-width: 520px;
    display: grid;
    gap: 17px;
}

.settings-form__actions {
    margin-top: 24px;
    padding-top: 18px;
    display: flex;
    justify-content: flex-end;
    border-top: 1px solid var(--product-line);
}

.dashboard-summary {
    margin-top: 28px;
    padding: 18px 20px;
    display: grid;
    grid-template-columns: 150px 1fr;
    align-items: center;
    gap: 26px;
    border: 1px solid var(--product-line);
    border-left: 3px solid var(--product-action);
    background: #fff;
}

.dashboard-summary > div {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: baseline;
    gap: 0 8px;
}

.dashboard-summary span,
.dashboard-summary small {
    grid-column: 1 / -1;
    color: var(--product-slate);
    font-size: 11px;
}

.dashboard-summary strong {
    font-family: var(--font-utility);
    font-size: 27px;
}

.dashboard-summary p {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--product-graphite);
    font-size: 13px;
}

.dashboard-summary p .lucide {
    flex: 0 0 auto;
    color: var(--product-action);
}

.document-library {
    margin-top: 28px;
    border: 1px solid var(--product-line);
    background: #fff;
}

.document-library__header {
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 1px solid var(--product-line);
}

.document-library__header h2 {
    font-size: 18px;
    letter-spacing: -0.03em;
}

.document-library__header p {
    color: var(--product-slate);
    font-size: 12px;
}

.document-library > .form-message {
    margin: 18px 20px 0;
}

.document-table-wrap {
    min-height: 220px;
    overflow-x: auto;
}

.library-loading {
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--product-slate);
    font-size: 13px;
}

.document-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.document-table th {
    padding: 11px 16px;
    background: #f8fafc;
    color: var(--product-slate);
    font-size: 11px;
    font-weight: 700;
    text-align: left;
}

.document-table td {
    padding: 16px;
    border-top: 1px solid var(--product-line);
    color: var(--product-graphite);
    vertical-align: middle;
}

.document-table td:first-child {
    min-width: 260px;
}

.document-table td:first-child strong,
.document-table td:first-child small {
    display: block;
}

.document-table td:first-child strong {
    margin-top: 5px;
    color: var(--product-ink);
    font-size: 14px;
}

.document-table td:first-child small {
    margin-top: 2px;
    color: var(--product-slate);
    font-family: var(--font-utility);
    font-size: 10px;
}

.document-type {
    color: var(--product-action);
    font-size: 10px;
    font-weight: 800;
}

.document-amount {
    font-family: var(--font-utility);
    color: var(--product-ink) !important;
    white-space: nowrap;
}

.document-actions {
    display: flex;
    justify-content: flex-end;
    gap: 7px;
    white-space: nowrap;
}

.document-actions .product-button {
    min-height: 38px;
    padding: 0 11px;
    font-size: 12px;
}

.library-empty {
    min-height: 330px;
    padding: 48px 20px;
    display: flex;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    text-align: center;
}

.library-empty__document {
    position: relative;
    width: 64px;
    height: 78px;
    margin-bottom: 20px;
    border: 2px solid var(--product-line-strong);
    background: #fff;
}

.library-empty__document::before,
.library-empty__document::after {
    position: absolute;
    right: 12px;
    left: 12px;
    height: 2px;
    background: var(--product-line);
    content: "";
}

.library-empty__document::before { top: 25px; }
.library-empty__document::after { top: 36px; }

.library-empty h3 {
    font-size: 18px;
}

.library-empty p {
    max-width: 440px;
    margin: 7px 0 20px;
    color: var(--product-slate);
    font-size: 13px;
}

.admin-entry {
    margin-top: 22px;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid #efc7c7;
    background: #fffafa;
}

.admin-entry p {
    color: var(--product-slate);
    font-size: 12px;
}

.settings-section--danger {
    border-color: #efc7c7;
}

.settings-section--danger h2 {
    color: #991b1b;
}

.settings-status--danger {
    border-color: #efc7c7;
    background: #fff7f7;
    color: #991b1b;
}

.product-button--danger {
    border: 1px solid #b42318;
    background: #b42318;
    color: #fff;
}

.product-button--danger:hover {
    border-color: #8f1c13;
    background: #8f1c13;
}

body.modal-open {
    overflow: hidden;
}

.editor-scope-note {
    margin: 10px 0 0;
    padding: 10px 12px;
    display: flex;
    gap: 8px;
    border-left: 3px solid var(--product-action);
    background: #f4f7fb;
    color: #536071;
    font-size: 11px;
    line-height: 1.55;
}

.editor-scope-note svg {
    width: 14px;
    min-width: 14px;
    height: 14px;
    margin-top: 1px;
}

@media (max-width: 760px) {
    .product-page-heading {
        padding-top: 42px;
        align-items: flex-start;
        flex-direction: column;
    }

    .settings-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .settings-index {
        position: static;
        grid-template-columns: 1fr 1fr;
    }

    .settings-account-meta {
        display: none;
    }

    .settings-section {
        padding: 22px 18px;
    }

    .settings-section__header {
        flex-direction: column;
    }

    .settings-form-grid {
        grid-template-columns: 1fr;
    }

    .settings-form-grid__wide {
        grid-column: auto;
    }

    .dashboard-summary {
        grid-template-columns: 1fr;
    }

    .document-library {
        border-right: 0;
        border-left: 0;
    }

    .document-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
    }

    .document-table,
    .document-table tbody,
    .document-table tr,
    .document-table td {
        display: block;
        width: 100%;
    }

    .document-table tr {
        padding: 18px;
        border-top: 1px solid var(--product-line);
    }

    .document-table td {
        padding: 5px 0 5px 92px;
        border: 0;
        position: relative;
    }

    .document-table td::before {
        position: absolute;
        left: 0;
        color: var(--product-slate);
        font-size: 11px;
        content: attr(data-label);
    }

    .document-table td:first-child {
        min-width: 0;
        padding: 0 0 13px;
    }

    .document-table td:first-child::before,
    .document-actions::before {
        display: none;
    }

    .document-actions {
        padding: 14px 0 0 !important;
        justify-content: flex-start;
    }

    .admin-entry {
        align-items: flex-start;
        flex-direction: column;
        gap: 14px;
    }
}

/* ========================================================
   DESIGN.md v1.0 — Dark Austerity brand application
======================================================== */
.product-page {
    background: var(--product-canvas);
    color: #ffffff;
}

.product-header {
    border-bottom-color: var(--product-line);
    background: rgba(0, 0, 0, 0.94);
    box-shadow: none;
}

.product-brand,
.product-brand__text strong {
    color: #ffffff;
}

.product-brand__mark,
.mini-brand-mark {
    border: 1px solid #ffffff;
    border-radius: 4px;
    background: #000000;
    color: #ffffff;
    font-family: var(--font-product);
}

.product-nav a,
.product-nav__logout {
    color: var(--product-graphite);
}

.product-nav a:hover,
.product-nav__logout:hover,
.product-nav a[aria-current="page"] {
    background: var(--product-surface);
    color: #ffffff;
}

.product-nav__account {
    border: 1px solid #ffffff;
    border-radius: 9999px;
    background: #000000 !important;
    color: #ffffff !important;
}

.product-nav-toggle {
    border-color: var(--product-line);
    background: #000000;
    color: #ffffff;
}

.product-footer {
    border-top-color: var(--product-line);
    background: #000000;
}

.product-footer strong,
.product-footer a {
    color: #ffffff;
}

.product-button {
    border-radius: 9999px;
    font: 700 13px/1 var(--font-product);
    letter-spacing: 0.05em;
}

.product-button--primary {
    border-color: #ffffff;
    background: #000000;
    color: #ffffff;
}

.product-button--primary:hover {
    background: #ffffff;
    color: #000000;
}

.product-button--action {
    border-color: #ffffff;
    background: #ffffff;
    color: #000000;
}

.product-button--action:hover {
    background: var(--product-action-hover);
    color: #000000;
}

.product-button--secondary {
    border-color: #ffffff;
    background: #ffffff;
    color: #000000;
}

.product-field label {
    color: var(--product-graphite);
}

.product-field input,
.product-field select,
.product-field textarea,
.admin-product-table select {
    border-color: #e0e0e8;
    border-radius: 4px;
    background: #ffffff;
    color: #000000;
    font-family: var(--font-product);
}

.product-field input:focus,
.product-field select:focus,
.product-field textarea:focus,
.admin-product-table select:focus {
    border-color: #000000;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.24);
}

.product-page :where(a, button, input, select, textarea):focus-visible {
    outline-color: #ffffff;
}

.product-home,
.home-hero {
    background: #000000;
}

.home-hero {
    border-bottom-color: var(--product-line);
}

.home-hero h1,
.home-section-heading h2,
.stamp-callout__copy h2,
.auth-intro h1,
.product-page-heading h1,
.guide-article__header h1 {
    color: #ffffff;
    font-family: var(--font-display);
    letter-spacing: -0.02em;
}

.home-hero h1 {
    font-size: clamp(48px, 5.6vw, 72px);
    font-weight: 900;
    line-height: 1.05;
}

.home-hero h1 span,
.home-hero__label,
.home-section-heading > div > span,
.stamp-callout__copy > span,
.product-page-heading__eyebrow,
.auth-intro__label,
.guide-article__header > span,
.document-type {
    color: #ffffff;
}

.home-hero__description,
.home-section-heading > p,
.stamp-callout__copy p,
.home-flow__steps p,
.tool-directory__row > p,
.auth-intro > p,
.product-page-heading p,
.guide-article__body,
.article-back {
    color: var(--product-graphite);
}

.home-hero__description {
    font-size: 18px;
    line-height: 1.7;
}

.home-proof-list {
    color: var(--product-graphite);
}

.document-workflow-preview {
    border-color: var(--product-line);
    border-radius: 4px;
    background: #000000;
    box-shadow: none;
}

.document-workflow-preview__top,
.document-workflow-preview__foot {
    color: var(--product-graphite);
}

.document-workflow-preview__body {
    background: #0a0a0a;
}

.workflow-form {
    border-color: var(--product-line);
    border-radius: 4px;
    background: #000000;
}

.workflow-field {
    border-color: var(--product-line);
    border-radius: 4px;
    background: #0a0a0a;
    color: #ffffff;
}

.workflow-field.workflow-field--amount {
    border-color: #ffffff;
    background: #0a0a0a;
    color: #ffffff;
}

.workflow-paper {
    border-color: #e0e0e8;
    background: #ffffff;
    color: #000000;
    box-shadow: none;
}

.workflow-paper__meta {
    color: #5a5a5f;
}

.workflow-paper__rule {
    background: #000000;
}

.workflow-paper__table {
    border-color: #5a5a5f;
}

.workflow-paper__table span {
    border-color: #5a5a5f;
}

.workflow-paper__total {
    background: #f0f0fa;
    color: #000000;
}

.tool-directory {
    border-top-color: var(--product-line);
}

.tool-directory__row {
    border-bottom-color: var(--product-line);
    color: #ffffff;
}

.tool-directory__row:hover {
    background: #0a0a0a;
}

.tool-directory__category,
.tool-directory__action,
.home-flow__steps span {
    color: #ffffff;
}

.stamp-callout {
    border-color: var(--product-line);
    background: #000000;
}

.stamp-callout__preview {
    border-color: var(--product-line);
    background: #0a0a0a;
}

.home-flow__steps,
.home-flow__steps li,
.home-flow__steps li + li {
    border-color: var(--product-line);
}

.auth-product-page {
    background: #000000;
}

.auth-panel,
.settings-section,
.dashboard-summary,
.document-library,
.admin-panel {
    border-color: var(--product-line);
    border-radius: 4px;
    background: #0a0a0a;
    box-shadow: none;
}

.auth-panel__header h1,
.auth-panel__header h2,
.auth-privacy-note strong,
.auth-trust-list dt,
.settings-section__header h2,
.settings-account-meta strong,
.document-library__header h2,
.document-table td:first-child strong,
.document-amount,
.admin-panel__header h2,
.admin-product-table td:first-child strong,
.guide-row,
.guide-empty h2 {
    color: #ffffff !important;
}

.auth-icon {
    border-color: var(--product-line);
    border-radius: 4px;
    background: #000000;
    color: #ffffff;
}

.field-label-row a,
.auth-panel__footer a,
.consent-row a,
.settings-index > a,
.guide-article__body a {
    color: #ffffff;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.consent-row,
.dashboard-summary p,
.document-table td,
.admin-product-table td {
    color: var(--product-graphite);
}

.dashboard-summary {
    border-left-color: #ffffff;
}

.document-table th,
.admin-product-table th {
    background: #000000;
    color: var(--product-slate);
}

.document-table td,
.admin-product-table td {
    border-top-color: var(--product-line);
}

.library-empty__document {
    border-color: var(--product-line-strong);
    background: #0a0a0a;
}

.guide-row:hover {
    background: #0a0a0a;
}

.guide-article__body :where(h2, h3, h4) {
    color: #ffffff;
    font-family: var(--font-display);
}

.guide-article__body blockquote {
    border-left-color: #ffffff;
    background: #0a0a0a;
    color: #f0f0fa;
    font-family: var(--font-editorial);
    font-size: 20px;
    line-height: 1.8;
}

.guide-article__body pre {
    border: 1px solid var(--product-line);
    background: #0a0a0a;
}

.product-toast {
    border-color: #ffffff;
    border-radius: 4px;
    background: #000000;
    color: #ffffff;
    box-shadow: none;
}

.stamp-product-page .studio-title h1 {
    color: #ffffff;
    font-family: var(--font-display);
}

.stamp-product-page {
    color: #ffffff;
}

.stamp-product-page .tab-btn.active {
    color: #ffffff;
}

.stamp-product-page .studio-card {
    border-color: var(--product-line);
    border-radius: 4px;
    background: #0a0a0a;
}

.stamp-product-page .controls-panel {
    background: #0a0a0a;
}

.stamp-product-page .canvas-preview-panel {
    border-color: var(--product-line);
    background:
        linear-gradient(45deg, #f0f0fa 25%, transparent 25%),
        linear-gradient(-45deg, #f0f0fa 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #f0f0fa 75%),
        linear-gradient(-45deg, transparent 75%, #f0f0fa 75%),
        #ffffff;
    background-position: 0 0, 0 8px, 8px -8px, -8px 0;
    background-size: 16px 16px;
}

.stamp-product-page .form-group label {
    color: var(--product-graphite);
}

.stamp-product-page .btn-primary {
    border-color: #ffffff;
    background: #ffffff;
    color: #000000;
}

.stamp-product-page .btn-secondary {
    border-color: #ffffff;
    background: #000000;
    color: #ffffff;
}

.admin-entry {
    border-color: var(--product-danger);
    background: #0a0a0a;
}

.settings-section--danger .settings-section__header h2 {
    color: var(--product-danger);
}

.app-editor-page {
    --font-sans: "Pretendard", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.app-editor-page.light-mode,
.app-editor-page.light-theme {
    --bg-app: #f0f0fa;
    --bg-topbar: #ffffff;
    --bg-panel: #ffffff;
    --bg-card: #ffffff;
    --bg-input: #ffffff;
    --text-primary: #000000;
    --text-secondary: #343943;
    --text-muted: #69717d;
    --accent: #000000;
    --accent-hover: #343943;
    --accent-light: rgba(0, 0, 0, 0.07);
    --border: #e0e0e8;
    --border-strong: #5a5a5f;
}

.app-editor-page .brand-symbol {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    flex-direction: column;
    border-radius: 4px;
    background: #000000;
    color: #ffffff;
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 900;
    line-height: 0.88;
    letter-spacing: -0.12em;
}

.app-editor-page .brand-name,
.app-editor-page .section-title {
    font-family: var(--font-display);
}

.app-editor-page .btn-primary,
.app-editor-page .btn-emerald,
.app-editor-page .btn-print-big {
    border-color: #000000;
    background: #000000;
    color: #ffffff;
}

.app-editor-page:not(.light-mode):not(.light-theme) input,
.app-editor-page:not(.light-mode):not(.light-theme) select,
.app-editor-page:not(.light-mode):not(.light-theme) textarea {
    border-color: #e0e0e8;
    background: #ffffff;
    color: #000000;
}

.app-editor-page:not(.light-mode):not(.light-theme) select option {
    background: #ffffff;
    color: #000000;
}

.app-editor-page:not(.light-mode):not(.light-theme) .btn-secondary-sm,
.app-editor-page:not(.light-mode):not(.light-theme) .btn-primary-sm {
    border-color: #ffffff;
    background: #ffffff;
    color: #000000;
}

.app-editor-page .editor-scope-note {
    border-left-color: #000000;
    background: #f0f0fa;
    color: #343943;
}

@media (max-width: 760px) {
    .product-nav {
        border-bottom-color: var(--product-line);
        background: #000000;
        box-shadow: none;
    }

    .home-hero h1 {
        font-size: 44px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

/* Light-theme text must follow the legacy dark-brand declarations. */
html[data-theme="light"] .home-hero h1,
html[data-theme="light"] .home-section-heading h2,
html[data-theme="light"] .stamp-callout__copy h2,
html[data-theme="light"] .auth-intro h1,
html[data-theme="light"] .product-page-heading h1,
html[data-theme="light"] .guide-article__header h1,
html[data-theme="light"] .home-hero h1 span,
html[data-theme="light"] .home-hero__label,
html[data-theme="light"] .home-section-heading > div > span,
html[data-theme="light"] .stamp-callout__copy > span,
html[data-theme="light"] .product-page-heading__eyebrow,
html[data-theme="light"] .auth-intro__label,
html[data-theme="light"] .guide-article__header > span,
html[data-theme="light"] .document-type {
    color: var(--product-ink);
}

html[data-theme="light"] .auth-panel__header h1,
html[data-theme="light"] .auth-panel__header h2,
html[data-theme="light"] .auth-privacy-note strong,
html[data-theme="light"] .auth-trust-list dt,
html[data-theme="light"] .settings-section__header h2,
html[data-theme="light"] .settings-account-meta strong,
html[data-theme="light"] .document-library__header h2,
html[data-theme="light"] .document-table td:first-child strong,
html[data-theme="light"] .document-amount,
html[data-theme="light"] .admin-panel__header h2,
html[data-theme="light"] .admin-product-table td:first-child strong,
html[data-theme="light"] .guide-row,
html[data-theme="light"] .guide-empty h2 {
    color: var(--product-ink) !important;
}

html[data-theme="light"] .stamp-product-page .studio-title h1,
html[data-theme="light"] .stamp-product-page .tab-btn.active {
    color: var(--product-ink);
}

html[data-theme="light"] .product-brand,
html[data-theme="light"] .product-brand__text strong {
    color: var(--product-ink);
}

html[data-theme="light"] .product-brand__text small {
    color: var(--product-slate);
}

html[data-theme="light"] .product-brand__mark {
    border-color: var(--product-ink);
    background: var(--product-ink);
    color: #ffffff;
}

html[data-theme="light"] .product-nav a:hover,
html[data-theme="light"] .product-nav__logout:hover,
html[data-theme="light"] .product-nav a[aria-current="page"] {
    background: #eef0f3;
    color: var(--product-ink);
}

html[data-theme="light"] .stamp-product-page .studio-card,
html[data-theme="light"] .stamp-product-page .controls-panel {
    border-color: var(--product-line);
    background: #ffffff;
}

html[data-theme="light"] .workflow-field.workflow-field--amount {
    border-color: var(--product-line-strong);
    background: #ffffff;
    color: var(--product-ink);
}

html[data-theme="light"] .product-footer strong,
html[data-theme="light"] .product-footer a,
html[data-theme="light"] .field-label-row a,
html[data-theme="light"] .auth-panel__footer a,
html[data-theme="light"] .consent-row a,
html[data-theme="light"] .settings-index > a,
html[data-theme="light"] .guide-article__body a {
    color: var(--product-ink);
}

html[data-theme="light"] .tool-directory__row,
html[data-theme="light"] .tool-directory__category,
html[data-theme="light"] .tool-directory__action,
html[data-theme="light"] .home-flow__steps span {
    color: var(--product-ink);
}
