:root {
  color-scheme: light;
  --ink: #211e2b;
  --muted: #655e6e;
  --line: #e9e4eb;
  --paper: #fff;
  --ground: #f8f6f8;
  --brand: #ff6b3d;
  --accent: #b23b19;
  --purple: #6846c5;
  --positive: #bb402b;
  --negative: #304eb2;
  --radius: 19px;
  font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  color: var(--ink);
  background: var(--ground);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-size: 15px; }
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 3px solid var(--purple); outline-offset: 3px; }
[hidden] { display: none !important; }
.topbar { background: var(--paper); border-bottom: 1px solid var(--line); }
.top-inner, .shell { max-width: 1300px; margin: auto; padding-inline: clamp(16px, 4vw, 52px); }
.top-inner { min-height: 72px; display: flex; align-items: center; gap: 42px; }
.brand { font-size: 23px; font-weight: 900; white-space: nowrap; letter-spacing: -.08em; display: flex; align-items: center; }
.brandmark { display: grid; place-items: center; width: 35px; height: 35px; margin-right: 10px; border-radius: 10px; background: var(--brand); color: #241533; font-size: 24px; font-weight: 800; letter-spacing: 0; }
.brand-dot { color: var(--accent); }
nav { display: flex; align-self: stretch; align-items: stretch; gap: 28px; }
nav a { display: grid; place-items: center; color: var(--muted); white-space: nowrap; border-bottom: 2px solid transparent; padding: 2px 3px 0; }
nav a[aria-current] { color: var(--accent); border-color: var(--brand); font-weight: 800; }
.account { margin-left: auto; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.btn { border: 1px solid transparent; border-radius: 10px; padding: 9px 14px; font-weight: 750; color: var(--ink); background: #f0edf2; white-space: nowrap; }
.btn:hover { filter: brightness(.97); }
.btn:disabled { opacity: .54; cursor: not-allowed; }
.btn.primary { background: var(--brand); color: #241429; }
.btn.secondary { border-color: var(--line); background: var(--paper); }
.btn.wide { width: 100%; padding: 12px; }
.shell { padding-top: 34px; }
.hero { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(260px, 1fr); align-items: center; gap: 26px; background: #292136; color: #fff; padding: clamp(22px, 4vw, 43px); border-radius: 25px; overflow: hidden; }
.hero small { color: #e6cbfd; }
.hero h1 { margin: 8px 0 12px; font-size: clamp(35px, 6vw, 58px); line-height: 1.05; letter-spacing: -.09em; }
.hero p { margin: 0; color: #ded6ea; line-height: 1.6; }
.hero-status { justify-self: end; padding: 17px 21px; background: #3a3048; border: 1px solid #524360; border-radius: 16px; min-width: min(100%, 260px); }
.hero-status strong { display: block; font-size: 16px; margin: 7px 0; }
.hero-status .callout { color: #ffb29a; }
.hero-status p { font-size: 12px; }
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; margin: 18px 0; }
.metric, .panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.metric { padding: 17px 21px; min-width: 0; }
.metric span { color: var(--muted); font-size: 13px; font-weight: 650; }
.metric strong { display: block; font-size: clamp(19px, 2.9vw, 28px); letter-spacing: -.055em; margin-top: 5px; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.market-grid { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(280px, 1fr); align-items: start; gap: 18px; }
.panel { min-width: 0; padding: clamp(15px, 2.5vw, 24px); }
.panel-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
h2, h3 { margin: 0; letter-spacing: -.045em; }
h2 { font-size: 24px; }
h3 { font-size: 18px; }
.panel-title p, .sub { margin: 5px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.controls { margin: 20px 0 9px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tabs { display: inline-flex; gap: 3px; padding: 3px; border-radius: 10px; background: #f1eef3; }
.tabs button { border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-weight: 750; white-space: nowrap; padding: 7px 9px; font-size: 13px; }
.tabs button[aria-pressed="true"] { color: var(--ink); background: var(--paper); box-shadow: 0 1px 3px #29213617; }
input { min-width: 0; color: var(--ink); background: #fff; border: 1px solid #dcd4e2; border-radius: 10px; padding: 10px 12px; }
input::placeholder { color: var(--muted); }
.search { flex: 1; width: 100%; min-width: 133px; }
.pagination { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px; margin-top: 12px; }
.pagination .sub { margin: 0; }
.pagination .sub:first-child { margin-right: auto; }
.pagination .btn, #refresh { font-size: 13px; }
.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { border-bottom: 1px solid var(--line); padding: 11px 9px; text-align: right; white-space: nowrap; }
th { color: var(--muted); font-size: 12px; font-weight: 700; }
th:first-child, td:first-child { text-align: left; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr.selected { background: #fff2ec; }
.ticker { padding: 0; border: 0; background: transparent; color: var(--ink); display: inline-flex; align-items: center; gap: 9px; text-align: left; font-weight: 800; }
.asset-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: #4c327b; background: #f0e9ff; font-size: 12px; font-weight: 850; flex: 0 0 auto; }
.asset-icon.etf { background: #e8f4ed; color: #286545; }
.meta { color: var(--muted); font-size: 11px; font-weight: 600; display: block; margin-top: 3px; }
.up { color: var(--positive); }
.down { color: var(--negative); }
.instrument-head { display: flex; align-items: center; gap: 10px; }
.detail-price { font-size: clamp(26px, 4vw, 38px); font-weight: 850; letter-spacing: -.06em; margin: 14px 0 3px; }
canvas { display: block; width: 100%; height: 109px; }
.chart { border-radius: 12px; background: #f8f4fc; margin: 14px 0; padding: 5px 8px 8px; }
.chart:has(.chart-label:empty) { display: none; }
.chart-label { color: var(--muted); font-size: 11px; min-height: 15px; margin: 0 4px; }
.ticket { display: grid; gap: 11px; margin-top: 15px; }
.ticket label, .field { display: grid; gap: 6px; font-weight: 750; font-size: 13px; }
.ticket .tabs { display: grid; grid-template-columns: 1fr 1fr; }
.ticket .tabs button { min-height: 33px; }
.summary-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); }
.summary-line span { color: var(--muted); font-size: 13px; }
.section-head { margin: 6px 0 19px; }
.section-head h1 { margin: 0; font-size: clamp(34px, 5vw, 46px); letter-spacing: -.075em; }
.stack { display: grid; gap: 17px; }
.empty { padding: 22px 0; color: var(--muted); margin: 0; line-height: 1.6; text-align: center; }
.inline-form { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.inline-form input { flex: 1; }
.person { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.person:last-child { border-bottom: 0; }
.person strong { margin-right: auto; }
footer { padding: 27px 0; color: var(--muted); font-size: 12px; }
footer span { color: var(--ink); font-weight: 850; margin-right: 8px; }
.notice { position: fixed; z-index: 2; bottom: 20px; right: 20px; max-width: calc(100% - 40px); background: #292136; color: #fff; padding: 13px 17px; border-radius: 11px; box-shadow: 0 5px 20px #20152e32; }
dialog { max-width: min(95vw, 630px); max-height: 90dvh; width: 100%; padding: 25px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); }
dialog::backdrop { background: #22182d83; }
dialog.auth { max-width: min(95vw, 415px); }
dialog .field, dialog .btn.wide { margin-top: 14px; }
.form-error { min-height: 18px; color: var(--accent); margin: 10px 0 0; font-size: 13px; }
.initial { padding: 30px 0; text-align: center; color: var(--muted); }
@media (max-width: 820px) {
  .top-inner { gap: 22px; }
  nav { gap: 13px; }
  .market-grid { grid-template-columns: 1fr; }
}
@media (max-width: 590px) {
  .top-inner { flex-wrap: wrap; min-height: 0; gap: 0; padding-top: 10px; }
  .account { order: 1; }
  nav { order: 2; width: 100%; justify-content: space-between; margin-top: 5px; min-height: 45px; }
  .shell { padding-top: 17px; }
  .hero { grid-template-columns: 1fr; gap: 13px; }
  .hero-status { justify-self: stretch; padding: 11px 12px; }
  .metrics { gap: 6px; margin: 11px 0; }
  .metric { padding: 10px 7px; border-radius: 11px; }
  .metric strong { font-size: 16px; }
  .metric span { font-size: 11px; }
  th, td { padding-inline: 5px; }
  .panel-title { flex-wrap: wrap; }
}
