/* AURORA Screener 공통 모양. 팔레트(파트너 2026-11-25): 흰색 #FFFFFF · 검정 #090909 두 가지 — 밝은 판 / 어두운 판.
   색은 뜻이 있는 곳에만: 오름 빨강 · 내림 파랑(한국식), 차트 평균선 세 가지. 강조(선택·주 동작)는 글자색을 뒤집어 쓴다. */
:root {
  --bg: #FFFFFF; --panel: #FFFFFF; --sunk: #F2F2F3; --line: #E0E0E3;
  --fg: #090909; --mute: #6B6B70; --accent: #090909; --on-accent: #FFFFFF; --accent-soft: #F2F2F3;
  --up: #D32F2F; --down: #1F5FBF; --bar: #090909; --ma1: #E8890C; --ma2: #7E57C2; --ma3: #00897B;
  --sans: "IBM Plex Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #090909; --panel: #090909; --sunk: #1A1A1C; --line: #2A2A2E;
  --fg: #FFFFFF; --mute: #9A9AA0; --accent: #FFFFFF; --on-accent: #090909; --accent-soft: #1A1A1C;
  --up: #FF6B60; --down: #6FA8FF; --bar: #FFFFFF; --ma1: #F5A623; --ma2: #B39DDB; --ma3: #4DB6AC; color-scheme: dark } }
:root[data-theme="dark"] {
  --bg: #090909; --panel: #090909; --sunk: #1A1A1C; --line: #2A2A2E;
  --fg: #FFFFFF; --mute: #9A9AA0; --accent: #FFFFFF; --on-accent: #090909; --accent-soft: #1A1A1C;
  --up: #FF6B60; --down: #6FA8FF; --bar: #FFFFFF; --ma1: #F5A623; --ma2: #B39DDB; --ma3: #4DB6AC; color-scheme: dark }
* { box-sizing: border-box }
[hidden] { display: none !important }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--sans); font-size: 14px; line-height: 1.5; word-break: keep-all }
a { color: inherit }
.top { background: var(--bg); color: var(--fg); border-bottom: 1px solid var(--line) }
.top > div, .wrap { max-width: 1360px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)) }
.top > div { padding-block: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px }
.top a.brand { font-size: 18px; font-weight: 600; letter-spacing: 0.04em; text-decoration: none }
.top .note { color: var(--mute); flex: 1; min-width: 0 }
.top button, .top a.btn, .top select { color: var(--fg); border: 1px solid var(--line); border-radius: 6px; padding: 7px 12px; min-height: 36px; text-decoration: none; display: inline-flex; align-items: center }
.wrap { padding-block: 16px 48px; display: flex; flex-direction: column; gap: 12px }
.wrap > * { min-width: 0 }
.note { color: var(--mute); font-size: 13px }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center }
button, select, input { font: inherit; color: inherit }
button { cursor: pointer; border: 1px solid transparent; background: none; border-radius: 6px; padding: 7px 12px; min-height: 36px; transition: background-color .15s, border-color .15s, transform .1s }
button:active { transform: scale(0.97) }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px }
.chip { border-color: var(--line); background: var(--panel) }
.chip:hover { border-color: var(--accent) }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent) }
.ghost { color: var(--mute); border-color: var(--line) }
.main { background: var(--accent); color: var(--on-accent); font-weight: 600 }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px; min-width: 0 }
.panel h2 { font-size: 14px; font-weight: 600; margin: 0 0 8px }
select, input[type="number"], input[type="search"], input[type="text"], input[type="password"] { font-size: 16px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--sunk); min-height: 36px; max-width: 100% }
input[type="number"] { font-family: var(--mono); width: 96px; text-align: right }
input[type="checkbox"] { accent-color: var(--accent) }
.tabs { display: inline-flex; background: var(--sunk); border-radius: 8px; padding: 3px; flex-wrap: wrap }
.tabs button[aria-pressed="true"] { background: var(--panel); border-color: var(--line); font-weight: 600 }
.scroll { overflow-x: auto }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums }
th, td { padding: 8px 10px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--line) }
th:first-child, td:first-child, th.l, td.l { text-align: left }
td { font-family: var(--mono); font-size: 13px }
td:first-child, td.l { font-family: var(--sans); font-size: 14px }
.up { color: var(--up) } .down { color: var(--down) } .na { color: var(--mute) }
.pos { display: inline-flex; align-items: center; gap: 8px }
.pos i { display: block; width: 56px; height: 6px; border-radius: 3px; background: var(--sunk); overflow: hidden }
.pos b { display: block; height: 100%; background: var(--bar) }
.logo { position: relative; display: inline-grid; place-items: center; flex: none; border-radius: 50%; background: var(--sunk); color: var(--mute); overflow: hidden; vertical-align: middle; box-shadow: 0 0 0 1px var(--line) }
.logo b { font-weight: 600 }
.logo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #FFFFFF }   /* 로고 그림이 네모 가득 오므로 동그라미로 잘라 쓴다 */
.empty { padding: 32px 8px; text-align: center; color: var(--mute) }
@media (prefers-reduced-motion: reduce) { button { transition: none } }

/* ── 움직임(AURORA 오토트레이딩과 같은 박자): 들어올 때 0.26~0.32초, 메뉴 0.18초, 나갈 때는 더 빠르게. 감속 곡선 하나. ── */
@keyframes au-fade { from { opacity: 0 } to { opacity: 1 } }
@keyframes au-rise { from { opacity: 0; transform: translateY(8px) } to { opacity: 1; transform: none } }
@keyframes au-drop { from { opacity: 0; transform: translateY(-6px) scale(.98) } to { opacity: 1; transform: none } }
@keyframes au-out { to { opacity: 0; transform: translateY(-4px) } }
html { scroll-behavior: smooth }
body { animation: au-fade .32s ease; transition: opacity .18s ease }
body.au-leave { opacity: 0 }
.wrap > * { animation: au-rise .26s cubic-bezier(.2, .8, .2, 1) both }
.wrap > *:nth-child(2) { animation-delay: .04s } .wrap > *:nth-child(3) { animation-delay: .08s } .wrap > *:nth-child(n+4) { animation-delay: .12s }
tbody tr, .cards a, .news a, .mini a, .nav a, label.check, .saved, select, input { transition: background-color .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease }
.cond, .saved { animation: au-rise .22s cubic-bezier(.2, .8, .2, 1) both }
.pos b, .rng i b, .dot b, .stack b { transition: width .4s cubic-bezier(.2, .8, .2, 1), left .4s cubic-bezier(.2, .8, .2, 1) }
select { appearance: none; -webkit-appearance: none; padding-right: 30px; cursor: pointer; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 15px) 55%, calc(100% - 10px) 55%; background-size: 5px 5px; background-repeat: no-repeat }
select:hover, input:hover { border-color: var(--mute) }
.au-menu { position: fixed; z-index: 3000; max-height: min(360px, calc(100vh - 16px)); overflow-y: auto; padding: 6px; background: var(--panel); color: var(--fg); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .18); animation: au-drop .18s cubic-bezier(.2, .8, .2, 1) both; transform-origin: top center }
.au-menu.up { animation-name: au-rise; transform-origin: bottom center }
.au-menu.au-out { animation: au-out .16s ease forwards; pointer-events: none }
.au-menu button { display: flex; width: 100%; min-height: 34px; align-items: center; justify-content: space-between; gap: 16px; padding: 6px 10px; border-radius: 6px; text-align: left; font-size: 14px }
.au-menu button:hover, .au-menu button:focus-visible { background: var(--sunk); outline: none }
.au-menu button[aria-selected="true"] { font-weight: 600 }
.au-menu button[aria-selected="true"]::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--fg); flex: none }
.au-menu-title { padding: 8px 10px 4px; font-size: 12px; color: var(--mute) }
html.theme-anim, html.theme-anim * { transition: background-color .3s ease, color .3s ease, border-color .3s ease, fill .3s ease, stroke .3s ease !important }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto } body, .wrap > *, .cond, .saved, .au-menu { animation: none } body, .pos b, .rng i b, .dot b, .stack b { transition: none } }

/* AURORA 글자: 오로라 팔레트(파트너 2026-11-25) Aquamarine #12F2A1 · Periwinkle #C8C2EC · Tekhelet #402D8E · Oxford Blue #102040 이 한 줄로 이어지게. 밝은 판은 글자가 읽히도록 진한 쪽으로. */
:root { --au-a: #0BBF80; --au-b: #6A55C8; --au-c: #402D8E; --au-d: #102040 }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --au-a: #12F2A1; --au-b: #C8C2EC; --au-c: #8E7BE6; --au-d: #12F2A1 } }
:root[data-theme="dark"] { --au-a: #12F2A1; --au-b: #C8C2EC; --au-c: #8E7BE6; --au-d: #12F2A1 }
.top a.brand, h1.brand { font-size: 20px; display: inline-flex; align-items: baseline; gap: 8px; font-weight: 400; letter-spacing: 0.02em }
.brand b { font-size: 28px; font-weight: 600; letter-spacing: 0.08em; line-height: 1.1; background: linear-gradient(90deg, var(--au-a), var(--au-b) 38%, var(--au-c) 68%, var(--au-d)); background-size: 220% 100%; background-position: 0 0;
  -webkit-background-clip: text; background-clip: text; color: transparent; transition: background-position .9s cubic-bezier(.2, .8, .2, 1) }
.brand:hover b { background-position: 100% 0 }
.aiview { border: 1px solid var(--line); border-radius: 999px; padding: 8px 18px; font-weight: 600; display: inline-flex; gap: 8px; align-items: center }
.aiview::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: linear-gradient(135deg, var(--au-a), var(--au-c)) }
.aiview:hover { border-color: var(--au-a) }
.aiview[aria-pressed="true"] { border-color: transparent; color: #FFFFFF; background: linear-gradient(90deg, #0BBF80, #6A55C8 60%, #402D8E) }
.aiview[aria-pressed="true"]::before { background: #FFFFFF }
.events { border-bottom: 1px solid var(--line); background: var(--bg) }
.events > div { max-width: 1360px; margin: 0 auto; padding-block: 8px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); display: flex; gap: 16px; align-items: center; overflow-x: auto; white-space: nowrap; scrollbar-width: none; font-size: 13px }
.events strong { flex: none }
.events span.ev { flex: none; display: inline-flex; gap: 6px; align-items: baseline; color: var(--mute) }
.events span.ev b { font-family: var(--mono); font-weight: 400; color: var(--fg) }
.events span.ev.hi i { width: 6px; height: 6px; border-radius: 50%; background: var(--up); align-self: center; flex: none }
.events span.ev.hi em { color: var(--fg); font-style: normal; font-weight: 600 }
.events span.ev em { font-style: normal }
.events span.ev.past { opacity: .5 }

.top .langbtn { display: inline-flex; gap: 6px; align-items: center; border-radius: 999px; padding: 6px 12px; font-family: var(--mono); font-size: 13px; background: var(--sunk); border-color: transparent }
.top .langbtn:hover { border-color: var(--line) }
.au-menu button[aria-selected="true"] { background: var(--fg); color: var(--bg) }
.au-menu button[aria-selected="true"]::after { display: none }

/* 경제 일정 띠: 왼쪽으로 천천히 흐른다(두 벌을 이어 붙여 끊김 없이). 마우스를 올리면 멈춘다. */
.events > div { overflow: hidden }
.events .mq { flex: 1; min-width: 0; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 32px, #000 calc(100% - 32px), transparent); mask-image: linear-gradient(90deg, transparent, #000 32px, #000 calc(100% - 32px), transparent) }
.events .track { display: inline-flex; gap: 40px; padding-right: 40px; animation: au-marquee var(--dur, 60s) linear infinite; will-change: transform }
.events .mq:hover .track, .events .mq:focus-within .track { animation-play-state: paused }
@keyframes au-marquee { to { transform: translateX(-50%) } }
/* AI View 단추: 테두리를 따라 오로라색이 흐르고 은은하게 빛난다. 누르면 속이 채워진다. */
@keyframes au-flow { to { background-position: 300% 0 } }
@keyframes au-glow { from { box-shadow: 0 0 10px 0 rgba(18, 242, 161, .28), 0 0 22px 2px rgba(106, 85, 200, .18) } to { box-shadow: 0 0 16px 2px rgba(18, 242, 161, .45), 0 0 34px 6px rgba(106, 85, 200, .32) } }
.aiview { position: relative; isolation: isolate; border: 0; border-radius: 999px; padding: 10px 20px; font-weight: 600; display: inline-flex; gap: 8px; align-items: center; background: none; animation: au-glow 2.6s ease-in-out infinite alternate }
.aiview::before { content: none }
.aiview::after { content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -2; background: linear-gradient(90deg, #12F2A1, #C8C2EC, #6A55C8, #402D8E, #6A55C8, #C8C2EC, #12F2A1); background-size: 300% 100%; animation: au-flow 7s linear infinite }
.aiview span.fill { position: absolute; inset: 1.5px; border-radius: inherit; z-index: -1; background: var(--panel); overflow: hidden }
.aiview span.fill::after { content: ""; position: absolute; inset: -2px; background: linear-gradient(90deg, #0B8F63, #5B49B8, #402D8E, #5B49B8, #0B8F63); background-size: 300% 100%; animation: au-flow 7s linear infinite;
  clip-path: circle(0% at 50% 50%); transition: clip-path .55s cubic-bezier(.2, .8, .2, 1) }                     /* 누르면 가운데서 바깥으로 색이 퍼진다 */
.aiview:hover span.fill::after { clip-path: circle(14% at 50% 50%) }
.aiview[aria-pressed="true"] { color: #FFFFFF; border: 0; background: none; transition: color .3s ease }
.aiview[aria-pressed="true"] span.fill::after { clip-path: circle(130% at 50% 50%) }
.aiview svg { width: 14px; height: 14px; flex: none }
.aiview[aria-pressed="true"] svg * { stroke: #FFFFFF; fill: #FFFFFF }
/* 검색 화면: 본문 | 오른쪽 칸 */
.layout2 { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 12px; align-items: start }
@media (min-width: 1500px) { .wrap.wide, .top.wide > div, .events.wide > div { max-width: 1720px } .layout2 { grid-template-columns: minmax(0, 1fr) 320px } }
/* 좁은 화면(1100 미만): 한 줄로 쌓되, 오른쪽 칸은 표 아래로 묻히지 않게 필터와 표 사이에 옆으로 넘기는 카드 줄로 둔다 */
@media (max-width: 1099px) {
  .layout2 { display: flex; flex-direction: column; min-width: 0; width: 100% }
  .layout2 > .col:first-child { display: contents }
  .layout2 > * , .layout2 > .col:first-child > * { min-width: 0; max-width: 100% }
  .layout2 > aside { order: 2; flex-direction: row; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; width: 100% }
  .layout2 > aside > * { flex: 0 0 min(320px, 86vw); scroll-snap-align: center }
  .layout2 .res { order: 3 }
}
.col { display: flex; flex-direction: column; gap: 12px; min-width: 0 }
.mini { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 6px 10px; font-size: 13px; align-items: baseline }
.mini a { text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.mini a:hover { text-decoration: underline }
.mini span { font-family: var(--mono); text-align: right }
.board { display: flex; flex-direction: column }
.board button { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: baseline; text-align: left; padding: 7px 8px; min-height: 0; border-radius: 6px; font-size: 13px; width: 100% }
.board button span { font-family: var(--mono); text-align: right }
.board button:hover { background: var(--sunk) }
.board button[aria-pressed="true"] { background: var(--sunk); font-weight: 600 }
#spark { display: block; width: 100%; height: 90px; margin: 8px 0 }
@media (prefers-reduced-motion: reduce) { .events .track, .aiview, .aiview::after { animation: none } .events .mq { overflow-x: auto } }

/* 로딩 표시: 화면을 여는 동안 AURORA 글자가 한 자씩 올라왔다 사라진다(오토트레이딩과 같은 박자). 다 준비되면 스르르 걷힌다. */
#au-loader { position: fixed; inset: 0; z-index: 4000; display: flex; align-items: center; justify-content: center; background: var(--bg); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .28s ease, visibility .28s ease }
#au-loader.on { opacity: 1; visibility: visible; pointer-events: auto; transition-delay: .18s }
#au-loader.on.now { transition: none }
#au-loader .au-word { display: flex; gap: .42em; padding-left: .42em; font: 600 26px/1 var(--sans); letter-spacing: 0 }
#au-loader .au-word span { display: inline-block; opacity: .18; transform: translateY(12px); animation: au-letter 1.5s cubic-bezier(.2, .8, .2, 1) infinite;
  background: linear-gradient(90deg, var(--au-a), var(--au-b) 60%, var(--au-c)); -webkit-background-clip: text; background-clip: text; color: transparent }
@keyframes au-letter { 0% { opacity: .18; transform: translateY(12px) } 22%, 58% { opacity: 1; transform: none } 80%, 100% { opacity: .18; transform: translateY(-8px) } }
@media (prefers-reduced-motion: reduce) { #au-loader .au-word span { animation: none; opacity: 1; transform: none } }

/* ── 모바일 공통(720 이하): 머리띠는 두 줄, 옆으로 넘기는 줄은 줄바꿈 없이, 창은 아래에서 올라오는 판 ── */
.monly { display: none }
@media (max-width: 720px) {
  .monly { display: inline-flex }
  .top > div { padding-block: 10px; gap: 6px 8px }
  .top a.brand { font-size: 16px; margin-right: auto } .brand b { font-size: 22px }
  .top .note { order: 9; flex: 1 1 100%; font-size: 12px }
  .top .note:empty { display: none }
  .top button, .top a.btn { min-height: 34px; padding: 5px 10px; font-size: 13px }
  .wrap { padding-block: 12px 40px }
  .panel { padding: 14px; border-radius: 12px }
  .tabs { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: none }
  .tabs button { flex: none }
  .au-menu { max-width: calc(100vw - 16px) }
  /* 밝기 단추는 글자 대신 반달 표시로(머리띠가 한 줄에 들어가게) */
  #theme { font-size: 0; gap: 0; width: 34px; padding: 0; display: inline-flex; align-items: center; justify-content: center }
  #theme::before { content: ""; width: 15px; height: 15px; border-radius: 50%; border: 1.5px solid currentColor; background: linear-gradient(90deg, currentColor 50%, transparent 50%) }
  /* 옆으로 넘기는 시장 카드는 다섯 줄까지만 */
  .board button:nth-child(n+6), aside .mini > :nth-child(n+16) { display: none }
  #spark { height: 64px }
}
@keyframes au-sheet { from { transform: translateY(24px); opacity: 0 } to { transform: none; opacity: 1 } }
