  :root {
    --bg: #f8f9fa;
    --card: #fff;
    --border: #dee2e6;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --danger: #dc2626;
    --danger-hover: #b91c1c;
    --text: #1f2937;
    --muted: #6b7280;
    --success: #059669;
    --radius: 14px;
    --shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
    --shadow-lg: 0 18px 40px rgba(37, 99, 235, 0.12);
  }
  * { box-sizing: border-box; margin: 0; padding: 0; }
  body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background:
      radial-gradient(circle at top right, rgba(37, 99, 235, 0.08), transparent 30%),
      linear-gradient(180deg, #eef4ff 0%, #f8fafc 34%, var(--bg) 100%);
    color: var(--text);
    line-height: 1.6;
    padding: 24px;
    max-width: 1200px;
    margin: 0 auto;
    min-height: 100vh;
  }
  h1 {
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    line-height: 1.15;
    margin-bottom: 10px;
  }
  h2 { font-size: 1.1rem; margin-bottom: 12px; color: var(--text); }
  .card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 0;
    box-shadow: var(--shadow);
  }
  .form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 20px;
  }
  .form-group { display: flex; flex-direction: column; }
  .form-group.full { grid-column: 1 / -1; }
  label { font-size: 0.85rem; font-weight: 600; margin-bottom: 4px; }
  input[type="text"], input[type="number"], input[type="date"], select {
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 0.9rem;
  }
  .checkbox-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: center;
    padding: 8px 0;
  }
  .checkbox-row label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 400;
    cursor: pointer;
  }
  button {
    padding: 8px 20px;
    border: none;
    border-radius: 999px;
    font-size: 0.9rem;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.18s ease, transform 0.18s ease, opacity 0.18s ease;
  }
  button:hover { transform: translateY(-1px); }
  button:disabled { cursor: not-allowed; opacity: 0.6; transform: none; }
  .btn-primary { background: var(--primary); color: #fff; }
  .btn-primary:hover { background: var(--primary-hover); }
  .btn-primary:disabled { background: #93c5fd; cursor: not-allowed; }
  .btn-danger { background: var(--danger); color: #fff; }
  .btn-danger:hover { background: var(--danger-hover); }
  .btn-secondary { background: #e5e7eb; color: var(--text); }
  .btn-secondary:hover { background: #d1d5db; }
  .btn-small { padding: 4px 12px; font-size: 0.8rem; }
  .button-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    padding: 8px 20px;
    border: none;
    border-radius: 999px;
    font-size: 0.9rem;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.18s ease, transform 0.18s ease, opacity 0.18s ease;
  }
  .button-link:hover { transform: translateY(-1px); }
  .button-link.btn-secondary { background: #e5e7eb; color: var(--text); }
  .button-link.btn-secondary:hover { background: #d1d5db; }
  .status-pct { font-size: 0.8rem; color: var(--muted); margin-left: 6px; font-variant-numeric: tabular-nums; }
  .hidden { display: none !important; }
  .spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #93c5fd;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
  }
  @keyframes spin { to { transform: rotate(360deg); } }
  .status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
  }
  .status-running { background: #dbeafe; color: var(--primary); }
  .status-done    { background: #d1fae5; color: var(--success); }
  .status-error   { background: #fee2e2; color: var(--danger); }
  .status-cancelled { background: #fef3c7; color: #d97706; }
  .page-shell { display: flex; flex-direction: column; gap: 16px; }
  .hero-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(191, 219, 254, 0.9);
    background:
      linear-gradient(135deg, rgba(255,255,255,0.96), rgba(239,246,255,0.92) 58%, rgba(236,254,255,0.92));
    box-shadow: var(--shadow-lg);
  }
  .locale-switcher {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 3px;
    border-radius: 999px;
    border: 1px solid rgba(191, 219, 254, 0.9);
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 3px 8px rgba(37, 99, 235, 0.08);
  }
  .locale-switcher-btn {
    padding: 4px 9px;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
    transform: none;
  }
  .locale-switcher-btn:hover {
    background: rgba(37, 99, 235, 0.08);
    color: var(--primary);
  }
  .locale-switcher-btn.active {
    background: var(--primary);
    color: #fff;
  }
  .hero-card::after {
    content: "";
    position: absolute;
    inset: auto -40px -80px auto;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: rgba(37, 99, 235, 0.08);
    pointer-events: none;
  }
  .hero-topline {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    position: relative;
    z-index: 1;
  }
  .hero-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }
  .hero-label {
    font-size: clamp(1.02rem, 1.75vw, 1.45rem);
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--primary);
    margin: 0;
    line-height: 1.05;
  }
  .theater-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 0;
  }
  .hero-chain-icon-link {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    overflow: hidden;
    transition: opacity 0.15s;
  }
  .hero-chain-icon-link:hover {
    opacity: 0.75;
  }
  .hero-chain-icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }
  .hero-theater-info {
    flex: 1;
    min-width: 0;
  }
  .hero-theater-address {
    font-size: 0.75rem;
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-top: 2px;
  }
  .theater-name-button {
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    font-size: 1.02rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.35;
    text-align: left;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: underline;
    text-decoration-color: transparent;
    text-underline-offset: 3px;
    transition: color 0.15s, text-decoration-color 0.15s;
  }
  .theater-name-chevron {
    width: 12px;
    height: 7px;
    opacity: 0.75;
    flex-shrink: 0;
    overflow: visible;
  }
  .theater-name-button:hover {
    color: var(--primary-hover);
    text-decoration-color: var(--primary-hover);
    transform: none;
  }
  .theater-name-button:focus-visible {
    outline: 2px solid rgba(37, 99, 235, 0.35);
    outline-offset: 3px;
  }
  .search-page-shell {
    max-width: 920px;
    margin: 0 auto;
  }
  .page-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    position: relative;
    z-index: 1;
  }
  .search-hero-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow: visible;
  }
  .search-back-link {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
    position: relative;
    z-index: 1;
  }
  .search-back-link:hover { text-decoration: underline; }
  .page-controls + .hero-label,
  .search-hero-label {
    margin-top: 8px;
    position: relative;
    z-index: 1;
  }
  .search-form {
    position: relative;
    z-index: 1;
  }
  .search-typeahead {
    position: relative;
  }
  .search-typeahead input[role="combobox"] {
    position: relative;
    z-index: 2;
    width: 100%;
  }
  .search-suggestions {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 6;
    background: var(--card);
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 22px;
    box-shadow: 0 22px 44px rgba(15, 23, 42, 0.16);
    overflow: hidden;
  }
  .search-suggestions-status {
    padding: 12px 16px;
    font-size: 0.86rem;
    color: var(--muted);
    border-bottom: 1px solid rgba(226, 232, 240, 0.85);
    background: rgba(248, 250, 252, 0.92);
  }
  .search-suggestions-list {
    display: grid;
    gap: 10px;
    padding: 12px;
    max-height: 320px;
    overflow-y: auto;
  }
  .search-suggestion-item {
    width: 100%;
    border: 1px solid rgba(191, 219, 254, 0.9);
    background:
      linear-gradient(135deg, rgba(255,255,255,0.98), rgba(239,246,255,0.96) 60%, rgba(236,254,255,0.94));
    display: grid;
    grid-template-columns: 62px minmax(0, 1fr);
    gap: 18px;
    text-align: left;
    padding: 12px;
    border-radius: 18px;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
  }
  .search-suggestion-item:hover,
  .search-suggestion-item.is-active {
    border-color: rgba(37, 99, 235, 0.38);
    background:
      linear-gradient(135deg, rgba(255,255,255,0.99), rgba(219,234,254,0.98) 58%, rgba(224,242,254,0.96));
    box-shadow: 0 16px 32px rgba(37, 99, 235, 0.12);
    transform: translateY(-1px);
  }
  .search-suggestion-poster {
    width: 62px;
    aspect-ratio: 2 / 3;
    min-height: 93px;
    border-radius: 14px;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.12), rgba(191, 219, 254, 0.34));
    border: 1px solid rgba(191, 219, 254, 0.82);
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .search-suggestion-poster-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }
  .search-suggestion-poster-fallback {
    width: 100%;
    height: 100%;
    min-height: 93px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 0.92rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    background:
      radial-gradient(circle at top, rgba(255,255,255,0.92), transparent 52%),
      linear-gradient(180deg, rgba(219,234,254,0.92), rgba(191,219,254,0.68));
  }
  .search-suggestion-body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
  }
  .search-suggestion-title {
    font-size: 1rem;
    line-height: 1.2;
    font-weight: 800;
    color: var(--text);
  }
  .search-suggestion-alt {
    font-size: 0.82rem;
    line-height: 1.35;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .search-suggestion-supporting {
    font-size: 0.76rem;
    line-height: 1.35;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .search-suggestion-plot {
    font-size: 0.74rem;
    line-height: 1.3;
    color: #475569;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
  }
  .search-suggestion-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 4px;
  }
  .search-suggestion-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 10px;
    background: rgba(239, 246, 255, 0.96);
    color: var(--primary);
    font-size: 0.76rem;
    font-weight: 700;
    border: 1px solid rgba(191, 219, 254, 0.88);
  }
  .search-suggestion-chip-rating.imdb {
    background: rgba(254, 243, 199, 0.95);
    border-color: rgba(252, 211, 77, 0.62);
    color: #92400e;
  }
  .search-suggestion-chip-rating.douban {
    background: rgba(220, 252, 231, 0.95);
    border-color: rgba(134, 239, 172, 0.76);
    color: #166534;
  }
  .search-form-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px 24px;
    align-items: end;
  }
  .search-form-actions {
    margin-top: 18px;
    display: flex;
    justify-content: flex-start;
  }
  .search-result-card {
    position: relative;
    min-height: 220px;
  }
  .search-result-card.is-loading #search-movie-container {
    opacity: 0.4;
    filter: grayscale(0.18) blur(1px);
    transform: scale(0.992);
  }
  .search-result-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(241, 245, 249, 0.72);
    backdrop-filter: blur(4px);
    z-index: 3;
  }
  .loading-panel {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    text-align: center;
  }
  .loading-spinner {
    width: 76px;
    height: 76px;
    border: 6px solid rgba(147, 197, 253, 0.65);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
  }
  .loading-text {
    font-size: clamp(1.3rem, 2.5vw, 1.7rem);
    font-weight: 800;
    color: var(--text);
    font-variant-numeric: tabular-nums;
  }
  @media (max-width: 640px) {
    .search-suggestions {
      top: calc(100% + 6px);
      border-radius: 16px;
    }
    .search-suggestion-item {
      grid-template-columns: 58px minmax(0, 1fr);
      gap: 15px;
      padding: 12px;
    }
    .search-suggestion-poster,
    .search-suggestion-poster-fallback {
      width: 58px;
      min-height: 87px;
    }
  }
  /* Theater selection modal */
  .theater-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(3px);
  }
  .theater-modal {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.2);
    width: min(100%, 480px);
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .theater-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 12px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
  }
  .theater-modal-header h2 {
    font-size: 1rem;
    margin-bottom: 0;
  }
  .theater-modal-close {
    background: transparent;
    border: none;
    font-size: 1.3rem;
    color: var(--muted);
    line-height: 1;
    padding: 2px 6px;
    border-radius: 6px;
  }
  .theater-modal-close:hover { background: #f3f4f6; color: var(--text); transform: none; }
  .theater-brand-tabs {
    display: flex;
    gap: 4px;
    padding: 10px 14px;
    background: #f1f5f9;
    flex-shrink: 0;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .theater-brand-tabs::-webkit-scrollbar { display: none; }
  .theater-tab {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    background: transparent;
    border: none;
    border-radius: 999px;
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 7px 10px;
    cursor: pointer;
    transition: color 0.15s, background 0.15s, box-shadow 0.15s;
    transform: none;
  }
  .brand-tab-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
    border-radius: 3px;
  }
  .theater-tab:hover { color: var(--text); background: rgba(255,255,255,0.6); transform: none; }
  .theater-tab.active {
    color: var(--primary);
    background: #fff;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.1);
  }
  .theater-modal-search {
    padding: 10px 14px 12px;
    flex-shrink: 0;
  }
  .theater-modal-search input {
    width: 100%;
    padding: 9px 14px;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    background: rgba(255,255,255,0.92);
    font-size: 0.9rem;
    outline: none;
    color: var(--text);
  }
  .theater-modal-search input:focus {
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
  }
  .theater-modal-body {
    overflow-y: auto;
    flex: 1;
    padding: 8px 0;
  }
  .theater-status-msg {
    padding: 14px 20px;
    font-size: 0.88rem;
    color: var(--muted);
  }
  .theater-section-label {
    padding: 8px 20px 4px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--muted);
  }
  .theater-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 20px;
    cursor: pointer;
    transition: background 0.13s;
  }
  .theater-item:hover { background: #f0f4ff; }
  .theater-item.is-selected { background: #eff6ff; }
  .theater-item-info { flex: 1; min-width: 0; }
  .theater-item-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.35;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .theater-item.is-selected .theater-item-name { color: var(--primary); }
  .theater-item-address {
    font-size: 0.74rem;
    color: var(--muted);
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .theater-item-city {
    font-size: 0.78rem;
    color: var(--muted);
    margin-top: 1px;
  }
  .theater-item-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    padding-top: 1px;
  }
  .theater-item-distance {
    font-size: 0.78rem;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
    min-width: 42px;
    text-align: right;
  }
  .theater-fav-btn {
    background: transparent;
    border: none;
    font-size: 1.1rem;
    padding: 2px 4px;
    line-height: 1;
    color: #d1d5db;
    border-radius: 4px;
  }
  .theater-fav-btn:hover { color: #f59e0b; transform: none; }
  .theater-fav-btn.is-fav { color: #f59e0b; }
  #result-section {
    position: relative;
    overflow: hidden;
    min-height: 220px;
  }
  #movies-container {
    transition: opacity 0.24s ease, filter 0.24s ease, transform 0.24s ease;
  }
  #result-section.is-loading #movies-container {
    opacity: 0.4;
    filter: grayscale(0.18) blur(1px);
    transform: scale(0.992);
  }
  .result-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(241, 245, 249, 0.5);
    backdrop-filter: blur(0);
    z-index: 3;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.24s ease, visibility 0.24s ease, backdrop-filter 0.24s ease, background 0.24s ease;
  }
  .result-overlay.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
    backdrop-filter: blur(4px);
    background: rgba(241, 245, 249, 0.72);
  }
  .result-overlay .loading-panel {
    transform: translateY(10px) scale(0.985);
    opacity: 0;
    transition: transform 0.24s ease, opacity 0.24s ease;
  }
  .result-overlay.is-visible .loading-panel {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
  .loading-placeholder {
    min-height: 180px;
    border-radius: 12px;
    border: 1px dashed #bfdbfe;
    background:
      linear-gradient(90deg, rgba(219,234,254,0.7), rgba(239,246,255,0.9), rgba(219,234,254,0.7));
    animation: shimmer 1.6s linear infinite;
    background-size: 200% 100%;
  }
  @keyframes shimmer {
    from { background-position: 200% 0; }
    to { background-position: -200% 0; }
  }
  .empty-state {
    padding: 42px 20px;
    text-align: center;
    color: var(--muted);
    font-weight: 600;
  }
  .result-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 14px;
    padding-bottom: 12px;
    margin-bottom: 18px;
    border-bottom: 2px solid var(--border);
  }
  .result-heading {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1 1 auto;
  }
  .result-controls-row {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex-wrap: nowrap;
  }
  .toolbar-search-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 0 0 auto;
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid rgba(191, 219, 254, 0.95);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--primary);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.08);
    transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  }
  .toolbar-search-link:hover {
    transform: translateY(-1px);
    background: #eff6ff;
    border-color: rgba(96, 165, 250, 0.95);
    box-shadow: 0 12px 22px rgba(37, 99, 235, 0.12);
  }
  .toolbar-search-link:focus-visible {
    outline: 2px solid rgba(37, 99, 235, 0.35);
    outline-offset: 3px;
  }
  .toolbar-search-link svg {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  .toolbar-search-link-label {
    white-space: nowrap;
  }
  .section-label {
    display: inline-flex;
    align-items: center;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
    white-space: nowrap;
  }
  .mode-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px 5px 14px;
    border: 1px solid rgba(37,99,235,0.35);
    border-radius: 999px;
    background: rgba(239,246,255,0.9);
    color: var(--primary);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    position: relative;
    white-space: nowrap;
    transition: background 0.15s;
    font-family: inherit;
  }
  .mode-chip:hover { background: rgba(219,234,254,0.95); }
  .mode-chip:disabled { opacity: 0.5; cursor: not-allowed; }
  .mode-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 130px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(15,23,42,0.12);
    z-index: 100;
    overflow: hidden;
  }
  .mode-dropdown.hidden { display: none !important; }
  .mode-dropdown-item {
    padding: 10px 16px;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--text);
  }
  .mode-dropdown-item:hover { background: #f1f5f9; }
  .upcoming-days-shell {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--muted);
    white-space: nowrap;
  }
  .upcoming-days-input {
    width: 52px;
    padding: 5px 8px;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    background: rgba(255,255,255,0.92);
    color: var(--primary);
    font-size: 0.92rem;
    font-weight: 700;
    text-align: center;
    font-family: inherit;
  }
  .upcoming-days-input:focus {
    outline: none;
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
  }
  .section-date-shell {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    line-height: 1.2;
    min-width: 0;
    flex: 1 1 auto;
  }
  .section-date-prefix {
    display: inline-flex;
    align-items: center;
    color: #94a3b8;
  }
  .section-date-input {
    min-width: 9.5rem;
    padding: 6px 10px;
    margin: 0;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--primary);
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.2;
    font-family: inherit;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
    cursor: pointer;
  }
  .section-date-input:focus {
    outline: none;
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
  }
  .section-date-input::-webkit-calendar-picker-indicator {
    cursor: pointer;
  }
  .sort-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    padding: 14px 16px;
    border: 1px solid rgba(191, 219, 254, 0.95);
    border-radius: 14px;
    background:
      linear-gradient(135deg, rgba(255,255,255,0.96), rgba(239,246,255,0.94) 62%, rgba(224,242,254,0.86));
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.08);
  }
  .sort-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: 700;
    color: #334155;
    letter-spacing: 0.01em;
    min-height: 52px;
  }
  .sort-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
  }
  .sort-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    padding: 0;
    border: 1px solid rgba(191, 219, 254, 0.9);
    background: rgba(255, 255, 255, 0.9);
    color: #475569;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.9), 0 8px 18px rgba(148, 163, 184, 0.14);
    transition:
      transform 0.18s ease,
      box-shadow 0.18s ease,
      border-color 0.18s ease,
      background 0.18s ease,
      filter 0.18s ease;
  }
  .sort-chip:hover:not(:disabled) {
    transform: translateY(-2px);
    border-color: rgba(96, 165, 250, 0.95);
    box-shadow: 0 14px 24px rgba(37, 99, 235, 0.14);
  }
  .sort-chip.active {
    border-color: rgba(37, 99, 235, 0.92);
    background: linear-gradient(180deg, #eff6ff, #dbeafe);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14), 0 14px 26px rgba(37, 99, 235, 0.18);
  }
  .sort-chip:disabled {
    cursor: not-allowed;
    transform: none;
    opacity: 0.55;
    filter: grayscale(1);
    box-shadow: none;
  }
  .sort-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1;
  }
  .sort-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
  }
  .sort-icon.douban img {
    border-radius: 6px;
  }
  .legal-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    margin-top: 4px;
  }
  .legal-disclaimer {
    color: var(--muted);
    font-size: 0.7rem;
    line-height: 1.5;
    opacity: 0.55;
    margin: 0;
  }
  .legal-disclaimer-label {
    font-weight: 700;
    color: var(--text);
    opacity: 0.75;
    margin-right: 3px;
  }
  .legal-disclaimer a {
    color: var(--muted);
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 2px;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    vertical-align: middle;
  }
  .legal-brand-icon {
    width: 11px;
    height: 11px;
    object-fit: contain;
    vertical-align: middle;
    border-radius: 2px;
    flex-shrink: 0;
  }
  .legal-disclaimer a:hover {
    opacity: 0.8;
  }
  .legal-advanced-link {
    align-self: flex-end;
    color: var(--muted);
    font-size: 0.62rem;
    text-decoration: none;
    opacity: 0.38;
    transition: opacity 0.15s ease;
  }
  .legal-advanced-link:hover {
    opacity: 0.8;
    text-decoration: underline;
  }
  .advanced-page-copy {
    position: relative;
    z-index: 1;
    color: var(--muted);
    font-size: 0.96rem;
    line-height: 1.6;
  }
  .advanced-page-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }
  .advanced-context-card {
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 14px;
    background: #f8fbff;
    padding: 14px 16px;
  }
  .advanced-context-title {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 10px;
  }
  .advanced-context-grid {
    display: grid;
    grid-template-columns: minmax(110px, 150px) 1fr;
    gap: 8px 12px;
  }
  .advanced-context-label {
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 600;
  }
  .advanced-context-value {
    color: var(--text);
    font-size: 0.95rem;
    min-width: 0;
  }
  .advanced-context-value a {
    color: var(--primary);
    font-weight: 600;
    word-break: break-word;
    text-decoration: none;
  }
  .advanced-context-value a:hover {
    text-decoration: underline;
  }
  .advanced-context-empty,
  .advanced-context-note {
    color: var(--muted);
    font-size: 0.9rem;
  }
  .advanced-copy {
    font-size: 0.92rem;
    color: var(--muted);
  }
  .advanced-actions {
    display: flex;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
  }
  .advanced-feedback {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #f5f7fb;
    color: var(--text);
    font-size: 0.92rem;
    border: 1px solid var(--border);
  }
  .advanced-feedback.error {
    background: #fff1f2;
    border-color: #fecdd3;
    color: #9f1239;
  }
  .prefetch-preview {
    margin-top: 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #f8fafc;
    color: var(--text);
    padding: 14px;
    white-space: pre-wrap;
    overflow-x: auto;
    font-size: 0.9rem;
    line-height: 1.5;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  }

  /* ---- Section headings ---- */
  .section-heading {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 24px 0 14px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border);
    color: var(--text);
  }
  .section-heading:first-child { margin-top: 0; }

  /* ---- Movie card list ---- */
  .movie-cards { display: flex; flex-direction: column; gap: 16px; }

  .movie-card {
    display: grid;
    grid-template-columns: 130px 1fr;
    background: #fff;
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: 0 2px 10px rgba(0,0,0,0.07);
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.15s ease;
  }
  .movie-card:hover {
    box-shadow: 0 6px 24px rgba(0,0,0,0.13);
    transform: translateY(-2px);
  }

  /* Poster column */
  .movie-poster-wrap {
    grid-column: 1;
    grid-row: 1 / 3;
    width: 130px;
    aspect-ratio: 2/3;
    align-self: start;
    background: #e8edf2;
    position: relative;
    flex-shrink: 0;
    cursor: pointer;
  }
  .movie-poster-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }
  .poster-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: #9ca3af;
  }
  /* Hover overlay: "Find Trailer" cue */
  .play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: rgba(0,0,0,0);
    transition: background 0.2s;
  }
  .movie-poster-wrap:hover .play-overlay { background: rgba(0,0,0,0.45); }
  .play-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.7);
    transition: opacity 0.2s, transform 0.2s;
  }
  .movie-poster-wrap:hover .play-btn { opacity: 1; transform: scale(1); }
  .play-btn::after {
    content: "";
    border-left: 14px solid #1f2937;
    border-top: 9px solid transparent;
    border-bottom: 9px solid transparent;
    margin-left: 4px;
  }
  .play-label {
    font-size: 0.65rem;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    opacity: 0;
    transition: opacity 0.2s;
  }
  .movie-poster-wrap:hover .play-label { opacity: 1; }

  /* Content column (title + meta + ratings) */
  .movie-content {
    grid-column: 2;
    grid-row: 1;
    position: relative;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 9px;
    min-width: 0;
  }
  /* Full-width body below poster+header (plot, showtimes, nearby) */
  .movie-card-body {
    grid-column: 2;
    grid-row: 2;
    padding: 0 16px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
  }
  .movie-title-en {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.3;
    padding-right: 28px;
  }
  .movie-title-zh { font-size: 0.82rem; color: var(--muted); }

  /* Card three-dot menu */
  .card-menu-btn {
    position: absolute;
    top: 10px;
    right: 6px;
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
    z-index: 2;
  }
  .card-menu-btn:hover {
    background: rgba(0, 0, 0, 0.06);
    color: var(--text);
    transform: none;
  }
  .card-menu-dropdown {
    position: absolute;
    top: 36px;
    right: 6px;
    min-width: 160px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    z-index: 10;
    overflow: hidden;
  }
  .card-menu-item {
    display: block;
    width: 100%;
    padding: 10px 14px;
    border: none;
    border-radius: 0;
    background: transparent;
    text-align: left;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    white-space: nowrap;
  }
  .card-menu-item:hover {
    background: #f1f5f9;
    transform: none;
  }
  .card-menu-icon {
    display: inline-block;
    font-size: 0.95rem;
    margin-right: 4px;
  }

  .movie-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
  }
  .movie-showtimes-shell {
    display: block;
    margin-top: 2px;
  }
  .movie-showtimes-shell.empty {
    margin-top: 2px;
  }
  .movie-showtimes {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 2px 0 2px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .movie-showtimes::-webkit-scrollbar {
    display: none;
  }
  .movie-showtimes.empty {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 999px;
    background: rgba(248, 250, 252, 0.92);
    color: #64748b;
    font-size: 0.77rem;
    font-weight: 600;
  }
  .showtime-chip {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 7px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(37, 99, 235, 0.18);
    background:
      linear-gradient(135deg, rgba(239, 246, 255, 0.95), rgba(248, 250, 252, 0.96));
    color: #1e3a8a;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.9);
  }
  .showtime-chip-link {
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  }
  .showtime-chip-link:hover {
    background: linear-gradient(135deg, rgba(219, 234, 254, 0.98), rgba(239, 246, 255, 0.98));
    border-color: rgba(37, 99, 235, 0.3);
  }
  .showtime-chip-time {
    color: #0f172a;
    font-variant-numeric: tabular-nums;
  }
  .showtime-chip-format {
    padding: 2px 7px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.12);
    color: var(--primary);
    font-size: 0.67rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }
  .movie-date { font-size: 0.77rem; color: var(--muted); }
  .movie-runtime { font-size: 0.77rem; color: var(--muted); }
  .movie-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    background: #eff6ff;
    color: #1d4ed8;
  }
  .movie-tag.note { background: #fefce8; color: #854d0e; }

  /* ---- Fandango-style rating scorecard ---- */
  .rating-scorecard {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: stretch;
  }
  .rating-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 8px 12px;
    width: 72px;
    gap: 2px;
  }
  .badge-icon {
    display: block;
    width: 28px;
    height: 28px;
    object-fit: contain;
    font-size: 1.4rem;
    line-height: 28px;
    text-align: center;
  }
  .badge-score {
    font-size: 1.1rem;
    font-weight: 800;
    line-height: 1.1;
    color: #111827;
  }
  .badge-label {
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6b7280;
    text-align: center;
    white-space: nowrap;
  }
  /* Color-coded top border per source */
  .rating-badge.imdb    { border-top: 3px solid #f5c518; }
  .rating-badge.rt-crit { border-top: 3px solid #fa320a; }
  .rating-badge.rt-aud  { border-top: 3px solid #f97316; }
  .rating-badge.douban  { border-top: 3px solid #11a422; }
  div.rating-badge.unfetched,
  div.rating-badge.no-rating {
    background: #e5e7eb;
    border-color: #cbd5e1;
    border-top-color: #94a3b8;
  }
  .rating-badge.refresh-pending .badge-score {
    animation: douban-pending-pulse 1.5s ease-in-out infinite;
    color: #9ca3af;
    letter-spacing: 0.1em;
  }
  @keyframes douban-pending-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
  }
  div.rating-badge.unfetched .badge-icon,
  div.rating-badge.no-rating .badge-icon {
    filter: grayscale(1) brightness(0.7) contrast(0.85);
    opacity: 0.22;
    color: #94a3b8;
  }
  div.rating-badge.unfetched .badge-score,
  div.rating-badge.no-rating .badge-score,
  div.rating-badge.unfetched .badge-label,
  div.rating-badge.no-rating .badge-label {
    color: #64748b !important;
  }
  a.rating-badge.no-rating .badge-score,
  a.rating-badge.unfetched .badge-score {
    color: #9ca3af;
  }

  /* Plot */
  .movie-plot {
    position: relative;
    font-size: 0.82rem;
    color: #374151;
    line-height: 1.6;
  }
  .movie-plot.collapsed {
    max-height: calc(4 * 1.6em);
    overflow: hidden;
  }
  .movie-plot.collapsed .plot-text {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .plot-expand-btn {
    display: none;
    position: absolute;
    bottom: 0;
    right: 0;
    height: 1.6em;
    margin: 0;
    padding: 0 0 0 3em;
    background: linear-gradient(to right, transparent, #fff 35%);
    border: none;
    font-size: inherit;
    line-height: 1.6em;
    -webkit-appearance: none;
    appearance: none;
    color: #2563eb;
    cursor: pointer;
  }
  .movie-plot.collapsed .plot-expand-btn {
    display: block;
  }
  .plot-expand-btn:hover {
    color: #1d4ed8;
    text-decoration: underline;
  }
  /* Detail and search pages: always show full plot, no expand button */
  .movie-card[data-section="detail"] .movie-plot.collapsed,
  .movie-card[data-section="search"] .movie-plot.collapsed { max-height: none; overflow: visible; }
  .movie-card[data-section="detail"] .movie-plot.collapsed .plot-text,
  .movie-card[data-section="search"] .movie-plot.collapsed .plot-text { display: block; -webkit-line-clamp: unset; overflow: visible; }
  .movie-card[data-section="detail"] .plot-expand-btn,
  .movie-card[data-section="search"] .plot-expand-btn { display: none; }

  /* Clickable rating badges */
  a.rating-badge {
    text-decoration: none;
    color: inherit;
    transition: filter 0.15s;
  }
  a.rating-badge:hover { filter: brightness(0.9); }

  /* ---- Responsive ---- */
  @media (min-width: 640px) {
    .movie-card { grid-template-columns: 215px 1fr; }
    .movie-poster-wrap { width: 215px; }
    .movie-title-en { font-size: 1.1rem; }
  }

  @media (max-width: 720px) {
    .hero-meta {
      gap: 10px;
    }
    .result-toolbar {
      gap: 10px;
    }
    .result-controls-row {
      width: 100%;
      gap: 8px;
    }
    .mode-chip {
      padding: 5px 11px 5px 13px;
      font-size: 1rem;
    }
    .section-date-input {
      min-width: 0;
      width: 100%;
    }
    .toolbar-search-link {
      min-height: 40px;
      padding: 0 12px;
    }
  }

  @media (max-width: 560px) {
    .hero-label {
      font-size: 0.94rem;
      letter-spacing: 0.045em;
    }
    .locale-switcher {
      padding: 2px;
    }
    .locale-switcher-btn {
      padding: 4px 8px;
      font-size: 0.68rem;
    }
    .result-toolbar {
      gap: 8px;
    }
    .result-heading {
      flex: 1 1 auto;
      min-width: 0;
    }
    .result-controls-row {
      gap: 6px;
    }
    .mode-chip {
      padding: 4px 10px 4px 12px;
      font-size: 0.92rem;
    }
    .section-date-prefix {
      display: none;
    }
    .section-date-shell {
      gap: 0;
    }
    .section-date-input {
      min-width: 0;
      padding: 5px 8px;
      font-size: 0.88rem;
    }
    .toolbar-search-link {
      width: 38px;
      min-width: 38px;
      min-height: 38px;
      padding: 0;
    }
    .toolbar-search-link-label {
      display: none;
    }
  }

  /* Portrait mobile: side-by-side layout, compact badges */
  @media (max-width: 480px) {
    body { padding: 12px; }
    h1 { margin-bottom: 14px; }
    .form-grid { grid-template-columns: 1fr; }
    .form-group.full { grid-column: 1; }
    .card { padding: 14px; }
    .page-controls {
      gap: 10px;
    }
    .hero-chain-icon-link { width: 26px; height: 26px; }
    .hero-theater-address { font-size: 0.7rem; }
    .theater-name-button { font-size: 0.92rem; }
    .advanced-context-grid { grid-template-columns: 1fr; }
    .advanced-actions button,
    .advanced-actions .button-link { width: 100%; }
    .advanced-actions { justify-content: stretch; }
    .search-form-grid { grid-template-columns: 1fr; }
    .search-result-overlay { padding: 16px; }
    .search-candidate-item {
      flex-direction: column;
      align-items: stretch;
    }
    .search-candidate-item-actions {
      align-self: stretch;
    }
    .search-candidate-item-actions .btn-primary {
      width: 100%;
    }

    .movie-card { grid-template-columns: 120px 1fr; }
    .movie-poster-wrap { grid-row: 1; width: 120px; align-self: start; }
    .movie-poster-wrap img { height: 100%; object-fit: cover; object-position: top center; }
    .movie-content { padding: 10px 12px; gap: 7px; }
    .card-menu-btn { width: 24px; height: 24px; top: 9px; right: 4px; }
    .card-menu-dropdown { min-width: 140px; right: 4px; }
    .rating-scorecard { gap: 5px; flex-wrap: nowrap; }
    .rating-badge { flex: 1; min-width: 0; width: auto; padding: 5px 4px; border-radius: 8px; }
    .movie-title-en { font-size: 0.9rem; }
    .badge-score { font-size: 0.8rem; }
    .badge-label { font-size: 0.46rem; letter-spacing: 0.02em; }
    .badge-label br, .badge-votes { display: none; }
    .badge-icon { width: 20px; height: 20px; font-size: 1rem; line-height: 20px; }
    .movie-genre-group { flex-basis: 100%; }
    .movie-card-body { grid-column: 1 / -1; grid-row: 2; padding: 9px 12px 12px; border-top: 1px solid #f1f5f9; }
    /* Detail and search pages: original full-width poster stacked on top */
    .movie-card[data-section="detail"],
    .movie-card[data-section="search"] { grid-template-columns: 1fr; }
    .movie-card[data-section="detail"] .movie-poster-wrap,
    .movie-card[data-section="search"] .movie-poster-wrap { width: 100%; align-self: auto; }
    .movie-card[data-section="detail"] .movie-content,
    .movie-card[data-section="search"] .movie-content { grid-column: 1; grid-row: 2; }
    .movie-card[data-section="detail"] .movie-card-body,
    .movie-card[data-section="search"] .movie-card-body { grid-column: 1; grid-row: 3; border-top: none; padding: 0 12px 12px; }
    .movie-card[data-section="detail"] .movie-genre-group,
    .movie-card[data-section="search"] .movie-genre-group { flex-basis: auto; }
    .movie-card[data-section="detail"] .movie-title-en,
    .movie-card[data-section="search"] .movie-title-en { font-size: 1.05rem; }
    .movie-card[data-section="detail"] .rating-badge,
    .movie-card[data-section="search"] .rating-badge { flex: none; width: 72px; padding: 8px 12px; border-radius: 10px; }
    .movie-card[data-section="detail"] .badge-score,
    .movie-card[data-section="search"] .badge-score { font-size: 1.1rem; }
    .movie-card[data-section="detail"] .badge-label,
    .movie-card[data-section="search"] .badge-label { font-size: 0.6rem; letter-spacing: 0.06em; }
    .movie-card[data-section="detail"] .badge-icon,
    .movie-card[data-section="search"] .badge-icon { width: 28px; height: 28px; font-size: 1.4rem; line-height: 28px; }
    .sort-toolbar {
      align-items: center;
      justify-content: space-between;
      flex-wrap: nowrap;
      padding: 12px 14px;
    }
    .sort-label {
      flex: 1 1 auto;
      min-width: 0;
      min-height: 46px;
      align-self: center;
      font-size: 0.82rem;
      gap: 5px;
    }
    .sort-actions {
      gap: 6px;
      flex-wrap: nowrap;
      flex: 0 0 auto;
    }
    .sort-chip {
      width: 40px;
      height: 40px;
    }
    .sort-icon {
      width: 22px;
      height: 22px;
    }
  }

  /* Landscape mobile */
  @media (orientation: landscape) and (max-height: 600px) {
    body { padding: 8px 14px; }
    h1 { margin-bottom: 12px; }
    .card { padding: 10px 14px; }
    .form-grid { grid-template-columns: 1fr 1fr; }
    .search-form-grid { grid-template-columns: 1fr 160px; }
  }

  /* ============================================================
     Movie Detail Page
  ============================================================ */

  .movie-detail-shell { display: flex; flex-direction: column; gap: 14px; padding: 0 20px; }
  @media (max-width: 480px) {
    .movie-detail-shell { padding: 0 6px; }
    .theater-section-icon-link { width: 26px; height: 26px; }
  }
  .movie-detail-hero-card { padding: 14px 20px; }

  /* Info card section: remove card border/shadow — the movie card provides it */
  .movie-detail-info-section .movie-card { margin-bottom: 0; }

  /* Date tabs */
  .movie-detail-date-section { overflow: hidden; }
  .date-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 2px 8px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .date-tabs::-webkit-scrollbar { display: none; }
  .date-tab {
    flex: 0 0 auto;
    padding: 7px 14px;
    border: 1.5px solid var(--border);
    border-radius: 20px;
    background: var(--card);
    color: var(--text);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    scroll-snap-align: start;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
  }
  .date-tab:hover { border-color: var(--primary); color: var(--primary); }
  .date-tab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    font-weight: 600;
  }
  .date-tab-more {
    background: transparent;
    border-style: dashed;
    color: var(--muted);
  }
  .date-tab-more:hover { color: var(--primary); border-color: var(--primary); background: transparent; }

  /* Theater sections */
  .movie-detail-theaters-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  #theater-showtimes-inner {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .theater-section {
    padding: 14px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .theater-section-header {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    min-width: 0;
  }
  .theater-section-icon-link {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    overflow: hidden;
    transition: opacity 0.15s;
  }
  .theater-section-icon-link:hover {
    opacity: 0.75;
  }
  .theater-section-icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }
  .theater-section-name-wrap {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
  .theater-section-name {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text);
    line-height: 1.35;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .theater-section-name-link {
    display: block;
    text-decoration: none;
    transition: color 0.15s;
  }
  .theater-section-name-link:hover {
    color: var(--primary);
  }
  .theater-address {
    font-size: 0.75rem;
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .theater-distance {
    font-size: 0.8rem;
    color: var(--muted);
    white-space: nowrap;
    flex: 0 0 auto;
    padding-top: 1px;
  }
  /* Detail page: wrap showtimes instead of horizontal scroll */
  .theater-section .movie-showtimes {
    flex-wrap: wrap;
    overflow-x: visible;
    overflow-y: visible;
  }

  /* Loading / empty states */
  .theaters-loading-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 4px;
    color: var(--muted);
    font-size: 0.9rem;
  }
  .theaters-loading-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    flex-shrink: 0;
  }
  .theaters-empty-msg {
    padding: 20px 4px;
    color: var(--muted);
    font-size: 0.9rem;
    text-align: center;
  }
  .detail-loading-overlay {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
  }

  /* "More theaters" button */
  .more-theaters-row {
    display: flex;
    justify-content: center;
    padding: 6px 0 2px;
  }
  .more-theaters-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 18px;
    border: 1.5px solid var(--border);
    border-radius: 20px;
    background: transparent;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
  }
  .more-theaters-btn:hover { border-color: var(--primary); color: var(--primary); }

  /* "Nearby showtimes" button on movie cards */
  .nearby-showtimes-btn {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin-top: 2px;
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 400;
    cursor: pointer;
    text-decoration: underline dotted;
    text-underline-offset: 2px;
    transition: opacity 0.15s;
  }
  .nearby-showtimes-btn:hover {
    opacity: 0.7;
  }

  @media (max-width: 640px) {
    .theater-section { padding: 12px 14px; }
    .date-tab { padding: 6px 12px; font-size: 0.8rem; }
  }
