:root {
  --blue: #3182f6;
  --blue-deep: #1b64da;
  --blue-glow: #69a6ff;
  --navy: #191f28;
  --text: #191f28;
  --muted: #8b95a1;
  --subtle: #4e5968;
  --line: #e5e8eb;
  --bg: #f7f8fa;
  --white: #ffffff;
  --surface-2: #f2f4f6;
  --surface-3: #f9fafb;
  --danger: #f04452;
  --success: #03b26c;
  --radius: 16px;
  --shadow: 0 8px 24px rgba(25, 31, 40, 0.04);
  --sidebar-w: 232px;
  --mobile-bar-h: 56px;
  --font: "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  --grad-blue: linear-gradient(135deg, #69a6ff 0%, #3182f6 48%, #1b64da 100%);
  --glow-blue: 0 8px 24px rgba(49, 130, 246, 0.35);
  --main-glow: rgba(49, 130, 246, 0.08);
  --overlay: rgba(25, 31, 40, 0.45);
  --login-bg: linear-gradient(180deg, #f4f8ff, #f7f8fa 55%, #eef2f7);
  --filter-bg: rgba(255, 255, 255, 0.92);
  --metric-line: #f2f4f6;
}

/* 토스증권 다크 톤: 거의 블랙 배경 + 올려진 카드 + 블루 악센트 */
html[data-theme="dark"] {
  color-scheme: dark;
  --blue: #4e8fff;
  --blue-deep: #3182f6;
  --blue-glow: #6ea4ff;
  --navy: #f2f4f6;
  --text: #e5e8eb;
  --muted: #8b95a1;
  --subtle: #b0b8c1;
  --line: #2c2c35;
  --bg: #0b0c0f;
  --white: #17171c;
  --surface-2: #22222a;
  --surface-3: #1d1d24;
  --danger: #ff6b6b;
  --success: #1fd08a;
  --shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  --grad-blue: linear-gradient(135deg, #6ea4ff 0%, #4e8fff 48%, #3182f6 100%);
  --glow-blue: 0 8px 24px rgba(78, 143, 255, 0.28);
  --main-glow: rgba(78, 143, 255, 0.12);
  --overlay: rgba(0, 0, 0, 0.62);
  --login-bg: radial-gradient(circle at 15% 10%, rgba(78, 143, 255, 0.18), transparent 42%),
    radial-gradient(circle at 90% 0%, rgba(49, 130, 246, 0.12), transparent 36%),
    linear-gradient(180deg, #0b0c0f, #121218 60%, #0b0c0f);
  --filter-bg: rgba(23, 23, 28, 0.92);
  --metric-line: #2c2c35;
}

* { box-sizing: border-box; }
html {
  margin: 0;
  min-height: 100%;
  overflow-x: hidden;
  overscroll-behavior-x: none;
  width: 100%;
  max-width: 100%;
}
body {
  margin: 0;
  min-height: 100%;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  overscroll-behavior-x: none;
  /* 세로 스크롤만 — 좌우 고무줄/흔들림 방지 */
  touch-action: pan-y;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.02em;
  position: relative;
}
button, input, select { font: inherit; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

.loading-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
}
.loading-bar.is-visible { opacity: 1; }
.loading-bar.is-visible::before {
  content: "";
  display: block;
  height: 100%;
  width: 35%;
  background: var(--grad-blue);
  box-shadow: 0 0 12px rgba(49, 130, 246, 0.7);
  animation: loadSlide 1s ease-in-out infinite;
}
@keyframes loadSlide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(320%); }
}

.layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

.mobile-bar {
  display: none;
  position: sticky;
  top: 0;
  z-index: 80;
  height: var(--mobile-bar-h);
  padding: 0 12px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: color-mix(in srgb, var(--white) 92%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.mobile-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  text-decoration: none;
  color: var(--navy);
}
.mobile-brand:hover { text-decoration: none; }
.mobile-logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: var(--glow-blue);
  flex-shrink: 0;
}
.mobile-brand-text {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mobile-bar-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.icon-btn {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--navy);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: inline-grid;
  place-items: center;
}
.icon-btn:hover { background: var(--surface-2); }
.login-theme-btn {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 30;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.drawer-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 90;
  background: var(--overlay);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}
.drawer-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.sidebar {
  background: var(--white);
  border-right: 1px solid var(--line);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.sidebar-brand-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.sidebar-brand-top .brand-logo {
  margin-bottom: 0;
}
.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: cover;
  display: block;
  box-shadow: var(--glow-blue);
  flex-shrink: 0;
}

/* PC 대시보드: 로고 우측 중앙 · 2배 · 위아래 움직임 */
@media (min-width: 901px) {
  .sidebar-brand-top {
    justify-content: center;
    align-items: center;
    padding-left: 18%;
  }
  .sidebar-brand-top .brand-logo {
    width: 88px;
    height: 88px;
    border-radius: 20px;
    animation: brand-logo-bob 1.8s ease-in-out infinite;
    will-change: transform;
  }
}
@keyframes brand-logo-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
.drawer-close {
  display: none;
  flex-shrink: 0;
  font-size: 18px;
  line-height: 1;
}
.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--grad-blue);
  box-shadow: var(--glow-blue);
  margin-bottom: 12px;
}
.login-logo {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  display: block;
  margin: 0 auto 16px;
  box-shadow: var(--glow-blue);
  object-fit: cover;
}
.brand-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.03em;
}
.brand-sub {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}
.sidebar-nav { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.nav-item {
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--subtle);
  padding: 11px 12px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
a.nav-item { display: block; text-decoration: none; }
a.nav-item:hover { text-decoration: none; }
.nav-item:hover { background: var(--surface-2); color: var(--navy); }
.nav-item.is-active {
  background: rgba(49, 130, 246, 0.12);
  color: var(--blue);
}
.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.theme-row {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.main {
  padding: 28px 32px 64px;
  min-width: 0;
  max-width: 100%;
  overflow-x: clip;
  background:
    radial-gradient(900px 320px at 100% -10%, var(--main-glow), transparent 55%),
    var(--bg);
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.topbar-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
.topbar h1 {
  margin: 0;
  font-size: 26px;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.04em;
}
.topbar-note {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}
.cron-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  font-size: 12px;
  font-weight: 600;
  color: var(--subtle);
  white-space: nowrap;
}
.cron-chip .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--grad-blue);
  box-shadow: 0 0 0 4px rgba(49, 130, 246, 0.18), 0 0 10px rgba(49, 130, 246, 0.55);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(0.85); opacity: 0.7; }
}
.cron-chip .time {
  color: var(--navy);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.stat {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow);
}
.stat .label {
  margin: 0 0 6px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}
.stat .value {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.view { display: none; }
.view.is-visible { display: block; }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}
.table-card { padding: 0; overflow: hidden; }

.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}
label.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
label.field input,
label.field select {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 12px;
  background: var(--white);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
}
label.field input:focus,
label.field select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(49, 130, 246, 0.14);
}
.form-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.btn {
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--text);
  border-radius: 12px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: -0.02em;
}
.btn:hover {
  background: var(--surface-2);
  color: var(--navy);
}
.btn-primary {
  border: 0;
  color: #fff;
  background: var(--grad-blue);
  box-shadow: var(--glow-blue);
}
.btn-primary:hover {
  background: var(--grad-blue);
  color: #fff;
  filter: brightness(1.06);
}
.btn-ghost {
  background: transparent;
  color: var(--subtle);
}
.btn-ghost:hover {
  background: var(--surface-2);
  color: var(--navy);
}
.sidebar .btn-ghost {
  border-color: var(--line);
  color: var(--subtle);
}
.sidebar .btn-ghost:hover {
  background: var(--surface-2);
  color: var(--navy);
}
.btn-block { width: 100%; }
.btn-link {
  border: 0;
  background: rgba(49, 130, 246, 0.1);
  color: var(--blue);
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.btn-link:hover { background: rgba(49, 130, 246, 0.16); text-decoration: none; }

.browse-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.filter-sticky {
  position: sticky;
  top: 16px;
  z-index: 30;
  align-self: start;
}
.filter-sticky-inner {
  background: var(--filter-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  box-shadow: var(--shadow);
}
.filter-sticky-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  gap: 8px;
}
.filter-sticky-head strong {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.filter-grid-stack {
  grid-template-columns: 1fr;
}
.filter-hint {
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}
.browse-results { min-width: 0; }
.listing-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.empty-cards {
  background: var(--white);
  border: 1px dashed var(--line);
  border-radius: 18px;
  padding: 48px 20px;
  text-align: center;
  color: var(--muted);
  font-weight: 600;
}
.listing-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 0;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  overflow: hidden;
  gap: 0;
}
.listing-card:hover {
  border-color: rgba(49, 130, 246, 0.35);
  box-shadow: 0 12px 28px rgba(49, 130, 246, 0.12);
  transform: translateY(-1px);
}
.listing-card-media {
  background: var(--surface-2);
  min-height: 132px;
  position: relative;
}
.listing-thumb {
  width: 100%;
  height: 100%;
  min-height: 132px;
  object-fit: cover;
  display: block;
  background: var(--surface-2);
}
.listing-thumb.is-broken,
.listing-thumb-empty {
  background:
    linear-gradient(135deg, rgba(49, 130, 246, 0.12), transparent 60%),
    var(--surface-2);
}
.listing-card-body {
  padding: 14px 16px 16px;
  min-width: 0;
}
.listing-contact {
  margin: 6px 0 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--blue);
}
.detail-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}
.detail-gallery img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface-2);
}
.detail-desc {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
  white-space: pre-wrap;
}
.listing-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--subtle);
  font-size: 11px;
  font-weight: 700;
}
.badge-listing {
  background: rgba(3, 178, 108, 0.14);
  color: var(--success);
}
.badge-article {
  background: var(--surface-2);
  color: var(--subtle);
}
.listing-title {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--navy);
  line-height: 1.35;
}
.listing-sub {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
}
.listing-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--metric-line);
}
.metric {
  background: var(--surface-3);
  border-radius: 12px;
  padding: 10px 12px;
}
.metric-label {
  display: block;
  font-size: 11px;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 4px;
}
.metric-value {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--navy);
}
.metric-value.accent { color: var(--blue); }
.listing-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  flex-wrap: wrap;
  align-items: center;
}
.fav-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #c5c8ce;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.12);
  display: grid;
  place-items: center;
  transition: color 0.15s, transform 0.15s, background 0.15s;
}
.fav-btn:hover {
  transform: scale(1.06);
  color: #f5a623;
}
.fav-btn.is-on {
  color: #f5a623;
  background: #fff8eb;
}
.fav-btn-inline {
  position: static;
  width: auto;
  height: auto;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: none;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--navy);
}
.fav-btn-inline.is-on {
  border-color: rgba(245, 166, 35, 0.45);
  background: #fff8eb;
  color: #b7791f;
}
[data-theme="dark"] .fav-btn {
  background: rgba(30, 34, 42, 0.92);
  color: #6b7280;
}
[data-theme="dark"] .fav-btn.is-on,
[data-theme="dark"] .fav-btn-inline.is-on {
  background: rgba(245, 166, 35, 0.16);
  color: #f5a623;
}

.muted { color: var(--muted); }
.mono {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  font-weight: 600;
}
.actions { display: flex; gap: 6px; flex-wrap: wrap; }

.pager {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  padding: 16px 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.saved-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.chip {
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 700;
  color: var(--navy);
  cursor: pointer;
}
.chip:hover {
  border-color: rgba(49, 130, 246, 0.4);
  color: var(--blue);
  background: rgba(49, 130, 246, 0.06);
}

.source-pick-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
  max-height: min(62vh, 520px);
  overflow: auto;
}
.source-pick {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 650;
  color: var(--navy);
  cursor: pointer;
}
.source-pick:hover {
  border-color: rgba(49, 130, 246, 0.35);
  background: rgba(49, 130, 246, 0.05);
}
.source-pick.is-active {
  border-color: rgba(49, 130, 246, 0.55);
  background: rgba(49, 130, 246, 0.1);
  color: var(--blue);
}
.source-pick .src-count {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  background: var(--bg);
  border-radius: 999px;
  padding: 2px 8px;
}
.source-pick.is-active .src-count {
  color: var(--blue);
  background: rgba(49, 130, 246, 0.12);
}

.modal {
  width: min(900px, calc(100% - 24px));
  max-width: calc(100% - 24px);
  max-height: calc(100vh - 40px);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--white);
  color: var(--text);
  padding: 0;
  box-shadow: 0 24px 60px rgba(25, 31, 40, 0.16);
}
.modal::backdrop { background: var(--overlay); }
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  gap: 12px;
}
.modal-head h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.03em;
  min-width: 0;
  flex: 1;
}
.modal-close {
  flex-shrink: 0;
  font-size: 18px;
  line-height: 1;
}
.modal-body { padding: 18px; overflow: auto; }
.detail-section { margin-bottom: 18px; }
.detail-section h3 {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--blue);
  font-weight: 800;
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px;
}
.kv {
  background: var(--bg);
  border-radius: 12px;
  padding: 12px;
}
.kv .k { font-size: 11px; color: var(--muted); font-weight: 700; }
.kv .v { margin-top: 4px; font-size: 14px; color: var(--navy); font-weight: 600; }
.source-list { display: flex; flex-direction: column; gap: 8px; }
.source-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.history-list { font-size: 12px; color: var(--muted); font-weight: 500; }

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--login-bg);
}
.login-card {
  width: min(420px, 100%);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 20px 50px rgba(49, 130, 246, 0.12);
  padding: 36px 28px 28px;
  text-align: center;
}
.login-brand {
  margin: 0 0 14px;
  font-size: 14px;
  font-weight: 800;
  background: var(--grad-blue);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.login-card h1 {
  margin: 0 0 8px;
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}
.login-card > p {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
}
.login-card label {
  display: block;
  text-align: left;
  margin: 0 0 6px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--navy);
}
.login-card input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 14px;
  background: var(--surface-3);
  color: var(--text);
}
.login-card input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(49, 130, 246, 0.14);
}
.form-error {
  color: var(--danger);
  font-size: 13px;
  margin: 0 0 12px;
  text-align: left;
  font-weight: 600;
}
.form-ok {
  color: var(--success);
  font-size: 13px;
  margin: 0 0 12px;
  font-weight: 600;
}
.password-card { max-width: 480px; }
.password-form .field { margin-bottom: 12px; }

@media (max-width: 1100px) {
  .browse-layout {
    grid-template-columns: 240px minmax(0, 1fr);
  }
}

@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
    min-height: calc(100vh - var(--mobile-bar-h));
  }

  .mobile-bar { display: flex; }

  .drawer-backdrop { display: block; }

  .sidebar {
    position: fixed;
    top: 0;
    right: 0;
    left: auto;
    width: min(304px, 86vw);
    height: 100dvh;
    z-index: 100;
    border-right: 0;
    border-left: 1px solid var(--line);
    transform: translateX(100%);
    transition: transform 0.26s cubic-bezier(0.22, 1, 0.36, 1);
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    padding: 20px 16px calc(20px + env(safe-area-inset-bottom));
    box-shadow: -12px 0 40px rgba(0, 0, 0, 0.18);
    overflow-y: auto;
  }
  .sidebar.is-open { transform: translateX(0); }
  .drawer-close { display: inline-flex; }
  .sidebar-nav {
    flex-direction: column;
    flex: 1;
    flex-wrap: nowrap;
  }
  .sidebar-foot { width: 100%; }
  .sidebar-foot .btn-block { width: 100%; }

  body.drawer-open { overflow: hidden; }

  .main {
    padding: 14px 14px 56px;
  }
  .topbar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin-bottom: 14px;
  }
  .topbar h1 { font-size: 22px; }
  .topbar-chips {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    max-width: 100%;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    touch-action: pan-x;
  }
  .browse-layout {
    grid-template-columns: 1fr;
    max-width: 100%;
    overflow-x: clip;
  }
  .browse-results,
  .listing-cards,
  .filter-sticky,
  .filter-sticky-inner {
    max-width: 100%;
    min-width: 0;
  }
  .listing-card {
    max-width: 100%;
  }
  .filter-sticky {
    position: static;
    top: auto;
    z-index: 1;
  }
  .filter-grid-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .listing-metrics {
    grid-template-columns: repeat(3, 1fr);
  }
  .listing-title { font-size: 15px; }
  .metric-value { font-size: 14px; }
}

@media (max-width: 560px) {
  .mobile-brand-text { max-width: 46vw; }
  .main {
    padding-left: 12px;
    padding-right: 12px;
  }
  .filter-grid-stack {
    grid-template-columns: 1fr;
  }
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .cron-chip {
    padding: 8px 12px;
    font-size: 11px;
    flex-shrink: 0;
  }
  .listing-card {
    grid-template-columns: 96px minmax(0, 1fr);
  }
  .listing-thumb,
  .listing-card-media {
    min-height: 96px;
  }
  .listing-title {
    overflow-wrap: anywhere;
    word-break: break-word;
  }
}

/* ── 리포트 ── */
.report-wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 100%;
}
.report-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
}
.report-range-field {
  min-width: 140px;
  margin: 0;
}
.report-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.report-stat .value {
  font-size: 22px;
}
.report-chart-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.report-chart-title {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 700;
}
.report-chart-box {
  position: relative;
  height: 220px;
  width: 100%;
}
.report-chart-box-tall {
  height: 280px;
}
.report-table-wrap {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.report-table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.report-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.report-table th,
.report-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}
.report-table th {
  color: var(--muted);
  font-weight: 600;
  font-size: 12px;
}
.report-table tr.is-cafe-row td:first-child {
  font-weight: 700;
}
.badge-cafe {
  background: #e8f2ff;
  color: #1b64da;
  border: 1px solid #c9defe;
  font-size: 11px;
  font-weight: 700;
  margin-right: 4px;
}
.badge-date {
  background: var(--surface-2);
  color: var(--subtle);
}

.list-export-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.list-export-bar .btn {
  flex: 0 0 auto;
}
.today-new-jump {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-3);
  transition: padding 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.today-new-jump-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.today-new-jump-text strong {
  font-size: 13px;
}
.today-new-count {
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
}
.today-new-count small {
  margin-left: 2px;
  font-size: 12px;
  font-weight: 600;
}
.today-new-cta {
  font-size: 12px;
  color: var(--blue-deep);
  font-weight: 600;
}
.today-new-jump.is-hot {
  padding: 16px 16px;
  border-color: rgba(49, 130, 246, 0.45);
  background: linear-gradient(135deg, rgba(49, 130, 246, 0.16), rgba(3, 178, 108, 0.1));
  box-shadow: 0 8px 22px rgba(49, 130, 246, 0.18);
  animation: today-new-pulse 2.2s ease-in-out infinite;
}
.today-new-jump.is-hot .today-new-jump-text strong {
  font-size: 15px;
}
.today-new-jump.is-hot .today-new-count {
  font-size: 28px;
  line-height: 1.1;
  color: var(--blue);
  letter-spacing: -0.02em;
}
.today-new-jump.is-hot .today-new-count small {
  font-size: 14px;
  color: var(--blue-deep);
}
.btn-sm {
  padding: 8px 12px;
  font-size: 13px;
  white-space: nowrap;
}
.btn-lg {
  padding: 14px 18px;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  border-radius: 12px;
  box-shadow: var(--glow-blue);
}
@keyframes today-new-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.015); }
}

/** 당일 신규 매물 카드 — 작성일(posted_at)이 오늘인 경우만. 발견일·백필 제외 */
@keyframes listing-today-breathe {
  0%, 100% {
    transform: scale(1);
    box-shadow:
      0 0 0 0 rgba(49, 130, 246, 0.55),
      0 8px 22px rgba(49, 130, 246, 0.16);
    border-color: #3182f6;
  }
  50% {
    transform: scale(1.055);
    box-shadow:
      0 0 0 10px rgba(49, 130, 246, 0.12),
      0 18px 40px rgba(49, 130, 246, 0.28);
    border-color: #1b64da;
  }
}
.listing-card.is-today-new {
  position: relative;
  z-index: 2;
  border: 2px solid #3182f6;
  background: linear-gradient(165deg, #e8f2ff 0%, #ffffff 42%, #ffffff 100%);
  animation: listing-today-breathe 1.15s ease-in-out infinite;
  will-change: transform, box-shadow;
}
.listing-card.is-today-new:hover {
  animation-play-state: paused;
  transform: scale(1.03);
  border-color: #1b64da;
}
.badge-today-new {
  background: #3182f6 !important;
  color: #fff !important;
  border-color: #3182f6 !important;
  font-weight: 800;
  letter-spacing: -0.02em;
  animation: today-badge-blink 1.15s ease-in-out infinite;
}
@keyframes today-badge-blink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.82; transform: scale(1.08); }
}
.today-new-ribbon {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 6px 8px;
  text-align: center;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(90deg, #1b64da, #3182f6 50%, #69a6ff);
  letter-spacing: -0.02em;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .today-new-jump.is-hot { animation: none; }
  .listing-card.is-today-new,
  .badge-today-new {
    animation: none;
  }
  .sidebar-brand-top .brand-logo {
    animation: none;
  }
}
.stat-link {
  cursor: pointer;
  position: relative;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.stat-link:hover,
.stat-link:focus-visible {
  border-color: var(--blue);
  outline: none;
}
.stat-go {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--blue);
  font-weight: 600;
}
.today-card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}
.btn-today-fav,
.btn-today-skip {
  width: 100%;
  padding: 12px 10px;
  font-size: 14px;
  font-weight: 700;
  border-radius: 12px;
}
.btn-today-skip {
  color: var(--subtle);
  border-color: var(--line);
}
.listing-card.is-leaving {
  opacity: 0;
  transform: translateX(12px) scale(0.98);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}
@media (max-width: 560px) {
  .today-card-actions {
    grid-template-columns: 1fr;
  }
}
.export-textarea {
  width: 100%;
  min-height: 280px;
  resize: vertical;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.55;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-3);
  color: var(--text);
  white-space: pre-wrap;
}
.export-actions {
  margin-top: 12px;
}
#export-status {
  margin-top: 8px;
  color: var(--success);
}

@media (max-width: 900px) {
  .report-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .report-chart-box {
    height: 200px;
  }
  .report-chart-box-tall {
    height: 240px;
  }
}
