:root {
  --red: #e30613;
  --red-dark: #b6000b;
  --yellow: #ffd21f;
  --black: #111;
  --ink: #171717;
  --muted: #626262;
  --line: #dedede;
  --soft: #f5f5f3;
  --paper: #fff;
  --radius: 8px;
  --nav: 0px;
  --shadow: 0 18px 44px rgba(0, 0, 0, .12);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  margin: 0;
  color: var(--ink);
  background: #f3f0ec;
  font-family: "Heebo", Arial, sans-serif;
}

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

button {
  font: inherit;
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

.app-shell {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(255,255,255,.04), rgba(255,255,255,.28), rgba(255,255,255,.04)),
    url("assets/racing-light-bg.png") center / cover,
    #f7f7f6;
}

.app-shell::before,
.app-shell::after {
  display: none;
}

.brand {
  justify-self: end;
  width: 210px;
  border: 0;
  padding: 0;
  background: transparent;
}

.brand img {
  width: 100%;
  height: 66px;
  object-fit: contain;
}

.nav-cta {
  justify-self: start;
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0 24px;
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  text-decoration: none;
  font-weight: 900;
  box-shadow: 0 12px 28px rgba(227, 6, 19, .22);
}

.nav-cta::before {
  content: "<";
  font-size: 30px;
  line-height: 1;
}

.nav-cta::after {
  content: "TEL";
  font-size: 22px;
}

.viewport {
  position: relative;
  z-index: 2;
  height: 100vh;
}

.screen {
  position: absolute;
  inset: 0;
  transition: opacity .45s ease, transform .58s cubic-bezier(.2, .8, .2, 1), filter .45s ease;
}

.branch-screen {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  padding: clamp(14px, 1.8vw, 28px) clamp(22px, 3vw, 54px) 22px;
}

.selection-hero {
  display: grid;
  grid-template-columns: auto 1fr;
  justify-items: stretch;
  align-items: center;
  gap: 8px;
  margin-bottom: clamp(12px, 1.7vw, 24px);
}

.selection-hero .hero-logo {
  grid-column: 1;
  grid-row: 1 / span 2;
  justify-self: end;
  width: clamp(88px, 7vw, 132px);
  height: auto;
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, .22));
}

.selection-hero p {
  grid-column: 2;
  margin: 0;
  color: rgba(20, 20, 20, .68);
  font-size: clamp(1.08rem, 1.16vw, 1.28rem);
  font-weight: 800;
  text-align: center;
}

.selection-title {
  grid-column: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin: 0;
  text-align: center;
  animation: titleDrift 5.5s ease-in-out infinite;
}

.selection-title h1 {
  margin: 0;
  color: var(--black);
  font-size: clamp(2.45rem, 3.65vw, 4.55rem);
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0;
  text-shadow: 0 18px 36px rgba(255, 255, 255, .85);
}

.selection-title h1 .title-accent {
  color: var(--red);
  font: inherit;
  letter-spacing: 0;
  position: relative;
  display: inline-block;
  animation: titlePulse 2.8s ease-in-out infinite;
}

.selection-title span {
  color: var(--red);
  font-size: clamp(1.4rem, 2vw, 2.25rem);
  font-weight: 900;
  letter-spacing: -2px;
  animation: chevronRace 1.4s ease-in-out infinite alternate;
}

.branch-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 1.45vw, 24px);
  align-items: stretch;
}

.branch-card {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-rows: minmax(220px, 42%) minmax(0, 1fr);
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 22px 52px rgba(0, 0, 0, .16);
  animation: cardIn .58s cubic-bezier(.2, .8, .2, 1) both;
  animation-delay: var(--delay);
  transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease, filter .28s ease;
  isolation: isolate;
}

.branch-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(100deg, transparent 18%, rgba(255, 255, 255, .32) 34%, transparent 46%);
  transform: translateX(55%);
  transition: transform .55s cubic-bezier(.2, .8, .2, 1);
  pointer-events: none;
}

.branch-card::after {
  content: "";
  position: absolute;
  z-index: 4;
  inset-inline: 18px;
  bottom: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--red), var(--yellow), var(--red));
  box-shadow: 0 0 22px rgba(227, 6, 19, .28);
}

.branch-card:hover {
  transform: translateY(-9px);
  border-color: rgba(227, 6, 19, .62);
  box-shadow: 0 32px 72px rgba(0, 0, 0, .2);
  filter: saturate(1.08);
}

.branch-card:hover::before {
  transform: translateX(-72%);
}

.branch-main {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 0;
  align-content: center;
  align-items: end;
  border: 0;
  border-radius: 0;
  padding: 18px 22px 24px;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, .12), rgba(0, 0, 0, .22) 38%, rgba(0, 0, 0, .82)),
    var(--card-bg) center / cover;
  box-shadow: none;
  backdrop-filter: none;
  text-align: center;
  z-index: 2;
}

.branch-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}

.branch-kicker {
  display: none;
  color: rgba(17, 17, 17, .56);
  font-size: .95rem;
  font-weight: 900;
}

.branch-status {
  justify-self: center;
  align-self: start;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  margin-bottom: 0;
  padding: 6px 18px;
  color: #111;
  background: var(--yellow);
  border-radius: 999px;
  font-size: clamp(.92rem, .98vw, 1.08rem);
  font-weight: 900;
  box-shadow: 0 12px 26px rgba(0, 0, 0, .22);
}

.branch-status.is-open {
  color: #061d0e;
  background: #29d66d;
  box-shadow: 0 12px 26px rgba(41, 214, 109, .28);
}

.branch-status.is-soon {
  color: #111;
  background: var(--yellow);
}

.branch-status.is-closed {
  background: #333;
}

.branch-main h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(2rem, 2.5vw, 3rem);
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0;
  text-shadow: 0 12px 28px rgba(0, 0, 0, .42);
}

.branch-badges {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 12px 0 0;
}

.branch-badges span {
  min-width: 82px;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 11px;
  color: #111;
  background: var(--yellow);
  border-radius: 999px;
  font-size: .9rem;
  font-weight: 900;
  letter-spacing: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);
}

.branch-badges span:first-child {
  color: #fff;
  background: var(--red);
}

.branch-body {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  min-height: 0;
  padding: 20px 24px 22px;
  color: var(--black);
  background:
    linear-gradient(180deg, rgba(255,255,255,.96), #fff);
  z-index: 2;
}

.branch-facts {
  display: grid;
  gap: 10px;
  margin: 0 0 14px;
  color: var(--black);
  font-size: clamp(1rem, 1.05vw, 1.16rem);
}

.branch-body p {
  max-width: 560px;
  margin: 2px 0 16px;
  color: #4d4d4d;
  font-size: clamp(.96rem, .98vw, 1.08rem);
  font-weight: 650;
  line-height: 1.5;
}

.branch-facts div {
  display: grid;
  grid-template-columns: 124px 1fr;
  gap: 14px;
  align-items: center;
  min-height: 46px;
  border-bottom: 1px solid #e7e7e7;
}

.branch-facts div:first-child {
  min-height: 54px;
  margin: 0 -8px 4px;
  padding: 0 8px;
  border: 1px solid rgba(227, 6, 19, .12);
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(227, 6, 19, .06), rgba(255, 255, 255, .72));
}

.branch-facts dt {
  color: #4a4a4a;
  font-weight: 900;
  white-space: nowrap;
}

.branch-facts dt::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 18px;
  margin-left: 9px;
  border: 2px solid var(--red);
  border-radius: 50%;
  vertical-align: -4px;
}

.branch-facts div:nth-child(2) dt::before {
  border-radius: 45% 45% 45% 8px;
  transform: rotate(-45deg);
}

.branch-facts dd {
  margin: 0;
  color: #2f2f2f;
  font-weight: 650;
}

.branch-facts div:first-child dd {
  color: #111;
  font-size: 1.08em;
  font-weight: 900;
}

.mini-track {
  min-height: 0;
  display: grid;
  align-items: end;
  padding: 4px 0 6px;
  transition: transform .3s ease;
}

.track-photo {
  width: min(100%, 900px);
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 18px 26px rgba(0, 0, 0, .12));
}

.track-shadow {
  fill: #fafafa;
  stroke: #d1d1d1;
  stroke-width: 2;
}

.track-asphalt {
  fill: #f7f7f7;
  stroke: #b9b9b9;
  stroke-width: 2;
}

.track-inner {
  fill: none;
  stroke: #fff;
  stroke-width: 30;
}

.track-curbs {
  fill: none;
  stroke: var(--red);
  stroke-width: 5;
  stroke-dasharray: 10 16;
  stroke-linecap: round;
  opacity: .92;
}

.track-motion-path {
  fill: none;
  stroke: transparent;
  stroke-width: 1;
}

.svg-kart rect {
  fill: var(--red);
  filter: drop-shadow(14px 0 8px rgba(227, 6, 19, .35));
}

.svg-kart circle {
  fill: #111;
}

.finish {
  font-size: 24px;
  fill: #111;
}

.card-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin-top: 0;
}

.card-actions button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  color: var(--black);
  background: #fff;
  box-shadow: none;
  font-size: clamp(.9rem, .94vw, 1.02rem);
  font-weight: 900;
  transition: transform .2s ease, border-color .2s ease, color .2s ease, background .2s ease;
  backdrop-filter: none;
}

.card-actions button span {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: var(--red);
  background: rgba(227, 6, 19, .08);
  font-size: .78rem;
  flex: 0 0 auto;
}

.card-actions .primary-action {
  min-height: 48px;
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  border-color: var(--red);
  font-size: clamp(.94rem, 1vw, 1.08rem);
  box-shadow: 0 14px 28px rgba(227, 6, 19, .24);
}

.card-actions .primary-action span {
  background: rgba(255, 255, 255, .18);
  color: #fff;
}

.card-actions button:hover {
  color: #fff;
  border-color: var(--red);
  background: var(--red);
  transform: translateY(-3px);
}

.card-actions button:hover span {
  color: var(--red);
  background: #fff;
}

.branch-card:hover .mini-track {
  transform: translateY(-5px) scale(1.02);
}

.detail-screen {
  opacity: 0;
  pointer-events: none;
  transform: translateY(24px) scale(.99);
  filter: blur(5px);
  padding: 26px clamp(28px, 5vw, 72px) 34px;
}

.app-shell.is-detail .branch-screen {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-24px) scale(.99);
  filter: blur(5px);
}

.app-shell.is-detail .detail-screen {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
  filter: blur(0);
}

.app-shell.is-transitioning::selection {
  background: transparent;
}

.app-shell.is-transitioning .viewport::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 50;
  background:
    linear-gradient(90deg, transparent, rgba(227, 6, 19, .96), var(--yellow), transparent);
  transform: translateX(120%);
  animation: raceWipe .62s cubic-bezier(.7, 0, .2, 1);
}

.back-button {
  border: 0;
  margin-bottom: 10px;
  padding: 8px 0;
  color: var(--black);
  background: transparent;
  font-weight: 800;
}

.back-button::before {
  content: "<";
  display: inline-block;
  margin-left: 9px;
  font-size: 25px;
  vertical-align: -2px;
}

.detail-layout {
  height: calc(100% - 124px);
  display: grid;
  grid-template-columns: minmax(310px, 32%) minmax(0, 1fr);
  gap: clamp(22px, 4vw, 64px);
  align-items: center;
}

.branch-info-panel h2 {
  margin: 0;
  font-size: clamp(2.3rem, 4vw, 4rem);
  line-height: 1;
  font-weight: 900;
}

.branch-info-panel p {
  max-width: 420px;
  margin: 10px 0 20px;
  color: var(--muted);
  font-size: clamp(1rem, 1.1vw, 1.18rem);
  line-height: 1.55;
}

.detail-facts {
  display: grid;
  gap: 10px;
}

.detail-facts div {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 10px;
  align-items: start;
}

.detail-facts span {
  color: var(--black);
  font-weight: 900;
}

.detail-facts strong {
  font-weight: 500;
}

.primary-actions {
  display: flex;
  gap: 14px;
  margin-top: 26px;
}

.primary-link,
.share-link {
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-weight: 900;
}

.primary-link {
  min-width: 250px;
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  box-shadow: 0 18px 34px rgba(227, 6, 19, .2);
}

.primary-link::before {
  content: "<";
  margin-left: 14px;
  font-size: 30px;
  line-height: 1;
}

.share-link {
  width: 64px;
  border: 1px solid var(--line);
  color: var(--black);
  background: #fff;
  font-size: 26px;
}

.track-focus {
  min-width: 0;
}

.track-stage {
  position: relative;
  display: grid;
  place-items: center;
}

.track-stage::before {
  content: "";
  position: absolute;
  inset: 10% 0 0;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, .06), transparent 62%);
  pointer-events: none;
}

.action-dock {
  position: absolute;
  right: clamp(28px, 5vw, 72px);
  left: clamp(28px, 5vw, 72px);
  bottom: 34px;
  height: 106px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid #d5d5d5;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .12);
  backdrop-filter: blur(16px);
}

.action-dock button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  border: 0;
  border-inline-start: 1px solid #d5d5d5;
  color: var(--black);
  background: transparent;
  font-weight: 900;
  transition: background .2s ease, color .2s ease;
}

.action-dock button:first-child {
  border-inline-start: 0;
}

.action-dock button:hover {
  color: #fff;
  background: var(--red);
}

.dock-icon {
  width: 46px;
  height: 46px;
  display: inline-grid;
  place-items: center;
  border: 3px solid currentColor;
  border-radius: 50%;
  font-size: 24px;
  line-height: 1;
}

.action-dock strong {
  font-size: clamp(1.15rem, 1.7vw, 1.8rem);
}

.info-modal {
  width: min(1040px, calc(100vw - 36px));
  max-height: min(760px, calc(100vh - 40px));
  border: 0;
  border-radius: var(--radius);
  padding: 0;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 38px 110px rgba(0, 0, 0, .42);
}

.info-modal::backdrop {
  background: rgba(0, 0, 0, .55);
  backdrop-filter: blur(8px);
}

.modal-close {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: var(--radius);
  color: #fff;
  background: var(--black);
  font-size: 24px;
  font-weight: 900;
}

.modal-head {
  padding: 30px 34px 22px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .96), rgba(255, 255, 255, .88)),
    url("assets/hero-race-track-bg-v2.png") center / cover;
}

.modal-head p {
  margin: 0 0 8px;
  color: var(--red);
  font-weight: 900;
}

.modal-head h2 {
  margin: 0 0 8px;
  font-size: clamp(2.1rem, 4vw, 4rem);
  line-height: 1;
}

.modal-head span {
  color: var(--muted);
  font-size: 1.08rem;
}

.modal-body {
  max-height: calc(min(760px, calc(100vh - 40px)) - 170px);
  overflow: auto;
  padding: 24px;
}

.hours-grid,
.price-grid,
.text-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.hours-grid div,
.price-grid article,
.text-grid article {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--soft);
}

.price-board-image {
  width: 100%;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 20px 48px rgba(0, 0, 0, .14);
}

.price-gallery-preview {
  margin-top: 18px;
  padding: 18px;
  overflow: hidden;
  border: 1px solid rgba(227, 6, 19, .18);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(17, 17, 17, .96), rgba(42, 42, 42, .9)),
    url("assets/racing-light-bg.png") center / cover;
  box-shadow: 0 18px 44px rgba(0, 0, 0, .16);
}

.price-gallery-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.price-gallery-head span {
  display: inline-flex;
  margin-bottom: 5px;
  color: var(--yellow);
  font-weight: 900;
}

.price-gallery-head h3 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.4rem, 2.4vw, 2rem);
}

.price-gallery-head button {
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 6px;
  color: #fff;
  background: var(--red);
  font-weight: 900;
  cursor: pointer;
}

.price-gallery-strip {
  width: 100%;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  cursor: pointer;
}

.price-gallery-track {
  display: flex;
  width: max-content;
  gap: 12px;
  animation: galleryTicker 24s linear infinite;
}

.price-gallery-strip:hover .price-gallery-track {
  animation-play-state: paused;
}

.price-gallery-track img {
  width: clamp(150px, 22vw, 230px);
  height: 132px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: var(--radius);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .25);
}

.hours-grid div {
  display: flex;
  justify-content: space-between;
  font-weight: 900;
}

.hours-grid .today {
  color: #fff;
  background: var(--black);
}

.price-card {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 14px;
  align-items: stretch;
}

.price-card img {
  width: 100%;
  height: 116px;
  object-fit: cover;
  border-radius: var(--radius);
}

.price-grid article span {
  display: inline-flex;
  padding: 3px 9px;
  color: #fff;
  background: var(--black);
  border-radius: 4px;
  font-weight: 900;
}

.price-grid h3,
.text-grid h3,
.attractions-grid h3 {
  margin: 11px 0 6px;
  font-size: 1.28rem;
}

.price-grid p,
.text-grid p,
.attractions-grid p {
  color: var(--muted);
  line-height: 1.55;
}

.price-grid small {
  display: block;
  color: #333;
  font-weight: 800;
  margin-bottom: 8px;
}

.price-grid strong {
  color: var(--red);
  font-size: 1.25rem;
}

.price-notes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.price-notes article {
  padding: 16px;
  border-radius: var(--radius);
  color: #fff;
  background: var(--black);
}

.price-notes h3 {
  margin: 0 0 8px;
  color: var(--yellow);
}

.price-notes p {
  margin: 0;
  color: rgba(255, 255, 255, .82);
  line-height: 1.55;
}

.directions-panel,
.video-guide {
  display: grid;
  grid-template-columns: minmax(280px, .8fr) minmax(0, 1.2fr);
  gap: 16px;
  align-items: stretch;
}

.directions-panel article,
.video-guide article {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--soft);
}

.map-preview {
  min-height: 260px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  color: #fff;
  background:
    linear-gradient(135deg, rgba(17, 17, 17, .72), rgba(227, 6, 19, .82)),
    url("assets/hero-race-track-bg-v2.png") center / cover;
  text-align: center;
}

.map-preview span {
  font-size: 4rem;
  font-weight: 900;
}

.video-frame {
  position: relative;
  min-height: 300px;
  overflow: hidden;
  border-radius: var(--radius);
  background: #111;
}

.video-frame img {
  width: 100%;
  height: 100%;
  min-height: 300px;
  object-fit: cover;
  opacity: .78;
}

.video-frame button {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 96px;
  height: 96px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: var(--red);
  font-weight: 900;
  transform: translate(-50%, -50%);
}

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

.attractions-grid article {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.attractions-grid img,
.gallery-grid img {
  width: 100%;
  height: 128px;
  object-fit: cover;
  border-radius: var(--radius);
}

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

.gallery-grid img {
  height: 190px;
}

.gallery-grid button {
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
}

.gallery-grid button img {
  transition: transform .25s ease, filter .25s ease;
}

.gallery-grid button:hover img {
  transform: scale(1.05);
  filter: saturate(1.12);
}

.gallery-viewer {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(0, 0, 0, .82);
  backdrop-filter: blur(8px);
}

.gallery-viewer img {
  width: min(920px, 90vw);
  max-height: min(620px, 82vh);
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 28px 80px rgba(0, 0, 0, .45);
}

.gallery-viewer button {
  position: absolute;
  top: 18px;
  left: 18px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: var(--radius);
  color: #fff;
  background: var(--red);
  font-size: 24px;
  font-weight: 900;
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes titleDrift {
  0%, 100% { transform: translateX(0); }
  45% { transform: translateX(4px); }
  70% { transform: translateX(-2px); }
}

@keyframes galleryTicker {
  from { transform: translateX(0); }
  to { transform: translateX(50%); }
}

@keyframes openGlow {
  0%, 100% {
    box-shadow:
      0 0 0 3px rgba(40, 218, 100, .12),
      0 10px 22px rgba(22, 190, 76, .24),
      0 0 22px rgba(52, 220, 116, .42);
  }
  50% {
    box-shadow:
      0 0 0 5px rgba(40, 218, 100, .16),
      0 12px 26px rgba(22, 190, 76, .3),
      0 0 30px rgba(52, 220, 116, .56);
  }
}

@keyframes badgeShine {
  0%, 38% { transform: translateX(0) rotate(18deg); opacity: 0; }
  48% { opacity: .85; }
  68%, 100% { transform: translateX(360%) rotate(18deg); opacity: 0; }
}

@keyframes titlePulse {
  0%, 100% {
    transform: translateY(0) skewX(0deg);
    text-shadow: 0 0 0 rgba(227, 6, 19, 0);
  }
  50% {
    transform: translateY(-2px) skewX(-4deg);
    text-shadow: 0 12px 22px rgba(227, 6, 19, .18);
  }
}

@keyframes chevronRace {
  from {
    opacity: .72;
    transform: translateX(0);
  }
  to {
    opacity: 1;
    transform: translateX(-4px);
  }
}

@keyframes raceWipe {
  from { transform: translateX(120%); }
  to { transform: translateX(-120%); }
}

@media (max-width: 1060px) {
  html,
  body {
    overflow: auto;
  }

  .app-shell {
    min-height: 100vh;
    height: auto;
    overflow: visible;
  }

  .viewport {
    min-height: 100vh;
    height: auto;
  }

  .screen {
    position: relative;
    min-height: 100vh;
  }

  .detail-screen {
    display: none;
  }

  .app-shell.is-detail .branch-screen {
    display: none;
  }

  .app-shell.is-detail .detail-screen {
    display: block;
  }

  .brand {
    width: 150px;
  }

  .branch-grid,
  .detail-layout,
  .action-dock,
  .hours-grid,
  .price-grid,
  .price-notes,
  .directions-panel,
  .video-guide,
  .text-grid,
  .attractions-grid,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .branch-card {
    border-inline-start: 0;
    grid-template-rows: 260px auto;
    padding: 0;
  }

  .action-dock {
    position: relative;
    right: auto;
    left: auto;
    bottom: auto;
    height: auto;
    margin-top: 20px;
  }
}

@media (max-width: 700px) {
  :root {
    --nav: 0px;
  }

  .brand {
    width: 140px;
  }

  .nav-cta {
    min-height: 44px;
    padding: 0 14px;
  }

  .selection-title {
    gap: 16px;
  }

  .selection-hero {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 10px;
    margin-bottom: 18px;
  }

  .selection-hero .hero-logo,
  .selection-title,
  .selection-hero p {
    grid-column: 1;
  }

  .selection-hero .hero-logo {
    grid-row: auto;
    justify-self: center;
    width: 104px;
  }

  .selection-title h1 {
    font-size: clamp(2.25rem, 13vw, 3.25rem);
  }

  .selection-title span {
    letter-spacing: 0;
  }

  .branch-screen,
  .detail-screen {
    padding: 18px;
  }

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

  .branch-topline {
    align-items: flex-start;
    flex-direction: column;
  }

  .branch-facts div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .branch-facts div:first-child {
    grid-template-columns: 118px 1fr;
  }

  .branch-body {
    padding: 18px;
  }

  .branch-main h2 {
    font-size: clamp(2rem, 10vw, 2.85rem);
  }

  .price-card {
    grid-template-columns: 1fr;
  }

  .price-gallery-head {
    align-items: stretch;
    flex-direction: column;
  }

  .price-gallery-head button {
    width: 100%;
  }

  .price-gallery-track img {
    width: 172px;
    height: 112px;
  }

  .detail-facts div {
    grid-template-columns: 1fr;
  }

  .primary-actions {
    flex-direction: column;
  }

  .primary-link,
  .share-link {
    width: 100%;
  }

  .attractions-grid article {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* Dark premium branch selector */
body {
  background: #060606;
}

.app-shell {
  display: grid;
  place-items: center;
  padding: clamp(10px, 1vw, 18px);
  background:
    radial-gradient(circle at 34% 8%, rgba(227, 6, 19, .2), transparent 28%),
    radial-gradient(circle at 95% 85%, rgba(227, 6, 19, .16), transparent 30%),
    linear-gradient(135deg, #050505 0%, #101010 42%, #050505 100%);
}

.app-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  display: block;
  pointer-events: none;
  background:
    linear-gradient(115deg, transparent 0 58%, rgba(227, 6, 19, .08) 59%, transparent 67%),
    linear-gradient(90deg, transparent, rgba(255, 255, 255, .035), transparent);
}

.viewport {
  width: min(1580px, calc(100vw - 20px));
  height: min(980px, calc(100vh - 20px));
  min-height: 720px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 22px;
  background:
    linear-gradient(rgba(8, 8, 8, .88), rgba(8, 8, 8, .92)),
    url("assets/generated-race-bg.png") center / cover;
  box-shadow: inset 0 0 0 1px rgba(227, 6, 19, .12), 0 32px 90px rgba(0, 0, 0, .58);
}

.branch-screen {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: clamp(14px, 1.5vw, 22px);
  padding: clamp(30px, 4vw, 54px);
}

.step-pill {
  position: absolute;
  top: clamp(24px, 3vw, 44px);
  right: clamp(26px, 3.4vw, 50px);
  z-index: 5;
  min-width: 118px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(180deg, #f3282f, var(--red-dark));
  box-shadow: 0 18px 40px rgba(227, 6, 19, .32);
  font-size: 1.28rem;
  font-weight: 900;
}

.selection-hero {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  gap: 6px;
  margin: 0;
  padding-inline: 120px 420px;
}

.selection-title {
  grid-column: auto;
  gap: 22px;
  animation: titleDrift 4.5s ease-in-out infinite;
}

.selection-title h1 {
  color: #f6f6f6;
  font-size: clamp(4.2rem, 6vw, 7.4rem);
  text-shadow: 0 16px 38px rgba(0, 0, 0, .52);
}

.selection-title h1 .title-accent {
  color: var(--red);
}

.selection-title span {
  color: var(--red);
  font-size: clamp(2rem, 3vw, 3.35rem);
  letter-spacing: 0;
  text-shadow: 0 0 22px rgba(227, 6, 19, .45);
}

.selection-hero p {
  grid-column: auto;
  color: rgba(255, 255, 255, .82);
  font-size: clamp(1.15rem, 1.45vw, 1.55rem);
  font-weight: 500;
}

.branch-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(330px, 420px) minmax(0, 1fr);
  gap: clamp(26px, 3vw, 42px);
  align-items: stretch;
}

.branch-cards {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 1.7vw, 24px);
}

.branch-card {
  min-height: 0;
  grid-template-rows: 1fr;
  border: 1px solid rgba(227, 6, 19, .45);
  border-radius: 18px;
  background: #101010;
  box-shadow: 0 24px 58px rgba(0, 0, 0, .46), inset 0 0 0 1px rgba(255, 255, 255, .05);
}

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

.branch-card.is-selected {
  border-color: rgba(255, 210, 31, .88);
  box-shadow: 0 28px 70px rgba(0, 0, 0, .52), 0 0 0 1px rgba(255, 210, 31, .22), 0 0 38px rgba(227, 6, 19, .22);
}

.branch-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 34px 82px rgba(0, 0, 0, .58), 0 0 34px rgba(227, 6, 19, .24);
}

.branch-main {
  grid-template-rows: auto 1fr auto auto auto;
  align-content: stretch;
  align-items: end;
  min-height: 100%;
  padding: 28px 24px 30px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, .18) 0%, rgba(0, 0, 0, .36) 44%, rgba(0, 0, 0, .92) 100%),
    var(--card-bg) center / cover;
  text-align: center;
}

.branch-location {
  justify-self: start;
  align-self: start;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 10px;
  min-width: 150px;
  padding: 10px 14px;
  border: 1px solid rgba(227, 6, 19, .38);
  border-radius: 999px;
  color: #fff;
  background: rgba(10, 10, 10, .78);
  box-shadow: 0 14px 28px rgba(0, 0, 0, .38), 0 0 20px rgba(227, 6, 19, .16);
  backdrop-filter: blur(8px);
}

.branch-location > span {
  grid-row: 1 / span 2;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--red);
  font-size: 1.35rem;
}

.branch-location small,
.branch-location strong {
  text-align: right;
  line-height: 1.1;
}

.branch-location small {
  color: rgba(255, 255, 255, .78);
  font-weight: 700;
}

.branch-location strong {
  font-size: 1.2rem;
  font-weight: 900;
}

.branch-main h2 {
  margin-top: auto;
  color: #fff;
  font-size: clamp(2rem, 2.25vw, 3rem);
  line-height: 1.02;
  white-space: nowrap;
  text-shadow: 0 14px 34px rgba(0, 0, 0, .82);
}

.branch-card-line {
  justify-self: center;
  width: 72px;
  height: 4px;
  margin: 20px 0 24px;
  border-radius: 999px;
  background: var(--red);
  box-shadow: 0 0 20px rgba(227, 6, 19, .7);
}

.choose-branch {
  width: 100%;
  min-height: 60px;
  border: 0;
  border-radius: 9px;
  color: #fff;
  background: linear-gradient(180deg, #f5282e, #c8000c);
  box-shadow: 0 18px 34px rgba(227, 6, 19, .28);
  font-size: 1.55rem;
  font-weight: 900;
  transition: transform .2s ease, filter .2s ease, box-shadow .2s ease;
}

.choose-branch:hover {
  transform: translateY(-3px);
  filter: brightness(1.08);
  box-shadow: 0 22px 42px rgba(227, 6, 19, .38);
}

.branch-quick-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  margin-top: 16px;
}

.branch-quick-actions button,
.branch-quick-actions a {
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 8px;
  color: #fff;
  background: rgba(15, 15, 15, .74);
  text-decoration: none;
  font-size: .98rem;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .03);
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}

.branch-quick-actions span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.branch-quick-actions button:hover,
.branch-quick-actions a:hover {
  transform: translateY(-2px);
  border-color: rgba(227, 6, 19, .85);
  background: rgba(227, 6, 19, .18);
}

.side-info-panel {
  order: -1;
  min-height: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 16px;
  padding: clamp(18px, 1.7vw, 26px);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(18, 18, 18, .92), rgba(10, 10, 10, .96));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .04), 0 24px 70px rgba(0, 0, 0, .42);
}

.panel-head {
  display: grid;
  justify-items: center;
  text-align: center;
}

.panel-head img {
  width: clamp(74px, 5.8vw, 104px);
  height: auto;
  margin-bottom: 8px;
  filter: drop-shadow(0 12px 22px rgba(0, 0, 0, .45));
}

.panel-head h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.75rem, 2.1vw, 2.55rem);
  line-height: 1.05;
  font-weight: 900;
}

.panel-head h2 span {
  color: var(--red);
}

.panel-head h2::after {
  content: "";
  display: block;
  width: 74px;
  height: 4px;
  margin: 14px auto 0;
  border-radius: 999px;
  background: var(--red);
  box-shadow: 0 0 18px rgba(227, 6, 19, .66);
}

.panel-head small {
  margin-top: 10px;
  color: rgba(255, 255, 255, .68);
  font-size: 1rem;
  font-weight: 800;
}

.panel-actions {
  display: grid;
  gap: 14px;
  align-content: center;
}

.panel-actions button {
  position: relative;
  min-height: 92px;
  display: grid;
  grid-template-columns: 68px 1fr auto;
  grid-template-rows: auto auto;
  column-gap: 16px;
  align-items: center;
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 12px;
  color: #fff;
  background: rgba(255, 255, 255, .035);
  text-align: right;
  box-shadow: 0 14px 28px rgba(0, 0, 0, .22);
  transition: transform .22s ease, border-color .22s ease, background .22s ease;
}

.panel-actions button::after {
  content: "›";
  grid-column: 3;
  grid-row: 1 / span 2;
  color: #fff;
  font-size: 2.8rem;
  line-height: 1;
}

.panel-actions button:hover {
  transform: translateX(-5px);
  border-color: rgba(227, 6, 19, .78);
  background: rgba(227, 6, 19, .12);
}

.panel-icon {
  grid-column: 1;
  grid-row: 1 / span 2;
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border: 4px solid var(--red);
  border-radius: 50%;
  color: var(--red);
  font-size: 1.65rem;
  font-weight: 900;
}

.panel-actions strong {
  grid-column: 2;
  margin-bottom: 4px;
  color: #fff;
  font-size: clamp(1.18rem, 1.3vw, 1.55rem);
  font-weight: 900;
}

.panel-actions small {
  grid-column: 2;
  color: rgba(255, 255, 255, .76);
  font-size: .92rem;
}

.panel-bottom-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, .16);
}

.panel-bottom-actions button {
  min-height: 88px;
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 14px 8px;
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 10px;
  color: #fff;
  background: rgba(255, 255, 255, .04);
  font-size: 1rem;
  font-weight: 900;
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}

.panel-bottom-actions span {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 4px solid var(--red);
  border-radius: 50%;
  color: var(--red);
  font-size: 1.35rem;
}

.panel-bottom-actions button:hover {
  transform: translateY(-4px);
  border-color: rgba(227, 6, 19, .78);
  background: rgba(227, 6, 19, .12);
}

@media (max-width: 1180px) {
  html,
  body {
    overflow: auto;
  }

  .app-shell {
    min-height: 100vh;
    height: auto;
    overflow: visible;
  }

  .viewport {
    width: calc(100vw - 18px);
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .screen {
    position: relative;
    min-height: 100vh;
  }

  .selection-hero {
    padding-inline: 0;
  }

  .branch-grid {
    grid-template-columns: 1fr;
  }

  .branch-cards {
    grid-template-columns: 1fr;
  }

  .branch-card {
    min-height: 560px;
  }

  .side-info-panel {
    order: -1;
  }
}

@media (max-width: 700px) {
  .branch-screen {
    padding: 76px 16px 18px;
  }

  .step-pill {
    top: 18px;
    right: 18px;
    min-width: 92px;
    min-height: 38px;
    font-size: 1rem;
  }

  .selection-title {
    gap: 10px;
  }

  .selection-title h1 {
    font-size: clamp(2.8rem, 15vw, 4rem);
  }

  .selection-title span {
    font-size: 1.8rem;
  }

  .selection-hero p {
    font-size: 1rem;
  }

  .branch-card {
    min-height: 520px;
  }

  .branch-main {
    padding: 22px 18px;
  }

  .branch-main h2 {
    font-size: clamp(1.9rem, 9vw, 2.7rem);
  }

  .side-info-panel {
    padding: 20px;
  }

  .panel-actions button {
    grid-template-columns: 56px 1fr auto;
    min-height: 96px;
    padding: 16px;
  }

  .panel-icon {
    width: 48px;
    height: 48px;
    font-size: 1.55rem;
  }

  .panel-bottom-actions {
    grid-template-columns: 1fr;
  }

  .panel-bottom-actions button {
    min-height: 76px;
    grid-template-columns: auto 1fr;
    justify-content: center;
  }
}

/* Light Ferrari-inspired refinement */
.app-shell {
  background:
    linear-gradient(100deg, rgba(255, 255, 255, .88), rgba(255, 255, 255, .58)),
    url("assets/racing-light-bg.png") center / cover,
    #f6f6f4;
}

.app-shell::before {
  background:
    linear-gradient(110deg, rgba(227, 6, 19, .12), transparent 28%, transparent 70%, rgba(227, 6, 19, .09)),
    radial-gradient(circle at 52% 10%, rgba(255, 210, 31, .16), transparent 24%);
}

.viewport {
  border-color: rgba(18, 18, 18, .08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .86), rgba(255, 255, 255, .96)),
    url("assets/racing-light-bg.png") center / cover;
  box-shadow: 0 28px 80px rgba(0, 0, 0, .16), inset 0 0 0 1px rgba(255, 255, 255, .86);
}

.top-logo {
  position: absolute;
  top: clamp(22px, 3vw, 42px);
  right: clamp(26px, 3.4vw, 52px);
  z-index: 8;
  width: clamp(112px, 8vw, 154px);
  height: auto;
  filter: drop-shadow(0 14px 18px rgba(0, 0, 0, .2));
}

.step-pill {
  display: none;
}

.selection-hero {
  padding-inline: 140px 140px;
}

.selection-title h1 {
  color: #171717;
  text-shadow: 0 18px 30px rgba(255, 255, 255, .72);
}

.selection-title h1 .title-accent {
  color: var(--red);
}

.selection-hero p {
  color: rgba(17, 17, 17, .68);
  font-weight: 800;
}

.branch-card {
  border-color: rgba(227, 6, 19, .34);
  background: #fff;
  box-shadow: 0 20px 46px rgba(0, 0, 0, .16), inset 0 0 0 1px rgba(255, 255, 255, .7);
  transform-style: preserve-3d;
  cursor: pointer;
}

.branch-card::before {
  background:
    linear-gradient(100deg, transparent 0 18%, rgba(255, 255, 255, .36) 34%, transparent 48%),
    radial-gradient(circle at 50% 102%, rgba(227, 6, 19, .24), transparent 36%);
}

.branch-card.is-selected {
  border-color: rgba(227, 6, 19, .78);
  box-shadow: 0 24px 58px rgba(0, 0, 0, .18), 0 0 0 2px rgba(227, 6, 19, .12), 0 0 30px rgba(227, 6, 19, .18);
}

.branch-card:hover {
  transform: translateY(-12px) rotateX(1.5deg) rotateY(-1.5deg);
  border-color: var(--red);
  box-shadow: 0 34px 80px rgba(0, 0, 0, .22), 0 0 42px rgba(227, 6, 19, .2);
}

.branch-card:hover .branch-main {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, .04) 0%, rgba(0, 0, 0, .22) 42%, rgba(0, 0, 0, .88) 100%),
    var(--card-bg) center / cover;
}

.branch-main {
  grid-template-rows: 1fr auto auto auto;
  padding-top: 74px;
}

.open-badge {
  position: absolute;
  top: 18px;
  left: 50%;
  z-index: 4;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: max-content;
  max-width: calc(100% - 30px);
  padding: 7px 16px;
  overflow: hidden;
  border: 1px solid rgba(153, 255, 190, .46);
  border-radius: 999px;
  color: #062712;
  background:
    radial-gradient(circle at 50% 0, rgba(255, 255, 255, .48), transparent 48%),
    linear-gradient(180deg, #49ee82, #15c95e);
  box-shadow:
    0 0 0 4px rgba(40, 218, 100, .16),
    0 12px 24px rgba(22, 190, 76, .34),
    0 0 28px rgba(52, 255, 128, .68),
    inset 0 1px 0 rgba(255, 255, 255, .48);
  font-size: .9rem;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  direction: rtl;
  backdrop-filter: blur(8px);
  transform: translateX(-50%);
  animation: openGlow 2.2s ease-in-out infinite;
}

.open-badge::before {
  content: "";
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #078838;
  box-shadow:
    0 0 0 4px rgba(10, 125, 50, .14),
    0 0 14px rgba(5, 140, 55, .72);
}

.open-badge::after {
  display: none;
}

.open-badge.is-soon {
  border-color: rgba(255, 210, 31, .46);
  color: #332000;
  background:
    radial-gradient(circle at 50% 0, rgba(255, 255, 255, .42), transparent 48%),
    linear-gradient(180deg, #ffd85a, #f0a719);
  box-shadow:
    0 0 0 4px rgba(255, 210, 31, .14),
    0 12px 24px rgba(240, 167, 25, .24),
    0 0 24px rgba(255, 210, 31, .48),
    inset 0 1px 0 rgba(255, 255, 255, .44);
}

.open-badge.is-soon::before {
  background: #b86f00;
  box-shadow:
    0 0 0 4px rgba(184, 111, 0, .12),
    0 0 14px rgba(184, 111, 0, .55);
}

.open-badge.is-closed {
  border-color: rgba(255, 255, 255, .24);
  color: #fff;
  background:
    radial-gradient(circle at 50% 0, rgba(255, 255, 255, .16), transparent 48%),
    linear-gradient(180deg, rgba(38, 38, 38, .96), rgba(10, 10, 10, .96));
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, .06),
    0 12px 24px rgba(0, 0, 0, .3),
    inset 0 1px 0 rgba(255, 255, 255, .14);
}

.open-badge.is-closed::before {
  background: #e30613;
  box-shadow:
    0 0 0 4px rgba(227, 6, 19, .13),
    0 0 14px rgba(227, 6, 19, .55);
}

.side-info-panel {
  grid-template-rows: auto auto auto;
  gap: 14px;
  border-color: rgba(20, 20, 20, .1);
  color: var(--black);
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 22px 58px rgba(0, 0, 0, .14), inset 0 0 0 1px rgba(255, 255, 255, .88);
  backdrop-filter: blur(18px);
}

.panel-head h2 {
  color: var(--black);
}

.panel-head img,
.panel-head small {
  display: none;
}

.panel-head h2::after {
  box-shadow: 0 0 18px rgba(227, 6, 19, .32);
}

.panel-actions {
  gap: 10px;
}

.panel-section-title {
  margin: 0 0 2px;
  color: var(--black);
  font-size: clamp(1.35rem, 1.55vw, 1.9rem);
  line-height: 1;
  font-weight: 900;
}

.panel-actions button {
  min-height: 74px;
  grid-template-columns: 54px 1fr 22px;
  grid-template-rows: 1fr;
  column-gap: 12px;
  padding: 12px 14px;
  border-color: rgba(17, 17, 17, .1);
  color: var(--black);
  background: #fff;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .08);
}

.panel-actions button::after {
  grid-row: 1;
  color: var(--red);
  font-size: 2.2rem;
}

.panel-actions strong {
  grid-row: 1;
  margin: 0;
  color: var(--black);
  font-size: clamp(1.18rem, 1.35vw, 1.62rem);
  white-space: nowrap;
}

.panel-actions small {
  display: none;
}

.panel-icon {
  width: 46px;
  height: 46px;
  border-width: 3px;
}

.panel-actions button:hover {
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  transform: translateX(-4px);
}

.panel-actions button:hover strong,
.panel-actions button:hover::after,
.panel-actions button:hover .panel-icon {
  color: #fff;
}

.panel-actions button:hover .panel-icon {
  border-color: #fff;
}

.panel-gallery {
  overflow: hidden;
  padding: 12px;
  border: 1px solid rgba(17, 17, 17, .1);
  border-radius: 14px;
  background: linear-gradient(180deg, #fff, #f7f7f7);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .08);
}

.panel-gallery-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.panel-gallery-head strong {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 3px 14px;
  border-radius: 999px;
  color: #fff;
  background: var(--red);
  font-weight: 900;
}

.panel-gallery-head span {
  color: var(--muted);
  font-weight: 900;
}

.panel-gallery-strip {
  width: 100%;
  overflow: hidden;
  padding: 0;
  border: 0;
  background: transparent;
}

.panel-gallery-strip span {
  display: flex;
  width: max-content;
  gap: 9px;
  animation: galleryTicker 22s linear infinite;
}

.panel-gallery-strip:hover span {
  animation-play-state: paused;
}

.panel-gallery-strip img {
  width: 92px;
  height: 66px;
  object-fit: cover;
  border: 1px solid rgba(17, 17, 17, .14);
  border-radius: 8px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, .12);
}

.panel-bottom-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding-top: 0;
  border-top: 0;
}

.panel-bottom-actions button {
  min-height: 72px;
  grid-template-columns: auto 1fr;
  place-items: center;
  justify-content: center;
  border-color: rgba(17, 17, 17, .1);
  color: var(--black);
  background: #fff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .08);
}

.panel-bottom-actions span {
  width: 38px;
  height: 38px;
  border-width: 3px;
}

.panel-bottom-actions button:hover {
  color: #fff;
  background: var(--red);
}

.panel-bottom-actions button:hover span {
  color: #fff;
  border-color: #fff;
}

@media (max-width: 1180px) {
  .selection-hero {
    padding-inline: 0;
  }

  .top-logo {
    width: 112px;
  }
}

/* Darker final theme */
.app-shell {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, .5), rgba(0, 0, 0, .62)),
    radial-gradient(circle at 20% 12%, rgba(227, 6, 19, .22), transparent 32%),
    radial-gradient(circle at 82% 22%, rgba(255, 210, 31, .1), transparent 28%),
    url("assets/karting-glow-bg.png") center / cover,
    #050505;
}

.app-shell::before {
  background:
    linear-gradient(105deg, transparent 0 42%, rgba(227, 6, 19, .1) 52%, transparent 68%),
    linear-gradient(90deg, rgba(255, 255, 255, .035), transparent 40%, rgba(255, 255, 255, .025));
}

.viewport {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.selection-title h1 {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: .18em;
  direction: rtl;
  color: #fff;
  font-size: clamp(4.3rem, 6vw, 7rem);
  line-height: .86;
  text-shadow: 0 18px 34px rgba(0, 0, 0, .58);
}

.selection-title h1 span {
  display: inline-block;
  font-size: 1em;
  line-height: .86;
}

.selection-title h1 .title-brand {
  color: #fff;
  letter-spacing: 0;
  text-shadow:
    0 3px 0 rgba(0, 0, 0, .24),
    0 18px 34px rgba(0, 0, 0, .5);
}

.selection-title h1 .title-accent {
  color: #fff;
  letter-spacing: 0;
  text-shadow:
    0 3px 0 rgba(0, 0, 0, .24),
    0 0 18px rgba(255, 255, 255, .22),
    0 0 34px rgba(227, 6, 19, .3),
    0 18px 34px rgba(0, 0, 0, .5);
  animation: none;
}

.selection-title {
  gap: clamp(12px, 1.6vw, 24px);
}

.selection-title > span {
  color: var(--red);
  opacity: .92;
  text-shadow: 0 0 18px rgba(227, 6, 19, .5);
}

.selection-hero p {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  min-height: 42px;
  margin-top: 8px;
  padding: 0 28px;
  border: 1px solid rgba(255, 210, 31, .28);
  border-radius: 999px;
  color: var(--yellow);
  background: linear-gradient(90deg, rgba(255, 210, 31, .05), rgba(255, 210, 31, .14), rgba(255, 210, 31, .05));
  font-size: clamp(1.16rem, 1.42vw, 1.55rem);
  font-weight: 900;
  text-shadow: 0 10px 24px rgba(0, 0, 0, .58);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .18), 0 0 24px rgba(255, 210, 31, .08);
}

.side-info-panel {
  grid-template-rows: auto minmax(180px, 1fr);
  align-content: stretch;
  border-color: rgba(255, 255, 255, .86);
  color: var(--black);
  background: linear-gradient(180deg, rgba(255, 255, 255, .97), rgba(245, 245, 245, .96));
  box-shadow:
    0 30px 82px rgba(0, 0, 0, .24),
    0 0 0 1px rgba(227, 6, 19, .12),
    inset 0 0 0 1px rgba(255, 255, 255, .92);
}

.panel-head h2 {
  color: var(--black);
}

.branch-card {
  border-width: 2px;
  border-color: rgba(255, 255, 255, .58);
  box-shadow:
    0 34px 88px rgba(0, 0, 0, .46),
    0 0 0 1px rgba(227, 6, 19, .28),
    inset 0 0 0 1px rgba(255, 255, 255, .16);
}

.branch-card.is-selected {
  border-color: rgba(227, 6, 19, .95);
  box-shadow:
    0 38px 96px rgba(0, 0, 0, .52),
    0 0 0 2px rgba(227, 6, 19, .24),
    0 0 42px rgba(227, 6, 19, .34),
    inset 0 0 0 1px rgba(255, 255, 255, .08);
}

.branch-card:hover {
  transform: translateY(-14px) scale(1.018) rotateX(1.5deg) rotateY(-1.5deg);
  border-color: rgba(255, 255, 255, .55);
  box-shadow:
    0 42px 110px rgba(0, 0, 0, .58),
    0 0 55px rgba(227, 6, 19, .38),
    inset 0 0 0 1px rgba(255, 255, 255, .12);
}

.panel-actions button,
.panel-gallery,
.panel-bottom-actions button {
  border-color: rgba(227, 6, 19, .2);
  color: #fff;
  background: linear-gradient(180deg, #f41926, #c9000c);
  box-shadow:
    0 18px 34px rgba(227, 6, 19, .24),
    inset 0 0 0 1px rgba(255, 255, 255, .2);
}

.panel-actions button {
  min-height: 76px;
  border-color: rgba(227, 6, 19, .2);
  box-shadow:
    0 20px 42px rgba(227, 6, 19, .26),
    inset 0 0 0 1px rgba(255, 255, 255, .22);
}

.panel-actions strong {
  color: #fff;
}

.panel-actions button::after,
.panel-icon {
  color: #fff;
}

.panel-icon {
  border-color: rgba(255, 255, 255, .92);
}

.panel-actions button[data-panel-action="attractions"] {
  background: linear-gradient(180deg, #d00013, #8f0009);
  box-shadow:
    0 18px 34px rgba(208, 0, 19, .24),
    inset 0 0 0 1px rgba(255, 255, 255, .2);
}

.panel-actions button[data-panel-action="hours"] {
  background: linear-gradient(180deg, #f39a1e, #bd6500);
  box-shadow:
    0 18px 34px rgba(243, 154, 30, .22),
    inset 0 0 0 1px rgba(255, 255, 255, .22);
}

.panel-actions button[data-panel-action="prices"] {
  background: linear-gradient(180deg, #6dbb21, #347d08);
  box-shadow:
    0 18px 34px rgba(82, 164, 20, .22),
    inset 0 0 0 1px rgba(255, 255, 255, .22);
}

.panel-actions button[data-panel-action="faq"] {
  background: linear-gradient(180deg, #58a6df, #0d4f89);
  box-shadow:
    0 18px 34px rgba(36, 119, 187, .22),
    inset 0 0 0 1px rgba(255, 255, 255, .22);
}

.panel-gallery {
  display: flex;
  min-height: 0;
  height: 100%;
  flex-direction: column;
  padding: 14px;
  border-color: rgba(17, 17, 17, .12);
  color: var(--black);
  background: #fff;
  box-shadow:
    0 14px 30px rgba(0, 0, 0, .12),
    inset 0 0 0 1px rgba(255, 255, 255, .86);
}

.panel-gallery-head {
  flex: 0 0 auto;
  justify-content: flex-start;
  margin-bottom: 12px;
}

.panel-gallery-strip {
  display: block;
  flex: 1 1 auto;
  min-height: 0;
}

.panel-gallery-strip span {
  height: 100%;
  align-items: stretch;
}

.panel-gallery-strip img {
  width: 132px;
  height: 100%;
  min-height: 104px;
}

.panel-gallery-head span {
  color: var(--muted);
}

.panel-gallery-strip img {
  border-color: rgba(17, 17, 17, .14);
}

/* Mobile final layout */
@media (max-width: 760px) {
  html,
  body {
    width: 100%;
    height: auto;
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
  }

  body {
    background: #050505;
  }

  .app-shell {
    display: block;
    width: 100%;
    min-height: 100svh;
    height: auto;
    overflow: visible;
    background:
      linear-gradient(180deg, rgba(0, 0, 0, .72), rgba(0, 0, 0, .66)),
      radial-gradient(circle at 50% 6%, rgba(227, 6, 19, .26), transparent 34%),
      url("assets/karting-glow-bg.png") center top / cover fixed,
      #050505;
  }

  .viewport {
    width: 100%;
    min-height: 100svh;
    height: auto;
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .screen {
    position: relative;
    min-height: 100svh;
  }

  .branch-screen {
    min-height: 100svh;
    display: grid;
    grid-template-rows: auto auto;
    gap: 18px;
    padding: 18px 14px 28px;
  }

  .top-logo {
    position: relative;
    top: auto;
    right: auto;
    justify-self: end;
    width: clamp(92px, 29vw, 126px);
    margin: 0 2px -6px 0;
    filter: drop-shadow(0 12px 18px rgba(0, 0, 0, .48));
  }

  .selection-hero {
    display: grid;
    justify-items: center;
    gap: 8px;
    margin: 0;
    padding: 0;
  }

  .selection-title {
    width: 100%;
    gap: 8px;
  }

  .selection-title h1 {
    max-width: calc(100vw - 72px);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .14em;
    font-size: clamp(2.65rem, 14vw, 4.2rem);
    line-height: .88;
    text-wrap: balance;
    text-shadow:
      0 2px 0 rgba(0, 0, 0, .24),
      0 16px 26px rgba(0, 0, 0, .72);
  }

  .selection-title h1 span {
    line-height: .9;
  }

  .selection-title > span {
    font-size: clamp(1.3rem, 6vw, 2rem);
  }

  .selection-hero p {
    min-height: 34px;
    margin: 0;
    padding: 0 16px;
    font-size: clamp(1rem, 4.4vw, 1.2rem);
    line-height: 1.2;
    text-align: center;
  }

  .branch-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    min-height: 0;
  }

  .branch-cards {
    order: 1;
    width: 100%;
    display: grid;
    grid-auto-flow: row;
    grid-auto-columns: initial;
    grid-template-columns: 1fr;
    gap: 12px;
    overflow-x: visible;
    overflow-y: visible;
    padding: 0;
    scroll-snap-type: none;
  }

  .branch-card {
    min-height: 258px;
    border-radius: 18px;
    scroll-snap-align: none;
  }

  .branch-card:hover {
    transform: translateY(-6px);
  }

  .branch-main {
    min-height: 258px;
    grid-template-rows: auto 1fr auto auto;
    padding: 50px 18px 16px;
    border-radius: 18px;
  }

  .open-badge {
    top: 12px;
    min-height: 32px;
    max-width: calc(100% - 28px);
    padding: 6px 13px;
    font-size: .82rem;
  }

  .branch-main h2 {
    white-space: normal;
    max-width: 92%;
    justify-self: center;
    font-size: clamp(2rem, 9.6vw, 2.85rem);
    line-height: .94;
  }

  .branch-card-line {
    width: 64px;
    height: 4px;
    margin: 14px 0 16px;
  }

  .branch-quick-actions {
    gap: 8px;
    margin-top: 0;
  }

  .branch-quick-actions button,
  .branch-quick-actions a {
    min-height: 48px;
    padding: 0 8px;
    font-size: .9rem;
  }

  .branch-quick-actions span {
    width: 26px;
    height: 26px;
  }

  .side-info-panel {
    order: 2;
    grid-template-rows: auto auto;
    gap: 12px;
    min-height: 0;
    padding: 12px;
    border-radius: 18px;
    color: var(--black);
    border-color: rgba(255, 255, 255, .78);
    background: linear-gradient(180deg, rgba(255, 255, 255, .97), rgba(245, 245, 245, .96));
    box-shadow:
      0 20px 48px rgba(0, 0, 0, .28),
      0 0 0 1px rgba(227, 6, 19, .12),
      inset 0 0 0 1px rgba(255, 255, 255, .9);
  }

  .panel-actions {
    grid-template-columns: 1fr;
    gap: 9px;
    align-content: start;
  }

  .panel-actions button {
    min-height: 64px;
    grid-template-columns: 38px 1fr 16px;
    grid-template-rows: 1fr;
    column-gap: 12px;
    padding: 10px 12px;
    border: 0;
    border-radius: 13px;
    color: #fff;
    background: linear-gradient(180deg, #f41926, #c9000c);
    text-align: right;
    box-shadow:
      0 14px 28px rgba(227, 6, 19, .28),
      inset 0 0 0 1px rgba(255, 255, 255, .2);
  }

  .panel-actions button::after {
    display: block;
    grid-column: 3;
    color: #fff;
    font-size: 1.6rem;
  }

  .panel-icon {
    width: 38px;
    height: 38px;
    color: #fff;
    border-color: rgba(255, 255, 255, .92);
    border-width: 3px;
    font-size: 1.12rem;
  }

  .panel-actions strong {
    min-width: 0;
    color: #fff;
    font-size: clamp(1.08rem, 4.7vw, 1.3rem);
    line-height: 1.08;
    white-space: nowrap;
  }

  .panel-actions button:hover,
  .panel-actions button:focus-visible {
    transform: translateY(-2px);
    background: linear-gradient(180deg, #ff2632, #d6000d);
  }

  .panel-gallery {
    height: auto;
    min-height: 148px;
    padding: 12px;
    border-color: rgba(17, 17, 17, .12);
    border-radius: 16px;
    color: var(--black);
    background: #fff;
    box-shadow:
      0 12px 28px rgba(0, 0, 0, .12),
      inset 0 0 0 1px rgba(255, 255, 255, .82);
  }

  .panel-gallery-head {
    margin-bottom: 10px;
  }

  .panel-gallery-head strong {
    min-height: 26px;
    padding: 3px 13px;
    font-size: .95rem;
  }

  .panel-gallery-strip {
    min-height: 94px;
  }

  .panel-gallery-strip img {
    width: 118px;
    min-height: 94px;
    height: 100%;
    border-radius: 10px;
  }

  .info-modal {
    width: calc(100vw - 24px);
    max-width: none;
    max-height: calc(100svh - 24px);
    padding: 18px;
    border-radius: 18px;
  }

  .modal-close {
    top: 12px;
    left: 12px;
    width: 40px;
    height: 40px;
  }

  .modal-head {
    padding-inline: 0 44px;
  }

  .modal-head h2 {
    font-size: clamp(2rem, 10vw, 3rem);
    line-height: .98;
  }

  .modal-body {
    max-height: calc(100svh - 190px);
    overflow-y: auto;
    padding-inline: 2px;
  }

  .hours-grid,
  .price-grid,
  .price-notes,
  .text-grid,
  .attractions-grid,
  .gallery-grid,
  .directions-panel,
  .video-guide {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 360px) {
  .branch-screen {
    padding-inline: 10px;
  }

  .branch-cards {
    width: 100%;
  }

  .panel-actions button {
    min-height: 66px;
  }

  .selection-title h1 {
    max-width: calc(100vw - 54px);
    font-size: clamp(2.4rem, 15vw, 3.45rem);
  }
}

.panel-actions button[data-panel-action="attractions"]:hover,
.panel-actions button[data-panel-action="attractions"]:focus-visible {
  background: linear-gradient(180deg, #e00015, #9a000a);
}

.panel-actions button[data-panel-action="hours"]:hover,
.panel-actions button[data-panel-action="hours"]:focus-visible {
  background: linear-gradient(180deg, #ffa227, #c96b00);
}

.panel-actions button[data-panel-action="prices"]:hover,
.panel-actions button[data-panel-action="prices"]:focus-visible {
  background: linear-gradient(180deg, #76c927, #3a8909);
}

.panel-actions button[data-panel-action="faq"]:hover,
.panel-actions button[data-panel-action="faq"]:focus-visible {
  background: linear-gradient(180deg, #61b1ed, #105999);
}
