:root {
  --blue-50: #eff6ff;
  --blue-100: #dbeafe;
  --blue-200: #bfdbfe;
  --blue-500: #3b82f6;
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --surface: #ffffff;
  --background: #f4f7fb;
  --danger: #ef4444;
  --shadow: 0 16px 44px rgba(15, 23, 42, 0.12);
  color-scheme: light;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
  background: var(--background);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.65;
}

body.modal-open { overflow: hidden; }

button, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }

.site-shell { width: min(1100px, calc(100% - 32px)); margin: 24px auto 52px; }
.hero { overflow: hidden; background: #fff; border-radius: 16px; box-shadow: 0 3px 18px rgba(15, 23, 42, .08); }
.hero__banner { display: block; width: 100%; max-height: 410px; object-fit: cover; }

.top-nav {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  margin: 18px 0;
  padding: 0 14px;
  background: #fff;
  border: 1px solid #e8edf5;
  border-radius: 12px;
  box-shadow: 0 3px 15px rgba(15, 23, 42, .07);
}

.nav-item {
  position: relative;
  min-height: 60px;
  border: 0;
  background: transparent;
  color: #4b5563;
  cursor: pointer;
  font-weight: 600;
}

.nav-item:hover { color: var(--blue-600); }
.nav-item.is-active { color: var(--blue-600); }
.nav-item.is-active::after {
  content: "";
  position: absolute;
  right: 22%; bottom: 0; left: 22%;
  height: 3px;
  border-radius: 4px 4px 0 0;
  background: var(--blue-600);
}

.card { margin-top: 18px; padding: 24px 28px; background: #fff; border: 1px solid #e8edf5; border-radius: 14px; box-shadow: 0 4px 18px rgba(15, 23, 42, .06); }
.section-heading { margin-bottom: 8px; border-left: 4px solid var(--blue-600); }
.section-heading span, .section-label {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 7px 18px;
  border-radius: 0 9px 9px 0;
  background: var(--blue-600);
  color: #fff;
  font-weight: 700;
}

.info-row { display: flex; align-items: flex-start; gap: 14px; padding: 13px 6px; border-bottom: 1px solid #eef2f7; }
.info-row:last-child { border-bottom: 0; }
.label-pill { flex: 0 0 auto; min-width: 78px; padding: 3px 10px; border: 1px solid var(--blue-200); border-radius: 7px; background: var(--blue-50); color: var(--blue-700); text-align: center; }
.info-row a { color: var(--blue-600); text-decoration: none; }
.info-row .customer-service-link { color: #ef4444; }
.info-row a:hover { text-decoration: underline; }

.selector-row { display: flex; align-items: flex-start; gap: 24px; margin-bottom: 22px; border-left: 4px solid var(--blue-600); }
.section-label { flex: 0 0 122px; justify-content: center; border-radius: 0 9px 9px 0; }
.select { position: relative; width: min(480px, calc(100% - 146px)); }
.select__trigger {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; min-height: 46px; padding: 9px 16px;
  border: 1px solid #cbd5e1; border-radius: 9px;
  background: #fff; color: #374151; text-align: left; cursor: pointer;
  transition: border-color .18s, box-shadow .18s;
}
.select__trigger:hover, .select__trigger[aria-expanded="true"] { border-color: var(--blue-500); box-shadow: 0 0 0 3px rgba(59, 130, 246, .12); }
.select__placeholder { color: #9ca3af; }
.chevron { width: 10px; height: 10px; margin-left: 12px; border-right: 2px solid #9ca3af; border-bottom: 2px solid #9ca3af; transform: rotate(45deg) translateY(-3px); transition: transform .18s; }
.select__trigger[aria-expanded="true"] .chevron { transform: rotate(225deg) translate(-2px, -1px); }
.select__panel {
  position: absolute; z-index: 20; top: calc(100% + 10px); left: 0;
  width: 100%; overflow: hidden; border: 1px solid #dbe2ec; border-radius: 10px;
  background: #fff; box-shadow: var(--shadow);
}
.select__panel::before { content: ""; position: absolute; top: -6px; left: 44%; width: 11px; height: 11px; border-left: 1px solid #dbe2ec; border-top: 1px solid #dbe2ec; background: #fff; transform: rotate(45deg); }
.select__search-wrap { position: relative; z-index: 1; padding: 12px; border-bottom: 1px solid #edf1f6; background: #fff; }
.select__search { width: 100%; height: 40px; padding: 8px 12px; border: 1px solid #d4dbe5; border-radius: 7px; outline: none; }
.select__search:focus { border-color: var(--blue-500); box-shadow: 0 0 0 3px rgba(59, 130, 246, .11); }
.select__list { max-height: 318px; margin: 0; padding: 7px; overflow-y: auto; list-style: none; }
.country-option { padding: 9px 12px; border-radius: 7px; cursor: pointer; color: #4b5563; }
.country-option:hover, .country-option:focus { background: var(--blue-50); color: var(--blue-700); outline: none; }
.select__panel--empty { padding: 18px; color: #8b919c; text-align: center; }
.select__panel--empty p { margin: 0; }

.section-heading--records { margin-top: 30px; }
.table-wrap { width: 100%; overflow-x: auto; border: 1px solid #e5eaf1; border-radius: 9px; }
table { width: 100%; min-width: 650px; border-collapse: collapse; }
th, td { padding: 14px; border-bottom: 1px solid #e8edf4; text-align: center; }
th { background: #f8fafc; color: #596170; font-weight: 700; }
.empty-cell { height: 96px; color: #9ca3af; }
.price-note, .tip-note { margin-top: 16px; padding: 13px 16px; border-radius: 8px; }
.price-note { background: var(--blue-50); color: var(--blue-700); }
.price-note strong { color: var(--danger); }
.tip-note { background: #fff8e8; color: #9a6700; }

.primary-btn, .secondary-btn {
  min-height: 44px; padding: 10px 24px; border-radius: 8px; cursor: pointer; font-weight: 700; transition: transform .16s, background .16s, box-shadow .16s;
}
.primary-btn { border: 1px solid var(--blue-600); background: var(--blue-600); color: #fff; box-shadow: 0 7px 18px rgba(37, 99, 235, .2); }
.primary-btn:hover { background: var(--blue-700); transform: translateY(-1px); }
.secondary-btn { border: 1px solid var(--blue-200); background: var(--blue-50); color: var(--blue-700); }
.secondary-btn:hover { border-color: var(--blue-500); }
.primary-btn--wide { width: 100%; margin-top: 18px; }

.modal-layer {
  position: fixed; z-index: 1000; inset: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 24px; background: rgba(15, 23, 42, .58); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
}
.modal-layer[hidden] { display: none; }
.modal-layer--agreement { z-index: 1200; }
.agreement-modal {
  display: flex; flex-direction: column; width: min(1180px, 96vw); height: min(900px, 94vh);
  overflow: hidden; border: 1px solid rgba(255,255,255,.75); border-radius: 20px; background: rgba(255,255,255,.98); box-shadow: 0 30px 90px rgba(0,0,0,.28);
}
.agreement-header { flex: 0 0 auto; padding: 26px 30px 22px; border-bottom: 1px solid var(--line); text-align: center; }
.agreement-header h1 { margin: 0; color: #161b24; font-size: clamp(27px, 3vw, 40px); line-height: 1.25; }
.agreement-header p { margin: 10px 0 0; color: #8a9099; font-size: clamp(14px, 1.5vw, 18px); }
.agreement-content { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 30px 54px 44px; outline: none; color: #424851; font-size: clamp(15px, 1.4vw, 18px); line-height: 1.95; overscroll-behavior: contain; }
.agreement-content h2 { margin: 25px 0 12px; color: #20252e; font-size: 1.18em; }
.agreement-content h2:first-child { margin-top: 0; }
.agreement-content p { margin: 0 0 16px; text-align: justify; }
.agreement-footer { flex: 0 0 auto; min-height: 122px; padding: 20px 28px 24px; border-top: 1px solid var(--line); background: rgba(255,255,255,.99); text-align: center; }
.agreement-footer strong, .agreement-footer span { display: block; }
.agreement-footer strong { color: var(--danger); font-size: clamp(24px, 3vw, 34px); line-height: 1.25; }
.agreement-footer span { margin-top: 5px; color: var(--muted); }
.agree-btn { min-width: 250px; margin-top: 7px; border-radius: 999px; font-size: 18px; }

.dialog { width: min(560px, 94vw); overflow: hidden; border-radius: 14px; background: #fff; box-shadow: 0 26px 75px rgba(0,0,0,.25); }
.dialog--notice { width: min(640px, 94vw); }
.dialog--auth { width: min(620px, 94vw); }
.dialog__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 23px 28px 18px; border-bottom: 1px solid var(--line); }
.dialog__header h2 { margin: 0; font-size: 25px; }
.dialog__eyebrow { display: block; margin-bottom: 2px; color: var(--blue-600); font-size: 13px; font-weight: 700; letter-spacing: .08em; }
.icon-close { width: 36px; height: 36px; padding: 0; border: 0; background: transparent; color: #8b929d; cursor: pointer; font-size: 31px; font-weight: 300; line-height: 1; }
.icon-close:hover { color: var(--blue-600); }
.dialog__body { padding: 26px 28px; }
.notice-copy { color: #555d69; font-size: 18px; line-height: 1.85; }
.dialog__footer { display: flex; justify-content: flex-end; padding: 0 28px 22px; }

.auth-form { display: grid; gap: 17px; padding: 25px 28px 28px; }
.auth-form[hidden] { display: none; }
.auth-form label { display: grid; grid-template-columns: 92px 1fr; align-items: center; gap: 10px; color: #4b5563; font-weight: 600; }
.auth-form input { width: 100%; height: 46px; padding: 10px 13px; border: 1px solid #d6dce5; border-radius: 8px; outline: none; color: #28303c; }
.auth-form input:focus { border-color: var(--blue-500); box-shadow: 0 0 0 3px rgba(59,130,246,.11); }
.auth-form input.is-invalid { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(239,68,68,.1); }
.form-message { min-height: 24px; margin: -5px 0 0 102px; color: var(--danger); font-size: 14px; }
.form-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 2px; }
.register-success { padding: 36px 28px; text-align: center; }
.register-success[hidden] { display: none; }
.success-icon { display: grid; place-items: center; width: 62px; height: 62px; margin: 0 auto; border-radius: 50%; background: var(--blue-600); color: #fff; font-size: 34px; }
.register-success h3 { margin: 15px 0 2px; font-size: 26px; }
.register-success p { margin: 0 0 20px; color: var(--muted); }

@media (max-width: 680px) {
  .site-shell { width: min(100% - 20px, 1100px); margin-top: 10px; }
  .hero { border-radius: 11px; }
  .top-nav { padding: 0 2px; overflow-x: auto; }
  .nav-item { min-width: 80px; min-height: 52px; font-size: 14px; }
  .card { padding: 18px 14px; }
  .info-row { gap: 9px; font-size: 14px; }
  .info-row--intro { flex-direction: column; }
  .selector-row { gap: 12px; }
  .section-label { flex-basis: 98px; padding: 7px 10px; font-size: 14px; }
  .select { width: calc(100% - 110px); }
  .agreement-modal { width: 100%; height: 96vh; border-radius: 14px; }
  .agreement-header { padding: 20px 15px 16px; }
  .agreement-content { padding: 22px 20px 30px; font-size: 15px; }
  .agreement-footer { min-height: 114px; padding: 17px 14px 20px; }
  .modal-layer { padding: 10px; }
  .auth-form label { grid-template-columns: 1fr; gap: 5px; }
  .form-message { margin-left: 0; }
  .form-actions { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
