:root {
  --bg: #f4f1ea;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-strong: rgba(255, 255, 255, 0.94);
  --text: #1d2433;
  --muted: #596176;
  --line: rgba(29, 36, 51, 0.12);
  --brand: #0f766e;
  --brand-strong: #115e59;
  --accent: #c96f32;
  --shadow: 0 24px 80px rgba(31, 41, 55, 0.12);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 16px;
  --container: 1180px;
}

body[data-theme="shopping"] {
  --brand: #0b6e4f;
  --brand-strong: #0a5b42;
  --accent: #db7c2f;
}

body[data-theme="news"] {
  --brand: #0f4c81;
  --brand-strong: #123e66;
  --accent: #cf5f3d;
}

body[data-theme="finance"] {
  --brand: #155e75;
  --brand-strong: #134e5e;
  --accent: #ca6b3a;
}

body[data-theme="ai"] {
  --brand: #7c3aed;
  --brand-strong: #6d28d9;
  --accent: #e85d75;
}

body[data-theme="medic"] {
  --brand: #0d9488;
  --brand-strong: #0f766e;
  --accent: #e04e6a;
}

body[data-theme="travel"] {
  --brand: #2563eb;
  --brand-strong: #1d4ed8;
  --accent: #f59e0b;
}

/* ── AI Pros/Cons ── */
.ai-pros-cons {
  margin-top: 14px;
  display: grid;
  gap: 8px;
}

.ai-detail {
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.52);
  border: 1px solid rgba(29, 36, 51, 0.06);
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--muted);
}

.ai-detail strong {
  color: var(--text);
  font-size: 0.9rem;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI Variable", "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, color-mix(in srgb, var(--brand) 18%, transparent), transparent 32%),
    radial-gradient(circle at top right, color-mix(in srgb, var(--accent) 16%, transparent), transparent 26%),
    linear-gradient(180deg, #fcfaf6 0%, var(--bg) 58%, #ece7df 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.16) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.58), transparent 88%);
  opacity: 0.35;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
p {
  margin: 0;
}

.shell {
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(244, 241, 234, 0.76);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(29, 36, 51, 0.08);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-mark {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 10px 30px color-mix(in srgb, var(--brand) 18%, transparent);
  background: white;
  flex: none;
}

.brand-copy strong {
  display: block;
  font-size: 1.05rem;
  letter-spacing: 0.12em;
}

.brand-copy span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.92rem;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.nav a {
  padding: 8px 12px;
  font-size: 0.93rem;
  border-radius: 999px;
  color: var(--muted);
  transition: background-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.nav a:hover,
.nav a:focus-visible,
.nav a.active {
  background: color-mix(in srgb, var(--brand) 10%, white);
  color: var(--brand-strong);
  transform: translateY(-1px);
  outline: none;
}

main {
  padding: 38px 0 72px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.9fr);
  gap: 28px;
  align-items: stretch;
}

.hero-panel,
.hero-side,
.section-box,
.category-card,
.resource-card,
.spotlight,
.footer-card,
.notice-card {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.66);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.hero-panel {
  border-radius: var(--radius-xl);
  padding: 42px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.hero-panel::after {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  right: -80px;
  bottom: -100px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--brand) 24%, transparent), transparent 68%);
  z-index: -1;
}

.eyebrow,
.tag,
.section-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.eyebrow {
  background: color-mix(in srgb, var(--brand) 10%, white);
  color: var(--brand-strong);
}

.section-kicker,
.tag {
  background: color-mix(in srgb, var(--accent) 12%, white);
  color: color-mix(in srgb, var(--accent) 76%, black);
}

.hero-panel h1 {
  max-width: 11ch;
  margin-top: 22px;
  font-size: clamp(2.8rem, 7vw, 5.2rem);
  line-height: 0.94;
  letter-spacing: -0.06em;
}

.hero-panel p,
.search-card p,
.section-head p,
.resource-card p,
.spotlight p,
.footer-card p,
.notice-card p,
.category-card p {
  color: var(--muted);
  line-height: 1.68;
}

.hero-panel p {
  max-width: 56ch;
  margin-top: 18px;
}

.hero-actions,
.link-list,
.quick-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-actions {
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 22px;
  border-radius: 999px;
  font: inherit;
  border: 0;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-2px);
  outline: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand) 0%, color-mix(in srgb, var(--brand) 70%, #20c2b4) 100%);
  color: white;
  box-shadow: 0 16px 40px color-mix(in srgb, var(--brand) 26%, transparent);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  border: 1px solid rgba(29, 36, 51, 0.08);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 34px;
}

.hero-stat {
  padding: 18px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(29, 36, 51, 0.07);
  border-radius: 18px;
}

.hero-stat strong {
  display: block;
  font-size: 1.6rem;
  letter-spacing: -0.04em;
}

.hero-stat span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.92rem;
}

.hero-side {
  border-radius: var(--radius-xl);
  padding: 28px;
  display: grid;
  gap: 18px;
}

.search-card,
.notice-card {
  padding: 22px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, rgba(245, 242, 236, 0.94) 100%);
  border: 1px solid rgba(29, 36, 51, 0.08);
}

.search-card h2,
.section-head h2,
.resource-card h2,
.spotlight h2,
.notice-card h2 {
  font-size: 1.15rem;
  letter-spacing: -0.03em;
}

.search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-top: 18px;
}

.search-form input {
  width: 100%;
  min-height: 52px;
  padding: 0 18px;
  border-radius: 16px;
  border: 1px solid rgba(29, 36, 51, 0.12);
  background: white;
  font: inherit;
  color: var(--text);
}

.search-form input:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--brand) 32%, white);
  outline-offset: 2px;
}

.quick-pills {
  margin-top: 14px;
}

.quick-pills a,
.link-list a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(29, 36, 51, 0.08);
  background: rgba(255, 255, 255, 0.82);
  transition: transform 180ms ease, border-color 180ms ease, color 180ms ease, background-color 180ms ease;
}

.quick-pills a {
  background: color-mix(in srgb, var(--brand) 8%, white);
  color: var(--brand-strong);
}

.quick-pills a:hover,
.quick-pills a:focus-visible,
.link-list a:hover,
.link-list a:focus-visible {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--brand) 24%, white);
  color: var(--brand-strong);
  outline: none;
}

.mini-list {
  display: grid;
  gap: 14px;
}

.mini-item {
  display: grid;
  gap: 6px;
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(29, 36, 51, 0.07);
}

.mini-item strong {
  font-size: 1rem;
  letter-spacing: -0.03em;
}

.mini-item span {
  color: var(--muted);
  font-size: 0.94rem;
}

.section {
  margin-top: 34px;
}

.section-box {
  border-radius: var(--radius-xl);
  padding: 30px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 22px;
}

.section-head p {
  max-width: 62ch;
  margin-top: 8px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.category-card,
.resource-card,
.spotlight,
.footer-card {
  border-radius: 24px;
  padding: 24px;
}

.category-card {
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.category-card:hover,
.category-card:focus-within {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--brand) 22%, white);
  box-shadow: 0 26px 60px rgba(31, 41, 55, 0.14);
}

.category-card h3 {
  margin-top: 16px;
  font-size: 1.35rem;
  letter-spacing: -0.04em;
}

.category-card p {
  margin-top: 10px;
  font-size: 0.96rem;
}

.resource-grid,
.footer-grid {
  display: grid;
  gap: 18px;
}

.resource-grid {
  grid-template-columns: 1.15fr 0.85fr;
}

.footer-grid {
  grid-template-columns: 1fr 1fr;
  margin-top: 18px;
}

.resource-card ul,
.spotlight ul {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
  display: grid;
  gap: 12px;
}

.resource-card li,
.spotlight li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.resource-card li:last-child,
.spotlight li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.resource-card li span,
.spotlight li span {
  color: var(--muted);
  font-size: 0.9rem;
  flex: none;
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  animation: rise 700ms ease forwards;
}

.delay-1 { animation-delay: 120ms; }
.delay-2 { animation-delay: 220ms; }
.delay-3 { animation-delay: 320ms; }
.delay-4 { animation-delay: 420ms; }

@keyframes rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Locale Selector (fixed bottom-right widget) ── */
#locale-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
}

.locale-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid rgba(29, 36, 51, 0.12);
  background: rgba(255, 255, 255, 0.95);
  font: inherit;
  font-size: 0.92rem;
  cursor: pointer;
  transition: background-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
  white-space: nowrap;
  color: var(--text);
  font-weight: 600;
  box-shadow: 0 4px 20px rgba(31, 41, 55, 0.15);
}

.locale-btn:hover,
.locale-btn:focus-visible {
  background: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(31, 41, 55, 0.2);
  outline: none;
}

.locale-name {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.locale-dropdown {
  display: none;
  position: absolute;
  bottom: calc(100% + 10px);
  right: 0;
  z-index: 10000;
  min-width: 210px;
  max-height: 420px;
  overflow-y: auto;
  padding: 8px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(29, 36, 51, 0.1);
  box-shadow: 0 16px 48px rgba(31, 41, 55, 0.2);
  backdrop-filter: blur(18px);
}

.locale-dropdown.open {
  display: grid;
  gap: 2px;
}

.locale-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 14px;
  border: none;
  border-radius: 10px;
  background: transparent;
  font: inherit;
  font-size: 0.92rem;
  cursor: pointer;
  text-align: left;
  transition: background-color 120ms ease;
}

.locale-option:hover,
.locale-option:focus-visible {
  background: rgba(0, 0, 0, 0.05);
  outline: none;
}

.locale-option.active {
  background: color-mix(in srgb, var(--brand) 14%, white);
  color: var(--brand-strong);
  font-weight: 600;
}

@media (max-width: 1080px) {
  .hero,
  .resource-grid,
  .footer-grid,
  .category-grid {
    grid-template-columns: 1fr 1fr;
  }

  .hero {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .topbar-inner,
  .section-head {
    flex-direction: column;
    align-items: start;
  }

  .hero-panel,
  .hero-side,
  .section-box,
  .resource-card,
  .spotlight,
  .footer-card,
  .category-card,
  .notice-card,
  .search-card {
    border-radius: 24px;
  }

  .hero-panel {
    padding: 30px;
  }

  .hero-stats,
  .category-grid,
  .resource-grid,
  .footer-grid,
  .search-form {
    grid-template-columns: 1fr;
  }

  .nav {
    justify-content: flex-start;
  }

  #locale-widget {
    bottom: 16px;
    right: 16px;
  }
}

/* ===== Ad slots (2026-04-12) ===== */
.promo-box {
  margin: 16px 0;
  border-radius: 16px;
  border: 1px dashed rgba(120, 130, 160, 0.45);
  background: linear-gradient(135deg, rgba(240, 245, 255, 0.6), rgba(250, 240, 245, 0.4));
  overflow: hidden;
}
.promo-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  text-decoration: none;
  color: #2a2a3a;
  flex-wrap: wrap;
}
.promo-link:hover {
  background: rgba(255, 255, 255, 0.55);
}
.promo-tag {
  display: inline-block;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  background: #ffb74d;
  color: #402a00;
  border-radius: 4px;
}
.promo-title {
  font-weight: 700;
  font-size: 15px;
}
.promo-desc {
  font-size: 13px;
  color: #555;
  margin-left: auto;
}
.promo-top {
  min-height: 90px;
}
.promo-bottom {
  min-height: 110px;
  margin-top: 24px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}
.promo-bottom .promo-link {
  flex-direction: column;
  text-align: center;
  padding: 20px;
}
.promo-bottom .promo-desc {
  margin-left: 0;
}
@media (max-width: 640px) {
  .promo-desc {
    margin-left: 0;
    width: 100%;
  }
}
