/* CoinPatternX 사용자 사이트 — 어두운 남색 바탕 · 보라 강조 · 숫자는 고정폭 */
:root {
  --bg: #0a0d13; --panel: #10141c; --panel-2: #161b25; --panel-3: #1c2230; --line: #1e2531; --line-2: #2a3242;
  --text: #e9edf4; --muted: #8690a2; --faint: #5b6577; --accent: #7c6cff; --accent-2: #9d90ff; --accent-ink: #ffffff; --accent-bg: #7c6cff22;
  --pos: #2dd4a0; --neg: #ff5d73; --pos-bg: #2dd4a01f; --neg-bg: #ff5d731f; --warn: #f5b942; --danger: #ff5d73; --focus: #7c6cff77;
  --radius: 12px; --shadow: none;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "JetBrains Mono", Consolas, "D2Coding", monospace;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg); color: var(--text); color-scheme: dark;
  font: 14px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 24px; margin: 0; letter-spacing: -.01em; }
h2 { font-size: 17px; margin: 0 0 8px; }
.sub { color: var(--muted); font-size: 13px; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }

button {
  font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink);
  border-radius: 8px; padding: 8px 14px; min-height: 36px;
}
button:hover:not(:disabled) { filter: brightness(1.08); }
button:disabled { opacity: .55; cursor: default; }
button.ghost { background: var(--panel-2); color: var(--text); border-color: var(--line-2); }
button.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
button.ghost.danger { background: transparent; color: var(--danger); border-color: var(--danger); }
button.sm { padding: 4px 10px; min-height: 30px; font-size: 12px; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
input, textarea {
  font: inherit; color: var(--text); background: var(--panel-2); width: 100%;
  border: 1px solid var(--line-2); border-radius: 8px; padding: 9px 11px;
}
input::placeholder, textarea::placeholder { color: var(--faint); }
textarea { resize: vertical; min-height: 140px; }
label { display: block; font-size: 13px; font-weight: 600; margin: 12px 0 4px; }
label.check { display: flex; gap: 8px; align-items: center; font-weight: 500; }
label.check input { width: auto; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.badge { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--panel-2); color: var(--muted); border: 1px solid var(--line-2); }
.badge.admin { color: var(--accent-2); border-color: var(--accent); }
.badge.off { color: var(--danger); border-color: var(--danger); }
.pos { color: var(--pos); }
.neg { color: var(--neg); }
.err { color: var(--danger); font-size: 13px; min-height: 18px; margin-top: 8px; }
.empty { text-align: center; color: var(--muted); padding: 32px 0; }

/* ── 틀: 왼쪽 메뉴 + 위 시세 줄 + 본문 ─────────────────── */
.shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.shell.guest { grid-template-columns: minmax(0, 1fr); }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 4px; padding: 18px 12px 14px;
        background: var(--panel); border-right: 1px solid var(--line); overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 16px; color: var(--text); }
.brand:hover { text-decoration: none; }
.logo { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: linear-gradient(135deg, #8f7dff, #5b49e0); color: #fff; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text b { font-size: 15px; letter-spacing: .04em; }
.brand-text small { font-family: var(--mono); font-size: 9px; letter-spacing: .14em; color: var(--muted); }
.brand-logo { display: block; width: 100%; max-width: 196px; height: auto; margin: 0 auto; }
.side-label { font-size: 11px; color: var(--faint); padding: 6px 10px 4px; letter-spacing: .04em; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 9px; color: var(--muted); font-weight: 600; font-size: 14px; }
.side-nav a:hover { text-decoration: none; background: var(--panel-2); color: var(--text); }
.side-nav a[aria-current="page"] { background: var(--accent-bg); color: var(--text); box-shadow: inset 0 0 0 1px #7c6cff55; }
.side-nav a[aria-current="page"] svg { stroke: var(--accent-2); }
.side-nav svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.side-nav .count { margin-left: auto; font-style: normal; font-family: var(--mono); font-size: 11px; font-weight: 700; min-width: 24px; text-align: center;
                   padding: 1px 7px; border-radius: 999px; background: var(--accent); color: #fff; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; padding-top: 14px; }
.net { border: 1px solid var(--line); background: var(--panel-2); border-radius: 10px; padding: 12px; }
.net-head { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); font-weight: 600; }
.net-state { color: var(--pos); }
.net-state.bad { color: var(--warn); }
.net-state::before { content: "●"; font-size: 8px; margin-right: 5px; vertical-align: 2px; }
.net-num { display: flex; align-items: baseline; justify-content: space-between; margin: 6px 0 8px; }
.net-num b { font-family: var(--mono); font-size: 18px; }
.net-num span { font-size: 11px; color: var(--muted); }
.bar { height: 4px; border-radius: 4px; background: var(--panel-3); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; border-radius: 4px; background: linear-gradient(90deg, #7c6cff, #9d90ff); transition: width .4s; }
.me { display: flex; align-items: center; gap: 10px; padding: 10px 6px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.avatar { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--accent-bg); color: var(--accent-2); font-weight: 700; flex: none; }
.me-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; flex: 1; }
.me-text b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
button.me-name { background: none; border: 0; padding: 0; min-height: 0; color: var(--text); font-size: 13px; font-weight: 700; text-align: left;
                 overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
button.me-name:hover { color: var(--accent-2); filter: none; text-decoration: underline; text-underline-offset: 3px; }
button.me-name.unset { color: var(--warn); }
.me-text small { font-size: 10px; color: var(--muted); letter-spacing: .04em; }
.me-coins { display: block; margin-top: 3px; color: var(--warn); font-weight: 700; font-family: var(--mono); font-size: 12px; white-space: nowrap; }
.me .badge { display: none; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 18px; min-height: 56px; padding: 10px 28px;
          background: #0a0d13e6; backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); font-size: 12px; overflow-x: auto; white-space: nowrap; }
.live { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.dot.on { background: var(--pos); box-shadow: 0 0 0 3px #2dd4a02e; }
.dot.late { background: var(--warn); }
.clock { font-family: var(--mono); color: var(--muted); padding-right: 18px; border-right: 1px solid var(--line-2); }
.tickers { display: inline-flex; gap: 22px; font-family: var(--mono); }
.tickers b { color: var(--muted); font-weight: 700; margin-right: 8px; }
.tickers .chg { margin-left: 8px; font-size: 11px; }
.wrap { width: 100%; max-width: 1320px; margin: 0 auto; padding: 26px 28px 70px; }
.shell.guest .wrap { max-width: 1080px; }

/* ── 대시보드 ──────────────────────────────────────────── */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.eyebrow { font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .1em; color: var(--accent-2); margin-bottom: 6px; }
.page-head .sub { margin-top: 4px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--panel); color: var(--muted); font-size: 12px; font-weight: 600; }
a.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 8px; background: var(--accent); color: #fff; font-size: 13px; font-weight: 700; }
a.btn:hover { text-decoration: none; filter: brightness(1.08); }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.panel + .panel, .panel + .two, .two + .panel { margin-top: 22px; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 18px 18px 10px; }
.panel-head h2 { margin: 0; font-size: 19px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.panel-head .sub { margin-top: 3px; font-size: 12px; }
.tag { font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: .06em; padding: 2px 7px; border-radius: 5px; background: var(--pos-bg); color: var(--pos); }
.link { font-size: 13px; font-weight: 700; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat { padding: 18px 20px 20px; border-left: 1px solid var(--line); min-width: 0; }
.stat:first-child { border-left: 0; }
.stat .k { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.stat .v { font-family: var(--mono); font-size: 23px; font-weight: 700; letter-spacing: -.01em; overflow-wrap: anywhere; }
.stat .v small { font-family: var(--mono); font-size: 11px; font-weight: 500; color: var(--muted); margin-left: 8px; letter-spacing: 0; }
.tbl-wrap { overflow-x: auto; }
table.grid { width: 100%; border-collapse: collapse; font-size: 13px; }
table.grid th { text-align: left; font-size: 11px; font-weight: 600; color: var(--faint); padding: 10px 18px; background: var(--panel-2);
                border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); white-space: nowrap; }
table.grid th { padding-left: 16px; padding-right: 16px; }
.side-nav, .topbar { scrollbar-width: none; }
.side-nav::-webkit-scrollbar, .topbar::-webkit-scrollbar { display: none; }
table.grid td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
table.grid tr:last-child td { border-bottom: 0; }
table.grid td.r, table.grid th.r { text-align: right; }
table.grid .num { font-size: 13px; }
.model { display: flex; align-items: center; gap: 12px; min-width: 0; }
.mono-badge { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--panel-2); border: 1px solid var(--line-2);
              color: var(--accent-2); font-family: var(--mono); font-size: 10px; font-weight: 700; flex: none; }
.model b { display: block; font-size: 14px; }
.model small { display: block; font-size: 11px; color: var(--muted); max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.coin-cell b { display: block; font-weight: 600; font-size: 14px; }
button.coin-cell { background: none; border: 0; padding: 0; min-height: 0; color: var(--text); text-align: left; font-weight: 400; cursor: pointer; }
button.coin-cell:hover { filter: none; }
button.coin-cell:hover b { color: var(--accent-2); }
.coin-cell .go { font-size: 11px; color: var(--faint); }
button.coin-cell:hover .go { color: var(--accent-2); }
#chartHome { margin-left: 6px; vertical-align: 3px; }
.coin-cell small { font-family: var(--mono); font-size: 10px; color: var(--faint); letter-spacing: .04em; }
.side-tag { display: inline-block; font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: .05em; padding: 4px 9px; border-radius: 6px; }
.side-tag.long { background: var(--pos-bg); color: var(--pos); }
.side-tag.short { background: var(--neg-bg); color: var(--neg); }
.state { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; }
.state::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--pos); }
.state.idle { color: var(--muted); }
.state.idle::before { background: var(--faint); }
.state.warn::before { background: var(--warn); }
.panel .empty { padding: 36px 16px; }

.chart-box { padding: 4px 18px 16px; }
.chart-svg { display: block; width: 100%; height: 300px; background: #0b0e15; border: 1px solid var(--line); border-radius: 10px; }
.chart-svg text { fill: var(--faint); font-family: var(--mono); font-size: 10px; }
.chart-svg .gridline { stroke: var(--line); stroke-width: 1; }
.chart-svg .last { stroke: var(--accent-2); stroke-width: 1; stroke-dasharray: 4 4; }
.chart-svg .lastbox { fill: var(--accent); }
.chart-svg .lasttext { fill: #fff; font-weight: 700; }
.chart-meta { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.chart-meta .price { font-family: var(--mono); font-size: 19px; font-weight: 700; }
.ai { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border: 1px solid var(--line-2); border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--muted); }
.ai.up { color: var(--pos); border-color: #2dd4a066; }
.ai.down { color: var(--neg); border-color: #ff5d7366; }
.ai small { color: var(--muted); font-weight: 500; }

.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.two > .panel { margin-top: 0; }                   /* 나란히 놓인 두 칸의 윗선을 맞춤 */
.two table.grid th, .two table.grid td { padding-left: 14px; padding-right: 14px; }
.two .model small { max-width: 190px; }
.seg { display: inline-flex; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 3px; margin: 0 18px 12px; }
.seg button { background: transparent; border: 0; color: var(--muted); min-height: 26px; padding: 3px 12px; font-size: 12px; border-radius: 6px; }
.seg button[aria-pressed="true"] { background: var(--accent); color: #fff; }
.medal { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font-family: var(--mono); font-size: 11px; font-weight: 700; background: var(--panel-3); color: var(--muted); }
.medal.m1 { background: #f5b942; color: #231a00; }
.medal.m2 { background: #b8c0cc; color: #15181d; }
.medal.m3 { background: #c07a4d; color: #1d0f05; }
.rank-val { text-align: right; }
.rank-val b { display: block; font-family: var(--mono); font-size: 14px; }
.rank-val small { font-size: 10px; color: var(--faint); }
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { border-top: 1px solid var(--line); }
.feed a { display: flex; gap: 12px; padding: 14px 18px; color: var(--text); }
.feed a:hover { text-decoration: none; background: var(--panel-2); }
.feed .avatar { width: 34px; height: 34px; font-size: 13px; }
.feed .who { font-size: 12px; color: var(--muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.feed .who b { color: var(--text); font-size: 13px; }
.coin-tag { font-family: var(--mono); font-size: 10px; font-weight: 700; padding: 1px 7px; border-radius: 5px; background: var(--accent-bg); color: var(--accent-2); }
.feed .t { font-weight: 600; font-size: 14px; margin-top: 3px; overflow-wrap: anywhere; }
.feed .x { font-size: 12px; color: var(--muted); margin-top: 2px; overflow-wrap: anywhere; }
.notice { margin: 0 0 18px; padding: 12px 16px; border: 1px solid #f5b94255; background: #f5b9421a; color: var(--warn); border-radius: 10px; font-size: 13px; }

/* ── 5분 예측 게임 ─────────────────────────────────────── */
.side-nav .count.coin { background: #f5b9422b; color: var(--warn); min-width: 0; }
.bet-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); border-top: 1px solid var(--line); }
.bet-col { padding: 16px 0 0; min-width: 0; }
.bet-col + .bet-col { border-left: 1px solid var(--line); }
.bet-col h3 { margin: 0; padding: 0 18px 12px; font-size: 15px; }
.bet-body { padding: 0 18px 18px; }
#betPanel .stats { border-top: 1px solid var(--line); }
@media (max-width: 860px) { .bet-grid { grid-template-columns: minmax(0, 1fr); } .bet-col + .bet-col { border-left: 0; border-top: 1px solid var(--line); } }
.ai-say { padding: 12px 14px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line-2); margin-bottom: 12px; font-size: 14px; }
.ai-say.up b { color: var(--pos); }
.ai-say.down b { color: var(--neg); }
.amount label { margin-top: 0; }
.amount input { max-width: 140px; font-family: var(--mono); }
.picks { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.picks.one { grid-template-columns: 1fr; margin-top: 10px; }
button.pick { min-height: 52px; font-size: 16px; font-weight: 800; border-radius: 10px; }
button.pick.up { background: var(--pos-bg); border-color: #2dd4a080; color: var(--pos); }
button.pick.down { background: var(--neg-bg); border-color: #ff5d7380; color: var(--neg); }
button.pick:hover:not(:disabled) { filter: brightness(1.25); }
.bet-done { padding: 14px; border-radius: 10px; background: var(--accent-bg); border: 1px solid #7c6cff55; font-size: 14px; }
.bet-done.idle { background: var(--panel-2); border-color: var(--line-2); color: var(--muted); }
.bet-done .sub { margin-top: 4px; }
/* 대시보드 포지션: 줄마다 '자세히' */
.pos-mini tr.open > td { background: var(--panel-2); }
.pos-mini .more { white-space: nowrap; }
.pos-detail > td { background: var(--panel-2); padding: 4px 18px 16px !important; }
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px 18px; margin: 0; }
.kv div { min-width: 0; }
.kv dt { font-size: 11px; color: var(--muted); }
.kv dd { margin: 2px 0 0; font-size: 13px; overflow-wrap: anywhere; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* 베팅 로그 (모두에게 공개) */
.streaks { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 0 18px 12px; }
.streaks:empty { display: none; }
.streak { padding: 4px 10px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line-2); font-size: 12px; }
.badge { display: inline-block; margin-left: 4px; padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.badge.hot { background: #ff7a1a22; color: #ffb27a; border: 1px solid #ff7a1a55; }
.badge.big { background: var(--accent-bg); color: var(--text); border: 1px solid #7c6cff55; }
/* 차트 이동평균선 켜고 끄기 */
.ma-btns { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 18px 10px; }
.ma-btn { display: inline-flex; align-items: center; gap: 6px; background: none; color: var(--muted); border: 1px solid var(--line-2);
  padding: 3px 9px; min-height: 0; font-size: 11.5px; font-weight: 600; border-radius: 999px; }
.ma-btn i { display: inline-block; width: 16px; }
.ma-btn b { color: var(--text); font-family: var(--mono); font-weight: 600; }
.ma-btn[aria-pressed="true"] { color: var(--text); background: var(--panel-2); border-color: var(--muted); }
.ma-btn[aria-pressed="false"] i { opacity: .35; }
.ma-btn[aria-pressed="false"] b { color: var(--muted); }
/* 공지사항 */
.notice-banner { display: flex; align-items: center; gap: 10px; padding: 10px 14px; margin-bottom: 14px; border-radius: 12px;
  background: var(--accent-bg); border: 1px solid #7c6cff55; font-size: 14px; }
.notice-banner a { flex: 1; min-width: 0; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nb-tag { font-size: 12px; font-weight: 700; white-space: nowrap; margin-right: 6px; }
.ntc-list { list-style: none; margin: 0; padding: 0; }
.ntc-list li { border-top: 1px solid var(--line); }
.ntc-list li:first-child { border-top: 0; }
.ntc-list summary { cursor: pointer; padding: 14px 18px; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.ntc-list summary .sub { margin-left: auto; }
.ntc-text { padding: 0 18px 18px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.7; color: var(--text); }
.rules { margin: 0; padding: 0 18px 18px 36px; color: var(--muted); font-size: 13px; line-height: 1.8; }

/* ── 로그인 ────────────────────────────────────────────── */
.auth { max-width: 380px; margin: 9vh auto 0; }
.auth-logo { display: block; width: 200px; max-width: 70%; height: auto; margin: 0 auto 10px; }
.auth h1 { text-align: center; margin-bottom: 4px; letter-spacing: .04em; font-size: 22px; }
.auth .sub { text-align: center; margin-bottom: 18px; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--panel-2); border-radius: 8px; padding: 3px; margin-bottom: 4px; }
.tabs button { background: transparent; color: var(--muted); border: 0; }
.tabs button[aria-selected="true"] { background: var(--panel-3); color: var(--text); }
.auth form button[type="submit"] { width: 100%; margin-top: 16px; }
.admin-entry { text-align: center; margin-top: 14px; }
button.admin-link { background: none; border: 0; padding: 4px 8px; min-height: 0; font-size: 12px; font-weight: 400; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
button.admin-link:hover { color: var(--accent-2); filter: none; }

/* ── 커뮤니티 ──────────────────────────────────────────── */
.head { display: flex; align-items: end; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.head .search { max-width: 260px; margin-left: auto; }
.coins { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 12px; }
.coin { display: block; color: var(--text); padding: 14px 16px; }
.coin:hover { text-decoration: none; border-color: var(--accent); }
.coin .sym { font-weight: 800; font-size: 16px; }
.coin .name { color: var(--muted); font-size: 13px; margin-left: 6px; }
.coin .price { font-family: var(--mono); font-size: 19px; font-weight: 700; margin-top: 6px; }
.coin .meta { display: flex; justify-content: space-between; margin-top: 6px; font-size: 13px; color: var(--muted); }
.chg { font-family: var(--mono); font-weight: 700; }
.back { display: inline-block; font-size: 13px; margin-bottom: 8px; }
.ctop { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.ctop .price { font-family: var(--mono); font-size: 20px; font-weight: 700; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; margin-top: 16px; align-items: start; }
.posts { list-style: none; margin: 0; padding: 0; }
.posts li { border-bottom: 1px solid var(--line); }
.posts li:last-child { border-bottom: 0; }
.posts a { display: block; padding: 11px 4px; color: var(--text); }
.posts a:hover { text-decoration: none; background: var(--panel-2); }
.posts .t { font-weight: 600; overflow-wrap: anywhere; }
.posts .m { font-size: 12px; color: var(--muted); margin-top: 2px; }
.pager { display: flex; gap: 8px; align-items: center; justify-content: center; margin-top: 12px; }
.count { text-align: right; font-size: 12px; color: var(--muted); margin-top: 2px; }
.post h1 { overflow-wrap: anywhere; }
.post .m { color: var(--muted); font-size: 13px; margin: 6px 0 16px; }
.post .body { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.7; }
.post .del-note { color: var(--danger); font-size: 13px; margin-bottom: 8px; }

/* ── 커뮤니티 관리 ─────────────────────────────────────── */
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th, .tbl td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl th { font-size: 12px; color: var(--muted); font-weight: 600; }
.tbl td.r, .tbl th.r { text-align: right; }
.tbl tr.gone td { color: var(--muted); }

dialog { border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--panel); color: var(--text); width: min(420px, calc(100% - 32px)); padding: 20px; }
dialog::backdrop { background: #000a; }
dialog .row { margin-top: 16px; }
.dlg-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.dlg-head h2 { margin: 0; }
.coin-pill { padding: 3px 10px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line-2); font-size: 12px; font-weight: 700; white-space: nowrap; }
#nickDlg { width: min(460px, calc(100% - 32px)); }
#nickForm .sub { margin-top: 6px; }
.dlg-sub { margin: 20px 0 0; padding-top: 16px; border-top: 1px solid var(--line); font-size: 15px; }
.dlg-foot { border-top: 1px solid var(--line); padding-top: 14px; }
.name-preview { margin: 12px 0 10px; padding: 10px 12px; border-radius: 8px; background: var(--panel-2); font-size: 12px; color: var(--muted); }
.name-preview .nm { margin-left: 8px; font-size: 15px; }
.nm { color: var(--text); font-weight: 700; }
.swatches { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.swatch { display: flex; align-items: center; gap: 6px; justify-content: flex-start; background: var(--panel-2); border: 1px solid var(--line-2);
  color: var(--text); font-size: 12px; font-weight: 600; padding: 8px 10px; min-height: 0; border-radius: 8px; }
.swatch .dot { width: 12px; height: 12px; border-radius: 50%; background: currentColor; flex: none; }
.swatch[aria-checked="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.odds { margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: var(--accent-bg); font-size: 11px; font-weight: 700; vertical-align: 2px; }
/* 닉네임 색 (상점) — 어두운 바탕에서 읽히는 색만. :is 로 '.feed .who b' 같은 글자색 규칙보다 우선 */
:is(.nm, .swatch, button.me-name).nc-gold { color: #f5c451; }
:is(.nm, .swatch, button.me-name).nc-orange { color: #ffa552; }
:is(.nm, .swatch, button.me-name).nc-coral { color: #ff8a7a; }
:is(.nm, .swatch, button.me-name).nc-pink { color: #ff7ac3; }
:is(.nm, .swatch, button.me-name).nc-violet { color: #b49cff; }
:is(.nm, .swatch, button.me-name).nc-sky { color: #6cc8ff; }
:is(.nm, .swatch, button.me-name).nc-mint { color: #4fe0b5; }
:is(.nm, .swatch, button.me-name).nc-lime { color: #b6e35a; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--text); color: var(--bg);
  padding: 10px 16px; border-radius: 8px; font-size: 14px; font-weight: 600; z-index: 20; max-width: calc(100% - 32px); }

/* ── 좁은 화면: 메뉴를 위로 ─────────────────────────────── */
@media (max-width: 980px) {
  .two { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .stat .v small { display: block; margin: 4px 0 0; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { padding: 0 8px 0 0; }
  .brand-logo { width: auto; height: 46px; margin: 0; }
  .brand-text small, .side-label, .net { display: none; }
  .side-nav { flex-direction: row; flex: 1 1 100%; order: 3; overflow-x: auto; }
  .side-nav a { padding: 8px 10px; white-space: nowrap; }
  .side-nav a span { font-size: 13px; }
  .side-foot { margin: 0 0 0 auto; padding: 0; }
  .me { border: 0; padding: 0; }
  .me .avatar, .me-text small { display: none; }
  .topbar { padding: 8px 16px; min-height: 44px; position: static; }
  .wrap { padding: 18px 16px 60px; }
  .grid2 { grid-template-columns: minmax(0, 1fr); }
  .grid2 .write { order: -1; }
  table.grid th, table.grid td { padding: 11px 12px; }
  .chart-svg { height: 240px; }
}
@media (max-width: 480px) {
  .stat .v { font-size: 19px; }
  h1 { font-size: 21px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
