:root {
  --navy-950: #06111f;
  --navy-900: #081827;
  --navy-800: #0d2033;
  --slate-700: #26394b;
  --slate-500: #65758a;
  --cream-100: #fffaf1;
  --cream-200: #efe5d2;
  --gold-300: #f1c973;
  --gold-500: #c99b3a;
  --gold-700: #8f6720;
  --white: #ffffff;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.34);
  --soft-shadow: 0 16px 35px rgba(9, 24, 39, 0.14);
  --radius: 8px;
  --homepage-container-width: 1460px;
  --container: var(--homepage-container-width);
  --section-spacing: 72px;
  --page-background: #fffdf8;
  --card-background: #ffffff;
  --primary-color: #06111f;
  --homepage-radius: 6px;
  --homepage-shadow: 0 14px 28px rgba(9, 24, 39, 0.12);
  --header-height: 55px;
  --header-content-max-width: 1460px;
  --header-logo-scale: 1;
  --header-x: 0px;
  --header-logo-x: 0px;
  --header-menu-font-size: 9px;
  --header-menu-gap: 11px;
  --header-menu-y: 0px;
  --header-search-size: 35px;
  --header-login-height: 39px;
  --header-login-padding: 12px;
  --header-signup-height: 39px;
  --header-signup-padding: 12px;
  --header-background: rgba(3, 14, 27, 0.98);
  --header-position: sticky;
  --hero-height-desktop: 520px;
  --hero-height-tablet: 470px;
  --hero-height-mobile: 560px;
  --hero-content-max-width: 1460px;
  --hero-text-width: 520px;
  --hero-text-y: 34px;
  --hero-text-x: 0px;
  --hero-image: url("../../photos/headercastle.png");
  --hero-image-position: 55% 44%;
  --hero-image-brightness: 108%;
  --hero-overlay-background: linear-gradient(90deg, rgba(4, 12, 22, 0.72) 0%, rgba(7, 18, 31, 0.36) 29%, rgba(8, 18, 28, 0.03) 56%, rgba(9, 16, 21, 0) 100%), linear-gradient(180deg, rgba(6, 17, 31, 0), rgba(6, 17, 31, 0.16));
  --hero-border-radius: 0px;
  --hero-bottom-spacing: 0px;
  --hero-title-font-desktop: 36px;
  --hero-title-font-mobile: 34px;
  --hero-subtitle-font: 37px;
  --hero-paragraph-font: 16px;
  --hero-title-line-height: 0.96;
  --hero-text-color: #fffaf1;
  --search-panel-width: 900px;
  --search-panel-height: 132px;
  --search-panel-offset: -80px;
  --search-panel-x: 0px;
  --search-panel-bg: rgba(6, 17, 31, 0.92);
  --search-panel-radius: 8px;
  --search-panel-shadow: 0 26px 58px rgba(2, 11, 21, 0.28);
  --search-spacing-below: 42px;
  --search-reserved-space: 122px;
  --country-card-height: 190px;
  --country-card-radius: 6px;
  --country-card-brightness: 82%;
  --country-card-overlay-opacity: 0.18;
  --country-card-gap: 16px;
  --country-grid-max-width: 1460px;
  --country-cards-x: 0px;
  --country-cards-y: 0px;
  --country-card-shadow: 0 14px 28px rgba(9, 24, 39, 0.12);
  --country-card-border-color: #081827;
  --country-card-border-width: 1px;
  --flag-size: 45px;
  --country-section-top: 56px;
  --country-section-bottom: 36px;
  --popular-section-top: 0px;
  --popular-map-max-width: 1460px;
  --popular-map-x: 0px;
  --popular-map-y: 0px;
  --popular-map-gap: 24px;
  --popular-map-side-width: 236px;
  --castle-card-height: 300px;
  --castle-card-image-height: 150px;
  --castle-card-radius: 5px;
  --castle-card-border-color: #081827;
  --castle-card-border-width: 1px;
  --castle-card-shadow: 0 14px 28px rgba(9, 24, 39, 0.12);
  --castle-card-gap: 12px;
  --card-action-primary-bg: var(--navy-900);
  --card-action-primary-color: var(--cream-100);
  --card-action-primary-border: transparent;
  --map-panel-height: 268px;
  --map-panel-radius: 5px;
  --map-section-spacing: 0px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--page-background);
  color: var(--navy-900);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.6;
}

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

button,
input {
  font: inherit;
}

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

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

.site-header {
  position: var(--header-position);
  top: 0;
  z-index: 20;
  background: var(--header-background);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22);
}

.header-inner {
  display: flex;
  align-items: center;
  min-height: var(--header-height);
  gap: 12px;
  width: min(100% - 56px, var(--header-content-max-width));
  transform: translateX(var(--header-x));
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--cream-100);
  min-width: max-content;
  transform: translateX(var(--header-logo-x)) scale(var(--header-logo-scale));
  transform-origin: left center;
}

.brand-mark {
  position: relative;
  width: 31px;
  height: 37px;
  border: 3px solid #d3a84e;
  border-top-width: 7px;
  border-radius: 7px 7px 16px 16px;
  box-shadow: inset 0 0 0 2px rgba(6, 17, 31, 0.78);
  clip-path: polygon(0 0, 18% 0, 18% 12%, 34% 12%, 34% 0, 49% 0, 49% 12%, 65% 12%, 65% 0, 82% 0, 82% 12%, 100% 12%, 100% 76%, 50% 100%, 0 76%);
}

.brand-mark::before,
.brand-mark::after {
  position: absolute;
  content: "";
  background: #d3a84e;
}

.brand-mark::before {
  left: 8px;
  top: 12px;
  width: 11px;
  height: 16px;
  border-radius: 8px 8px 0 0;
  box-shadow: -8px -5px 0 -5px #d3a84e, 8px -5px 0 -5px #d3a84e;
}

.brand-mark::after {
  left: 50%;
  bottom: 5px;
  width: 2px;
  height: 12px;
  transform: translateX(-50%);
}

.brand strong {
  display: block;
  font-size: 18px;
  line-height: 0.98;
  letter-spacing: 0;
  text-transform: uppercase;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.55);
}

.brand small {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: var(--gold-300);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.brand small span {
  display: inline-block;
  width: 26px;
  height: 2px;
  background: var(--gold-500);
}

.primary-nav {
  display: flex;
  justify-content: center;
  gap: var(--header-menu-gap);
  flex: 1;
  color: var(--cream-100);
  font-family: Arial, sans-serif;
  font-size: var(--header-menu-font-size);
  font-weight: 700;
  transform: translateY(var(--header-menu-y));
}

.primary-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 20px 0;
  white-space: nowrap;
}

.primary-nav button {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 20px 0;
  color: inherit;
  white-space: nowrap;
  background: transparent;
  border: 0;
  font: inherit;
  cursor: pointer;
}

.primary-nav a::after,
.primary-nav button::after {
  position: absolute;
  left: 0;
  bottom: 15px;
  width: 100%;
  height: 2px;
  content: "";
  background: var(--gold-300);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}

.primary-nav a:hover::after,
.primary-nav button:hover::after {
  transform: scaleX(1);
}

.nav-caret {
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
}

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

.header-cta {
  min-width: 66px;
  white-space: nowrap;
}

.header-actions .btn {
  min-height: var(--header-login-height);
  padding: 0 var(--header-login-padding);
  font-size: 10px;
}

.header-actions .btn-gold {
  min-height: var(--header-signup-height);
  padding-inline: var(--header-signup-padding);
}

.header-search {
  position: relative;
  width: var(--header-search-size);
  height: var(--header-search-size);
}

.header-search::before {
  position: absolute;
  left: 24%;
  top: 20%;
  width: 37%;
  height: 37%;
  content: "";
  border: 2px solid var(--cream-100);
  border-radius: 50%;
}

.header-search::after {
  position: absolute;
  left: 68%;
  top: 66%;
  width: 31%;
  height: 2px;
  content: "";
  background: var(--cream-100);
  border-radius: 999px;
  transform: rotate(45deg);
  transform-origin: left center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 5px;
  font-family: Arial, sans-serif;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, border-color 180ms ease;
}

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

.btn-gold {
  color: var(--navy-950);
  background: linear-gradient(135deg, #e5be61, #c99b3a);
  box-shadow: 0 14px 30px rgba(201, 155, 58, 0.22);
}

.btn-outline,
.btn-ghost {
  color: var(--cream-100);
  border-color: rgba(247, 240, 228, 0.5);
  background: rgba(255, 255, 255, 0.02);
}

.btn-outline:hover,
.btn-ghost:hover {
  border-color: var(--gold-300);
}

.btn-small {
  min-height: 36px;
  padding: 0 12px;
  font-size: 11px;
}

.btn-dark {
  color: var(--cream-100);
  background: var(--navy-900);
}

.btn-soft {
  color: var(--navy-900);
  background: #efe3ca;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  margin-left: auto;
  border: 1px solid rgba(247, 240, 228, 0.28);
  border-radius: var(--radius);
  background: transparent;
}

.nav-toggle span:not(.sr-only) {
  display: block;
  width: 19px;
  height: 2px;
  margin: 4px auto;
  background: var(--cream-100);
}

.section-dark {
  color: var(--cream-100);
  background: var(--primary-color);
}

.hero {
  position: relative;
  isolation: isolate;
  min-height: var(--hero-height-desktop);
  overflow: visible;
  margin-bottom: var(--hero-bottom-spacing);
  padding: var(--hero-text-y) 0 0;
  background: var(--navy-950);
  border-radius: var(--hero-border-radius);
}

.hero::before {
  position: absolute;
  inset: 0;
  z-index: 1;
  content: "";
  pointer-events: none;
  background: var(--hero-overlay-background);
}

.hero::after {
  display: none;
}

.hero-image-layer,
.country-image-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.hero-image-layer {
  background-position: var(--hero-image-position);
  filter: brightness(var(--hero-image-brightness));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(100% - 56px, var(--hero-content-max-width));
  transform: translateX(var(--hero-text-x));
}

.hero-copy {
  width: min(100%, var(--hero-text-width));
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--gold-300);
  font-family: Arial, sans-serif;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

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

h1 {
  max-width: var(--hero-text-width);
  margin-bottom: 12px;
  color: var(--hero-text-color);
  font-size: var(--hero-title-font-desktop);
  line-height: var(--hero-title-line-height);
  letter-spacing: 0;
  text-transform: uppercase;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.58);
}

h1 span {
  display: block;
}

.hero-title {
  margin-bottom: 12px;
  color: var(--gold-300);
  font-size: var(--hero-subtitle-font);
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.54);
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.05;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  font-size: 24px;
  line-height: 1.15;
}

.hero-text,
.section-copy {
  max-width: 600px;
  color: rgba(247, 240, 228, 0.78);
  font-family: Arial, sans-serif;
  font-size: 18px;
}

.hero-text {
  margin-bottom: 17px;
  color: var(--hero-text-color);
  font-size: var(--hero-paragraph-font);
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.58);
}

.search-panel {
  position: absolute;
  left: 50%;
  bottom: var(--search-panel-offset);
  z-index: 2;
  display: grid;
  gap: 8px;
  width: min(100% - 154px, var(--search-panel-width));
  min-height: var(--search-panel-height);
  margin: 0;
  padding: 15px 18px 13px;
  background: var(--search-panel-bg);
  border: 1px solid rgba(225, 180, 88, 0.58);
  border-radius: var(--search-panel-radius);
  box-shadow: var(--search-panel-shadow);
  transform: translateX(calc(-50% + var(--search-panel-x)));
}

.search-main {
  position: relative;
}

.search-main-icon {
  position: absolute;
  left: 5px;
  top: 50%;
  width: 17px;
  height: 17px;
  border: 2px solid var(--cream-100);
  border-radius: 50%;
  transform: translateY(-50%);
}

.search-main-icon::after {
  position: absolute;
  right: -8px;
  bottom: -6px;
  width: 10px;
  height: 2px;
  content: "";
  background: var(--cream-100);
  border-radius: 999px;
  transform: rotate(45deg);
}

.search-panel input,
.search-panel select {
  width: 100%;
  min-height: 38px;
  color: var(--cream-100);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(247, 240, 228, 0.58);
  border-radius: 5px;
  padding: 0 14px;
  outline: none;
  font-family: Arial, sans-serif;
  font-size: 12px;
  font-weight: 700;
}

.search-panel select option {
  color: var(--navy-950) !important;
  background: var(--cream-100) !important;
}

.search-panel select option:checked,
.search-panel select option:hover {
  color: var(--navy-950) !important;
  background: var(--gold-300) !important;
}

.search-panel input {
  min-height: 24px;
  padding-left: 38px;
  border: 0;
  background: transparent;
}

.search-panel input::placeholder {
  color: var(--cream-100);
  opacity: 0.96;
}

.search-panel select {
  appearance: none;
  background:
    linear-gradient(45deg, transparent 50%, var(--cream-100) 50%) calc(100% - 18px) 50% / 7px 7px no-repeat,
    linear-gradient(135deg, var(--cream-100) 50%, transparent 50%) calc(100% - 13px) 50% / 7px 7px no-repeat,
    rgba(255, 255, 255, 0.03);
}

.search-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) 116px;
  gap: 10px;
  align-items: center;
}

.search-panel .btn {
  min-height: 38px;
}

.search-panel input:focus,
.search-panel select:focus {
  border-color: var(--gold-300);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.btn-icon::before {
  display: inline-block;
  margin-right: 10px;
  content: "";
}

.castle-icon::before {
  width: 15px;
  height: 18px;
  background: currentColor;
  clip-path: polygon(0 0, 22% 0, 22% 24%, 39% 24%, 39% 0, 61% 0, 61% 24%, 78% 24%, 78% 0, 100% 0, 100% 100%, 63% 100%, 63% 68%, 37% 68%, 37% 100%, 0 100%);
}

.pin-icon::before {
  width: 15px;
  height: 19px;
  border: 3px solid currentColor;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
}

.castle-visual {
  position: relative;
  min-height: 530px;
}

.sunset-glow {
  position: absolute;
  inset: 2% 0 auto 16%;
  height: 62%;
  background: radial-gradient(circle, rgba(255, 198, 102, 0.52), transparent 62%);
  filter: blur(12px);
}

.castle-card {
  position: relative;
  height: 530px;
  overflow: hidden;
  border: 1px solid rgba(241, 201, 115, 0.28);
  border-radius: 10px;
  background:
    linear-gradient(to bottom, rgba(247, 170, 87, 0.18), transparent 45%),
    linear-gradient(155deg, #1a2a3b, #081522 55%, #040910);
  box-shadow: var(--shadow);
}

.castle-sky {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(17deg, transparent 0 42%, rgba(247, 240, 228, 0.12) 42% 43%, transparent 43%),
    linear-gradient(160deg, rgba(255, 210, 126, 0.48), transparent 35%),
    radial-gradient(circle at 76% 20%, rgba(247, 240, 228, 0.7), transparent 8%),
    linear-gradient(to bottom, #6d7f8d, #172638 55%, #07111c);
  opacity: 0.95;
}

.castle-silhouette {
  position: absolute;
  right: 7%;
  bottom: 62px;
  width: 72%;
  height: 58%;
}

.castle-silhouette span {
  position: absolute;
  display: block;
  background: linear-gradient(135deg, #2e2b25, #10151a 66%);
  box-shadow: inset 0 0 0 1px rgba(241, 201, 115, 0.12);
}

.tower,
.keep {
  bottom: 84px;
  width: 20%;
}

.tower::before,
.tower::after,
.keep::before,
.keep::after {
  position: absolute;
  top: -18px;
  width: 22%;
  height: 18px;
  content: "";
  background: inherit;
}

.tower::before,
.keep::before {
  left: 0;
}

.tower::after,
.keep::after {
  right: 0;
}

.tower-left {
  left: 7%;
  height: 54%;
}

.keep {
  left: 31%;
  width: 34%;
  height: 74%;
}

.tower-right {
  right: 8%;
  height: 64%;
}

.wall {
  left: 0;
  right: 0;
  bottom: 84px;
  height: 30%;
}

.hill {
  left: -14%;
  right: -10%;
  bottom: 0;
  height: 115px;
  border-radius: 50% 50% 0 0;
  background: linear-gradient(145deg, #29351f, #07110c);
}

.visual-note {
  position: absolute;
  left: 24px;
  bottom: 24px;
  max-width: 280px;
  padding: 18px;
  color: var(--cream-100);
  background: rgba(6, 17, 31, 0.78);
  border: 1px solid rgba(241, 201, 115, 0.28);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
}

.visual-note strong,
.visual-note span {
  display: block;
}

.visual-note span {
  color: rgba(247, 240, 228, 0.72);
  font-family: Arial, sans-serif;
  font-size: 13px;
}

.section {
  padding: var(--section-spacing) 0;
}

.countries {
  padding-top: calc(var(--country-section-top) + var(--search-reserved-space));
  padding-bottom: var(--country-section-bottom);
  background: var(--page-background);
}

.countries .container {
  width: min(100% - 56px, var(--country-grid-max-width));
  max-width: none;
  margin-left: auto;
  margin-right: auto;
  transform: translate(var(--country-cards-x), var(--country-cards-y));
}

.section-heading {
  max-width: 760px;
  margin-bottom: 34px;
}

.split-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  max-width: none;
  gap: 24px;
}

.country-grid,
.castle-grid,
.education-grid {
  display: grid;
  gap: 22px;
}

.country-grid {
  grid-template-columns: repeat(4, 1fr);
  gap: var(--country-card-gap);
}

.country-card {
  position: relative;
  isolation: isolate;
  min-height: 0;
  height: var(--country-card-height);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  padding: 16px;
  color: var(--cream-100);
  border: var(--country-card-border-width) solid var(--country-card-border-color);
  border-radius: var(--country-card-radius);
  background: var(--navy-900);
  box-shadow: var(--country-card-shadow);
  text-align: center;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.country-card::before {
  position: absolute;
  inset: 0;
  z-index: 1;
  content: "";
  background: linear-gradient(180deg, rgba(6, 17, 31, 0.03), rgba(6, 17, 31, var(--country-card-overlay-opacity)));
}

.country-card::after {
  display: none;
}

.country-card .country-image-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(var(--country-card-brightness));
}

.country-card > * {
  position: relative;
  z-index: 2;
}

.country-card:hover,
.visit-card:hover,
.education-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 44px rgba(9, 24, 39, 0.2);
}

.england { --country-image: url("../../photos/england-bamburgh-castle.png"); }
.scotland { --country-image: url("../../photos/scotland-eilean-donan-castle.png"); }
.wales { --country-image: url("../../photos/wales-conwy-castle.png"); }
.ireland { --country-image: url("../../photos/northern-ireland-dunluce-castle.png"); }

.country-card p,
.visit-card p,
.education-card p {
  color: var(--slate-500);
  font-family: Arial, sans-serif;
}

.country-card p {
  margin-bottom: 11px;
  color: var(--cream-100);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.72);
  text-transform: uppercase;
}

.text-btn {
  color: var(--cream-100);
  font-family: Arial, sans-serif;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.country-card .text-btn {
  min-width: 78px;
  padding: 7px 14px;
  border: 1px solid rgba(247, 240, 228, 0.62);
  border-radius: 4px;
  background: rgba(5, 14, 24, 0.78);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
}

.text-btn:hover {
  color: var(--gold-300);
}

.country-card h3 {
  margin-bottom: 4px;
  color: var(--cream-100);
  font-size: 24px;
  line-height: 1;
  text-transform: uppercase;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.72);
}

.country-badge {
  display: grid;
  place-items: center;
  width: var(--flag-size);
  height: var(--flag-size);
  margin-bottom: 7px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 50%;
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.32);
}

.country-badge span {
  width: calc(var(--flag-size) - 8px);
  height: calc(var(--flag-size) - 8px);
  overflow: hidden;
  border-radius: 50%;
  background: var(--flag-image) center center / cover no-repeat;
}

.badge-england { --flag-image: url("../../photos/england-flag-st-george-cross.png"); }
.badge-scotland { --flag-image: url("../../photos/scotland-flag-st-andrew-saltire.png"); }
.badge-wales { --flag-image: url("../../photos/wales-flag-red-dragon.png"); }
.badge-ireland { --flag-image: url("../../photos/northern-ireland-flag-ulster-banner.png"); }

.castle-grid {
  grid-template-columns: repeat(3, 1fr);
}

.visit-card,
.education-card {
  overflow: hidden;
  background: var(--white);
  border: 1px solid rgba(8, 24, 39, 0.08);
  border-radius: var(--radius);
  box-shadow: var(--soft-shadow);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.card-image {
  min-height: 168px;
  position: relative;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(6, 17, 31, 0.65)),
    var(--image-gradient);
}

.image-warwick { --image-gradient: linear-gradient(135deg, #c19b59, #384f5e 46%, #132016); }
.image-edinburgh { --image-gradient: linear-gradient(135deg, #d09b58, #415c76 42%, #111722); }
.image-conwy { --image-gradient: linear-gradient(135deg, #b8b47c, #556c7e 44%, #18241c); }
.image-bamburgh { --image-gradient: linear-gradient(135deg, #d3c080, #41677a 48%, #12242c); }
.image-cardiff { --image-gradient: linear-gradient(135deg, #b99b67, #536777 48%, #17201d); }
.image-dover { --image-gradient: linear-gradient(135deg, #d6d1af, #607d91 50%, #172938); }

.card-image::after {
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: 0;
  height: 72px;
  content: "";
  background:
    linear-gradient(to right, transparent 0 8%, #1b2020 8% 18%, transparent 18% 24%, #1b2020 24% 44%, transparent 44% 50%, #1b2020 50% 62%, transparent 62% 70%, #1b2020 70% 88%, transparent 88%),
    linear-gradient(to top, #171c1c, #2b2d29);
  clip-path: polygon(0 100%, 0 45%, 8% 45%, 8% 20%, 17% 20%, 17% 45%, 33% 45%, 33% 0, 47% 0, 47% 45%, 63% 45%, 63% 18%, 73% 18%, 73% 45%, 100% 45%, 100% 100%);
}

.card-image span {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 1;
  padding: 6px 9px;
  color: var(--navy-950);
  background: var(--gold-300);
  border-radius: 999px;
  font-family: Arial, sans-serif;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.card-body {
  padding: 22px;
}

.location {
  margin-bottom: 8px;
  font-size: 13px;
}

.status {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 5px 9px;
  color: #17613d;
  background: #e4f4e9;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
}

.tags span {
  padding: 5px 8px;
  color: var(--slate-700);
  background: #f1eadb;
  border-radius: 999px;
  font-family: Arial, sans-serif;
  font-size: 11px;
  font-weight: 700;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.popular-map-section {
  padding: var(--popular-section-top) 0 var(--section-spacing);
  background: var(--page-background);
}

.popular-map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--popular-map-side-width);
  gap: var(--popular-map-gap);
  align-items: start;
  width: min(100% - 56px, var(--popular-map-max-width));
  transform: translate(var(--popular-map-x), var(--popular-map-y));
}

.popular-heading-row,
.map-heading-row {
  display: flex;
  align-items: center;
  min-height: 35px;
  margin-bottom: 10px;
}

.popular-heading-row {
  gap: 10px;
}

.popular-heading-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: max-content;
}

.popular-heading-title h2,
.map-heading-row h2 {
  margin: 0;
  color: var(--primary-color);
  font-size: 21px;
  line-height: 1;
  text-transform: uppercase;
}

.heading-castle-icon {
  position: relative;
  width: 24px;
  height: 25px;
  border: 2px solid var(--navy-950);
  border-top-width: 5px;
  border-radius: 4px 4px 7px 7px;
  clip-path: polygon(0 0, 20% 0, 20% 18%, 38% 18%, 38% 0, 62% 0, 62% 18%, 80% 18%, 80% 0, 100% 0, 100% 76%, 50% 100%, 0 76%);
}

.heading-castle-icon::after {
  position: absolute;
  left: 50%;
  bottom: 3px;
  width: 6px;
  height: 9px;
  content: "";
  background: var(--navy-950);
  border-radius: 5px 5px 0 0;
  transform: translateX(-50%);
}

.heading-rule {
  flex: 1;
  height: 1px;
  background: rgba(8, 24, 39, 0.18);
}

.popular-view-all {
  color: var(--navy-950);
  font-family: Arial, sans-serif;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.popular-castle-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--castle-card-gap);
}

.popular-castle-card {
  position: relative;
  overflow: hidden;
  display: grid;
  min-height: var(--castle-card-height);
  grid-template-rows: var(--castle-card-image-height) 1fr;
  background: var(--card-background);
  border: var(--castle-card-border-width) solid var(--castle-card-border-color);
  border-radius: var(--castle-card-radius);
  box-shadow: var(--castle-card-shadow);
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.popular-castle-card:hover,
.popular-castle-card.is-highlighted {
  border-color: rgba(201, 155, 58, 0.74);
  box-shadow: 0 20px 38px rgba(9, 24, 39, 0.2);
  transform: translateY(-3px);
}

.popular-castle-image {
  position: relative;
  min-height: 0;
  height: var(--castle-card-image-height);
  background-color: var(--navy-900);
  background:
    linear-gradient(180deg, rgba(6, 17, 31, 0.02), rgba(6, 17, 31, 0.35)),
    var(--castle-image, linear-gradient(135deg, #24384a, #081827 62%, #050b13));
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.popular-castle-card.is-missing-image .popular-castle-image::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(6, 17, 31, 0.42)),
    radial-gradient(circle at 72% 24%, rgba(241, 201, 115, 0.22), transparent 34%);
}

.popular-badge {
  position: absolute;
  left: 8px;
  top: 8px;
  z-index: 1;
  padding: 5px 7px;
  color: var(--navy-950);
  background: var(--gold-300);
  border-radius: 999px;
  font-family: Arial, sans-serif;
  font-size: 8px;
  font-weight: 900;
  text-transform: uppercase;
}

.heart-button {
  position: absolute;
  right: 8px;
  top: 8px;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: var(--cream-100);
  background: rgba(6, 17, 31, 0.76);
  border: 1px solid rgba(247, 240, 228, 0.5);
  border-radius: 50%;
  cursor: pointer;
  font-size: 19px;
  line-height: 1;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.heart-button:hover {
  transform: translateY(-2px);
}

.heart-button.is-saved {
  color: var(--gold-300);
  background: rgba(6, 17, 31, 0.94);
  border-color: var(--gold-300);
}

.popular-castle-body {
  display: flex;
  flex-direction: column;
  padding: 12px 12px 13px;
}

.popular-castle-body h3 {
  margin-bottom: 4px;
  color: var(--navy-950);
  font-family: Arial, sans-serif;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.08;
  text-transform: uppercase;
  white-space: nowrap;
}

.popular-location,
.popular-entry,
.popular-price,
.popular-description {
  margin-bottom: 6px;
  color: var(--slate-700);
  font-family: Arial, sans-serif;
  font-size: 10px;
  font-weight: 600;
}

.popular-location {
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(8, 24, 39, 0.12);
}

.popular-entry {
  margin-bottom: 4px;
  color: var(--gold-700);
  font-weight: 900;
  text-transform: uppercase;
}

.popular-description {
  display: -webkit-box;
  overflow: hidden;
  margin-bottom: 8px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.open-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  color: #17613d;
  font-family: Arial, sans-serif;
  font-size: 10px;
  font-weight: 900;
}

.open-status::before {
  width: 8px;
  height: 8px;
  content: "";
  background: #1fa160;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(31, 161, 96, 0.14);
}

.popular-actions {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 7px;
  margin-top: auto;
}

.popular-actions .btn {
  min-height: 31px;
  padding: 0 6px;
  border-radius: 3px;
  font-size: 8px;
  white-space: nowrap;
}

.popular-actions .btn-dark {
  color: var(--card-action-primary-color);
  background: var(--card-action-primary-bg);
  border-color: var(--card-action-primary-border);
}

.visited-button.is-visited {
  color: var(--cream-100);
  background: var(--navy-900);
  border-color: var(--navy-900);
}

.map-panel {
  min-width: 0;
  margin-top: var(--map-section-spacing);
}

.live-map-card {
  overflow: hidden;
  background: var(--card-background);
  border: 1px solid rgba(8, 24, 39, 0.12);
  border-radius: var(--map-panel-radius);
  box-shadow: var(--homepage-shadow);
}

#castle-map {
  width: 100%;
  height: var(--map-panel-height);
  background: #d9e1d2;
}

.map-open-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  color: var(--cream-100);
  background: var(--primary-color);
  border-top: 1px solid rgba(241, 201, 115, 0.26);
  font-family: Arial, sans-serif;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.map-open-bar:hover {
  color: var(--gold-300);
}

.castle-map-marker {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: var(--gold-300);
  background: var(--navy-950);
  border: 2px solid var(--gold-300);
  border-radius: 50%;
  box-shadow: 0 9px 20px rgba(0, 0, 0, 0.34);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
}

.castle-map-marker span {
  width: auto;
  height: auto;
  background: transparent;
  border-radius: 0;
}

.castle-map-marker.marker-default {
  width: 22px;
  height: 22px;
  color: var(--white);
  background: #2f70d8;
  border: 3px solid var(--white);
  font-size: 0;
}

.castle-map-marker.marker-default span {
  display: block;
  width: 8px;
  height: 8px;
  background: currentColor;
  border-radius: 50%;
}

.castle-map-marker.marker-castle span {
  display: block;
  width: 15px;
  height: 17px;
  background: currentColor;
  clip-path: polygon(0 0, 22% 0, 22% 24%, 39% 24%, 39% 0, 61% 0, 61% 24%, 78% 24%, 78% 0, 100% 0, 100% 100%, 63% 100%, 63% 68%, 37% 68%, 37% 100%, 0 100%);
}

.leaflet-popup-content-wrapper {
  border-radius: 8px;
  box-shadow: 0 16px 34px rgba(9, 24, 39, 0.24);
}

.castle-popup {
  min-width: 190px;
  font-family: Arial, sans-serif;
}

.castle-popup strong {
  display: block;
  margin-bottom: 4px;
  color: var(--navy-950);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
}

.castle-popup p {
  margin-bottom: 12px;
  color: var(--slate-700);
  font-size: 13px;
}

.popup-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.popup-actions .btn {
  min-height: 34px;
  padding: 0 10px;
  font-size: 10px;
}

.map-section {
  color: var(--cream-100);
  background:
    radial-gradient(circle at 78% 22%, rgba(241, 201, 115, 0.22), transparent 28%),
    linear-gradient(145deg, var(--navy-900), var(--navy-950));
}

.map-layout,
.passport-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(460px, 1.2fr);
  gap: 48px;
  align-items: center;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.chip {
  min-height: 38px;
  padding: 0 14px;
  color: var(--cream-100);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(247, 240, 228, 0.2);
  border-radius: 999px;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease;
}

.chip.active,
.chip:hover {
  color: var(--navy-950);
  background: var(--gold-300);
  border-color: var(--gold-300);
}

.map-preview {
  position: relative;
  min-height: 500px;
  overflow: hidden;
  border: 1px solid rgba(241, 201, 115, 0.26);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(143, 103, 32, 0.26), transparent 28%),
    radial-gradient(circle at 65% 30%, rgba(122, 156, 118, 0.8), transparent 16%),
    radial-gradient(circle at 42% 66%, rgba(122, 156, 118, 0.72), transparent 18%),
    radial-gradient(circle at 30% 36%, rgba(92, 132, 99, 0.78), transparent 12%),
    linear-gradient(135deg, #587b96, #1f3d51);
  box-shadow: var(--shadow);
}

.map-preview::before {
  position: absolute;
  inset: 26px;
  content: "";
  border: 1px solid rgba(247, 240, 228, 0.16);
  border-radius: 10px;
}

.map-line {
  position: absolute;
  height: 2px;
  background: rgba(247, 240, 228, 0.35);
  transform-origin: left;
}

.line-a {
  top: 38%;
  left: 30%;
  width: 42%;
  transform: rotate(31deg);
}

.line-b {
  top: 58%;
  left: 32%;
  width: 39%;
  transform: rotate(-20deg);
}

.map-pin {
  position: absolute;
  min-width: 94px;
  padding: 8px 12px;
  color: var(--navy-950);
  background: var(--gold-300);
  border: 0;
  border-radius: 999px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.22);
  cursor: pointer;
}

.map-pin::before {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  content: "";
  background: var(--navy-950);
  border-radius: 50%;
}

.pin-edinburgh { top: 18%; left: 47%; }
.pin-bamburgh { top: 26%; left: 64%; }
.pin-conwy { top: 48%; left: 28%; }
.pin-warwick { top: 56%; left: 55%; }
.pin-cardiff { top: 73%; left: 34%; }
.pin-dover { top: 72%; left: 68%; }

.map-card {
  position: absolute;
  left: 26px;
  bottom: 26px;
  padding: 18px;
  color: var(--cream-100);
  background: rgba(6, 17, 31, 0.82);
  border: 1px solid rgba(247, 240, 228, 0.18);
  border-radius: var(--radius);
}

.map-card strong,
.map-card span {
  display: block;
}

.map-card span {
  color: rgba(247, 240, 228, 0.72);
  font-family: Arial, sans-serif;
}

.progress {
  height: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
}

.progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--gold-300), var(--gold-500));
}

.experience-section {
  padding: 36px 0 26px;
  background:
    radial-gradient(circle at 8% 30%, rgba(201, 155, 58, 0.09), transparent 26%),
    linear-gradient(180deg, #fffdf8, #fbf5ea);
}

.experience-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(460px, 0.9fr);
  gap: 30px;
  align-items: start;
}

.feature-heading {
  display: grid;
  grid-template-columns: 42px auto 1fr;
  gap: 14px;
  align-items: center;
  margin-bottom: 26px;
}

.feature-heading h2,
.journey-panel h2 {
  margin: 0;
  color: var(--navy-950);
  font-size: 24px;
  line-height: 1;
  text-transform: uppercase;
}

.feature-heading-icon,
.journey-icon {
  position: relative;
  width: 31px;
  height: 35px;
  color: var(--gold-500);
  border: 2px solid currentColor;
  border-top-width: 6px;
  border-radius: 5px 5px 12px 12px;
  clip-path: polygon(0 0, 20% 0, 20% 16%, 38% 16%, 38% 0, 62% 0, 62% 16%, 80% 16%, 80% 0, 100% 0, 100% 78%, 50% 100%, 0 78%);
}

.feature-heading-rule {
  height: 1px;
  background: rgba(8, 24, 39, 0.16);
}

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

.feature-item {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.feature-item h3 {
  margin: 0 0 8px;
  color: var(--navy-950);
  font-family: Arial, sans-serif;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.15;
  text-transform: uppercase;
}

.feature-item p {
  margin: 0;
  color: #29394a;
  font-family: Arial, sans-serif;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.55;
}

.line-icon,
.stat-icon {
  position: relative;
  display: inline-grid;
  place-items: center;
  color: var(--gold-500);
}

.line-icon {
  width: 44px;
  height: 44px;
  border: 2px solid currentColor;
  border-radius: 7px;
}

.line-icon::before,
.line-icon::after,
.stat-icon::before,
.stat-icon::after {
  position: absolute;
  content: "";
}

.icon-info::before { inset: 9px 13px 8px; border: 2px solid currentColor; border-top-width: 6px; }
.icon-visitor { border-radius: 50%; }
.icon-visitor::before { top: 8px; width: 10px; height: 10px; border: 2px solid currentColor; border-radius: 50%; }
.icon-visitor::after { bottom: 8px; width: 24px; height: 14px; border: 2px solid currentColor; border-radius: 16px 16px 4px 4px; }
.icon-gallery { border-radius: 50%; }
.icon-gallery::before { width: 22px; height: 22px; border: 2px solid currentColor; border-radius: 50%; }
.icon-gallery::after { width: 2px; height: 36px; background: currentColor; transform: rotate(45deg); }
.icon-map { border-radius: 35% 35% 50% 50%; }
.icon-map::before { width: 10px; height: 10px; border: 2px solid currentColor; border-radius: 50%; }
.icon-route { border-radius: 4px; transform: rotate(-5deg); }
.icon-route::before { inset: 10px; border-top: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: skewY(-24deg); }
.icon-history::before { inset: 8px 11px; border: 2px solid currentColor; border-top-width: 8px; }

.journey-panel {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 18px;
  min-height: 305px;
  padding: 26px 22px;
  color: var(--cream-100);
  background:
    radial-gradient(circle at 78% 16%, rgba(241, 201, 115, 0.12), transparent 28%),
    linear-gradient(135deg, #06111f, #071b31);
  border: 1px solid rgba(241, 201, 115, 0.24);
  border-radius: 8px;
  box-shadow: 0 24px 50px rgba(7, 18, 31, 0.24);
}

.journey-panel h2 {
  margin: 0 0 8px;
  color: var(--gold-300);
}

.journey-panel p,
.journey-panel li {
  color: rgba(247, 240, 228, 0.9);
  font-family: Arial, sans-serif;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.journey-panel ul {
  display: grid;
  gap: 12px;
  margin: 22px 0;
  padding: 0;
  list-style: none;
}

.journey-panel li {
  display: flex;
  align-items: center;
  gap: 12px;
}

.journey-panel li span {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  color: var(--navy-950);
  background: var(--gold-300);
  border-radius: 5px;
  font-size: 9px;
  font-weight: 900;
}

.journey-button {
  width: min(100%, 260px);
}

.journey-account-panel {
  display: grid;
  gap: 14px;
  margin: 18px 0 20px;
}

.journey-account-panel[hidden] {
  display: none !important;
}

.journey-account-label {
  display: block;
  margin-bottom: 5px;
  color: var(--gold-300);
  font-family: Arial, sans-serif;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.journey-account-panel strong[data-journey-user-name] {
  display: block;
  color: var(--cream-100);
  font-family: Georgia, serif;
  font-size: 24px;
  line-height: 1.1;
}

.journey-account-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.journey-account-stats article {
  min-width: 0;
  padding: 12px;
  background: rgba(247, 240, 228, 0.08);
  border: 1px solid rgba(241, 201, 115, 0.18);
  border-radius: 6px;
}

.journey-account-stats span {
  display: block;
  color: rgba(247, 240, 228, 0.78);
  font-family: Arial, sans-serif;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.25;
  text-transform: uppercase;
}

.journey-account-stats strong {
  display: block;
  margin-top: 6px;
  color: var(--gold-300);
  font-family: Georgia, serif;
  font-size: 28px;
  line-height: 1;
}

.journey-panel .journey-account-note {
  max-width: 410px;
  margin: 0;
  color: rgba(247, 240, 228, 0.72);
  font-size: 12px;
  font-weight: 600;
}

.passport-stack {
  position: relative;
  min-height: 240px;
}

.passport-book {
  position: absolute;
  right: 6px;
  top: 16px;
  display: flex;
  width: 150px;
  height: 220px;
  flex-direction: column;
  justify-content: space-between;
  padding: 30px 18px 28px;
  color: var(--gold-300);
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.08), transparent 32%),
    linear-gradient(135deg, #0c1d32, #030a13);
  border: 2px solid rgba(241, 201, 115, 0.42);
  border-radius: 7px 12px 12px 7px;
  box-shadow: -18px 16px 0 rgba(5, 14, 25, 0.74), 0 24px 44px rgba(0, 0, 0, 0.38);
  text-align: center;
  text-transform: uppercase;
  transform: rotate(9deg);
}

.passport-book::before {
  position: absolute;
  inset: 15px;
  content: "";
  border: 1px solid rgba(241, 201, 115, 0.45);
  border-radius: 4px 9px 9px 4px;
}

.passport-book span,
.passport-book strong {
  position: relative;
  z-index: 1;
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.05;
}

.passport-book span {
  font-size: 20px;
}

.passport-book strong {
  font-size: 16px;
  letter-spacing: 0.08em;
}

.stats-band {
  padding: 0 0 28px;
  background: #fbf5ea;
}

.stats-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
  color: var(--cream-100);
  background: linear-gradient(135deg, #06111f, #071b31);
  border: 1px solid rgba(241, 201, 115, 0.25);
  border-radius: 8px;
  box-shadow: 0 20px 42px rgba(7, 18, 31, 0.18);
}

.stats-strip article {
  display: grid;
  grid-template-columns: 48px auto;
  gap: 12px;
  align-items: center;
  min-height: 94px;
  padding: 18px 30px;
  border-right: 1px solid rgba(247, 240, 228, 0.16);
}

.stats-strip article:last-child {
  border-right: 0;
}

.stats-strip strong,
.stats-strip p {
  margin: 0;
}

.stats-strip strong {
  display: block;
  color: var(--cream-100);
  font-size: 31px;
  line-height: 1;
}

.stats-strip p {
  color: rgba(247, 240, 228, 0.88);
  font-family: Arial, sans-serif;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.stat-icon {
  width: 38px;
  height: 42px;
}

.stat-icon::before {
  inset: 4px 7px;
  border: 2px solid var(--gold-500);
  border-top-width: 8px;
  border-radius: 5px 5px 12px 12px;
}

.site-footer {
  padding: 34px 0 38px;
  color: var(--cream-100);
  background: linear-gradient(135deg, #06111f, #03101c);
  border-top: 1px solid rgba(241, 201, 115, 0.22);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(180px, 0.9fr) minmax(250px, 1.3fr) repeat(4, minmax(120px, 0.7fr));
  gap: 34px;
  align-items: start;
}

.footer-brand-panel {
  display: grid;
  justify-items: center;
}

.footer-brand {
  display: grid;
  justify-items: center;
  gap: 12px;
  transform: none;
}

.footer-brand .brand-mark {
  width: 52px;
  height: 60px;
}

.footer-brand strong {
  font-size: 28px;
  text-align: center;
}

.footer-description {
  max-width: 360px;
  margin: 22px 0 0;
  color: rgba(247, 240, 228, 0.82);
  font-family: Arial, sans-serif;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.6;
}

.footer-column {
  display: grid;
  gap: 9px;
  color: rgba(247, 240, 228, 0.82);
  font-family: Arial, sans-serif;
}

.footer-column h3 {
  margin: 0 0 7px;
  color: var(--gold-300);
  font-family: Arial, sans-serif;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.footer-column a {
  font-size: 13px;
  font-weight: 800;
}

.site-footer a:hover {
  color: var(--gold-300);
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.social-links a {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: var(--cream-100);
  border: 2px solid rgba(247, 240, 228, 0.72);
  border-radius: 50%;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.listing-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 360px;
  display: grid;
  align-items: end;
  padding: 120px 0 56px;
  background:
    linear-gradient(90deg, rgba(4, 12, 22, 0.92), rgba(6, 17, 31, 0.58)),
    url("../../photos/headercastle.png") center / cover no-repeat;
}

.listing-hero-content,
.detail-hero-content {
  position: relative;
  z-index: 1;
  max-width: 760px;
}

.listing-hero h1,
.detail-hero h1 {
  margin: 0;
  color: var(--cream-100);
  font-size: 56px;
  line-height: 0.98;
}

.listing-hero p,
.detail-hero p {
  max-width: 620px;
  color: rgba(247, 240, 228, 0.78);
}

.listing-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1.6fr) repeat(4, minmax(150px, 1fr));
  gap: 12px;
  align-items: end;
  margin-bottom: 26px;
  padding: 18px;
  background: var(--card-background);
  border: 1px solid rgba(8, 24, 39, 0.1);
  border-radius: var(--homepage-radius);
  box-shadow: var(--homepage-shadow);
}

.listing-toolbar label {
  display: grid;
  gap: 8px;
  color: var(--navy-950);
  font-family: Arial, sans-serif;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.listing-toolbar input,
.listing-toolbar select {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  color: var(--navy-950);
  background: #fffdf8;
  border: 1px solid rgba(8, 24, 39, 0.14);
  border-radius: 5px;
  font: 700 13px Arial, sans-serif;
}

.listing-results-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.listing-results-heading h2 {
  margin: 0;
}

.listing-results-heading span {
  color: rgba(8, 24, 39, 0.68);
  font-family: Arial, sans-serif;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

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

.listing-castle-card {
  min-height: 380px;
}

.listing-empty,
.detail-empty {
  grid-column: 1 / -1;
  padding: 36px;
  background: var(--card-background);
  border: 1px solid rgba(8, 24, 39, 0.1);
  border-radius: var(--homepage-radius);
  box-shadow: var(--homepage-shadow);
}

.detail-hero {
  background: var(--navy-950);
}

.detail-hero::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, rgba(4, 12, 22, 0.9), rgba(4, 12, 22, 0.24));
}

.detail-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-back-link {
  display: inline-block;
  margin-bottom: 20px;
  color: var(--gold-300);
  font-family: Arial, sans-serif;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 28px;
  align-items: start;
}

.detail-main,
.detail-facts {
  padding: 30px;
  background: var(--card-background);
  border: 1px solid rgba(8, 24, 39, 0.1);
  border-radius: var(--homepage-radius);
  box-shadow: var(--homepage-shadow);
}

.detail-main h2,
.detail-facts h2 {
  margin-top: 0;
}

.detail-facts dl {
  display: grid;
  gap: 12px;
  margin: 0;
}

.detail-facts dl div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(8, 24, 39, 0.1);
}

.detail-facts dt,
.detail-facts dd {
  margin: 0;
  font-family: Arial, sans-serif;
}

.detail-facts dt {
  color: rgba(8, 24, 39, 0.62);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.detail-facts dd {
  color: var(--navy-950);
  font-size: 13px;
  font-weight: 800;
  text-align: right;
}

.detail-actions,
.detail-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.detail-tag-row span {
  padding: 7px 10px;
  color: var(--navy-950);
  background: #f5ead9;
  border: 1px solid rgba(8, 24, 39, 0.08);
  border-radius: 999px;
  font-family: Arial, sans-serif;
  font-size: 11px;
  font-weight: 900;
}

.profile-hero {
  position: relative;
  overflow: hidden;
  padding: 118px 0 72px;
  background:
    linear-gradient(90deg, rgba(4, 12, 22, 0.94), rgba(6, 17, 31, 0.58)),
    url("../../photos/headercastle.png") center / cover no-repeat;
}

.profile-hero-grid,
.profile-layout,
.profile-friends-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 460px);
  gap: 32px;
  align-items: center;
}

.profile-hero h1 {
  margin-bottom: 16px;
  color: var(--cream-100);
  font-size: 56px;
  line-height: 0.98;
}

.profile-hero p {
  max-width: 680px;
  color: rgba(247, 240, 228, 0.78);
}

.profile-passport-card,
.profile-panel,
.profile-list-card {
  background: var(--card-background);
  border: 1px solid rgba(8, 24, 39, 0.1);
  border-radius: var(--homepage-radius);
  box-shadow: var(--homepage-shadow);
}

.profile-passport-card {
  padding: 28px;
  color: var(--cream-100);
  background:
    linear-gradient(150deg, rgba(241, 201, 115, 0.18), transparent 35%),
    linear-gradient(135deg, #07111d, #10243b);
  border-color: rgba(241, 201, 115, 0.34);
}

.daily-quest-card {
  margin-top: 18px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(241, 201, 115, 0.22);
  border-radius: 6px;
}

.daily-quest-card span {
  display: block;
  margin-bottom: 7px;
  color: rgba(247, 240, 228, 0.72);
  font-family: Arial, sans-serif;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.daily-quest-card strong {
  display: block;
  color: var(--gold-300);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  line-height: 1.05;
}

.daily-quest-card p {
  margin: 6px 0 0;
  color: rgba(247, 240, 228, 0.76);
  font-family: Arial, sans-serif;
  font-size: 12px;
  font-weight: 700;
}

.profile-passport-card > span,
.profile-passport-card p,
.profile-passport-stamp-grid span,
.profile-form span,
.profile-castle-picker span,
.profile-friend-form span,
.trip-planner-form span,
.review-form span {
  font-family: Arial, sans-serif;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.profile-passport-card > strong {
  display: block;
  margin: 8px 0 24px;
  color: var(--gold-300);
  font-size: 34px;
  line-height: 1;
  text-transform: uppercase;
}

.profile-passport-stamp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}

.profile-passport-stamp-grid div {
  padding: 12px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(241, 201, 115, 0.18);
  border-radius: 6px;
}

.profile-passport-stamp-grid span {
  display: block;
  color: rgba(247, 240, 228, 0.68);
  letter-spacing: 0;
}

.profile-passport-stamp-grid strong {
  color: var(--gold-300);
  font-size: 28px;
  line-height: 1;
}

.profile-progress {
  background: rgba(255, 255, 255, 0.12);
}

.profile-section {
  padding-bottom: 36px;
}

.profile-layout {
  align-items: stretch;
}

.profile-panel,
.profile-list-card {
  padding: 24px;
}

.profile-panel h2,
.profile-list-heading h2 {
  margin-bottom: 14px;
  color: var(--navy-950);
  font-size: 28px;
}

.profile-panel-heading,
.profile-list-heading,
.profile-castle-item,
.profile-friend-item {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.profile-form,
.profile-castle-picker,
.profile-friend-form {
  display: grid;
  gap: 14px;
}

.profile-form label,
.profile-castle-picker label,
.profile-friend-form label {
  display: grid;
  gap: 8px;
}

.profile-form input,
.profile-form select,
.profile-castle-picker select,
.profile-friend-form input {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  color: var(--navy-950);
  background: #fffdf8;
  border: 1px solid rgba(8, 24, 39, 0.14);
  border-radius: 5px;
  font: 700 13px Arial, sans-serif;
}

.profile-save-note,
.profile-empty {
  margin: 14px 0 0;
  color: var(--slate-700);
  font-family: Arial, sans-serif;
  font-size: 13px;
  font-weight: 700;
}

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

.profile-muted-button {
  color: var(--navy-950);
  border-color: rgba(8, 24, 39, 0.18);
  background: #f6eddd;
}

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

.profile-list-heading {
  margin-bottom: 14px;
}

.profile-list-heading span {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  color: var(--navy-950);
  background: var(--gold-300);
  border-radius: 50%;
  font-family: Arial, sans-serif;
  font-weight: 900;
}

.profile-castle-list,
.profile-friend-list {
  display: grid;
  gap: 10px;
}

.profile-castle-item,
.profile-friend-item {
  padding: 13px;
  background: #fffaf1;
  border: 1px solid rgba(8, 24, 39, 0.08);
  border-radius: 6px;
}

.profile-castle-item strong,
.profile-friend-item strong {
  display: block;
  color: var(--navy-950);
  font-family: Arial, sans-serif;
  font-size: 13px;
  font-weight: 900;
}

.profile-castle-item span,
.profile-friend-item span {
  display: block;
  color: var(--slate-700);
  font-family: Arial, sans-serif;
  font-size: 12px;
  font-weight: 700;
}

.profile-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.trip-planner-section {
  background: #f7f0e4;
}

.trip-planner-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
  gap: 18px;
  align-items: stretch;
  margin-bottom: 18px;
}

.trip-planner-form,
.review-form {
  display: grid;
  gap: 14px;
}

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

.trip-planner-form label,
.review-form label {
  display: grid;
  gap: 8px;
}

.trip-planner-form input,
.trip-planner-form select,
.review-form select,
.review-form textarea {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  color: var(--navy-950);
  background: #fffdf8;
  border: 1px solid rgba(8, 24, 39, 0.14);
  border-radius: 5px;
  font: 700 13px Arial, sans-serif;
}

.review-form textarea {
  min-height: 96px;
  padding: 12px;
  resize: vertical;
}

.trip-route-card .profile-panel-heading > span {
  padding: 7px 10px;
  color: var(--navy-950);
  background: var(--gold-300);
  border-radius: 999px;
  font-family: Arial, sans-serif;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.trip-route-list,
.recommendation-grid,
.badge-grid,
.challenge-list,
.review-list {
  display: grid;
  gap: 10px;
}

.trip-route-item,
.challenge-card,
.review-item {
  display: grid;
  gap: 10px;
  padding: 13px;
  background: #fffaf1;
  border: 1px solid rgba(8, 24, 39, 0.08);
  border-radius: 6px;
}

.trip-route-item {
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
}

.trip-route-item > span {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: var(--navy-950);
  background: var(--gold-300);
  border-radius: 50%;
  font-family: Arial, sans-serif;
  font-weight: 900;
}

.trip-route-item strong,
.recommendation-card h3,
.challenge-card strong,
.review-item strong {
  display: block;
  color: var(--navy-950);
  font-family: Arial, sans-serif;
  font-size: 14px;
  font-weight: 900;
}

.trip-route-item small,
.recommendation-card p,
.challenge-card span,
.review-item p,
.review-item span {
  color: var(--slate-700);
  font-family: Arial, sans-serif;
  font-size: 12px;
  font-weight: 700;
}

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

.recommendation-card,
.badge-card {
  padding: 18px;
  background: var(--card-background);
  border: 1px solid rgba(8, 24, 39, 0.1);
  border-radius: var(--homepage-radius);
  box-shadow: var(--homepage-shadow);
}

.recommendation-card > span,
.badge-card > span {
  display: inline-flex;
  margin-bottom: 10px;
  padding: 6px 8px;
  color: var(--navy-950);
  background: #f6eddd;
  border-radius: 999px;
  font-family: Arial, sans-serif;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.recommendation-card h3 {
  margin-bottom: 8px;
  font-size: 18px;
}

.challenges-section {
  color: var(--cream-100);
  background: linear-gradient(135deg, #07111f, #10263c);
}

.challenges-section h2 {
  color: var(--cream-100);
}

.challenges-layout,
.challenge-review-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(420px, 1.15fr);
  gap: 24px;
  align-items: start;
}

.challenge-review-grid {
  margin-top: 24px;
}

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

.badge-card {
  color: var(--navy-950);
  background: #f6eddd;
  box-shadow: none;
}

.badge-card.is-earned {
  background:
    linear-gradient(145deg, rgba(241, 201, 115, 0.34), rgba(255, 250, 241, 0.96)),
    #fffaf1;
  border-color: rgba(201, 155, 58, 0.38);
}

.badge-card strong {
  display: block;
  margin-bottom: 6px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  line-height: 1;
}

.badge-card p {
  margin: 0;
  color: var(--slate-700);
  font-family: Arial, sans-serif;
  font-size: 13px;
  font-weight: 700;
}

.challenge-card > div:first-child,
.review-item > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.review-list {
  margin-top: 14px;
}

.review-item {
  background: #fffdf8;
}

.profile-friends-section {
  color: var(--cream-100);
  background: linear-gradient(135deg, #07111f, #10263c);
}

.profile-friends-layout {
  align-items: start;
}

.profile-friends-section h2 {
  color: var(--cream-100);
}

.profile-journey-section {
  background: #fffdf8;
}

.journey-map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 22px;
  align-items: stretch;
}

.journey-map-card,
.journey-insight-card {
  min-height: 100%;
}

.profile-journey-map {
  width: 100%;
  height: 420px;
  margin: 16px 0;
  overflow: hidden;
  background: #07111f;
  border: 1px solid rgba(8, 24, 39, 0.12);
  border-radius: 8px;
}

.journey-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.journey-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0;
}

.journey-stat-grid div {
  padding: 14px;
  background: #fffaf1;
  border: 1px solid rgba(8, 24, 39, 0.08);
  border-radius: 6px;
}

.journey-stat-grid span {
  display: block;
  margin-bottom: 6px;
  color: var(--slate-700);
  font-family: Arial, sans-serif;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.journey-stat-grid strong {
  display: block;
  color: var(--navy-950);
  font-size: 28px;
  line-height: 1;
}

.journey-stop-list {
  display: grid;
  gap: 10px;
}

.journey-stop-list article {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: #fffaf1;
  border: 1px solid rgba(8, 24, 39, 0.08);
  border-radius: 6px;
}

.journey-stop-list article > span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: var(--navy-950);
  background: var(--gold-300);
  border-radius: 50%;
  font-family: Arial, sans-serif;
  font-weight: 900;
}

.journey-stop-list strong {
  display: block;
  color: var(--navy-950);
  font-family: Arial, sans-serif;
  font-size: 13px;
  font-weight: 900;
}

.journey-stop-list p {
  margin: 3px 0 0;
  color: var(--slate-700);
  font-family: Arial, sans-serif;
  font-size: 12px;
  font-weight: 700;
}

.planner-hero,
.discover-hero {
  position: relative;
  overflow: hidden;
  padding: 118px 0 72px;
  background:
    linear-gradient(90deg, rgba(4, 12, 22, 0.94), rgba(6, 17, 31, 0.58)),
    url("../../photos/headercastle.png") center / cover no-repeat;
}

.planner-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
  gap: 28px;
  align-items: center;
}

.planner-hero h1,
.discover-hero h1 {
  max-width: 720px;
  margin-bottom: 16px;
  color: var(--cream-100);
  font-size: 56px;
  line-height: 0.98;
}

.planner-hero p,
.discover-hero p {
  max-width: 700px;
  color: rgba(247, 240, 228, 0.78);
}

.planner-hero-card,
.planner-control-panel,
.planner-route-panel,
.detail-review-panel,
.discover-profile-card,
.discover-main section,
.newsletter-form {
  padding: 24px;
  background: var(--card-background);
  border: 1px solid rgba(8, 24, 39, 0.1);
  border-radius: var(--homepage-radius);
  box-shadow: var(--homepage-shadow);
}

.planner-hero-card {
  color: var(--cream-100);
  background:
    linear-gradient(150deg, rgba(241, 201, 115, 0.2), transparent 40%),
    linear-gradient(135deg, #07111d, #10243b);
  border-color: rgba(241, 201, 115, 0.34);
}

.planner-hero-card span,
.discover-profile-card span,
.discover-idea-card span,
.campaign-card-grid span,
.newsletter-form span,
.planner-share-box span {
  display: block;
  margin-bottom: 8px;
  font-family: Arial, sans-serif;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.planner-hero-card strong {
  display: block;
  margin-bottom: 10px;
  color: var(--gold-300);
  font-size: 34px;
  line-height: 1;
}

.public-planner-section,
.discover-section {
  background: #f7f0e4;
}

.public-planner-layout,
.detail-reviews-layout,
.discover-layout,
.newsletter-campaign-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.8fr) minmax(0, 1.2fr);
  gap: 22px;
  align-items: start;
}

.planner-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.planner-share-box {
  display: grid;
  gap: 8px;
}

.planner-share-box input,
.newsletter-form input,
.newsletter-form select {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  color: var(--navy-950);
  background: #fffdf8;
  border: 1px solid rgba(8, 24, 39, 0.14);
  border-radius: 5px;
  font: 700 13px Arial, sans-serif;
}

.planner-map-preview {
  position: relative;
  min-height: 260px;
  margin: 18px 0;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(6, 17, 31, 0.9), rgba(16, 38, 60, 0.82)),
    radial-gradient(circle at 20% 30%, rgba(241, 201, 115, 0.22), transparent 24%),
    #07111f;
  border: 1px solid rgba(241, 201, 115, 0.2);
  border-radius: 8px;
}

.planner-map-preview::before {
  content: "";
  position: absolute;
  inset: 28px;
  border: 1px dashed rgba(241, 201, 115, 0.32);
  border-radius: 44% 56% 42% 58%;
}

.planner-map-preview p {
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 28px;
  color: rgba(247, 240, 228, 0.78);
  font-family: Arial, sans-serif;
  font-weight: 800;
}

.planner-map-stop {
  position: absolute;
  z-index: 2;
  display: grid;
  gap: 6px;
  transform: translate(-50%, -50%);
}

.planner-map-stop strong {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: var(--navy-950);
  background: var(--gold-300);
  border: 2px solid rgba(255, 250, 241, 0.8);
  border-radius: 50%;
  font-family: Arial, sans-serif;
  font-weight: 900;
}

.planner-map-stop small {
  max-width: 120px;
  padding: 5px 7px;
  color: var(--cream-100);
  background: rgba(4, 12, 22, 0.82);
  border-radius: 4px;
  font-family: Arial, sans-serif;
  font-size: 11px;
  font-weight: 800;
}

.planner-recommendations-section {
  background: #fffdf8;
}

.detail-reviews-section {
  background: #f7f0e4;
}

.detail-rating-meter {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin: 16px 0;
  padding: 16px;
  color: var(--navy-950);
  background: #fffaf1;
  border: 1px solid rgba(8, 24, 39, 0.08);
  border-radius: 6px;
}

.detail-rating-meter strong {
  font-size: 32px;
  line-height: 1;
}

.detail-rating-meter span,
.detail-public-review > span {
  color: #a56f09;
  font-family: Arial, sans-serif;
  font-weight: 900;
}

.detail-public-review p strong {
  color: var(--navy-950);
}

.discover-layout {
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
}

.discover-profile-card {
  position: sticky;
  top: 82px;
  color: var(--cream-100);
  background:
    linear-gradient(150deg, rgba(241, 201, 115, 0.2), transparent 42%),
    linear-gradient(135deg, #07111d, #10243b);
  border-color: rgba(241, 201, 115, 0.28);
}

.discover-profile-card strong {
  display: block;
  margin-bottom: 12px;
  color: var(--gold-300);
  font-size: 30px;
  line-height: 1;
}

.discover-profile-card p {
  color: rgba(247, 240, 228, 0.78);
}

.discover-main {
  display: grid;
  gap: 22px;
}

.discover-card-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 16px;
}

.discover-idea-grid,
.campaign-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.discover-idea-card,
.campaign-card-grid article {
  padding: 18px;
  background: #fffaf1;
  border: 1px solid rgba(8, 24, 39, 0.08);
  border-radius: 6px;
}

.discover-idea-card h3,
.campaign-card-grid strong {
  display: block;
  margin-bottom: 8px;
  color: var(--navy-950);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  line-height: 1.05;
}

.discover-idea-card p,
.campaign-card-grid p {
  color: var(--slate-700);
  font-family: Arial, sans-serif;
  font-size: 13px;
  font-weight: 700;
}

.newsletter-campaign-section {
  padding: 56px 0;
  color: var(--cream-100);
  background: linear-gradient(135deg, #07111f, #10263c);
}

.daily-castle-section {
  color: var(--cream-100);
  background:
    linear-gradient(135deg, rgba(7, 17, 31, 0.96), rgba(16, 38, 60, 0.9)),
    url("../../photos/scotland-eilean-donan-castle.png") center / cover no-repeat;
}

.daily-castle-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 28px;
  align-items: center;
}

.daily-castle-layout h2 {
  max-width: 720px;
  color: var(--cream-100);
  font-size: 46px;
  line-height: 1.02;
}

.daily-castle-layout p {
  max-width: 680px;
  color: rgba(247, 240, 228, 0.76);
}

.daily-streak-card {
  padding: 24px;
  color: var(--cream-100);
  background:
    linear-gradient(150deg, rgba(241, 201, 115, 0.22), transparent 42%),
    rgba(4, 12, 22, 0.72);
  border: 1px solid rgba(241, 201, 115, 0.28);
  border-radius: 8px;
}

.daily-streak-card span {
  display: block;
  margin-bottom: 8px;
  color: rgba(247, 240, 228, 0.76);
  font-family: Arial, sans-serif;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.daily-streak-card strong {
  display: block;
  color: var(--gold-300);
  font-size: 34px;
  line-height: 1;
}

.daily-streak-card p {
  margin: 10px 0 0;
  font-family: Arial, sans-serif;
  font-size: 13px;
  font-weight: 700;
}

.auth-hero {
  min-height: calc(100vh - var(--header-height));
  padding: 96px 0 72px;
  background:
    linear-gradient(90deg, rgba(4, 12, 22, 0.94), rgba(6, 17, 31, 0.62)),
    url("../../photos/headercastle.png") center / cover no-repeat;
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
  gap: 34px;
  align-items: center;
}

.auth-copy h1 {
  max-width: 720px;
  color: var(--cream-100);
  font-size: clamp(42px, 6vw, 68px);
  line-height: 0.96;
}

.auth-copy p {
  max-width: 620px;
  color: rgba(247, 240, 228, 0.78);
  font-family: Arial, sans-serif;
  font-size: 17px;
  font-weight: 700;
}

.auth-card,
.auth-required-card,
.profile-account-card {
  padding: 24px;
  background: var(--card-background);
  border: 1px solid rgba(8, 24, 39, 0.1);
  border-radius: var(--homepage-radius);
  box-shadow: var(--homepage-shadow);
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 16px;
  padding: 5px;
  background: #f6eddd;
  border-radius: 7px;
}

.auth-tabs button {
  min-height: 42px;
  color: var(--navy-950);
  background: transparent;
  border: 0;
  border-radius: 5px;
  font-family: Arial, sans-serif;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  cursor: pointer;
}

.auth-tabs button.is-active {
  background: var(--gold-300);
}

.auth-form {
  display: none;
  gap: 14px;
}

.auth-form.is-active {
  display: grid;
}

.auth-form label {
  display: grid;
  gap: 8px;
}

.auth-form span {
  color: var(--navy-950);
  font-family: Arial, sans-serif;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-form input {
  width: 100%;
  min-height: 46px;
  padding: 0 12px;
  color: var(--navy-950);
  background: #fffdf8;
  border: 1px solid rgba(8, 24, 39, 0.14);
  border-radius: 5px;
  font: 700 13px Arial, sans-serif;
}

.auth-form input:focus {
  border-color: var(--gold-500);
  outline: none;
  box-shadow: 0 0 0 3px rgba(201, 155, 58, 0.14);
}

.auth-message {
  min-height: 22px;
  margin: 0 0 14px;
  color: var(--slate-700);
  font-family: Arial, sans-serif;
  font-size: 13px;
  font-weight: 800;
}

.auth-message[data-type="success"] {
  color: #0b6b2d;
}

.auth-message[data-type="error"] {
  color: #9b1c1c;
}

.auth-message[data-type="pending"] {
  color: var(--gold-700);
}

.passport-hero {
  position: relative;
  overflow: hidden;
  padding: 118px 0 74px;
  background:
    linear-gradient(90deg, rgba(4, 12, 22, 0.95), rgba(8, 31, 45, 0.66)),
    url("../../photos/headercastle.png") center / cover no-repeat;
}

.passport-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 390px);
  gap: 34px;
  align-items: center;
}

.passport-hero h1 {
  max-width: 760px;
  margin-bottom: 16px;
  color: var(--cream-100);
  font-size: 56px;
  line-height: 0.98;
}

.passport-hero p {
  max-width: 660px;
  color: rgba(247, 240, 228, 0.78);
}

.passport-cover-card {
  min-height: 310px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 30px;
  color: var(--cream-100);
  background:
    linear-gradient(150deg, rgba(241, 201, 115, 0.2), transparent 36%),
    linear-gradient(135deg, #07111d, #10243b);
  border: 1px solid rgba(241, 201, 115, 0.34);
  border-radius: var(--homepage-radius);
  box-shadow: var(--homepage-shadow);
}

.passport-cover-card span,
.passport-progress-grid span,
.passport-castle-item span,
.passport-note-item span {
  font-family: Arial, sans-serif;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.passport-cover-card strong {
  color: var(--gold-300);
  font-size: 40px;
  line-height: 1;
  text-transform: uppercase;
}

.passport-cover-card p {
  margin: 0;
  color: rgba(247, 240, 228, 0.78);
  font-family: Arial, sans-serif;
  font-size: 13px;
  font-weight: 800;
}

.passport-dashboard-section {
  background: #fffaf1;
}

.passport-dashboard {
  display: grid;
  gap: 22px;
}

.passport-heading-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
}

.passport-heading-row h2 {
  margin: 0 0 8px;
  color: var(--navy-950);
  font-size: 34px;
}

.passport-heading-row p {
  margin: 0;
  color: var(--slate-700);
  font-family: Arial, sans-serif;
  font-weight: 700;
}

.passport-heading-row .passport-offline-note {
  margin-top: 10px;
  padding: 10px 12px;
  color: #6f2f00;
  background: #fff0cf;
  border: 1px solid rgba(190, 112, 0, 0.22);
  border-radius: 6px;
}

.passport-progress-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.passport-progress-grid article,
.passport-panel {
  background: var(--card-background);
  border: 1px solid rgba(8, 24, 39, 0.1);
  border-radius: var(--homepage-radius);
  box-shadow: var(--homepage-shadow);
}

.passport-progress-grid article {
  padding: 20px;
}

.passport-progress-grid span {
  color: var(--gold-700);
}

.passport-progress-grid strong {
  display: block;
  margin: 10px 0 6px;
  color: var(--navy-950);
  font-size: 34px;
  line-height: 1;
}

.passport-progress-grid p {
  margin: 0;
  color: var(--slate-700);
  font-family: Arial, sans-serif;
  font-size: 13px;
  font-weight: 700;
}

.passport-list-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.passport-panel {
  padding: 24px;
}

.passport-list,
.passport-notes-list {
  display: grid;
  gap: 10px;
}

.passport-castle-item,
.passport-note-item,
.passport-empty-state {
  padding: 15px;
  background: #fffaf1;
  border: 1px solid rgba(8, 24, 39, 0.08);
  border-radius: 6px;
}

.passport-castle-item {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.passport-castle-item strong,
.passport-note-item strong,
.passport-empty-state strong {
  display: block;
  color: var(--navy-950);
  font-family: Arial, sans-serif;
  font-size: 15px;
}

.passport-castle-item span,
.passport-note-item span {
  display: block;
  margin-top: 4px;
  color: var(--slate-700);
  letter-spacing: 0;
}

.passport-note-item p,
.passport-empty-state p {
  margin: 10px 0 0;
  color: var(--slate-700);
  font-family: Arial, sans-serif;
  font-size: 13px;
  line-height: 1.55;
  font-weight: 700;
}

.passport-note-item .text-btn,
.passport-empty-state .text-btn {
  display: inline-block;
  margin-top: 10px;
}

.offline-banner {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 9999;
  max-width: min(420px, calc(100vw - 28px));
  padding: 12px 14px;
  color: var(--navy-950);
  background: var(--gold-300);
  border: 1px solid rgba(8, 24, 39, 0.18);
  border-radius: 6px;
  box-shadow: 0 14px 36px rgba(8, 24, 39, 0.22);
  font-family: Arial, sans-serif;
  font-size: 13px;
  font-weight: 900;
}

.offline-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(90deg, rgba(4, 12, 22, 0.94), rgba(6, 17, 31, 0.72)),
    url("../../photos/headercastle.png") center / cover no-repeat;
}

.offline-card {
  width: min(640px, 100%);
  padding: 32px;
  background: var(--card-background);
  border: 1px solid rgba(241, 201, 115, 0.28);
  border-radius: var(--homepage-radius);
  box-shadow: var(--homepage-shadow);
}

.offline-card h1 {
  margin: 0 0 12px;
  color: var(--navy-950);
  font-size: 42px;
  line-height: 1;
}

.offline-card p {
  color: var(--slate-700);
}

@media (max-width: 820px) {
  .nav-toggle {
    position: relative;
    z-index: 1001;
    display: grid;
    place-content: center;
    width: 44px;
    height: 44px;
    cursor: pointer;
  }

  .primary-nav {
    display: none;
  }

  .primary-nav.is-open {
    display: grid;
    flex: 1 0 100%;
    order: 10;
    width: 100%;
    gap: 0;
    padding: 8px 0 4px;
    background: rgba(3, 14, 27, 0.98);
  }

  .primary-nav.is-open a,
  .primary-nav.is-open button {
    display: flex;
    width: 100%;
    min-height: 46px;
    align-items: center;
    padding: 13px 6px;
    border-top: 1px solid rgba(247, 240, 228, 0.12);
  }
}

@media (max-width: 920px) {
  .passport-hero-grid,
  .passport-list-layout {
    grid-template-columns: 1fr;
  }

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

  .passport-heading-row {
    align-items: start;
    flex-direction: column;
  }

  .passport-heading-row .btn {
    width: 100%;
    min-height: 48px;
  }
}

@media (max-width: 640px) {
  .passport-hero {
    padding: 96px 0 52px;
  }

  .passport-hero h1 {
    font-size: 40px;
  }

  .passport-cover-card {
    min-height: 230px;
  }

  .passport-panel {
    padding: 18px;
  }

  .passport-progress-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .passport-progress-grid article {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4px 12px;
    align-items: center;
    padding: 16px;
  }

  .passport-progress-grid strong {
    grid-row: span 2;
    margin: 0;
    font-size: 30px;
    text-align: right;
  }

  .passport-castle-item {
    align-items: start;
    flex-direction: column;
  }

  .passport-castle-item .btn {
    width: 100%;
    min-height: 46px;
  }

  .offline-card {
    padding: 24px;
  }

  .offline-card h1 {
    font-size: 34px;
  }
}

.profile-auth-pending .auth-protected,
.auth-logged-out .auth-protected {
  display: none;
}

.auth-logged-in #profile-auth-gate {
  display: none;
}

.profile-account-section {
  padding-bottom: 0;
}

.profile-account-card h2 {
  margin-bottom: 6px;
}

.profile-account-card p:last-child,
.auth-required-card p {
  color: var(--slate-700);
  font-family: Arial, sans-serif;
  font-weight: 700;
}

.newsletter-campaign-grid {
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 420px);
}

.newsletter-copy h2 {
  max-width: 620px;
  color: var(--cream-100);
  font-size: 38px;
  line-height: 1.05;
}

.newsletter-copy p {
  max-width: 650px;
  color: rgba(247, 240, 228, 0.76);
}

.newsletter-form {
  color: var(--navy-950);
}

.campaign-card-grid {
  grid-column: 1 / -1;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media print {
  .site-header,
  .planner-control-panel,
  .planner-recommendations-section,
  .site-footer {
    display: none !important;
  }

  .planner-hero,
  .public-planner-section {
    padding: 0;
    color: #000;
    background: #fff;
  }

  .public-planner-layout {
    display: block;
  }

  .planner-route-panel {
    box-shadow: none;
  }
}

@media (max-width: 820px) {
  .header-inner {
    flex-wrap: wrap;
    padding: 12px 0;
    gap: 18px;
  }

  .nav-toggle {
    display: block;
  }

  .primary-nav,
  .header-cta {
    display: none;
  }

  .primary-nav.is-open {
    display: grid;
    flex-basis: 100%;
    gap: 0;
    padding: 8px 0;
  }

  .primary-nav.is-open a {
    padding: 14px 0;
    border-top: 1px solid rgba(247, 240, 228, 0.12);
  }

  .map-layout,
  .passport-grid,
  .popular-map-layout,
  .detail-layout,
  .profile-hero-grid,
  .profile-layout,
  .profile-friends-layout,
  .trip-planner-layout,
  .journey-map-layout,
  .planner-hero-grid,
  .public-planner-layout,
  .detail-reviews-layout,
  .discover-layout,
  .newsletter-campaign-grid,
  .daily-castle-layout,
  .challenges-layout,
  .challenge-review-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: var(--hero-height-tablet);
    padding: var(--hero-text-y) 0 132px;
  }

  .search-panel {
    left: 50%;
    transform: translateX(-50%);
  }

  .search-filters {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }

  .search-filters .btn {
    grid-column: 1 / -1;
  }

  .castle-visual {
    min-height: 440px;
  }

  .castle-card {
    height: 440px;
  }

  .country-grid,
  .castle-grid,
  .popular-castle-grid,
  .listing-castle-grid,
  .profile-list-grid,
  .recommendation-grid,
  .discover-card-grid,
  .discover-idea-grid,
  .campaign-card-grid,
  .badge-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .listing-search {
    grid-column: 1 / -1;
  }

  #castle-map {
    height: max(var(--map-panel-height), 360px);
  }
}

@media (max-width: 720px) {
  .container {
    width: min(100% - 28px, var(--container));
  }

  .section {
    padding: var(--section-spacing) 0;
  }

  .hero {
    min-height: var(--hero-height-mobile);
    padding: var(--hero-text-y) 0 140px;
  }

  .countries {
    padding-top: calc(var(--country-section-top) + var(--search-reserved-space));
  }

  .countries .container {
    width: min(100% - 28px, var(--container));
    max-width: none;
    margin-left: auto;
    margin-right: auto;
  }

  .search-panel,
  .passport-card,
  .footer-grid,
  .country-grid,
  .castle-grid,
  .education-grid,
  .popular-castle-grid,
  .listing-castle-grid,
  .listing-toolbar,
  .profile-list-grid,
  .profile-action-grid,
  .trip-form-grid,
  .journey-stat-grid,
  .recommendation-grid,
  .discover-card-grid,
  .discover-idea-grid,
  .campaign-card-grid,
  .badge-grid {
    grid-template-columns: 1fr;
  }

  .listing-hero h1,
  .detail-hero h1,
  .profile-hero h1,
  .planner-hero h1,
  .discover-hero h1 {
    font-size: 42px;
  }

  .discover-profile-card {
    position: static;
  }

  .listing-results-heading {
    display: grid;
  }

  .search-panel {
    bottom: max(var(--search-panel-offset), -70px);
    width: min(100% - 28px, var(--search-panel-width));
    padding: 22px 16px 16px;
  }

  .search-filters {
    grid-template-columns: 1fr;
  }

  .search-panel .btn {
    width: 100%;
  }

  .split-heading {
    display: block;
  }

  .castle-visual,
  .map-preview {
    min-height: 380px;
  }

  #castle-map {
    height: max(var(--map-panel-height), 320px);
  }

  .castle-card {
    height: 380px;
  }

  .map-pin {
    min-width: auto;
    padding: 8px 10px;
    font-size: 12px;
  }

  .pin-bamburgh { left: 52%; }
  .pin-warwick { left: 44%; }
  .pin-dover { left: 55%; }

  .passport-cover {
    min-height: 230px;
    transform: none;
  }

  .site-footer nav {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 440px) {
  .header-actions {
    display: none;
  }

  .brand strong {
    font-size: 21px;
  }

  .brand small {
    max-width: 160px;
    font-size: 12px;
  }

  .brand small span {
    width: 24px;
  }

  .hero-actions,
  .card-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }
}

/* ═══════════════════════════════════════════════════════════════════════
   ENHANCEMENTS v2 — scroll reveals, micro-interactions, polish
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Scroll-reveal ─────────────────────────────────────────── */
.reveal-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.55s ease, transform 0.55s ease;
  transition-delay: var(--delay, 0s);
}
.reveal-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-stat {
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.48s ease, transform 0.48s ease;
  transition-delay: var(--delay, 0s);
}
.reveal-stat.is-visible {
  opacity: 1;
  transform: scale(1);
}

/* ── Button enhancements ───────────────────────────────────── */
.btn {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  letter-spacing: 0.04em;
}
.btn::after {
  position: absolute;
  inset: 0;
  content: "";
  background: rgba(255, 255, 255, 0);
  transition: background 200ms ease;
}
.btn:hover::after { background: rgba(255, 255, 255, 0.08); }
.btn-gold:hover {
  background: linear-gradient(135deg, #edc867, #d4a640);
  box-shadow: 0 18px 36px rgba(201, 155, 58, 0.38);
}
.btn-outline:hover,
.btn-ghost:hover {
  background: rgba(241, 201, 115, 0.06);
}

/* Sign Up button pulse */
.header-cta.btn-gold {
  animation: subtle-pulse 4s ease-in-out infinite;
}
@keyframes subtle-pulse {
  0%, 100% { box-shadow: 0 14px 30px rgba(201, 155, 58, 0.22); }
  50% { box-shadow: 0 14px 38px rgba(201, 155, 58, 0.46); }
}

/* ── Header: active nav underline on scroll ────────────────── */
.site-header {
  transition: box-shadow 250ms ease, background 250ms ease;
}
.site-header.is-scrolled {
  box-shadow: 0 12px 38px rgba(0, 0, 0, 0.34);
}
.primary-nav a.is-current::after {
  transform: scaleX(1);
}

/* ── Hero enhancements ─────────────────────────────────────── */
.hero-copy {
  animation: hero-entrance 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes hero-entrance {
  from { opacity: 0; transform: translateY(32px); }
  to   { opacity: 1; transform: translateY(0); }
}
h1 span:first-child { animation-delay: 0s; }
h1 span:last-child  { animation-delay: 0.12s; }
.hero-title { animation: hero-entrance 0.9s 0.18s cubic-bezier(0.22, 1, 0.36, 1) both; }
.hero-text  { animation: hero-entrance 0.9s 0.28s cubic-bezier(0.22, 1, 0.36, 1) both; }
.hero-actions { animation: hero-entrance 0.9s 0.38s cubic-bezier(0.22, 1, 0.36, 1) both; }

/* Search panel entrance */
.search-panel {
  animation: panel-rise 0.8s 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes panel-rise {
  from { opacity: 0; transform: translateX(calc(-50% + var(--search-panel-x))) translateY(18px); }
  to   { opacity: 1; transform: translateX(calc(-50% + var(--search-panel-x))) translateY(0); }
}

/* ── Country card hover sparkle ────────────────────────────── */
.country-card {
  cursor: pointer;
}
.country-card::after {
  display: block;
  position: absolute;
  inset: 0;
  z-index: 3;
  content: "";
  background: linear-gradient(135deg, rgba(241, 201, 115, 0) 0%, rgba(241, 201, 115, 0.12) 100%);
  opacity: 0;
  transition: opacity 250ms ease;
}
.country-card:hover::after { opacity: 1; }
.country-card:hover .country-badge {
  transform: scale(1.08);
}
.country-badge {
  transition: transform 250ms ease;
}
.country-card:hover h3 {
  color: var(--gold-300);
  text-shadow: 0 2px 10px rgba(241, 201, 115, 0.4);
}
.country-card h3 {
  transition: color 250ms ease, text-shadow 250ms ease;
}

/* ── Castle card improvements ──────────────────────────────── */
.popular-castle-card:hover .popular-castle-image {
  transform: scale(1.04);
}
.popular-castle-image {
  overflow: hidden;
  transition: transform 350ms ease;
}
.popular-castle-card:hover .popular-badge {
  background: linear-gradient(135deg, #e5be61, #c99b3a);
}

/* Better "MARK VISITED" button */
.popular-actions .visited-button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.popular-actions .visited-button::before {
  content: "✓";
  font-size: 9px;
  font-weight: 900;
}
.popular-actions .visited-button.is-visited::before {
  content: "✓";
}

/* ── Map panel expand button ───────────────────────────────── */
.map-heading-row {
  justify-content: space-between;
}
.map-expand-btn {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: var(--navy-950);
  background: #f0e8d8;
  border: 1px solid rgba(8, 24, 39, 0.12);
  border-radius: 5px;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}
.map-expand-btn:hover {
  background: var(--gold-300);
  transform: scale(1.08);
}

/* ── Map open bar pin icon ─────────────────────────────────── */
.map-open-bar {
  gap: 8px;
}
.map-open-bar-pin {
  position: relative;
  display: inline-block;
  width: 10px;
  height: 13px;
  border: 2px solid currentColor;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  flex-shrink: 0;
}
.map-open-bar-pin::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 3px;
  height: 3px;
  content: "";
  background: currentColor;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

/* ── Map cluster numbers (Leaflet override) ────────────────── */
.leaflet-marker-icon .castle-map-marker {
  transition: transform 150ms ease, box-shadow 150ms ease;
}
.leaflet-marker-icon:hover .castle-map-marker {
  transform: scale(1.15);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5);
}

/* ── Journey panel: list icon variants ────────────────────── */
.journey-li-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  color: var(--navy-950);
  background: var(--gold-300);
  border-radius: 5px;
  font-family: Arial, sans-serif;
  font-size: 8px;
  font-weight: 900;
  transition: transform 200ms ease;
}
.journey-panel li:hover .journey-li-icon {
  transform: scale(1.12) rotate(3deg);
}
.journey-li-ca { font-size: 7px; }

/* ── Passport book improvements ───────────────────────────── */
.passport-book {
  transition: transform 300ms ease, box-shadow 300ms ease;
}
.passport-book:hover {
  transform: rotate(5deg) translateY(-4px) !important;
  box-shadow: -22px 22px 0 rgba(5, 14, 25, 0.74), 0 30px 56px rgba(0, 0, 0, 0.48) !important;
}
.passport-shield {
  position: relative;
  width: 28px;
  height: 32px;
  margin: 0 auto 10px;
  border: 2px solid var(--gold-500);
  border-radius: 4px 4px 50% 50%;
}
.passport-shield::before {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 14px;
  content: "";
  background: var(--gold-500);
  clip-path: polygon(0 0, 22% 0, 22% 24%, 39% 24%, 39% 0, 61% 0, 61% 24%, 78% 24%, 78% 0, 100% 0, 100% 100%, 63% 100%, 63% 68%, 37% 68%, 37% 100%, 0 100%);
  transform: translate(-50%, -50%);
}

/* ── Stats bar: counter animation ─────────────────────────── */
.stats-strip strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 34px;
  background: linear-gradient(135deg, var(--cream-100), var(--gold-300));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stats-strip article {
  transition: background 250ms ease;
}
.stats-strip article:hover {
  background: rgba(241, 201, 115, 0.08);
}
.stats-strip p {
  letter-spacing: 0.06em;
}

/* ── Stats icon variants ───────────────────────────────────── */
.stat-door::before {
  inset: 6px 10px 6px 10px;
  border: 2px solid var(--gold-500);
  border-top-width: 0;
}
.stat-door::after {
  position: absolute;
  top: 10px;
  left: 50%;
  width: 18px;
  height: 18px;
  content: "";
  border: 2px solid var(--gold-500);
  border-radius: 50% 50% 0 0;
  transform: translateX(-50%);
}
.stat-book::before {
  inset: 7px 9px;
  border: 2px solid var(--gold-500);
  border-radius: 2px;
}
.stat-book::after {
  position: absolute;
  left: 9px;
  top: 11px;
  width: 2px;
  height: 20px;
  content: "";
  background: var(--gold-500);
}
.stat-shield::before {
  inset: 5px 8px;
  border: 2px solid var(--gold-500);
  border-radius: 4px 4px 50% 50%;
}
.stat-users::before {
  top: 4px;
  left: 6px;
  width: 11px;
  height: 11px;
  border: 2px solid var(--gold-500);
  border-radius: 50%;
}
.stat-users::after {
  position: absolute;
  bottom: 6px;
  left: 3px;
  width: 16px;
  height: 10px;
  content: "";
  border: 2px solid var(--gold-500);
  border-radius: 12px 12px 4px 4px;
  border-bottom: 0;
}

/* ── Footer bottom bar ─────────────────────────────────────── */
.footer-bottom {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid rgba(247, 240, 228, 0.1);
}
.footer-bottom .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-bottom p {
  margin: 0;
  color: rgba(247, 240, 228, 0.52);
  font-family: Arial, sans-serif;
  font-size: 12px;
  font-weight: 700;
}

/* Footer brand panel: stack logo + description */
.footer-brand-panel {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}
.footer-description {
  margin-top: 16px;
}
.footer-grid {
  grid-template-columns: minmax(200px, 1.2fr) repeat(4, minmax(110px, 0.7fr));
}

/* Social links: proper icon sizing */
.social-links a {
  transition: background 200ms ease, color 200ms ease, border-color 200ms ease, transform 200ms ease;
}
.social-links a:hover {
  color: var(--navy-950);
  background: var(--gold-300);
  border-color: var(--gold-300);
  transform: translateY(-3px);
}
.social-links svg {
  pointer-events: none;
}

/* ── Search panel: hover/focus glow ───────────────────────── */
.search-panel {
  transition: box-shadow 250ms ease;
}
.search-panel:focus-within {
  box-shadow: 0 26px 58px rgba(2, 11, 21, 0.36), 0 0 0 1px rgba(241, 201, 115, 0.6);
}
.search-panel input:focus {
  box-shadow: none;
  outline: none;
}

/* ── Active nav indicator ──────────────────────────────────── */
.primary-nav a:hover {
  color: var(--gold-300);
  transition: color 180ms ease;
}

/* ── Castle card action button polish ──────────────────────── */
.popular-actions .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(9, 24, 39, 0.18);
}

/* ── Loader spinner for map ────────────────────────────────── */
#castle-map {
  transition: opacity 300ms ease;
}

/* ── Journey panel list hover ─────────────────────────────── */
.journey-panel li {
  transition: transform 200ms ease;
}
.journey-panel li:hover {
  transform: translateX(4px);
}

/* ── Feature item hover ────────────────────────────────────── */
.feature-item {
  transition: transform 200ms ease;
}
.feature-item:hover {
  transform: translateY(-3px);
}
.feature-item:hover .line-icon {
  color: var(--gold-500);
  border-color: var(--gold-500);
}
.line-icon {
  transition: color 200ms ease, border-color 200ms ease;
}

/* ── Heading castle icon: gold on hover ────────────────────── */
.popular-heading-row:hover .heading-castle-icon,
.feature-heading:hover .feature-heading-icon {
  border-color: var(--gold-500);
}
.heading-castle-icon,
.feature-heading-icon,
.journey-icon {
  transition: border-color 200ms ease;
}

/* ── Newsletter form input focus ───────────────────────────── */
.newsletter-form input:focus,
.newsletter-form select:focus {
  border-color: var(--gold-500);
  outline: none;
  box-shadow: 0 0 0 3px rgba(201, 155, 58, 0.14);
}

/* ── Campaign card hover ───────────────────────────────────── */
.campaign-card-grid article {
  transition: transform 200ms ease, box-shadow 200ms ease;
}
.campaign-card-grid article:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(9, 24, 39, 0.14);
}
.campaign-card-grid span {
  display: inline-flex;
  margin-bottom: 8px;
  padding: 4px 8px;
  color: var(--navy-950);
  background: var(--gold-300);
  border-radius: 999px;
  font-family: Arial, sans-serif;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

/* ── Scroll behavior active header ────────────────────────── */
@keyframes stat-count-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Responsive footer fix ─────────────────────────────────── */
@media (max-width: 820px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .footer-brand-panel {
    grid-column: 1 / -1;
  }
  .footer-bottom .container {
    flex-direction: column;
    text-align: center;
  }
  .map-expand-btn { display: none; }
}
@media (max-width: 720px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .stats-strip {
    grid-template-columns: repeat(2, 1fr);
  }
  .stats-strip article:last-child {
    grid-column: 1 / -1;
    border-right: 0;
    border-top: 1px solid rgba(247, 240, 228, 0.16);
  }
  .experience-grid {
    grid-template-columns: 1fr;
  }
  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .journey-panel {
    grid-template-columns: 1fr;
  }
  .journey-account-stats {
    grid-template-columns: 1fr;
  }
  .passport-stack { display: none; }
}

/* Responsive stability pass: public website */
img,
svg,
video,
canvas,
iframe {
  max-width: 100%;
}

input,
select,
textarea,
button {
  max-width: 100%;
}

.site-header,
.section,
.site-footer,
main {
  max-width: 100%;
}

.container > *,
.hero-content > *,
.header-inner > *,
.popular-map-layout > *,
.experience-grid > *,
.profile-hero-grid > *,
.profile-layout > *,
.trip-planner-layout > *,
.journey-map-layout > *,
.planner-hero-grid > *,
.public-planner-layout > *,
.discover-layout > *,
.newsletter-campaign-grid > *,
.daily-castle-layout > *,
.detail-layout > *,
.detail-reviews-layout > *,
.challenges-layout > *,
.challenge-review-grid > *,
.footer-grid > * {
  min-width: 0;
}

h1,
h2,
h3,
p,
a,
span,
strong,
small,
label {
  overflow-wrap: break-word;
}

@media (max-width: 1180px) {
  :root {
    --header-menu-gap: 14px;
    --header-menu-font-size: 11px;
    --popular-map-side-width: 320px;
  }

  .header-inner {
    width: min(100% - 32px, var(--header-content-max-width));
  }

  .primary-nav {
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .primary-nav::-webkit-scrollbar {
    display: none;
  }

  .header-actions .btn {
    min-width: auto;
    padding-inline: 12px;
  }

  .popular-map-layout,
  .experience-grid,
  .auth-layout,
  .listing-toolbar {
    grid-template-columns: 1fr;
  }

  .map-panel,
  .live-map-card,
  #castle-map {
    min-height: 360px;
  }

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

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

  .footer-brand-panel,
  .footer-description {
    grid-column: span 3;
  }
}

@media (max-width: 820px) {
  :root {
    --section-spacing: 52px;
    --hero-height-tablet: auto;
    --hero-height-mobile: auto;
    --search-reserved-space: 0px;
  }

  .container,
  .hero-content,
  .popular-map-layout,
  .country-grid,
  .header-inner {
    width: min(100% - 32px, var(--container));
  }

  .site-header {
    position: sticky;
  }

  .header-inner {
    min-height: 64px;
    padding: 10px 0;
    gap: 10px;
  }

  .brand {
    min-width: 0;
    max-width: calc(100% - 58px);
  }

  .brand strong {
    font-size: 18px;
  }

  .brand small {
    justify-content: flex-start;
  }

  .nav-toggle {
    display: grid;
    place-content: center;
    flex: 0 0 44px;
  }

  .primary-nav {
    order: 10;
    display: none;
    flex: 1 0 100%;
    width: 100%;
    max-height: calc(100vh - 82px);
    overflow-y: auto;
    padding: 8px 0 4px;
    background: rgba(3, 14, 27, 0.98);
  }

  .primary-nav.is-open {
    display: grid;
  }

  .primary-nav.is-open a {
    display: flex;
    width: 100%;
    padding: 13px 4px;
    font-size: 13px;
  }

  .primary-nav.is-open button {
    display: flex;
    width: 100%;
    padding: 13px 4px;
    font-size: 13px;
  }

  .header-actions {
    margin-left: auto;
  }

  .header-cta {
    display: none;
  }

  .hero,
  .auth-hero,
  .profile-hero,
  .planner-hero,
  .discover-hero,
  .listing-hero,
  .detail-hero {
    min-height: auto;
    padding: 76px 0 34px;
  }

  .hero {
    display: grid;
    gap: 20px;
    padding-bottom: 24px;
  }

  .hero-content {
    transform: none;
  }

  .hero-copy {
    width: min(100%, 560px);
  }

  h1,
  .profile-hero h1,
  .planner-hero h1,
  .discover-hero h1,
  .listing-hero h1,
  .detail-hero h1 {
    max-width: 100%;
    font-size: clamp(30px, 7vw, 46px);
    line-height: 1.02;
  }

  .hero-title,
  .newsletter-copy h2,
  .daily-castle-layout h2 {
    font-size: clamp(28px, 7vw, 40px);
  }

  .hero-text,
  .section-copy,
  .listing-hero p,
  .detail-hero p,
  .planner-hero p,
  .discover-hero p,
  .profile-hero p {
    max-width: 100%;
    font-size: 15px;
    line-height: 1.55;
  }

  .search-panel {
    position: relative;
    left: auto;
    bottom: auto;
    width: min(100% - 32px, 760px);
    min-height: 0;
    margin: 0 auto;
    transform: none !important;
    animation: none;
  }

  .countries {
    padding-top: 36px;
  }

  .popular-heading-row,
  .map-heading-row,
  .profile-panel-heading,
  .profile-list-heading,
  .listing-results-heading {
    align-items: flex-start;
  }

  .popular-heading-row,
  .profile-panel-heading,
  .profile-list-heading,
  .listing-results-heading {
    flex-direction: column;
  }

  .heading-rule {
    display: none;
  }

  .popular-heading-title {
    min-width: 0;
  }

  .popular-castle-card,
  .listing-castle-card,
  .castle-card {
    height: auto;
    min-height: 0;
  }

  .popular-actions,
  .card-actions,
  .profile-item-actions,
  .journey-action-row,
  .planner-tools {
    justify-content: flex-start;
  }

  .trip-route-item {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .trip-route-item .profile-item-actions,
  .trip-route-item > .btn,
  .trip-route-item > a {
    grid-column: 1 / -1;
  }

  .detail-facts dl div {
    display: grid;
    gap: 4px;
  }

  .detail-main,
  .detail-facts,
  .profile-panel,
  .profile-list-card,
  .planner-control-panel,
  .planner-route-panel,
  .detail-review-panel,
  .discover-main section,
  .newsletter-form,
  .journey-map-card,
  .journey-insight-card {
    padding: 20px;
  }

  .profile-journey-map {
    height: 340px;
  }
}

@media (max-width: 720px) {
  :root {
    --section-spacing: 44px;
  }

  .container,
  .hero-content,
  .popular-map-layout,
  .country-grid,
  .header-inner {
    width: min(100% - 24px, var(--container));
  }

  .section {
    padding: var(--section-spacing) 0;
  }

  .hero,
  .auth-hero,
  .profile-hero,
  .planner-hero,
  .discover-hero,
  .listing-hero,
  .detail-hero {
    padding: 46px 0 28px;
  }

  .search-panel {
    width: min(100% - 24px, 560px);
    padding: 16px;
  }

  .search-main input {
    min-height: 42px;
  }

  .search-filters {
    gap: 8px;
  }

  .country-grid,
  .popular-castle-grid,
  .listing-castle-grid,
  .profile-list-grid,
  .recommendation-grid,
  .badge-grid,
  .discover-card-grid,
  .discover-idea-grid,
  .campaign-card-grid,
  .feature-grid,
  .stats-strip,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .country-card {
    min-height: 170px;
  }

  .feature-heading {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .feature-heading-rule {
    display: none;
  }

  .feature-item {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .stats-strip article,
  .stats-strip article:last-child {
    grid-column: auto;
    border-top: 0;
    border-right: 0;
    border-bottom: 1px solid rgba(247, 240, 228, 0.16);
  }

  .stats-strip article:last-child {
    border-bottom: 0;
  }

  .journey-panel {
    padding: 22px 18px;
  }

  .passport-stack {
    display: none;
  }

  .listing-toolbar,
  .trip-form-grid,
  .profile-action-grid,
  .journey-stat-grid {
    grid-template-columns: 1fr;
  }

  .profile-passport-stamp-grid {
    grid-template-columns: 1fr;
  }

  .profile-castle-item,
  .profile-friend-item,
  .review-item > div:first-child,
  .challenge-card > div:first-child {
    display: grid;
    justify-content: stretch;
  }

  .profile-item-actions .btn,
  .journey-action-row .btn,
  .planner-tools .btn,
  .hero-actions .btn {
    width: 100%;
  }

  .profile-journey-map,
  .planner-map-preview,
  #castle-map {
    height: 300px;
    min-height: 300px;
  }

  .footer-brand-panel {
    justify-items: start;
  }

  .footer-brand {
    justify-items: start;
  }

  .footer-brand strong {
    text-align: left;
  }

  .footer-description {
    max-width: none;
    margin-top: 0;
  }
}

@media (max-width: 480px) {
  .header-actions {
    display: none;
  }

  .brand-mark {
    width: 28px;
    height: 34px;
  }

  .brand strong {
    font-size: 16px;
  }

  .brand small {
    font-size: 10px;
    gap: 5px;
  }

  .brand small span {
    width: 18px;
  }

  .nav-toggle {
    width: 42px;
    height: 42px;
  }

  h1,
  .profile-hero h1,
  .planner-hero h1,
  .discover-hero h1,
  .listing-hero h1,
  .detail-hero h1 {
    font-size: clamp(28px, 8.4vw, 34px);
    line-height: 1.08;
  }

  .hero-title,
  .profile-passport-card > strong,
  .planner-hero-card strong,
  .discover-profile-card strong,
  .daily-streak-card strong {
    font-size: clamp(25px, 8vw, 31px);
  }

  .eyebrow {
    font-size: 10px;
    letter-spacing: 0.14em;
  }

  h2 {
    font-size: clamp(26px, 8vw, 34px);
  }

  .btn {
    min-height: 44px;
    padding-inline: 14px;
    white-space: normal;
    text-align: center;
  }

  .popular-castle-body,
  .recommendation-card,
  .badge-card,
  .discover-idea-card,
  .campaign-card-grid article {
    padding: 16px;
  }

  .detail-main,
  .detail-facts,
  .profile-panel,
  .profile-list-card,
  .planner-control-panel,
  .planner-route-panel,
  .detail-review-panel,
  .discover-main section,
  .newsletter-form,
  .journey-map-card,
  .journey-insight-card {
    padding: 16px;
  }

  .line-icon {
    width: 36px;
    height: 36px;
  }

  .social-links {
    gap: 8px;
  }
}

/* Premium auth page polish */
.auth-page {
  background: var(--navy-950);
}

.auth-page .auth-hero {
  position: relative;
  isolation: isolate;
  display: grid;
  min-height: calc(100vh - var(--header-height));
  padding: 72px 0 92px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(4, 12, 22, 0.96), rgba(6, 17, 31, 0.74) 48%, rgba(6, 17, 31, 0.42)),
    url("../../photos/headercastle.png") center / cover no-repeat;
}

.auth-page .auth-hero::after {
  position: absolute;
  inset: auto 0 0;
  z-index: -1;
  height: 220px;
  content: "";
  background: linear-gradient(180deg, rgba(6, 17, 31, 0), #06111f);
}

.auth-page .auth-layout {
  width: min(100% - 56px, 1120px);
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 460px);
  gap: 56px;
  align-items: center;
  justify-content: center;
}

.auth-page .auth-copy {
  max-width: 610px;
}

.auth-page .auth-copy h1 {
  margin-bottom: 18px;
  color: var(--cream-100);
  font-size: clamp(44px, 5.6vw, 72px);
  line-height: 0.95;
  text-transform: uppercase;
}

.auth-page .auth-copy p:not(.eyebrow) {
  max-width: 560px;
  color: rgba(247, 240, 228, 0.82);
  font-family: Arial, sans-serif;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.65;
}

.auth-page .auth-card {
  position: relative;
  width: 100%;
  padding: 30px;
  color: var(--navy-950);
  background:
    linear-gradient(180deg, rgba(255, 250, 241, 0.98), rgba(255, 253, 248, 0.96)),
    #fffdf8;
  border: 1px solid rgba(241, 201, 115, 0.34);
  border-radius: 8px;
  box-shadow: 0 34px 80px rgba(0, 0, 0, 0.34);
}

.auth-page .auth-card::before {
  position: absolute;
  inset: 10px;
  content: "";
  pointer-events: none;
  border: 1px solid rgba(201, 155, 58, 0.18);
  border-radius: 6px;
}

.auth-card-heading {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(8, 24, 39, 0.1);
}

.auth-card-heading .brand-mark {
  flex: 0 0 auto;
  width: 38px;
  height: 46px;
}

.auth-card-heading .eyebrow {
  margin: 0 0 5px;
  color: var(--gold-700);
  font-size: 10px;
  letter-spacing: 0.12em;
}

.auth-card-heading h2 {
  margin: 0;
  color: var(--navy-950);
  font-size: 28px;
  line-height: 1;
  text-transform: uppercase;
}

.auth-page .auth-tabs,
.auth-page .auth-message,
.auth-page .auth-form {
  position: relative;
  z-index: 1;
}

.auth-page .auth-tabs {
  gap: 0;
  margin-bottom: 18px;
  padding: 4px;
  background: #efe5d2;
  border: 1px solid rgba(8, 24, 39, 0.08);
  border-radius: 7px;
}

.auth-page .auth-tabs button {
  min-height: 44px;
  color: rgba(6, 17, 31, 0.72);
  border-radius: 5px;
  transition: background 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.auth-page .auth-tabs button.is-active {
  color: var(--navy-950);
  background: linear-gradient(135deg, #f1c973, #d8a945);
  box-shadow: 0 10px 20px rgba(201, 155, 58, 0.2);
}

.auth-page .auth-form {
  gap: 16px;
}

.auth-page .auth-form label {
  gap: 7px;
}

.auth-page .auth-form input {
  min-height: 50px;
  padding: 0 14px;
  color: var(--navy-950);
  background: #fffaf1;
  border: 1px solid rgba(8, 24, 39, 0.16);
  border-radius: 6px;
  font-size: 14px;
}

.auth-page .auth-form .btn {
  width: 100%;
  min-height: 50px;
  margin-top: 2px;
  border-radius: 6px;
  font-size: 12px;
  letter-spacing: 0.08em;
}

.auth-page .auth-message {
  display: grid;
  align-items: center;
  min-height: 0;
  margin: 0 0 16px;
  padding: 0;
  color: var(--slate-700);
  font-size: 13px;
  line-height: 1.45;
}

.auth-page .auth-message:not(:empty) {
  min-height: 42px;
  padding: 11px 13px;
  background: #f6eddd;
  border: 1px solid rgba(8, 24, 39, 0.08);
  border-radius: 6px;
}

.auth-page .auth-message[data-type="success"]:not(:empty) {
  color: #0b5d1e;
  background: #e5f6e9;
  border-color: rgba(11, 93, 30, 0.18);
}

.auth-page .auth-message[data-type="error"]:not(:empty) {
  color: #8a1f1f;
  background: #fde7e7;
  border-color: rgba(138, 31, 31, 0.18);
}

.auth-page .auth-message[data-type="pending"]:not(:empty) {
  color: var(--gold-700);
  background: #fff4d6;
  border-color: rgba(201, 155, 58, 0.24);
}

.auth-form-note {
  margin: -2px 0 0;
  color: rgba(38, 57, 75, 0.76);
  font-family: Arial, sans-serif;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
}

.auth-page + .site-footer,
body:has(.auth-page) .site-footer {
  margin-top: 0;
}

@media (max-width: 1180px) {
  .auth-page .auth-layout {
    grid-template-columns: minmax(0, 720px);
    gap: 30px;
  }

  .auth-page .auth-copy {
    max-width: 720px;
    text-align: center;
    margin: 0 auto;
  }

  .auth-page .auth-copy p:not(.eyebrow) {
    margin-left: auto;
    margin-right: auto;
  }

  .auth-page .auth-card {
    max-width: 500px;
    margin: 0 auto;
  }
}

@media (max-width: 720px) {
  .auth-page .auth-hero {
    padding: 42px 0 58px;
  }

  .auth-page .auth-layout {
    width: min(100% - 24px, 520px);
    gap: 22px;
  }

  .auth-page .auth-copy h1 {
    font-size: clamp(32px, 9vw, 42px);
    line-height: 1.02;
  }

  .auth-page .auth-copy p:not(.eyebrow) {
    font-size: 14px;
  }

  .auth-page .auth-card {
    padding: 22px;
  }

  .auth-card-heading {
    gap: 12px;
    margin-bottom: 18px;
    padding-bottom: 15px;
  }

  .auth-card-heading h2 {
    font-size: 22px;
  }

  .auth-card-heading .brand-mark {
    width: 32px;
    height: 39px;
  }

  .auth-page .auth-tabs {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .auth-page .auth-card {
    padding: 18px;
  }

  .auth-page .auth-card::before {
    inset: 7px;
  }

  .auth-page .auth-form input,
  .auth-page .auth-form .btn {
    min-height: 48px;
  }
}
