/* =========================================================
   꿈해몽 스튜디오 — 디자인 시스템
   콘셉트: 한밤의 하늘(남색) · 달빛(금색) · 새벽 안개(라벤더)
   ========================================================= */

:root {
    --ink: #0d1024;
    --night: #12162e;
    --night-2: #181d3b;
    --surface: rgba(255, 255, 255, 0.04);
    --surface-2: rgba(255, 255, 255, 0.07);
    --line: rgba(220, 210, 255, 0.12);
    --line-strong: rgba(220, 210, 255, 0.22);

    --text: #eceaf6;
    --text-soft: #c4c1da;
    --text-mute: #8f8cab;

    --moon: #e8c67a;
    --moon-soft: #f3dfae;
    --moon-deep: #c9a24f;
    --mist: #b9a8e6;
    --dawn: #f0a8b8;

    --ok: #8fd3b0;
    --warn: #f2b880;
    --danger: #f08a8a;

    --serif: 'Gowun Batang', 'Nanum Myeongjo', serif;
    --sans: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;

    --radius: 18px;
    --radius-sm: 12px;
    --shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.6);
    --wrap: 1120px;
    --header-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--ink);
    color: var(--text);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.75;
    word-break: keep-all;
    overflow-wrap: anywhere;
    -webkit-font-smoothing: antialiased;
}

/* 밤하늘 배경: 은은한 별 + 오로라 */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(1px 1px at 12% 18%, rgba(255,255,255,.55), transparent 60%),
        radial-gradient(1px 1px at 72% 12%, rgba(255,255,255,.45), transparent 60%),
        radial-gradient(1.5px 1.5px at 38% 62%, rgba(255,255,255,.35), transparent 60%),
        radial-gradient(1px 1px at 86% 48%, rgba(255,255,255,.4), transparent 60%),
        radial-gradient(1px 1px at 22% 84%, rgba(255,255,255,.3), transparent 60%),
        radial-gradient(1.5px 1.5px at 58% 30%, rgba(243,223,174,.5), transparent 60%),
        radial-gradient(1px 1px at 92% 82%, rgba(255,255,255,.35), transparent 60%),
        radial-gradient(900px 500px at 85% -10%, rgba(185,168,230,.13), transparent 70%),
        radial-gradient(700px 500px at -10% 20%, rgba(240,168,184,.07), transparent 70%),
        var(--ink);
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 700; line-height: 1.35; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
::selection { background: rgba(232,198,122,.35); color: #fff; }

:focus-visible { outline: 2px solid var(--moon); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.wrap-narrow { max-width: 780px; }
.wrap-tight { max-width: 520px; }
main { flex: 1; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- 공통 요소 ---------- */
.eyebrow {
    display: inline-flex; align-items: center; gap: 10px;
    font-size: 13px; letter-spacing: .18em; color: var(--moon);
    text-transform: uppercase;
}
.eyebrow::before { content: ''; width: 22px; height: 1px; background: currentColor; opacity: .7; }

.moon-mark { width: 1em; height: 1em; display: inline-block; vertical-align: -0.12em; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 48px; padding: 0 26px; border-radius: 999px;
    border: 1px solid transparent; cursor: pointer;
    font-weight: 600; font-size: 15px; white-space: nowrap;
    transition: transform .2s ease, background .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease;
}
.btn:active { transform: translateY(1px); }
.btn-moon {
    background: linear-gradient(180deg, var(--moon-soft), var(--moon));
    color: #241a05;
    box-shadow: 0 8px 30px -8px rgba(232,198,122,.55);
}
.btn-moon:hover { box-shadow: 0 10px 40px -6px rgba(232,198,122,.75); }
.btn-ghost { border-color: var(--line-strong); color: var(--text); background: rgba(255,255,255,.02); }
.btn-ghost:hover { border-color: var(--moon); color: var(--moon-soft); }
.btn-danger { border-color: rgba(240,138,138,.35); color: var(--danger); background: transparent; }
.btn-danger:hover { background: rgba(240,138,138,.1); }
.btn-sm { height: 38px; padding: 0 16px; font-size: 14px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

.card {
    background: linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.025));
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.card-pad { padding: 32px; }

.divider-moon {
    display: flex; align-items: center; gap: 14px; color: var(--moon); opacity: .8;
    justify-content: center; margin: 0 auto;
}
.divider-moon::before, .divider-moon::after { content: ''; height: 1px; width: 60px; background: linear-gradient(90deg, transparent, currentColor); }
.divider-moon::after { transform: scaleX(-1); }

.alert {
    padding: 14px 18px; border-radius: var(--radius-sm); margin-bottom: 24px;
    border: 1px solid; font-size: 15px;
}
.alert-success { color: var(--ok); border-color: rgba(143,211,176,.3); background: rgba(143,211,176,.07); }
.alert-error { color: var(--danger); border-color: rgba(240,138,138,.3); background: rgba(240,138,138,.07); }
.alert ul { margin: 0; padding-left: 18px; }

/* ---------- 헤더 ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    height: var(--header-h);
    background: rgba(13,16,36,.72);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    border-bottom: 1px solid var(--line);
}
.site-header .wrap { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand img { width: 36px; height: 36px; border-radius: 10px; }
.brand-name { font-family: var(--serif); font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.brand-name em { font-style: normal; color: var(--moon); }

.nav { display: flex; align-items: center; gap: 6px; }
.nav-link {
    padding: 8px 14px; border-radius: 999px; color: var(--text-soft); font-size: 15px;
    transition: color .2s, background .2s; background: none; border: 0; cursor: pointer;
    display: inline-flex; align-items: center; gap: 6px;
}
.nav-link:hover, .nav-link[aria-current="page"] { color: var(--text); background: var(--surface-2); }
.nav-link svg { width: 14px; height: 14px; opacity: .7; }

.dropdown { position: relative; }
.dropdown-panel {
    position: absolute; top: calc(100% + 10px); left: 50%; transform: translate(-50%, 6px);
    min-width: 360px; padding: 14px;
    background: rgba(20,24,50,.97); border: 1px solid var(--line-strong); border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px;
    opacity: 0; visibility: hidden; transition: opacity .18s, transform .18s, visibility .18s;
}
.dropdown-panel.align-right { left: auto; right: 0; transform: translateY(6px); min-width: 200px; grid-template-columns: 1fr; }
.dropdown:hover .dropdown-panel, .dropdown:focus-within .dropdown-panel, .dropdown.open .dropdown-panel {
    opacity: 1; visibility: visible; transform: translate(-50%, 0);
}
.dropdown:hover .dropdown-panel.align-right, .dropdown:focus-within .dropdown-panel.align-right, .dropdown.open .dropdown-panel.align-right { transform: translateY(0); }
.dropdown::after { content: ''; position: absolute; left: 0; right: 0; top: 100%; height: 12px; }
.dropdown-panel a {
    padding: 10px 12px; border-radius: 10px; font-size: 15px; color: var(--text-soft);
    display: flex; align-items: center; gap: 10px;
}
.dropdown-panel a:hover { background: var(--surface-2); color: var(--text); }
.dropdown-panel .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--moon); opacity: .6; }
.dropdown-panel .danger { color: var(--danger); }

.avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line-strong); }

.nav-toggle { display: none; background: none; border: 1px solid var(--line-strong); border-radius: 12px; width: 42px; height: 42px; cursor: pointer; align-items: center; justify-content: center; }
.nav-toggle svg { width: 20px; height: 20px; }

.mobile-menu {
    display: none; position: fixed; inset: var(--header-h) 0 0 0; z-index: 49;
    background: rgba(13,16,36,.98); overflow-y: auto; padding: 24px 20px 40px;
}
.mobile-menu.open { display: block; }
.mobile-menu h4 { font-family: var(--sans); font-size: 12px; letter-spacing: .16em; color: var(--text-mute); margin: 24px 0 10px; font-weight: 500; }
.mobile-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mobile-grid a, .mobile-list a {
    padding: 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); text-align: center; font-size: 15px;
}
.mobile-list { display: grid; gap: 8px; }
.mobile-list a { text-align: left; }
.mobile-menu .btn { width: 100%; margin-top: 8px; }

@media (max-width: 960px) {
    .nav { display: none; }
    .nav-toggle { display: inline-flex; }
}

/* ---------- 푸터 ---------- */
.site-footer { margin-top: 96px; border-top: 1px solid var(--line); padding: 56px 0 40px; color: var(--text-mute); font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 40px; }
.footer-grid h5 { font-family: var(--sans); font-size: 12px; letter-spacing: .16em; color: var(--text-soft); margin: 0 0 14px; font-weight: 600; }
.footer-links { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 8px 22px; }
.footer-links a:hover, .footer-bottom a:hover { color: var(--moon-soft); }
.footer-about p { margin-top: 12px; max-width: 320px; line-height: 1.7; }
.footer-bottom { margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer-bottom nav { display: flex; gap: 18px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 32px; } }

/* ---------- 홈: 히어로 ---------- */
.hero {
    position: relative; overflow: hidden;
    min-height: min(720px, 88vh);
    display: flex; align-items: center;
    padding: 80px 0 120px;
    margin-top: calc(var(--header-h) * -1);
    padding-top: calc(var(--header-h) + 60px);
}
.hero-bg { position: absolute; inset: 0; z-index: -1; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: center 40%; }
.hero-bg::after {
    content: ''; position: absolute; inset: 0;
    background:
        linear-gradient(180deg, rgba(13,16,36,.55) 0%, rgba(13,16,36,.35) 35%, rgba(13,16,36,.85) 78%, var(--ink) 100%),
        radial-gradient(60% 60% at 50% 45%, transparent, rgba(13,16,36,.45));
}
.hero-inner { text-align: center; max-width: 760px; margin: 0 auto; }
.hero h1 { font-size: clamp(34px, 6vw, 60px); margin: 20px 0 18px; text-shadow: 0 4px 30px rgba(0,0,0,.5); }
.hero h1 .glow { color: var(--moon-soft); }
.hero-lead { font-size: clamp(16px, 2.2vw, 19px); color: var(--text-soft); max-width: 560px; margin: 0 auto; }

.dream-box {
    margin: 40px auto 0; max-width: 640px; text-align: left;
    background: rgba(18,22,46,.78); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--line-strong); border-radius: 22px; padding: 18px 18px 14px;
    box-shadow: 0 30px 80px -30px rgba(0,0,0,.8), 0 0 0 6px rgba(185,168,230,.05);
}
.dream-box textarea {
    width: 100%; min-height: 84px; resize: none; border: 0; background: transparent; outline: none;
    font-size: 16px; line-height: 1.7; color: var(--text);
}
.dream-box textarea::placeholder { color: var(--text-mute); }
.dream-box-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; }
.dream-box-foot small { color: var(--text-mute); font-size: 13px; }
.hero-chips { margin-top: 18px; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.chip {
    font-size: 14px; padding: 7px 14px; border-radius: 999px; cursor: pointer;
    background: rgba(255,255,255,.05); border: 1px solid var(--line); color: var(--text-soft);
    transition: border-color .2s, color .2s;
}
.chip:hover { border-color: var(--moon); color: var(--moon-soft); }

/* ---------- 섹션 ---------- */
.section { padding: 88px 0 0; }
.section-head { text-align: center; max-width: 620px; margin: 0 auto 48px; }
.section-head h2 { font-size: clamp(26px, 4vw, 36px); margin: 14px 0 12px; }
.section-head p { color: var(--text-soft); }

/* 카테고리 카드 */
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.cat-card {
    position: relative; display: block; overflow: hidden; border-radius: var(--radius);
    aspect-ratio: 4 / 3.1; border: 1px solid var(--line);
    isolation: isolate;
}
.cat-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .7s ease; }
.cat-card::before {
    content: ''; position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(180deg, rgba(13,16,36,0) 25%, rgba(13,16,36,.7) 62%, rgba(13,16,36,.96) 100%);
}
.cat-card:hover img { transform: scale(1.06); }
.cat-card-body { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 22px 20px; }
.cat-card h3 { font-size: 24px; display: flex; align-items: center; justify-content: space-between; }
.cat-card h3 .arrow { font-family: var(--sans); font-size: 18px; color: var(--moon); transition: transform .3s; }
.cat-card:hover h3 .arrow { transform: translateX(4px); }
.cat-card p { margin-top: 6px; font-size: 14px; line-height: 1.6; color: var(--text-soft); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cat-card .tag { font-size: 12px; letter-spacing: .14em; color: var(--moon); }
@media (max-width: 900px) { .cat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .cat-grid { grid-template-columns: 1fr; } .cat-card { aspect-ratio: 16 / 10; } }

/* 이용 방법 */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
.step { padding: 30px 28px; position: relative; }
.step::before {
    counter-increment: step; content: counter(step, decimal-leading-zero);
    font-family: var(--serif); font-size: 15px; color: var(--moon); letter-spacing: .1em;
}
.step h3 { font-size: 20px; margin: 14px 0 8px; }
.step p { color: var(--text-soft); font-size: 15px; }
@media (max-width: 800px) { .steps { grid-template-columns: 1fr; } }

/* 하단 CTA */
.cta-band {
    position: relative; overflow: hidden; text-align: center;
    padding: 64px 28px; border-radius: 28px; border: 1px solid var(--line-strong);
    background:
        radial-gradient(500px 220px at 50% 0%, rgba(232,198,122,.16), transparent 70%),
        linear-gradient(180deg, var(--night-2), var(--night));
}
.cta-band h2 { font-size: clamp(24px, 3.6vw, 34px); margin: 18px 0 10px; }
.cta-band p { color: var(--text-soft); margin-bottom: 28px; }

/* ---------- 서브 페이지 머리 ---------- */
.page-hero { position: relative; padding: 72px 0 56px; text-align: center; overflow: hidden; }
.page-hero h1 { font-size: clamp(30px, 5vw, 46px); margin: 14px 0 12px; }
.page-hero p { color: var(--text-soft); max-width: 560px; margin: 0 auto; }
.page-hero.has-image { padding: 120px 0 72px; margin-top: calc(var(--header-h) * -1); padding-top: calc(var(--header-h) + 100px); }
.page-hero .hero-bg::after {
    background: linear-gradient(180deg, rgba(13,16,36,.6), rgba(13,16,36,.55) 40%, var(--ink) 100%);
}
.crumbs { font-size: 14px; color: var(--text-mute); display: inline-flex; gap: 8px; }
.crumbs a:hover { color: var(--moon-soft); }

/* ---------- 꿈 사전(카테고리) 본문 ---------- */
.dict-intro { font-size: 18px; color: var(--text-soft); text-align: center; max-width: 680px; margin: 0 auto 48px; line-height: 1.9; }
.symbol-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.symbol {
    padding: 28px 28px 26px; border-radius: var(--radius); border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.015));
    transition: border-color .25s, transform .25s;
}
.symbol:hover { border-color: rgba(232,198,122,.35); transform: translateY(-2px); }
.symbol h3 { font-size: 22px; display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.symbol h3::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--moon); box-shadow: 0 0 12px var(--moon); flex-shrink: 0; }
.symbol p { color: var(--text-soft); font-size: 15.5px; }
@media (max-width: 720px) { .symbol-grid { grid-template-columns: 1fr; } }

.dict-block { margin-top: 72px; }
.dict-block > h2 { font-size: 28px; text-align: center; margin-bottom: 8px; }
.dict-block > .sub { text-align: center; color: var(--text-mute); margin-bottom: 32px; }

.scene-list { border-top: 1px solid var(--line); }
.scene {
    display: grid; grid-template-columns: 220px 1fr; gap: 28px;
    padding: 28px 4px; border-bottom: 1px solid var(--line);
}
.scene h3 { font-size: 20px; color: var(--moon-soft); }
.scene p { color: var(--text-soft); }
@media (max-width: 720px) { .scene { grid-template-columns: 1fr; gap: 8px; } }

.related { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

/* ---------- 상담(채팅) ---------- */
.chat-layout { display: grid; grid-template-columns: 1fr 300px; gap: 24px; align-items: start; }
@media (max-width: 960px) { .chat-layout { grid-template-columns: 1fr; } }

.chat-panel { display: flex; flex-direction: column; height: clamp(520px, calc(100vh - var(--header-h) - 280px), 760px); overflow: hidden; }
.page-hero.compact { padding: 40px 0 28px; }
.page-hero.compact h1 { font-size: clamp(26px, 4vw, 36px); }
.chat-head {
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    padding: 18px 22px; border-bottom: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(232,198,122,.06), transparent);
}
.counselor { display: flex; align-items: center; gap: 12px; }
.counselor-avatar {
    width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
    display: grid; place-items: center;
    background: radial-gradient(circle at 35% 35%, #2a2f5c, #12162e);
    border: 1px solid rgba(232,198,122,.4);
    box-shadow: 0 0 24px -4px rgba(232,198,122,.45);
    color: var(--moon);
}
.counselor-avatar svg { width: 22px; height: 22px; }
.counselor strong { font-family: var(--serif); font-size: 18px; display: block; line-height: 1.3; }
.counselor span { font-size: 13px; color: var(--text-mute); }
.counselor .online::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); margin-right: 6px; vertical-align: 1px; }

.chat-scroll { flex: 1; overflow-y: auto; padding: 26px 22px; scroll-behavior: smooth; }
.chat-scroll::-webkit-scrollbar { width: 8px; }
.chat-scroll::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 8px; }

.msg { display: flex; gap: 12px; margin-bottom: 22px; animation: rise .35s ease both; }
.msg .counselor-avatar { width: 34px; height: 34px; }
.msg .counselor-avatar svg { width: 17px; height: 17px; }
.bubble { max-width: min(560px, 82%); padding: 14px 18px; border-radius: 18px; font-size: 15.5px; line-height: 1.8; }
.msg-ai .bubble { background: var(--surface-2); border: 1px solid var(--line); border-top-left-radius: 6px; }
.msg-user { justify-content: flex-end; }
.msg-user .bubble { background: linear-gradient(180deg, #3a3470, #2d2a5c); border: 1px solid rgba(185,168,230,.25); border-top-right-radius: 6px; }
.msg-user .avatar { width: 34px; height: 34px; }
.msg-system { justify-content: center; }
.msg-system .bubble { font-size: 14px; color: var(--warn); background: rgba(242,184,128,.07); border: 1px solid rgba(242,184,128,.25); text-align: center; }
.bubble mark { background: none; color: var(--moon-soft); font-weight: 600; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.typing { display: inline-flex; gap: 5px; padding: 4px 0; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--moon); opacity: .4; animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; }
.typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

.chat-input { border-top: 1px solid var(--line); padding: 14px 16px 12px; background: rgba(13,16,36,.4); }
.chat-input form { display: flex; gap: 10px; align-items: flex-end; }
.chat-input textarea {
    flex: 1; resize: none; min-height: 50px; max-height: 160px;
    padding: 13px 16px; border-radius: 16px; border: 1px solid var(--line-strong);
    background: rgba(255,255,255,.04); outline: none; line-height: 1.6;
    transition: border-color .2s;
}
.chat-input textarea:focus { border-color: var(--moon); }
.chat-input textarea::placeholder { color: var(--text-mute); }
.chat-input .btn { height: 50px; width: 50px; padding: 0; flex-shrink: 0; }
.chat-input .btn svg { width: 20px; height: 20px; }
.chat-meta { display: flex; justify-content: space-between; gap: 10px; margin-top: 8px; font-size: 12.5px; color: var(--text-mute); padding: 0 4px; }

.side-card { padding: 24px; margin-bottom: 16px; }
.side-card h3 { font-size: 17px; margin-bottom: 14px; }
.meter { display: flex; align-items: baseline; gap: 6px; }
.meter b { font-family: var(--serif); font-size: 34px; color: var(--moon-soft); font-weight: 700; }
.meter span { color: var(--text-mute); }
.meter-bar { height: 6px; border-radius: 6px; background: var(--surface-2); margin: 12px 0 8px; overflow: hidden; }
.meter-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--mist), var(--moon)); border-radius: 6px; transition: width .4s; }
.side-card small { color: var(--text-mute); font-size: 13px; line-height: 1.6; display: block; }
.tips { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.tips li { font-size: 14.5px; color: var(--text-soft); padding-left: 18px; position: relative; line-height: 1.6; }
.tips li::before { content: '☾'; position: absolute; left: 0; color: var(--moon); font-size: 12px; top: 2px; }

/* ---------- 폼 ---------- */
.field { margin-bottom: 22px; }
.field label { display: block; font-size: 14px; color: var(--text-soft); margin-bottom: 8px; }
.input, .textarea, .select {
    width: 100%; padding: 13px 16px; border-radius: 14px;
    border: 1px solid var(--line-strong); background: rgba(255,255,255,.04); outline: none;
    transition: border-color .2s;
}
.input:focus, .textarea:focus, .select:focus { border-color: var(--moon); }
.select option { background: var(--night); }
.textarea { min-height: 220px; resize: vertical; line-height: 1.7; }
.field-hint { font-size: 13px; color: var(--text-mute); margin-top: 6px; }
.check { display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--text-soft); margin-bottom: 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--moon); }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 28px; flex-wrap: wrap; }

/* ---------- 로그인 ---------- */
.auth-card { padding: 44px 36px; text-align: center; }
.auth-card .moon-big { width: 64px; height: 64px; margin: 0 auto 18px; color: var(--moon); filter: drop-shadow(0 0 18px rgba(232,198,122,.5)); }
.auth-card h1 { font-size: 28px; margin-bottom: 10px; }
.auth-card > p { color: var(--text-soft); margin-bottom: 30px; }
.google-btn {
    display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; height: 54px;
    border-radius: 14px; background: #fff; color: #1f1f1f; font-weight: 600; font-size: 16px;
    transition: transform .2s, box-shadow .2s;
}
.google-btn:hover { box-shadow: 0 10px 30px -10px rgba(255,255,255,.35); transform: translateY(-1px); }
.google-btn svg { width: 20px; height: 20px; }
.auth-legal { margin-top: 22px; font-size: 13px; color: var(--text-mute); line-height: 1.7; }
.auth-legal a { color: var(--moon-soft); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- 프로필 / 꿈 일기 ---------- */
.profile-head { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.profile-head .avatar { width: 84px; height: 84px; border: 2px solid rgba(232,198,122,.5); }
.profile-head h1 { font-size: 30px; }
.profile-head p { color: var(--text-mute); }
.profile-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 32px 0 48px; }
.stat { padding: 20px 22px; }
.stat b { font-family: var(--serif); font-size: 28px; color: var(--moon-soft); display: block; }
.stat span { font-size: 13px; color: var(--text-mute); }
@media (max-width: 640px) { .stat-row { grid-template-columns: 1fr 1fr 1fr; } .stat { padding: 16px; } .stat b { font-size: 22px; } }

.journal-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.journal-head h2 { font-size: 24px; }
.journal { display: grid; gap: 14px; }
.entry { padding: 24px 26px; display: grid; grid-template-columns: 74px 1fr; gap: 22px; transition: border-color .25s; }
.entry:hover { border-color: rgba(232,198,122,.3); }
.entry-date { text-align: center; border-right: 1px solid var(--line); padding-right: 18px; }
.entry-date b { font-family: var(--serif); font-size: 30px; display: block; line-height: 1.1; color: var(--moon-soft); }
.entry-date span { font-size: 12px; color: var(--text-mute); letter-spacing: .06em; }
.entry h3 { font-size: 19px; margin-bottom: 6px; }
.entry h3 a:hover { color: var(--moon-soft); }
.entry .excerpt { color: var(--text-soft); font-size: 15px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.entry .reading { line-height: 1.7; max-height: calc(1.7em * 2 + 24px); margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: rgba(232,198,122,.05); border: 1px solid rgba(232,198,122,.14); font-size: 14px; color: var(--text-soft); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.entry .reading::before { content: '달빛의 해몽 · '; color: var(--moon); }
.entry-actions { display: flex; gap: 16px; margin-top: 12px; font-size: 14px; }
.entry-actions a { color: var(--text-mute); }
.entry-actions a:hover { color: var(--moon-soft); }
.entry-actions a.del:hover { color: var(--danger); }
@media (max-width: 560px) { .entry { grid-template-columns: 1fr; gap: 12px; } .entry-date { border: 0; padding: 0; text-align: left; display: flex; gap: 8px; align-items: baseline; } .entry-date b { font-size: 20px; } }

.empty { text-align: center; padding: 56px 28px; }
.empty .moon-big { width: 56px; height: 56px; margin: 0 auto 16px; color: var(--moon); opacity: .8; }
.empty h3 { font-size: 22px; margin-bottom: 8px; }
.empty p { color: var(--text-soft); margin-bottom: 24px; }

.reading-block { padding: 34px 36px; }
.reading-block + .reading-block { margin-top: 18px; }
.reading-block h2 { font-size: 15px; font-family: var(--sans); letter-spacing: .14em; color: var(--moon); font-weight: 600; margin-bottom: 14px; }
.reading-block .body { font-size: 16.5px; line-height: 1.95; color: var(--text); }
.reading-block.is-reading { background: linear-gradient(180deg, rgba(232,198,122,.06), rgba(255,255,255,.02)); border-color: rgba(232,198,122,.2); }
.view-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; flex-wrap: wrap; }

/* ---------- 문서(약관/개인정보) ---------- */
.prose h2 { font-size: 20px; margin: 36px 0 12px; color: var(--moon-soft); }
.prose p, .prose li { color: var(--text-soft); }
.prose ul { padding-left: 20px; }
.prose p + p { margin-top: 12px; }

/* ---------- 관리자 에디터 ---------- */
.admin-grid { display: grid; grid-template-columns: 240px 1fr; gap: 20px; }
.admin-files { padding: 16px; display: grid; gap: 4px; align-content: start; }
.admin-files a { padding: 9px 12px; border-radius: 10px; font-size: 14px; color: var(--text-soft); }
.admin-files a:hover, .admin-files a.active { background: var(--surface-2); color: var(--moon-soft); }
.code-area { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; min-height: 520px; }
@media (max-width: 860px) { .admin-grid { grid-template-columns: 1fr; } }

/* ---------- 등장 애니메이션 ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .8s ease, transform .8s ease; }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .reveal { opacity: 1; transform: none; }
}

.mt-0 { margin-top: 0; } .mt-6 { margin-top: 24px; } .mt-10 { margin-top: 40px; }
.center { text-align: center; }
.text-mute { color: var(--text-mute); }
