.adaptive-welcome {
  position: absolute;
  top: clamp(1rem, 2vw, 1.4rem);
  right: max(16px, calc((100vw - var(--max)) / 2));
  z-index: 4;
  display: inline-flex;
  align-items: center;
  padding: 0.62rem 0.95rem;
  border: 1px solid rgba(255, 250, 241, 0.22);
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(10, 15, 42, 0.62), rgba(10, 15, 42, 0.34));
  color: #fffaf1;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(14px);
  transition: background 420ms ease, color 420ms ease, border-color 420ms ease, box-shadow 420ms ease;
}

.adaptive-welcome-copy {
  min-width: 0;
  display: flex;
  gap: 0;
  align-items: center;
  overflow: hidden;
}

.adaptive-welcome strong {
  min-width: 0;
  margin: 0;
  color: inherit;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.94rem;
  font-weight: 850;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-updates-strip {
  position: relative;
  z-index: 2;
  padding: 0;
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.96) 0%, rgba(238, 245, 248, 0.98) 100%);
  color: var(--ink-dark);
}

.home-updates-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.55rem;
  min-height: 62px;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.home-updates-track {
  position: relative;
  display: flex;
  gap: 0.55rem;
  min-width: 0;
  overflow-x: auto;
  padding: 0.08rem 0.18rem;
  scroll-behavior: smooth;
  scrollbar-width: none;
  mask-image: linear-gradient(90deg, transparent 0, #000 18px, #000 calc(100% - 18px), transparent 100%);
}

.home-updates-carousel {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border-radius: 999px;
}

.home-updates-carousel::before,
.home-updates-carousel::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 2;
  width: 58px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.18s ease;
}

.home-updates-carousel::before {
  left: 0;
  background: linear-gradient(90deg, rgba(238, 245, 248, 0.98), rgba(238, 245, 248, 0));
}

.home-updates-carousel::after {
  right: 0;
  background: linear-gradient(270deg, rgba(238, 245, 248, 0.98), rgba(238, 245, 248, 0));
}

.home-updates-carousel.can-scroll-left::before,
.home-updates-carousel.can-scroll-right::after {
  opacity: 1;
}

.home-updates-nav {
  appearance: none;
  position: absolute;
  top: 50%;
  z-index: 3;
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(217, 192, 140, 0.34);
  border-radius: 999px;
  background: rgba(255, 250, 241, 0.9);
  color: var(--night-deep);
  box-shadow: 0 12px 28px rgba(8, 22, 47, 0.12);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%) scale(0.94);
  transition: opacity 0.18s ease, transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.home-updates-nav svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.home-updates-prev {
  left: 6px;
}

.home-updates-next {
  right: 6px;
}

.home-updates-carousel.can-scroll-left .home-updates-prev,
.home-updates-carousel.can-scroll-right .home-updates-next {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(-50%) scale(1);
}

.home-updates-nav:hover,
.home-updates-nav:focus-visible {
  border-color: rgba(176, 122, 29, 0.42);
  background: #fffaf1;
  transform: translateY(-50%) scale(1.04);
}

.home-updates-track::-webkit-scrollbar {
  display: none;
}

.home-updates-label,
.home-updates-track a,
.home-updates-all {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  border-radius: 999px;
  white-space: nowrap;
}

.home-updates-label {
  padding: 0.42rem 0.8rem;
  background: rgba(217, 192, 140, 0.22);
  color: #8b672c;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.home-updates-track a,
.home-updates-all {
  padding: 0.42rem 0.86rem;
  border: 1px solid rgba(8, 22, 47, 0.09);
  background: rgba(255, 255, 255, 0.72);
  color: #263244;
  font-size: 0.9rem;
  font-weight: 760;
  text-decoration: none;
  box-shadow: 0 10px 22px rgba(8, 22, 47, 0.045);
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.home-updates-track a:hover,
.home-updates-all:hover {
  transform: translateY(-1px);
  border-color: rgba(176, 122, 29, 0.24);
  background: #fff;
}

.home-updates-all {
  color: var(--night-deep) !important;
  background: linear-gradient(135deg, #f0d894, #d9c08c) !important;
  border-color: rgba(176, 122, 29, 0.2) !important;
  box-shadow: 0 12px 28px rgba(176, 122, 29, 0.12) !important;
}

.home-updates-strip + .orientation-panel {
  padding-top: clamp(30px, 4.4vw, 54px);
  padding-bottom: clamp(38px, 5vw, 62px);
  background:
    radial-gradient(circle at 86% 8%, rgba(217, 192, 140, 0.18), transparent 34%),
    radial-gradient(circle at 14% 78%, rgba(143, 189, 187, 0.12), transparent 38%),
    linear-gradient(180deg, #eef5f8 0%, #f8fafc 100%);
  color: var(--ink-dark);
}

.orientation-support-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: flex-end;
}

.adaptive-proof-band {
  background:
    radial-gradient(circle at 16% 100%, rgba(217, 192, 140, 0.14), transparent 34%),
    radial-gradient(circle at 88% 18%, rgba(143, 189, 187, 0.11), transparent 36%),
    linear-gradient(180deg, #f8fafc 0%, #eef4f8 100%);
  color: var(--night-deep);
  margin-top: -1px;
  padding: clamp(22px, 3.2vw, 38px) 0 clamp(24px, 4vw, 46px);
}

.adaptive-proof-inner {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  padding-top: 0;
  padding-bottom: 0;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.06);
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.07);
}

.adaptive-proof-inner span {
  min-height: 4.4rem;
  display: grid;
  place-items: center;
  padding: 1rem;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(248, 250, 252, 0.58));
  color: #243041;
  font-weight: 900;
  text-align: center;
}

.adaptive-proof-band + .reassurance-section {
  margin-top: 0;
  padding-top: clamp(42px, 5.2vw, 72px) !important;
}

body[data-ambient="night"] .adaptive-proof-band {
  background:
    linear-gradient(180deg, #0f172a 0%, #101936 100%);
}

body[data-ambient="night"] .adaptive-proof-inner {
  border-color: rgba(217, 192, 140, 0.16);
  background: rgba(217, 192, 140, 0.12);
}

body[data-ambient="night"] .adaptive-proof-inner span {
  background: rgba(255, 255, 255, 0.055);
  color: #fffaf1;
}

body[data-ambient="light"] .adaptive-welcome {
  border-color: rgba(255, 255, 255, 0.34);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(238, 246, 244, 0.52));
  color: #172033;
}

body[data-ambient="light"] .home-hero::before {
  background:
    linear-gradient(90deg, rgba(10, 15, 42, 0.48) 0%, rgba(30, 44, 58, 0.22) 48%, rgba(255, 255, 255, 0.02) 86%),
    rgba(244, 247, 250, 0.04);
}

body[data-ambient="light"] .home-hero-copy {
  border-color: rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.22);
}

body[data-ambient="light"] .home-updates-strip + .orientation-panel {
  background:
    linear-gradient(180deg, #f5faf9 0%, #fbfcfd 100%);
}

body[data-ambient="warm"] .adaptive-welcome {
  border-color: rgba(255, 250, 241, 0.36);
  background:
    linear-gradient(135deg, rgba(248, 243, 231, 0.76) 0%, rgba(238, 244, 237, 0.54) 100%);
  color: #172033;
}

body[data-ambient="warm"] .home-hero::before {
  background:
    linear-gradient(90deg, rgba(10, 15, 42, 0.58) 0%, rgba(45, 37, 31, 0.28) 46%, rgba(255, 245, 225, 0.04) 84%),
    rgba(217, 192, 140, 0.04);
}

body[data-ambient="warm"] .home-updates-strip + .orientation-panel {
  background:
    linear-gradient(180deg, #f8f3e7 0%, #f8fafc 100%);
}

body[data-ambient="night"] .adaptive-welcome {
  background:
    linear-gradient(135deg, rgba(7, 11, 31, 0.76), rgba(20, 34, 67, 0.46));
}

body[data-ambient="night"] .home-hero::before {
  background:
    linear-gradient(90deg, rgba(7, 11, 31, 0.78) 0%, rgba(7, 11, 31, 0.44) 48%, rgba(7, 11, 31, 0.08) 86%),
    rgba(7, 11, 31, 0.2);
}

.entry-gate {
  max-width: 1120px;
  margin: 0 auto;
}

.entry-gate-panel {
  position: relative;
  overflow: hidden;
  padding: clamp(1.35rem, 3.2vw, 2.35rem);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 10px;
  background:
    radial-gradient(circle at 92% 4%, rgba(217, 192, 140, 0.2), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(238, 245, 248, 0.94));
  color: var(--ink-dark);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.08);
}

.entry-gate-panel:focus {
  outline: none;
}

.entry-gate-head {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  justify-content: space-between;
}

.entry-gate h2 {
  max-width: 880px;
  margin: 0;
  color: var(--night-deep);
  font-size: clamp(1.75rem, 3vw, 3rem);
  line-height: 1.08;
}

.entry-gate h2:focus {
  outline: none;
}

.entry-gate h2:focus-visible {
  outline: 3px solid rgba(217, 192, 140, 0.72);
  outline-offset: 8px;
  border-radius: 8px;
}

.entry-gate .lead {
  max-width: 840px;
  margin: 1rem 0 0;
  color: #52606d;
}

.entry-gate-progress {
  display: inline-flex;
  margin: 0 0 0.55rem;
  padding: 0.28rem 0.64rem;
  border: 1px solid rgba(180, 122, 29, 0.2);
  border-radius: 999px;
  background: rgba(217, 192, 140, 0.16);
  color: #7d6232;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.entry-gate-progress[hidden],
.entry-gate-controls[hidden],
.entry-gate-reset[hidden] {
  display: none;
}

.entry-gate-start-actions,
.entry-gate-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-top: 1.35rem;
}

.entry-gate-start-actions span {
  color: var(--muted-dark);
  font-size: 0.92rem;
  font-weight: 750;
}

.entry-gate-reset {
  flex: 0 0 auto;
  min-height: 2.5rem;
  padding: 0 0.85rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
  color: #435162;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 850;
  cursor: pointer;
}

.entry-gate-reset:hover,
.entry-gate-reset:focus-visible {
  background: rgba(15, 23, 42, 0.1);
}

.entry-gate-choice-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 1.35rem;
}

.entry-gate-choice {
  position: relative;
  display: flex;
  min-height: 92px;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 1rem;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 8px;
  background:
    radial-gradient(circle at 94% 8%, rgba(217, 192, 140, 0.16), transparent 34%),
    rgba(255, 255, 255, 0.88);
  color: #243041;
  font: inherit;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
  transition: transform 220ms ease, border-color 220ms ease, background 220ms ease, box-shadow 220ms ease;
}

.entry-gate-choice span {
  color: var(--night-deep);
  font-size: 1rem;
  font-weight: 850;
  line-height: 1.25;
}

.entry-gate-choice strong {
  display: inline-flex;
  width: max-content;
  min-height: 1.65rem;
  align-items: center;
  padding: 0.18rem 0.58rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
  color: var(--muted-dark);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.entry-gate-choice:hover,
.entry-gate-choice:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(182, 122, 29, 0.36);
  background: #fffaf1;
  box-shadow: 0 20px 44px rgba(15, 23, 42, 0.1);
}

.entry-gate-choice:focus-visible,
.entry-gate-reset:focus-visible,
.entry-gate-alternative-toggle:focus-visible,
.entry-gate-alternative-panel a:focus-visible,
.entry-gate-alternative-panel button:focus-visible {
  outline: 3px solid rgba(217, 192, 140, 0.72);
  outline-offset: 3px;
}

.entry-gate-choice[aria-pressed="true"] {
  border-color: rgba(182, 122, 29, 0.62);
  background:
    linear-gradient(135deg, rgba(255, 250, 241, 0.98), rgba(244, 247, 250, 0.94));
  box-shadow: inset 0 0 0 2px rgba(217, 192, 140, 0.34), 0 20px 44px rgba(15, 23, 42, 0.1);
}

.entry-gate-choice[aria-pressed="true"]::after {
  content: "";
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 50%;
  background: var(--amber-deep);
  box-shadow: 0 0 0 5px rgba(217, 192, 140, 0.22);
}

.entry-gate-choice[aria-pressed="true"] strong {
  background: var(--night-deep);
  color: #fffaf1;
}

.entry-gate-result-intro {
  max-width: 900px;
}

.entry-gate-note {
  max-width: 880px;
  margin: 1rem 0 0;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(180, 122, 29, 0.18);
  border-radius: 8px;
  background: rgba(217, 192, 140, 0.12);
  color: #4d5968;
  font-size: 0.95rem;
  line-height: 1.6;
}

.entry-gate-result-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.35rem;
}

.entry-gate-card {
  position: relative;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  padding: 1.15rem;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 8px;
  background:
    radial-gradient(circle at 94% 8%, rgba(217, 192, 140, 0.18), transparent 34%),
    linear-gradient(145deg, #ffffff 0%, #eef4f7 100%);
  color: var(--ink-dark);
  text-decoration: none;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.07);
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.entry-gate-card:hover,
.entry-gate-card:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(182, 122, 29, 0.38);
  box-shadow: 0 24px 56px rgba(15, 23, 42, 0.12);
}

.entry-gate-card > span {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  min-height: 1.7rem;
  align-items: center;
  padding: 0.18rem 0.58rem;
  border-radius: 999px;
  background: rgba(217, 192, 140, 0.22);
  color: #7d6232;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.entry-gate-card h3 {
  margin: 0.85rem 0 0.5rem;
  color: var(--night-deep);
  font-size: clamp(1.1rem, 1.5vw, 1.35rem);
  line-height: 1.16;
}

.entry-gate-card p {
  margin: 0;
  color: #52606d;
  line-height: 1.58;
}

.entry-gate-card small {
  margin-top: 0.85rem;
  color: #6f5322;
  font-weight: 850;
}

.entry-gate-card strong {
  margin-top: auto;
  padding-top: 1rem;
  color: var(--night-deep);
  font-size: 0.95rem;
}

.entry-gate-card strong::after {
  content: " →";
}

.entry-gate-alternative-toggle {
  margin-top: 1.2rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: #6f5322;
  font: inherit;
  font-weight: 850;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  cursor: pointer;
}

.entry-gate-alternative-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.85rem;
}

.entry-gate-alternative-panel[hidden] {
  display: none;
}

.entry-gate-alternative-panel a,
.entry-gate-alternative-panel button {
  display: inline-flex;
  min-height: 2.45rem;
  align-items: center;
  padding: 0 0.85rem;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--night-deep);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
}

.entry-gate-noscript {
  margin-top: 1.2rem;
  padding: 1rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.entry-gate-noscript h3 {
  margin: 0 0 0.5rem;
  color: var(--night-deep);
}

.entry-gate-noscript div {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 0.9rem;
}

body[data-ambient="night"] .entry-gate-panel {
  background:
    radial-gradient(circle at 92% 4%, rgba(217, 192, 140, 0.2), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(236, 242, 246, 0.9));
}

@media (max-width: 860px) {
  .adaptive-welcome {
    left: auto;
    right: 16px;
    top: 0.8rem;
    max-width: calc(100% - 32px);
  }
  .adaptive-proof-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .orientation-support-actions {
    justify-content: flex-start;
  }

  .entry-gate-head {
    display: block;
  }

  .entry-gate-reset {
    margin-top: 0.9rem;
  }

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

  .entry-gate-result-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .home-updates-inner {
    grid-template-columns: 1fr auto;
    gap: 0.5rem;
  }

  .home-updates-label {
    grid-column: 1 / -1;
    width: max-content;
  }

  .home-updates-track {
    mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 18px), transparent 100%);
  }

  .home-updates-carousel {
    grid-column: 1;
  }

  .home-updates-nav {
    display: none;
  }

  .home-updates-track a,
  .home-updates-all {
    min-height: 34px;
    padding: 0.38rem 0.72rem;
    font-size: 0.84rem;
  }

  .adaptive-welcome {
    padding: 0.54rem 0.78rem;
    border-radius: 8px;
  }
  .adaptive-proof-inner {
    grid-template-columns: 1fr;
  }
  .home-updates-strip + .orientation-panel {
    padding-top: 24px;
    padding-bottom: 34px;
  }

  .entry-gate-panel {
    padding: 1.15rem;
  }

  .entry-gate h2 {
    font-size: clamp(1.5rem, 8vw, 2.05rem);
  }

  .entry-gate-choice-grid {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }

  .entry-gate-choice {
    min-height: 72px;
  }

  .entry-gate-start-actions .btn,
  .entry-gate-controls .btn,
  .entry-gate-alternative-panel a,
  .entry-gate-alternative-panel button {
    width: 100%;
    justify-content: center;
  }

  .entry-gate-start-actions span {
    width: 100%;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .entry-gate-choice,
  .entry-gate-card,
  .entry-gate-reset,
  .entry-gate-alternative-panel a,
  .entry-gate-alternative-panel button {
    transition: none;
  }

  .entry-gate-choice:hover,
  .entry-gate-choice:focus-visible,
  .entry-gate-card:hover,
  .entry-gate-card:focus-visible {
    transform: none;
  }
}

