:root {
  --bg-1: #051022;
  --bg-2: #081a38;
  --bg-3: #0b244f;
  --ink: #eef4ff;
  --ink-soft: #b5c5e9;
  --accent: #3bc7ff;
  --accent-2: #ffbf66;
  --glass: rgba(8, 19, 43, 0.56);
  --stroke: rgba(154, 189, 255, 0.22);
  --shadow: 0 26px 72px rgba(2, 8, 25, 0.42);
}

* {
  box-sizing: border-box;
}

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

body {
  font-family: "Space Grotesk", "Noto Sans SC", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 18%, rgba(87, 164, 255, 0.2), transparent 36%),
    radial-gradient(circle at 78% 86%, rgba(16, 255, 214, 0.14), transparent 42%),
    linear-gradient(145deg, var(--bg-1), var(--bg-2) 52%, var(--bg-3));
  overflow: hidden;
}

body.theme-day {
  --bg-1: #aee4ff;
  --bg-2: #84d0ff;
  --bg-3: #5bbdf8;
  --ink: #0f315b;
  --ink-soft: #315b88;
  --glass: rgba(216, 239, 255, 0.6);
  --stroke: rgba(23, 74, 136, 0.5);
  --shadow: 0 18px 48px rgba(36, 95, 156, 0.22);
  background:
    radial-gradient(circle at 14% 18%, rgba(80, 178, 255, 0.38), transparent 34%),
    radial-gradient(circle at 80% 86%, rgba(74, 233, 255, 0.3), transparent 42%),
    linear-gradient(145deg, var(--bg-1), var(--bg-2) 52%, var(--bg-3));
}

body.login-page {
  min-height: 100vh;
  overflow: auto;
}

#app {
  position: relative;
  width: 100vw;
  height: 100vh;
}

.login-shell {
  min-height: 100vh;
  padding: 28px 16px;
  display: grid;
  place-items: center;
}

.login-card {
  width: min(460px, 100%);
  border-radius: 22px;
  padding: 28px 28px 24px;
}

.login-card .eyebrow,
.login-title,
.login-subtitle {
  text-align: center;
}

.login-title {
  margin: 8px 0 0;
  font-size: clamp(32px, 7vw, 46px);
  letter-spacing: 0.12em;
}

.login-subtitle {
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.5;
}

.login-logo {
  width: 82px;
  height: 82px;
  display: block;
  margin: 22px auto 0;
  border-radius: 18px;
  object-fit: contain;
  box-shadow: 0 14px 30px rgba(3, 10, 24, 0.34);
}

.login-form {
  margin-top: 24px;
  display: grid;
  gap: 14px;
}

.login-input {
  width: 100%;
  min-height: 56px;
  padding: 0 18px;
  border-radius: 14px;
  border: 1px solid rgba(150, 200, 255, 0.28);
  background: rgba(6, 17, 41, 0.74);
  color: var(--ink);
  font: inherit;
  font-size: 24px;
  text-align: center;
  outline: none;
}

.login-input::placeholder {
  color: rgba(194, 211, 242, 0.5);
}

.login-input:focus {
  border-color: rgba(134, 218, 255, 0.74);
  box-shadow: 0 0 0 2px rgba(70, 179, 255, 0.18);
}

.login-submit {
  min-height: 54px;
  border-radius: 14px;
  border: 1px solid rgba(154, 212, 255, 0.5);
  background: linear-gradient(145deg, rgba(39, 114, 187, 0.82), rgba(20, 66, 119, 0.88));
  color: #f4fbff;
  font: inherit;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition:
    transform 180ms ease,
    filter 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.login-submit:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
  border-color: rgba(180, 228, 255, 0.82);
  box-shadow: 0 14px 28px rgba(3, 10, 24, 0.26);
}

.login-error {
  min-height: 24px;
  margin: 0;
  text-align: center;
  color: #ff9cab;
  font-size: 16px;
}

#globe-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
}

.vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at center, transparent 36%, rgba(0, 0, 0, 0.45) 100%),
    linear-gradient(to bottom, rgba(3, 8, 20, 0.3), rgba(3, 8, 20, 0.6));
}

body.theme-day .vignette {
  background:
    radial-gradient(circle at center, transparent 48%, rgba(104, 177, 236, 0.18) 100%),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.04), rgba(133, 189, 239, 0.14));
}

.glass {
  backdrop-filter: blur(14px);
  background: linear-gradient(148deg, rgba(12, 24, 56, 0.7), var(--glass));
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
}

.top-bar.glass,
.panel.glass {
  backdrop-filter: blur(20px) saturate(165%);
  background: linear-gradient(148deg, rgba(12, 24, 56, 0.6), rgba(8, 19, 43, 0.4));
  border-color: rgba(136, 181, 246, 0.3);
}

body.theme-day .glass {
  backdrop-filter: blur(16px) saturate(165%);
  background: linear-gradient(146deg, rgba(244, 252, 255, 0.56), rgba(198, 226, 249, 0.38));
  border-color: rgba(22, 76, 139, 0.54);
  border-width: 0.85px;
  box-shadow:
    0 14px 36px rgba(55, 119, 181, 0.2),
    inset 0 0 0 1px rgba(18, 67, 124, 0.18);
}

body.theme-day .top-bar.glass,
body.theme-day .panel.glass {
  backdrop-filter: blur(24px) saturate(200%);
  background: linear-gradient(146deg, rgba(244, 252, 255, 0.42), rgba(182, 218, 246, 0.24));
  border-color: rgba(18, 72, 134, 0.62);
  border-width: 0.8px;
  box-shadow:
    0 14px 36px rgba(55, 119, 181, 0.24),
    inset 0 0 0 1px rgba(16, 63, 118, 0.24);
}

.top-bar {
  position: absolute;
  left: 24px;
  right: 24px;
  top: 22px;
  border-radius: 18px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  animation: rise-in 0.75s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.top-actions > [hidden] {
  display: none !important;
}

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

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

.brand-logo {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  object-fit: contain;
  flex-shrink: 0;
  box-shadow: 0 8px 18px rgba(3, 10, 26, 0.3);
}

.brand h1 {
  margin: 2px 0 0;
  font-size: clamp(19px, 2.35vw, 27px);
  letter-spacing: 0.065em;
}

html[lang="zh-CN"] .brand h1 {
  letter-spacing: 0.168em;
}

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

.icon-button {
  border: 1px solid rgba(169, 212, 255, 0.35);
  background: linear-gradient(165deg, rgba(44, 78, 143, 0.82), rgba(9, 22, 52, 0.88));
  color: var(--ink);
  width: 42px;
  height: 42px;
  min-width: 42px;
  padding: 0;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.icon-button:hover {
  transform: translateY(-1px);
  border-color: rgba(196, 227, 255, 0.62);
  box-shadow: 0 10px 26px rgba(5, 10, 26, 0.38);
}

.icon-button:active {
  transform: translateY(0);
}

.action-chip-button {
  width: auto;
  min-width: 86px;
  padding: 0 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.action-chip-button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.language-icon {
  width: 24px;
  height: 24px;
  display: block;
  flex-shrink: 0;
  opacity: 0.98;
}

.theme-fab {
  position: absolute;
  left: 24px;
  top: calc(122px + 56px + 12px);
  bottom: auto;
  width: 56px;
  height: 56px;
  min-width: 56px;
  border-radius: 14px;
  padding: 0;
  border: 1px solid var(--stroke);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    top 320ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 220ms ease,
    box-shadow 220ms ease,
    border-color 220ms ease;
  z-index: 3;
}

.search-panel:not(.is-collapsed) ~ .theme-fab {
  top: calc(122px + 170px + 12px);
}

.view-mode-fab {
  top: calc(122px + 56px + 12px + 56px + 10px);
}

.search-panel:not(.is-collapsed) ~ .view-mode-fab {
  top: calc(122px + 170px + 12px + 56px + 10px);
}

.theme-fab.glass {
  background: linear-gradient(152deg, rgba(28, 54, 109, 0.06), rgba(9, 21, 51, 0.03));
}

.theme-fab.glass:hover {
  background: linear-gradient(152deg, rgba(34, 65, 126, 0.12), rgba(12, 26, 62, 0.07));
}

.search-panel.is-collapsed.glass {
  background: linear-gradient(152deg, rgba(28, 54, 109, 0.06), rgba(9, 21, 51, 0.03));
}

.search-panel.is-collapsed.glass:hover {
  background: linear-gradient(152deg, rgba(34, 65, 126, 0.12), rgba(12, 26, 62, 0.07));
}

.theme-fab:hover {
  transform: translateY(-1px);
  border-color: rgba(175, 211, 255, 0.7);
}

.theme-icon {
  position: absolute;
  width: 32px;
  height: 32px;
  transition: opacity 220ms ease, transform 260ms ease;
}

.theme-icon-moon {
  opacity: 0.95;
  transform: scale(1) rotate(0deg);
}

.theme-icon-sun {
  opacity: 0;
  transform: scale(0.84) rotate(-18deg);
}

body.theme-day .theme-icon-moon,
body.theme-day-red .theme-icon-moon {
  opacity: 0;
  transform: scale(0.84) rotate(18deg);
}

body.theme-day .theme-icon-sun,
body.theme-day-red .theme-icon-sun {
  opacity: 0.96;
  transform: scale(1) rotate(0deg);
}

.view-icon {
  position: absolute;
  width: 29px;
  height: 29px;
  transition: opacity 220ms ease, transform 260ms ease;
}

.view-icon-globe {
  opacity: 0.95;
  transform: scale(1) rotate(0deg);
}

.view-icon-map {
  opacity: 0;
  transform: scale(0.84) rotate(-14deg);
}

body.view-flat .view-icon-globe {
  opacity: 0;
  transform: scale(0.84) rotate(14deg);
}

body.view-flat .view-icon-map {
  opacity: 0.96;
  transform: scale(1) rotate(0deg);
}

.panel {
  position: absolute;
  border-radius: 18px;
  padding: 16px;
  animation: rise-in 0.75s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.search-panel {
  top: 122px;
  left: 24px;
  width: min(440px, calc(100vw - 48px));
  min-height: 170px;
  height: auto;
  overflow: hidden;
  transition:
    width 320ms cubic-bezier(0.16, 1, 0.3, 1),
    height 320ms cubic-bezier(0.16, 1, 0.3, 1),
    min-height 320ms cubic-bezier(0.16, 1, 0.3, 1),
    padding 320ms cubic-bezier(0.16, 1, 0.3, 1),
    border-radius 260ms ease;
}

.search-panel.is-collapsed {
  width: 56px;
  height: 56px;
  min-height: 56px;
  padding: 0;
  border-radius: 14px;
}

.search-toggle {
  position: absolute;
  z-index: 2;
  right: 10px;
  top: 10px;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  border: 1px solid rgba(165, 214, 255, 0.28);
  background: rgba(10, 24, 58, 0.42);
  color: #bde3ff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    transform 220ms ease,
    border-color 220ms ease,
    background 220ms ease,
    opacity 170ms ease;
}

.search-toggle:hover {
  transform: translateY(-1px);
  border-color: rgba(177, 228, 255, 0.58);
  background: rgba(16, 33, 76, 0.56);
}

.search-toggle-icon {
  width: 19px;
  height: 19px;
  display: block;
}

.search-panel:not(.is-collapsed) .search-toggle {
  opacity: 0;
  pointer-events: none;
}

.search-panel.is-collapsed .search-toggle {
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: inherit;
  background: transparent;
}

.search-panel.is-collapsed .search-toggle:hover {
  transform: none;
  background: rgba(20, 40, 88, 0.24);
}

.search-panel.is-collapsed .search-toggle-icon {
  width: 30px;
  height: 30px;
}

.search-panel-content {
  position: relative;
  z-index: 1;
  overflow: hidden;
  max-height: 240px;
  opacity: 1;
  transform: translateY(0) scale(1);
  transition: opacity 200ms ease, transform 260ms ease, max-height 280ms ease;
  transition-delay: 70ms;
}

.search-panel.is-collapsed .search-panel-content {
  max-height: 0;
  opacity: 0;
  transform: translateY(8px) scale(0.98);
  pointer-events: none;
  transition-delay: 0ms;
}

.search-panel label {
  display: block;
  font-size: 13px;
  color: var(--ink-soft);
  margin-bottom: 8px;
  padding-right: 0;
}

.search-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.search-row input {
  flex: 1;
  border: 1px solid rgba(173, 207, 255, 0.3);
  background: rgba(6, 14, 36, 0.7);
  color: var(--ink);
  padding: 12px 14px;
  border-radius: 12px;
  font: inherit;
  outline: none;
  transition: border-color 220ms ease, box-shadow 220ms ease, transform 220ms ease;
}

.search-row input:focus {
  border-color: rgba(99, 218, 255, 0.82);
  box-shadow: 0 0 0 4px rgba(63, 166, 255, 0.2);
}

.search-row button {
  border: none;
  border-radius: 14px;
  padding: 0;
  background: linear-gradient(130deg, #33beff, #2580ff);
  color: #eef8ff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 220ms ease, filter 220ms ease, box-shadow 220ms ease;
}

#search-button {
  width: 52px;
  height: 52px;
  min-width: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 26px rgba(16, 133, 255, 0.25);
}

#search-button .locate-icon {
  width: 29px;
  height: 29px;
  display: block;
}

.search-row button:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow: 0 12px 28px rgba(16, 133, 255, 0.33);
}

body.theme-day .search-row input {
  border-color: rgba(101, 164, 226, 0.4);
  border-width: 0.85px;
  background: rgba(234, 247, 255, 0.94);
  color: #17345c;
}

body.theme-day .search-row input::placeholder {
  color: rgba(42, 72, 111, 0.74);
}

body.theme-day .search-row input:focus {
  border-color: rgba(63, 140, 229, 0.88);
  box-shadow: 0 0 0 4px rgba(79, 167, 255, 0.2);
}

body.theme-day .hint,
body.theme-day .status-message,
body.theme-day .eyebrow,
body.theme-day .coords-line,
body.theme-day .result-panel h2,
body.theme-day .search-panel label {
  color: #48698f;
}

body.theme-day .selected-location,
body.theme-day .coords-line strong,
body.theme-day .country-name {
  color: #17365f;
}

body.theme-day .country-chip {
  border-color: rgba(33, 96, 162, 0.42);
  border-width: 0.85px;
  background: linear-gradient(132deg, rgba(218, 238, 255, 0.86), rgba(202, 229, 252, 0.95));
}

body.theme-day .country-chip:hover {
  border-color: rgba(29, 109, 189, 0.72);
  background: linear-gradient(132deg, rgba(227, 244, 255, 0.95), rgba(211, 235, 255, 0.99));
}

body.theme-day .distance {
  color: #2f84d1;
}

body.theme-day .country-chip.is-selected {
  border-color: rgba(33, 117, 194, 0.82);
  background: linear-gradient(132deg, rgba(205, 232, 255, 0.98), rgba(183, 219, 251, 0.98));
  box-shadow:
    0 0 0 1px rgba(33, 118, 195, 0.2),
    inset 0 0 0 1px rgba(23, 92, 162, 0.16);
}

body.theme-day .chip-check {
  border-color: rgba(49, 123, 194, 0.48);
  background: rgba(216, 237, 255, 0.9);
  color: #1f6fbc;
}

body.theme-day .country-chip.is-selected .chip-check {
  border-color: rgba(35, 114, 189, 0.82);
  background: rgba(77, 170, 255, 0.18);
  color: #1c6bb7;
}

body.theme-day .country-info-panel.glass {
  border-color: rgba(33, 96, 162, 0.42);
  border-width: 0.85px;
  background: linear-gradient(132deg, rgba(218, 238, 255, 0.86), rgba(202, 229, 252, 0.95));
}

body.theme-day .country-info-card {
  border-color: rgba(158, 189, 222, 0.72);
  background: #fff;
}

body.theme-day .country-info-country,
body.theme-day .country-info-summary,
body.theme-day .country-info-row dd {
  color: #1d4674;
}

body.theme-day .country-info-toggle-bar {
  color: #4f739b;
}

body.theme-day .country-info-toggle-bar::before {
  background: rgba(130, 170, 205, 0.5);
}

body.theme-day .country-info-toggle-icon {
  background: linear-gradient(180deg, rgba(213, 230, 245, 0.98), rgba(188, 213, 236, 0.96));
  color: #3e638d;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

body.theme-day .country-info-toggle-bar:hover {
  color: #2f5f92;
}

body.theme-day .country-info-panel h2,
body.theme-day .country-info-row dt {
  color: #4f739b;
}

body.theme-day .quote-button {
  border-color: rgba(27, 94, 161, 0.62);
  background: linear-gradient(144deg, rgba(94, 190, 255, 0.95), rgba(54, 136, 229, 0.96));
  color: #f7fcff;
}

body.theme-day .icon-button,
body.theme-day .theme-fab,
body.theme-day .search-toggle,
body.theme-day .selection-toggle,
body.theme-day .country-info-close {
  background: linear-gradient(152deg, rgba(232, 247, 255, 0.74), rgba(193, 226, 252, 0.7));
  border-color: rgba(23, 84, 148, 0.62);
  border-width: 0.8px;
  color: #1a4f82;
  box-shadow: inset 0 0 0 1px rgba(16, 69, 124, 0.18);
}

body.theme-day .icon-button:hover,
body.theme-day .theme-fab:hover,
body.theme-day .search-toggle:hover,
body.theme-day .selection-toggle:hover,
body.theme-day .country-info-close:hover {
  border-color: rgba(19, 95, 176, 0.76);
  background: linear-gradient(152deg, rgba(241, 252, 255, 0.82), rgba(205, 234, 255, 0.78));
}

body.theme-day .theme-fab.glass {
  background: linear-gradient(152deg, rgba(232, 247, 255, 0.1), rgba(193, 226, 252, 0.07));
}

body.theme-day .theme-fab.glass:hover {
  background: linear-gradient(152deg, rgba(241, 252, 255, 0.18), rgba(205, 234, 255, 0.12));
}

body.theme-day .search-panel.is-collapsed.glass {
  background: linear-gradient(152deg, rgba(232, 247, 255, 0.1), rgba(193, 226, 252, 0.07));
}

body.theme-day .search-panel.is-collapsed.glass:hover {
  background: linear-gradient(152deg, rgba(241, 252, 255, 0.18), rgba(205, 234, 255, 0.12));
}

body.theme-day #search-button {
  background: linear-gradient(135deg, #31c3ff, #1f92ff);
  border: 0.8px solid rgba(22, 92, 162, 0.72);
  color: #f7fcff;
  box-shadow:
    0 10px 24px rgba(25, 128, 222, 0.28),
    inset 0 0 0 1px rgba(193, 231, 255, 0.24);
}

body.theme-day-red {
  --bg-1: #fcfdff;
  --bg-2: #fdfeff;
  --bg-3: #ffffff;
  --ink: #5d1a21;
  --ink-soft: #82353d;
  --glass: rgba(184, 24, 39, 1);
  --stroke: rgba(132, 17, 27, 0.5);
  --shadow: 0 18px 40px rgba(109, 20, 30, 0.22);
  background:
    linear-gradient(
      160deg,
      rgba(165, 14, 30, 0.63) 0%,
      rgba(150, 12, 28, 0.56) 10%,
      rgba(176, 22, 40, 0.14) 18%,
      rgba(255, 255, 255, 0) 32%
    ),
    linear-gradient(180deg, var(--bg-1) 40%, var(--bg-2) 72%, var(--bg-3));
}

body.theme-day-red .vignette {
  background:
    linear-gradient(
      to bottom,
      rgba(152, 12, 26, 0.098) 0%,
      rgba(180, 20, 36, 0.035) 8%,
      rgba(255, 255, 255, 0) 18%
    ),
    radial-gradient(circle at center, transparent 64%, rgba(150, 30, 44, 0.0028) 100%);
}

body.theme-day-red .glass {
  backdrop-filter: blur(16px) saturate(194%);
  background: #a12438;
  border-color: rgba(136, 21, 30, 0.54);
  border-width: 0.8px;
  box-shadow:
    0 14px 34px rgba(120, 21, 30, 0.22),
    inset 0 0 0 1px rgba(108, 16, 25, 0.18);
}

body.theme-day-red .top-bar.glass,
body.theme-day-red .panel.glass {
  backdrop-filter: blur(24px) saturate(200%);
  border-color: rgba(127, 16, 25, 0.64);
  border-width: 0.75px;
  box-shadow:
    0 14px 36px rgba(117, 18, 30, 0.26),
    inset 0 0 0 1px rgba(103, 13, 22, 0.22);
}

body.theme-day-red .top-bar.glass {
  background: linear-gradient(
    90deg,
    rgba(149, 35, 55, 1) 0%,
    rgba(149, 35, 55, 0.9) 28%,
    rgba(149, 35, 55, 0.7) 50%,
    rgba(149, 35, 55, 0.9) 72%,
    rgba(149, 35, 55, 1) 100%
  );
}

body.theme-day-red .panel.glass {
  background: #a62b40;
}

body.theme-day-red .search-panel.glass,
body.theme-day-red .result-panel.glass {
  backdrop-filter: blur(30px) saturate(230%);
  background: rgba(166, 43, 64, 0.7);
}

body.theme-day-red .top-bar .eyebrow {
  color: rgba(255, 234, 235, 0.9);
}

body.theme-day-red .top-bar h1 {
  color: #fff7f5;
  text-shadow: 0 2px 8px rgba(91, 10, 21, 0.22);
}

body.theme-day-red .brand-logo {
  box-shadow: 0 8px 18px rgba(115, 14, 26, 0.28);
}

body.theme-day-red .search-row input {
  border-color: rgba(219, 107, 121, 0.52);
  border-width: 0.8px;
  background: rgba(90, 8, 19, 0.74);
  color: rgba(255, 250, 248, 0.96);
}

body.theme-day-red .search-row input::placeholder {
  color: rgba(255, 224, 228, 0.78);
}

body.theme-day-red .search-row input:focus {
  border-color: rgba(188, 35, 47, 0.86);
  box-shadow: 0 0 0 4px rgba(196, 40, 53, 0.22);
}

body.theme-day-red .hint,
body.theme-day-red .status-message,
body.theme-day-red .eyebrow,
body.theme-day-red .coords-line,
body.theme-day-red .result-panel h2,
body.theme-day-red .search-panel label {
  color: rgba(255, 231, 235, 0.9);
}

body.theme-day-red .selected-location,
body.theme-day-red .coords-line strong,
body.theme-day-red .country-name {
  color: rgba(255, 248, 247, 0.98);
}

body.theme-day-red .country-chip {
  border-color: rgba(218, 99, 114, 0.42);
  border-width: 0.8px;
  background: rgba(106, 8, 21, 0.92);
}

body.theme-day-red .country-chip:hover {
  border-color: rgba(236, 131, 144, 0.62);
  background: rgba(126, 10, 26, 0.96);
}

body.theme-day-red .distance {
  color: rgba(255, 228, 231, 0.9);
}

body.theme-day-red .country-chip.is-selected {
  border-color: rgba(255, 168, 178, 0.72);
  background: rgba(136, 13, 31, 0.98);
  box-shadow:
    0 0 0 1px rgba(236, 133, 147, 0.18),
    inset 0 0 0 1px rgba(228, 120, 135, 0.16);
}

body.theme-day-red .chip-check {
  border-color: rgba(236, 152, 165, 0.48);
  background: rgba(132, 12, 29, 0.78);
  color: rgba(255, 241, 243, 0.95);
}

body.theme-day-red .country-chip.is-selected .chip-check {
  border-color: rgba(255, 186, 195, 0.82);
  background: rgba(244, 154, 166, 0.24);
}

body.theme-day-red .country-info-panel.glass {
  backdrop-filter: blur(30px) saturate(230%);
  border-color: rgba(127, 16, 25, 0.64);
  border-width: 0.75px;
  background: rgba(166, 43, 64, 0.7);
}

body.theme-day-red .country-info-card {
  border-color: rgba(214, 188, 190, 0.72);
  background: #fff;
}

body.theme-day-red .country-info-country,
body.theme-day-red .country-info-summary,
body.theme-day-red .country-info-row dd {
  color: #5b1d28;
}

body.theme-day-red .country-info-toggle-bar {
  color: #8f4250;
}

body.theme-day-red .country-info-toggle-bar::before {
  background: rgba(171, 112, 124, 0.46);
}

body.theme-day-red .country-info-toggle-icon {
  background: linear-gradient(180deg, rgba(241, 223, 227, 0.98), rgba(228, 199, 206, 0.96));
  color: #81414d;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

body.theme-day-red .country-info-toggle-bar:hover {
  color: #7c3441;
}

body.theme-day-red .country-info-panel h2,
body.theme-day-red .country-info-row dt {
  color: rgba(255, 231, 235, 0.9);
}

body.theme-day-red .country-info-row dt {
  color: #8f4250;
}

body.theme-day-red .quote-button {
  border-color: rgba(150, 26, 41, 0.78);
  background: linear-gradient(144deg, rgba(203, 54, 74, 0.95), rgba(148, 20, 37, 0.98));
  color: #fff7f5;
}

body.theme-day-red .icon-button,
body.theme-day-red .theme-fab,
body.theme-day-red .search-toggle,
body.theme-day-red .selection-toggle,
body.theme-day-red .country-info-close {
  background: linear-gradient(152deg, rgba(238, 90, 104, 0.72), rgba(166, 22, 38, 0.78));
  border-color: rgba(132, 17, 27, 0.68);
  border-width: 0.8px;
  color: rgba(255, 246, 245, 0.96);
  box-shadow: inset 0 0 0 1px rgba(109, 14, 24, 0.2);
}

body.theme-day-red .icon-button:hover,
body.theme-day-red .theme-fab:hover,
body.theme-day-red .search-toggle:hover,
body.theme-day-red .selection-toggle:hover,
body.theme-day-red .country-info-close:hover {
  border-color: rgba(194, 34, 47, 0.8);
  background: linear-gradient(152deg, rgba(246, 104, 118, 0.78), rgba(177, 31, 47, 0.84));
}

body.theme-day-red .theme-fab.glass {
  background: linear-gradient(152deg, rgba(238, 90, 104, 0.08), rgba(166, 22, 38, 0.05));
  color: rgba(124, 38, 51, 0.94);
}

body.theme-day-red .theme-fab.glass:hover {
  background: linear-gradient(152deg, rgba(246, 104, 118, 0.16), rgba(177, 31, 47, 0.1));
  color: rgba(105, 28, 40, 0.98);
}

body.theme-day-red .search-panel.is-collapsed.glass {
  background: linear-gradient(152deg, rgba(238, 90, 104, 0.08), rgba(166, 22, 38, 0.05));
}

body.theme-day-red .search-panel.is-collapsed.glass:hover {
  background: linear-gradient(152deg, rgba(246, 104, 118, 0.16), rgba(177, 31, 47, 0.1));
}

body.theme-day-red .search-panel.is-collapsed .search-toggle {
  color: rgba(124, 38, 51, 0.94);
}

body.theme-day-red .search-panel.is-collapsed .search-toggle:hover {
  color: rgba(105, 28, 40, 0.98);
}

body.theme-day-red #search-button {
  background: linear-gradient(136deg, #ae2233, #810c1f);
  border: 0.8px solid rgba(118, 13, 24, 0.82);
  color: #fff8f0;
  box-shadow:
    0 10px 24px rgba(160, 22, 35, 0.38),
    inset 0 0 0 1px rgba(255, 222, 206, 0.28);
}

.hint {
  margin: 10px 0 2px;
  color: rgba(201, 218, 255, 0.84);
  font-size: 12px;
}

.result-panel {
  top: 122px;
  right: 24px;
  width: min(420px, calc(100vw - 48px));
  max-height: calc(100vh - 146px);
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  gap: 10px;
  overflow: hidden;
  transform-origin: top right;
  transition:
    opacity 240ms ease,
    transform 300ms cubic-bezier(0.16, 1, 0.3, 1),
    filter 240ms ease;
}

.result-panel.is-hidden {
  opacity: 0;
  transform: translateY(10px) scale(0.98);
  filter: saturate(0.85);
  pointer-events: none;
  visibility: hidden;
}

.coords-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  color: var(--ink-soft);
}

.coords-line strong {
  color: var(--ink);
  letter-spacing: 0.02em;
}

.selected-location {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #f7faff;
}

.selected-location-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.selected-location-row .selected-location {
  flex: 1;
  min-width: 0;
}

.selection-toggle {
  position: relative;
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 10px;
  border: 1px solid rgba(165, 214, 255, 0.3);
  background: linear-gradient(155deg, rgba(22, 42, 92, 0.78), rgba(8, 19, 46, 0.92));
  color: #d8efff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    opacity 180ms ease;
}

.selection-toggle:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(179, 229, 255, 0.62);
  background: linear-gradient(155deg, rgba(30, 56, 120, 0.86), rgba(11, 25, 58, 0.96));
}

.selection-toggle:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.selection-toggle-icon {
  position: absolute;
  width: 22px;
  height: 22px;
  transition: opacity 160ms ease, transform 180ms ease;
}

.selection-toggle-icon-clear {
  opacity: 0;
  transform: scale(0.9);
}

.selection-toggle.is-clear-all .selection-toggle-icon-select {
  opacity: 0;
  transform: scale(0.9);
}

.selection-toggle.is-clear-all .selection-toggle-icon-clear {
  opacity: 1;
  transform: scale(1);
}

.result-panel h2 {
  margin: 4px 0 0;
  font-size: 15px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #c7d8ff;
}

.nearby-list {
  list-style: none;
  margin: 0;
  padding: 2px 0 0;
  min-height: 0;
  overflow: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.nearby-list::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.country-info-floating {
  top: 122px;
  right: calc(24px + min(420px, calc(100vw - 48px)) + 14px);
  width: min(430px, calc(100vw - 520px));
  max-height: calc(100vh - 146px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  padding: 14px;
  z-index: 2;
  border-radius: 18px;
}

.country-info-panel.is-hidden {
  display: none;
}

.country-info-panel.glass {
  border-color: rgba(170, 201, 255, 0.18);
  background: linear-gradient(132deg, rgba(14, 27, 64, 0.72), rgba(9, 19, 46, 0.88));
}

.country-info-panel h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #c7d8ff;
}

.country-info-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.country-info-close {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 10px;
  border: 1px solid rgba(165, 214, 255, 0.3);
  background: linear-gradient(155deg, rgba(22, 42, 92, 0.78), rgba(8, 19, 46, 0.92));
  color: #d8efff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
  padding: 0;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.country-info-close:hover {
  transform: translateY(-1px);
  border-color: rgba(179, 229, 255, 0.62);
  background: linear-gradient(155deg, rgba(30, 56, 120, 0.86), rgba(11, 25, 58, 0.96));
}

.country-info-list {
  min-height: 0;
  max-height: none;
  overflow: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  display: grid;
  gap: 8px;
}

.country-info-list::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.country-info-card {
  border: 1px solid rgba(170, 201, 255, 0.24);
  border-radius: 10px;
  padding: 12px 12px;
  background: linear-gradient(132deg, rgba(14, 27, 64, 0.84), rgba(9, 19, 46, 0.94));
}

.country-info-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.country-info-country {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #e9f3ff;
}

.country-info-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.country-info-summary {
  margin: 0;
  font-size: 16px;
  line-height: 1.4;
  color: #e2eeff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
  display: none;
}

.country-info-toggle-bar {
  position: relative;
  width: 100%;
  height: 18px;
  margin-top: 8px;
  border-radius: 0;
  border: 0;
  background: transparent;
  color: #d6e9ff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: color 180ms ease, transform 180ms ease;
}

.country-info-toggle-bar::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  transform: translateY(-50%);
  background: rgba(151, 193, 248, 0.32);
  pointer-events: none;
}

.country-info-toggle-icon {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 1;
  width: 78px;
  height: 16px;
  display: block;
  color: #cfe4ff;
  background: linear-gradient(180deg, rgba(24, 44, 91, 0.98), rgba(14, 30, 64, 0.96));
  clip-path: polygon(0 0, 100% 0, 92% 100%, 8% 100%);
  transform: translate(-50%, 0);
  pointer-events: none;
}

.country-info-toggle-icon::before,
.country-info-toggle-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 8px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 170ms ease;
}

.country-info-toggle-icon::before {
  left: 50%;
  transform: translate(-85%, -50%) rotate(-42deg);
}

.country-info-toggle-icon::after {
  left: 50%;
  transform: translate(-15%, -50%) rotate(42deg);
}

.country-info-toggle-bar.is-collapsed .country-info-toggle-icon::before {
  transform: translate(-85%, -50%) rotate(42deg);
}

.country-info-toggle-bar.is-collapsed .country-info-toggle-icon::after {
  transform: translate(-15%, -50%) rotate(-42deg);
}

.country-info-toggle-bar:hover {
  transform: none;
}

.country-info-card.is-collapsed {
  padding-top: 11px;
  padding-bottom: 11px;
}

.country-info-card.is-collapsed .country-info-card-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  margin-bottom: 0;
}

.country-info-card.is-collapsed .country-info-summary {
  display: -webkit-box;
  line-height: 1.4;
  min-height: calc(1.4em * 2);
  padding-left: 4px;
  white-space: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.country-info-card.is-collapsed .country-info-country {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.country-info-card.is-collapsed .country-info-fields {
  display: none;
}

.country-info-card.is-collapsed .country-info-toggle-bar {
  margin-top: 8px;
}

.country-info-fields {
  margin: 0;
  display: grid;
  gap: 5px;
}

.country-info-row {
  display: grid;
  grid-template-columns: minmax(88px, 132px) minmax(0, 1fr);
  gap: 4px;
}

.country-info-row dt {
  margin: 0;
  color: #a4bfdf;
  font-size: 16px;
  line-height: 1.52;
}

.country-info-row dd {
  margin: 0;
  color: #e2eeff;
  font-size: 16px;
  line-height: 1.52;
  word-break: break-word;
  white-space: pre-wrap;
}

.country-item {
  margin-bottom: 8px;
  animation: reveal-up 460ms cubic-bezier(0.2, 0.9, 0.2, 1) both;
  animation-delay: var(--delay, 0ms);
}

.country-chip {
  width: 100%;
  border: 1px solid rgba(170, 201, 255, 0.18);
  border-radius: 12px;
  background: linear-gradient(132deg, rgba(14, 27, 64, 0.72), rgba(9, 19, 46, 0.88));
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 11px;
  cursor: pointer;
  transition: border-color 200ms ease, background 200ms ease, box-shadow 200ms ease;
}

.country-chip:hover {
  border-color: rgba(124, 223, 255, 0.58);
  background: linear-gradient(132deg, rgba(23, 42, 94, 0.84), rgba(11, 24, 59, 0.94));
  box-shadow: inset 0 0 0 1px rgba(124, 223, 255, 0.12);
}

.country-chip.is-selected {
  border-color: rgba(108, 227, 255, 0.88);
  background: linear-gradient(132deg, rgba(26, 52, 110, 0.9), rgba(14, 32, 72, 0.96));
  box-shadow:
    0 0 0 1px rgba(111, 220, 255, 0.22),
    inset 0 0 0 1px rgba(127, 233, 255, 0.2);
}

.country-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.flag {
  width: 22px;
  height: 16px;
  border-radius: 4px;
  object-fit: cover;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.22);
  flex-shrink: 0;
}

.country-name {
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.country-bri-tag {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 7px;
  border-radius: 999px;
  border: 1px solid rgba(130, 225, 255, 0.34);
  background: linear-gradient(145deg, rgba(36, 94, 170, 0.34), rgba(16, 42, 84, 0.54));
  color: #9fe0ff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  flex-shrink: 0;
}

.country-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.distance {
  color: #9ed8ff;
  font-size: 12px;
  letter-spacing: 0.01em;
  flex-shrink: 0;
}

.chip-check {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid rgba(146, 193, 255, 0.38);
  background: rgba(16, 34, 76, 0.75);
  color: rgba(231, 244, 255, 0.92);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  line-height: 1;
  opacity: 0;
  transform: scale(0.76);
  transition: opacity 180ms ease, transform 180ms ease, background 180ms ease;
}

.country-chip.is-selected .chip-check {
  opacity: 1;
  transform: scale(1);
  background: rgba(59, 199, 255, 0.24);
  border-color: rgba(120, 228, 255, 0.8);
}

.status-message {
  margin: 0;
  color: rgba(189, 222, 255, 0.86);
  font-size: 12px;
  min-height: 1.2em;
}

.result-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.result-footer .status-message {
  flex: 1;
}

.quote-button {
  border: 1px solid rgba(135, 190, 255, 0.5);
  background: linear-gradient(145deg, rgba(31, 118, 240, 0.85), rgba(20, 84, 185, 0.95));
  color: #f3fbff;
  height: 34px;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 180ms ease, filter 180ms ease, border-color 180ms ease, opacity 180ms ease;
  white-space: nowrap;
}

.quote-button.is-hidden {
  display: none;
}

.quote-button:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.05);
  border-color: rgba(160, 219, 255, 0.86);
}

.quote-button:disabled {
  opacity: 0.52;
  cursor: not-allowed;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes reveal-up {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1000px) {
  .login-card {
    padding: 24px 18px 20px;
  }

  .login-title {
    letter-spacing: 0.08em;
  }

  .login-input {
    font-size: 22px;
  }

  .top-bar {
    left: 14px;
    right: 14px;
    top: 14px;
    padding: 12px 14px;
  }

  .search-panel {
    left: 14px;
    right: 14px;
    top: 102px;
    width: auto;
    z-index: 5;
  }

  .theme-fab {
    left: 14px;
    top: calc(102px + 52px + 12px);
    bottom: auto;
    width: 52px;
    height: 52px;
    min-width: 52px;
    border-radius: 14px;
  }

  .search-panel:not(.is-collapsed) ~ .theme-fab {
    top: calc(102px + 170px + 12px);
  }

  .view-mode-fab {
    top: calc(102px + 52px + 12px + 52px + 10px);
  }

  .search-panel:not(.is-collapsed) ~ .view-mode-fab {
    top: calc(102px + 170px + 12px + 52px + 10px);
  }

  .search-panel.is-collapsed {
    width: 52px;
    height: 52px;
    min-height: 52px;
    right: auto;
    z-index: 6;
  }

  .result-panel {
    left: 14px;
    right: 14px;
    top: auto;
    bottom: 14px;
    width: auto;
    max-height: 47vh;
  }

  .country-info-floating {
    left: 14px;
    right: 14px;
    top: 102px;
    width: auto;
    max-height: min(36vh, 340px);
  }

  .brand h1 {
    font-size: 19px;
  }

  .brand-logo {
    width: 42px;
    height: 42px;
    border-radius: 9px;
  }
}

@media (max-width: 640px) {
  .brand h1 {
    font-size: 17px;
  }

  .brand {
    gap: 10px;
  }

  .brand-logo {
    width: 36px;
    height: 36px;
    border-radius: 8px;
  }

  .eyebrow {
    font-size: 10px;
  }

  .icon-button {
    width: 38px;
    min-width: 38px;
    height: 38px;
    border-radius: 10px;
  }

  .result-footer {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .quote-button {
    height: 32px;
    padding: 0 12px;
  }

  .theme-fab {
    top: calc(102px + 48px + 12px);
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 13px;
  }

  .search-panel:not(.is-collapsed) ~ .theme-fab {
    top: calc(102px + 170px + 12px);
  }

  .view-mode-fab {
    top: calc(102px + 48px + 12px + 48px + 10px);
  }

  .search-panel:not(.is-collapsed) ~ .view-mode-fab {
    top: calc(102px + 170px + 12px + 48px + 10px);
  }

  .theme-icon {
    width: 30px;
    height: 30px;
  }

  .country-info-floating {
    max-height: min(34vh, 300px);
  }

  .country-info-panel h2 {
    font-size: 18px;
  }

  .country-info-country {
    font-size: 17px;
  }

  .country-info-row {
    grid-template-columns: minmax(80px, 118px) minmax(0, 1fr);
    gap: 4px;
  }

  .country-info-row dt,
  .country-info-row dd {
    font-size: 14px;
    line-height: 1.46;
  }

  .view-icon {
    width: 28px;
    height: 28px;
  }

  .search-row {
    flex-direction: column;
  }

  .search-row button {
    width: 100%;
  }

  .search-panel.is-collapsed {
    width: 48px;
    height: 48px;
    min-height: 48px;
  }
}
