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

html,
body,
#root {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  /* Prevent iOS bounce */
  overscroll-behavior: none;
}

.app-layout {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
  /* Handle notched iPhones */
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}

.poster-strip-section {
  flex: 0 0 20%;
  min-height: 110px;
  display: flex;
  align-items: stretch;
  overflow: hidden;
  background: linear-gradient(105deg, #f7efe2 0%, #f3e4ce 48%, #e8dcc8 100%);
}

.poster-strip-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
}

.poster-strip-container::before,
.poster-strip-container::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 70px;
  z-index: 5;
  pointer-events: none;
  transition: opacity 280ms ease;
  opacity: 0;
}

.poster-strip-container.has-scroll-left::before {
  left: 0;
  background: linear-gradient(to right, #f7efe2 15%, transparent);
  opacity: 1;
}

.poster-strip-container.has-scroll-right::after {
  right: 0;
  background: linear-gradient(to left, #e8dcc8 15%, transparent);
  opacity: 1;
}

.poster-strip-scroll-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #1b2435;
  transition: all 180ms ease;
}

.poster-strip-scroll-btn:hover {
  background: #fff;
  transform: translateY(-50%) scale(1.08);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

.scroll-btn-left {
  left: 12px;
}

.scroll-btn-right {
  right: 12px;
}

.poster-strip {
  width: 100%;
  height: 100%;
  display: flex;
  gap: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  touch-action: pan-x;
  scrollbar-width: none;
}

.poster-strip::-webkit-scrollbar {
  display: none;
}

.poster-card {
  flex: 0 0 auto;
  height: 100%;
  border-radius: 0;
  position: relative;
  scroll-snap-align: start;
}

.poster-guide-card {
  aspect-ratio: 2 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 8px;
  box-sizing: border-box;
}

.poster-guide-content {
  color: #1f2a3d;
  text-align: center;
  display: grid;
  gap: 0;
  justify-items: center;
}

.poster-guide-logo {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 auto 18px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.poster-guide-text {
  margin: 0 0 4px;
  font: 700 15px/1.25 system-ui, -apple-system, sans-serif;
}

.poster-guide-arrow {
  display: block;
  line-height: 1;
  justify-self: center;
}

.poster-guide-arrow-icon {
  width: 22px;
  display: block;
  margin: 0 auto;
}

.poster-guide-arrow-icon path {
  fill: currentColor;
}

.poster-card-button {
  all: unset;
  display: block;
  height: 100%;
  cursor: pointer;
}

.poster-card-button:focus-visible {
  outline: 2px solid #0f1729;
  outline-offset: -2px;
}

.poster-image {
  display: block;
  width: auto;
  height: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 0;
  object-fit: cover;
  transition: transform 200ms ease, filter 200ms ease, opacity 200ms ease;
}

.poster-card:not(.is-selected) .poster-image {
  opacity: 0.6;
  filter: grayscale(0.2);
}

.poster-card.is-selected {
  z-index: 20;
}

.poster-card.is-selected .poster-image {
  opacity: 1;
  transform: scale(1.08);
  filter: saturate(1.2) contrast(1.1);
  outline: 3px solid #b4892b;
  outline-offset: -3px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.poster-close-button {
  position: absolute;
  top: 1px;
  left: 1px;
  z-index: 30;
  width: 22px;
  height: 22px;
  background: #a97f269c;
  backdrop-filter: blur(4px);
  color: #fff;
  border: none;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 160ms ease;
  padding: 0;
}

.poster-close-button:hover {
  background: #b4892b;
  transform: scale(1.1);
}

.poster-empty {
  margin: 0;
  width: 100%;
  text-align: center;
  padding: 0 16px;
  font: 600 14px/1.35 system-ui, -apple-system, sans-serif;
  color: #283447;
}

.cinemap-marker-anchor.cinema-map-pin {
  position: relative;
  width: 34px;
  height: 44px;
  cursor: pointer;
  user-select: none;
  transform: translateY(-10px);
  transition: transform 140ms ease;
}

.cinemap-marker-anchor.cinema-map-pin .cinema-map-pin-shape {
  position: absolute;
  left: 50%;
  top: 0;
  width: 34px;
  height: 34px;
  background: #18263a;
  border: 0.5px solid rgba(11, 19, 32, 0.7);
  border-radius: 50% 50% 50% 0;
  transform: translateX(-50%) rotate(-45deg);
  box-shadow: 0 4px 10px rgba(11, 19, 32, 0.28);
  display: grid;
  place-items: center;
}

.cinemap-marker-anchor.cinema-map-pin .cinema-map-pin-inner {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #b4892b;
  display: grid;
  place-items: center;
  box-shadow: inset 0 0 0 2px rgba(255, 245, 216, 0.22);
  transform: rotate(45deg);
}

.cinemap-marker-anchor.cinema-map-pin .cinema-marker-icon {
  width: 16px;
  height: 16px;
}

.cinemap-marker-anchor.cinema-map-pin .cinema-marker-icon path {
  fill: #fff;
}

.cinemap-marker-anchor.cinema-map-pin .cinema-map-pin-tip {
  display: none;
}

.cinemap-marker-anchor.cinema-map-pin .cinema-map-pin-label {
  position: absolute;
  left: 38px;
  top: 12px;
  width: 150px;
  max-width: 150px;
  white-space: normal;
  display: block;
  max-height: 2.3em;
  overflow: hidden;
  text-overflow: clip;
  overflow-wrap: break-word;
  word-break: break-word;
  font: 700 12px/1.15 system-ui, -apple-system, sans-serif;
  color: #b4892b;
  text-shadow:
    -1px -1px 0 #fff,
    1px -1px 0 #fff,
    -1px 1px 0 #fff,
    1px 1px 0 #fff,
    0 0 2px #fff;
  pointer-events: auto;
  cursor: pointer;
}

.cinemap-marker-anchor.cinema-map-pin:hover {
  transform: translateY(-12px) scale(1.03);
}

.cinema-popover {
  z-index: 1000;
  width: min(92vw, 360px);
}

.cinema-popover-card {
  position: relative;
  box-sizing: border-box;
  border: 1px solid rgba(20, 28, 44, 0.2);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(10, 14, 24, 0.24);
  padding: 10px 12px 12px;
}

.cinema-popover-close {
  position: absolute;
  right: 6px;
  top: 6px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #1b2435;
  cursor: pointer;
  font-size: 21px;
  line-height: 1;
}

.cinema-popover-close:hover {
  background: rgba(12, 17, 30, 0.08);
}

.cinema-popover-title {
  margin: 0 30px 6px 0;
  color: #101827;
  font: 700 18px/1.25 system-ui, -apple-system, sans-serif;
}

.cinema-popover-address {
  margin: 0 30px 8px 0;
  color: #2f3a4d;
  font: 500 14px/1.35 system-ui, -apple-system, sans-serif;
}

.cinema-popover-content {
  max-height: min(42vh, 300px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.cinema-popover-movies {
  margin: 0;
  padding: 0;
  list-style: none;
}

.cinema-popover-movie {
  border-radius: 8px;
  padding: 6px 8px;
}

.cinema-popover-card.has-selected-movie .cinema-popover-movie:not(.is-selected) {
  opacity: 0.6;
}

.cinema-popover-movie+.cinema-popover-movie {
  margin-top: 6px;
}

.cinema-popover-movie.is-selected {
  background: rgba(180, 137, 43, 0.12);
  box-shadow: inset 0 0 0 1px rgba(180, 137, 43, 0.35);
}

.cinema-popover-movie-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

.cinema-popover-movie-title {
  color: #0f172a;
}

.cinema-popover-movie-badge {
  font: 700 10px/1 system-ui, -apple-system, sans-serif;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #fff;
  background: #b4892b;
  border-radius: 999px;
  padding: 4px 7px;
}

.cinema-popover-showtimes {
  margin: 0;
  padding-left: 14px;
}

.cinema-popover-version {
  display: flex;
  gap: 6px;
  align-items: baseline;
}

.cinema-popover-version-label {
  font-weight: 700;
}

.cinema-popover-version-times {
  opacity: 0.95;
}

.cinema-popover-content li {
  color: #0f172a;
  font: 500 14px/1.35 system-ui, -apple-system, sans-serif;
}

.map-section {
  flex: 1 1 78%;
  min-height: 280px;
}

.map-container {
  display: block;
  width: 100%;
  height: 100%;
}

.custom-map-control-button {
  background-color: #fff;
  border: 0;
  border-radius: 2px;
  box-shadow: 0 1px 4px -1px rgba(0, 0, 0, 0.3);
  margin: 10px;
  padding: 0 0.5em;
  font: 400 18px Roboto, Arial, sans-serif;
  overflow: hidden;
  height: 40px;
  cursor: pointer;
}

.custom-map-control-button:hover {
  background: rgb(235, 235, 235);
}

.custom-location-control-button {
  width: 40px;
  min-width: 40px;
  height: 40px;
  margin-bottom: 8px;
  padding: 0;
  display: grid;
  place-items: center;
}

.custom-location-control-button .location-control-icon {
  width: 18px;
  height: 18px;
  display: block;
}

.custom-location-control-button .location-control-icon path {
  fill: #1b2435;
}

.custom-location-control-button:hover .location-control-icon path {
  fill: #0f172a;
}

/* HTML marker styles */
.name-tag {
  background-color: #4285f4;
  border-radius: 8px;
  color: #ffffff;
  font-size: 14px;
  padding: 10px 15px;
  position: relative;
  transform: translateY(-8px);
}

.name-tag::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translate(-50%, 0);
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid #4285f4;
}

@supports (height: 100svh) {
  .app-layout {
    height: 100svh;
  }
}

@media (max-width: 768px) {
  body {
    padding-top: 0;
    padding-bottom: 0;
  }

  .poster-strip-section {
    flex: 0 0 140px;
    min-height: 140px;
  }

  .map-section {
    min-height: 220px;
  }

  .custom-map-control-button {
    min-height: 44px;
    padding: 0 0.75rem;
    font-size: 16px;
  }

  .cinema-popover-title {
    font-size: 18px;
    line-height: 1.25;
    margin: 0 0 6px;
  }

  .cinema-popover-address {
    font-size: 14px;
    line-height: 1.35;
    margin: 0 0 8px;
  }

  .cinema-popover-content li {
    font-size: 14px;
    line-height: 1.35;
  }
}