@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css");

:root {
    /* Medi Hub brand (emerald green) — 변수명은 호환용 */
    --blue-50: #ecfdf5;
    --blue-100: #d1fae5;
    --blue-300: #6ee7b7;
    --blue-500: #10b981;
    --blue-600: #059669;
    --blue-700: #047857;
    --blue-800: #065f46;
    --blue-900: #064e3b;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --radius: 12px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
    --shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
    --shadow-lg: 0 12px 40px rgba(15, 23, 42, 0.08);
    --header-h: 64px;
    --font: "Pretendard", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    color: var(--gray-800);
    background: var(--gray-50);
    line-height: 1.6;
    letter-spacing: -0.02em;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

.container {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--gray-200);
}

.header-inner {
    height: var(--header-h);
    display: flex;
    align-items: center;
    gap: 24px;
}

.header-cta {
    flex-shrink: 0;
    white-space: nowrap;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.brand-mark {
    width: 36px;
    height: 36px;
    background: var(--blue-700);
    color: #fff;
    border-radius: 10px;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 14px;
}

.logo-mark {
    display: block;
    flex-shrink: 0;
    object-fit: contain;
}

.logo-mark-sm { width: 28px; height: 28px; }
.logo-mark-md { width: 36px; height: 36px; }
.logo-mark-lg { width: 48px; height: 48px; }
.logo-mark-xl { width: 56px; height: 56px; }

.logo-mark-center {
    margin: 0 auto 16px;
}

.footer-brand-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}

.brand-text { font-size: 17px; font-weight: 700; color: var(--gray-900); }
.brand-name { color: var(--blue-700); }

.main-nav {
    display: flex;
    gap: 4px;
    flex: 1;
    overflow-x: auto;
    scrollbar-width: none;
}

.main-nav::-webkit-scrollbar { display: none; }

.main-nav a {
    padding: 8px 14px;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-600);
    border-radius: 8px;
    white-space: nowrap;
    transition: color .15s, background .15s;
}

.main-nav a:hover { color: var(--blue-700); background: var(--blue-50); }
.main-nav .nav-ai { color: var(--blue-700); font-weight: 600; }

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.menu-toggle span {
    width: 20px;
    height: 2px;
    background: var(--gray-700);
    border-radius: 1px;
}

.mobile-nav {
    display: none;
    padding: 12px 16px 16px;
    gap: 8px;
    flex-wrap: wrap;
    border-top: 1px solid var(--gray-100);
}

.mobile-nav a {
    font-size: 13px;
    padding: 6px 12px;
    background: var(--gray-100);
    border-radius: 999px;
    color: var(--gray-600);
}

.mobile-nav.open { display: flex; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: transform .15s, box-shadow .15s, background .15s;
    white-space: nowrap;
}

.btn-primary {
    background: var(--blue-600);
    color: #fff;
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.25);
}

.btn-primary:hover {
    background: var(--blue-700);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(5, 150, 105, 0.3);
}

.btn-outline {
    background: #fff;
    color: var(--blue-700);
    border: 1.5px solid var(--gray-200);
}

.btn-outline:hover { border-color: var(--blue-600); background: var(--blue-50); }
.btn-sm { padding: 9px 16px; font-size: 13px; }
.btn-lg { padding: 14px 28px; font-size: 15px; }

/* Hero */
.hero {
    background: #fff;
    border-bottom: 1px solid var(--gray-200);
    padding: 48px 0 40px;
}

.hero-inner { max-width: 640px; }

.hero-badge {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    color: var(--blue-700);
    background: var(--blue-50);
    padding: 6px 12px;
    border-radius: 999px;
    margin-bottom: 16px;
}

.hero h1 {
    font-size: clamp(28px, 5vw, 40px);
    font-weight: 800;
    line-height: 1.25;
    color: var(--gray-900);
    margin-bottom: 12px;
}

.hero p {
    font-size: 16px;
    color: var(--gray-500);
    line-height: 1.7;
    margin-bottom: 24px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* AI Section — 메인 최상단 */
.ai-section {
    background: linear-gradient(180deg, #fff 0%, var(--blue-50) 100%);
    padding: 56px 0;
    border-bottom: 1px solid var(--gray-200);
}

.ai-section-top {
    padding-top: 48px;
    margin-top: 0;
}

.ai-section-inner {
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
}

.ai-section-inner .logo-mark-center {
    margin-bottom: 12px;
}

.ai-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--blue-700);
    margin-bottom: 12px;
}

.ai-section h2 {
    font-size: clamp(22px, 4vw, 30px);
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.ai-section .sub {
    color: var(--gray-500);
    font-size: 15px;
    margin-bottom: 28px;
}

.ai-form {
    display: flex;
    gap: 10px;
    background: #fff;
    padding: 8px;
    border-radius: var(--radius-lg);
    border: 1.5px solid var(--gray-200);
    box-shadow: var(--shadow-lg);
    transition: border-color .2s, box-shadow .2s;
}

.ai-form:focus-within {
    border-color: var(--blue-500);
    box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.12), var(--shadow-lg);
}

.ai-form input {
    flex: 1;
    border: none;
    outline: none;
    padding: 14px 16px;
    font-size: 15px;
    font-family: inherit;
    background: transparent;
    color: var(--gray-900);
}

.ai-form input::placeholder { color: var(--gray-400); }

.ai-note {
    margin-top: 14px;
    font-size: 12px;
    color: var(--gray-400);
}

/* Section */
.section { padding: 56px 0; }
.section-alt {
    background: #fff;
    border-top: 1px solid var(--gray-200);
    border-bottom: 1px solid var(--gray-200);
}
.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 28px;
    gap: 16px;
}

.section-head h2 {
    font-size: 24px;
    font-weight: 800;
    color: var(--gray-900);
}

.section-head p {
    font-size: 14px;
    color: var(--gray-500);
    margin-top: 4px;
}

.section-link {
    font-size: 14px;
    font-weight: 600;
    color: var(--blue-600);
    white-space: nowrap;
}

.section-link:hover { text-decoration: underline; }

/* Category Grid */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.category-card {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: block;
    transition: border-color .2s, box-shadow .2s, transform .2s;
}

.category-card:hover {
    border-color: var(--blue-300, #6ee7b7);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.category-card h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.category-card p {
    font-size: 13px;
    color: var(--gray-500);
    line-height: 1.5;
}

.category-meta {
    margin-top: 10px;
    font-size: 12px;
    color: var(--blue-600);
    font-weight: 500;
}

/* Sub category sections with preview */
.subcategory-sections {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.subcategory-block {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: border-color .2s, box-shadow .2s;
}

.subcategory-block:hover {
    border-color: var(--gray-300);
    box-shadow: var(--shadow-sm);
}

.subcategory-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 22px;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
}

.subcategory-title-wrap {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px 12px;
    min-width: 0;
}

.subcategory-head h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0;
}

.subcategory-head h3 a {
    color: inherit;
    transition: color .15s;
}

.subcategory-head h3 a:hover {
    color: var(--blue-700);
}

.subcategory-count {
    font-size: 13px;
    font-weight: 600;
    color: var(--blue-600);
    white-space: nowrap;
}

.subcategory-more {
    font-size: 13px;
    font-weight: 600;
    color: var(--blue-600);
    white-space: nowrap;
    flex-shrink: 0;
}

.subcategory-more:hover {
    text-decoration: underline;
}

.post-preview-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.post-preview-item {
    display: block;
    padding: 16px 22px;
    border-bottom: 1px solid var(--gray-100);
    transition: background .15s;
}

.post-preview-list li:last-child .post-preview-item {
    border-bottom: none;
}

.post-preview-item:hover {
    background: var(--blue-50);
}

.post-preview-title {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-900);
    line-height: 1.45;
    margin-bottom: 4px;
}

.post-preview-summary {
    font-size: 13px;
    color: var(--gray-500);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.subcategory-empty {
    padding: 20px 22px;
    font-size: 14px;
    color: var(--gray-400);
    margin: 0;
}

/* Legacy sub pills (unused) */
.sub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.sub-card {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 16px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 14px;
    color: var(--gray-800);
    transition: all .15s;
}

.sub-card:hover {
    border-color: var(--blue-600);
    color: var(--blue-700);
    background: var(--blue-50);
}

.sub-card span { font-size: 12px; color: var(--gray-400); font-weight: 400; }

/* Post cards */
.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

.post-grid-home {
    grid-template-columns: repeat(3, 1fr);
}

.post-grid-category {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.page-cta-section {
    padding-top: 0;
}

.section-tight {
    padding-top: 0;
    padding-bottom: 48px;
}

.section-head-compact {
    margin-bottom: 20px;
}

.section-head-compact p {
    font-size: 14px;
    color: var(--gray-500);
    margin-top: 4px;
}

.post-card {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 22px;
    transition: box-shadow .2s, border-color .2s;
    display: block;
}

.post-card:hover {
    box-shadow: var(--shadow);
    border-color: var(--gray-300);
}

.post-breadcrumb {
    font-size: 12px;
    color: var(--blue-600);
    margin-bottom: 10px;
    font-weight: 500;
}

.post-card h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1.45;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card .summary {
    font-size: 13px;
    color: var(--gray-500);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 12px;
}

.post-date { font-size: 12px; color: var(--gray-400); }

/* Breadcrumb */
.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 13px;
    color: var(--gray-400);
    margin-bottom: 24px;
}

.breadcrumb a { color: var(--gray-500); }
.breadcrumb a:hover { color: var(--blue-600); }
.breadcrumb .current { color: var(--gray-800); font-weight: 500; }

/* Page header */
.page-header { padding: 32px 0 20px; }
.page-header h1 { font-size: 28px; font-weight: 800; color: var(--gray-900); line-height: 1.3; }
.page-header p { color: var(--gray-500); margin-top: 8px; font-size: 15px; }
.page-header .page-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--blue-600);
    margin-bottom: 6px;
}
.page-header .page-desc {
    color: var(--gray-500);
    margin-top: 8px;
    font-size: 15px;
    line-height: 1.6;
}
.page-header-sub { padding-bottom: 12px; }

/* Post detail */
.post-detail { padding: 32px 0 56px; max-width: 760px; }
.post-detail h1 { font-size: 26px; font-weight: 800; line-height: 1.35; margin-bottom: 8px; }
.post-detail time { font-size: 13px; color: var(--gray-400); }

.q-box, .a-box {
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    margin-top: 24px;
}

.q-box {
    background: var(--blue-50);
    border: 1px solid var(--blue-100);
}

.a-box {
    background: #fff;
    border: 1px solid var(--gray-200);
}

.q-label, .a-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 12px;
}

.q-label span, .a-label span {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    display: grid;
    place-items: center;
    font-size: 11px;
    color: #fff;
}

.q-label span { background: var(--blue-600); }
.a-label span { background: var(--blue-800); }

.q-box p { font-size: 17px; line-height: 1.7; color: var(--gray-800); }
.a-box .content { font-size: 15px; line-height: 1.8; color: var(--gray-700); }
.case-body-wrap .case-content-html { overflow-wrap: anywhere; }
.case-content-html img,
.case-content-html video,
.case-content-html iframe { max-width: 100%; height: auto; }
.case-content-html table { max-width: 100%; border-collapse: collapse; }
.a-box h2 { font-size: 17px; font-weight: 700; color: var(--blue-800); margin: 20px 0 8px; }
.a-box ul { margin: 8px 0 8px 20px; list-style: disc; }
.a-box li { margin-bottom: 4px; }

.cta-banner {
    margin-top: 40px;
    background: var(--blue-800);
    color: #fff;
    border-radius: var(--radius-lg);
    padding: 36px 32px;
    text-align: center;
}

.cta-banner h2 { font-size: 22px; font-weight: 800; margin-bottom: 8px; }
.cta-banner p { color: rgba(255,255,255,.8); margin-bottom: 20px; font-size: 14px; }
.cta-banner .btn-primary { background: #fff; color: var(--blue-800); box-shadow: none; }

/* Search */
.search-form {
    display: flex;
    gap: 10px;
    max-width: 560px;
    margin-bottom: 32px;
}

.search-form input {
    flex: 1;
    padding: 14px 18px;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 15px;
    font-family: inherit;
    outline: none;
}

.search-form input:focus { border-color: var(--blue-500); box-shadow: 0 0 0 3px rgba(5,150,105,.12); }

.empty-state {
    text-align: center;
    padding: 64px 24px;
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    color: var(--gray-500);
}

/* Footer */
.site-footer {
    background: var(--gray-900);
    color: var(--gray-300);
    margin-top: auto;
}

.footer-simple {
    padding: 40px 0 32px;
    text-align: center;
    max-width: 560px;
}

.footer-brand {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 10px;
}

.footer-slogan {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    line-height: 1.5;
    margin-bottom: 8px;
}

.footer-intro {
    font-size: 14px;
    line-height: 1.7;
    color: var(--gray-400);
    margin: 0;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.08);
    padding: 20px 0;
    text-align: center;
    font-size: 12px;
}

.legal-note { margin-top: 4px; color: var(--gray-500); }

/* Public content disclaimer */
.content-disclaimer-section {
    padding: 28px 0 36px;
    background: var(--gray-50);
}

.content-disclaimer-section .container {
    max-width: 760px;
}

.content-disclaimer {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 20px 22px;
    border: 1px solid #a7f3d0;
    border-radius: 12px;
    background: #ecfdf5;
    color: var(--gray-700);
    box-shadow: 0 2px 8px rgba(15, 23, 42, .04);
}

.content-disclaimer-icon {
    display: flex;
    flex: 0 0 24px;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--blue-600);
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    font-family: Georgia, serif;
}

.content-disclaimer strong {
    display: block;
    margin-bottom: 6px;
    color: var(--gray-900);
    font-size: 14px;
    font-weight: 800;
}

.content-disclaimer p {
    margin: 0;
    color: var(--gray-600);
    font-size: 13px;
    line-height: 1.75;
    word-break: keep-all;
}

/* Chat page */
.chat-page { height: 100vh; display: flex; flex-direction: column; background: var(--gray-50); }
.chat-topbar {
    background: #fff;
    border-bottom: 1px solid var(--gray-200);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.chat-topbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.chat-back {
    font-size: 13px;
    color: var(--gray-500);
    flex-shrink: 0;
}

.chat-back:hover {
    color: var(--blue-700);
}

.chat-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.chat-brand strong {
    display: block;
    font-size: 14px;
    line-height: 1.3;
}

.chat-brand-sub {
    font-size: 11px;
    color: var(--gray-400);
    line-height: 1.3;
}
.chat-body { flex: 1; overflow-y: auto; }
.chat-input-bar {
    background: #fff;
    border-top: 1px solid var(--gray-200);
    padding: 16px;
    flex-shrink: 0;
}
.chat-input-wrap {
    max-width: 860px;
    margin: 0 auto;
    display: flex;
    gap: 10px;
    align-items: flex-end;
}
.chat-input-wrap textarea {
    flex: 1;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 12px 16px;
    font-family: inherit;
    font-size: 15px;
    resize: none;
    outline: none;
    max-height: 120px;
    line-height: 1.5;
}
.chat-input-wrap textarea:focus { border-color: var(--blue-500); }
.chat-send {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: var(--radius);
    background: var(--blue-600);
    color: #fff;
    cursor: pointer;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}
.chat-send:disabled { opacity: .5; cursor: not-allowed; }

.chat-messages {
    max-width: 860px;
    margin: 0 auto;
    padding: 32px 24px 120px;
}

.message {
    margin-bottom: 24px;
    animation: chatFadeIn 0.3s ease-in;
}

@keyframes chatFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.message-content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.user-message .message-content { flex-direction: row-reverse; }

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

.bot-message .message-avatar {
    background: var(--blue-50);
    color: var(--blue-800);
    border: 1px solid var(--blue-100);
    padding: 4px;
}

.avatar-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.user-message .message-avatar {
    background: var(--blue-700);
    color: #fff;
    font-size: 16px;
}

.message-text {
    max-width: min(72%, 560px);
    padding: 14px 18px;
    border-radius: 16px;
    line-height: 1.7;
    word-wrap: break-word;
    overflow-wrap: anywhere;
    font-size: 15px;
}

.bot-message .message-text {
    background: #fff;
    color: var(--gray-800);
    border: 1px solid var(--gray-200);
    border-top-left-radius: 4px;
    box-shadow: var(--shadow-sm);
}

.bot-message .message-text p {
    margin: 0 0 12px 0;
    line-height: 1.8;
}

.bot-message .message-text p:last-child { margin-bottom: 0; }

.bot-message .message-text strong {
    color: var(--blue-800);
    font-weight: 600;
}

.bot-message .message-text .message-list {
    margin: 12px 0;
    padding-left: 20px;
    list-style: none;
}

.bot-message .message-text .message-list li {
    margin: 8px 0;
    padding-left: 8px;
    position: relative;
    line-height: 1.7;
}

.bot-message .message-text .message-list li::before {
    content: '•';
    color: var(--blue-600);
    position: absolute;
    left: -12px;
    font-weight: bold;
    font-size: 16px;
}

.bot-message .message-text .message-link {
    color: var(--blue-600);
    text-decoration: underline;
    word-break: break-all;
}

.bot-message .message-text .message-link:hover { color: var(--blue-800); }

.user-message .message-text {
    background: var(--blue-700);
    color: #fff;
    border-top-right-radius: 4px;
}

.consultation-section { margin-top: 20px; padding-top: 20px; }

.consultation-divider {
    height: 1px;
    background: var(--gray-200);
    margin-bottom: 16px;
}

.consultation-text {
    font-size: 14px;
    color: var(--gray-600);
    line-height: 1.6;
    margin: 0 0 12px 0;
}

.consultation-link {
    display: inline-block;
    color: var(--blue-600);
    text-decoration: underline;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
}

.consultation-link:hover { color: var(--blue-800); }

.encouragement-text {
    margin: 20px 0 16px;
    padding: 14px 16px;
    background: var(--blue-50);
    border-radius: 8px;
}

.encouragement-text p {
    font-size: 14px;
    color: var(--gray-700);
    line-height: 1.8;
    margin: 0;
}

.consultation-buttons { margin-top: 16px; width: 100%; }

.consultation-btn-single {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    background: var(--blue-600);
    color: #fff;
    border: none;
    transition: all 0.2s;
    box-sizing: border-box;
}

.consultation-btn-single:hover {
    background: var(--blue-700);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.35);
}

.consultation-btn-single .btn-label {
    display: block;
    word-break: keep-all;
    line-height: 1.25;
}

.disclaimer-box {
    margin-top: 20px;
    padding: 14px 16px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-left: 3px solid var(--blue-600);
    border-radius: 8px;
}

.disclaimer-text {
    font-size: 13px;
    color: var(--gray-700);
    line-height: 1.7;
    margin: 0;
}

.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 14px 18px;
    align-items: center;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--blue-600);
    animation: chatTyping 1.4s infinite;
}

.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes chatTyping {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
    30% { transform: translateY(-8px); opacity: 1; }
}

.welcome-chat .logo-mark-center {
    margin-bottom: 20px;
}

.welcome-chat { max-width: 860px; margin: 0 auto; text-align: center; padding: 48px 24px; }
.welcome-chat h1 { font-size: 28px; font-weight: 800; margin-bottom: 8px; color: var(--gray-900); }
.welcome-chat p { color: var(--gray-500); margin-bottom: 32px; font-size: 15px; }
.suggest-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; text-align: left; }
.suggest-card {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 16px;
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s;
}
.suggest-card:hover {
    border-color: var(--blue-600);
    box-shadow: var(--shadow-sm);
}
.suggest-card .cat { font-size: 11px; font-weight: 600; color: var(--blue-600); }
.suggest-card p { font-size: 13px; margin-top: 4px; color: var(--gray-700); line-height: 1.5; }

@media (max-width: 768px) {
    .chat-messages { padding: 24px 16px 100px; }
    .message-text { max-width: 85%; font-size: 14px; }
    .welcome-chat { padding: 32px 16px; }
    .welcome-chat h1 { font-size: 22px; }
}

/* Admin */
.admin-wrap { min-height: 100vh; background: var(--gray-100); }
.admin-nav {
    background: #fff;
    border-bottom: 1px solid var(--gray-200);
    padding: 0 24px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.admin-nav-links { display: flex; gap: 20px; font-size: 14px; margin-left: 24px; }
.admin-nav-links a { color: var(--gray-600); font-weight: 500; }
.admin-nav-links a:hover { color: var(--blue-700); }
.admin-content { max-width: 960px; margin: 0 auto; padding: 32px 16px; }
.admin-card {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 28px;
}
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th, .admin-table td { padding: 12px; text-align: left; border-bottom: 1px solid var(--gray-100); }
.admin-table th { background: var(--gray-50); font-weight: 600; color: var(--gray-600); font-size: 12px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--gray-700); }
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--gray-200);
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
}
.form-group textarea { min-height: 120px; resize: vertical; }
.badge { font-size: 11px; padding: 3px 8px; border-radius: 999px; font-weight: 600; }
.badge-green { background: #dcfce7; color: #166534; }
.badge-gray { background: var(--gray-100); color: var(--gray-500); }
.alert { padding: 12px 16px; border-radius: 8px; font-size: 14px; margin-bottom: 16px; }
.alert-error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.alert-success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }

@media (max-width: 900px) {
    .main-nav { display: none; }
    .menu-toggle { display: flex; }
    .header-cta {
        display: inline-flex;
        margin-left: auto;
        padding: 8px 12px;
        font-size: 12px;
    }
    .header-inner { gap: 10px; }
    .ai-form { flex-direction: column; }
    .post-grid { grid-template-columns: 1fr; }
    .post-grid-home { grid-template-columns: 1fr; }
    .post-grid-category { grid-template-columns: 1fr; }
    .subcategory-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 16px 18px;
    }
    .subcategory-more { align-self: flex-end; }
    .post-preview-item { padding: 14px 18px; }
    .page-header h1 { font-size: 24px; }
}

@media (min-width: 601px) and (max-width: 900px) {
    .post-grid-home { grid-template-columns: repeat(2, 1fr); }
    .post-grid-category { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .hero { padding: 32px 0 28px; }
    .section { padding: 40px 0; }
    .category-grid { grid-template-columns: 1fr; }
}

/* Banner slider (LawTalk-style ad) */
.banner-slider-section {
    padding: 16px 0 0;
    background: var(--gray-50);
}

.banner-slider {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.banner-slider-track {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 5;
    min-height: 190px;
    max-height: 300px;
}

.banner-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity .45s ease;
    pointer-events: none;
}

.banner-slide.is-active {
    opacity: 1;
    pointer-events: auto;
}

.banner-slide-link {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
}

.banner-slide-link::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(6, 78, 59, .9) 0%, rgba(5, 150, 105, .72) 54%, rgba(5, 150, 105, .12) 100%);
    pointer-events: none;
    z-index: 1;
}

.banner-slide-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 58%;
    display: block;
}

.banner-ad-label {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, .55);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    letter-spacing: .02em;
    z-index: 2;
}

.banner-copy {
    position: absolute;
    z-index: 2;
    top: 50%;
    left: clamp(32px, 6vw, 84px);
    width: min(48%, 570px);
    color: #fff;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.banner-eyebrow {
    margin-bottom: 8px;
    color: #6ee7b7;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .12em;
}

.banner-title {
    font-size: clamp(20px, 2.2vw, 32px);
    font-weight: 800;
    line-height: 1.25;
    word-break: keep-all;
}

.banner-description {
    margin-top: 10px;
    color: rgba(255, 255, 255, .82);
    font-size: clamp(12px, 1.2vw, 15px);
    line-height: 1.6;
    word-break: keep-all;
}

.banner-button {
    margin-top: 18px;
    padding: 9px 15px;
    border: 1px solid rgba(255, 255, 255, .45);
    border-radius: 8px;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    backdrop-filter: blur(4px);
}

.banner-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, .92);
    color: var(--gray-700);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
    z-index: 2;
}

.banner-prev { left: 12px; }
.banner-next { right: 12px; }

.banner-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 2;
}

.banner-dot {
    width: 8px;
    height: 8px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, .55);
    cursor: pointer;
    padding: 0;
}

.banner-dot.is-active {
    background: #fff;
    transform: scale(1.15);
}

.admin-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 16px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.admin-table th,
.admin-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--gray-200);
    text-align: left;
}

.admin-table tr.is-selected td {
    background: var(--blue-50);
}

.detail-list {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 8px 12px;
    font-size: 14px;
    margin-bottom: 16px;
}

.detail-list dt { color: var(--gray-500); font-weight: 500; }
.detail-body {
    background: var(--gray-50);
    border-radius: var(--radius);
    padding: 16px;
    font-size: 14px;
    line-height: 1.7;
    white-space: pre-wrap;
}

.badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--gray-100);
    color: var(--gray-600);
}

.badge-new { background: #fef3c7; color: #92400e; }
.badge-read { background: var(--blue-50); color: var(--blue-700); }
.badge-replied { background: #dcfce7; color: #166534; }

.required { color: #dc2626; }

.alert-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-size: 14px;
}

@media (max-width: 900px) {
    .admin-grid-2 { grid-template-columns: 1fr; }
    .banner-slider-track {
        aspect-ratio: 16 / 7;
        min-height: 200px;
        max-height: 260px;
    }
    .banner-copy {
        left: 28px;
        width: 58%;
    }
}

@media (max-width: 600px) {
    .banner-slider-section { padding-top: 10px; }
    .banner-slider-track {
        aspect-ratio: auto;
        height: 250px;
        min-height: 250px;
    }
    .banner-slide-link img {
        object-position: 67% center;
    }
    .banner-slide-link::after {
        background: linear-gradient(90deg, rgba(6, 78, 59, .94) 0%, rgba(5, 150, 105, .82) 58%, rgba(5, 150, 105, .18) 100%);
    }
    .banner-copy {
        left: 22px;
        width: calc(100% - 44px);
    }
    .banner-title { max-width: 82%; }
    .banner-description {
        max-width: 82%;
        margin-top: 8px;
    }
    .banner-button { margin-top: 14px; }
    .content-disclaimer-section { padding: 20px 0 28px; }
    .content-disclaimer {
        gap: 10px;
        padding: 16px;
    }
    .content-disclaimer p {
        font-size: 12px;
        word-break: normal;
    }
}
