/* =========================================================================
   배당 캘린더 — Liquid Glass 테마 (iPhone 17 / iOS 26 스타일 참고)
   frosted glass 패널 · 컬러풀 메시 배경 · 큰 라운드 · 글로시 컨트롤
   ========================================================================= */

:root {
  --ink: #0c1f29;
  --muted: #4f6573;
  --line: rgba(255, 255, 255, .55);
  --brand: #0ea5a0;
  --brand2: #2f7bf6;
  --accent: #7c5cff;
  --green: #0f9d58;
  --red: #e5484d;

  --glass-bg: rgba(255, 255, 255, .55);
  --glass-bg-strong: rgba(255, 255, 255, .72);
  --glass-border: rgba(255, 255, 255, .65);
  --radius: 26px;
  --radius-sm: 16px;
  --blur: saturate(180%) blur(20px);
  --shadow: 0 10px 30px rgba(16, 42, 67, .12), 0 2px 6px rgba(16, 42, 67, .06);
  --shadow-hi: inset 0 1px 0 rgba(255, 255, 255, .75);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
          "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  line-height: 1.6;
  letter-spacing: -0.01em;
  min-height: 100vh;
  /* Liquid Glass: 컬러풀 메시 배경 (fixed) */
  background:
    radial-gradient(40% 50% at 12% 8%, rgba(124, 92, 255, .35), transparent 60%),
    radial-gradient(45% 55% at 88% 4%, rgba(47, 123, 246, .30), transparent 60%),
    radial-gradient(50% 60% at 82% 88%, rgba(14, 165, 160, .35), transparent 62%),
    radial-gradient(48% 55% at 8% 92%, rgba(255, 138, 101, .26), transparent 60%),
    linear-gradient(160deg, #eef4ff 0%, #f4fbff 40%, #eafbf6 100%);
  background-attachment: fixed;
}

.container {
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
  padding: 0 18px;
}

/* ---------- 유리 패널 공통 ---------- */
.glass, .panel, .view, .content-block, .article, .filterbar {
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow), var(--shadow-hi);
}

/* ---------- Header (frosted sticky) ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .45);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border-bottom: 1px solid rgba(255, 255, 255, .5);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 62px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1.18rem;
  text-decoration: none;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.logo-ic {
  display: inline-flex;
  width: 30px; height: 30px;
  border-radius: 9px;
  align-items: center; justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  box-shadow: 0 4px 10px rgba(47,123,246,.3);
}
.logo-ic svg { width: 18px; height: 18px; }
.nav a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 18px;
  font-size: .94rem;
  font-weight: 600;
  transition: color .15s;
}
.nav a:hover { color: var(--brand); }
.lang-toggle {
  margin-left: 18px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, .55);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--ink);
  font-weight: 700;
  font-size: .82rem;
  padding: 6px 13px;
  border-radius: 999px;
  cursor: pointer;
  font-family: var(--font);
  transition: all .15s;
}
.lang-toggle:hover {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
}

/* ---------- Hero ---------- */
.hero { text-align: center; padding: 40px 8px 18px; }
.hero h1 {
  font-size: 2.1rem;
  margin: 0 0 12px;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(120deg, #0c1f29, #155e75 55%, var(--brand2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero .sub { color: var(--muted); margin: 0; font-size: 1.02rem; }

/* ---------- Ad slot ---------- */
.ad-slot {
  min-height: 96px;
  margin: 22px 0;
  border: 1px dashed rgba(120, 140, 160, .4);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .35);
}
.ad-label { color: rgba(90, 110, 130, .6); font-size: .8rem; letter-spacing: .06em; }

/* ---------- Filter bar ---------- */
.filterbar {
  padding: 14px 18px;
  margin: 18px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
/* 시장 / 주기 줄 구분선 */
#market-filter {
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(120, 140, 160, .2);
}
.filter-title {
  font-size: .82rem;
  font-weight: 700;
  color: var(--muted);
  margin-right: 6px;
  min-width: 34px;
}
.search-wrap {
  position: relative;
  flex: 1 1 240px;
  min-width: 200px;
  display: flex;
  align-items: center;
}
.search-ic {
  position: absolute;
  left: 15px;
  width: 18px; height: 18px;
  color: var(--muted);
  pointer-events: none;
}
.search-box {
  width: 100%;
  font-size: .95rem;
  padding: 11px 16px 11px 42px;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, .6);
  color: var(--ink);
  font-family: var(--font);
}
.search-box:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(14,165,160,.15); }

/* ---------- Chips (pill, glass) ---------- */
.chip {
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, .5);
  color: var(--muted);
  padding: 8px 15px;
  border-radius: 999px;
  cursor: pointer;
  font-size: .9rem;
  font-weight: 700;
  font-family: var(--font);
  transition: all .18s ease;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.chip:hover { color: var(--brand); transform: translateY(-1px); }
.chip.active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  box-shadow: 0 6px 16px rgba(47, 123, 246, .3), var(--shadow-hi);
}

/* ---------- Tabs ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 10px; margin: 4px 0 18px; }
.tab {
  flex: 1 1 auto;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, .5);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--muted);
  padding: 12px 16px;
  border-radius: 999px;
  cursor: pointer;
  font-size: .96rem;
  font-weight: 700;
  font-family: var(--font);
  transition: all .18s ease;
}
.tab:hover { color: var(--brand); }
.tab.active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  box-shadow: 0 8px 20px rgba(47,123,246,.32), var(--shadow-hi);
}

/* ---------- Views ---------- */
.view { display: none; padding: 22px; }
.view.active { display: block; }

/* ---------- Month strip (calendar) ---------- */
.month-strip {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}
.month-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 12px 4px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, .5);
  cursor: pointer;
  transition: all .18s ease;
  font-family: var(--font);
}
.month-cell:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.month-cell .mc-label { font-size: .88rem; font-weight: 700; color: var(--ink); }
.month-cell .mc-count {
  font-size: .78rem; font-weight: 800; color: var(--brand2);
  min-width: 22px; text-align: center;
}
.month-cell.dim { opacity: .45; }
.month-cell.active {
  border-color: transparent;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  box-shadow: 0 8px 20px rgba(47,123,246,.3), var(--shadow-hi);
}
.month-cell.active .mc-label, .month-cell.active .mc-count { color: #fff; }

.month-title { font-size: 1.25rem; margin: 0 0 14px; font-weight: 800; letter-spacing: -0.02em; }

/* ---------- Stock cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}
.stock-card {
  background: var(--glass-bg-strong);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 16px;
  box-shadow: 0 4px 14px rgba(16,42,67,.08), var(--shadow-hi);
  transition: transform .18s ease, box-shadow .18s ease;
}
.stock-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.sc-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.sc-name { font-weight: 800; font-size: 1.02rem; letter-spacing: -0.02em; }
.sc-ticker { font-size: .78rem; color: var(--muted); font-weight: 700; }
.sc-badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 12px; }
.badge {
  font-size: .72rem; font-weight: 700; padding: 4px 9px; border-radius: 999px;
  background: rgba(255,255,255,.7); border: 1px solid var(--glass-border); color: var(--muted);
}
.badge-freq { color: var(--brand2); background: rgba(47,123,246,.12); border-color: transparent; }
.badge-ex { color: var(--accent); background: rgba(124,92,255,.12); border-color: transparent; }
.sc-metrics {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px;
  border-top: 1px solid rgba(120,140,160,.18); padding-top: 12px;
}
.sc-metrics span { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.sc-metrics b { font-size: 1.02rem; font-weight: 800; color: var(--ink); }
.sc-metrics small { font-size: .68rem; color: var(--muted); }

/* ---------- Frequency groups ---------- */
.freq-group { margin-bottom: 26px; }
.freq-group:last-child { margin-bottom: 0; }
.freq-h {
  font-size: 1.1rem; font-weight: 800; margin: 0 0 12px;
  display: flex; align-items: center; gap: 10px;
}
.freq-cnt {
  font-size: .74rem; font-weight: 700; color: var(--brand2);
  background: rgba(47,123,246,.12); padding: 3px 10px; border-radius: 999px;
}

/* ---------- Tables (screener) ---------- */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius-sm); }
.plan-table { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 560px; }
.plan-table th {
  background: rgba(255,255,255,.55);
  padding: 11px 10px; font-weight: 800; color: var(--ink);
  border-bottom: 2px solid rgba(120,140,160,.2);
  white-space: nowrap; position: sticky; top: 0;
}
.plan-table th.sortable { cursor: pointer; }
.plan-table th.sortable:hover { color: var(--brand2); }
.plan-table td { padding: 11px 10px; border-bottom: 1px solid rgba(120,140,160,.14); white-space: nowrap; }
.th-left { text-align: left; }
.th-center { text-align: center; }
.th-right { text-align: right; }
.plan-table tbody tr { transition: background .15s; }
.plan-table tbody tr:hover { background: rgba(255,255,255,.5); }
.pos { color: var(--green); }
.neg { color: var(--red); }

.empty-msg { text-align: center; color: var(--muted); padding: 28px 10px; font-size: .95rem; }

/* ---------- Data note ---------- */
.data-note {
  font-size: .82rem; color: var(--muted); text-align: center;
  margin: 16px 0; padding: 10px 14px;
  background: rgba(255,255,255,.4); border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
}

/* ---------- Content blocks ---------- */
.content-block { padding: 26px; margin: 20px 0; }
.content-block h2 { margin: 0 0 16px; font-size: 1.3rem; font-weight: 800; letter-spacing: -0.02em; }
.tips, .howto { margin: 0; padding-left: 20px; }
.tips li, .howto li { margin-bottom: 11px; }

.terms-dl { margin: 0; }
.terms-dl dt { font-weight: 800; color: var(--ink); margin-top: 14px; }
.terms-dl dt:first-child { margin-top: 0; }
.terms-dl dd { margin: 4px 0 0; color: var(--muted); }

details { border-bottom: 1px solid rgba(120,140,160,.18); padding: 13px 0; }
details:last-child { border-bottom: none; }
summary { cursor: pointer; font-weight: 700; }
details p { color: var(--muted); margin: 10px 0 0; }

.disclaimer {
  background: rgba(255, 244, 230, .65);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 1px solid rgba(255, 200, 140, .6);
  color: #9a4a12;
  padding: 15px 18px; border-radius: var(--radius-sm);
  font-size: .88rem; margin: 22px 0 44px;
}

/* ---------- Article / legal pages ---------- */
.article { padding: 32px; margin: 26px 0 44px; }
.article h1 { font-size: 1.7rem; margin-top: 0; font-weight: 800; letter-spacing: -0.02em; }
.article h2 { font-size: 1.22rem; margin-top: 30px; font-weight: 800; }
.article h3 { font-size: 1.05rem; margin-top: 20px; }
.article p, .article li { color: #25323c; }
.article a { color: var(--brand2); }
.article .ad-slot { margin: 24px 0; }

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 44px;
  background: rgba(12, 31, 41, .85);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  color: #c3d2dc; padding: 28px 0;
}
.footer-nav { display: flex; flex-wrap: wrap; gap: 18px; margin-bottom: 12px; }
.footer-nav a { color: #9fb4c0; text-decoration: none; font-size: .9rem; font-weight: 600; }
.footer-nav a:hover { color: #fff; }
.copyright { font-size: .82rem; color: #6f8593; margin: 0; }

/* ============ 포트폴리오 빌더 ============ */
.builder, .browser { padding: 24px; margin: 18px 0; }
.section-title { font-size: 1.3rem; font-weight: 800; letter-spacing: -0.02em; margin: 0; }
.builder-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.pf-count {
  font-size: .82rem; font-weight: 800; color: var(--brand2);
  background: rgba(47,123,246,.12); padding: 5px 12px; border-radius: 999px;
}

/* 수입 캘린더 */
.inc-head { font-size: .85rem; font-weight: 700; color: var(--muted); margin-bottom: 10px; }
.inc-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 8px; }
.inc-cell {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 12px 2px; border-radius: 14px; cursor: pointer;
  border: 1px solid var(--glass-border); background: rgba(255,255,255,.5);
  font-family: var(--font); transition: all .15s ease;
}
.inc-cell:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.inc-cell .inc-ic { width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; }
.inc-cell .inc-ic svg { width: 20px; height: 20px; }
.inc-cell .inc-m { font-size: .72rem; font-weight: 700; }
.inc-cell.empty { color: var(--muted); border-style: dashed; opacity: .85; }
.inc-cell.empty .inc-ic { color: var(--brand2); opacity: .55; }
.inc-cell.covered {
  color: #fff; border-color: transparent;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  box-shadow: 0 6px 16px rgba(47,123,246,.28), var(--shadow-hi);
}
.inc-cell.sel { outline: 3px solid rgba(124,92,255,.45); outline-offset: 1px; }

/* 커버리지 */
.cov-bar { height: 10px; border-radius: 999px; background: rgba(120,140,160,.18); margin: 18px 0 10px; overflow: hidden; }
.cov-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--brand), var(--brand2)); transition: width .35s ease; }
.cov-text { margin: 0; font-weight: 700; font-size: .95rem; }
.cov-text.done { display: flex; align-items: center; gap: 8px; color: var(--green); }
.ic-done svg { width: 22px; height: 22px; }
.cov-gap { margin: 6px 0 0; font-size: .86rem; color: var(--muted); }
.cov-gap b { color: var(--accent); }

/* 빈 포트폴리오 */
.pf-empty { text-align: center; padding: 26px 10px; }
.pe-ic { display: inline-flex; color: var(--brand2); }
.pe-ic svg { width: 40px; height: 40px; }
.pe-title { font-weight: 800; font-size: 1.05rem; margin: 12px 0 4px; }
.pe-desc { color: var(--muted); margin: 0 0 16px; font-size: .92rem; }
.btn-primary {
  border: none; cursor: pointer; font-family: var(--font); font-weight: 700; font-size: .95rem;
  color: #fff; padding: 11px 20px; border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  box-shadow: 0 8px 20px rgba(47,123,246,.3), var(--shadow-hi);
}
.btn-primary:hover { filter: brightness(1.05); }

/* 보유 종목 */
.holdings { margin-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.hold-row {
  display: grid; grid-template-columns: 1fr 130px 40px; gap: 10px; align-items: center;
  background: var(--glass-bg-strong); border: 1px solid var(--glass-border);
  border-radius: 16px; padding: 12px 14px;
}
.hold-main { min-width: 0; }
.hold-name { font-weight: 800; display: block; }
.hold-sub { font-size: .8rem; color: var(--muted); display: block; margin-top: 2px; }
.amt-input {
  width: 100%; text-align: right; padding: 9px 11px; border-radius: 10px;
  border: 1px solid var(--glass-border); background: rgba(255,255,255,.7);
  font-family: var(--font); font-size: .9rem; color: var(--ink);
}
.amt-input:focus { outline: none; border-color: var(--brand); }
.hold-del {
  width: 40px; height: 40px; border-radius: 11px; cursor: pointer;
  border: 1px solid var(--glass-border); background: rgba(255,255,255,.6); color: var(--red);
  display: inline-flex; align-items: center; justify-content: center;
}
.hold-del svg { width: 18px; height: 18px; }
.hold-del:hover { background: #fef2f2; border-color: #fca5a5; }

/* 요약 통계 */
.pf-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 18px; }
.stat {
  background: rgba(255,255,255,.5); border: 1px solid var(--glass-border);
  border-radius: 14px; padding: 14px 8px; text-align: center;
}
.stat b { display: block; font-size: 1.15rem; font-weight: 800; color: var(--brand-dark, var(--brand)); }
.stat small { display: block; font-size: .72rem; color: var(--muted); margin-top: 3px; }
.pf-note { font-size: .78rem; color: var(--muted); margin: 10px 0 0; text-align: center; }

/* ============ 브라우저 컨트롤 ============ */
.browser .section-title { margin-bottom: 16px; }
.browse-controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 14px 0; flex-wrap: wrap; }
.seg { display: inline-flex; background: rgba(255,255,255,.5); border: 1px solid var(--glass-border); border-radius: 999px; padding: 3px; }
.seg-btn {
  border: none; cursor: pointer; font-family: var(--font); font-weight: 700; font-size: .88rem;
  padding: 7px 16px; border-radius: 999px; color: var(--muted); background: transparent; transition: all .15s;
}
.seg-btn.active { color: #fff; background: linear-gradient(135deg, var(--brand), var(--brand2)); }
.sort-wrap { display: inline-flex; align-items: center; gap: 8px; font-size: .85rem; font-weight: 700; color: var(--muted); }
.sort-wrap select {
  font-family: var(--font); font-size: .88rem; padding: 8px 12px; border-radius: 999px;
  border: 1px solid var(--glass-border); background: rgba(255,255,255,.6); color: var(--ink);
}

/* 월 필터 배너 */
.mbanner {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: rgba(124,92,255,.1); border: 1px solid rgba(124,92,255,.3);
  border-radius: 14px; padding: 11px 16px; margin-bottom: 14px; font-weight: 700; color: var(--accent);
}
.mbanner button {
  display: inline-flex; align-items: center; gap: 4px; cursor: pointer;
  border: 1px solid rgba(124,92,255,.3); background: rgba(255,255,255,.7); color: var(--accent);
  border-radius: 999px; padding: 5px 12px; font-family: var(--font); font-weight: 700; font-size: .82rem;
}
.mbanner button svg { width: 14px; height: 14px; }

/* 담기 버튼 / 추가된 카드 */
.add-btn {
  margin-top: 14px; width: 100%; cursor: pointer; font-family: var(--font); font-weight: 700; font-size: .9rem;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px; border-radius: 12px; border: 1px solid var(--brand);
  background: rgba(14,165,160,.08); color: var(--brand);
  transition: all .15s;
}
.add-btn svg { width: 17px; height: 17px; }
.add-btn:hover { background: var(--brand); color: #fff; }
.add-btn.on { background: linear-gradient(135deg, var(--brand), var(--brand2)); color: #fff; border-color: transparent; }
.stock-card.added { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(14,165,160,.25), var(--shadow); }

/* 시장 배지 (국기 대체) */
.mkt-badge {
  display: inline-block; font-size: .64rem; font-weight: 800; letter-spacing: .03em;
  padding: 2px 6px; border-radius: 6px; vertical-align: middle; margin-right: 2px;
}
.mkt-badge.us { color: #1d4ed8; background: rgba(37,99,235,.13); }
.mkt-badge.kr { color: #be123c; background: rgba(225,29,72,.12); }

/* 본문 내 픽토그램 */
.ic-warn, .ic-info { display: inline-flex; vertical-align: -3px; margin-right: 4px; }
.ic-warn svg { width: 17px; height: 17px; }
.ic-info svg { width: 15px; height: 15px; }
.ic-mail { display: inline-flex; vertical-align: -4px; color: var(--brand); }
.ic-mail svg { width: 18px; height: 18px; }
#data-note { display: flex; align-items: center; justify-content: center; gap: 6px; }
.disclaimer { display: flex; align-items: flex-start; gap: 4px; }
.ic-warn { flex-shrink: 0; margin-top: 1px; }

/* ============ 스노볼 시뮬레이터 폼 ============ */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: .88rem; font-weight: 700; color: var(--ink); }
.field input {
  font-family: var(--font); font-size: 1rem; padding: 11px 13px; border-radius: 12px;
  border: 1px solid var(--glass-border); background: rgba(255,255,255,.7); color: var(--ink);
}
.field input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(14,165,160,.14); }
.check-row { display: flex; align-items: center; gap: 9px; margin: 16px 0 4px; font-weight: 700; font-size: .92rem; }
.check-row input { width: 18px; height: 18px; accent-color: var(--brand); }
.btn-block { width: 100%; margin-top: 16px; }

.sn-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 22px 0 8px; }
.sn-stats .stat.big { grid-column: span 3; }
.sn-stats .stat.big b { font-size: 1.7rem; color: var(--brand-dark, var(--brand)); }

.sn-chart-title { font-size: .85rem; font-weight: 700; color: var(--muted); margin: 22px 0 8px; }
.sn-chart {
  display: flex; align-items: flex-end; gap: 3px; height: 150px;
  padding: 10px 8px 22px; border-radius: 14px; position: relative;
  background: rgba(255,255,255,.4); border: 1px solid var(--glass-border); overflow-x: auto;
}
.sn-bar { flex: 1 1 0; min-width: 8px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; }
.sn-bar-fill {
  width: 70%; border-radius: 5px 5px 0 0;
  background: linear-gradient(180deg, var(--brand2), var(--brand));
  transition: height .4s ease;
}
.sn-bar i { position: absolute; bottom: -18px; font-size: .6rem; color: var(--muted); font-style: normal; white-space: nowrap; }

/* ============ 공모주(IPO) 카드 ============ */
.ipo-group { margin-bottom: 26px; }
.ipo-gh { font-size: 1.15rem; font-weight: 800; margin: 0 0 12px; display: flex; align-items: center; gap: 10px; }
.ipo-card {
  background: var(--glass-bg-strong); border: 1px solid var(--glass-border);
  border-radius: 18px; padding: 16px; box-shadow: 0 4px 14px rgba(16,42,67,.08), var(--shadow-hi);
}
.ipo-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.ipo-name { font-weight: 800; font-size: 1.02rem; }
.ipo-meta { font-size: .76rem; color: var(--muted); font-weight: 600; }
.ipo-status {
  font-size: .72rem; font-weight: 800; padding: 3px 10px; border-radius: 999px; white-space: nowrap;
}
.ipo-status.s-open { color: #fff; background: linear-gradient(135deg, var(--brand), var(--brand2)); }
.ipo-status.s-upcoming { color: var(--accent); background: rgba(124,92,255,.14); }
.ipo-status.s-listed { color: var(--muted); background: rgba(120,140,160,.16); }
.ipo-grid, .ipo-price { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.ipo-grid > div small, .ipo-price > span small { display: block; font-size: .68rem; color: var(--muted); margin-bottom: 2px; }
.ipo-grid > div b, .ipo-price > span b { font-size: .92rem; }
.ipo-price { border-top: 1px solid rgba(120,140,160,.16); padding-top: 12px; }

/* 시나리오 버튼 행 */
.scn-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; }
.chip.scn { font-size: .82rem; }
#status-filter, #cur-filter { /* 같은 줄 그룹 재사용 */ }

/* ============ 플로팅 도구 런처 (FAB) ============ */
.fab-wrap { position: fixed; right: 20px; bottom: 20px; z-index: 200; }
.fab-btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  border: none; font-family: var(--font); font-weight: 800; font-size: .95rem; color: #fff;
  padding: 13px 20px 13px 16px; border-radius: 999px; position: relative;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  box-shadow: 0 10px 26px rgba(47,123,246,.4), var(--shadow-hi);
  transition: transform .2s ease, box-shadow .2s ease;
}
.fab-btn:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(47,123,246,.5); }
.fab-ic { display: inline-flex; }
.fab-ic svg { width: 20px; height: 20px; transition: transform .25s ease; }
.fab-wrap.open .fab-ic svg { transform: rotate(90deg); }
.fab-badge {
  position: absolute; top: -6px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 999px; background: var(--accent); color: #fff; font-size: .7rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 6px rgba(124,92,255,.5);
}
/* 살짝 시선을 끄는 펄스 링 */
.fab-btn::after {
  content: ""; position: absolute; inset: 0; border-radius: 999px;
  box-shadow: 0 0 0 0 rgba(47,123,246,.45); animation: fabpulse 2.6s ease-out infinite;
}
.fab-wrap.open .fab-btn::after { animation: none; }
@keyframes fabpulse { 0% { box-shadow: 0 0 0 0 rgba(47,123,246,.4); } 70% { box-shadow: 0 0 0 14px rgba(47,123,246,0); } 100% { box-shadow: 0 0 0 0 rgba(47,123,246,0); } }

.fab-panel {
  position: absolute; right: 0; bottom: calc(100% + 12px); width: 300px; max-width: 78vw;
  background: var(--glass-bg-strong); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border: 1px solid var(--glass-border); border-radius: 20px; padding: 10px;
  box-shadow: 0 18px 44px rgba(16,42,67,.22), var(--shadow-hi);
  opacity: 0; transform: translateY(10px) scale(.97); transform-origin: bottom right;
  pointer-events: none; transition: opacity .2s ease, transform .2s ease;
}
.fab-wrap.open .fab-panel { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.fab-phead { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px 10px; font-weight: 800; font-size: .85rem; color: var(--muted); }
.fab-close { border: none; background: transparent; color: var(--muted); cursor: pointer; display: inline-flex; padding: 2px; border-radius: 8px; }
.fab-close svg { width: 16px; height: 16px; }
.fab-close:hover { color: var(--ink); background: rgba(120,140,160,.15); }
.fab-item {
  display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink);
  padding: 10px 10px; border-radius: 13px; transition: background .15s;
}
.fab-item:hover { background: rgba(47,123,246,.08); }
.fab-item.active { background: rgba(14,165,160,.1); }
.fab-iico {
  flex-shrink: 0; width: 38px; height: 38px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center;
  color: var(--brand2); background: rgba(47,123,246,.12);
}
.fab-item.active .fab-iico { color: #fff; background: linear-gradient(135deg, var(--brand), var(--brand2)); }
.fab-iico svg { width: 19px; height: 19px; }
.fab-itxt { display: flex; flex-direction: column; min-width: 0; }
.fab-itxt b { font-size: .92rem; font-weight: 700; }
.fab-itxt small { font-size: .73rem; color: var(--muted); }
.fab-now { margin-left: auto; font-size: .64rem; font-weight: 800; color: var(--brand-dark, var(--brand)); background: rgba(14,165,160,.16); padding: 3px 7px; border-radius: 999px; white-space: nowrap; }

/* ============ 목표주가 ("얼마까지 갈까") ============ */
.tg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 18px; }
.tg-card {
  display: flex; flex-direction: column; gap: 4px; text-align: left; cursor: pointer;
  background: var(--glass-bg-strong); border: 1px solid var(--glass-border); border-radius: 15px; padding: 13px 14px;
  font-family: var(--font); transition: transform .15s, box-shadow .15s, border-color .15s;
}
.tg-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.tg-card.sel { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(245,158,11,.35), var(--shadow); }
.tg-name { font-weight: 800; font-size: .92rem; }
.tg-up { font-weight: 800; font-size: 1.05rem; }
.tg-sub { font-size: .72rem; color: var(--muted); }

.tg-detail { padding: 22px; margin-bottom: 14px; }
.tgd-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.tgd-name { font-weight: 800; font-size: 1.25rem; }
.tgd-meta { font-size: .82rem; color: var(--muted); margin-top: 3px; }
.tgd-up { text-align: right; }
.tgd-up b { font-size: 1.5rem; }
.tgd-up small { display: block; font-size: .7rem; color: var(--muted); }
.tgd-h { font-size: .82rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; margin: 22px 0 10px; }
.tgd-targets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.tgt { background: rgba(255,255,255,.5); border: 1px solid var(--glass-border); border-radius: 12px; padding: 11px 8px; text-align: center; }
.tgt small { display: block; font-size: .68rem; color: var(--muted); }
.tgt b { font-size: .98rem; font-weight: 800; }
.tgt.big { grid-column: span 1; }
.tgt.big b { color: var(--brand-dark, var(--brand)); font-size: 1.05rem; }
.rate-bar { display: flex; height: 12px; border-radius: 999px; overflow: hidden; margin: 12px 0 6px; background: rgba(120,140,160,.15); }
.r-buy { background: var(--green); } .r-hold { background: #cbd5e1; } .r-sell { background: var(--red); }
.rate-legend { display: flex; gap: 14px; font-size: .76rem; font-weight: 700; }
.rate-legend .mut { color: var(--muted); }
.tgd-tech { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tgd-tech > div { background: rgba(255,255,255,.5); border: 1px solid var(--glass-border); border-radius: 12px; padding: 11px; }
.tgd-tech small { display: block; font-size: .68rem; color: var(--muted); margin-bottom: 2px; }
.tgd-tech b { font-size: .92rem; }
.trend-up { color: var(--green); } .trend-down { color: var(--red); } .trend-side { color: var(--muted); }
.scn-band { position: relative; height: 14px; border-radius: 999px; background: linear-gradient(90deg, rgba(229,72,77,.25), rgba(15,157,61,.18)); margin: 6px 0 10px; }
.scn-seg.bear { position: absolute; top: 0; height: 100%; background: rgba(229,72,77,.3); border-radius: 999px 0 0 999px; }
.scn-mark { position: absolute; top: -3px; width: 3px; height: 20px; border-radius: 2px; transform: translateX(-50%); }
.scn-mark.base { background: var(--brand); } .scn-mark.now { background: var(--ink); }
.scn-legend { display: flex; justify-content: space-between; }
.scn-legend span { text-align: center; flex: 1; }
.scn-legend small { display: block; font-size: .68rem; color: var(--muted); }
.scn-legend b { font-size: .9rem; }
.tgd-src { display: flex; flex-wrap: wrap; gap: 8px; }
.tgd-src a { font-size: .82rem; font-weight: 700; color: var(--brand2); text-decoration: none; padding: 7px 12px; border-radius: 999px; background: rgba(47,123,246,.1); border: 1px solid var(--glass-border); }
.tgd-src a:hover { background: rgba(47,123,246,.2); }

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
  .hero h1 { font-size: 1.6rem; }
  .hero { padding: 28px 4px 10px; }
  .builder, .browser, .content-block, .article { padding: 18px; }
  .tgd-targets { grid-template-columns: repeat(2, 1fr); }
  .tgd-tech { grid-template-columns: 1fr; }
  .fab-wrap { right: 14px; bottom: 14px; }
  .fab-label { display: none; }
  .fab-btn { padding: 14px; }
  .card-grid { grid-template-columns: 1fr; }
  .inc-grid { grid-template-columns: repeat(6, 1fr); }
  .pf-stats { grid-template-columns: repeat(3, 1fr); gap: 7px; }
  .stat b { font-size: 1rem; }
  .hold-row { grid-template-columns: 1fr 100px 36px; }
  .browse-controls { gap: 8px; }
  .form-grid { grid-template-columns: 1fr; }
  .sn-stats { grid-template-columns: 1fr 1fr; }
  .sn-stats .stat.big { grid-column: span 2; }
}

/* ---------- 모션 최소화 선호 ---------- */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ===== 배당 천국 계산기 (heaven.js) ===== */
.hv-hit {
  text-align: center; padding: 22px 18px; margin: 22px 0 4px;
  background: linear-gradient(135deg, rgba(14,165,160,.12), rgba(56,128,255,.10));
  border: 1px solid var(--glass-border); border-radius: 18px;
}
.hv-hit-big { font-size: 2rem; font-weight: 800; color: var(--brand-dark, var(--brand)); line-height: 1.15; }
.hv-hit-sub { display: inline-block; font-size: .9rem; font-weight: 600; color: var(--muted); margin-left: 8px; }
.hv-hit-cap { font-size: .9rem; color: var(--muted); margin-top: 6px; }
.hv-hit.hv-miss .hv-hit-big { color: var(--muted); font-size: 1.4rem; }
.hv-chart { overflow: visible; }
.hv-line { position: absolute; left: 8px; right: 8px; height: 0; border-top: 2px dashed #ff9500; z-index: 2; }
.hv-line span {
  position: absolute; right: 0; top: -9px; font-size: .62rem; font-weight: 700;
  color: #c2700a; background: rgba(255,255,255,.85); padding: 1px 6px; border-radius: 6px;
}
.sn-bar-fill.reached { background: linear-gradient(180deg, #34c759, #1ea34a); }
.plan-table tbody tr.row-hit { background: rgba(52,199,89,.12); }
.plan-table tbody tr.row-hit:hover { background: rgba(52,199,89,.18); }
