/* Mobile-first movie showtimes */
:root {
    --bg: #0f0f12;
    --surface: #1a1a1f;
    --text: #e8e8ec;
    --text-muted: #9090a0;
    --accent: #6c5ce7;
    --accent-hover: #5b4cd6;
    --link: #7dcfff;
    --border: #2a2a32;
    --danger: #ff6b6b;
    --success: #69db7c;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    -webkit-tap-highlight-color: transparent;
}

/* Loading overlay: black full-screen panel with animated SVGs */
.loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.loading-overlay[aria-hidden="false"] {
    display: flex;
}

.loading-overlay[aria-hidden="true"] {
    display: none;
}

.loading-animation-container {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    z-index: 0;
}

.loading-animation-svg,
#loading-cinema {
    width: 100%;
    height: 100%;
    display: block;
    min-width: 0;
    min-height: 0;
}

.loading-logo-container {
    position: absolute;
    top: -23px;
    left: 0;
    right: 0;
    z-index: 1;
    width: 100%;
    aspect-ratio: 16 / 9;
}

.loading-logo-svg {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Loading status row: "Loading X%" + optional step line. Critical CSS in content.html; these enhance when style.css loads. */
.loading-status-row {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.75rem 1rem 1rem;
    gap: 0.5rem;
    z-index: 2;
}

.loading-text {
    font-size: calc(0.9375rem + 1px);
    color: #fff;
    -webkit-text-stroke: 4px #000;
    paint-order: stroke fill;
    text-align: center;
}

.loading-pct-line {
    display: block;
}

.loading-step-line {
    display: block;
    font-size: calc(0.8125rem + 1px);
    margin-top: 0.2rem;
    color: #e8e8ec;
    -webkit-text-stroke: 3px #000;
}

.loading-text[aria-hidden="true"] {
    visibility: hidden;
}

.loading-text[aria-hidden="false"] {
    visibility: visible;
}


.header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 0.65rem;
}

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

/* Slide-in menu */
.nav-drawer-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.nav-drawer-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
}

.nav-drawer {
    position: fixed;
    top: 0;
    right: 0;
    left: auto;
    width: 383px;
    max-width: 100%;
    height: 100%;
    max-height: 100dvh;
    z-index: 2001;
    background: var(--surface);
    border-left: 1px solid var(--border);
    border-right: none;
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.35);
    transform: translateX(100%);
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
    display: flex;
    flex-direction: column;
}

.nav-drawer.is-open {
    transform: translateX(0);
}

.nav-drawer-inner {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1;
}

.nav-drawer-header {
    flex-shrink: 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 2.75rem;
    padding: 0.65rem 2.75rem;
    border-bottom: 1px solid var(--border);
}

.nav-drawer-title {
    font-size: calc(1.05rem + 1px);
    font-weight: 700;
    color: var(--text);
    text-align: center;
}

.nav-drawer-close {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 2.25rem;
    height: 2.25rem;
    border: none;
    border-radius: 0.375rem;
    background: transparent;
    color: var(--text-muted);
    font-size: calc(1.5rem + 1px);
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-drawer-close:hover,
.nav-drawer-close:focus-visible {
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
    outline: none;
    transform: translateY(-50%);
}

.nav-drawer-scroll {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0.75rem 0.85rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.header-bar {
    display: flex;
    align-items: stretch;
    gap: 0.5rem;
}

.nav-open-btn {
    margin-left: auto;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    min-height: 2.5rem;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    background: var(--bg);
    color: var(--text);
    cursor: pointer;
}

.nav-open-btn:hover,
.nav-open-btn:focus-visible {
    border-color: var(--accent);
    outline: none;
}

.nav-open-btn-bars {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 18px;
}

.nav-open-btn-bars span {
    display: block;
    height: 2px;
    border-radius: 1px;
    background: currentColor;
}

.tabs-in-header {
    flex: 1;
    min-width: 0;
    justify-content: center;
}

.menu-locale-group {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.menu-locale-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.35rem 0.5rem;
    font-size: calc(0.875rem + 1px);
    font-weight: 600;
    line-height: 1.35;
    min-width: 0;
    margin-bottom: 15px;
}

.menu-locale-of-zip {
    display: inline-flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.35rem;
    min-width: 0;
    max-width: 100%;
}

.menu-locale-text {
    color: var(--text);
}

.menu-locale-select {
    font-size: calc(0.8125rem + 1px) !important;
}

.menu-locale-zip {
    font-size: calc(0.8125rem + 1px) !important;
}

/* Long location labels: allow most of row width but cap on small screens to avoid clipping */
#header-zip-input.header-zip-display {
    display: inline-block;
    min-width: 0;
    max-width: min(21rem, 85vw);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: bottom;
}

.menu-locale-date-wrap {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.15rem;
}

.menu-date-trigger {
    font-size: calc(0.8125rem + 1px) !important;
}

.menu-zip-error {
    margin: 0;
    font-size: calc(0.75rem + 1px);
}

.menu-expand-stack {
    display: flex;
    flex-direction: column;
    gap: 0;
    overflow: hidden;
}

/* Flex default min-height:auto prevents collapsed panels from shrinking to 0 */
.menu-expand-stack > .header-location-expand,
.menu-expand-stack > .menu-date-expand {
    min-height: 0;
}

.menu-nested-panel {
    border-radius: 0.375rem;
    overflow: hidden;
}

.nav-drawer .header-location-expand {
    margin: 0;
    padding: 0 0.25rem;
    max-height: 0;
    min-height: 0;
    flex-shrink: 0;
}

.nav-drawer .header-location-expand.expanded {
    max-height: 420px;
    padding: 0.65rem 0.65rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    background: var(--bg);
}

.nav-drawer .header-location-expand-inner {
    max-width: none;
    margin: 0;
}

.nav-drawer .header-location-use-current {
    display: flex;
    width: 100%;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.nav-drawer .header-location-use-current-label {
    text-align: center;
}

.nav-drawer .header-location-actions {
    justify-content: center;
    flex-wrap: wrap;
}

.menu-date-expand {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.3s ease-out, margin 0.25s ease;
    margin: 0;
    overflow: hidden;
}

.menu-date-expand.is-expanded {
    grid-template-rows: 1fr;
    margin-top: 0;
}

.menu-date-expand > .menu-date-popover-inner {
    overflow: hidden;
    min-height: 0;
    border-radius: 0.375rem;
    background: var(--bg);
}

.menu-date-expand:not(.is-expanded) > .menu-date-popover-inner {
    border: none;
    padding: 0;
    background: transparent;
}

.menu-date-expand.is-expanded > .menu-date-popover-inner {
    border: 1px solid var(--border);
    padding: 0.65rem 0.5rem 0.75rem;
}

.menu-display-block {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.menu-section-label {
    font-size: calc(0.7rem + 1px);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.menu-display-segmented {
    display: flex;
    width: 100%;
    margin: 0 auto;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    overflow: hidden;
    background: var(--bg);
}

#menu-display-some.menu-segment {
    flex: 1 1 auto;
    min-width: 0;
    justify-content: center;
    padding-left: 0.65rem;
    padding-right: 0.5rem;
}

#menu-display-all.menu-segment {
    flex: 0 0 108px;
    max-width: 108px;
    min-width: 0;
    justify-content: center;
    padding-left: 0.25rem;
    padding-right: 0.25rem;
    font-size: calc(0.75rem + 1px);
}

.menu-segment {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    min-height: 2.5rem;
    padding: 0.45rem 0.5rem;
    border: none;
    margin: 0;
    font: inherit;
    font-size: calc(0.8125rem + 1px);
    font-weight: 600;
    color: var(--text-muted);
    background: transparent;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.menu-segment:first-child {
    border-right: 1px solid var(--border);
}

.menu-segment:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.04);
}

.menu-segment.is-selected {
    color: var(--text);
    background: rgba(108, 92, 231, 0.22);
}

.menu-segment:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
    z-index: 1;
}

.menu-segment-check {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 0;
    opacity: 0;
    overflow: hidden;
    flex-shrink: 0;
    transition: width 0.15s ease, opacity 0.15s ease, margin 0.15s ease;
    color: var(--accent);
}

.menu-segment.is-selected .menu-segment-check {
    width: 14px;
    opacity: 1;
    margin-right: 0.35rem;
}

.menu-segment-label {
    white-space: nowrap;
}

.menu-filter-fieldset {
    border: none;
    margin: 0;
    padding: 0;
    padding-left: 6.7rem;
    padding-right: 0rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.menu-filter-fieldset.menu-filters-disabled {
    opacity: 0.15;
    pointer-events: none;
}

.menu-live-event-subfilters {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-left: 1.35rem;
    margin-left: 0.25rem;
}

.menu-live-event-subfilters.menu-filters-disabled {
    opacity: 0.15;
    pointer-events: none;
}

.menu-switch-row-nested .menu-switch-label {
    font-size: calc(0.9375rem + 1px);
    color: var(--text);
}

.menu-filter-divider {
    margin: 0.35rem 0 0.2rem 0;
    border: none;
    border-top: 1px solid #4b4b58;
    opacity: 0.55;
    align-self: stretch;
}

.menu-switch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    font-size: calc(1rem + 1px);
}

#menu-filter-ai-row[hidden] {
    display: none !important;
}

.menu-switch-label {
    flex: 1;
    line-height: 1.3;
    color: var(--text);
}

.switch {
    position: relative;
    display: inline-block;
    width: 2.5rem;
    height: 1.35rem;
    flex-shrink: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: var(--border);
    border-radius: 999px;
    transition: background 0.2s ease;
}

.switch-slider::before {
    position: absolute;
    content: "";
    height: 1.05rem;
    width: 1.05rem;
    left: 2px;
    bottom: 2px;
    background: var(--text-muted);
    border-radius: 50%;
    transition: transform 0.2s ease, background 0.2s ease;
}

.switch input:checked + .switch-slider {
    background: rgba(108, 92, 231, 0.45);
}

.switch input:checked + .switch-slider::before {
    transform: translateX(1.1rem);
    background: var(--accent);
}

.switch input:focus-visible + .switch-slider {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.menu-auth-block {
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
    margin-top: 0.25rem;
    text-align: center;
}

#menu-auth-signed-in {
    text-align: center;
}

.menu-user-email {
    margin: 0 0 0.5rem;
    font-size: calc(0.8125rem + 1px);
    word-break: break-word;
    color: var(--text-muted);
    text-align: center;
}

.menu-signout-btn {
    width: 100%;
}

.menu-auth-signin {
    width: 100%;
}

.title {
    margin: 0;
    font-size: calc(1rem + 1px);
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
}

.title-inline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.25rem 0.5rem;
}

.title-text {
    font-weight: 600;
    color: var(--text);
}

/* Keep " of " and zip input together when header wraps on narrow screens */
.title-zip-group {
    display: inline-flex;
    white-space: nowrap;
}

.title-zip-group .title-text {
    padding-top: 4px;
    padding-right: 9px;
}

.title-date-group {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

.title-date-group .title-text {
    padding-top: 0px;
    padding-right: 7px;
}

button.header-date-trigger {
    font-family: inherit;
    font-weight: inherit;
    margin: 0;
}

.header-date-popover {
    position: fixed;
    z-index: 1000;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.4);
    padding: 0.65rem 0.75rem 0.75rem;
    min-width: 17.5rem;
}

.header-date-popover-inner {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.header-date-cal-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.25rem;
}

.header-date-nav-btn {
    flex: 0 0 auto;
    padding: 0.25rem 0.45rem;
    font-size: calc(0.875rem + 1px);
    line-height: 1;
    border: 1px solid var(--border);
    border-radius: 0.25rem;
    background: var(--bg);
    color: var(--text);
    cursor: pointer;
}

.header-date-nav-btn:hover:not(:disabled),
.header-date-nav-btn:focus-visible:not(:disabled) {
    border-color: var(--accent);
    outline: none;
}

.header-date-nav-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.header-date-caption {
    flex: 1;
    text-align: center;
    font-size: calc(0.8125rem + 1px);
    font-weight: 600;
    color: var(--text);
}

.header-date-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    font-size: calc(0.6875rem + 1px);
    font-weight: 600;
    color: var(--text-muted);
    text-align: center;
}

.header-date-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
}

.header-date-day {
    padding: 0.35rem 0.2rem;
    font-size: calc(0.8125rem + 1px);
    line-height: 1.2;
    border: 1px solid transparent;
    border-radius: 0.25rem;
    background: transparent;
    color: var(--text);
    cursor: pointer;
}

.header-date-day:hover:not(:disabled) {
    background: var(--bg);
    border-color: var(--border);
}

.header-date-day:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}

.header-date-day:disabled {
    opacity: 0.28;
    cursor: not-allowed;
}

.header-date-day.is-selected {
    background: var(--accent);
    color: #fff;
    font-weight: 600;
}

.header-date-day.is-today:not(.is-selected) {
    font-weight: 700;
    border-color: var(--accent);
}

.header-date-day-empty {
    min-height: 1.75rem;
    visibility: hidden;
}

.header-date-footer {
    display: flex;
    justify-content: center;
    padding-top: 0.15rem;
}

.header-dropdown {
    padding: 0.4rem 1.75rem 0.4rem 0.6rem;
    font-size: calc(0.8125rem + 1px);
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    background: var(--bg);
    color: var(--text);
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.header-dropdown:hover,
.header-dropdown:focus {
    outline: none;
    border-color: var(--accent);
}

.header-zip-display {
    display: inline-block;
    padding: 0.4rem 0.6rem;
    font-size: calc(0.8125rem + 1px);
    font-family: inherit;
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    background: var(--bg);
    color: var(--text);
    cursor: pointer;
    white-space: nowrap;
}

.header-zip-display:hover,
.header-zip-display:focus {
    outline: none;
    border-color: var(--accent);
}

.header-zip-display:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.header-zip-display.error {
    border-color: #e53935;
}

.header-zip-error {
    flex-basis: 100%;
    width: 100%;
    font-size: calc(0.75rem + 1px);
    color: #e53935;
}

#header-zip-error:empty {
    display: none;
}

#header-zip-error:not(:empty) {
    display: block;
}

.header-location-expand {
    overflow: hidden;
    max-height: 0;
    padding: 0 1rem;
    margin: 0 -1rem 0;
    background: var(--bg);
    border-top: 1px solid transparent;
    transition: max-height 0.3s ease-out, padding 0.25s ease-out, border-color 0.2s ease-out;
}

.header-location-expand.expanded {
    max-height: 300px;
    padding: 0.75rem 1rem;
    border-top-color: var(--border);
    transition: max-height 0.35s ease-in, padding 0.25s ease-in, border-color 0.2s ease-in;
}

.header-location-expand[aria-hidden="true"]:not(.expanded) {
    pointer-events: none;
}

.header-location-expand-inner {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 20rem;
    margin: 0 auto;
}

.header-location-expand-inner label {
    font-size: calc(0.875rem + 1px);
    font-weight: 500;
}

.header-location-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.header-location-input-wrap .header-location-input {
    width: 100%;
    padding-right: 2.25rem;
}

.header-location-input {
    padding: 0.5rem 0.6rem;
    font-size: calc(0.875rem + 1px);
    font-family: inherit;
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    background: var(--bg);
    color: var(--text);
}

.header-location-clear {
    position: absolute;
    right: 0.35rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.2rem;
    border: none;
    border-radius: 0.25rem;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 0;
}

.header-location-clear:hover,
.header-location-clear:focus {
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
}

.header-location-clear:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}

.header-location-use-current {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
    padding: 0.15rem 0;
    border: none;
    background: none;
    font: inherit;
    font-size: calc(0.8125rem + 1px);
    color: var(--link);
    text-decoration: none;
    cursor: pointer;
    text-align: left;
}

.header-location-use-current:hover,
.header-location-use-current:focus {
    color: #a8ddff;
    text-decoration: none;
}

.header-location-use-current:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    text-decoration: none;
}

.header-location-geo-icon {
    flex-shrink: 0;
}

.header-location-input.error {
    border-color: #e53935;
}

.header-location-error {
    font-size: calc(0.75rem + 1px);
    color: #e53935;
    min-height: 1.2em;
}

.header-location-actions {
    display: flex;
    gap: 0.5rem;
}

.location-link {
    color: var(--link);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.location-link:hover,
.location-link:focus {
    color: #a8ddff;
}

.tabs-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.tabs {
    display: flex;
    gap: 0;
}

.tab {
    padding: 0rem 1.6rem;
    font-size: calc(0.875rem + 1px);
    font-weight: 500;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
}

.tab:hover {
    color: var(--text);
}

.tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.filter-dropdown {
    padding: 0.4rem 1.75rem 0.4rem 0.6rem;
    font-size: calc(0.8125rem + 1px);
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    background: var(--bg);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239090a0' d='M2.5 4.5L6 8l3.5-3.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    color: var(--text);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.tab-panel.hidden {
    display: none;
}

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

.movie-row,
.venue-row {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
    align-items: stretch;
}

.movie-row:last-child,
.venue-row:last-child {
    border-bottom: none;
}

.movie-row-empty {
    padding: 1rem 0;
    color: var(--text-muted);
    font-size: calc(0.9375rem + 1px);
}

.theaters-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.theater-section {
    border-bottom: 1px solid var(--border);
    scroll-margin-top: 99px;
}

.theater-section:last-child {
    border-bottom: none;
}

.theater-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.75rem 0;
    font-size: calc(1rem + 1px);
    font-weight: 600;
    text-align: left;
    background: transparent;
    border: none;
    color: var(--text);
    cursor: pointer;
}

.theater-section.expanded .theater-header {
    color: var(--link);
}

.theater-chevron {
    display: inline-flex;
    transition: transform 0.2s ease;
}

.theater-section.expanded .theater-chevron {
    transform: rotate(180deg);
}

.theater-content.collapsed {
    display: none;
}

.theater-content.expanded {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.theater-content .showtimes-list {
    width: 100%;
    padding: 0;
    margin: 0;
    list-style: none;
    border-top: 1px solid var(--border);
}

.theater-content .action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 330px;
    margin: 0.75rem auto 25px;
    text-decoration: none;
    color: var(--link);
    border-color: var(--link);
}

@media (hover: hover) and (pointer: fine) {
    .theater-content .action-btn:hover {
        color: #a8ddff;
        border-color: #a8ddff;
        background: rgba(125, 207, 255, 0.1);
    }
}

.theater-empty {
    padding: 1rem 0;
    color: var(--text-muted);
    font-size: calc(0.9375rem + 1px);
}

.movie-title-wrap {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.status-icon-btn {
    padding: 0.2rem;
    border: none;
    background: transparent;
    cursor: pointer;
    color: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.status-icon-btn:hover {
    opacity: 0.8;
}

.status-icon-btn.icon-dontwant {
    color: var(--danger);
}

.status-icon-btn.icon-watched-liked {
    color: var(--success);
}

.status-icon-btn.icon-watched-unrated {
    color: var(--success);
}

.status-icon-btn.icon-watched-disliked {
    color: var(--danger);
}

/* Panel overlay */
.panel {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    pointer-events: none;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0.2s, opacity 0.2s;
}

.panel[aria-hidden="false"] {
    pointer-events: auto;
    visibility: visible;
    opacity: 1;
}

.panel-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
}

.panel-content {
    position: relative;
    width: 100%;
    max-width: 24rem;
    max-height: 85vh;
    overflow: auto;
    background: var(--surface);
    border-radius: 1rem 1rem 0 0;
    padding: 1.25rem 1.25rem calc(1.25rem + env(safe-area-inset-bottom));
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.4);
    transform: translateY(100%);
    transition: transform 0.25s ease-out;
}

.panel[aria-hidden="false"] .panel-content {
    transform: translateY(0);
}

.panel-content h2 {
    margin: 0 0 1rem;
    font-size: 1.125rem;
    text-align: center;
}

.panel-content label {
    display: block;
    margin: 1.0rem 0 0.25rem;
    font-size: calc(1.2rem + 1px);
    color: var(--text-muted);
    text-align: center;
}

.panel-content input[type="text"] {
    width: 100%;
    padding: 0.6rem 0.75rem;
    font-size: calc(1rem + 1px);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    background: var(--bg);
    color: var(--text);
}

.radius-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.radius-btn {
    padding: 0.5rem 0.75rem;
    font-size: calc(0.875rem + 1px);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    background: var(--bg);
    color: var(--text);
    cursor: pointer;
}

.radius-btn:hover {
    border-color: var(--text-muted);
}

.radius-btn.active {
    border-color: var(--accent);
    background: var(--accent);
    color: #fff;
}

.panel-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.btn {
    padding: 0.6rem 1rem;
    font-size: calc(0.9375rem + 1px);
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
}

.btn-primary:hover {
    background: var(--accent-hover);
}

.btn:not(.btn-primary) {
    background: var(--border);
    color: var(--text);
}

/* Main content */
.main {
    padding: 0.75rem 1rem 2rem;
}

.status {
    margin: 0 0 0.75rem;
    font-size: calc(0.9375rem + 1px);
    color: var(--text-muted);
}

.status.error {
    color: var(--danger);
}

.status-special-summary {
    margin: 0;
    font-size: calc(0.875rem + 1px);
    font-weight: 500;
    line-height: 1.35;
    color: #e6c200;
}

.showtimes-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.showtime-row {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
    align-items: stretch;
}

.showtime-row:last-child {
    border-bottom: none;
}

.showtime-row-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    flex: 1;
    min-width: 0;
    align-items: flex-start;
}

.showtime-times-above {
    flex-basis: 100%;
    flex-shrink: 0;
    margin-bottom: 0;
}

.showtime-row-ticketmaster .showtime-poster-wrap-ticketmaster {
    flex-basis: auto;
    width: max-content;
}

.showtime-row-ticketmaster .showtime-content-ticketmaster {
    flex-basis: 100%;
    min-height: 0;
}

.showtime-row-ticketmaster .showtime-details {
    justify-content: flex-start;
    margin-top: 0;
}

.showtime-poster {
    width: auto;
    height: 147px;
    object-fit: cover;
    border-radius: 0.375rem;
    background: var(--border);
    flex-shrink: 0;
}

.showtime-poster.showtime-poster-movie {
    max-width: 98px;
}

.showtime-poster.showtime-poster-ticketmaster {
    width: 345px;
    height: auto;
    max-height: 194px;
    object-fit: cover;
    background: none;
}

.showtime-poster-wrap {
    display: block;
    line-height: 0;
    flex-shrink: 0;
    align-self: flex-start;
}

.showtime-poster-wrap-ticketmaster {
    flex-shrink: 0;
    align-self: flex-start;
}

.showtime-row,
.movie-row,
.venue-row {
    cursor: pointer;
}

.venue-row {
    scroll-margin-top: 99px;
    list-style: none;
}

.venue-row:focus:not(:focus-visible) {
    outline: none;
}

.venue-row .showtime-row-inner {
    align-items: stretch;
}

.venue-row .showtime-poster-wrap {
    align-self: flex-start;
}

.venue-row-address {
    margin: 0;
    font-size: calc(0.9375rem + 1px);
    color: var(--text-muted);
    line-height: 1.5;
    white-space: pre-line;
}

.venue-row-distance {
    margin: 0.25rem 0 0;
    font-size: calc(0.9375rem + 1px);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.venue-row-distance::before {
    content: "";
    display: inline-block;
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239090a0' stroke-width='2'%3E%3Cpath d='M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
}

.venue-row-distance a {
    color: inherit;
    text-decoration: none;
}

.venue-row-distance a:hover {
    text-decoration: underline;
}

.venue-row-recliners {
    margin: 0.25rem 0 0;
    font-size: calc(0.9375rem + 1px);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.venue-row-recliners .venue-recliner-icon {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    color: var(--text-muted);
}

.venue-row-showtimes-count {
    margin: auto 0 0;
    padding-top: 0.35rem;
    font-size: calc(0.875rem + 1px);
    color: var(--link);
}

.showtime-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-top: -4px;
    min-height: 155px;
    color: var(--link);
}

.showtime-times {
    margin: 0;
    font-size: calc(0.9375rem + 1px);
    font-weight: 600;
    color: var(--text);
}

.showtime-times.ticket-link,
.showtime-times.theater-detail-link {
    display: block;
    color: var(--link);
    text-decoration: none;
}

.showtime-times.ticket-link:hover,
.showtime-times.theater-detail-link:hover {
    text-decoration: underline;
}

.showtime-title {
    margin: 0;
    font-size: calc(0.9375rem + 1px);
    font-weight: 600;
}

.showtime-year {
    font-weight: 400;
    color: var(--text-muted);
}

.showtime-theatre {
    margin: 0;
    font-size: calc(0.875rem + 1px);
}

.showtime-theatre a {
    color: var(--link);
    text-decoration: none;
}

.showtime-theatre a:hover {
    text-decoration: underline;
}

.showtime-special {
    margin: 0;
    font-size: calc(0.8125rem + 1px);
    font-weight: 600;
    line-height: 1.3;
    color: #e6c200;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.showtime-special-icon {
    display: inline-block;
    vertical-align: -0.1em;
    margin-right: 0.35em;
}

.showtime-details {
    flex: 0.97;
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    margin-top: 7px;
}

.showtime-details-inner {
    line-height: 1.25;
    color: var(--text-muted);
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 6;
    line-clamp: 6;
}

/* Font size on line elements, not on -webkit-box parent (clamp), so sizing applies reliably. */
.showtime-details-line1,
.showtime-details-line2 {
    font-size: calc(0.6875rem + 3px);
}

.showtime-details .row-quality-star {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
}

.showtime-details .row-quality-star svg {
    flex-shrink: 0;
}

.action-btn {
    padding: 0.35rem 0.6rem;
    font-size: 19px;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    background: var(--bg);
    color: var(--text-muted);
    cursor: pointer;
    width: 330px;
    height: 41px;
    margin-bottom: 7px;
}

@media (hover: hover) and (pointer: fine) {
    .action-btn:hover {
        border-color: var(--text-muted);
        color: var(--text);
    }
}

.action-btn.action-watched {
    border-color: var(--success);
    color: var(--success);
}

@media (hover: hover) and (pointer: fine) {
    .action-btn.action-watched:hover {
        background: rgba(105, 219, 124, 0.15);
    }
}

.action-btn.action-watched.filled {
    background: var(--success);
    color: #fff;
}

@media (hover: hover) and (pointer: fine) {
    .action-btn.action-watched.filled:hover {
        background: #5bc76e;
    }
}

.action-btn.action-dont {
    border-color: var(--danger);
    color: var(--danger);
}

.action-btn.action-dont.filled {
    background: var(--danger);
    color: #fff;
}

@media (hover: hover) and (pointer: fine) {
    .action-btn.action-dont.filled:hover {
        background: #ff5252;
    }

    .action-btn.action-dont:hover {
        background: rgba(255, 107, 107, 0.15);
    }
}

.action-btn.action-want {
    border-color: #a78bfa;
    color: #a78bfa;
}

@media (hover: hover) and (pointer: fine) {
    .action-btn.action-want:hover {
        border-color: #c4b5fd;
        color: #c4b5fd;
        background: rgba(167, 139, 250, 0.1);
    }
}

.action-btn.action-want.filled {
    background: #a78bfa;
    color: #fff;
    border-color: #a78bfa;
}

@media (hover: hover) and (pointer: fine) {
    .action-btn.action-want.filled:hover {
        background: #8b5cf6;
        border-color: #8b5cf6;
    }
}

.action-btn.action-want .action-want-icon {
    display: inline-flex;
    vertical-align: top;
    margin-right: 0.35rem;
    margin-top: 1px;
}

/* Confirm panels */
.confirm-panel-poster {
    display: block;
    width: 100%;
    max-width: 185px;
    height: auto;
    object-fit: contain;
    border-radius: 0.5rem;
    background: var(--border);
    margin: 0 auto 1rem;
}

.confirm-message {
    margin: 0.5rem 0 1rem;
    font-size: calc(0.9375rem + 1px);
    color: var(--text-muted);
}

.confirm-buttons {
    display: flex;
    gap: 1rem;
}

#dontwant-panel .confirm-buttons,
#watched-panel .confirm-buttons:last-of-type {
    justify-content: center;
}

#watched-date-trigger {
    background-color: var(--border);
    background-image: none;
    border: none;
    color: var(--text);
    position: relative;
    font-size: 17px !important;
}

#watched-date-trigger:hover,
#watched-date-trigger:focus {
    outline: none;
    border: none;
}

#watched-date-trigger:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Chevron matches label color (filter-dropdown uses a fixed gray SVG fill). */
#watched-date-trigger::after {
    content: '';
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background-color: var(--text);
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23000' d='M2.5 4.5L6 8l3.5-3.5'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23000' d='M2.5 4.5L6 8l3.5-3.5'/%3E%3C/svg%3E");
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
    pointer-events: none;
}

.confirm-buttons-icons {
    gap: 0.5rem;
}

#watched-panel .confirm-buttons:last-of-type {
    margin-top: 1.25rem;
}

#watched-panel .watched-date-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin: 0 0 1rem;
    gap: 0.35rem;
}

#watched-panel .watched-date-wrap {
    justify-content: center;
}

#watched-panel #watched-date-expand {
    width: 100%;
    max-width: 19rem;
}

#watched-panel .watched-panel-subheading {
    margin-top: 1.25rem;
}

#watched-panel .watched-with-someone-row {
    margin-top: 0.25rem;
}

#watched-panel .btn-choice-text-only {
    min-height: 2.85rem;
    padding-left: 1rem;
    padding-right: 1rem;
}

#watched-panel .btn-choice-text-only .choice-label {
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--text-muted);
}

@media (hover: hover) and (pointer: fine) {
    #watched-panel .btn-choice-text-only:hover .choice-label {
        color: var(--text);
    }
}

.btn-choice.filled[data-choice="loved"],
.btn-choice.filled[data-choice="liked"],
.btn-choice.filled[data-choice="loved"]:focus,
.btn-choice.filled[data-choice="liked"]:focus,
.btn-choice.filled[data-choice="loved"]:active,
.btn-choice.filled[data-choice="liked"]:active {
    background: var(--success);
    border-color: var(--success);
    color: #fff;
}

.btn-choice.filled[data-choice="loved"] .choice-label,
.btn-choice.filled[data-choice="liked"] .choice-label,
.btn-choice.filled[data-choice="loved"]:focus .choice-label,
.btn-choice.filled[data-choice="liked"]:focus .choice-label,
.btn-choice.filled[data-choice="loved"]:active .choice-label,
.btn-choice.filled[data-choice="liked"]:active .choice-label {
    color: #fff;
    -webkit-text-fill-color: #fff;
}

/* Sign-in panel - above other panels (watched, dontWant, etc.) */
#signin-panel {
    z-index: 200;
}
.signin-panel-content .signin-step h2 {
    margin-bottom: 1rem;
}
.signin-help {
    margin: 0.5rem 0 1.5rem;
    font-size: calc(0.875rem + 1px);
    color: var(--text-muted);
    text-align: center;
}
.signin-input {
    width: 100%;
    padding: 0.6rem 0.75rem;
    font-size: calc(1rem + 1px);
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    background: var(--bg);
    color: var(--text);
    box-sizing: border-box;
    margin-top: 0.4rem;
    margin-bottom: 0.7rem;
    text-align: center;
}
.signin-input:focus {
    outline: none;
    border-color: var(--accent);
}
#signin-panel .confirm-buttons {
    margin-top: 1rem;
    justify-content: center;
}
#signin-code {
    font-weight: bold;
    font-size: calc(1.25rem + 1px);
}
#signin-code.error,
#signin-email.error {
    border-color: #c00;
    box-shadow: 0 0 0 2px rgba(204, 0, 0, 0.3);
}
.signin-code-error {
    display: none;
    color: #c00;
    font-size: calc(0.9rem + 1px);
    text-align: center;
}
.signin-code-error.visible {
    display: block;
}
.signin-code-error a {
    color: #c00;
    text-decoration: underline;
}
.signin-code-error a:hover {
    text-decoration: none;
}

.btn-choice.filled[data-choice="loved"] svg,
.btn-choice.filled[data-choice="liked"] svg,
.btn-choice.filled[data-choice="loved"]:focus svg,
.btn-choice.filled[data-choice="liked"]:focus svg,
.btn-choice.filled[data-choice="loved"]:active svg,
.btn-choice.filled[data-choice="liked"]:active svg {
    stroke: #fff;
}

.btn-choice.filled[data-choice="disliked"],
.btn-choice.filled[data-choice="hated"],
.btn-choice.filled[data-choice="disliked"]:focus,
.btn-choice.filled[data-choice="hated"]:focus,
.btn-choice.filled[data-choice="disliked"]:active,
.btn-choice.filled[data-choice="hated"]:active {
    background: var(--danger);
    border-color: var(--danger);
    color: #fff;
}

.btn-choice.filled[data-choice="disliked"] .choice-label,
.btn-choice.filled[data-choice="hated"] .choice-label,
.btn-choice.filled[data-choice="disliked"]:focus .choice-label,
.btn-choice.filled[data-choice="hated"]:focus .choice-label,
.btn-choice.filled[data-choice="disliked"]:active .choice-label,
.btn-choice.filled[data-choice="hated"]:active .choice-label {
    color: #fff;
    -webkit-text-fill-color: #fff;
}

.btn-choice.filled[data-choice="disliked"] svg,
.btn-choice.filled[data-choice="hated"] svg,
.btn-choice.filled[data-choice="disliked"]:focus svg,
.btn-choice.filled[data-choice="hated"]:focus svg,
.btn-choice.filled[data-choice="disliked"]:active svg,
.btn-choice.filled[data-choice="hated"]:active svg {
    stroke: #fff;
}

.btn-choice.filled[data-choice="watchedWithYes"],
.btn-choice.filled[data-choice="watchedWithYes"]:focus,
.btn-choice.filled[data-choice="watchedWithYes"]:active {
    background: var(--success);
    border-color: var(--success);
    color: #fff;
}

.btn-choice.filled[data-choice="watchedWithYes"] .choice-label,
.btn-choice.filled[data-choice="watchedWithYes"]:focus .choice-label,
.btn-choice.filled[data-choice="watchedWithYes"]:active .choice-label {
    color: #fff;
    -webkit-text-fill-color: #fff;
}

.btn-choice.filled[data-choice="watchedWithNo"],
.btn-choice.filled[data-choice="watchedWithNo"]:focus,
.btn-choice.filled[data-choice="watchedWithNo"]:active {
    background: var(--danger);
    border-color: var(--danger);
    color: #fff;
}

.btn-choice.filled[data-choice="watchedWithNo"] .choice-label,
.btn-choice.filled[data-choice="watchedWithNo"]:focus .choice-label,
.btn-choice.filled[data-choice="watchedWithNo"]:active .choice-label {
    color: #fff;
    -webkit-text-fill-color: #fff;
}

@media (hover: hover) and (pointer: fine) {
    .btn-choice[data-choice="watchedWithYes"]:hover {
        border-color: var(--success);
        color: var(--success);
    }

    .btn-choice[data-choice="watchedWithYes"]:hover .choice-label {
        color: var(--success);
    }

    .btn-choice[data-choice="watchedWithNo"]:hover {
        border-color: var(--danger);
        color: var(--danger);
    }

    .btn-choice[data-choice="watchedWithNo"]:hover .choice-label {
        color: var(--danger);
    }
}

.btn-choice {
    flex: 1;
    min-width: 0;
    flex-direction: column;
    gap: 0.25rem;
}

.choice-icon {
    display: block;
}

.choice-label {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
}

@media (hover: hover) and (pointer: fine) {
    .btn-icon:hover .choice-label {
        color: var(--text);
    }

    .btn-choice[data-choice="loved"]:hover,
    .btn-choice[data-choice="liked"]:hover {
        border-color: var(--success);
        color: var(--success);
    }

    .btn-choice[data-choice="loved"]:hover .choice-label,
    .btn-choice[data-choice="liked"]:hover .choice-label {
        color: var(--success);
    }

    .btn-choice[data-choice="disliked"]:hover,
    .btn-choice[data-choice="hated"]:hover {
        border-color: var(--danger);
        color: var(--danger);
    }

    .btn-choice[data-choice="disliked"]:hover .choice-label,
    .btn-choice[data-choice="hated"]:hover .choice-label {
        color: var(--danger);
    }

    #watched-panel.suppress-choice-hover .btn-choice:hover {
        border-color: var(--border);
        color: var(--text);
    }

    #watched-panel.suppress-choice-hover .btn-choice:hover .choice-label {
        color: var(--text-muted);
    }

    #watched-panel.suppress-choice-hover .btn-choice:hover svg {
        stroke: var(--text);
    }
}

.btn-icon {
    padding: 0.69rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

@media (hover: hover) and (pointer: fine) {
    .btn-icon:hover {
        border-color: var(--text-muted);
    }
}

.btn-thumbs-up:hover {
    border-color: var(--success);
    color: var(--success);
}

.btn-thumbs-down:hover {
    border-color: var(--danger);
    color: var(--danger);
}

.status-icon-btn.icon-watched-loved {
    color: var(--success);
}

.status-icon-btn.icon-watched-hated {
    color: var(--danger);
}

/* Movie detail panel - full page overlay */
.movie-detail-panel {
    align-items: flex-start;
    justify-content: flex-start;
    touch-action: none;
}

.movie-detail-panel .panel-backdrop {
    position: fixed;
    inset: 0;
    cursor: default;
    touch-action: none;
    background: var(--bg);
}

.movie-detail-scroll {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-gutter: stable;
}

.movie-detail-content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 36rem;
    min-height: 100vh;
    min-height: 100dvh;
    touch-action: pan-y;
    background: var(--surface);
    padding: calc(1rem + env(safe-area-inset-top, 0px)) 1.25rem calc(1.25rem + env(safe-area-inset-bottom));
    box-shadow: 0 0 24px rgba(0, 0, 0, 0.5);
    transform: none;
    margin: 0 auto;
}

/* Prevent body scroll when movie detail panel is open */
html.movie-detail-panel-open,
body.movie-detail-panel-open {
    overflow: hidden;
    overscroll-behavior: none;
}

/* Full width in landscape on mobile */
@media (orientation: landscape) and (max-height: 600px) {
    .movie-detail-content {
        max-width: 36rem;
    }
}

.movie-detail-no-showtimes {
    margin: 0;
    font-size: calc(0.9375rem + 1px);
    color: var(--text-muted);
}

.movie-detail-header-sticky {
    position: sticky;
    top: -84px;
    z-index: 1;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: -100px;
    padding-top: 100px;
    padding-bottom: 1rem;
    margin-bottom: 0.5rem;
    background: var(--surface);
}

.movie-detail-close {
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    font-size: calc(1.75rem + 1px);
    line-height: 1;
    border: none;
    border-radius: 0.5rem;
    background: var(--border);
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.movie-detail-close:hover {
    background: var(--text-muted);
}

.movie-detail-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.3;
    flex: 1;
    min-width: 0;
}

.movie-detail-poster {
    display: block;
    width: 100%;
    max-width: 185px;
    height: auto;
    object-fit: contain;
    border-radius: 0.5rem;
    background: var(--border);
    margin: 0 auto 1rem;
}

.movie-detail-poster.movie-detail-poster-ticketmaster {
    max-width: none;
}

.movie-detail-meta {
    font-size: calc(0.9375rem + 1px);
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.movie-detail-meta .quality-star {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.movie-detail-meta .quality-star svg {
    color: #f5c518;
    flex-shrink: 0;
}

.movie-detail-release {
    font-size: calc(0.9375rem + 1px);
    color: var(--text-muted);
    margin: 0 0 0.5rem;
    line-height: 1.5;
}

.movie-detail-cast {
    margin-bottom: 0.7rem;
}

.movie-detail-cast-heading {
    margin: 0 0 0.5rem;
    font-size: calc(0.875rem + 1px);
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text);
}

.movie-detail-cast-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 0.1rem;
}

.movie-detail-actor {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 5rem;
    text-decoration: none;
    color: inherit;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.movie-detail-actor:hover {
    color: var(--link);
}

.movie-detail-actor-photo {
    width: 4rem;
    height: 4rem;
    object-fit: cover;
    border-radius: 50%;
    background: var(--border);
    flex-shrink: 0;
    outline: none;
}


.movie-detail-actor-name {
    font-size: calc(0.6875rem + 1px);
    line-height: 1.2;
    text-align: center;
    margin-top: 0.25rem;
    color: var(--text-muted);
    word-break: break-word;
}

.movie-detail-actor:hover .movie-detail-actor-name {
    color: var(--link);
}

.movie-detail-center-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.9rem;
    margin-top: 1.7rem;
}

.movie-detail-description {
    margin: 0 0 1rem;
    font-size: calc(0.9375rem + 1px);
    line-height: 1.5;
    color: var(--text);
}

.movie-detail-ai-desc-foot {
    margin: 0.15rem 0 0;
    font-size: calc(0.8125rem + 1px);
    line-height: 1.45;
    color: var(--text);
    opacity: 0.82;
}

.movie-detail-more-info {
    color: var(--link);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.movie-detail-more-info:hover {
    color: #a8ddff;
}

.movie-detail-poster-link {
    display: block;
    line-height: 0;
}

.movie-detail-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.movie-detail-actions .action-btn.action-btn-buy-tickets {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--link);
    border-color: var(--link);
}

@media (hover: hover) and (pointer: fine) {
    .movie-detail-actions .action-btn.action-btn-buy-tickets:hover {
        color: #a8ddff;
        border-color: #a8ddff;
        background: rgba(125, 207, 255, 0.1);
    }
}

.movie-detail-seatmap {
    margin: 1rem 0;
}

.movie-detail-seatmap .movie-detail-cast-heading {
    margin-bottom: 0.5rem;
}

.movie-detail-theaters {
    border-top: 1px solid var(--border);
}

.movie-detail-theaters h3 {
    margin: 0.75rem 0 0.75rem;
    font-size: calc(1rem + 1px);
    font-weight: 600;
    text-transform: uppercase;
}

.movie-detail-theater {
    margin-bottom: 1rem;
}

.movie-detail-theater-name {
    font-weight: 600;
    font-size: calc(0.9375rem + 1px);
    margin-bottom: 0.35rem;
}

.movie-detail-theater-name a {
    color: var(--link);
    text-decoration: none;
}

.movie-detail-theater-name a:hover {
    text-decoration: underline;
}

.movie-detail-theater-times {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: calc(0.875rem + 1px);
    color: var(--text-muted);
}

.movie-detail-theater-times .movie-detail-time {
    white-space: nowrap;
}

.movie-detail-theater-times .movie-detail-time.ticket-link,
.movie-detail-theater-times .movie-detail-time.theater-detail-link {
    color: var(--link);
    text-decoration: none;
}

.movie-detail-theater-times .movie-detail-time.ticket-link:hover,
.movie-detail-theater-times .movie-detail-time.theater-detail-link:hover {
    text-decoration: underline;
}

@media (min-width: 480px) {
    .showtime-row {
        gap: 1rem;
    }
}

/* Theater detail panel - same layout as movie detail */
.theater-detail-panel {
    align-items: flex-start;
    justify-content: flex-start;
    touch-action: none;
}

.theater-detail-panel .panel-backdrop {
    position: fixed;
    inset: 0;
    cursor: default;
    touch-action: none;
    background: var(--bg);
}

.theater-detail-scroll {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-gutter: stable;
}

.theater-detail-content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 36rem;
    min-height: 100vh;
    min-height: 100dvh;
    touch-action: pan-y;
    background: var(--surface);
    padding: calc(1rem + env(safe-area-inset-top, 0px)) 1.25rem calc(1.25rem + env(safe-area-inset-bottom));
    box-shadow: 0 0 24px rgba(0, 0, 0, 0.5);
    transform: none;
    margin: 0 auto;
}

html.theater-detail-panel-open,
body.theater-detail-panel-open {
    overflow: hidden;
    overscroll-behavior: none;
}

.theater-detail-header-sticky {
    position: sticky;
    top: -84px;
    z-index: 1;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: -100px;
    padding-top: 100px;
    padding-bottom: 1rem;
    background: var(--surface);
}

.theater-detail-close {
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    font-size: calc(1.75rem + 1px);
    line-height: 1;
    border: none;
    border-radius: 0.5rem;
    background: var(--border);
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theater-detail-close:hover {
    background: var(--text-muted);
}

.theater-detail-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.3;
    flex: 1;
    min-width: 0;
}

.theater-detail-map-link {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
    border-radius: 0.5rem;
    overflow: hidden;
}

.theater-detail-map-img {
    display: block;
    max-width: 400px;
    max-height: 250px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 0.375rem;
}

.theater-detail-info-row {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    margin: 0 auto 1rem;
    width: fit-content;
}

.theater-detail-chain-logo {
    flex-shrink: 0;
    min-height: 3rem;
    display: flex;
    align-items: center;
}

.theater-detail-chain-logo img {
    align-self: stretch;
    height: 100%;
    width: auto;
    max-width: 8rem;
    object-fit: contain;
}

.theater-chain-placeholder {
    font-size: calc(1.25rem + 1px);
    font-weight: 600;
    color: var(--text-muted);
    padding: 0.5rem 0;
}

.theater-detail-address-block {
    flex: 1;
    min-width: 0;
}

.theater-detail-quals {
    margin: 0 0 1rem;
    font-size: calc(0.9375rem + 1px);
    color: var(--text-muted);
    line-height: 1.5;
    text-align: center;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0 0.5em;
}

.theater-detail-quals .theater-qual-item {
    white-space: nowrap;
}

.theater-detail-quals .theater-qual-sep {
    white-space: nowrap;
}

.theater-detail-address {
    margin: 0 0 0.35rem;
    font-size: calc(0.9375rem + 1px);
    color: var(--text-muted);
    line-height: 1.5;
}

.theater-detail-distance {
    margin: 0 0 0;
    font-size: calc(0.9375rem + 1px);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.theater-detail-distance::before {
    content: "";
    display: inline-block;
    width: 1rem;
    height: 1rem;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239090a0' stroke-width='2'%3E%3Cpath d='M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
}

.theater-detail-website {
    margin: 0.35rem 0 0;
    font-size: calc(0.9375rem + 1px);
}

.theater-detail-website a {
    color: var(--accent, #6366f1);
    text-decoration: none;
}

.theater-detail-website a:hover {
    text-decoration: underline;
}

.theater-detail-actions-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

.theater-detail-actions-row .action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    text-decoration: none;
}

.theater-detail-actions-row .action-btn.theater-directions-btn,
.theater-detail-actions-row .action-btn.theater-detail-tickets-btn {
    color: var(--link);
    border-color: var(--link);
}

@media (hover: hover) and (pointer: fine) {
    .theater-detail-actions-row .action-btn.theater-directions-btn:hover,
    .theater-detail-actions-row .action-btn.theater-detail-tickets-btn:hover {
        color: #a8ddff;
        border-color: #a8ddff;
        background: rgba(125, 207, 255, 0.1);
    }
}

.theater-detail-actions-row .action-btn.theater-detail-favorite-btn {
    color: #a78bfa;
    border-color: #a78bfa;
    font-family: inherit;
}

@media (hover: hover) and (pointer: fine) {
    .theater-detail-actions-row .action-btn.theater-detail-favorite-btn:hover {
        color: #c4b5fd;
        border-color: #c4b5fd;
        background: rgba(167, 139, 250, 0.1);
    }
}

.theater-detail-actions-row .action-btn.theater-detail-favorite-btn.filled {
    color: #fff;
    background: #a78bfa;
    border-color: #a78bfa;
}

@media (hover: hover) and (pointer: fine) {
    .theater-detail-actions-row .action-btn.theater-detail-favorite-btn.filled:hover {
        background: #8b5cf6;
        border-color: #8b5cf6;
    }
}

.theater-detail-actions-row .action-btn.theater-detail-favorite-btn .favorite-icon-outline {
    display: inline-flex;
}

.theater-detail-actions-row .action-btn.theater-detail-favorite-btn .favorite-icon-filled {
    display: none;
}

.theater-detail-actions-row .action-btn.theater-detail-favorite-btn.filled .favorite-icon-outline {
    display: none;
}

.theater-detail-actions-row .action-btn.theater-detail-favorite-btn.filled .favorite-icon-filled {
    display: inline-flex;
    padding-top: 2px;
}

.theater-detail-showtimes {
    padding: 0;
    margin: 0;
    list-style: none;
    border-top: 1px solid var(--border);
}

.theater-favorite-heart {
    display: inline-flex;
    align-items: center;
    margin-right: 0.25rem;
    color: var(--link);
    vertical-align: bottom;
}

#panel-theaters .theater-favorite-heart {
    padding-bottom: 2px;
}

.want-to-see-smile {
    display: inline-flex;
    align-items: center;
    margin-right: -0.1rem;
    color: #fff;
    vertical-align: bottom;
}