:root {
  color-scheme: dark;
  --bg: #06100d;
  --bg-soft: #0a1713;
  --panel: rgba(15, 31, 26, 0.78);
  --panel-strong: #10231d;
  --line: rgba(195, 255, 224, 0.1);
  --text: #f0f7f3;
  --muted: #8fa79d;
  --green: #2ee59d;
  --green-soft: rgba(46, 229, 157, 0.13);
  --red: #ff5c70;
  --orange: #ff9b57;
  --yellow: #e6c65c;
  --radius: 22px;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 50% -20%, rgba(35, 176, 122, 0.12), transparent 38%),
    linear-gradient(180deg, #07120f 0%, var(--bg) 45%, #050c0a 100%);
  color: var(--text);
  font-family: Inter, Pretendard, "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
a { color: inherit; }
.section-shell { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.ambient { position: fixed; width: 420px; height: 420px; border-radius: 50%; filter: blur(110px); opacity: .08; pointer-events: none; z-index: -1; }
.ambient-one { background: var(--green); top: 8%; right: -260px; }
.ambient-two { background: #d4ba51; top: 55%; left: -300px; }

.site-header {
  width: min(1260px, calc(100% - 40px));
  height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 11px; color: #e9f8f1; font-size: .78rem; font-weight: 800; letter-spacing: .16em; text-decoration: none; }
.brand-mark { display: inline-flex; align-items: flex-end; gap: 3px; height: 18px; }
.brand-mark i { display: block; width: 4px; border-radius: 2px; background: var(--green); }
.brand-mark i:nth-child(1) { height: 8px; opacity: .55; }
.brand-mark i:nth-child(2) { height: 13px; opacity: .75; }
.brand-mark i:nth-child(3) { height: 18px; }
.header-right { display: flex; align-items: center; gap: 14px; }
.market-badge, .source-pill { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 999px; padding: 7px 11px; color: var(--muted); font-size: .68rem; font-weight: 700; letter-spacing: .1em; }
.market-badge i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 12px var(--green); }
.refresh-button { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 999px; padding: 8px 13px; background: transparent; color: #bed0c8; cursor: pointer; transition: .2s ease; }
.refresh-button:hover { border-color: rgba(46, 229, 157, .36); color: var(--text); background: var(--green-soft); }
.refresh-button svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.refresh-button.is-loading svg { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.hero { min-height: 660px; display: grid; grid-template-columns: 1fr 520px; gap: 80px; align-items: center; padding-block: 80px 90px; }
.eyebrow { margin: 0 0 14px; color: var(--green); font-size: .7rem; font-weight: 800; letter-spacing: .2em; }
.hero h1 { margin: 0; font-size: clamp(2.35rem, 4vw, 3.75rem); line-height: 1.08; letter-spacing: -.06em; font-weight: 760; }
.hero-title-line { display: block; white-space: nowrap; }
.hero h1 .hero-title-main { color: var(--text); }
.hero h1 .hero-title-sub { color: #9eb3aa; }
.hero-description { max-width: 570px; margin: 28px 0 25px; color: var(--muted); font-size: 1.02rem; line-height: 1.8; word-break: keep-all; }
.update-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; color: #aabdb5; font-size: .77rem; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 5px rgba(46,229,157,.09), 0 0 15px rgba(46,229,157,.5); }
.source-pill { padding: 4px 8px; font-size: .59rem; margin-left: 4px; }

.gauge-card, .chart-card, .indicator-card, .insight-card { border: 1px solid var(--line); background: linear-gradient(145deg, rgba(17,39,31,.95), rgba(9,23,18,.78)); box-shadow: var(--shadow); }
.gauge-card { border-radius: 30px; padding: 25px 28px 27px; position: relative; overflow: hidden; }
.gauge-card::before { content: ""; position: absolute; inset: -130px -80px auto; height: 260px; background: radial-gradient(circle, rgba(46,229,157,.12), transparent 68%); pointer-events: none; }
.gauge-title-row { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: center; color: #b7c9c1; font-size: .77rem; font-weight: 650; }
.status-chip { color: var(--green); background: var(--green-soft); border: 1px solid rgba(46,229,157,.18); border-radius: 999px; padding: 5px 9px; font-size: .6rem; letter-spacing: .1em; }
.gauge-wrap { position: relative; height: 360px; margin-top: 9px; }
.gauge { width: 100%; height: 210px; display: block; overflow: visible; }
.gauge-track, .gauge-progress { fill: none; stroke-width: 17; stroke-linecap: round; }
.gauge-track { stroke: rgba(213,239,227,.08); }
.gauge-progress { stroke: url(#gauge-gradient); stroke-dasharray: 0 100; filter: drop-shadow(0 0 8px rgba(46,229,157,.18)); transition: stroke-dasharray 1.1s cubic-bezier(.16,1,.3,1); }
.needle { transform-origin: 160px 160px; transform: rotate(-90deg); transition: transform 1.1s cubic-bezier(.16,1,.3,1); }
.needle path, .needle circle { fill: #f6fff9; filter: drop-shadow(0 4px 8px rgba(0,0,0,.36)); }
.needle .needle-core { fill: #10251e; filter: none; }
.gauge-value { position: absolute; inset: 230px 0 auto; text-align: center; }
.gauge-value strong { font-size: 3.8rem; line-height: 1; letter-spacing: -.075em; }
.gauge-value span { margin-left: 7px; color: var(--muted); font-size: .8rem; }
.gauge-labels { position: absolute; left: 14px; right: 14px; top: 315px; display: flex; justify-content: space-between; color: #71867d; font-size: .65rem; font-weight: 700; }
.sentiment-row { border-top: 1px solid var(--line); padding-top: 22px; display: grid; grid-template-columns: 140px 1fr; gap: 18px; align-items: center; }
.sentiment-kicker { display: block; color: var(--muted); font-size: .64rem; margin-bottom: 4px; }
.sentiment-row strong { color: var(--green); font-size: 1.25rem; }
.sentiment-row p { margin: 0; color: #9db0a8; font-size: .78rem; line-height: 1.65; word-break: keep-all; }
.loading-card { animation: breathe 1.7s ease-in-out infinite alternate; }
@keyframes breathe { from { opacity: .76; } to { opacity: 1; } }

.comparison-section { padding-bottom: 105px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 36px; margin-bottom: 28px; }
.section-heading.compact { margin-bottom: 24px; }
.section-heading h2 { margin: 0; font-size: clamp(1.6rem, 2.5vw, 2.25rem); letter-spacing: -.035em; }
.comparison-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.comparison-item { padding: 25px 24px; border-right: 1px solid var(--line); }
.comparison-item:last-child { border-right: 0; }
.comparison-item span { color: var(--muted); font-size: .7rem; }
.comparison-value { display: flex; align-items: baseline; gap: 10px; margin-top: 8px; }
.comparison-value strong { font-size: 1.8rem; letter-spacing: -.04em; }
.delta { font-size: .72rem; font-weight: 750; }
.delta.up { color: var(--green); }
.delta.down { color: var(--red); }
.delta.flat { color: var(--muted); }

.chart-section { padding-bottom: 110px; }
.chart-card { border-radius: var(--radius); padding: 30px 31px 24px; box-shadow: none; }
.chart-heading { align-items: center; margin-bottom: 22px; }
.period-tabs { display: inline-flex; padding: 4px; border-radius: 11px; background: rgba(0,0,0,.2); border: 1px solid var(--line); }
.period-tabs button { min-width: 58px; padding: 7px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: .7rem; cursor: pointer; }
.period-tabs button.active { background: #18342a; color: var(--text); box-shadow: 0 2px 8px rgba(0,0,0,.22); }
.chart-wrap { height: 330px; position: relative; }
.chart-wrap canvas { width: 100%; height: 100%; display: block; }
.chart-tooltip { display: none; position: absolute; z-index: 3; min-width: 112px; padding: 9px 11px; transform: translate(-50%, calc(-100% - 12px)); border: 1px solid rgba(46,229,157,.2); border-radius: 10px; background: rgba(5,17,13,.96); box-shadow: 0 12px 30px rgba(0,0,0,.35); pointer-events: none; color: #a9bcb4; font-size: .64rem; }
.chart-tooltip strong { display: block; color: var(--text); font-size: .92rem; margin-bottom: 1px; }
.chart-legend { display: flex; gap: 20px; justify-content: flex-end; padding-top: 15px; color: #71877d; font-size: .62rem; }
.chart-legend span { display: flex; align-items: center; gap: 6px; }
.chart-legend i { width: 8px; height: 8px; border-radius: 50%; }
.legend-fear { background: var(--red); }.legend-neutral { background: var(--yellow); }.legend-greed { background: var(--green); }

.indicators-section { padding-bottom: 115px; }
.heading-note { max-width: 420px; margin: 0; color: var(--muted); font-size: .78rem; text-align: right; line-height: 1.65; }
.indicator-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.indicator-card { min-height: 230px; border-radius: 18px; padding: 23px; box-shadow: none; position: relative; overflow: hidden; transition: transform .22s ease, border-color .22s ease; }
.indicator-card:hover { transform: translateY(-3px); border-color: rgba(46,229,157,.22); }
.indicator-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
.indicator-top { display: flex; justify-content: space-between; gap: 20px; }
.indicator-number { display: block; color: #557065; font-size: .62rem; font-weight: 800; letter-spacing: .12em; margin-bottom: 8px; }
.indicator-card h3 { margin: 0 0 5px; font-size: 1.05rem; }
.indicator-en { color: #6e867c; font-size: .65rem; }
.indicator-score { text-align: right; }
.indicator-score strong { display: block; font-size: 2rem; line-height: 1; letter-spacing: -.045em; }
.indicator-score span { font-size: .62rem; font-weight: 750; }
.score-track { height: 5px; border-radius: 999px; background: rgba(255,255,255,.06); margin: 22px 0 17px; overflow: hidden; }
.score-fill { height: 100%; width: 0; border-radius: inherit; background: var(--indicator-color); box-shadow: 0 0 13px color-mix(in srgb, var(--indicator-color) 45%, transparent); transition: width 1s cubic-bezier(.16,1,.3,1); }
.indicator-card p { margin: 0; max-width: 620px; color: #91a69d; font-size: .75rem; line-height: 1.7; word-break: keep-all; }
.indicator-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; color: #71867d; font-size: .61rem; }
.indicator-direction { font-weight: 750; }

.insight-section { padding-bottom: 115px; }
.insight-card { display: grid; grid-template-columns: 58px 1fr; gap: 23px; padding: 34px; border-radius: var(--radius); box-shadow: none; background: linear-gradient(115deg, rgba(46,229,157,.095), rgba(12,29,23,.72) 45%); }
.insight-icon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 15px; background: var(--green-soft); color: var(--green); }
.insight-icon svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.insight-card h2 { margin: 0 0 10px; font-size: 1.5rem; }
.insight-card p:last-child { max-width: 900px; margin: 0; color: #a8bbb3; line-height: 1.8; font-size: .9rem; word-break: keep-all; }

.method-section { padding-bottom: 100px; }
.method-section h2 { margin: 0 0 28px; font-size: 1.8rem; }
.scale-bar { display: grid; grid-template-columns: 1.15fr 1fr .7fr 1fr 1.15fr; overflow: hidden; border-radius: 12px; }
.scale { min-height: 76px; padding: 14px 16px; display: flex; flex-direction: column; justify-content: center; color: rgba(255,255,255,.72); font-size: .65rem; }
.scale b { font-size: .82rem; color: white; margin-bottom: 3px; }
.extreme-fear { background: #8d2938; }.fear { background: #ab583c; }.neutral { background: #8f7d3b; }.greed { background: #3b845e; }.extreme-greed { background: #167551; }
.disclaimer { margin: 23px 0 0; color: #5f746b; font-size: .65rem; line-height: 1.7; }

.site-footer { min-height: 100px; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto auto; gap: 28px; align-items: center; color: #60746b; font-size: .65rem; }
.site-footer p { margin: 0; }
.site-footer a { color: #8ba197; text-underline-offset: 3px; }
.footer-brand { opacity: .55; }
.error-toast { position: fixed; right: 20px; bottom: 20px; z-index: 10; display: none; max-width: 360px; padding: 15px 17px; border: 1px solid rgba(255,92,112,.25); border-radius: 13px; background: rgba(45,15,20,.96); box-shadow: 0 20px 50px rgba(0,0,0,.4); }
.error-toast.show { display: block; animation: slideIn .25s ease; }
.error-toast strong, .error-toast span { display: block; }
.error-toast strong { font-size: .78rem; margin-bottom: 3px; }.error-toast span { color: #d59ea6; font-size: .68rem; }
@keyframes slideIn { from { opacity: 0; transform: translateY(8px); } }

@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; gap: 50px; padding-top: 75px; }
  .hero-copy { max-width: 760px; }
  .gauge-card { width: min(100%, 580px); justify-self: center; }
  .comparison-grid { grid-template-columns: repeat(2, 1fr); }
  .comparison-item:nth-child(2) { border-right: 0; }
  .comparison-item:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .site-footer { grid-template-columns: 1fr 1fr; padding-block: 30px; }
  .site-footer p:last-child { grid-column: 1 / -1; }
}

@media (max-width: 680px) {
  .section-shell, .site-header { width: min(100% - 28px, 1180px); }
  .market-badge { display: none; }
  .refresh-button span { display: none; }
  .refresh-button { padding: 9px; }
  .hero { min-height: auto; padding-block: 66px 75px; gap: 42px; }
  .hero h1 { font-size: clamp(1.85rem, 8.4vw, 2.4rem); letter-spacing: -.065em; }
  .hero-description { font-size: .9rem; }
  .gauge-card { padding: 20px 17px 22px; border-radius: 22px; }
  .gauge-wrap { height: 355px; }
  .gauge-value { top: 230px; }
  .gauge-value strong { font-size: 3.55rem; }
  .gauge-labels { top: 312px; }
  .sentiment-row { grid-template-columns: 1fr; gap: 10px; }
  .comparison-section, .chart-section, .indicators-section, .insight-section { padding-bottom: 82px; }
  .comparison-item { padding: 20px 14px; }
  .comparison-value { display: block; }
  .comparison-value strong { font-size: 1.5rem; margin-right: 6px; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 14px; }
  .heading-note { text-align: left; }
  .chart-card { padding: 23px 12px 16px; }
  .chart-heading { padding-inline: 7px; }
  .chart-wrap { height: 280px; }
  .chart-legend { justify-content: center; }
  .indicator-grid { grid-template-columns: 1fr; }
  .indicator-card:last-child:nth-child(odd) { grid-column: auto; }
  .indicator-card { min-height: 220px; padding: 20px; }
  .insight-card { grid-template-columns: 1fr; padding: 27px 23px; }
  .scale-bar { grid-template-columns: 1fr; }
  .scale { min-height: 58px; flex-direction: row; justify-content: space-between; align-items: center; }
  .scale b { margin: 0; }
  .site-footer { grid-template-columns: 1fr; gap: 12px; padding-block: 28px; }
  .site-footer p:last-child { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
