:root {
  color-scheme: light;
  --bg: #f7f7f2;
  --surface: #ffffff;
  --surface-strong: #0d5eaf;
  --text: #181818;
  --muted: #68645f;
  --border: #d9d6ce;
  --accent: #0d5eaf;
  --accent-strong: #084f98;
  --teal: #047a78;
  --gold: #b77818;
  --focus: #0b5fff;
  --shadow: 0 14px 40px rgba(24, 24, 24, 0.09);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-feature-settings: "kern" 1, "liga" 1;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.45;
}

button,
input,
select,
textarea {
  font: inherit;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.topbar {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  padding: 2rem clamp(1rem, 4vw, 3rem) 1.25rem;
  background: var(--surface-strong);
  color: #fff;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.eyebrow {
  margin: 0 0 0.35rem;
  color: #111;
  font-size: 0.78rem;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 0;
  max-width: 17ch;
  font-size: clamp(1.55rem, 2.6vw, 2.65rem);
  line-height: 1.08;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0.25rem;
  font-size: 1.1rem;
  line-height: 1.25;
}

h3 {
  margin-bottom: 0.4rem;
  font-size: 1.25rem;
  line-height: 1.2;
}

main {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 1rem clamp(1rem, 3vw, 2rem) 3rem;
}

.main-tabs {
  display: inline-flex;
  gap: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.header-command-group {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
}

.tab-button {
  min-height: 2.35rem;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #fff;
  padding: 0 0.9rem;
  cursor: pointer;
  font-weight: 760;
}

.tab-button.is-active {
  background: #fff;
  color: var(--surface-strong);
}

.view-panel {
  margin-top: 1rem;
}

.language-switch {
  display: inline-grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.25rem;
  padding: 0.25rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
}

.lang-button,
.ghost-button,
.contact-button {
  min-height: 2.25rem;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 760;
}

.lang-button {
  min-width: 3rem;
  background: transparent;
  color: #fff;
}

.lang-button.is-active {
  background: #fff;
  color: var(--surface-strong);
}

.contact-button {
  border: 0;
  background: transparent;
  color: #fff;
  padding: 0 0.85rem;
  font-size: 0.9rem;
}

.contact-button:hover,
.contact-button[aria-expanded="true"] {
  background: #fff;
  color: var(--surface-strong);
}

.ghost-button {
  padding: 0 0.85rem;
  background: #e7f0fb;
  color: var(--accent-strong);
}

.ghost-button:hover {
  background: #d7e8fb;
}

.filters {
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.filters-header,
.results-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.filter-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.mobile-filter-button,
.filter-dialog-head,
.filter-dialog-footer {
  display: none;
}

.filter-count-badge {
  display: inline-grid;
  min-width: 1.35rem;
  height: 1.35rem;
  place-items: center;
  border-radius: 999px;
  background: #fff;
  color: var(--accent-strong);
  font-size: 0.75rem;
  font-weight: 820;
}

.filter-count-badge[hidden] {
  display: none;
}

.muted {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.filter-grid {
  position: relative;
  display: flex;
  align-items: start;
  flex-wrap: nowrap;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-bottom: 0.35rem;
  overflow-x: visible;
  overflow-y: visible;
}

label {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
}

label span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 760;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

select,
.time-filter select,
input[type="search"],
textarea {
  width: 100%;
  min-height: 2.55rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  padding: 0 0.65rem;
}

.filter-menu,
.time-filter {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
}

#movie-filter,
#cinema-filter {
  flex-grow: 1.35;
}

#district-filter {
  flex-grow: 1.15;
}

#imdb-filter {
  flex-grow: 0.9;
}

.time-filter {
  display: grid;
  gap: 0.35rem;
}

.filter-trigger {
  position: relative;
  display: grid;
  width: 100%;
  min-height: 3.9rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  padding: 0.48rem 0.65rem;
  text-align: left;
  cursor: pointer;
}

.filter-trigger::after {
  content: "";
  position: absolute;
  right: 0.65rem;
  bottom: 0.9rem;
  width: 0.45rem;
  height: 0.45rem;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: rotate(45deg);
}

.filter-label,
.filter-summary {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filter-label {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 760;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.filter-summary {
  max-width: calc(100% - 1.2rem);
  margin-top: 0.15rem;
  color: var(--text);
  font-size: 0.92rem;
}

.filter-popover {
  position: fixed;
  z-index: 30;
  width: min(22rem, calc(100vw - 2rem));
  max-height: 22rem;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.filter-search {
  position: sticky;
  top: 0;
  z-index: 1;
  display: block;
  padding: 0.55rem;
  border-bottom: 1px solid #ebe7df;
  background: #fff;
}

.filter-search input {
  padding-left: 2rem;
}

.search-icon {
  position: absolute;
  left: 1.15rem;
  top: 50%;
  color: var(--muted);
  transform: translateY(-50%);
}

.filter-options {
  display: grid;
  max-height: 18rem;
  overflow-y: auto;
  padding: 0.35rem;
}

.check-option {
  display: grid;
  grid-template-columns: 1rem minmax(0, 1fr);
  gap: 0.55rem;
  align-items: start;
  min-height: 2.2rem;
  padding: 0.45rem 0.5rem;
  border-radius: 6px;
  cursor: pointer;
}

.check-option:hover {
  background: #f7f4ec;
}

.check-option input {
  margin: 0.15rem 0 0;
}

.check-option span {
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 520;
  letter-spacing: 0;
  text-transform: none;
}

textarea {
  min-height: 8rem;
  padding: 0.65rem;
  resize: vertical;
}

.results-head {
  margin: 1.5rem 0 0.75rem;
}

.movie-list {
  display: grid;
  gap: 0.9rem;
}

.movie-card {
  display: grid;
  grid-template-columns: 116px minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.poster {
  width: 116px;
  aspect-ratio: 90 / 129;
  border-radius: 6px;
  object-fit: cover;
  background: #e6e2d9;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.movie-facts {
  display: grid;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.movie-facts p {
  margin-bottom: 0;
}

.movie-description {
  max-width: 72ch;
  color: #3e3a35;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 1.6rem;
  max-width: 100%;
  border-radius: 999px;
  padding: 0 0.55rem;
  background: #f1ede3;
  color: #3f3b36;
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}

.pill.genre {
  background: #f1e7ff;
  color: #5f2a96;
}

.rating-pill {
  background: #e7f0fb;
  color: var(--accent-strong);
  font-weight: 760;
  text-decoration: none;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.rating-pill:hover {
  text-decoration: underline;
}

.location-pill {
  min-height: 1.45rem;
  background: #edf1f6;
  color: #34445a;
  font-size: 0.76rem;
}

.open-air-pill {
  min-height: 1.45rem;
  background: #dff8f5;
  color: #006d68;
  font-size: 0.76rem;
  font-weight: 760;
}

.screenings {
  display: grid;
  gap: 0.55rem;
}

.screening {
  display: grid;
  grid-template-columns: 4.2rem minmax(0, 1fr);
  gap: 0.7rem;
  padding-top: 0.55rem;
  border-top: 1px solid #ebe7df;
}

.time {
  color: var(--accent);
  font-weight: 820;
  font-variant-numeric: tabular-nums lining-nums;
}

.cinema-line {
  margin-bottom: 0.1rem;
  font-weight: 760;
}

.cinema-heading {
  display: grid;
  gap: 0.35rem;
}

.cinema-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.address-line,
.schedule-line {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.trailer {
  aspect-ratio: 16 / 9;
  min-height: 225px;
  overflow: hidden;
  border-radius: 8px;
  background: #111;
}

.trailer iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 225px;
  border: 0;
}

.trailer-empty {
  display: grid;
  min-height: 225px;
  place-items: center;
  padding: 1rem;
  color: #d8d2c8;
  text-align: center;
}

.empty-state {
  padding: 3rem 1rem;
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.6);
  text-align: center;
}

.guide-panel {
  display: grid;
  gap: 1rem;
}

.guide-panel[hidden] {
  display: none;
}

.guide-head {
  max-width: 60rem;
}

.guide-head .muted {
  max-width: 70ch;
}

.contact-panel {
  position: absolute;
  z-index: 40;
  top: calc(100% + 0.5rem);
  right: clamp(1rem, 4vw, 3rem);
  width: min(30rem, calc(100vw - 2rem));
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
}

.contact-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  align-items: end;
  margin-top: 0.75rem;
}

.message-field,
#contact-status {
  grid-column: 1 / -1;
}

.contact-form button {
  align-self: end;
}

@media (max-width: 1180px) {
  .contact-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .movie-card {
    grid-template-columns: 104px minmax(0, 1fr);
  }

  .trailer {
    grid-column: 1 / -1;
  }
}

@media (max-width: 1100px) {
  body.filter-dialog-open {
    overflow: hidden;
  }

  body {
    font-size: 15px;
    line-height: 1.4;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
    padding: 0.9rem 1rem;
  }

  .eyebrow {
    margin-bottom: 0.2rem;
    font-size: 0.64rem;
  }

  h1 {
    max-width: 11ch;
    font-size: 1.35rem;
    line-height: 1.05;
  }

  h2 {
    font-size: 1rem;
  }

  h3 {
    font-size: 1.08rem;
  }

  .main-tabs {
    display: inline-flex;
    flex: 0 0 8.5rem;
    min-width: 8.5rem;
  }

  .tab-button {
    min-height: 2.2rem;
    flex: 1 1 0;
    padding: 0 0.55rem;
    font-size: 0.78rem;
  }

  .view-panel {
    margin-top: 0.65rem;
  }

  .header-actions {
    width: 100%;
    max-width: none;
    gap: 0.35rem;
    justify-content: flex-start;
  }

  .header-command-group {
    flex: 1 1 auto;
    min-width: 0;
    gap: 0.15rem;
    padding: 0.15rem;
  }

  .contact-button,
  .lang-button,
  .ghost-button {
    min-height: 2rem;
    border-radius: 6px;
    font-size: 0.78rem;
  }

  .contact-button {
    flex: 0 0 auto;
    padding: 0 0.55rem;
  }

  .lang-button {
    min-width: 2.35rem;
  }

  .language-switch {
    margin-left: auto;
    gap: 0.15rem;
    padding: 0.15rem;
  }

  .filters-header {
    align-items: center;
    flex-direction: row;
  }

  .filters-header #reset-filters {
    display: none;
  }

  .filter-actions {
    flex: 0 0 auto;
  }

  .mobile-filter-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 2.15rem;
    border: 0;
    border-radius: 6px;
    background: var(--accent);
    color: #fff;
    padding: 0 0.8rem;
    font-size: 0.82rem;
    font-weight: 820;
    cursor: pointer;
  }

  .mobile-filter-button[aria-expanded="true"] {
    background: var(--accent-strong);
  }

  .filters-header .muted {
    max-width: calc(100vw - 10.5rem);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.78rem;
  }

  .filter-grid {
    position: fixed;
    z-index: 70;
    inset: 0;
    display: none;
    flex-direction: column;
    gap: 0.65rem;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    margin: 0;
    padding: 0 0.85rem max(0.85rem, env(safe-area-inset-bottom));
    overflow-x: hidden;
    overflow-y: auto;
    background: var(--surface);
    scrollbar-width: thin;
  }

  .filters.is-mobile-open .filter-grid {
    display: flex;
  }

  .filter-dialog-head {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 0 -0.85rem 0.2rem;
    padding: 0.85rem 0.85rem 0.65rem;
    border-bottom: 1px solid #ebe7df;
    background: var(--surface);
  }

  .filter-dialog-head h2 {
    margin-bottom: 0;
  }

  .filter-close-button {
    display: inline-grid;
    width: 2.25rem;
    height: 2.25rem;
    place-items: center;
    border: 0;
    border-radius: 999px;
    background: #e7f0fb;
    color: var(--accent-strong);
    cursor: pointer;
    font-size: 1.4rem;
    line-height: 1;
  }

  .filter-dialog-footer {
    position: sticky;
    bottom: 0;
    display: grid;
    grid-template-columns: minmax(0, 0.72fr) minmax(0, 1fr);
    gap: 0.55rem;
    margin: auto -0.85rem -0.85rem;
    padding: 0.65rem 0.85rem max(0.85rem, env(safe-area-inset-bottom));
    border-top: 1px solid #ebe7df;
    background: var(--surface);
  }

  .mobile-filter-reset,
  .mobile-filter-done {
    width: 100%;
    min-height: 2.75rem;
    border: 0;
    border-radius: 6px;
    font-weight: 820;
    cursor: pointer;
  }

  .mobile-filter-reset {
    background: #e7f0fb;
    color: var(--accent-strong);
  }

  .mobile-filter-done {
    background: var(--accent);
    color: #fff;
  }

  .filter-menu,
  .time-filter {
    width: 100%;
    flex-basis: auto;
  }

  #movie-filter,
  #cinema-filter {
    flex-basis: auto;
  }

  #district-filter {
    flex-basis: auto;
  }

  #imdb-filter {
    flex-basis: auto;
  }
}

@media (max-width: 720px) {
  main {
    padding: 0.65rem 0.65rem 2rem;
  }

  .filters {
    position: sticky;
    z-index: 20;
    top: 0;
    margin-top: 0;
    padding: 0.75rem;
    border-radius: 8px;
  }

  .guide-panel {
    gap: 0.75rem;
  }

  .filter-trigger {
    min-height: 3.25rem;
    padding: 0.38rem 0.55rem;
  }

  .filter-label,
  label span {
    font-size: 0.62rem;
    letter-spacing: 0.05em;
  }

  .filter-summary {
    font-size: 0.82rem;
  }

  .time-filter select {
    min-height: 2.15rem;
    padding: 0 0.45rem;
    font-size: 0.88rem;
  }

  .filter-popover {
    position: static;
    width: 100%;
    max-height: none;
    margin-top: 0.45rem;
    overflow: hidden;
    border-radius: 6px;
    box-shadow: none;
  }

  .filter-search {
    padding: 0.75rem;
  }

  .filter-options {
    max-height: 16rem;
    padding: 0.45rem;
  }

  .check-option {
    grid-template-columns: 1.15rem minmax(0, 1fr);
    min-height: 2.65rem;
    padding: 0.6rem 0.45rem;
  }

  .check-option span {
    font-size: 0.95rem;
  }

  .contact-form {
    grid-template-columns: 1fr;
  }

  .contact-panel {
    position: fixed;
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100vw;
    max-height: 88vh;
    overflow-y: auto;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 12px 12px 0 0;
    padding: 1rem 1rem max(1rem, env(safe-area-inset-bottom));
  }

  .results-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.35rem;
    margin: 1rem 0 0.6rem;
  }

  .movie-card {
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 0.7rem;
    padding: 0.7rem;
  }

  .poster {
    width: 78px;
    border-radius: 5px;
  }

  .movie-facts,
  .address-line,
  .schedule-line {
    font-size: 0.84rem;
  }

  .movie-description {
    display: -webkit-box;
    max-width: none;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
  }

  .movie-meta {
    gap: 0.3rem;
    margin-bottom: 0.55rem;
  }

  .pill {
    min-height: 1.45rem;
    padding: 0 0.45rem;
    font-size: 0.74rem;
  }

  .screenings {
    gap: 0.45rem;
  }

  .screening {
    grid-template-columns: 3.45rem minmax(0, 1fr);
    gap: 0.5rem;
    padding-top: 0.45rem;
  }

  .time {
    font-size: 0.92rem;
  }

  .cinema-line {
    margin-bottom: 0.2rem;
    font-size: 0.92rem;
  }

  .cinema-badges {
    gap: 0.25rem;
  }

  .trailer,
  .trailer iframe,
  .trailer-empty {
    min-height: 0;
  }

  .trailer {
    grid-column: 1 / -1;
    border-radius: 6px;
  }
}

@media (max-width: 420px) {
  .topbar {
    gap: 0.55rem;
  }

  h1 {
    font-size: 1.2rem;
  }

  .contact-button {
    max-width: 6.4rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .header-command-group {
    width: 100%;
  }

  .main-tabs {
    flex-basis: 7.6rem;
    min-width: 7.6rem;
  }

  .tab-button,
  .contact-button {
    font-size: 0.74rem;
  }

  .movie-card {
    grid-template-columns: 68px minmax(0, 1fr);
  }

  .poster {
    width: 68px;
  }
}
