/* 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%…" text. 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: 0.9375rem;
    color: #fff;
    -webkit-text-stroke: 4px #000;
    paint-order: stroke fill;
}

.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.75rem 1rem;
}

.title {
    margin: 0;
    font-size: 1rem;
    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: 0.875rem;
    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: 0.8125rem;
    font-weight: 600;
    color: var(--text);
}

.header-date-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    font-size: 0.6875rem;
    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: 0.8125rem;
    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: 0.8125rem;
    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: 0.8125rem;
    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: 0.75rem;
    color: #e53935;
    min-height: 1.2em;
}

.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: 220px;
    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: 0.875rem;
    font-weight: 500;
}

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

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

.header-location-error {
    font-size: 0.75rem;
    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;
    border-bottom: 1px solid var(--border);
}

.tab {
    padding: 0.5rem 0.6rem;
    font-size: 0.875rem;
    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: 0.8125rem;
    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 {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
    align-items: stretch;
}

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

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

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

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

.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: 1rem;
    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);
}

.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: 0.9375rem;
}

.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-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: 1.2rem;
    color: var(--text-muted);
    text-align: center;
}

.panel-content input[type="text"] {
    width: 100%;
    padding: 0.6rem 0.75rem;
    font-size: 1rem;
    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: 0.875rem;
    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: 0.9375rem;
    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: 0.9375rem;
    color: var(--text-muted);
}

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

.status-special-summary {
    margin: 0;
    font-size: 0.875rem;
    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-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 {
    cursor: pointer;
}

.showtime-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-top: -4px;
    min-height: 152px;
}

.showtime-times {
    margin: 0;
    font-size: 0.9375rem;
    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: 0.9375rem;
    font-weight: 600;
}

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

.showtime-theatre {
    margin: 0;
    font-size: 0.875rem;
}

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

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

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

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

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

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

.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;
}

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

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

.action-btn.action-watched:hover {
    background: rgba(105, 219, 124, 0.15);
}

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

.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;
}

.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;
}

.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;
}

.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: 0.9375rem;
    color: var(--text-muted);
}

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

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

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

.watched-hide-checkbox {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    cursor: pointer;
    user-select: none;
}

.watched-hide-checkbox:hover {
    color: var(--text);
}

.watched-hide-checkbox input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    accent-color: var(--accent);
}

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

.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: 0.875rem;
    color: var(--text-muted);
    text-align: center;
}
.signin-input {
    width: 100%;
    padding: 0.6rem 0.75rem;
    font-size: 1rem;
    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: x-large;
}
#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: 0.9rem;
    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 {
    flex: 1;
    min-width: 0;
    flex-direction: column;
    gap: 0.25rem;
}

.choice-icon {
    display: block;
}

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

.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;
}

.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: 100%;
    }
}

.movie-detail-no-showtimes {
    margin: 0;
    font-size: 0.9375rem;
    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: 1.75rem;
    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: 0.9375rem;
    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: 0.9375rem;
    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: 0.875rem;
    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: 0.6875rem;
    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: 0.9375rem;
    line-height: 1.5;
    color: var(--text);
}

.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);
}

.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: 1rem;
    font-weight: 600;
    text-transform: uppercase;
}

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

.movie-detail-theater-name {
    font-weight: 600;
    font-size: 0.9375rem;
    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: 0.875rem;
    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: 1.75rem;
    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: 1.25rem;
    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: 0.9375rem;
    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: 0.9375rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.theater-detail-distance {
    margin: 0 0 0;
    font-size: 0.9375rem;
    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: 0.9375rem;
}

.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);
}

.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;
}

.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;
}

.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;
}