/* AI마음쉼터 — 공용 스타일. 색은 아래 :root 변수만 바꾸면 전체에 반영됩니다. */
:root {
  --night: #16233A;
  --night-panel: #1F3150;
  --night-line: #2E4366;
  --on-night: #EEF2F8;
  --on-night-soft: #AFC0D6;
  --gold: #F2C46D;
  --gold-deep: #B8862C;
  --paper: #F3F4F1;
  --card: #FFFFFF;
  --ink: #1B2420;
  --ink-soft: #46524B;
  --line: #DAD9D0;
  --link: #226EA7;
  --link-deep: #17507E;
  --calm: #E4EDE2;
  --calm-ink: #2F5D3A;
  --warn: #FBEBDD;
  --warn-ink: #8A4B12;
  --danger: #F8E3E0;
  --danger-ink: #8E2F25;
  --radius: 12px;
  --wrap: 1120px;
  --gutter: 20px;
  --font-head: 'Gowun Batang', 'Nanum Myeongjo', serif;
  --font-body: 'Gothic A1', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  word-break: keep-all;
  overflow-wrap: break-word;
}
img { max-width: 100%; display: block; }
a { color: var(--link); text-underline-offset: 3px; }
a:hover { color: var(--link-deep); }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.35; margin: 0; font-weight: 700; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: 12px; top: 12px; z-index: 100; background: var(--card); color: var(--ink); padding: 8px 14px; border-radius: 8px; }

/* ── 머리말 ── */
.site-header { background: var(--night); color: var(--on-night); border-bottom: 1px solid var(--night-line); position: sticky; top: 0; z-index: 50; }
.hd { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--on-night); text-decoration: none; font-family: var(--font-head); font-weight: 700; font-size: 20px; white-space: nowrap; }
.logo:hover { color: #fff; }
.logo svg { width: 28px; height: 28px; flex: none; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { color: var(--on-night-soft); text-decoration: none; font-size: 16px; padding: 8px 12px; border-radius: 8px; white-space: nowrap; }
.nav a:hover { color: #fff; background: var(--night-panel); }
.nav a[aria-current="page"] { color: #fff; box-shadow: inset 0 -2px 0 var(--gold); border-radius: 0; }
.nav a.ext { color: var(--gold); margin-left: 6px; border: 1px solid rgba(242,196,109,.45); }
.nav a.ext:hover { background: rgba(242,196,109,.12); }
.menu-btn { display: none; background: transparent; color: var(--on-night); border: 1px solid var(--night-line); border-radius: 8px; min-height: 44px; padding: 0 14px; font: inherit; font-size: 16px; cursor: pointer; align-items: center; gap: 8px; }
.menu-btn .bars, .menu-btn .bars::before, .menu-btn .bars::after { display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; position: relative; transition: transform .2s, background .2s; }
.menu-btn .bars::before, .menu-btn .bars::after { content: ''; position: absolute; left: 0; }
.menu-btn .bars::before { top: -6px; } .menu-btn .bars::after { top: 6px; }
.menu-btn[aria-expanded="true"] .bars { background: transparent; }
.menu-btn[aria-expanded="true"] .bars::before { transform: translateY(6px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .bars::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 900px) {
  .menu-btn { display: inline-flex; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--night); border-bottom: 1px solid var(--night-line); flex-direction: column; align-items: stretch; padding: 8px var(--gutter) 18px; gap: 2px; }
  .nav.open { display: flex; }
  .nav a { padding: 12px 8px; font-size: 17px; border-bottom: 1px solid var(--night-line); border-radius: 0; }
  .nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--gold); padding-left: 14px; }
  .nav a.ext { margin: 10px 0 0; border-radius: 8px; text-align: center; }
}

/* ── 구역 공통 ── */
.section { padding: 80px 0; }
.section.tight { padding: 56px 0; }
.section.white { background: var(--card); }
.night { background: var(--night); color: var(--on-night); }
.night .lead, .night p { color: var(--on-night-soft); }
.eyebrow { display: inline-block; font-size: 15px; font-weight: 700; letter-spacing: .02em; color: var(--link); margin-bottom: 12px; }
.night .eyebrow { color: var(--gold); }
.sec-head { max-width: 760px; margin-bottom: 40px; }
.sec-head h2 { font-size: clamp(26px, 4.2vw, 38px); }
.sec-head .lead { margin-top: 16px; color: var(--ink-soft); font-size: 18px; }
.night .sec-head .lead { color: var(--on-night-soft); }
.note { font-size: 15px; color: var(--ink-soft); margin-top: 16px; }

.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.section.white .card { background: var(--paper); }
.card h3 { font-size: 21px; }
.card p { color: var(--ink-soft); font-size: 16px; }
.card .k { font-family: var(--font-head); font-size: 15px; font-weight: 700; color: var(--link); }
.night .card { background: var(--night-panel); border-color: var(--night-line); }
.night .card h3 { color: var(--on-night); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 24px; border-radius: 999px; font-weight: 700; font-size: 16px; text-decoration: none; border: 2px solid transparent; transition: background .2s, color .2s; }
.btn-gold { background: var(--gold); color: var(--night); }
.btn-gold:hover { background: #F7D58F; color: var(--night); }
.btn-line { border-color: var(--line); color: var(--ink); background: var(--card); }
.btn-line:hover { border-color: var(--link); color: var(--link); }
.night .btn-line { background: transparent; color: var(--on-night); border-color: var(--night-line); }
.night .btn-line:hover { border-color: var(--gold); color: var(--gold); }
.btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; font-size: 14px; font-weight: 600; border-radius: 999px; padding: 6px 14px; background: #E3EEF7; color: var(--link-deep); }
.night .chip { background: rgba(242,196,109,.14); color: var(--gold); }

/* ── 첫 화면 ── */
.hero { padding: 72px 0 80px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 56px; align-items: center; }
.hero .kicker { color: var(--gold); font-weight: 700; font-size: 16px; }
.hero h1 { font-size: clamp(42px, 8vw, 72px); color: #fff; margin: 12px 0 20px; letter-spacing: -.01em; }
.hero .tagline { font-family: var(--font-head); font-size: clamp(21px, 2.8vw, 27px); line-height: 1.6; color: var(--on-night); }
.hero .desc { margin-top: 18px; color: var(--on-night-soft); font-size: 17px; max-width: 560px; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--night-line); border: 1px solid var(--night-line); border-radius: 10px; overflow: hidden; margin-top: 28px; max-width: 560px; }
.facts div { background: var(--night-panel); padding: 14px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.facts b { font-family: var(--font-head); font-size: clamp(17px, 2.2vw, 22px); color: #fff; white-space: nowrap; }
.facts span { font-size: 14px; color: var(--on-night-soft); line-height: 1.5; }
.status { display: inline-flex; align-items: center; gap: 8px; margin-top: 20px; font-size: 15px; color: var(--on-night-soft); }
.status::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); flex: none; }

.clock-wrap { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.clock { width: min(360px, 100%); height: auto; }
.legend { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 16px; color: var(--on-night-soft); }
.legend li { display: flex; align-items: center; gap: 12px; }
.legend i { width: 34px; height: 12px; border-radius: 999px; flex: none; }
.legend .l-ai { background: var(--gold); }
.legend .l-school { background: var(--on-night-soft); }
.legend b { color: #fff; margin-right: 6px; }

/* 하위 화면 첫 화면 */
.page-hero { padding: 64px 0 60px; }
.page-hero h1 { font-size: clamp(32px, 5.6vw, 50px); color: #fff; margin: 8px 0 16px; }
.page-hero p { color: var(--on-night-soft); font-size: 18px; max-width: 720px; }
.page-hero .kicker { color: var(--gold); font-weight: 700; font-size: 15px; }

/* ── 통계 ── */
.stat { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 26px; margin-top: 16px; }
.stat .num { font-family: var(--font-head); font-size: clamp(40px, 6vw, 54px); font-weight: 700; color: var(--link); line-height: 1; font-variant-numeric: tabular-nums; }
.stat .bars { flex: 1 1 260px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.stat .bar { display: grid; grid-template-columns: 56px minmax(0,1fr) 64px; align-items: center; gap: 10px; font-size: 15px; }
.stat .bar i { display: block; height: 14px; border-radius: 999px; background: #BCD3E6; }
.stat .bar.y23 i { background: var(--link); }
.stat .bar span:last-child { font-variant-numeric: tabular-nums; font-weight: 700; }
.stat .src { flex-basis: 100%; font-size: 14px; color: var(--ink-soft); }

/* ── 3단계 ── */
.level { border-radius: var(--radius); padding: 26px; display: flex; flex-direction: column; gap: 10px; min-width: 0; border: 1px solid transparent; }
.level .tag { align-self: flex-start; font-size: 14px; font-weight: 700; border-radius: 999px; padding: 4px 12px; background: rgba(255,255,255,.7); }
.level h3 { font-size: 20px; }
.level p { font-size: 16px; color: #2F3A33; }
.lv1 { background: var(--calm); border-color: #CCDDC9; } .lv1 .tag { color: var(--calm-ink); }
.lv2 { background: var(--warn); border-color: #F1D2B6; } .lv2 .tag { color: var(--warn-ink); }
.lv3 { background: var(--danger); border-color: #EDC6C0; } .lv3 .tag { color: var(--danger-ink); }

/* ── 사진 + 글 ── */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.pic { border-radius: var(--radius); overflow: hidden; background: var(--calm); aspect-ratio: 4 / 3; }
.pic img { width: 100%; height: 100%; object-fit: cover; }
.pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 16px; }
.pair-card { border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; border: 1px solid var(--line); background: var(--card); }
.pair-card .pic { border-radius: 0; aspect-ratio: 16 / 9; }
.pair-card .body { padding: 22px 24px 26px; display: flex; flex-direction: column; gap: 6px; }
.pair-card .when { font-size: 14px; font-weight: 700; color: var(--calm-ink); }
.pair-card h3 { font-size: 22px; }
.pair-card p { font-size: 16px; color: var(--ink-soft); }
.pair-card.dark { background: var(--night); border-color: var(--night); color: var(--on-night); }
.pair-card.dark .when { color: var(--gold); }
.pair-card.dark p { color: var(--on-night-soft); }
.night-art { aspect-ratio: 16 / 9; background: radial-gradient(circle at 70% 30%, #2A4068 0%, var(--night) 70%); display: flex; align-items: center; justify-content: center; }
.night-art svg { width: 46%; height: auto; }

/* 흐름(번호 목록) */
.flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 12px; counter-reset: f; }
.flow li { counter-increment: f; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.flow li::before { content: counter(f, decimal-leading-zero); font-family: var(--font-head); font-size: 20px; font-weight: 700; color: var(--calm-ink); }
.flow li.n::before { color: var(--gold-deep); }
.flow b { font-size: 17px; }
.flow span { font-size: 15px; line-height: 1.65; color: var(--ink-soft); }
.flow-cap { display: flex; gap: 18px; flex-wrap: wrap; font-size: 14px; color: var(--ink-soft); margin-top: 14px; }
.flow-cap span::before { content: ''; display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: 0; }
.flow-cap .d::before { background: var(--calm-ink); }
.flow-cap .nn::before { background: var(--gold-deep); }

/* 세로 단계(상담 흐름) */
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0; position: relative; }
.steps li { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 18px; padding-bottom: 26px; position: relative; }
.steps li::after { content: ''; position: absolute; left: 25px; top: 52px; bottom: 0; width: 2px; background: var(--line); }
.steps li:last-child::after { display: none; }
.steps .dot { width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: var(--font-head); font-weight: 700; font-size: 18px; background: var(--card); border: 2px solid var(--line); color: var(--ink); }
.steps .s-calm .dot { background: var(--calm); border-color: #CCDDC9; }
.steps .s-warn .dot { background: var(--warn); border-color: #F1D2B6; }
.steps .s-danger .dot { background: var(--danger); border-color: #EDC6C0; }
.steps h3 { font-size: 20px; margin-top: 10px; }
.steps p { color: var(--ink-soft); font-size: 16px; margin-top: 6px; }
.steps .quote { display: inline-block; margin-top: 10px; font-family: var(--font-head); background: var(--card); border-left: 3px solid var(--gold); padding: 8px 14px; border-radius: 0 8px 8px 0; color: var(--ink); }

/* 채널 */
.channel { background: var(--night-panel); border: 1px solid var(--night-line); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.channel svg { width: 44px; height: 44px; color: var(--gold); }
.channel h3 { color: #fff; font-size: 23px; }
.channel p { color: var(--on-night-soft); font-size: 16px; }
.channel ul { margin: 6px 0 0; padding-left: 20px; color: var(--on-night-soft); font-size: 16px; }

/* 기법 목록 */
.tech { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 12px; }
.tech div { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; min-width: 0; }
.section.white .tech div { background: var(--paper); }
.tech b { display: block; font-size: 17px; margin-bottom: 4px; }
.tech span { font-size: 15px; color: var(--ink-soft); line-height: 1.65; display: block; }

/* 안 하는 일 / 체크 목록 */
.nolist { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 12px; }
.nolist li { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px 18px 56px; position: relative; min-width: 0; }
.nolist li::before { content: ''; position: absolute; left: 20px; top: 21px; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--danger-ink); background: linear-gradient(45deg, transparent 45%, var(--danger-ink) 45%, var(--danger-ink) 55%, transparent 55%); }
.nolist b { display: block; font-size: 17px; }
.nolist span { display: block; font-size: 15px; color: var(--ink-soft); line-height: 1.65; margin-top: 2px; }
.checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.checks li { padding-left: 32px; position: relative; }
.checks li::before { content: ''; position: absolute; left: 4px; top: 8px; width: 14px; height: 8px; border-left: 2.5px solid var(--calm-ink); border-bottom: 2.5px solid var(--calm-ink); transform: rotate(-45deg); }
.night .checks li::before { border-color: var(--gold); }

.callout { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: var(--radius); padding: 24px 26px; }
.callout h3 { font-size: 20px; margin-bottom: 8px; }
.callout p { color: var(--ink-soft); font-size: 16px; }

/* ── 긴급 번호 ── */
.numbers { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 12px; }
.numbers a { display: flex; flex-direction: column; gap: 2px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; text-decoration: none; color: var(--ink); min-width: 0; }
.numbers a:hover { border-color: var(--link); color: var(--ink); }
.numbers b { font-size: 30px; font-variant-numeric: tabular-nums; line-height: 1.2; }
.numbers span { font-size: 15px; color: var(--ink-soft); }
.numbers .urgent { background: var(--danger); border-color: #EDC6C0; }

/* ── 자주 묻는 질문 ── */
.faq { border-top: 1px solid var(--line); max-width: 860px; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q { width: 100%; min-height: 64px; display: flex; justify-content: space-between; align-items: center; gap: 16px; background: transparent; border: 0; padding: 18px 0; font: inherit; font-size: 18px; font-weight: 700; text-align: left; cursor: pointer; color: var(--ink); }
.faq-q .ic { flex: none; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line); position: relative; transition: transform .25s; }
.faq-q .ic::before, .faq-q .ic::after { content: ''; position: absolute; left: 50%; top: 50%; width: 12px; height: 2px; background: var(--ink-soft); transform: translate(-50%, -50%); }
.faq-q .ic::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq-q[aria-expanded="true"] .ic { transform: rotate(45deg); }
.faq-a { padding: 0 44px 22px 0; color: var(--ink-soft); font-size: 16px; }
.faq-a[hidden] { display: none; }

/* ── 연락처 ── */
.contact { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.contact .card .mail { font-size: 22px; font-weight: 700; user-select: all; -webkit-user-select: all; word-break: break-all; }

/* ── 바닥글 ── */
.site-footer { background: var(--night); color: var(--on-night-soft); padding: 56px 0 40px; font-size: 15px; }
.site-footer h2 { font-family: var(--font-body); font-size: 16px; color: var(--on-night); margin-bottom: 14px; }
.ft-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 40px; }
.ft-numbers { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 8px 20px; }
.ft-numbers a { color: var(--on-night); text-decoration: none; }
.ft-numbers a b { color: var(--gold); font-variant-numeric: tabular-nums; margin-right: 8px; }
.ft-numbers a:hover b { text-decoration: underline; }
.ft-about p + p { margin-top: 8px; }
.ft-about a { color: var(--on-night); }
.ft-bottom { border-top: 1px solid var(--night-line); margin-top: 36px; padding-top: 20px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; font-size: 14px; }
.ft-bottom a { color: var(--on-night-soft); }

/* ── 등장 효과(움직임 줄이기 설정이면 끔) ── */
.rise { animation: rise .8s cubic-bezier(.2,.7,.2,1) both; }
.rise.d1 { animation-delay: .1s; } .rise.d2 { animation-delay: .2s; } .rise.d3 { animation-delay: .3s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

@media (max-width: 900px) {
  .hero-grid, .split { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .ft-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .split .pic { order: -1; }
}
@media (max-width: 600px) {
  :root { --gutter: 18px; }
  body { font-size: 16px; }
  .section { padding: 56px 0; }
  .hero { padding: 44px 0 56px; }
  .page-hero { padding: 44px 0 44px; }
  .sec-head { margin-bottom: 28px; }
  .card, .level, .channel { padding: 22px; }
  .facts div { padding: 12px 10px; }
  .facts span { font-size: 13px; }
  .faq-a { padding-right: 0; }
  .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rise { animation: none !important; }
  *, *::before, *::after { transition: none !important; }
}
.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; }
.night .steps p { color: var(--on-night-soft); }
.night .steps h3 { color: #fff; }
.night .steps li::after { background: var(--night-line); }
.site-footer { border-top: 1px solid var(--night-line); }
.night .card p { color: var(--on-night-soft); }
