:root {
  --bg: #060608;
  --bg2: #0b0b0e;
  --card: #0e0e12;
  --card2: #121217;
  --line: rgba(255, 255, 255, 0.07);
  --line2: rgba(255, 255, 255, 0.12);
  --text: #edebe6;
  --muted: #8b8a92;
  --dim: #5a5a63;
  --gold: #e7c873;
  --gold2: #b8913f;
  --goldsoft: rgba(231, 200, 115, 0.12);
  --up: #ff4d67;
  --upsoft: rgba(255, 77, 103, 0.12);
  --down: #3d8bff;
  --downsoft: rgba(61, 139, 255, 0.12);
  --flat: #6f6f79;
  --serif: 'Instrument Serif', 'Nanum Myeongjo', 'Times New Roman', serif;
  --sans: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  --r: 18px;
}

* { box-sizing: border-box; }
html { color-scheme: dark; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
  overflow-x: hidden;
  word-break: keep-all;
}
.mono { font-family: var(--mono); font-feature-settings: 'zero' 0; letter-spacing: -0.02em; }
b { font-weight: 650; }
.wrap { max-width: 1360px; margin: 0 auto; padding: 0 28px; }

.bg-glow {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(900px 480px at 78% -8%, rgba(231, 200, 115, 0.09), transparent 60%),
    radial-gradient(700px 400px at 0% 30%, rgba(255, 77, 103, 0.035), transparent 60%),
    radial-gradient(700px 400px at 100% 70%, rgba(61, 139, 255, 0.035), transparent 60%);
}
main, header { position: relative; z-index: 1; }

/* ── TOPBAR ── */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(6, 6, 8, 0.72);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.topbar-in { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.logo { position: relative; width: 38px; height: 38px; display: block; }
.logo svg { width: 38px; height: 38px; display: block; filter: drop-shadow(0 4px 14px rgba(231, 200, 115, 0.25)); }
.tassel {
  position: absolute; left: 19px; top: 13px; width: 14px; height: 1.5px;
  background: var(--gold); transform-origin: 0 50%; transform: rotate(8deg);
}
.tassel i {
  position: absolute; right: -1px; top: 0; width: 1.5px; height: 14px; background: var(--gold);
  transform-origin: 50% 0; animation: swing 3.2s ease-in-out infinite;
}
.tassel i::after {
  content: ''; position: absolute; left: -2.5px; bottom: -6px; width: 6.5px; height: 7px;
  background: linear-gradient(var(--gold), var(--gold2)); border-radius: 1px 1px 3px 3px;
}
@keyframes swing { 0%, 100% { transform: rotate(-9deg); } 50% { transform: rotate(9deg); } }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text b { font-family: var(--mono); font-weight: 600; letter-spacing: 0.28em; font-size: 14px; }
.brand-text small { color: var(--muted); font-size: 11.5px; margin-top: 3px; letter-spacing: 0.02em; }

.conn { display: flex; align-items: center; gap: 8px; }
.pill {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; border-radius: 99px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.02); color: var(--muted); font-size: 12px;
}
.pill i { width: 6px; height: 6px; border-radius: 50%; background: var(--dim); }
.pill.ok i { background: #3ddc97; box-shadow: 0 0 0 3px rgba(61, 220, 151, 0.15); }
.pill.err i { background: var(--up); }
.pill.ok { color: var(--text); }
.clock { color: var(--muted); font-size: 12px; margin-left: 6px; min-width: 64px; text-align: right; }

/* ── HERO ── */
.hero {
  display: grid; grid-template-columns: 0.95fr 1.1fr; gap: 48px; align-items: end;
  padding: 56px 0 36px;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px; margin: 0 0 18px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold);
}
.dot-live { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); animation: pulse 2s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(231, 200, 115, 0.55); }
  70% { box-shadow: 0 0 0 9px rgba(231, 200, 115, 0); }
  100% { box-shadow: 0 0 0 0 rgba(231, 200, 115, 0); }
}
.hero h1 {
  margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(48px, 6.4vw, 88px);
  line-height: 0.98; letter-spacing: -0.03em;
}
.hero h1 em {
  font-style: italic; white-space: nowrap;
  background: linear-gradient(100deg, #f6e3a1, #e2be66 45%, #a9822f);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lede { color: var(--muted); max-width: 560px; margin: 22px 0 26px; font-size: 15px; line-height: 1.7; }
.lede b { color: var(--text); font-weight: 600; }
.scanline { display: flex; align-items: center; gap: 14px; }
.scanbar { width: 160px; height: 3px; background: var(--line); border-radius: 3px; overflow: hidden; }
.scanbar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold2), var(--gold)); transition: width 0.9s linear; }
.scanbar i.busy { width: 40% !important; animation: slide 1.2s ease-in-out infinite; }
@keyframes slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }
#scantext { font-size: 11.5px; color: var(--muted); }

.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat {
  position: relative; display: flex; flex-direction: column; gap: 2px; padding: 16px 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.008));
  border: 1px solid var(--line); border-radius: var(--r); overflow: hidden;
}
.stat.gold { border-color: rgba(231, 200, 115, 0.28); background: linear-gradient(180deg, rgba(231, 200, 115, 0.08), rgba(231, 200, 115, 0.01)); }
.stat-k { font-size: 12px; color: var(--muted); }
.stat-v { font-size: 26px; font-weight: 500; letter-spacing: -0.04em; line-height: 1.25; margin-top: 4px; }
.stat.gold .stat-v { color: var(--gold); }
.stat-s { font-size: 11px; color: var(--dim); }
.thermo { margin-top: 10px; height: 4px; background: linear-gradient(90deg, var(--down), #3a3a44 50%, var(--up)); border-radius: 4px; position: relative; opacity: 0.85; }
.thermo i { position: absolute; top: -4px; width: 2px; height: 12px; background: #fff; border-radius: 2px; left: 50%; transition: left 0.8s; box-shadow: 0 0 8px #fff; }

/* ── CONTROLS ── */
.controls { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 6px 0 16px; flex-wrap: wrap; }
.seg { display: inline-flex; padding: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.seg button {
  font: inherit; font-size: 13px; color: var(--muted); background: none; border: 0; padding: 7px 16px;
  border-radius: 9px; cursor: pointer; transition: 0.2s;
}
.seg button:hover { color: var(--text); }
.seg button.on { background: #1d1d24; color: var(--text); box-shadow: inset 0 0 0 1px var(--line2); }
.segs { display: flex; gap: 10px; flex-wrap: wrap; }
.seg.mode button.on { background: linear-gradient(180deg, rgba(231, 200, 115, .18), rgba(231, 200, 115, .06)); color: var(--gold); box-shadow: inset 0 0 0 1px rgba(231, 200, 115, .35); }
.rsiv.sig { color: var(--sig); font-weight: 600; }
.mode-tag { font-family: var(--mono); font-size: 10px; padding: 1px 6px; border-radius: 5px; background: var(--goldsoft); color: var(--gold); margin-left: 6px; letter-spacing: .02em; text-transform: none; }
.legend { display: flex; gap: 16px; color: var(--muted); font-size: 12px; flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.lg { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.lg.full { background: var(--gold); }
.lg.near { border: 2px solid var(--gold); }
.lg.trend { background: rgba(231, 200, 115, 0.3); transform: scale(0.7); }
.lg.off { border: 1.5px solid #3a3a44; }

/* ── BOARDS ── */
.boards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.board {
  background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 22px 22px 10px;
  position: relative; overflow: hidden;
}
.board::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent); opacity: 0.6;
}
.board.up { --accent: var(--up); --accentsoft: var(--upsoft); }
.board.down { --accent: var(--down); --accentsoft: var(--downsoft); }
.board-h { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 14px; }
.board-eyebrow { margin: 0 0 4px; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--dim); }
.board h2, .sec-h h2 { margin: 0; font-size: 24px; font-weight: 700; letter-spacing: -0.03em; }
.board h2 span { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--accent); font-size: 28px; margin-left: 4px; }
.board-desc { margin: 0; color: var(--muted); font-size: 12px; text-align: right; max-width: 260px; line-height: 1.5; }
.board-desc b { color: var(--accent); font-weight: 600; }

.list { display: flex; flex-direction: column; }
.row {
  display: grid; grid-template-columns: 30px minmax(0, 1fr) 76px 108px 96px 54px; gap: 12px; align-items: center;
  padding: 14px 8px 12px; margin: 0 -8px; border-top: 1px solid var(--line); cursor: pointer;
  border-radius: 12px; transition: background 0.2s; position: relative;
  animation: rowin 0.5s both;
}
.row:first-child { border-top-color: transparent; }
.row:hover { background: rgba(255, 255, 255, 0.025); }
.row:hover + .row { border-top-color: transparent; }
@keyframes rowin { from { opacity: 0; transform: translateY(6px); } }
.rank { font-family: var(--serif); font-size: 28px; color: var(--dim); line-height: 1; font-style: italic; }
.row:nth-child(1) .rank { color: var(--gold); }
.coin { min-width: 0; }
.sym { display: flex; align-items: center; gap: 7px; font-weight: 700; font-size: 15.5px; letter-spacing: -0.01em; flex-wrap: wrap; }
.nm { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ex { font-size: 10px; font-weight: 600; padding: 2px 6px; border-radius: 5px; color: var(--muted); background: #1a1a20; letter-spacing: 0; }
.ex.upbit { color: #7fb2ff; background: rgba(9, 54, 135, 0.35); }
.ex.bithumb { color: #ffa462; background: rgba(240, 116, 30, 0.14); }
.badge { font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 99px; letter-spacing: 0; white-space: nowrap; }
.badge.grad { color: #1a1406; background: linear-gradient(100deg, #f6e3a1, #d9b257); }
.badge.warn { color: var(--down); background: var(--downsoft); }
.badge.caution { color: #ffcf5a; background: rgba(255, 207, 90, 0.1); }
.badge.surge { color: var(--accent); background: var(--accentsoft); }

.spark { width: 76px; height: 30px; display: block; }

.matrix { display: grid; grid-template-columns: auto 1fr 1fr; gap: 3px 8px; align-items: center; font-size: 10px; color: var(--dim); font-family: var(--mono); }
.matrix .h { text-align: center; color: var(--muted); }
.matrix .lb { text-align: right; white-space: nowrap; }
.cell { display: flex; justify-content: center; }
.dt { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid #34343d; }
.dt.full { background: var(--sig); border-color: var(--sig); box-shadow: 0 0 8px color-mix(in srgb, var(--sig) 60%, transparent); }
.dt.near { border: 2px solid var(--sig); animation: blink 1.4s ease-in-out infinite; }
.dt.trend { background: color-mix(in srgb, var(--sig) 32%, transparent); border-color: transparent; transform: scale(0.75); }
@keyframes blink { 50% { opacity: 0.35; } }
.board.up .row, .drawer .up { --sig: var(--gold); }
.board.down .row, .drawer .down { --sig: var(--down); }
.rsiv { font-size: 10.5px; text-align: center; color: var(--text); }
.rsiv.bad { color: var(--up); }
.board.down .rsiv.bad { color: var(--down); }

.px { text-align: right; }
.px .p { font-family: var(--mono); font-size: 13.5px; font-weight: 500; transition: color 0.4s; }
.px .r { font-family: var(--mono); font-size: 12px; }
.flash-up { color: var(--up) !important; }
.flash-down { color: var(--down) !important; }
.c-up { color: var(--up); }
.c-down { color: var(--down); }
.c-flat { color: var(--muted); }

.ring { position: relative; width: 54px; height: 54px; justify-self: end; }
.ring svg { width: 54px; height: 54px; transform: rotate(-90deg); }
.ring .rv { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.ring .rv b { font-family: var(--mono); font-size: 15px; font-weight: 600; }
.ring .rv small { font-size: 9px; color: var(--muted); margin-top: 3px; font-family: var(--mono); }

.flowline { grid-column: 2 / -1; display: flex; align-items: center; gap: 10px; font-size: 11px; color: var(--muted); margin-top: -2px; }
.fbar { flex: 1; height: 4px; border-radius: 4px; background: var(--downsoft); overflow: hidden; display: flex; }
.fbar i { display: block; height: 100%; background: linear-gradient(90deg, rgba(255, 77, 103, 0.55), var(--up)); border-radius: 4px; }
.fl-b { color: var(--up); font-family: var(--mono); }
.fl-s { color: var(--down); font-family: var(--mono); }
.fl-w { font-family: var(--mono); white-space: nowrap; }

.empty { padding: 34px 10px 40px; text-align: center; color: var(--muted); font-size: 13px; }
.empty svg { width: 40px; height: 40px; opacity: 0.5; display: block; margin: 0 auto 12px; animation: bob 2.4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-5px) rotate(-4deg); } }
.skel { height: 66px; border-radius: 12px; margin: 6px 0; background: linear-gradient(90deg, #101015 0%, #17171d 50%, #101015 100%); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ── SECTIONS ── */
.futures, .radar, .dna, .perf { margin-top: 16px; background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 24px; }
.sec-h { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.sec-src { margin: 0; color: var(--dim); font-size: 11.5px; }

.fut-grid { display: grid; grid-template-columns: 340px 1fr; gap: 14px; }
.verdict {
  position: relative; border-radius: var(--r); padding: 20px; border: 1px solid var(--line2);
  background: radial-gradient(120% 90% at 50% 0%, var(--vglow, rgba(255, 255, 255, 0.04)), transparent 70%), var(--card2);
  display: flex; flex-direction: column; transition: background 0.6s;
}
.verdict.LONG { --vglow: rgba(255, 77, 103, 0.16); border-color: rgba(255, 77, 103, 0.3); }
.verdict.SHORT { --vglow: rgba(61, 139, 255, 0.16); border-color: rgba(61, 139, 255, 0.3); }
.v-top { display: flex; justify-content: space-between; align-items: baseline; }
.v-label { font-size: 12px; color: var(--muted); }
.v-price { font-size: 13px; }
.v-main { margin: 14px 0 0; display: flex; flex-direction: column; }
.v-pos { font-family: var(--serif); font-size: 64px; line-height: 0.95; letter-spacing: -0.02em; }
.verdict.LONG .v-pos { color: var(--up); }
.verdict.SHORT .v-pos { color: var(--down); }
.verdict.NEUTRAL .v-pos { color: var(--text); }
.v-sub { color: var(--muted); font-size: 13px; margin-top: 6px; }
.gauge { position: relative; margin: 14px auto 0; width: 220px; }
.gauge svg { width: 100%; display: block; }
#needle { transition: transform 1s cubic-bezier(0.3, 1.4, 0.5, 1); }
.g-t { fill: var(--dim); font: 600 8px var(--mono); letter-spacing: 0.1em; }
.g-score { display: block; margin-top: 4px; text-align: center; font-size: 12px; color: var(--muted); }
.v-spark { width: 100%; height: 56px; margin-top: 16px; display: block; }
.v-spark-l { font-size: 10.5px; color: var(--dim); margin-top: 4px; font-family: var(--mono); }

.tfs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.tf {
  position: relative; background: var(--card2); border: 1px solid var(--line); border-radius: 16px; padding: 16px 14px;
  display: flex; flex-direction: column; gap: 10px; transition: border-color 0.4s;
}
.tf.best { border-color: rgba(231, 200, 115, 0.5); box-shadow: 0 0 0 1px rgba(231, 200, 115, 0.15), 0 10px 40px -20px rgba(231, 200, 115, 0.5); }
.tf-best { position: absolute; top: -9px; right: 12px; font-size: 10px; font-weight: 700; color: #1a1406; background: linear-gradient(100deg, #f6e3a1, #d9b257); padding: 2px 8px; border-radius: 99px; }
.tf-h { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--muted); }
.tf-pos { font-family: var(--mono); font-weight: 600; font-size: 24px; letter-spacing: -0.03em; line-height: 1.1; }
.tf-pos.LONG { color: var(--up); }
.tf-pos.SHORT { color: var(--down); }
.tf-pos.NEUTRAL { color: var(--flat); }
.tf-pos small { display: block; font-family: var(--sans); font-size: 11px; font-weight: 500; color: var(--muted); letter-spacing: 0; margin-top: 2px; }
.sbar { position: relative; height: 6px; border-radius: 6px; background: #1b1b22; overflow: hidden; }
.sbar::after { content: ''; position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: #3a3a44; }
.sbar i { position: absolute; top: 0; bottom: 0; border-radius: 6px; transition: all 0.8s; }
.stc svg { width: 100%; height: 64px; display: block; border-radius: 8px; background: rgba(255, 255, 255, 0.015); }
.stc-l { display: flex; gap: 10px; font-size: 10px; color: var(--dim); margin-top: 5px; font-family: var(--mono); }
.stc-l span { display: inline-flex; align-items: center; gap: 4px; }
.stc-l span:last-child { margin-left: auto; }
.stc-l i { width: 8px; height: 2px; display: inline-block; border-radius: 2px; }
.tf-rows { margin-top: auto; display: flex; flex-direction: column; gap: 5px; font-size: 11px; font-family: var(--mono); color: var(--muted); }
.tf-rows div { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.tf-rows .st { font-family: var(--sans); font-size: 10.5px; font-weight: 600; padding: 1px 6px; border-radius: 5px; }
.st.bullish { color: var(--up); background: var(--upsoft); }
.st.bearish { color: var(--down); background: var(--downsoft); }
.st.neutral { color: var(--muted); background: #1b1b22; }

.fut-bottom { display: grid; grid-template-columns: 1.3fr 1fr; gap: 14px; margin-top: 14px; }
.deriv { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.dv { background: var(--card2); border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.dv-k { font-size: 11.5px; color: var(--muted); }
.dv-v { font-family: var(--mono); font-size: 18px; font-weight: 500; margin-top: 4px; letter-spacing: -0.03em; }
.dv-s { font-size: 10.5px; color: var(--dim); margin-top: 2px; }
.lsbar { display: flex; height: 4px; border-radius: 4px; overflow: hidden; margin-top: 8px; background: var(--down); }
.lsbar i { background: var(--up); display: block; }
.comments { background: var(--card2); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.c-h { margin: 0 0 10px; font-size: 12px; color: var(--gold); font-family: var(--mono); letter-spacing: 0.08em; }
.comments ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 9px; }
.comments li { position: relative; padding-left: 16px; font-size: 13px; line-height: 1.55; color: #cfcdc7; }
.comments li::before { content: ''; position: absolute; left: 0; top: 8px; width: 6px; height: 6px; border-radius: 1px; transform: rotate(45deg); background: var(--gold); opacity: 0.8; }

/* ── RADAR ── */
.radar-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.radar-col { background: var(--card2); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; }
.r-h { display: flex; justify-content: space-between; align-items: baseline; margin: 0 0 8px; font-weight: 700; }
.r-h small { color: var(--muted); font-weight: 400; font-size: 11.5px; }
.radar-col.in .r-h span { color: var(--up); }
.radar-col.out .r-h span { color: var(--down); }
.r-row { display: grid; grid-template-columns: 22px minmax(0, 1fr) 1.2fr 86px; gap: 10px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line); cursor: pointer; font-size: 13px; }
.r-row:first-child { border-top: 0; }
.r-row:hover .r-sym { color: var(--gold); }
.r-n { font-family: var(--mono); color: var(--dim); font-size: 11px; }
.r-sym { font-weight: 650; display: flex; gap: 6px; align-items: center; white-space: nowrap; overflow: hidden; transition: color 0.2s; }
.r-bar { height: 6px; border-radius: 6px; background: #1b1b22; overflow: hidden; }
.r-bar i { display: block; height: 100%; border-radius: 6px; }
.radar-col.in .r-bar i { background: linear-gradient(90deg, rgba(255, 77, 103, 0.3), var(--up)); }
.radar-col.out .r-bar i { background: linear-gradient(90deg, rgba(61, 139, 255, 0.3), var(--down)); }
.r-v { text-align: right; font-family: var(--mono); font-size: 12.5px; }

.thermo.fg { background: linear-gradient(90deg, #3d8bff, #6f6f79 50%, #ff4d67); }

/* reasons on rows */
.why { grid-column: 2 / -1; display: flex; flex-wrap: wrap; gap: 5px; margin-top: -4px; align-items: center; }
.chip { font-size: 10.5px; padding: 2px 7px; border-radius: 6px; background: #17171d; color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.chip.good { color: var(--sig); border-color: color-mix(in srgb, var(--sig) 35%, transparent); background: color-mix(in srgb, var(--sig) 8%, transparent); }
.chip.warn { color: #ffcf5a; border-color: rgba(255, 207, 90, 0.25); }
.chip.cal { margin-left: auto; font-family: var(--mono); color: var(--text); border-color: var(--line2); }
.chip.cal b { color: var(--sig); font-weight: 600; }

.tgt { display: inline-flex; gap: 7px; align-items: center; font-family: var(--mono); font-size: 11px; padding: 2px 8px; border-radius: 6px; background: #121218; border: 1px solid var(--line2); }
.tgt small { color: var(--muted); font-size: 10px; }
.vpvr { width: 100%; display: block; margin-top: 4px; }

/* ── DNA ── */
.dna-ex { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.ex-card { background: var(--card2); border: 1px solid var(--line); border-radius: 16px; padding: 14px; cursor: pointer; transition: border-color .2s; }
.ex-card:hover { border-color: rgba(231, 200, 115, .35); }
.ex-h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.ex-h b { font-size: 15px; }
.ex-gain { font-family: var(--mono); color: var(--up); font-weight: 600; font-size: 15px; }
.ex-sub { font-size: 11px; color: var(--muted); margin: 2px 0 10px; }
.ex-chart { width: 100%; display: block; }
.ex-chart text { font: 500 8px var(--mono); fill: var(--dim); }
.ex-vals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px 8px; margin-top: 10px; font-size: 10.5px; font-family: var(--mono); color: var(--muted); }
.ex-vals span b { color: var(--text); font-weight: 500; }
.dna-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 14px; margin-top: 14px; }
.dna-common, .dna-match { background: var(--card2); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; }
.dna-common ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.dna-common li { display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: start; font-size: 13px; color: #cfcdc7; line-height: 1.5; }
.agree { font-family: var(--mono); font-size: 11px; text-align: center; border-radius: 6px; padding: 2px 0; background: #1b1b22; color: var(--muted); }
.agree.full { background: var(--goldsoft); color: var(--gold); }
.dna-val { margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); line-height: 1.6; }
.dna-val b { color: var(--text); font-family: var(--mono); font-weight: 500; }
.m-row { display: grid; grid-template-columns: minmax(0, 1fr) 120px 60px; gap: 12px; align-items: center; padding: 11px 0; border-top: 1px solid var(--line); cursor: pointer; }
.m-row:first-of-type { border-top: 0; }
.m-row:hover .sym { color: var(--gold); }
.m-feats { display: flex; gap: 3px; margin-top: 6px; flex-wrap: wrap; }
.m-feats i { font-style: normal; font-size: 9.5px; font-family: var(--mono); padding: 1px 5px; border-radius: 4px; background: #1b1b22; color: var(--dim); }
.m-feats i.on { background: var(--goldsoft); color: var(--gold); }
.simbar { height: 6px; border-radius: 6px; background: #1b1b22; overflow: hidden; }
.simbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold2), var(--gold)); border-radius: 6px; }
.simv { font-family: var(--mono); font-size: 18px; text-align: right; color: var(--gold); }
.simv small { font-size: 10px; color: var(--muted); }

/* ── PERF ── */
.perf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.perf-col { background: var(--card2); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; min-width: 0; }
.ptable { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.ptable th { text-align: right; font-weight: 500; color: var(--muted); font-size: 11px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.ptable th:first-child, .ptable td:first-child { text-align: left; }
.ptable td { text-align: right; padding: 8px 0; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 12px; }
.ptable td:first-child { font-family: var(--sans); color: var(--muted); }
.ptable tr.hl td { background: rgba(231, 200, 115, .04); }
.hit-hi { color: var(--gold); }
.p-note { font-size: 11.5px; color: var(--dim); margin: 10px 0 0; line-height: 1.6; }
.p-note b { color: var(--muted); }
.p-big { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.p-big div { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--card); }
.p-big span { display: block; font-size: 11px; color: var(--muted); }
.p-big b { font-family: var(--mono); font-size: 22px; font-weight: 500; }
.p-big small { font-size: 11px; color: var(--dim); font-family: var(--mono); }
.p-sub { margin: 16px 0 6px; font-size: 11px; color: var(--dim); font-family: var(--mono); letter-spacing: .1em; }
.tf-bt { font-size: 10.5px; color: var(--muted); border-top: 1px dashed var(--line2); padding-top: 8px; font-family: var(--mono); display: flex; justify-content: space-between; }
.tf-bt b { color: var(--gold); font-weight: 600; }

/* ── METHOD / FOOT ── */
.method { margin-top: 16px; }
.method details { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 4px 24px; }
.method summary { cursor: pointer; padding: 18px 0; font-weight: 650; list-style: none; display: flex; align-items: center; gap: 8px; }
.method summary::-webkit-details-marker { display: none; }
.method summary::before { content: '+'; font-family: var(--mono); color: var(--gold); width: 16px; }
.method details[open] summary::before { content: '–'; }
.method summary span { color: var(--muted); font-weight: 400; }
.method-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px 28px; padding: 6px 0 24px; }
.method h4 { margin: 0 0 6px; font-size: 13px; color: var(--gold); font-weight: 600; }
.method p { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.7; }
.method p b { color: var(--text); }
.foot { display: flex; gap: 24px; align-items: center; justify-content: space-between; padding: 32px 0 48px; color: var(--dim); font-size: 11.5px; }
.foot p { margin: 0; max-width: 720px; text-align: right; }
.foot-brand { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); letter-spacing: 0.24em; color: var(--muted); font-size: 11px; }
.foot-brand svg { width: 20px; height: 20px; }

/* ── DRAWER ── */
.scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.55); backdrop-filter: blur(3px); opacity: 0; pointer-events: none; transition: 0.3s; z-index: 40; }
.scrim.on { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(460px, 100vw); z-index: 41;
  background: #0b0b0f; border-left: 1px solid var(--line2); padding: 28px 26px 40px; overflow-y: auto;
  transform: translateX(100%); transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.drawer.on { transform: none; }
.d-close { position: absolute; top: 18px; right: 18px; width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line2); background: var(--card); color: var(--muted); cursor: pointer; font-size: 14px; }
.d-close:hover { color: var(--text); }
.d-h { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.d-h h3 { margin: 0; font-size: 26px; letter-spacing: -0.03em; }
.d-nm { color: var(--muted); margin: 0 0 18px; }
.d-price { display: flex; align-items: baseline; gap: 12px; margin-bottom: 18px; }
.d-price b { font-family: var(--mono); font-size: 28px; font-weight: 500; letter-spacing: -0.04em; }
.d-scores { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.d-sc { border: 1px solid var(--line); border-radius: 14px; padding: 14px; background: var(--card); }
.d-sc.up { border-color: rgba(231, 200, 115, 0.25); }
.d-sc.down { border-color: rgba(61, 139, 255, 0.25); }
.d-sc .k { font-size: 11.5px; color: var(--muted); }
.d-sc .v { font-family: var(--mono); font-size: 26px; margin-top: 2px; }
.d-sc.up .v { color: var(--gold); }
.d-sc.down .v { color: var(--down); }
.d-sc .s { font-size: 11px; color: var(--dim); font-family: var(--mono); }
.d-sec { margin: 22px 0 8px; font-size: 11px; font-family: var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); }
.d-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.d-table th { text-align: left; font-weight: 500; color: var(--muted); padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 11.5px; }
.d-table td { padding: 9px 0; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 12px; }
.d-table td:first-child { font-family: var(--sans); color: var(--muted); }
.d-kv { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.d-kv div { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; }
.d-kv span { display: block; font-size: 11px; color: var(--muted); }
.d-kv b { font-family: var(--mono); font-weight: 500; font-size: 15px; }
.d-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 22px; color: var(--gold); text-decoration: none; font-size: 13px; border: 1px solid rgba(231, 200, 115, 0.3); padding: 10px 14px; border-radius: 12px; }
.d-link:hover { background: var(--goldsoft); }
.d-spark { width: 100%; height: 80px; display: block; margin-bottom: 6px; }

/* ── AUTH / LOCK ── */
.auth-box { display: inline-flex; align-items: center; gap: 8px; margin-left: 4px; }
.btn { font: inherit; font-size: 13px; font-weight: 600; border-radius: 10px; padding: 8px 14px; cursor: pointer; border: 1px solid var(--line2); background: var(--card); color: var(--text); transition: .2s; }
.btn:hover { border-color: rgba(231, 200, 115, .5); }
.btn.gold { color: #1a1406; border-color: transparent; background: linear-gradient(100deg, #f6e3a1, #d9b257); }
.btn.gold:hover { filter: brightness(1.06); }
.btn.ghost { background: transparent; }
.btn.wide { width: 100%; padding: 12px; font-size: 14px; }
.btn.sm { padding: 6px 11px; font-size: 12px; }
.macro-tab { text-decoration: none; color: var(--text); }
.macro-tab:hover { color: var(--gold); }
.admin-tab { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: var(--gold); border-color: rgba(231, 200, 115, .4); background: var(--goldsoft); }
.badge-n { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--up); color: #fff; font-size: 10.5px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; font-family: var(--mono); }
.me { font-size: 12.5px; color: var(--muted); }
.me b { color: var(--gold); font-weight: 600; }

.gate-wrap { position: relative; }
body.locked .gated { display: none; }
body.locked .gate-wrap .list { filter: blur(9px) saturate(.7); opacity: .7; pointer-events: none; user-select: none; }
body.locked .gate-wrap .row { cursor: default; }
.lock { position: absolute; left: 0; right: 0; top: 118px; bottom: -40px; z-index: 5; display: flex; justify-content: center; align-items: flex-start; padding-top: 70px;
  background: linear-gradient(180deg, rgba(6, 6, 8, 0) 0%, rgba(6, 6, 8, .55) 30%, rgba(6, 6, 8, .92) 100%); }
.lock[hidden] { display: none; }
.lock-card { text-align: center; max-width: 460px; padding: 34px 32px 30px; border-radius: 26px; border: 1px solid rgba(255, 255, 255, .1);
  background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .015)); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .9), inset 0 1px 0 rgba(255, 255, 255, .08); }
.lock-ico { width: 84px; height: 98px; display: block; margin: 0 auto 16px; filter: drop-shadow(0 10px 30px rgba(231, 200, 115, .25)); animation: bob 3.2s ease-in-out infinite; }
.lock-card h3 { margin: 0 0 10px; font-size: 21px; letter-spacing: -.03em; }
.lock-card p { margin: 0 0 22px; color: var(--muted); font-size: 13.5px; line-height: 1.7; }
.lock-card p b { color: var(--gold); font-weight: 600; }
.lock-btns { display: flex; gap: 10px; justify-content: center; }
.lock-btns .btn { min-width: 120px; padding: 11px 18px; }

.modal { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(0, 0, 0, .6); backdrop-filter: blur(6px); }
.modal[hidden] { display: none; }
.modal-card { position: relative; width: min(460px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; background: #0c0c10; border: 1px solid var(--line2); border-radius: 22px; padding: 26px 26px 22px; box-shadow: 0 40px 100px -30px #000; animation: rowin .3s both; }
.m-brand { display: flex; align-items: center; gap: 8px; font-family: var(--mono); letter-spacing: .24em; font-size: 11px; color: var(--muted); margin-bottom: 14px; }
.m-brand svg { width: 22px; height: 22px; }
.m-tabs { display: inline-flex; padding: 3px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 16px; }
.m-tabs button { font: inherit; font-size: 12.5px; background: none; border: 0; color: var(--muted); padding: 6px 14px; border-radius: 8px; cursor: pointer; }
.m-tabs button.on { background: #1d1d24; color: var(--text); }
.m-form h3, .m-done h3 { margin: 0 0 14px; font-family: var(--serif); font-weight: 400; font-size: 30px; letter-spacing: -.02em; }
.m-form h3 small { font-family: var(--sans); font-size: 13px; color: var(--muted); margin-left: 6px; letter-spacing: 0; }
.m-form label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted); margin-bottom: 11px; }
.m-form input:not([type=checkbox]) { font: inherit; font-size: 14px; color: var(--text); background: var(--card); border: 1px solid var(--line2); border-radius: 10px; padding: 11px 12px; outline: none; transition: border-color .2s; }
.m-form input:focus { border-color: rgba(231, 200, 115, .6); box-shadow: 0 0 0 3px rgba(231, 200, 115, .1); }
.m-form input.bad { border-color: var(--up); }
.m-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.consent { border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; margin: 4px 0 6px; background: var(--card); }
.chk { flex-direction: row !important; align-items: center; gap: 9px !important; margin: 0 !important; color: var(--text) !important; font-size: 13px !important; cursor: pointer; }
.chk input { width: 16px; height: 16px; accent-color: #d9b257; }
.chk b { color: var(--gold); }
.consent details { margin-top: 8px; font-size: 12px; color: var(--muted); }
.consent summary { cursor: pointer; color: var(--dim); }
.consent ul { margin: 8px 0 0; padding-left: 16px; line-height: 1.7; }
.consent ul b { color: var(--text); font-weight: 500; margin-right: 4px; }
.m-err { min-height: 18px; margin: 6px 0 8px; color: var(--up); font-size: 12.5px; }
.m-foot { margin: 12px 0 0; text-align: center; font-size: 12px; color: var(--dim); }
.m-foot a { color: var(--gold); }
.m-done { text-align: center; padding: 10px 0 4px; }
.m-done svg { width: 64px; height: 64px; margin: 6px auto 8px; display: block; animation: bob 2.4s ease-in-out infinite; }
.m-done p { color: var(--muted); font-size: 13.5px; line-height: 1.7; margin: 0 0 18px; }

/* ── 회원: 관심종목 · 레벨 · 알림 ── */
.star { font: inherit; font-size: 15px; line-height: 1; background: none; border: 0; color: var(--dim); cursor: pointer; padding: 0 2px; transition: transform .15s, color .15s; }
.star:hover { color: var(--gold); transform: scale(1.2); }
.star.on { color: var(--gold); }
.me-link { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--text); font-size: 13px; padding: 5px 10px 5px 6px; border-radius: 10px; border: 1px solid var(--line2); background: var(--card); }
.me-link:hover { border-color: rgba(231, 200, 115, .5); }
.lv-chip { font-size: 11px; font-weight: 700; padding: 3px 7px; border-radius: 7px; color: var(--cap); background: color-mix(in srgb, var(--cap) 14%, transparent); border: 1px solid color-mix(in srgb, var(--cap) 40%, transparent); }
.bell { position: relative; text-decoration: none; font-size: 16px; padding: 4px 6px; }
.bell .badge-n { position: absolute; top: -4px; right: -6px; }
.watch-strip { margin: 0 0 16px; }
.ws-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.ws-h a { color: var(--gold); font-size: 12.5px; text-decoration: none; }
.wcards { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.wcard { flex: 0 0 200px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 13px 14px; cursor: pointer; transition: border-color .2s; color: inherit; text-decoration: none; }
.wcard:hover { border-color: rgba(231, 200, 115, .45); }
.wcard.add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--gold); font-size: 22px; border-style: dashed; flex-basis: 140px; }
.wcard.add span { font-size: 12px; color: var(--muted); }
.wc-h { display: flex; align-items: center; gap: 6px; }
.wc-h b { font-size: 15px; }
.wc-h .star { margin-left: auto; }
.wc-p { font-size: 13.5px; margin-top: 6px; }
.wc-p span { font-size: 12px; }
.wc-s { display: flex; gap: 12px; font-size: 12px; color: var(--muted); margin-top: 6px; }
.wc-s b { font-family: var(--mono); font-weight: 600; color: var(--text); }
.wc-t { font-size: 11.5px; margin-top: 4px; }
.wc-g { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 8px; }
.wempty { flex: 1; padding: 16px 18px; border: 1px dashed var(--line2); border-radius: 16px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.wempty a { color: var(--gold); }
.wempty b { color: var(--gold); }

/* ── 정밀 셋업 ── */
.precise { margin-top: 16px; background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 24px; }
.ps-desc { margin: -6px 0 16px; color: var(--muted); font-size: 12.5px; line-height: 1.7; }
.ps-desc b { color: var(--gold); font-weight: 600; }
.pcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 12px; }
.pcard { background: var(--card2); border: 1px solid var(--line); border-radius: 18px; padding: 16px; cursor: pointer; transition: border-color .2s; display: flex; flex-direction: column; gap: 10px; }
.pcard:hover { border-color: rgba(231, 200, 115, .45); }
.pcard.grade-A { border-color: rgba(231, 200, 115, .5); box-shadow: 0 16px 50px -30px rgba(231, 200, 115, .6); }
.pc-h { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.pc-h b { font-size: 17px; }
.pc-px { margin-left: auto; font-size: 13px; }
.pgrade { font-family: var(--mono); font-weight: 700; font-size: 12px; padding: 3px 9px; border-radius: 8px; background: #2a2a33; color: #cfd5dd; }
.grade-A .pgrade { color: #1a1406; background: linear-gradient(100deg, #f6e3a1, #d9b257); }
.pc-type { font-size: 12.5px; color: var(--gold); font-weight: 600; }
.pc-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 12.5px; color: var(--dim); }
.pc-checks li { display: flex; gap: 8px; align-items: baseline; }
.pc-checks li i { font-style: normal; width: 14px; text-align: center; font-weight: 700; }
.pc-checks li.ok { color: var(--text); }
.pc-checks li.ok i { color: #3ddc97; }
.pc-plan { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.pc-plan div { background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 9px; min-width: 0; }
.pc-plan span { display: block; font-size: 10.5px; color: var(--muted); }
.pc-plan b { font-size: 12.5px; font-weight: 500; white-space: nowrap; }
.pc-plan small { font-size: 10px; }
.pc-facts { display: flex; flex-wrap: wrap; gap: 4px; }
.pc-warn { font-size: 12px; color: #ffcf5a; background: rgba(255, 207, 90, .08); border: 1px solid rgba(255, 207, 90, .25); border-radius: 10px; padding: 7px 10px; }
.pc-calc { font-size: 12.5px; color: var(--gold); text-decoration: none; }
.st-a { color: #3ddc97; font-size: 11.5px; }
.st-d { color: var(--up); font-size: 11.5px; }
.st-c { color: var(--dim); font-size: 11.5px; }

/* ── 레버리지 · 유동성 ── */
.lev-grid { display: grid; grid-template-columns: 1fr 1.6fr 1fr 1fr; gap: 10px; }
.lev-card { background: var(--card2); border: 1px solid var(--line); border-radius: 14px; padding: 14px; min-width: 0; }
.lev-card .dv-k .dim { font-size: 10.5px; margin-left: 4px; }
.lev-big { font-size: 22px; font-weight: 750; letter-spacing: -.03em; margin: 6px 0 4px; }
.lev-desc { font-size: 12.5px; line-height: 1.65; color: #cfcdc7; margin: 0; }
.lev-sub { font-size: 11.5px; color: var(--muted); margin-top: 8px; line-height: 1.6; }
.liq-svg { width: 100%; height: 130px; display: block; margin-top: 8px; }
.liq-svg text { font: 500 9px var(--mono); fill: var(--dim); }
.liq-legend { display: flex; gap: 14px; font-size: 11px; color: var(--muted); margin-top: 4px; }
.liq-legend i { display: inline-block; width: 10px; height: 8px; border-radius: 2px; margin-right: 5px; }
.ls-row { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; padding: 7px 0; border-top: 1px solid var(--line); }
.ls-row:first-of-type { border-top: 0; margin-top: 6px; }
.ls-row b { font-family: var(--mono); font-weight: 500; font-size: 12px; text-align: right; }
.on-dot-s { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #3ddc97; margin-left: 4px; box-shadow: 0 0 6px #3ddc97; }
.cwarn-s { margin-top: 8px; font-size: 12px; line-height: 1.5; color: #ffb3c0; background: var(--upsoft); border: 1px solid rgba(255, 77, 103, .3); border-radius: 10px; padding: 7px 9px; }
.cok-s { margin-top: 8px; font-size: 12px; line-height: 1.5; color: #9fe9c6; background: rgba(61, 220, 151, .07); border: 1px solid rgba(61, 220, 151, .25); border-radius: 10px; padding: 7px 9px; }

/* ── 모바일 · 태블릿 ── */
html { -webkit-text-size-adjust: 100%; }
[hidden] { display: none !important; }
* { -webkit-tap-highlight-color: transparent; }
.topbar, .atop { padding-top: env(safe-area-inset-top); }
.modal-card { max-height: calc(100dvh - 32px); }
.perf-col { overflow-x: auto; }
.mnav { display: none; }
@media (max-width: 700px) {
  /* 하단 탭 바 (앱처럼) */
  .mnav { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: rgba(10, 10, 13, .92); backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%);
    border-top: 1px solid var(--line2); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .mnav a { display: flex; flex-direction: column; align-items: center; gap: 2px; text-decoration: none; color: var(--muted); font-size: 10.5px; padding: 4px 0; border-radius: 10px; }
  .mnav a.on { color: var(--gold); }
  .mnav a.on .mi { transform: translateY(-1px); }
  .mnav .mi { position: relative; font-size: 19px; line-height: 1.2; }
  .mnav .mi b { position: absolute; top: -3px; right: -12px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--up); color: #fff; font: 700 9.5px/16px var(--mono); text-align: center; }
  body.has-mnav { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  body.has-mnav .toast { bottom: calc(80px + env(safe-area-inset-bottom)); }
  /* 상단 바는 슬림하게: 메뉴는 하단 탭으로 */
  body.has-mnav .auth-box .macro-tab, body.has-mnav .auth-box .admin-tab, body.has-mnav .auth-box .bell, body.has-mnav .auth-box .me-link { display: none; }
  body.has-mnav .aright > a.btn { display: none; }
  .brand-text small { display: none; }
  .topbar-in, .atop-in { gap: 10px; }
  .auth-box .btn.sm { padding: 6px 10px; }
  /* 마이페이지 · 관리자 · 경제지표: 탭 메뉴는 상단 바 아래 한 줄로 (옆으로 밀어서 이동) */
  body .atop-in { flex-wrap: wrap; height: auto; padding-top: 10px; padding-bottom: 0; row-gap: 2px; }
  body .atop-in .atabs { order: 3; flex: 0 0 100%; padding-bottom: 8px; scrollbar-width: none; }
  body .atop-in .atabs::-webkit-scrollbar { display: none; }
  body .atop-in .aright { margin-left: auto; }
  /* iOS: 입력칸 글자가 16px 미만이면 자동 확대돼서 16px로 */
  input, select, textarea, .m-form input:not([type=checkbox]), .search { font-size: 16px !important; }
}

/* ── RESPONSIVE ── */
@media (max-width: 1180px) {
  .lev-grid { grid-template-columns: 1fr 1fr; }
  .lev-card.wide { grid-column: 1 / -1; }
  .boards { grid-template-columns: 1fr; }
  .dna-ex { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dna-grid, .perf-grid { grid-template-columns: 1fr; }
  .fut-grid { grid-template-columns: 1fr; }
  .tfs { grid-template-columns: repeat(5, minmax(150px, 1fr)); overflow-x: auto; padding-top: 10px; }
  .fut-bottom { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .wrap { padding: 0 16px; }
  .hero { grid-template-columns: 1fr; gap: 28px; padding-top: 36px; }
  .conn .pill { display: none; }
  .clock { display: none; }
  .m-row2 { grid-template-columns: 1fr; }
  .lock { padding-top: 30px; }
  .lock-card { padding: 26px 20px; }
  .row { grid-template-columns: 26px minmax(0, 1fr) 96px 54px; }
  .row .spark { display: none; }
  .row .matrix { grid-column: 2 / -1; grid-row: 2; grid-template-columns: auto 26px 26px; justify-content: start; }
  .row .flowline { grid-row: 3; }
  .deriv { grid-template-columns: 1fr 1fr; }
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .dna-ex { grid-template-columns: 1fr; }
  .pc-plan { grid-template-columns: 1fr 1fr; }
  .pcards { grid-template-columns: 1fr; }
  .lev-grid { grid-template-columns: 1fr; }
  .why { grid-row: 4; }
  .radar-grid { grid-template-columns: 1fr; }
  .method-grid { grid-template-columns: 1fr; }
  .board-h { flex-direction: column; align-items: flex-start; }
  .board-desc { text-align: left; }
  .foot { flex-direction: column; align-items: flex-start; }
  .foot p { text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
