:root {
  /* 기본: 다크 테마 */
  --bg: #0e1014;
  --surface: #161920;
  --surface-2: #1c2029;
  --ink: #eceae4;
  --ink-2: #b4b2ab;
  --muted: #80858f;
  --line: #262a33;
  --accent: #d4a24c;
  --accent-ink: #14110a;
  --accent-soft: rgba(212,162,76,.12);
  --up: #3ecf8e;
  --down: #f06a5f;
  --up-soft: rgba(62,207,142,.14);
  --down-soft: rgba(240,106,95,.14);
  --band: #08090c;
  --band-card: #12151b;
  --band-line: #22262e;
  --band-ink: #eceae4;
  --band-ink-2: #a9a69f;
  --header-bg: rgba(14,16,20,.85);
  --stripe-a: #1a1d24; --stripe-b: #15181e;
  --radius: 14px;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #fafaf7;
  --surface: #ffffff;
  --surface-2: #f4f2ed;
  --ink: #15171c;
  --ink-2: #4a4f5a;
  --muted: #8a8f99;
  --line: #e7e5df;
  --accent: #b8862b;
  --accent-ink: #ffffff;
  --accent-soft: #f6eedd;
  --up: #1f8a5b;
  --down: #c8433a;
  --up-soft: #e4f3ec;
  --down-soft: #f8e6e4;
  --band: #121419;
  --band-card: #1b1e25;
  --band-line: #2a2e37;
  --band-ink: #e9e7e1;
  --band-ink-2: #b9b6ae;
  --header-bg: rgba(250,250,247,.92);
  --stripe-a: #f1efe9; --stripe-b: #ebe8e1;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; overflow-x: hidden; background: var(--bg); color: var(--ink);
  font-family: Pretendard, -apple-system, "Apple SD Gothic Neo", sans-serif;
  line-height: 1.65; word-break: keep-all;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.up { color: var(--up); } .down { color: var(--down); }

/* header */
.header { position: sticky; top: 0; z-index: 50; background: var(--header-bg); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.header-in { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 20px; }
.logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo-mark { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); background: var(--band); flex-shrink: 0; }
.logo-text { display: flex; flex-direction: column; line-height: 1.15; }
.logo-text small { font-size: 10px; letter-spacing: .12em; color: var(--muted); }
.nav { display: flex; align-items: center; gap: 18px; font-size: 14.5px; white-space: nowrap; }
.nav > a { color: var(--ink-2); padding: 6px 0; border-bottom: 2px solid transparent; }
.nav > a.on, .nav > a:hover { color: var(--ink); border-color: var(--accent); }
.nav-auth { display: flex; align-items: center; gap: 12px; margin-left: 10px; padding-left: 16px; border-left: 1px solid var(--line); }
.nav-user { color: var(--muted); }
.nav-auth > a:not(.btn) { color: var(--ink-2); }
.nav-auth > a:not(.btn):hover { color: var(--ink); }

/* account dropdown */
.account { position: relative; }
.account-btn { display: flex; align-items: center; gap: 8px; background: none; border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px 4px 4px; color: var(--ink); font: inherit; font-size: 14px; cursor: pointer; }
.account-btn:hover, .account.open .account-btn { border-color: var(--accent); }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.account-name { max-width: 110px; overflow: hidden; text-overflow: ellipsis; }
.caret { width: 14px; height: 14px; color: var(--muted); transition: transform .2s; }
.account.open .caret { transform: rotate(180deg); }
.account-menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 170px; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 14px 34px rgba(0,0,0,.3); display: none; z-index: 60; }
.account.open .account-menu { display: block; }
.account-menu a, .account-menu button { display: block; width: 100%; text-align: left; padding: 10px 12px; border-radius: 8px; font: inherit; font-size: 14px; color: var(--ink); background: none; border: 0; cursor: pointer; }
.account-menu a:hover, .account-menu button:hover { background: var(--surface-2); }
.account-menu form { margin: 0; }
.account-menu .logout { color: var(--down); }
.nav-auth form { margin: 0; }
.linkbtn { background: none; border: 0; font: inherit; color: var(--ink-2); cursor: pointer; padding: 0; }
.burger { display: none; position: relative; background: none; border: 0; width: 40px; height: 40px; cursor: pointer; padding: 0; border-radius: 10px; }
.burger span { position: absolute; left: 10px; width: 20px; height: 2px; border-radius: 2px; background: var(--ink); transition: transform .25s, opacity .2s, top .25s; }
.burger span:nth-child(1) { top: 13px; } .burger span:nth-child(2) { top: 19px; } .burger span:nth-child(3) { top: 25px; }
.nav-open .burger span:nth-child(1) { top: 19px; transform: rotate(45deg); }
.nav-open .burger span:nth-child(2) { opacity: 0; }
.nav-open .burger span:nth-child(3) { top: 19px; transform: rotate(-45deg); }
.nav-overlay, .nav-title { display: none; }

/* theme toggle */
.theme-toggle { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; display: grid; place-items: center; padding: 0; flex-shrink: 0; transition: border-color .2s; }
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .sun { display: none; }
:root[data-theme="light"] .theme-toggle .sun { display: block; }
:root[data-theme="light"] .theme-toggle .moon { display: none; }
.header-actions { display: flex; align-items: center; gap: 8px; order: 3; }
body, .header, .card, section, .footer { transition: background-color .25s, border-color .25s, color .25s; }

/* buttons */
.btn { display: inline-block; min-height: 44px; white-space: nowrap; background: var(--accent); color: var(--accent-ink); padding: 13px 26px; border-radius: 999px; font-weight: 700; border: 0; cursor: pointer; font: inherit; font-weight: 700; }
.btn:hover { filter: brightness(1.05); }
.btn-sm { padding: 8px 16px; font-size: 14px; }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }

/* sections */
section { padding: 88px 0; }
section.alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
section.dark { background: var(--band); color: var(--band-ink); }
section.dark .muted { color: var(--muted); }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .14em; color: var(--accent); text-transform: uppercase; margin: 0 0 12px; }
h1, h2, h3 { line-height: 1.3; margin: 0 0 16px; letter-spacing: -0.02em; }
h2 { font-size: clamp(26px, 3.4vw, 38px); }
.lead { font-size: 18px; color: var(--ink-2); max-width: 680px; }
section.dark .lead { color: var(--band-ink-2); }
.page-head { padding-top: 64px; padding-bottom: 24px; }

/* hero */
.hero { padding: 110px 0 90px; text-align: center; }
.hero h1 { font-size: clamp(32px, 5.4vw, 60px); font-weight: 800; max-width: 900px; margin: 0 auto 22px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lead { margin: 0 auto 34px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-note { margin-top: 26px; font-size: 13px; color: var(--muted); }
.sample-badge { display: inline-block; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; margin-bottom: 18px; }

/* grids & cards */
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
section.alt .card { background: var(--surface-2); }
section.dark .card { background: var(--band-card); border-color: var(--band-line); }
.card h3 { font-size: 18px; margin-bottom: 8px; }
.card p { margin: 0; color: var(--ink-2); }
section.dark .card p { color: var(--band-ink-2); }
.card .icon { font-size: 26px; margin-bottom: 12px; }

.metric { text-align: center; padding: 26px 16px; }
.metric .v { font-size: clamp(24px, 3vw, 32px); font-weight: 800; letter-spacing: -0.02em; }
.metric .l { font-size: 13.5px; color: var(--muted); }
.metric.hl .v { color: var(--accent); }

.statement { padding: 0; overflow: hidden; }
.statement .ph { aspect-ratio: 4/3; background: repeating-linear-gradient(45deg, var(--stripe-a), var(--stripe-a) 10px, var(--stripe-b) 10px, var(--stripe-b) 20px); display: grid; place-items: center; color: var(--muted); font-size: 13px; }
.statement img { aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.statement .cap { padding: 16px 18px; }
.statement .cap b { display: block; }

.quote { font-size: clamp(24px, 3.4vw, 36px); font-weight: 800; text-align: center; max-width: 820px; margin: 0 auto 48px; line-height: 1.4; }
.quote::before { content: "“"; display: block; color: var(--accent); font-size: 60px; line-height: .6; }

/* trade table */
.day-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th, td { padding: 12px 16px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
th { font-size: 12.5px; color: var(--muted); font-weight: 600; background: var(--surface-2); }
tr:last-child td { border-bottom: 0; }
.tag { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 6px; }
.tag.BUY { background: var(--up-soft); color: var(--up); } .tag.SELL { background: var(--down-soft); color: var(--down); }

/* testimonial */
.testi .amount { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; margin: 10px 0 14px; }
.testi .amount span { color: var(--muted); font-weight: 400; }
.testi .who { margin-top: 16px; font-size: 13px; color: var(--muted); }

/* video */
.video { padding: 0; overflow: hidden; }
.video .thumb { position: relative; aspect-ratio: 16/9; background: #222 center/cover; }
.video .thumb::after { content: "▶"; position: absolute; inset: 0; margin: auto; width: 54px; height: 54px; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; display: grid; place-items: center; font-size: 18px; }
.video .cap { padding: 14px 16px; font-weight: 600; font-size: 15px; }

/* steps & form */
.steps { counter-reset: s; display: grid; gap: 14px; }
.step { display: flex; gap: 16px; align-items: flex-start; }
.step::before { counter-increment: s; content: counter(s); flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 800; }
.step p { margin: 2px 0 0; color: var(--ink-2); }
.form p { margin: 0 0 14px; }
.form label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.form input[type=text], .form input[type=email], .form input[type=password], .form select, .form textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; font: inherit; background: var(--surface); color: var(--ink);
}
.form input[type=checkbox] { margin-right: 8px; }
.form p:has(input[type=checkbox]) { display: flex; flex-direction: row-reverse; justify-content: flex-end; align-items: center; }
.form p:has(input[type=checkbox]) label { margin: 0; font-weight: 400; }
.form .helptext, .form .helptext ul { font-size: 12.5px; color: var(--muted); }
.errorlist { color: var(--down); font-size: 13px; padding-left: 18px; margin: 4px 0; }
.flash { margin-top: 18px; padding: 14px 18px; background: var(--accent-soft); border-radius: 10px; font-weight: 600; }
.notice { font-size: 13px; color: var(--muted); margin-top: 10px; }

/* lists */
.list { border-top: 1px solid var(--line); }
.list-item { display: flex; justify-content: space-between; gap: 16px; padding: 18px 4px; border-bottom: 1px solid var(--line); }
.list-item:hover h3 { color: var(--accent); }
.list-item h3 { font-size: 17px; margin: 0 0 4px; }
.list-item p { margin: 0; color: var(--ink-2); font-size: 14.5px; }
.article { max-width: 760px; padding: 56px 20px 88px; }
.article .body { font-size: 16.5px; }
.locked { text-align: center; padding: 50px; }
.pager { display: flex; gap: 10px; justify-content: center; margin-top: 28px; }
.comment { padding: 14px 0; border-bottom: 1px solid var(--line); }
.disclaimer-box { background: var(--accent-soft); border-radius: var(--radius); padding: 22px 26px; font-size: 14px; color: var(--ink-2); }

/* footer */
.footer { background: var(--band); color: var(--band-ink-2); border-top: 1px solid var(--band-line); padding: 56px 0 40px; font-size: 14px; }
.footer b { color: var(--band-ink); }
.footer-top { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; margin-bottom: 28px; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer a:hover { color: var(--accent); }
.footer .disclaimer { border-top: 1px solid var(--band-line); padding-top: 22px; color: var(--muted); font-size: 12.5px; }

/* faq */
.faq-wrap { max-width: 860px; }
.faq { margin-top: 28px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 20px 40px 20px 4px; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 8px; top: 50%; transform: translateY(-50%); font-size: 24px; color: var(--accent); transition: transform .2s; }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq summary h3 { font-size: 17px; margin: 0; }
.faq-a { padding: 0 4px 18px; color: var(--ink-2); }
.faq-a p { margin: 0 0 8px; }

/* a11y & misc */
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 10px 16px; border-radius: 8px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.crumbs { margin-top: 18px; font-size: 13px; color: var(--muted); }
.crumbs a:hover { color: var(--accent); }
.mobile-cta { display: none; }

/* cta band */
.cta-band { text-align: center; background: var(--band); color: var(--band-ink); border-top: 1px solid var(--band-line); }
.cta-band .lead { margin: 0 auto 26px; color: var(--band-ink-2); }

/* community board */
.accent { color: var(--accent); }
.board-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); font-size: 14px; color: var(--ink-2); white-space: nowrap; }
.tabs a.on { background: var(--ink); color: var(--bg); border-color: var(--ink); font-weight: 700; }
.board-search { display: flex; gap: 8px; margin-top: 16px; }
.board-search input, .board-search select { padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font: inherit; font-size: 15px; }
.board-search input { flex: 1; min-width: 0; }
.board { border-top: 1px solid var(--line); }
.board-item { display: flex; gap: 16px; align-items: center; padding: 16px 4px; border-bottom: 1px solid var(--line); }
.board-item:hover h3 { color: var(--accent); }
.board-item h3 { font-size: 16.5px; margin: 6px 0 2px; }
.board-item p { margin: 0; }
.board-body { min-width: 0; }
.thumb-sm { flex: 0 0 72px; height: 72px; border-radius: 10px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); display: grid; place-items: center; color: var(--muted); font-size: 13px; font-weight: 700; }
.thumb-sm img { width: 100%; height: 100%; object-fit: cover; }
.badge { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: var(--surface-2); color: var(--ink-2); }
.badge-official { background: var(--accent-soft); color: var(--accent); }
.badge-profit { background: var(--up-soft); color: var(--up); }
.badge-withdraw { background: rgba(110,150,255,.14); color: #7d9dff; }
.empty { padding: 48px 0; text-align: center; color: var(--muted); }
.post-img { margin-top: 24px; border-radius: var(--radius); border: 1px solid var(--line); }

/* journal / education */
.resource { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.resource:last-child { border-bottom: 0; }
.resource p { margin: 2px 0 0; }
.edu-no { display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: .1em; color: var(--accent); margin-bottom: 10px; }
.lock { font-size: 13px; color: var(--muted); font-weight: 600; }

/* education: 1분 신청 */
.apply-1min { max-width: 760px; text-align: center; }
.apply-1min .lead { margin: 0 auto; }
.timeline { list-style: none; margin: 40px 0 0; padding: 0; text-align: left; position: relative; }
.timeline::before { content: ""; position: absolute; left: 21px; top: 22px; bottom: 22px; width: 2px; background: linear-gradient(var(--accent), var(--line)); }
.timeline li { position: relative; display: flex; gap: 20px; padding-bottom: 18px; }
.timeline li:last-child { padding-bottom: 0; }
.tl-no { position: relative; z-index: 1; flex: 0 0 44px; height: 44px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 800; font-size: 18px; box-shadow: 0 0 0 6px var(--surface-2); }
section.alt .tl-no { box-shadow: 0 0 0 6px var(--surface); }
.tl-body { flex: 1; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; }
section.alt .tl-body { background: var(--bg); }
.tl-body h3 { font-size: 17.5px; margin: 0 0 4px; }
.tl-body p { margin: 0; color: var(--ink-2); }
.tl-body b { color: var(--ink); }
.tl-link { display: inline-block; margin-top: 8px; font-size: 14px; font-weight: 700; color: var(--accent); }
.apply-actions { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 36px; }
.btn-tg { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 16px 30px; font-size: 16.5px; width: min(100%, 420px); }
.btn-tg svg { width: 20px; height: 20px; }
.btn-2line { display: inline-flex; flex-direction: column; align-items: center; line-height: 1.35; padding: 10px 30px; width: min(100%, 420px); }
.btn-2line small { font-size: 12.5px; font-weight: 500; color: var(--muted); }

/* community attachments */
.attach-box > label:first-child { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.attach-box input[type=file][multiple] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.dropzone { display: flex !important; flex-direction: column; align-items: center; gap: 4px; text-align: center; padding: 26px 16px; border: 2px dashed var(--line); border-radius: var(--radius); background: var(--surface-2); cursor: pointer; transition: border-color .2s, background .2s; font-weight: 400 !important; margin: 0 !important; }
.dropzone:hover, .dropzone.over { border-color: var(--accent); background: var(--accent-soft); }
.dropzone .dz-icons { font-size: 22px; letter-spacing: 4px; }
.dropzone b { font-size: 15px; }
.dropzone small { font-size: 12px; color: var(--ink-2); }
.dropzone small.muted { color: var(--muted); }
.file-chips { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 6px; }
.file-chips li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); font-size: 14px; }
.file-chips img, .file-chips .fc-icon { flex: 0 0 36px; width: 36px; height: 36px; border-radius: 6px; object-fit: cover; display: grid; place-items: center; font-size: 18px; }
.file-chips .fc-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-chips .fc-size { color: var(--muted); font-size: 12.5px; }
.file-chips button { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 15px; width: 32px; height: 32px; border-radius: 8px; }
.file-chips button:hover { color: var(--down); background: var(--down-soft); }
.att-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; margin-bottom: 18px; }
.att-gallery a { display: block; aspect-ratio: 1; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.att-gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.att-gallery a:hover img { transform: scale(1.04); }
.att-media { margin: 0 0 16px; }
.att-media video { width: 100%; max-height: 70vh; border-radius: var(--radius); background: #000; }
.att-media figcaption { font-size: 13px; color: var(--muted); margin-top: 6px; }
.att-audio { padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.att-audio figcaption { margin: 0 0 8px; color: var(--ink); font-weight: 600; }
.att-audio audio { width: 100%; }
.yt { position: relative; aspect-ratio: 16/9; border-radius: var(--radius); overflow: hidden; background: #000; }
.yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.att-list { list-style: none; padding: 0; margin: 0 0 8px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.att-list li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--surface); }
.att-list li:last-child { border-bottom: 0; }
.att-ic { font-size: 18px; }
.att-name { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 14.5px; }
.att-name small { display: block; color: var(--muted); font-size: 12px; }
.att-count { margin-left: 8px; font-size: 12px; }

/* auth */
.auth { max-width: 420px; margin: 70px auto 100px; }

@media (max-width: 1100px) {
  .burger { display: block; }
  .header { backdrop-filter: none; background: var(--bg); }
  .header-actions { position: relative; z-index: 3; }
  .nav-overlay { display: block; position: fixed; inset: 0; z-index: 1; background: rgba(0,0,0,.55); opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s; }
  .nav { position: fixed; top: 0; right: 0; bottom: 0; z-index: 2; width: min(84vw, 340px); display: flex; flex-direction: column; align-items: stretch; gap: 0;
    padding: 76px 22px calc(24px + env(safe-area-inset-bottom)); background: var(--surface); border-left: 1px solid var(--line);
    overflow-y: auto; overscroll-behavior: contain; transform: translateX(100%); visibility: hidden; transition: transform .3s cubic-bezier(.2,.8,.2,1), visibility .3s; }
  .nav-open .nav { transform: none; visibility: visible; box-shadow: -20px 0 40px rgba(0,0,0,.3); }
  .nav-open .nav-overlay { opacity: 1; visibility: visible; }
  .nav-open { overflow: hidden; }
  .nav-title { display: block; margin: 0 0 6px; font-size: 11px; font-weight: 800; letter-spacing: .16em; color: var(--muted); }
  .nav > a { display: flex; justify-content: space-between; align-items: center; padding: 15px 2px; border: 0; border-bottom: 1px solid var(--line); font-size: 16.5px; font-weight: 600; color: var(--ink); }
  .nav > a::after { content: "›"; color: var(--muted); font-size: 20px; font-weight: 400; line-height: 1; }
  .nav > a.on { color: var(--accent); border-bottom-color: var(--line); }
  .nav > a.on::after { color: var(--accent); }
  .nav-auth { margin: auto 0 0; padding: 24px 0 0; border: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; font-size: 15px; }
  .nav-auth > a:not(.btn), .nav-auth form button { display: block; text-align: center; padding: 12px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); width: 100%; }
  .nav-auth form { display: block; }
  .nav-auth .account { grid-column: 1 / -1; }
  .nav-auth .account-btn { pointer-events: none; border: 0; padding: 0; font-size: 15px; font-weight: 700; }
  .nav-auth .caret { display: none; }
  .nav-auth .account-menu { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; position: static; padding: 0; margin-top: 12px; background: none; border: 0; box-shadow: none; min-width: 0; }
  .nav-auth .account-menu a, .nav-auth .account-menu button { text-align: center; padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
  .nav-auth .account-menu form:last-child { grid-column: 1 / -1; }
  .nav-auth .btn { grid-column: 1 / -1; text-align: center; padding: 14px; border-radius: 12px; }
  .header-in { height: 64px; }
  .g4 { grid-template-columns: repeat(2, 1fr); }
  .g3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 15.5px; padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
  .wrap { padding: 0 16px; }
  section { padding: 56px 0; }
  .hero { padding: 56px 0 48px; }
  .hero h1 { font-size: clamp(28px, 8.4vw, 36px); }
  .lead { font-size: 16px; }
  .hero-actions .btn { flex: 1 1 100%; text-align: center; }
  .page-head { padding-top: 40px; padding-bottom: 16px; }
  .page-head h1 { font-size: 28px; }
  .g2, .g3 { grid-template-columns: 1fr; }
  .g4 { grid-template-columns: 1fr 1fr; gap: 10px; }
  .grid { gap: 12px; }
  .card { padding: 20px; }
  .g4 .card { padding: 16px; }
  .g4 .card h3 { font-size: 15.5px; }
  .g4 .card p { font-size: 13.5px; }
  .card .icon { font-size: 22px; margin-bottom: 8px; }
  .metric { padding: 18px 10px; }
  .metric .v { font-size: 22px; }
  .metric .l { font-size: 12px; }
  .day-summary, .g3.metrics { grid-template-columns: 1fr 1fr; gap: 10px; }
  .swipe { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; margin-left: -16px !important; margin-right: -16px !important; padding: 0 16px 6px; scrollbar-width: none; }
  .swipe::-webkit-scrollbar { display: none; }
  .swipe > * { flex: 0 0 82%; scroll-snap-align: center; }
  .quote { font-size: 22px; margin-bottom: 32px; }
  .quote::before { font-size: 44px; }
  th, td { padding: 10px 12px; font-size: 13.5px; }
  .list-item { flex-direction: column; gap: 4px; }
  .thumb-sm { flex-basis: 60px; height: 60px; }
  .board-bar .btn { margin-left: auto; }
  .resource { flex-direction: column; align-items: flex-start; }
  .timeline::before { left: 17px; }
  .tl-no { flex-basis: 36px; height: 36px; font-size: 16px; }
  .timeline li { gap: 14px; }
  .tl-body { padding: 15px 16px; }
  .article { padding: 36px 16px 64px; }
  .article h1 { font-size: 26px; }
  .footer { padding-bottom: 32px; }
  .footer-top { flex-direction: column; gap: 18px; }
  .auth { margin: 40px auto 64px; }
  /* iOS 입력 시 확대 방지 */
  .form input, .form select, .form textarea { font-size: 16px !important; }
  .mobile-cta { display: block; position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 40;
    background: var(--accent); color: var(--accent-ink); text-align: center; font-weight: 800; padding: 15px; border-radius: 999px;
    box-shadow: 0 10px 30px rgba(0,0,0,.35); }
  .nav-open .mobile-cta { display: none; }
}
@media (max-width: 380px) {
  .g4 { grid-template-columns: 1fr; }
  .logo-text small { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* 에디터(HTML) 본문 */
.rich img { max-width: 100%; height: auto; border-radius: 10px; }
.rich figure { margin: 18px 0; }
.rich figure.image { text-align: center; }
.rich figure.image-style-align-left { float: left; margin-right: 18px; max-width: 50%; }
.rich figure.image-style-align-right { float: right; margin-left: 18px; max-width: 50%; }
.rich figcaption { font-size: 13px; color: var(--muted); margin-top: 6px; text-align: center; }
.rich::after { content: ""; display: table; clear: both; }
.rich h2, .rich h3, .rich h4 { margin: 28px 0 10px; }
.rich blockquote { margin: 18px 0; padding: 4px 18px; border-left: 3px solid var(--accent); color: var(--ink-2); }
.rich a { color: var(--accent); text-decoration: underline; }
.rich table { width: 100%; border-collapse: collapse; margin: 16px 0; display: block; overflow-x: auto; }
.rich td, .rich th { border: 1px solid var(--line); padding: 8px 12px; text-align: left; white-space: normal; }
.rich pre { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 14px; overflow-x: auto; font-size: 14px; }
.rich code { background: var(--surface-2); padding: 1px 5px; border-radius: 4px; font-size: .92em; }
.rich hr { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }
.rich video, .rich audio { width: 100%; margin: 12px 0; border-radius: 10px; }
.rich video { background: #000; max-height: 70vh; }
.rich mark { background: var(--accent-soft); color: inherit; padding: 0 3px; }
.rich ul.todo-list { list-style: none; padding-left: 4px; }
.journal-body p { margin: 0 0 6px; color: var(--ink-2); }

/* 관리자 전용 '✏️ 수정' 버튼 */
.edit-scope { position: relative; }
.edit-pin { position: absolute; top: 14px; right: 14px; z-index: 5; display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 6px; max-width: calc(100% - 28px);
  padding: 6px 8px; border-radius: 10px; background: rgba(212,162,76,.95); color: #14110a; font-size: 12.5px; font-weight: 700; box-shadow: 0 6px 18px rgba(0,0,0,.25); }
.edit-pin span { padding: 0 2px; }
.edit-pin a { background: #14110a; color: #f6eedd; padding: 4px 9px; border-radius: 7px; font-weight: 600; }
.edit-pin a:hover { background: #000; }
.edit-scope:hover > .edit-pin { box-shadow: 0 0 0 3px rgba(212,162,76,.35), 0 6px 18px rgba(0,0,0,.25); }
@media (max-width: 640px) { .edit-pin { position: static; margin: 0 16px 12px; justify-content: flex-start; } }

.legal-links { display: flex; gap: 16px; font-size: 13px; margin: 0 0 8px; }
.legal-links a:hover { color: var(--accent); }
.legal .body { font-size: 15px; color: var(--ink-2); }
