/* 코인마을 — 화이트 기반, 블루 포인트, 그린·레드는 등급 구분색 */
:root {
  --bg: #f6f8fc;
  --surface: #ffffff;
  --line: #e7ebf3;
  --line-soft: #f0f3f8;
  --ink: #111827;
  --ink-2: #374151;
  --muted: #6b7280;
  --faint: #9ca3af;
  --blue: #1f6feb;
  --blue-d: #1a5fd1;
  --blue-soft: #eaf2ff;
  --green: #16a34a;
  --green-d: #0f7a37;
  --green-soft: #e9f8ee;
  --red: #e5383b;
  --red-soft: #fdecec;
  --amber: #b45309;
  --amber-soft: #fff4e0;
  --up: #e5383b;
  --down: #1f6feb;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 4px 16px rgba(16, 24, 40, .04);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "Pretendard Variable", Pretendard, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  font-size: 15px; line-height: 1.55; letter-spacing: -0.01em;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--blue); }
button, input, select, textarea { font: inherit; color: inherit; }
.ic { flex: none; }
[hidden] { display: none !important; }

/* ── 상단 메뉴바 ── */
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.topbar-in { max-width: 1440px; margin: 0 auto; padding: 0 28px; height: 84px; display: flex; align-items: center; gap: 28px; }
.logo { display: flex; align-items: center; gap: 10px; flex: none; }
.logo-text { display: flex; flex-direction: column; line-height: 1.2; gap: 1px; }
.logo-text b { font-size: 27px; font-weight: 800; letter-spacing: -0.04em; color: #0b1324; }
.logo-text small { font-size: 16px; font-weight: 600; color: var(--blue); letter-spacing: 0; }
.nav { display: flex; align-items: stretch; height: 100%; gap: 6px; margin-left: 24px; }
.nav-item {
  display: flex; align-items: center; gap: 8px; padding: 0 16px; font-size: 17px; font-weight: 600; color: var(--ink-2);
  border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap;
}
.nav-item .ic { width: 22px; height: 22px; }
.nav-item.blue .ic { color: var(--blue); }
.nav-item.ink .ic { color: #4b5563; }
.nav-item.green .ic { color: var(--green); }
.nav-item.red .ic { color: var(--red); }
.nav-item:hover { color: var(--ink); background: var(--line-soft); }
.nav-item.active { color: var(--blue); border-bottom-color: var(--blue); }
.nav-item.green.active { color: var(--green); border-bottom-color: var(--green); }
.nav-item.red.active { color: var(--red); border-bottom-color: var(--red); }
.account { position: relative; flex: none; margin-left: auto; }
.acct-btn { list-style: none; height: 44px; color: var(--blue); background: var(--blue-soft); border-color: transparent; }
.acct-btn::-webkit-details-marker { display: none; }
.acct-btn span { font-size: 11px; }
.acct-menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 170px; padding: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 24px rgba(16, 24, 40, .12);
  display: flex; flex-direction: column;
}
.acct-menu a, .acct-menu button {
  display: block; width: 100%; text-align: left; padding: 10px 12px; border-radius: 8px; border: 0; background: none;
  font-size: 14.5px; font-weight: 500; color: var(--ink-2); cursor: pointer;
}
.acct-menu a:hover, .acct-menu button:hover { background: var(--line-soft); color: var(--ink); }
.acct-menu form { border-top: 1px solid var(--line-soft); margin-top: 4px; padding-top: 4px; }

/* ── 버튼·칩·배지 ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; padding: 0 16px;
  border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: 14px; cursor: pointer;
}
.btn:hover { border-color: #cfd6e3; color: var(--ink); }
.btn-primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-d); color: #fff; }
.btn-login { height: 46px; padding: 0 30px; font-size: 15px; }
.guest { display: flex; align-items: center; gap: 16px; flex: none; margin-left: auto; }
.signup-link { font-size: 15px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.form-foot { text-align: center; color: var(--muted); font-size: 14px; margin-top: 14px; }
.form-foot a { color: var(--blue); font-weight: 600; }
.opt, .req { font-style: normal; font-size: 11.5px; font-weight: 600; padding: 1px 6px; border-radius: 5px; margin-left: 4px; vertical-align: 1px; }
.opt { color: var(--muted); background: #f3f4f6; }
.req { color: var(--red); background: var(--red-soft); }
.privacy-box { background: #f8fafc; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; font-size: 13px; color: var(--ink-2); }
.privacy-box ul { margin: 6px 0 0; padding-left: 18px; }
.privacy-box li { margin: 2px 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.member-search { display: flex; gap: 8px; margin-bottom: 12px; }
.leave { margin-top: 18px; }
.leave summary { cursor: pointer; color: var(--muted); font-size: 14px; font-weight: 600; }
.leave[open] summary { margin-bottom: 10px; }
.doc h2 { font-size: 16px; margin: 20px 0 6px; }
.doc ul { margin: 0; padding-left: 20px; }
.doc li, .doc p { color: var(--ink-2); font-size: 14.5px; line-height: 1.7; }
.tbd { font-style: normal; color: var(--amber); background: var(--amber-soft); padding: 1px 6px; border-radius: 5px; font-size: 13px; }
.privacy-box a { display: inline-block; margin-top: 6px; color: var(--blue); font-weight: 600; }
.member-search input { flex: 1; }
.members { list-style: none; margin: 8px 0 0; padding: 0; }
.member { border-top: 1px solid var(--line-soft); padding: 12px 0; }
.member:first-child { border-top: 0; }
.member.is-off { opacity: .6; }
.member.is-saved { background: var(--green-soft); margin: 0 -12px; padding: 12px; border-radius: 10px; }
.member-form { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; }
.m-who { display: flex; flex-direction: column; min-width: 0; }
.m-who b { font-size: 15px; }
.m-who span { font-size: 13px; color: var(--ink-2); }
.m-who small { font-size: 12.5px; color: var(--muted); }
.m-set { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.m-set .btn-xs { height: 32px; padding: 0 14px; margin: 0; font-size: 13px; }
.btn-ghost { background: transparent; }
.btn-danger { color: var(--red); }
.btn-warn { color: var(--amber); border-color: #f3d19c; background: var(--amber-soft); }
.btn-xs { height: 26px; padding: 0 8px; font-size: 12px; border-radius: 7px; margin-left: 6px; }
.btn-lg { height: 50px; padding: 0 32px; font-size: 16px; }
.btn[disabled] { opacity: .6; cursor: wait; }
form.inline { display: inline; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  height: 36px; padding: 0 16px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface);
  font-size: 14px; font-weight: 500; color: var(--ink-2); cursor: pointer; display: inline-flex; align-items: center;
}
.chip.on { background: var(--blue); border-color: var(--blue); color: #fff; font-weight: 600; }
.chip.big { height: 42px; min-width: 104px; justify-content: center; font-size: 15px; }
.board.green .chip.on { background: var(--green); border-color: var(--green); }
.board.red .chip.on { background: var(--red); border-color: var(--red); }

.badges { display: inline-flex; gap: 4px; flex: none; }
.badge { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 6px; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.b-notice { background: var(--blue-soft); color: var(--blue); }
.b-free { background: #eef0ff; color: #4f46e5; }
.b-green { background: var(--green-soft); color: var(--green-d); }
.b-red { background: var(--red-soft); color: var(--red); }
.b-kind-new { background: var(--blue-soft); color: var(--blue); }
.b-kind-add { background: #f1ecff; color: #6d3fd6; }
.b-blind { background: #f3f4f6; color: var(--muted); }
.pill { display: inline-flex; align-items: center; height: 26px; padding: 0 12px; border-radius: 99px; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.r-none { background: var(--green-soft); color: var(--green-d); }
.r-tp { background: var(--red-soft); color: var(--red); }
.r-sl { background: var(--red-soft); color: var(--red); }
.board.red .r-none, .detail.red .r-none { background: var(--blue-soft); color: var(--blue); }

.avatar {
  display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; flex: none; font-weight: 800; color: #fff;
  background: hsl(var(--hue) 55% 45%);
}

/* ── 페이지 틀 ── */
body { min-height: 100vh; display: flex; flex-direction: column; }
.page { max-width: 1440px; width: 100%; margin: 0 auto; padding: 24px 28px 48px; flex: 1; }
.panel, .card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel { padding: 22px 22px 18px; }
.card { padding: 22px 24px; }
.panel-head, .card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.panel-head h2, .card-head h2 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 20px; font-weight: 800; letter-spacing: -0.03em; }
.card-head .meta, .meta { color: var(--muted); font-size: 14px; display: inline-flex; align-items: center; gap: 10px; }
.more { display: inline-flex; align-items: center; gap: 2px; color: var(--muted); font-size: 14px; }
.empty { color: var(--faint); padding: 18px 0; text-align: center; list-style: none; }
.hint { color: var(--muted); font-size: 13px; }
.feed-state { display: inline-block; font-size: 12px; margin-top: 8px; padding: 2px 8px; border-radius: 6px; }
.feed-state.stale { color: var(--amber); background: var(--amber-soft); }
.feed-state.none { color: var(--muted); background: #f3f4f6; }

/* ── 시세 줄 ── */
.ticker { display: flex; gap: 14px; align-items: stretch; margin-bottom: 22px; }
.ticks { flex: 1; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.tick { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 14px; box-shadow: var(--shadow); min-width: 0; }
.tick-name { display: flex; align-items: center; gap: 8px; font-size: 14.5px; font-weight: 700; color: var(--ink-2); }
.tick-price { font-size: clamp(16px, 1.32vw, 22px); font-weight: 800; letter-spacing: -0.035em; margin: 6px 0 2px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.chg { font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.chg.up { color: var(--up); }
.chg.down { color: var(--down); }
.chg.flat { color: var(--faint); }
.tick.is-stale .tick-price { color: var(--ink-2); }
.ticker-side { flex: none; width: 140px; display: flex; flex-direction: column; align-items: flex-end; justify-content: center; gap: 6px; }
.ticker-side .btn { height: 46px; width: 100%; font-size: 15px; }
.provider { color: var(--muted); font-size: 12px; }
.ticker-side .provider { white-space: nowrap; text-align: right; }

/* ── 메인 3단 ── */
.home-grid { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; align-items: stretch; }
/* 세 칸의 바닥선을 맞춘다: 칸마다 마지막 상자가 남은 높이를 채운다 */
.home-col { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.home-col > .panel:last-child { flex: 1 1 auto; }
.recent-panel { display: flex; flex-direction: column; }
.recent-panel .recent:not([hidden]) { flex: 1 1 auto; display: flex; flex-direction: column; }
.recent-panel .recent > li.empty { margin: auto 0; }
.yt-panel .yt-grid { row-gap: 16px; }
.side { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.news .ic { color: var(--blue); }
.news-list { list-style: none; margin: 0; padding: 0; }
.news-list li { display: flex; gap: 14px; justify-content: space-between; align-items: flex-start; padding: 13px 0; border-top: 1px solid var(--line-soft); }
.news-list li:first-child { border-top: 0; }
.news-title { font-size: 15.5px; font-weight: 500; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-list time { color: var(--muted); font-size: 13px; flex: none; padding-top: 2px; font-variant-numeric: tabular-nums; }
.news-list.wide li { justify-content: flex-start; }
.news-list.wide .news-title { display: block; -webkit-line-clamp: unset; }
.news-src { display: block; margin-top: 2px; font-size: 12.5px; color: var(--faint); font-weight: 500; }
.news-provider { margin: 10px 0 0; font-size: 12px; }
.news-list.wide time { width: 54px; }

.recent-panel .panel-head .ic { color: var(--blue); }
.recent-panel .chips { margin-bottom: 8px; }
.recent { list-style: none; margin: 0; padding: 0; }
.recent li a { display: flex; align-items: flex-start; gap: 14px; padding: 15px 2px; border-top: 1px solid var(--line-soft); }
.recent li:first-child a { border-top: 0; }
.recent .badges { min-width: 52px; padding-top: 1px; }
.rt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.rt b { font-size: 16px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rt small { color: var(--muted); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent time { color: var(--muted); font-size: 13px; flex: none; font-variant-numeric: tabular-nums; padding-top: 2px; }
.recent .is-hidden b { color: var(--muted); font-weight: 600; }

.channels { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.ch { display: flex; align-items: center; gap: 10px; padding: 12px 10px; min-width: 0; border: 1px solid var(--line); border-radius: 12px; min-height: 66px; }
.ch:hover { border-color: #cfd6e3; color: var(--ink); background: #fbfcfe; }
.ch .ic:last-child { margin-left: auto; color: var(--faint); }
.ch.is-off { opacity: .55; cursor: not-allowed; }
.ch-mark { width: 42px; height: 42px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; flex: none; color: #fff; }
.ch-mark.kakao { background: #fee500; color: #191919; font-size: 11px; letter-spacing: -0.02em; }
.ch-mark.insta { background: linear-gradient(135deg, #feda75, #fa7e1e 30%, #d62976 60%, #962fbf 85%, #4f5bd5); }
.ch-mark.tg { background: #2aabee; }
.ch-mark.yt { background: #ff0000; }
.ch-mark.yt .ic rect { fill: transparent; }
.ch-label { display: flex; flex-direction: column; font-size: 14px; font-weight: 700; line-height: 1.3; word-break: keep-all; letter-spacing: -0.03em; }
.ch-label small { font-size: 12px; color: var(--muted); font-weight: 500; margin-top: 2px; }
.tg-ic { color: #2aabee; display: inline-flex; }
.yt-ic { color: #ff0000; display: inline-flex; }
.tg-list { list-style: none; margin: 0; padding: 0; }
.tg-list li { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line-soft); }
.tg-list li:first-child { border-top: 0; }
.tg-list a { display: flex; flex-direction: column; min-width: 0; }
.tg-title { font-size: 15px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tg-sum { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tg-list time { color: var(--muted); font-size: 13px; flex: none; }
.yt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.yt { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.yt img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; background: #e5e7eb; }
.yt-title { font-size: 14.5px; font-weight: 600; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.yt time { color: var(--muted); font-size: 12.5px; }

/* ── 추천게시판 ── */
.board-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 8px 0 22px; }
.board-hero h1 { margin: 0; font-size: 40px; font-weight: 800; letter-spacing: -0.04em; line-height: 1.15; }
.board-hero p { margin: 8px 0 0; color: var(--muted); font-size: 15.5px; }
.board-hero.green .g { color: var(--green); }
.board-hero.red .g { color: var(--red); }
.filter-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.blind-note { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 10px; background: var(--green-soft); color: var(--green-d); font-size: 14px; font-weight: 600; }
.board-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.board-main { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.board.green .card-head .ic, .detail.green .rationale .ic { color: var(--green); }
.board.red .card-head .ic, .detail.red .rationale .ic { color: var(--red); }

.latest-body { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 16px; }
.latest-coin {
  display: flex; flex-direction: column; gap: 16px; padding: 22px; border-radius: 12px; color: #fff;
  background: linear-gradient(160deg, #14532d, #0d3b21);
}
.latest.red .latest-coin { background: linear-gradient(160deg, #7f1d1d, #4c0f0f); }
.latest-coin:hover { color: #fff; }
.latest-coin .badge { background: rgba(255, 255, 255, .16); color: #fff; }
.coin-line { display: flex; align-items: center; gap: 12px; }
.coin-line b { font-size: 26px; font-weight: 800; letter-spacing: -0.03em; word-break: break-all; }
.latest-coin .go { margin-top: auto; font-size: 13px; opacity: .85; display: inline-flex; align-items: center; gap: 2px; }
.latest-main { display: flex; flex-direction: column; gap: 12px; min-width: 0; }

.price-grid { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 12px; background: #fbfcfe; }
.pc { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; padding: 14px 8px; border-left: 1px solid var(--line); min-width: 0; }
.pc:first-child { border-left: 0; }
.pc span { font-size: 13px; color: var(--ink-2); font-weight: 600; }
.pc.tp span { color: var(--blue); }
.pc.sl span { color: var(--red); }
.pc b { font-size: 19px; font-weight: 800; letter-spacing: -0.02em; word-break: keep-all; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; line-height: 1.3; }
.pc b small { font-size: 14px; font-weight: 600; color: var(--muted); }
.pc.sl b { color: var(--red); }
.pc b small.rng, .rec-table td small.rng { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.pc b.txt { font-size: 13.5px; font-weight: 600; color: var(--ink-2); line-height: 1.45; letter-spacing: -0.01em; }
.pc.sl b.txt { color: var(--ink-2); }
.rec-table td .note { display: block; font-size: 12.5px; color: var(--muted); line-height: 1.4; margin-top: 2px; white-space: normal; }
.rec-table td .note:first-child { margin-top: 0; }
.pct { font-size: 13px; font-weight: 600; }
.pct.up { color: var(--green); }
.pct.down { color: var(--red); }
.rationale { border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; }
.rationale h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 16px; }
.rationale ul { margin: 0; padding-left: 20px; }
.rationale li, .rationale p { margin: 3px 0; color: var(--ink-2); font-size: 14.5px; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-weight: 600; color: var(--muted); background: #f8fafc; padding: 11px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 11px 10px; border-bottom: 1px solid var(--line-soft); white-space: nowrap; vertical-align: middle; }
td.coin a, td.coin { display: flex; align-items: center; gap: 8px; }
.rec-table { font-size: 13.5px; }
.rec-table th, .rec-table td { padding-left: 7px; padding-right: 7px; }
.rec-table td.coin b { max-width: 130px; overflow: hidden; text-overflow: ellipsis; }
td.res { text-align: center; }
.rec-table th { white-space: normal; }
.rec-table td.wrap { white-space: normal; max-width: 160px; }
td.res form { display: block; margin-top: 4px; }
td.res .btn-xs { margin: 0; }
td.sum { max-width: 150px; overflow: hidden; text-overflow: ellipsis; color: var(--ink-2); }
td.title { white-space: normal; font-weight: 600; width: 100%; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.is-hidden td { color: var(--muted); }
tr.is-hidden a { display: inline-flex; align-items: center; gap: 6px; }
tr.admin-blinded td { background: #fafafa; }
/* 시장지표 묶음(PC). 휴대폰에서는 .nav-m 으로 펼쳐 보인다 */
.nav-m { display: none; }
.nav-drop { position: relative; display: flex; }
.nav-drop > summary { list-style: none; cursor: pointer; height: 100%; }
.nav-drop > summary::-webkit-details-marker { display: none; }
.nav-drop > summary small { font-size: 11px; margin-left: -4px; }
.nav-drop-menu { left: 0; right: auto; top: calc(100% - 4px); }

/* 관리자 화면 */
.admin { max-width: 1180px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
.admin-tabs { margin-bottom: -4px; }
.admin-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.admin-top h1 { margin: 0; font-size: 28px; letter-spacing: -0.03em; }
.quick { display: flex; gap: 8px; flex-wrap: wrap; }
.quick .btn { gap: 6px; }
.btn-red { background: var(--red); border-color: var(--red); }
.btn-red:hover { background: var(--red); filter: brightness(.92); }
.stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.stat { display: flex; flex-direction: column; gap: 4px; padding: 14px 14px 12px; border: 1px solid var(--line-soft); border-radius: 12px; min-width: 0; }
.stat:hover { border-color: var(--blue); }
.stat span { font-size: 13.5px; color: var(--muted); font-weight: 600; }
.stat b { font-size: 26px; font-weight: 800; letter-spacing: -0.03em; color: var(--ink); }
.stat small { font-size: 12.5px; color: var(--muted); }
.todos { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.todo a, .todo > b { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; border-radius: 10px; border-left: 4px solid var(--line); background: var(--line-soft); }
.todo.warn a { border-left-color: #f59e0b; background: #fffbeb; }
.todo.bad a { border-left-color: var(--red); background: var(--red-soft); }
.todo.ok > b { border-left-color: var(--green); background: var(--green-soft); color: var(--green-d); }
.todo small { color: var(--ink-2); font-size: 13.5px; }
.admin-2col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
.admin-2col .card, .admin > .card { margin: 0; }
.links { list-style: none; margin: 0 0 12px; padding: 0; }
.links li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line-soft); flex-wrap: wrap; }
.links li:first-child { border-top: 0; }
.lk-name { font-weight: 600; flex: 1 1 200px; min-width: 0; }
.lk-state { font-size: 13.5px; padding: 3px 10px; border-radius: 999px; }
.lk-state.on { background: var(--green-soft); color: var(--green-d); }
.lk-state.off { background: #f3f4f6; color: var(--muted); }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.admin-table th, .admin-table td { padding: 10px 8px; border-top: 1px solid var(--line-soft); text-align: left; white-space: nowrap; }
.admin-table th { color: var(--muted); font-weight: 600; font-size: 13px; border-top: 0; }
.admin-table td:nth-child(2) { white-space: normal; min-width: 160px; }
.admin-table .num { text-align: right; }
.admin-table .neg { color: var(--red); }
.b-none { background: #f3f4f6; color: var(--muted); }

/* ── 관리자 홈 (2026-10-13 디자인 개편) ── */
.adm-home { gap: 20px; }
.adm-hero {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  padding: 26px 28px; border-radius: 18px; color: #fff;
  background: linear-gradient(120deg, #1d4ed8 0%, #2563eb 55%, #3b82f6 100%);
  box-shadow: 0 10px 30px rgba(37, 99, 235, .18);
}
.hero-date { display: flex; align-items: center; gap: 6px; margin: 0 0 6px; font-size: 14px; opacity: .85; }
.adm-hero h1 { margin: 0; font-size: 30px; font-weight: 800; letter-spacing: -0.03em; color: #fff; }
.hero-sum { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; }
.sum-chip { display: inline-flex; align-items: center; height: 28px; padding: 0 12px; border-radius: 999px; font-size: 13.5px; font-weight: 600; background: rgba(255, 255, 255, .16); }
.sum-chip.ok::before, .sum-chip.warn::before, .sum-chip.bad::before { content: ''; width: 8px; height: 8px; border-radius: 50%; margin-right: 7px; background: #4ade80; }
.sum-chip.warn::before { background: #fbbf24; }
.sum-chip.bad::before { background: #f87171; }
.hero-actions { display: grid; grid-template-columns: repeat(5, minmax(0, auto)); gap: 8px; }
.act {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-width: 96px; height: 76px; padding: 0 10px;
  border-radius: 14px; background: rgba(255, 255, 255, .14); color: #fff; font-size: 13.5px; font-weight: 700; text-align: center;
  border: 1px solid rgba(255, 255, 255, .22); transition: background .15s, transform .15s;
}
.act:hover { background: rgba(255, 255, 255, .26); color: #fff; transform: translateY(-1px); }
.act.t-green { background: #16a34a; border-color: #16a34a; }
.act.t-red { background: #dc2626; border-color: #dc2626; }
.act.t-blue { background: #fff; color: #1d4ed8; border-color: #fff; }
.act.t-green:hover, .act.t-red:hover { filter: brightness(1.06); }
.act.t-blue:hover { background: #eff6ff; color: #1d4ed8; }

.adm-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.adm-main, .adm-side { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.adm-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px 22px; box-shadow: 0 1px 2px rgba(16, 24, 40, .04); min-width: 0; }
.adm-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.adm-head h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 18px; font-weight: 800; letter-spacing: -0.02em; }
.adm-head h2 .ic { color: var(--muted); }
.adm-head .count { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--red); color: #fff; font-size: 12.5px; }

.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.kpi {
  --tone: var(--blue); --tone-bg: var(--blue-soft);
  display: flex; flex-direction: column; gap: 8px; padding: 16px; border-radius: 14px; border: 1px solid var(--line-soft);
  background: linear-gradient(180deg, var(--surface), #fbfcfe); min-width: 0; transition: border-color .15s, box-shadow .15s;
}
a.kpi:hover { border-color: var(--tone); box-shadow: 0 4px 14px rgba(16, 24, 40, .06); }
.kpi.t-green { --tone: var(--green); --tone-bg: var(--green-soft); }
.kpi.t-red { --tone: var(--red); --tone-bg: var(--red-soft); }
.kpi.t-amber { --tone: #d97706; --tone-bg: #fef3c7; }
.kpi.t-gray { --tone: #64748b; --tone-bg: #f1f5f9; }
.kpi-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.kpi-ic { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 10px; flex: none; background: var(--tone-bg); color: var(--tone); }
.kpi-label { font-size: 14px; font-weight: 600; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-num { font-size: 30px; font-weight: 800; letter-spacing: -0.03em; color: var(--ink); line-height: 1.1; }
.kpi-num small { font-size: 14px; font-weight: 600; color: var(--muted); margin-left: 3px; letter-spacing: 0; }
.kpi-num.kpi-sm { font-size: 20px; }
.kpi-sub { font-size: 12.5px; color: var(--muted); }

.adm-2col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
.adm-list { list-style: none; margin: 0; padding: 0; }
.adm-list li { border-top: 1px solid var(--line-soft); }
.adm-list li:first-child { border-top: 0; }
.adm-list li > a, .adm-list li:not(:has(> a)) { display: flex; align-items: center; gap: 12px; padding: 10px 0; min-width: 0; }
.adm-list li > a:hover b { color: var(--blue); }
.adm-list li.empty { color: var(--muted); padding: 14px 0; font-size: 14px; }
.av { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; flex: none; font-weight: 800; font-size: 15px; background: #f1f5f9; color: #475569; }
.av.t-green { background: var(--green-soft); color: var(--green-d); }
.av.t-red { background: var(--red-soft); color: var(--red); }
.av.t-blue { background: var(--blue-soft); color: var(--blue); }
.li-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.li-main b { font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li-main small { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li-main em { font-style: normal; }
.li-end { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.li-end time { font-size: 12px; color: var(--faint, #9ca3af); }
.li-end .badges { display: flex; gap: 4px; }
.neg { color: var(--red); }

.adm-todos { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.adm-todos a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: #fffbeb; border: 1px solid #fde68a; }
.adm-todos .t-bad a { background: var(--red-soft); border-color: #fecaca; }
.adm-todos a:hover { filter: brightness(.98); }
.todo-ic { display: inline-flex; color: #d97706; flex: none; }
.adm-todos .t-bad .todo-ic { color: var(--red); }
.todo-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.todo-txt b { font-size: 14.5px; }
.todo-txt small { font-size: 12.5px; color: var(--ink-2); line-height: 1.45; }
.adm-allgood { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 10px; text-align: center; color: var(--green-d); background: var(--green-soft); border-radius: 12px; }
.adm-allgood small { color: var(--ink-2); font-size: 12.5px; }

.adm-links { list-style: none; margin: 0 0 14px; padding: 0; }
.adm-links li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line-soft); font-size: 14px; }
.adm-links li:first-child { border-top: 0; }
.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; background: #cbd5e1; }
.dot.on { background: #22c55e; box-shadow: 0 0 0 3px #dcfce7; }
.dot.warn { background: #f59e0b; box-shadow: 0 0 0 3px #fef3c7; }
.adm-links .lk-name { flex: 1; min-width: 0; font-weight: 600; }
.adm-links .lk-state { font-size: 12.5px; color: var(--muted); text-align: right; padding: 0; background: none; }
.ping { display: flex; align-items: center; gap: 6px; padding: 10px 12px; border-radius: 10px; margin-bottom: 10px; font-size: 13.5px; font-weight: 600; }
.ping.ok { background: var(--green-soft); color: var(--green-d); }
.ping.bad { background: var(--red-soft); color: var(--red); }
.ping-form { display: flex; flex-direction: column; gap: 6px; }
.ping-form .btn { gap: 6px; justify-content: center; }
.ping-form small { font-size: 12px; color: var(--muted); }

.adm-shortcuts { display: flex; flex-direction: column; }
.adm-shortcuts a { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line-soft); }
.adm-shortcuts a:first-child { border-top: 0; }
.adm-shortcuts a > span:nth-child(2) { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
.adm-shortcuts b { font-size: 14.5px; }
.adm-shortcuts small { font-size: 12.5px; color: var(--muted); }
.adm-shortcuts a:hover b { color: var(--blue); }
.sc-ic { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 10px; background: var(--blue-soft); color: var(--blue); flex: none; }

/* 문자 보내기 */
.tgts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.tgt { position: relative; display: block; cursor: pointer; }
.tgt input { position: absolute; opacity: 0; }
.tgt span { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; height: 100%; }
.tgt b { font-size: 14.5px; }
.tgt small { font-size: 12.5px; color: var(--muted); }
.tgt input:checked + span { border-color: var(--blue); background: var(--blue-soft); }
.tgt input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }
.row-block { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; font-weight: 600; font-size: 14.5px; }
.sms-form textarea { width: 100%; }
.sms-form .check { margin: 10px 0 6px; display: flex; gap: 8px; align-items: center; font-size: 14px; }
.byte { font-size: 13px; color: var(--muted); font-weight: 600; }
.byte.over { color: var(--red); }
.form-actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.form-actions .btn { gap: 6px; }
.kpis-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 16px; }
.sub-h { font-size: 16px; margin: 4px 0 8px; }
.sms-preview { white-space: pre-wrap; word-break: break-all; background: #f8fafc; border: 1px solid var(--line-soft); border-radius: 12px; padding: 14px 16px; font-size: 14.5px; line-height: 1.6; max-width: 420px; }
.lk-state.st-sent { background: var(--green-soft); color: var(--green-d); padding: 2px 9px; border-radius: 999px; font-size: 12.5px; }
.lk-state.st-error { background: var(--red-soft); color: var(--red); padding: 2px 9px; border-radius: 999px; font-size: 12.5px; }
.lk-state.st-pending { background: #f1f5f9; color: var(--muted); padding: 2px 9px; border-radius: 999px; font-size: 12.5px; }

.adm-home .adm-grid { grid-template-rows: auto 1fr; grid-template-areas: "main todo" "main rest"; }
.adm-home .adm-main { grid-area: main; }
.adm-home .todo-card { grid-area: todo; }
.adm-home .adm-side { grid-area: rest; }
@media (max-width: 1180px) {
  .adm-grid { grid-template-columns: minmax(0, 1fr); }
  .adm-home .adm-grid { grid-template-rows: none; grid-template-areas: "todo" "main" "rest"; }
  .adm-side { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
}
@media (max-width: 960px) {
  .adm-hero { padding: 20px 18px; border-radius: 14px; }
  .adm-hero h1 { font-size: 24px; }
  .hero-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; }
  .act { min-width: 0; height: 64px; font-size: 12.5px; }
  .adm-card { padding: 16px; border-radius: 14px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 13px; }
  .kpi-num { font-size: 24px; }
  .adm-2col { grid-template-columns: minmax(0, 1fr); }
  .adm-side { grid-template-columns: minmax(0, 1fr); }
  .tgts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis-3 { grid-template-columns: minmax(0, 1fr); }
}

/* 메인 시장지표 */
.mkt-panel { margin-bottom: 22px; }
.mkt-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.mkt-card { border: 1px solid var(--line-soft); border-radius: 12px; padding: 10px 10px 4px; min-width: 0; }
.mkt-head { display: flex; align-items: center; gap: 4px; font-weight: 700; font-size: 15px; color: var(--ink); margin: 0 2px 4px; }
.mkt-head:hover { color: var(--blue); }
.tv-mini { display: block; width: 100%; height: 170px; border: 0; }
.mkt-panel .provider { margin: 8px 2px 0; }

/* 지표 차트 */
.chart-tabs { margin: 0 0 14px; }
.chart-card { padding: 12px; }
.tv-chart { display: block; width: 100%; height: min(72vh, 640px); min-height: 380px; border: 0; border-radius: 10px; background: var(--line-soft); }
.chart-card .hint { margin: 10px 4px 0; }

.pager { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 16px; }
.pager .gap { border: 0; min-width: 18px; color: var(--ink-3, #999); }
.pager a, .pager span { min-width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; border: 1px solid var(--line); font-size: 14px; }
.pager .on { background: var(--blue); color: #fff; border-color: var(--blue); }

.guide { list-style: none; margin: 0; padding: 0; }
.guide li { display: flex; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line-soft); }
.guide li:first-child { border-top: 0; }
.guide .num { width: 30px; height: 30px; border-radius: 50%; flex: none; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; background: var(--green-soft); color: var(--green-d); }
.board.red .guide .num { background: var(--red-soft); color: var(--red); }
.guide p { margin: 3px 0 0; color: var(--ink-2); font-size: 14.5px; }
.side-recs { list-style: none; margin: 0; padding: 0; }
.side-recs a { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 10px; align-items: center; padding: 11px 0; border-top: 1px solid var(--line-soft); font-size: 14px; }
.side-recs a .avatar { grid-row: span 2; }
.side-recs li:first-child a { border-top: 0; }
.sr-top { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.sr-top b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-top time { flex: none; color: var(--faint); font-size: 12.5px; }
.sr-meta { display: flex; align-items: center; gap: 4px; min-width: 0; }
.sr-meta .badge { height: 21px; padding: 0 7px; font-size: 11.5px; flex: none; }
.sr-meta .sum { flex: 1; min-width: 0; margin-left: 4px; color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── 상세 ── */
.detail { max-width: 980px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.crumbs { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; }
.detail-head { margin-bottom: 18px; }
.detail-title { display: flex; align-items: center; gap: 12px; font-size: 30px; font-weight: 800; letter-spacing: -0.03em; margin: 10px 0 6px; }
.detail .card > * + * { margin-top: 16px; }
.post-body { font-size: 16px; line-height: 1.8; color: var(--ink-2); white-space: normal; word-break: break-word; }
.actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.notice-box { display: flex; gap: 14px; align-items: flex-start; padding: 18px 20px; border-radius: 12px; background: #f3f4f6; color: var(--ink-2); }
.notice-box p { margin: 4px 0 0; color: var(--muted); }
.notice-box a { color: var(--blue); font-weight: 600; }
.admin-panel { border-color: #f3d19c; background: #fffdf8; }
.admin-panel h2 { margin: 0 0 6px; font-size: 16px; color: var(--amber); }
.admin-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
select { height: 40px; border: 1px solid var(--line); border-radius: 10px; padding: 0 10px; background: #fff; margin-left: 6px; }

/* ── 폼 ── */
.form-page { max-width: 820px; margin: 0 auto; }
.form-page.narrow { max-width: 440px; }
.form-page h1 { font-size: 28px; margin: 8px 0 18px; letter-spacing: -0.03em; }
.rec-form, .post-form { display: flex; flex-direction: column; gap: 16px; }
.row { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 14px; align-items: start; border: 0; margin: 0; padding: 0; }
.row > span, .row > legend { font-weight: 700; padding-top: 10px; font-size: 15px; }
fieldset.row { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; }
fieldset.row legend { float: left; width: 110px; padding: 0; margin-right: 2px; }
.post-form .row { grid-template-columns: 1fr; gap: 6px; }
.post-form .row > span { padding-top: 0; }
input:not([type=checkbox]):not([type=radio]), textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: #fff; font-size: 15px;
}
input:focus, textarea:focus, select:focus { outline: 0; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
textarea { resize: vertical; line-height: 1.6; }
.check { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--blue); }
.check.green input { accent-color: var(--green); }
.check.red input { accent-color: var(--red); }
.check.warn { font-weight: 500; color: var(--amber); align-items: flex-start; }
.stack { display: flex; flex-direction: column; gap: 8px; }
.sub { display: flex; align-items: center; gap: 10px; }
.sub em { font-style: normal; width: 34px; color: var(--muted); font-weight: 600; }
.msg-preview { margin: 0; padding: 14px 16px; background: #f8fafc; border: 1px solid var(--line); border-radius: 10px; font-family: inherit; font-size: 14px; white-space: pre-wrap; word-break: break-word; min-height: 80px; }
.ok-box { background: var(--green-soft); color: var(--green-d); border-radius: 12px; padding: 12px 16px; margin-bottom: 14px; font-weight: 600; }
.form-sub { font-size: 17px; margin: 0 0 4px; }
.status-list { list-style: none; margin: 8px 0 0; padding: 0; }
.status-list li { display: flex; gap: 16px; padding: 9px 0; border-top: 1px solid var(--line-soft); font-size: 14px; }
.status-list li:first-child { border-top: 0; }
.status-list b { width: 130px; flex: none; }
.status-list span { color: var(--ink-2); word-break: break-all; }
.errors { background: var(--red-soft); color: #b42318; border-radius: 12px; padding: 12px 16px; margin-bottom: 14px; }
.errors p { margin: 2px 0; }
.msg-card h1 { font-size: 22px; margin: 0 0 8px; }
.msg-card p { color: var(--ink-2); }

/* ── 바닥글 ── */
.footer { border-top: 1px solid var(--line); background: var(--surface); }
.footer-in { max-width: 1440px; margin: 0 auto; padding: 22px 28px; display: flex; align-items: center; gap: 24px; color: var(--muted); font-size: 14px; flex-wrap: wrap; }
.footer-logo b { font-size: 20px; color: var(--ink); font-weight: 800; letter-spacing: -0.03em; }
.footer-logo small { color: var(--blue); font-weight: 600; font-size: 14px; }
.footer-link { margin-left: auto; color: var(--ink-2); font-weight: 600; }
.footer-link:hover { color: var(--blue); }

/* ── 좁은 화면 ── */
@media (max-width: 1280px) {
  .ticks { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .home-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); }
  .home-grid .col-right { grid-column: 1 / -1; flex-direction: row; align-items: stretch; }
  .home-grid .col-right > .panel { flex: 1 1 0; }
  .board-grid { grid-template-columns: minmax(0, 1fr); }
  .board-grid .side { display: grid; grid-template-columns: 1fr 1fr; }
}
/* 작은 노트북·태블릿 가로: 메뉴 간격을 줄여 한 줄에 */
@media (min-width: 961px) and (max-width: 1180px) {
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .topbar-in { gap: 16px; padding: 0 20px; }
  .nav { margin-left: 4px; gap: 0; }
  .nav-item { padding: 0 11px; font-size: 16px; }
}

/* ── 태블릿·휴대폰 ── */
@media (max-width: 960px) {
  body { font-size: 14.5px; }
  /* 상단: [로고 · 계정] / [검색] / [메뉴 5칸]. 고정하지 않아 본문을 가리지 않는다 */
  .topbar { position: static; }
  .topbar-in {
    height: auto; padding: 10px 16px 0; gap: 10px 12px;
    display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "logo acct" "nav nav";
  }
  .logo { grid-area: logo; gap: 8px; }
  .logo svg { width: 34px; height: 34px; }
  .logo-text b { font-size: 22px; }
  .logo-text small { font-size: 13px; }
  .account, .guest { grid-area: acct; justify-self: end; }
  .guest { gap: 12px; }
  .signup-link { font-size: 13.5px; }
  .btn-login, .acct-btn { height: 38px; padding: 0 16px; font-size: 14px; }
  .nav {
    grid-area: nav; margin: 0 -16px; height: auto; gap: 0; border-top: 1px solid var(--line-soft);
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); /* 메뉴 8칸 = 4칸 × 2줄 */
  }
  .nav-item {
    flex-direction: column; justify-content: center; gap: 3px; padding: 9px 2px 8px; font-size: 12.5px; font-weight: 600;
    letter-spacing: -0.04em; text-align: center; min-width: 0;
  }
  .nav-item span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .nav-item .ic { width: 21px; height: 21px; }
  .nav-item:hover { background: none; }
  .nav-m { display: flex; }
  .nav-drop { display: none; }
  /* 관리자 */
  .admin-tabs { margin: 0 -14px -4px; padding: 0 14px 2px; }
  .admin-top h1 { font-size: 23px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat b { font-size: 22px; }
  .admin-2col { grid-template-columns: minmax(0, 1fr); }
  /* 시장지표: 옆으로 밀어 보는 한 줄 */
  .mkt-grid { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 10px; margin: 0 -16px; padding: 0 16px 4px; }
  .mkt-card { flex: 0 0 78%; scroll-snap-align: start; }
  .tv-mini { height: 150px; }

  .page { padding: 14px 14px 36px; }
  .panel, .card { padding: 16px; border-radius: 12px; }
  .panel-head h2, .card-head h2 { font-size: 18px; gap: 8px; }
  .panel-head, .card-head { margin-bottom: 10px; flex-wrap: wrap; }

  /* 시세: 가로로 밀어 보는 한 줄 */
  .ticker { flex-direction: column; gap: 8px; margin: 0 -14px 16px; }
  .ticks {
    display: flex; gap: 8px; overflow-x: auto; padding: 2px 14px 6px; scroll-snap-type: x proximity; scroll-padding-inline: 14px;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .ticks::-webkit-scrollbar { display: none; }
  .tick { flex: none; width: 156px; padding: 11px 12px; scroll-snap-align: start; }
  .tick-name { font-size: 13px; }
  .tick-name .avatar { width: 22px !important; height: 22px !important; font-size: 11px !important; }
  .tick-price { font-size: 18px; }
  .chg { font-size: 12px; }
  .ticker-side { width: auto; flex-direction: row; align-items: center; justify-content: space-between; padding: 0 14px; flex-wrap: wrap; }
  .ticker-side .btn { width: auto; height: 36px; font-size: 13.5px; order: 2; }
  .ticker-side .provider { order: 1; }
  .ticker-side .feed-state { order: 3; width: 100%; margin-top: 0; }

  .board-grid .side { grid-template-columns: minmax(0, 1fr); display: grid; gap: 14px; }
  /* 휴대폰: 칸을 풀고 속보 → 최근 게시글 → 공식채널 → 텔레그램 → 유튜브 순 */
  .home-grid { display: flex; flex-direction: column; gap: 14px; }
  .home-col { display: contents; }
  .home-grid .news { order: 1; } .home-grid .recent-panel { order: 2; } .home-grid .ch-panel { order: 3; } .home-grid .tg-panel { order: 4; } .home-grid .yt-panel { order: 5; }
  .news-list li { padding: 11px 0; }
  .news-title { font-size: 15px; }
  .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px 2px; }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: none; }
  .recent li a { gap: 10px; padding: 13px 0; }
  .recent .badges { min-width: 0; flex-direction: column; align-items: flex-start; }
  .rt b { font-size: 15px; }
  .ch { min-height: 58px; padding: 10px 8px; gap: 8px; }
  .ch-mark { width: 36px; height: 36px; border-radius: 10px; }
  .ch-label { font-size: 13px; }
  .ch .ic:last-child { display: none; }

  /* 게시판 */
  .board-top { flex-direction: column; align-items: stretch; margin: 4px 0 14px; gap: 12px; }
  .board-top .btn { align-self: flex-start; }
  .board-hero h1 { font-size: 28px; }
  .board-hero p { font-size: 14px; }
  .filter-row { flex-direction: column; align-items: stretch; gap: 10px; margin-bottom: 14px; }
  .chip.big { min-width: 0; height: 38px; padding: 0 16px; font-size: 14px; }
  .filter-row .chips { margin: 0 -14px; padding: 0 14px 2px; }
  .chart-tabs { margin: 0 -14px 14px; padding: 0 14px 2px; }

  /* 긴 제목은 잘라 겹치게 두지 말고 두 줄까지 감는다 */
  .rt b, .tg-title { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-all; line-height: 1.4; }
  .recent time, .tg-list time { padding-left: 4px; }
  .blind-note { height: auto; padding: 9px 12px; font-size: 13px; align-items: flex-start; line-height: 1.4; }
  .board-main { gap: 14px; }
  .latest-body { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .latest-coin { padding: 16px; gap: 10px; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .latest-coin .coin-line { flex: 1 1 100%; order: 2; }
  .latest-coin .coin-line b { font-size: 22px; }
  .latest-coin .go { margin: 0 0 0 auto; order: 1; }
  .price-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pc { border-left: 0; border-top: 1px solid var(--line); padding: 11px 6px; }
  /* 진입가는 한 줄 전체, 나머지는 2칸씩. 홀로 남는 마지막 칸은 한 줄 전체 */
  .pc:first-child { grid-column: 1 / -1; border-top: 0; }
  .pc:nth-child(2n + 3) { border-left: 1px solid var(--line); }
  .pc:last-child:nth-child(2n) { grid-column: 1 / -1; }
  .pc b { font-size: 17px; }
  .rationale { padding: 12px 14px; }

  /* 상세 */
  .detail { gap: 12px; }
  .detail-title { font-size: 22px; line-height: 1.3; flex-wrap: wrap; gap: 8px; }
  .detail .card > * + * { margin-top: 12px; }
  .post-body { font-size: 15px; }
  .admin-row { gap: 8px; }
  .talk-row { padding: 8px 0; border-top: 1px solid var(--line-soft); }

  /* 폼 */
  .form-page h1 { font-size: 24px; }
  .row { grid-template-columns: 1fr; gap: 6px; }
  .row > span { padding-top: 0; }
  fieldset.row legend { float: none; width: 100%; margin-bottom: 2px; }
  .btn-lg { width: 100%; }
  .status-list li { flex-direction: column; gap: 2px; }

  .footer-in { padding: 18px 16px; flex-direction: column; align-items: flex-start; gap: 6px; font-size: 13px; }
  .footer-link { margin-left: 0; }
}

/* ── 휴대폰: 표를 카드로 ── */
@media (max-width: 760px) {
  .table-wrap { overflow: visible; }
  .rec-table thead, .post-table thead, .rec-table td.no, .post-table td.no { display: none; }
  .rec-table, .rec-table tbody, .post-table, .post-table tbody { display: block; }

  .rec-table tr {
    display: grid; grid-template-columns: minmax(0, max-content) 1fr auto; gap: 4px 8px; align-items: center;
    padding: 12px 0; border-bottom: 1px solid var(--line-soft);
  }
  .rec-table td { display: block; padding: 0; border: 0; white-space: normal; max-width: none; background: none !important; }
  .rec-table td.coin { grid-column: 1; grid-row: 1; display: flex; min-width: 0; }
  .rec-table td.coin a { min-width: 0; }
  .rec-table td.coin b { max-width: none; font-size: 15px; line-height: 1.35; }
  .rec-table td.kind { grid-column: 2; grid-row: 1; justify-self: start; }
  .rec-table td.res { grid-column: 3; grid-row: 1; text-align: right; }
  .rec-table tr.admin-blinded { background: #f7f7f8; margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
  .rec-table td[data-label] { grid-column: 1 / -1; font-size: 13.5px; color: var(--ink-2); display: flex; gap: 8px; }
  .rec-table td[data-label]::before { content: attr(data-label); flex: none; width: 64px; color: var(--muted); }
  .rec-table td.wrap { max-width: none; }
  .rec-table td.sum { grid-column: 1 / -1; font-size: 13px; color: var(--muted); max-width: none; overflow: hidden; }
  .rec-table td.sum a { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .rec-table td.date { grid-column: 1 / -1; font-size: 12.5px; color: var(--faint); }
  .rec-table tr.is-hidden td.hidden-title { grid-column: 1 / -1; }
  .rec-table td.empty { grid-column: 1 / -1; }
  td.res form { display: block; margin: 4px 0 0; }

  .post-table tr { display: flex; flex-direction: column; gap: 3px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
  .post-table td { display: block; padding: 0; border: 0; white-space: normal; }
  .post-table td.date { font-size: 12.5px; color: var(--faint); }

  .admin-table thead { display: none; }
  .admin-table, .admin-table tbody { display: block; }
  .admin-table tr { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 11px 0; border-bottom: 1px solid var(--line-soft); }
  .admin-table td { display: block; padding: 0; border: 0; white-space: normal; text-align: left !important; font-size: 13.5px; }
  .admin-table td.no { display: none; }
  .admin-table td.ttl { flex-basis: 100%; order: -1; min-width: 0; font-size: 15px; }
  .admin-table td.empty { flex-basis: 100%; }
  .quote-table th, .quote-table td { padding: 10px 6px; font-size: 13.5px; }
  .quote-table td.coin small { display: none; }
  .quote-table .chg { white-space: normal; }
}
.admin-table .badge + .badge { margin-left: 4px; }

/* 관리 화면 메뉴 띠·걸러보기 칩: 본문 여백(14px)에 맞춤 */
@media (max-width: 960px) {
  .admin > .chips, .form-page > .chips, nav.chips.admin-tabs { margin-left: -14px; margin-right: -14px; padding: 0 14px 2px; }
}
