/* 안쪽 페이지 공통 틀. style.css 위에 얹는다. 시안마다 다른 부분은 각 HTML 안에 있다. */
[data-tone="dark"] { --silver: #c3c8d0; --gold: #e6b450; --violet: #b18cf5; --blk: #fff; }
[data-tone="light"] { --silver: #5d6470; --gold: #8f6200; --violet: #6a3fd0; --blk: #0b0c0f; }
[data-rank="classic"] { --rc: var(--silver); }
[data-rank="premium"] { --rc: var(--gold); }
[data-rank="prestige"] { --rc: var(--violet); }
[data-rank="black"] { --rc: var(--blk); }
html { scroll-padding-top: 96px; }
[hidden] { display: none !important; }
:focus-visible { outline-color: var(--ink); }

.page { padding-top: 124px; }
.page section { margin-top: 88px; }
.title h1 { font-size: clamp(3rem, 8vw, 5.5rem); font-weight: 900; line-height: 1; letter-spacing: -.04em; }
.title { position: relative; }
.tico { position: absolute; right: 0; bottom: 0; width: clamp(64px, 11vw, 128px); aspect-ratio: 1; rotate: 8deg; image-rendering: pixelated; filter: drop-shadow(0 16px 18px rgb(0 0 0 / .32)); animation: tico 5s ease-in-out infinite; }
@keyframes tico { 50% { translate: 0 -8px; } }
@media (max-width: 620px) { .tico { top: -4px; bottom: auto; width: 56px; } } /* 좁은 화면: 아래 설명 글을 가리지 않게 제목 줄에 붙인다 */
.title p { margin-top: 14px; font-size: 1.125rem; color: var(--muted); word-break: keep-all; }
.head span { font-size: .9375rem; color: var(--muted); }

/* 견본 전용: 시안 고르기 */
.pick { display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 9%, transparent); }
.pick a { padding: 6px 14px; border-radius: 999px; font-size: .8125rem; font-weight: 700; white-space: nowrap; transition: background-color .2s, color .2s; }
.pick a[aria-current] { background: var(--ink); color: var(--bg); }

.buy { display: inline-block; padding: 13px 22px; border-radius: 10px; background: var(--ink); color: var(--bg); font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; transition: transform .3s var(--ease), background-color .2s, color .2s; }
.buy:hover { background: var(--accent); color: #fff; }
.buy:active { transform: scale(.97); }

/* 닉네임 칸(받는 계정) */
[data-tone="dark"] { --acc-ink: #a3abf5; }
[data-tone="light"] { --acc-ink: #4450b5; }
.nick { display: flex; align-items: center; gap: 12px; }
.nick img { flex: none; width: 40px; height: 40px; border-radius: 6px; }
.nick .f { display: flex; flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); transition: border-color .2s; }
.nick .f:focus-within { border-color: var(--ink); }
.nick.bad .f { border-color: var(--down); }
.nick input { flex: 1; min-width: 0; padding: 11px 13px; font-weight: 600; outline: 0; caret-color: var(--accent); }
.nick input::placeholder { color: var(--muted); font-weight: 500; }
.nick .f button { padding: 0 16px; font-weight: 700; color: var(--acc-ink); white-space: nowrap; }
.msg { min-height: 1.5em; margin-top: 6px; font-size: .8125rem; color: var(--down); }
.badge { display: inline-block; padding: 2px 8px; border-radius: 6px; background: var(--accent); color: #fff; font-size: .75rem; font-weight: 700; white-space: nowrap; }
.badge.line { background: none; color: var(--ink); box-shadow: inset 0 0 0 1px var(--muted); }

.notes { border-top: 1px solid var(--line); }
.notes div { display: grid; grid-template-columns: 9rem 1fr; gap: 4px 24px; padding: 18px 2px; border-bottom: 1px solid var(--line); }
.notes dt { font-weight: 700; }
.notes dd { color: var(--muted); max-width: 62ch; word-break: keep-all; }
.notes a { color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 760px) {
  .top .status { display: none; }
  .pick a span { display: none; }
}
@media (max-width: 620px) {
  .page { padding-top: 100px; }
  .page section { margin-top: 64px; }
  .head { flex-direction: column; gap: 2px; }
  .notes div { grid-template-columns: 1fr; }
}

/* ── 핫바 여섯 장(뉴스·랭킹·시세·가이드·위키·고객지원)이 함께 쓰는 것 ── */
.px, .head h2, .doc h2 { font-family: Galmuri11, "Pretendard Variable", sans-serif; font-weight: 700; letter-spacing: 0; }
.head { align-items: center; margin-bottom: 22px; }
.head h2 { font-size: 24px; line-height: 1.3; }
::placeholder { color: var(--muted); opacity: 1; }
input { caret-color: var(--accent); }

/* 조작 줄: 고르기 단추와 검색 칸 */
.bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; margin-top: 36px; }
.seg { display: inline-flex; gap: 2px; padding: 4px; border-radius: 12px; background: color-mix(in srgb, var(--ink) 7%, transparent); }
.seg button { padding: 8px 18px; border-radius: 9px; font-size: .9375rem; font-weight: 700; color: var(--muted); white-space: nowrap; transition: color .2s, background-color .2s, box-shadow .2s; }
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: 0 0 0 1px var(--line), 0 2px 8px rgb(0 0 0 / .14); }
.field { display: flex; align-items: center; gap: 10px; width: min(100%, 18rem); padding: 0 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); transition: border-color .2s; }
.field:focus-within { border-color: var(--ink); }
.field svg { flex: none; width: 16px; height: 16px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; }
.field input { flex: 1; min-width: 0; padding: 10px 0; font-weight: 600; outline: 0; }
.field input::placeholder { font-weight: 500; }
.field button { font-weight: 700; color: var(--acc-ink); white-space: nowrap; }
.hint { min-height: 1.5em; margin-top: 8px; font-size: .8125rem; color: var(--muted); text-align: right; }
.hint.bad { color: var(--down); }
.panel { border: 1px solid var(--line); border-radius: 18px; background: var(--card); overflow: hidden; }

/* 누르면 복사되는 글자(주소, 명령어) */
.copy { display: inline-flex; align-items: baseline; gap: 10px; padding: 5px 10px 6px; border-radius: 8px; background: color-mix(in srgb, var(--ink) 7%, transparent); text-align: left; transition: background-color .2s, transform .3s var(--ease); }
.copy code { font-family: Galmuri11, "Pretendard Variable", sans-serif; font-weight: 700; font-size: 16px; line-height: 1.4; }
.copy code span { color: var(--muted); font-weight: 400; }
.copy em { font-style: normal; font-size: .75rem; font-weight: 600; color: var(--muted); white-space: nowrap; }
.copy:hover { background: color-mix(in srgb, var(--ink) 13%, transparent); }
.copy:active { transform: scale(.97); }
.copy.ok em { color: var(--up); }

/* 읽는 페이지: 왼쪽 목차 + 본문 */
.doc { display: grid; grid-template-columns: 176px minmax(0, 1fr); gap: 72px; align-items: start; margin-top: 56px; }
.toc { position: sticky; top: 100px; display: grid; gap: 2px; }
.toc a { padding: 8px 12px; border-radius: 8px; font-size: .9375rem; font-weight: 600; color: var(--muted); white-space: nowrap; transition: color .2s, background-color .2s; }
.toc a:hover { color: var(--ink); }
.toc a.on { color: var(--ink); background: color-mix(in srgb, var(--ink) 8%, transparent); }
.page .doc section { margin-top: 0; scroll-margin-top: 100px; }
.page .doc section + section { margin-top: 72px; padding-top: 64px; border-top: 1px solid var(--line); }
.doc h2 { font-size: 28px; line-height: 1.3; }
.doc h3 { margin: 44px 0 12px; font-size: 1.1875rem; font-weight: 800; letter-spacing: -.02em; }
.doc p, .doc li { word-break: keep-all; }
.doc p { max-width: 68ch; }
.doc p + p { margin-top: 10px; }
.doc .lede { margin-top: 10px; color: var(--muted); }
.doc a.ln, .lead a.ln { font-weight: 600; text-decoration: underline; text-decoration-color: var(--muted); text-underline-offset: 3px; }
.doc a.ln:hover { text-decoration-color: var(--ink); }
.note { margin-top: 18px; font-size: .9375rem; color: var(--muted); }

/* 네모 점 목록 */
.dots { display: grid; gap: 8px; margin-top: 14px; }
.dots li { position: relative; padding-left: 20px; max-width: 68ch; }
.dots li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 6px; height: 6px; background: var(--muted); }
.dots.yes li::before { background: var(--up); }
.dots.no li::before { background: var(--down); }

/* 표 */
.scroll { overflow-x: auto; margin-top: 20px; scrollbar-width: thin; }
.tbl { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.tbl th { padding: 0 16px 10px 0; font-size: .8125rem; font-weight: 600; color: var(--muted); text-align: left; white-space: nowrap; }
.tbl td { padding: 14px 16px 14px 0; border-top: 1px solid var(--line); vertical-align: top; word-break: keep-all; }
.tbl td:first-child { font-weight: 600; }
.tbl .hard { color: var(--down); font-weight: 700; }

@media (max-width: 900px) {
  .doc { grid-template-columns: minmax(0, 1fr); gap: 28px; margin-top: 32px; }
  .toc { top: 70px; z-index: 5; display: flex; gap: 4px; margin-inline: -20px; padding: 8px 20px; background: var(--bg); box-shadow: 0 1px 0 var(--line); overflow-x: auto; scrollbar-width: none; }
  .page .doc section { scroll-margin-top: 136px; }
}
@media (max-width: 620px) {
  .bar { margin-top: 28px; }
  .field { width: 100%; }
  .hint { text-align: left; }
  .seg button { padding: 8px 14px; }
  .page .doc section + section { margin-top: 48px; padding-top: 44px; }
  .doc h2 { font-size: 24px; }
  .doc h3 { margin-top: 36px; }
}

/* ── 약관류와 보조 화면이 함께 쓰는 것 ── */
.seg a, .seg label { padding: 8px 18px; border-radius: 9px; font-size: .9375rem; font-weight: 700; color: var(--muted); white-space: nowrap; cursor: pointer; transition: color .2s, background-color .2s, box-shadow .2s; }
.seg a:hover, .seg label:hover { color: var(--ink); }
.seg a[aria-current], .seg label:has(:checked) { background: var(--card); color: var(--ink); box-shadow: 0 0 0 1px var(--line), 0 2px 8px rgb(0 0 0 / .14); }
.seg label:has(:focus-visible) { outline: 2px solid var(--ink); outline-offset: 3px; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }

/* 입력 칸 */
.fm { display: grid; gap: 24px; max-width: 40rem; }
.fm label.l, .fm legend { display: block; margin-bottom: 8px; padding: 0; font-size: .875rem; font-weight: 600; color: var(--muted); }
.fm fieldset { border: 0; padding: 0; min-width: 0; }
.in { display: block; width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); font: inherit; font-weight: 500; color: inherit; outline: 0; transition: border-color .2s; }
.in:focus { border-color: var(--ink); }
textarea.in { min-height: 11rem; line-height: 1.6; resize: vertical; }
.bad .in { border-color: var(--down); }
.err { display: none; margin-top: 6px; font-size: .8125rem; color: var(--down); }
.bad .err { display: block; }
.fm .cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 16px; }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: .9375rem; color: var(--muted); word-break: keep-all; cursor: pointer; }
.check input { flex: none; width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--accent); }
.check a { color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--muted); text-underline-offset: 3px; }
.acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }
button.buy { cursor: pointer; }
.buy.line { background: none; color: var(--ink); box-shadow: inset 0 0 0 1px var(--muted); }
.buy.line:hover { background: var(--ink); color: var(--bg); box-shadow: none; }
.back { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px 6px 6px; margin-left: -6px; border-radius: 8px; font-weight: 600; color: var(--muted); transition: color .2s, background-color .2s; }
.back:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 7%, transparent); }
.back svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.back + .title { margin-top: 18px; }
/* 요약 표(주문 요약 등): 왼쪽 이름, 오른쪽 값 */
.sum div { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; padding: 15px 24px; }
.sum div + div { border-top: 1px solid var(--line); }
.sum dt { color: var(--muted); white-space: nowrap; }
.sum dd { font-weight: 700; text-align: right; word-break: keep-all; }
.chip { display: inline-block; padding: 3px 9px; border-radius: 6px; font-size: .75rem; font-weight: 700; white-space: nowrap; }
.chip.ok { color: var(--up); background: color-mix(in srgb, var(--up) 15%, transparent); }
.chip.wait { color: var(--ink); background: color-mix(in srgb, var(--ink) 9%, transparent); }
.chip.off { color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); }
@media (max-width: 620px) { .fm .cols { grid-template-columns: 1fr; } .sum div { padding-inline: 18px; } }
