:root {
  --ink: #10233e;
  --muted: #66758a;
  --line: #dfe9f4;
  --paper: #ffffff;
  --canvas: #f5f9fd;
  --navy: #123b67;
  --blue: #1d78d3;
  --cyan: #2dc8d7;
  --shadow: 0 18px 55px rgba(20, 62, 103, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 8% 2%, rgba(45, 200, 215, 0.12), transparent 27rem),
    radial-gradient(circle at 92% 18%, rgba(29, 120, 211, 0.1), transparent 25rem),
    var(--canvas);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  transition:
    background 220ms ease,
    color 220ms ease;
}

body.dark-theme {
  --ink: #edf6ff;
  --muted: #9db0c4;
  --line: #2b4158;
  --paper: #15283d;
  --canvas: #091522;
  --navy: #71aee8;
  --blue: #58aaf3;
  --cyan: #47d4de;
  --shadow: 0 18px 55px rgba(0, 0, 0, 0.28);
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

[hidden] {
  display: none !important;
}

.site-shell {
  width: min(100% - 32px, 720px);
  margin: 0 auto;
  padding: 20px 0 36px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding: 10px 14px;
  border: 1px solid rgba(220, 232, 244, 0.88);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 40px rgba(21, 63, 103, 0.07);
  backdrop-filter: blur(18px);
}

.dark-theme .topbar {
  border-color: rgba(65, 88, 111, 0.7);
  background: rgba(18, 36, 54, 0.86);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 1.06rem;
  font-weight: 800;
  letter-spacing: -0.035em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 13px;
  background: linear-gradient(145deg, var(--cyan), var(--blue) 58%, var(--navy));
  box-shadow: 0 8px 22px rgba(29, 120, 211, 0.24);
  color: white;
  font-size: 1.08rem;
  font-weight: 900;
  transform: skew(-7deg);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 11px;
  border-radius: 999px;
  background: #edf8f5;
  color: #21765f;
  font-size: 0.72rem;
  font-weight: 750;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #25b689;
  box-shadow: 0 0 0 4px rgba(37, 182, 137, 0.12);
}

.theme-button {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--paper);
  color: var(--muted);
  cursor: pointer;
}

.theme-button svg {
  grid-area: 1 / 1;
  width: 17px;
  height: 17px;
}

.sun-icon,
.dark-theme .moon-icon {
  display: none;
}

.dark-theme .sun-icon {
  display: block;
}

.hero {
  padding: 54px 4px 32px;
  text-align: center;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 14px;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-kicker svg {
  width: 16px;
  height: 16px;
}

.hero h1 {
  max-width: 600px;
  margin: 0 auto;
  font-size: clamp(2.15rem, 8vw, 3.5rem);
  line-height: 1.02;
  letter-spacing: -0.055em;
}

.hero p {
  max-width: 520px;
  margin: 16px auto 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.7;
}

.checker {
  padding: 14px;
  border: 1px solid rgba(218, 231, 243, 0.92);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.dark-theme .checker {
  border-color: rgba(60, 84, 108, 0.78);
  background: rgba(17, 34, 51, 0.9);
}

.package-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 5px;
  border-radius: 18px;
  background: #edf3f8;
}

.dark-theme .package-tabs {
  background: #0d1e2f;
}

.package-tabs button {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: #65768b;
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 750;
}

.package-tabs button.active {
  background: var(--paper);
  box-shadow: 0 6px 18px rgba(27, 67, 103, 0.1);
  color: var(--blue);
}

.package-tabs svg {
  width: 17px;
  height: 17px;
}

.search-box {
  position: relative;
  display: flex;
  min-height: 58px;
  align-items: center;
  margin-top: 12px;
  border: 1.5px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
  color: #8795a8;
}

.search-box:focus-within {
  border-color: rgba(29, 120, 211, 0.65);
  box-shadow: 0 0 0 5px rgba(29, 120, 211, 0.09);
}

.search-box > svg {
  flex: 0 0 auto;
  margin-left: 17px;
}

.search-box input {
  width: 100%;
  min-width: 0;
  padding: 16px 48px 16px 12px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 0.93rem;
}

.search-box input::placeholder {
  color: #9aa7b7;
}

.search-box input::-webkit-search-cancel-button {
  display: none;
}

.clear-search {
  position: absolute;
  right: 11px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #edf3f8;
  color: #65758a;
  cursor: pointer;
  font-size: 1.15rem;
}

.dark-theme .clear-search {
  background: #243c53;
  color: #c3d3e2;
}

.area-filters {
  display: flex;
  overflow-x: auto;
  gap: 7px;
  padding: 12px 1px 2px;
  scrollbar-width: none;
}

.area-filters::-webkit-scrollbar {
  display: none;
}

.area-filters button {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 750;
}

.area-filters button.active {
  border-color: var(--blue);
  background: rgba(29, 120, 211, 0.1);
  color: var(--blue);
}

.result-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 25px 4px 12px;
}

.eyebrow {
  display: block;
  margin-bottom: 4px;
  color: var(--blue);
  font-size: 0.67rem;
  font-weight: 850;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.result-heading h2 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.result-count {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 650;
}

.result-list {
  display: grid;
  gap: 8px;
}

.area-card {
  display: grid;
  width: 100%;
  min-height: 76px;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid #e5edf5;
  border-radius: 18px;
  background: var(--paper);
  box-shadow: 0 4px 18px rgba(26, 66, 103, 0.045);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.dark-theme .area-card {
  border-color: #29425a;
  box-shadow: none;
}

.area-icon {
  display: grid;
  width: 43px;
  height: 43px;
  place-items: center;
  border-radius: 14px;
}

.area-icon svg {
  width: 20px;
  height: 20px;
}

.area-1 {
  background: #e9f5ff;
  color: #2584dd;
}

.area-2 {
  background: #ebf9f4;
  color: #1b9a72;
}

.area-3 {
  background: #fff5df;
  color: #d58a16;
}

.area-4 {
  background: #f3ebff;
  color: #8055c9;
}

.area-copy {
  min-width: 0;
}

.area-copy h3 {
  overflow: hidden;
  margin: 0;
  font-size: 0.9rem;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.area-copy p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.7rem;
}

.area-badge {
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  white-space: nowrap;
}

.badge-1 {
  background: #e9f5ff;
  color: #247bc7;
}

.badge-2 {
  background: #ebf9f4;
  color: #177e60;
}

.badge-3 {
  background: #fff5df;
  color: #a8650a;
}

.badge-4 {
  background: #f3ebff;
  color: #6f42b3;
}

.card-arrow {
  color: #a7b3c0;
  font-size: 1.25rem;
}

.show-all {
  min-height: 48px;
  margin-top: 4px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: transparent;
  color: var(--blue);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 800;
}

.empty-state {
  padding: 42px 20px;
  border: 1px dashed var(--line);
  border-radius: 20px;
  text-align: center;
}

.empty-state h3 {
  margin: 0;
  font-size: 0.95rem;
}

.empty-state p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.update-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 14px;
  padding: 15px;
  border: 1px solid rgba(32, 157, 116, 0.14);
  border-radius: 18px;
  background: rgba(233, 249, 244, 0.72);
}

.dark-theme .update-note {
  border-color: rgba(77, 195, 157, 0.24);
  background: rgba(32, 110, 86, 0.13);
}

.note-icon {
  display: grid;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 11px;
  background: #dff5ed;
  color: #168260;
}

.note-icon svg {
  width: 17px;
  height: 17px;
  stroke-width: 2.3;
}

.update-note strong {
  display: block;
  font-size: 0.76rem;
}

.update-note p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.55;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 26px 4px 0;
  color: #7b8999;
  font-size: 0.68rem;
}

.modal-backdrop {
  position: fixed;
  z-index: 50;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  inset: 0;
  padding: 14px;
  background: rgba(4, 18, 32, 0.55);
  backdrop-filter: blur(7px);
}

.result-modal {
  position: relative;
  width: min(100%, 460px);
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--paper);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.28);
  color: var(--ink);
  text-align: center;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(119, 139, 159, 0.13);
  color: var(--muted);
  cursor: pointer;
  font-size: 1.25rem;
}

.modal-area-icon {
  display: grid;
  width: 54px;
  height: 54px;
  margin: 3px auto 14px;
  place-items: center;
  border-radius: 18px;
}

.modal-area-icon svg {
  width: 24px;
  height: 24px;
}

.modal-eyebrow {
  color: var(--blue);
  font-size: 0.67rem;
  font-weight: 850;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.result-modal h2 {
  margin: 8px 0 0;
  font-size: 1.3rem;
}

.modal-package {
  margin: 5px 0 18px;
  color: var(--muted);
  font-size: 0.78rem;
}

.modal-area-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-radius: 16px;
  text-align: left;
}

.box-1 {
  background: #e9f5ff;
  color: #247bc7;
}

.box-2 {
  background: #ebf9f4;
  color: #177e60;
}

.box-3 {
  background: #fff5df;
  color: #a8650a;
}

.box-4 {
  background: #f3ebff;
  color: #6f42b3;
}

.modal-help {
  margin: 16px 8px 20px;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.6;
}

.modal-primary {
  width: 100%;
  min-height: 49px;
  border: 0;
  border-radius: 15px;
  background: linear-gradient(135deg, var(--blue), #1264b2);
  color: white;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 800;
}

.sr-only {
  position: absolute;
  overflow: hidden;
  width: 1px;
  height: 1px;
  padding: 0;
  border: 0;
  margin: -1px;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

@media (max-width: 420px) {
  .site-shell {
    width: min(100% - 22px, 720px);
    padding-top: 11px;
  }

  .topbar {
    min-height: 56px;
    border-radius: 18px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 11px;
  }

  .status-pill {
    display: none;
  }

  .hero {
    padding: 46px 3px 27px;
  }

  .hero h1 {
    font-size: clamp(2rem, 10vw, 2.65rem);
  }

  .hero p {
    font-size: 0.9rem;
  }

  .checker {
    padding: 10px;
    border-radius: 23px;
  }

  .package-tabs button {
    min-height: 46px;
    font-size: 0.78rem;
  }

  .area-card {
    min-height: 72px;
    gap: 9px;
    padding: 10px;
    border-radius: 16px;
  }

  .area-icon {
    width: 40px;
    height: 40px;
  }

  .area-copy h3 {
    font-size: 0.82rem;
  }

  .area-badge {
    padding: 6px 8px;
    font-size: 0.64rem;
  }

  footer {
    flex-direction: column;
    gap: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}
