:root {
  --bg-0: #f6f1e6;
  --bg-1: #efe5d2;
  --card: rgba(255, 252, 246, 0.82);
  --line: rgba(36, 33, 24, 0.16);
  --ink: #1e1b14;
  --muted: #625845;
  --accent: #b04a27;
  --accent-2: #006f6f;
  --ok: #2f6f3f;
  --shadow: 0 16px 30px rgba(43, 34, 20, 0.1);
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  color: var(--ink);
  background: var(--bg-0);
  scroll-behavior: smooth;
}

body {
  font-family: "Noto Serif SC", serif;
  min-height: 100vh;
  position: relative;
}

body[data-lang="vi"] {
  font-family: "Be Vietnam Pro", sans-serif;
}

body[data-lang="ko"] {
  font-family: "Noto Sans KR", sans-serif;
}

.bg-layer {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(1300px 500px at -5% 8%, rgba(160, 99, 53, 0.2), transparent 70%),
    radial-gradient(1000px 480px at 95% 0%, rgba(0, 111, 111, 0.18), transparent 67%),
    linear-gradient(180deg, var(--bg-1) 0%, var(--bg-0) 40%, #fffefb 100%);
  z-index: -2;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(12px);
  background: rgba(250, 247, 238, 0.84);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 10px clamp(12px, 2vw, 24px);
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  font-weight: 700;
  background: linear-gradient(135deg, #f4e6cc, #f0f8f8);
}

.logo-name {
  font-size: 16px;
  font-weight: 700;
}

.logo-sub {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.nav-link {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
  border-radius: 999px;
  padding: 8px 12px;
}

.nav-link:hover,
.nav-link.active {
  background: rgba(176, 74, 39, 0.12);
  color: var(--ink);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lang-switch {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}

.lang-btn {
  border: 0;
  background: transparent;
  padding: 7px 10px;
  cursor: pointer;
  color: var(--muted);
}

.lang-btn.active {
  background: var(--ink);
  color: #fff;
}

main {
  width: min(1240px, 95vw);
  margin: 0 auto 60px;
}

.section {
  margin-top: 28px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(16px, 2vw, 24px);
  animation: rise 0.45s ease both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

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

.hero {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 18px;
}

.hero-main {
  padding: 8px 6px;
}

.eyebrow {
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 12px;
  color: var(--accent-2);
  margin: 2px 0;
}

.hero h1 {
  margin: 6px 0;
  font-size: clamp(30px, 4.6vw, 58px);
  line-height: 1.05;
}

.hero-subtitle {
  font-size: clamp(18px, 2.4vw, 26px);
  margin: 8px 0;
}

.hero-desc {
  color: var(--muted);
  margin: 0;
  line-height: 1.65;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.btn {
  border: 1px solid var(--line);
  background: #fffcf5;
  color: var(--ink);
  border-radius: 12px;
  font: inherit;
  padding: 9px 14px;
  cursor: pointer;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(140deg, #b04a27, #c95a2f);
  border-color: transparent;
  color: #fff;
}

.hero-side {
  background: linear-gradient(160deg, rgba(0, 111, 111, 0.08), rgba(176, 74, 39, 0.08));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
}

.field-label {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 8px;
}

.search-input,
.ai-controls input,
.ai-controls select,
.ai-controls textarea,
.filters select {
  width: 100%;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font: inherit;
}

.search-result {
  margin-top: 8px;
  min-height: 28px;
  color: var(--muted);
  font-size: 14px;
}

.section-head h2 {
  margin: 0 0 8px;
  font-size: clamp(22px, 2vw, 28px);
}

.section-head p {
  margin: 0;
  color: var(--muted);
}

.country-tabs {
  display: flex;
  gap: 8px;
  margin: 12px 0 0;
}

.country-tab {
  border-radius: 999px;
  border: 1px solid var(--line);
  padding: 6px 12px;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
}

.country-tab.active {
  background: #1e1b14;
  color: #fff;
}

.card-grid {
  margin-top: 12px;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.route-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card .tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  background: rgba(0, 111, 111, 0.1);
  color: #035858;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
}

.card h3,
.card h4 {
  margin: 0;
  line-height: 1.4;
}

.card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.card .meta {
  font-size: 12px;
  color: var(--muted);
}

.fallback {
  color: #8a4f00;
  background: #fff3db;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 11px;
}

.partner-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.partner-cell {
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 14px;
  text-align: center;
  color: var(--muted);
}

.filters {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.filters label span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
}

.hint {
  color: var(--muted);
  font-size: 13px;
  margin: 8px 0 0;
}

.split-layout {
  margin-top: 12px;
  display: grid;
  gap: 12px;
  grid-template-columns: 1.4fr 1fr;
}

.map-panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px;
  background: #fff;
}

.map-canvas {
  position: relative;
  min-height: 420px;
  border-radius: 12px;
  background:
    radial-gradient(90px 90px at 20% 40%, rgba(0, 111, 111, 0.26), transparent 70%),
    radial-gradient(130px 80px at 70% 48%, rgba(176, 74, 39, 0.24), transparent 72%),
    linear-gradient(170deg, #d8eee6 0%, #d4e8ef 45%, #f4ebdc 100%);
  overflow: hidden;
}

.map-canvas::before {
  content: "";
  position: absolute;
  inset: 14% 11% 16% 8%;
  border-radius: 38% 45% 43% 40% / 45% 38% 48% 44%;
  border: 1px solid rgba(22, 22, 22, 0.16);
  opacity: 0.35;
}

.pin {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid #fff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.22);
  cursor: pointer;
  transform: translate(-50%, -50%);
}

.pin.active {
  background: var(--accent-2);
  width: 18px;
  height: 18px;
}

.detail-panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 14px;
  min-height: 340px;
}

.detail-panel h3 {
  margin: 0 0 8px;
}

.detail-panel p {
  color: var(--muted);
  line-height: 1.55;
}

.detail-block {
  margin-top: 10px;
}

.detail-block h4 {
  margin: 0 0 4px;
  font-size: 14px;
}

.timeline {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.timeline-step {
  padding: 8px 10px;
  border-left: 3px solid var(--accent-2);
  background: #f8fcfc;
  border-radius: 8px;
}

.ai-layout {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 12px;
}

.ai-chat,
.ai-controls {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 12px;
}

.ai-messages {
  min-height: 330px;
  max-height: 420px;
  overflow: auto;
  padding-right: 4px;
}

.msg {
  margin-bottom: 10px;
  border-radius: 10px;
  padding: 9px 10px;
  font-size: 14px;
  line-height: 1.55;
}

.msg.user {
  background: #fff3ed;
  border: 1px solid rgba(176, 74, 39, 0.2);
}

.msg.bot {
  background: #edf8f8;
  border: 1px solid rgba(0, 111, 111, 0.2);
}

.ai-tip {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}

.ai-controls {
  display: grid;
  gap: 8px;
}

.ai-controls label span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 13px;
}

.service-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.service-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 12px;
}

.service-card h3 {
  margin: 0 0 7px;
}

.service-card p {
  margin: 0;
  color: var(--muted);
}

.about-grid {
  margin-top: 12px;
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr 1fr;
}

.about-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 12px;
}

.about-card h3 {
  margin: 0 0 8px;
}

.about-card p {
  margin: 0 0 10px;
  color: var(--muted);
}

.about-card a {
  color: var(--accent-2);
  font-weight: 600;
}

.audit-board {
  display: grid;
  gap: 8px;
}

.audit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
}

.audit-bar {
  flex: 1;
  height: 10px;
  border-radius: 999px;
  background: #f0ece2;
  overflow: hidden;
}

.audit-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--ok));
}

.footer {
  width: min(1240px, 95vw);
  margin: 14px auto 40px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

@media (max-width: 1100px) {
  .route-grid,
  .partner-grid,
  .service-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero,
  .split-layout,
  .ai-layout,
  .about-grid {
    grid-template-columns: 1fr;
  }

  .map-canvas {
    min-height: 260px;
  }
}

@media (max-width: 760px) {
  .main-nav {
    display: none;
  }

  .section {
    border-radius: 12px;
  }

  .filters,
  .card-grid,
  .route-grid,
  .service-grid,
  .partner-grid {
    grid-template-columns: 1fr;
  }

  .hero-cta {
    flex-direction: column;
  }
}
