/* ==========================================================================
   看蝦米 Kanxiami PWA — mirrors iOS v1.5 (KanxiamiTheme) layout & palette
   ========================================================================== */

:root {
  --bg: #eae6de;
  --header: #f3f0ea;
  --card: #f6f3ed;
  --white: #fbf9f5;
  --tile: #efebe4;
  --tile-border: #e2ddd3;
  --border: #dfdbd2;
  --divider: #e5e1d9;

  --rust: #b03b1d;
  --rust-hover: #962f15;
  --rust-tint: #f6e6de;
  --rust-tint-2: #f2e3db;
  --rust-line: #dc8f76;
  --coral: #ec5834;
  --amber: #c35822;
  --green: #2d704e;
  --green-tint: #e7efe9;

  --ink: #1e1d1a;
  --ink-dark: #2b2724;
  --body: #46433e;
  --muted: #6f6b63;
  --subtle: #9a948a;
  --faded: #bcb5aa;

  --serif: "Noto Serif TC", "Songti TC", "Hiragino Mincho ProN", "PMingLiU", serif;
  --sans: "Noto Sans TC", -apple-system, BlinkMacSystemFont, "PingFang TC", "Microsoft JhengHei", sans-serif;

  --shadow-card: 0 4px 14px rgba(30, 29, 26, 0.04);
  --shadow-float: 0 12px 30px rgba(30, 29, 26, 0.14);
  --header-h: 68px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

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

html {
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  padding-bottom: calc(108px + var(--safe-b));
}

body.modal-open { overflow: hidden; }

button, input { font-family: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; padding: 0; -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.hscroll {
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.hscroll::-webkit-scrollbar { display: none; }

/* ---------- Header ---------- */
.app-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(243, 240, 234, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  border-radius: 0 0 26px 26px;
  box-shadow: 0 4px 14px rgba(30, 29, 26, 0.05);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  height: var(--header-h);
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand { flex-shrink: 0; }
.brand-banner { height: 34px; width: auto; }

.home-greeting {
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.home-greeting em { font-style: normal; color: var(--rust); }

.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.location-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--white);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
  color: var(--body);
  min-width: 0;
  max-width: 200px;
  transition: border-color 0.15s, transform 0.12s;
}
.location-pill:hover { border-color: var(--rust-line); }
.location-pill:active { transform: scale(0.96); }
.location-pill-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.loc-arrow { color: var(--rust); flex-shrink: 0; }
.loc-chev { color: var(--muted); flex-shrink: 0; }

.avatar-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid var(--rust);
  background: #241c18;
  box-shadow: 0 2px 6px rgba(176, 59, 29, 0.2);
  transition: transform 0.12s;
}
.avatar-btn:active { transform: scale(0.94); }
.avatar-btn img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Main ---------- */
.app-main {
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 14px 16px 24px;
}

.sticky-filters {
  position: sticky;
  top: var(--header-h);
  z-index: 30;
  background: var(--bg);
  margin: 0 -16px;
  padding: 10px 16px 2px;
}

/* Search row */
.search-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.search-field {
  position: relative;
  flex: 1;
  min-width: 0;
}

.search-field > svg {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

.search-field input {
  width: 100%;
  height: 46px;
  border-radius: 23px;
  border: 1px solid var(--border);
  background: var(--white);
  padding: 0 40px 0 44px;
  font-size: 15px;
  color: var(--ink);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.15s;
}
.search-field input::placeholder { color: var(--subtle); }
.search-field input:focus { border-color: var(--rust-line); }
.search-field input::-webkit-search-cancel-button { display: none; }

.search-clear {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--tile-border);
  color: var(--body);
  display: grid;
  place-items: center;
}

.square-btn {
  width: 46px;
  height: 46px;
  border-radius: 15px;
  background: var(--white);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  color: var(--ink);
  flex-shrink: 0;
  transition: transform 0.12s, border-color 0.15s, color 0.15s;
}
.square-btn:active { transform: scale(0.94); }
.square-btn.on { color: var(--coral); border-color: var(--rust-line); background: var(--rust-tint); }

/* Underline mode tabs (熱映中 / 即將上映) */
.mode-tabs {
  display: flex;
  align-items: flex-end;
  gap: 24px;
  margin: 2px 2px 12px;
}

.mode-tab {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding-bottom: 7px;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 700;
  color: var(--faded);
  line-height: 1.2;
  transition: color 0.15s;
}
.mode-tab small { font-family: var(--sans); font-size: 14px; font-weight: 600; color: var(--faded); }
.mode-tab.active { color: var(--ink); }
.mode-tab.active small { color: var(--muted); }
.mode-tab.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  border-radius: 3px;
  background: var(--rust);
}

/* Date strip */
.date-strip {
  gap: 4px;
  margin: 0 -16px 12px;
  padding: 2px 16px;
}

.date-item {
  flex: 0 0 auto;
  width: 50px;
  height: 60px;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  transition: background 0.15s;
}
.date-item:hover { background: rgba(255, 255, 255, 0.5); }
.date-item .d-top { font-size: 11.5px; font-weight: 600; color: var(--muted); line-height: 1; }
.date-item .d-num { font-size: 22px; font-weight: 700; color: var(--ink); line-height: 1; font-variant-numeric: tabular-nums; }
.date-item.weekend .d-top { color: var(--rust); }
.date-item.active { background: var(--rust); box-shadow: 0 4px 12px rgba(176, 59, 29, 0.28); }
.date-item.active .d-top, .date-item.active .d-num { color: #fff; }

/* Genre chips */
.chip-strip {
  gap: 8px;
  margin: 0 -16px 12px;
  padding: 2px 16px;
}

.g-chip {
  flex: 0 0 auto;
  height: 36px;
  padding: 0 13px;
  border-radius: 999px;
  background: var(--white);
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.g-chip .cnt { color: var(--muted); font-weight: 600; }
.g-chip.active { background: var(--rust-tint); border-color: var(--rust-line); color: var(--rust); }
.g-chip.active .cnt { color: var(--rust); }

/* ---------- Home: Poster Wall ---------- */
.wall {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.wall-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.w-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.w-poster {
  position: relative;
  aspect-ratio: 2 / 3;
  background: linear-gradient(160deg, #ddd3c5, #c9bba8);
  cursor: pointer;
  overflow: hidden;
}
.w-poster img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.w-card:hover .w-poster img { transform: scale(1.03); }

.w-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  max-width: calc(100% - 16px);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(251, 249, 245, 0.95);
  color: var(--rust);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}
.w-badge svg { flex-shrink: 0; }

.w-play {
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(30, 29, 26, 0.72);
  color: #fff;
  display: grid;
  place-items: center;
  backdrop-filter: blur(4px);
}

.w-body { padding: 10px 12px 10px; }

.w-title {
  margin: 0;
  font-family: var(--serif);
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--ink);
  cursor: pointer;
}

.w-next {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
}

.w-next-text {
  min-width: 0;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--rust);
  line-height: 1.3;
}
.w-next-text span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.mini-cta {
  flex-shrink: 0;
  height: 28px;
  padding: 0 11px;
  border-radius: 999px;
  background: var(--rust);
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
  box-shadow: 0 3px 8px rgba(176, 59, 29, 0.25);
  transition: transform 0.12s;
}
.mini-cta:active { transform: scale(0.94); }

.w-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 9px;
  font-size: 12.5px;
  color: var(--muted);
}

.w-foot-icons { display: flex; gap: 12px; color: var(--body); }
.icon-plain { width: 24px; height: 24px; display: grid; place-items: center; color: var(--body); }
.icon-plain.liked { color: var(--coral); }

.section-note {
  margin: 18px 0 0;
  text-align: center;
  font-size: 12px;
  color: var(--subtle);
}

/* ---------- Movie Card ---------- */
.movie-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }

.m-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 14px 14px 13px;
  box-shadow: var(--shadow-card);
  min-width: 0;
}
.m-card.presale { border: 1.5px solid var(--rust-line); }

.flag {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  padding: 6px 12px;
  border-radius: 12px;
  background: var(--rust-tint-2);
  color: var(--rust);
  font-size: 12px;
  font-weight: 700;
}

.m-head { display: flex; gap: 14px; }

.m-poster {
  position: relative;
  width: 112px;
  aspect-ratio: 2 / 3;
  border-radius: 14px;
  overflow: hidden;
  flex-shrink: 0;
  background: linear-gradient(160deg, #ddd3c5, #c9bba8);
  cursor: pointer;
}
.m-poster img { width: 100%; height: 100%; object-fit: cover; }

.play-ov {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(30, 29, 26, 0.5);
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  color: #fff;
  display: grid;
  place-items: center;
  backdrop-filter: blur(3px);
}

.poster-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  text-align: center;
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 700;
  color: #4a3f35;
}
.m-poster img, .w-poster img { position: relative; z-index: 1; }
.play-ov, .w-play, .w-badge { z-index: 2; }

.m-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.m-title-row { display: flex; align-items: flex-start; gap: 8px; }

.m-title {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink);
  cursor: pointer;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.m-en {
  margin-top: 3px;
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.circle-btns { display: flex; gap: 6px; flex-shrink: 0; }

.c-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--white);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  color: var(--ink);
  transition: transform 0.12s, color 0.15s;
}
.c-btn:active { transform: scale(0.9); }
.c-btn.liked { color: var(--coral); }

.m-cast {
  margin-top: 8px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.m-genre { margin-top: 2px; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.m-runtime { margin-top: auto; padding-top: 10px; font-size: 13.5px; font-weight: 700; color: var(--rust); }
.m-runtime span { color: var(--muted); font-weight: 500; }

/* Cinema chips inside movie card */
.cin-chips {
  gap: 6px;
  margin: 14px -14px 10px;
  padding: 0 14px;
}

.cin-chip {
  flex: 0 0 auto;
  height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  background: var(--white);
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}
.cin-chip .cnt { color: var(--muted); }
.cin-chip.active { background: var(--ink-dark); border-color: var(--ink-dark); color: #fff; }
.cin-chip.active .cnt { color: rgba(255, 255, 255, 0.7); }

.dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; display: inline-block; }

/* Showtime tiles */
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tiles.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.tile {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 9px 11px 8px;
  border-radius: 14px;
  background: var(--tile);
  border: 1px solid var(--tile-border);
  text-align: left;
  transition: transform 0.12s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.15s, background 0.15s;
}
.tile:hover { border-color: var(--rust-line); }
.tile:active { transform: scale(0.95); }

.t-time {
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.15;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.t-time small { font-size: 10.5px; font-weight: 700; color: var(--amber); }

.t-cin {
  max-width: 100%;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--body);
  white-space: nowrap;
  overflow: hidden;
}
.t-cin span { overflow: hidden; text-overflow: ellipsis; }
.t-dist { font-size: 11.5px; color: var(--muted); }

.tile.next { border: 1.5px solid var(--rust); background: #f8ece6; }
.tile.next .t-time { color: var(--rust); }

.tiles.simple .tile {
  align-items: center;
  justify-content: center;
  height: 52px;
  padding: 0;
}

.more-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  margin-top: 10px;
  padding: 9px 12px;
  border-radius: 12px;
  background: #f0e9e2;
  color: var(--rust);
  font-size: 13px;
  font-weight: 700;
}
.more-link:hover { background: var(--rust-tint); }

.presale-line {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 14px 0 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}
.presale-line svg { color: var(--rust); flex-shrink: 0; }

.countdown-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 12px;
  padding: 6px 12px;
  border-radius: 12px;
  background: var(--tile);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--body);
}
.countdown-chip b { color: var(--rust); }

/* ---------- Cinemas Tab ---------- */
.filter-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  min-width: 0;
}

.filter-label {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 700;
  color: var(--body);
}
.filter-label svg { color: var(--rust); }

.filter-row .hscroll { flex: 1; min-width: 0; gap: 7px; padding: 2px 0; margin-right: -16px; padding-right: 16px; }

.pill {
  flex: 0 0 auto;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--white);
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}
.pill.solid { background: var(--rust); border-color: var(--rust); color: #fff; font-weight: 700; }
.pill.outline { background: var(--rust-tint); border-color: var(--rust-line); color: var(--rust); font-weight: 700; }

.cinema-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }

.c-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 16px 16px 12px;
  box-shadow: var(--shadow-card);
  min-width: 0;
}
.c-card.featured { border: 2px solid var(--rust-line); }

.c-top { display: flex; align-items: flex-start; gap: 8px; }

.c-name {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
}

.fav-pill {
  flex-shrink: 0;
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--white);
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}
.fav-pill.on { color: var(--coral); background: #fbeee8; border-color: #e9b3a2; }

.c-addr {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  font-size: 13px;
  color: var(--muted);
  min-width: 0;
}
.c-addr b { color: var(--ink); font-weight: 700; flex-shrink: 0; }
.c-addr .addr-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.c-addr button { color: var(--subtle); flex-shrink: 0; display: grid; place-items: center; width: 22px; height: 22px; }

.c-movie { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--divider); }

.c-movie-head { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; min-width: 0; }

.c-movie-title {
  min-width: 0;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tag {
  flex-shrink: 0;
  padding: 1px 7px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--white);
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

.c-movie-date { margin-left: auto; flex-shrink: 0; font-size: 12px; color: var(--muted); }

.c-foot {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}
.c-foot button { display: inline-flex; align-items: center; gap: 2px; font-size: 13.5px; font-weight: 700; color: var(--ink); padding: 4px 2px; }
.c-foot button:hover { color: var(--rust); }

.c-empty { margin-top: 12px; padding: 12px; border-radius: 14px; background: var(--tile); font-size: 13px; color: var(--muted); }

/* ---------- Empty State ---------- */
.empty {
  text-align: center;
  padding: 40px 20px;
  background: var(--card);
  border: 1px dashed var(--border);
  border-radius: 24px;
  color: var(--muted);
}
.empty-emoji { font-size: 38px; margin-bottom: 6px; }
.empty-title { margin: 0 0 6px; font-family: var(--serif); font-size: 18px; font-weight: 700; color: var(--ink); }
.empty-desc { margin: 0 0 14px; font-size: 13px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 46px;
  padding: 0 18px;
  border-radius: 15px;
  background: var(--rust);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(176, 59, 29, 0.24);
  transition: background 0.15s, transform 0.12s;
}
.btn:hover { background: var(--rust-hover); }
.btn:active { transform: scale(0.97); }
.btn.block { width: 100%; height: 52px; border-radius: 16px; font-size: 16px; }
.btn.ghost { background: var(--white); color: var(--ink); border: 1px solid var(--border); box-shadow: none; }
.btn.ghost:hover { border-color: var(--rust-line); color: var(--rust); background: var(--white); }

/* ---------- Floating Tab Bar ---------- */
.tabbar-wrap {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 45;
  padding: 10px 16px calc(12px + var(--safe-b));
  background: linear-gradient(to bottom, rgba(234, 230, 222, 0), rgba(234, 230, 222, 0.9) 45%, var(--bg));
  pointer-events: none;
}

.tabbar {
  max-width: 430px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(251, 249, 245, 0.97);
  border: 1px solid #ddd6c9;
  box-shadow: var(--shadow-float);
  pointer-events: auto;
}

.tab-btn {
  flex: 1;
  height: 52px;
  border-radius: 999px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  transition: flex 0.25s cubic-bezier(0.22, 1, 0.36, 1), background 0.2s, color 0.2s;
}
.tab-btn.active {
  flex: 1.55;
  flex-direction: row;
  gap: 8px;
  background: var(--rust);
  color: #fff;
  font-size: 16px;
  box-shadow: 0 5px 14px rgba(176, 59, 29, 0.3);
}

.tab-icon { position: relative; width: 24px; height: 24px; display: grid; place-items: center; }
.cal-num {
  position: absolute;
  left: 0;
  right: 0;
  top: 9px;
  text-align: center;
  font-size: 8.5px;
  font-weight: 800;
  line-height: 1;
}

/* ---------- Snackbar ---------- */
.snack {
  position: fixed;
  left: 50%;
  bottom: calc(92px + var(--safe-b));
  transform: translateX(-50%);
  z-index: 44;
  width: min(520px, calc(100% - 24px));
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px 10px 12px;
  border-radius: 18px;
  background: var(--ink-dark);
  color: #fff;
  box-shadow: var(--shadow-float);
  animation: snackIn 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes snackIn { from { opacity: 0; transform: translate(-50%, 14px); } to { opacity: 1; transform: translate(-50%, 0); } }
.snack img { width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0; }
.snack-text { flex: 1; min-width: 0; font-size: 13px; font-weight: 600; line-height: 1.35; }
.snack-text small { display: block; font-size: 11.5px; font-weight: 500; color: rgba(255, 255, 255, 0.65); }
.snack .mini-cta { box-shadow: none; }
.snack-x { width: 28px; height: 28px; border-radius: 50%; color: rgba(255, 255, 255, 0.7); display: grid; place-items: center; flex-shrink: 0; }

/* ---------- Bottom Sheets ---------- */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(24, 22, 19, 0.45);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fadeIn 0.16s ease-out;
}
.sheet-backdrop[hidden] { display: none; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.sheet {
  width: 100%;
  max-width: 620px;
  max-height: 92dvh;
  background: var(--header);
  border-radius: 28px 28px 0 0;
  box-shadow: 0 -10px 36px rgba(0, 0, 0, 0.18);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideUp 0.26s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes slideUp { from { transform: translateY(40px); opacity: 0.6; } to { transform: translateY(0); opacity: 1; } }

.sheet-handle { width: 40px; height: 5px; border-radius: 3px; background: #cfc8bc; margin: 8px auto 4px; flex-shrink: 0; }

.sheet-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 16px 12px;
  flex-shrink: 0;
}
.sheet-title { flex: 1; min-width: 0; text-align: center; font-size: 16px; font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet-head.left .sheet-title { text-align: left; font-family: var(--serif); font-size: 17px; }

.ghost-btn {
  flex-shrink: 0;
  height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--white);
  border: 1px solid var(--border);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
.ghost-btn.accent { color: var(--rust); font-weight: 700; }

.sheet-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 2px 16px 22px; }
.sheet-foot { flex-shrink: 0; padding: 10px 16px calc(14px + var(--safe-b)); border-top: 1px solid var(--border); background: var(--header); }

/* Location sheet */
.gps-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px;
  margin-bottom: 12px;
  border-radius: 18px;
  background: var(--white);
  border: 1px solid var(--border);
  text-align: left;
}
.gps-card:hover { border-color: var(--rust-line); }
.gps-icon { width: 42px; height: 42px; border-radius: 50%; background: var(--rust-tint-2); color: var(--rust); display: grid; place-items: center; flex-shrink: 0; }
.gps-title { font-size: 15px; font-weight: 700; color: var(--ink); line-height: 1.35; }
.gps-sub { font-size: 12px; color: var(--muted); margin-top: 2px; line-height: 1.4; }

.step-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 16px 0 8px;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
}
.step-sub { margin: -4px 0 10px; font-size: 12px; color: var(--muted); }
.clear-chip { font-family: var(--sans); font-size: 12px; font-weight: 700; color: var(--rust); background: var(--rust-tint-2); padding: 4px 10px; border-radius: 999px; }

.city-chips { gap: 7px; margin: 0 -16px; padding: 2px 16px; }

.dist-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  margin-bottom: 8px;
  border-radius: 16px;
  background: var(--white);
  border: 1px solid var(--border);
  text-align: left;
  transition: border-color 0.15s, background 0.15s;
}
.dist-row.on { border-color: var(--rust-line); background: #f8ece6; }
.checkbox { width: 21px; height: 21px; border-radius: 6px; border: 1.5px solid #bdb6aa; display: grid; place-items: center; flex-shrink: 0; color: transparent; }
.checkbox.radio { border-radius: 50%; }
.dist-row.on .checkbox { background: var(--rust); border-color: var(--rust); color: #fff; }
.dist-name { font-size: 15px; font-weight: 700; color: var(--ink); }
.dist-tag { margin-left: 6px; padding: 1px 7px; border-radius: 6px; background: var(--rust-tint-2); color: var(--rust); font-size: 11px; font-weight: 700; vertical-align: 2px; }
.dist-sub { margin-top: 2px; font-size: 12px; color: var(--muted); }

.selected-note { display: flex; align-items: center; gap: 6px; margin-bottom: 9px; font-size: 12.5px; color: var(--body); }
.selected-note svg { color: var(--rust); flex-shrink: 0; }

/* Movie detail sheet */
.trailer-card { background: var(--card); border: 1px solid var(--border); border-radius: 22px; padding: 10px; }
.trailer-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: #1e1d1a; }
.trailer-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.trailer-frame img { width: 100%; height: 100%; object-fit: cover; }
.detail-info { padding: 12px 4px 4px; }
.detail-title-row { display: flex; align-items: flex-start; gap: 8px; }
.detail-title { flex: 1; min-width: 0; margin: 0; font-family: var(--serif); font-size: 21px; font-weight: 700; line-height: 1.3; }
.detail-meta { margin-top: 4px; font-size: 12.5px; font-weight: 600; color: var(--body); }
.detail-meta b { color: var(--rust); }
.synopsis { margin: 8px 0 0; font-size: 13px; color: var(--muted); line-height: 1.6; white-space: pre-line; }
.synopsis.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.syn-toggle { display: flex; justify-content: flex-end; }
.syn-toggle button { font-size: 12.5px; font-weight: 700; color: var(--rust); padding: 2px 0; }

.section-head { display: flex; align-items: center; gap: 8px; margin: 18px 0 10px; }
.section-head h3 { margin: 0; display: inline-flex; align-items: center; gap: 6px; font-family: var(--serif); font-size: 18px; font-weight: 700; }
.section-head h3 svg { color: var(--rust); }
.section-head .region-tag { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--rust); background: var(--rust-tint-2); padding: 3px 9px; border-radius: 8px; }

/* Booking sheet */
.booking-hero { background: var(--white); border: 1px solid var(--border); border-radius: 20px; padding: 16px; margin-bottom: 14px; }
.booking-cinema { font-size: 12.5px; color: var(--muted); }
.booking-title { margin: 4px 0 10px; font-family: var(--serif); font-size: 21px; font-weight: 700; line-height: 1.3; }
.booking-time-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.booking-time { font-size: 34px; font-weight: 800; color: var(--rust); line-height: 1.1; font-variant-numeric: tabular-nums; }
.status-chip { padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--green-tint); color: var(--green); }
.status-chip.past { background: var(--tile); color: var(--muted); }
.booking-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.booking-addr { margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.stack { display: flex; flex-direction: column; gap: 9px; }

/* Me sheet */
.me-card { background: var(--white); border: 1px solid var(--border); border-radius: 20px; padding: 14px; margin-bottom: 12px; }
.me-card h4 { margin: 0 0 10px; font-family: var(--serif); font-size: 16px; font-weight: 700; }
.me-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.me-brand img { width: 52px; height: 52px; border-radius: 13px; }
.me-brand-title { font-family: var(--serif); font-size: 18px; font-weight: 700; }
.me-brand-sub { font-size: 12px; color: var(--muted); }
.fav-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--divider); }
.fav-row:first-of-type { border-top: none; }
.fav-row-main { flex: 1; min-width: 0; text-align: left; }
.fav-row-name { font-family: var(--serif); font-size: 15px; font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fav-row-sub { font-size: 12px; color: var(--muted); }
.kv { display: grid; gap: 6px; font-size: 13px; color: var(--body); }
.kv b { color: var(--ink); }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  top: calc(var(--header-h) + 12px);
  transform: translate(-50%, -10px);
  z-index: 120;
  max-width: calc(100vw - 32px);
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--ink-dark);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Skeleton ---------- */
.skeleton-wall { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.sk-card { height: 260px; border-radius: 20px; background: var(--card); border: 1px solid var(--border); position: relative; overflow: hidden; }
.sk-card.tall { height: 320px; }
.sk-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 25%, rgba(255, 255, 255, 0.55) 50%, transparent 75%);
  transform: translateX(-100%);
  animation: shimmer 1.25s infinite;
}
@keyframes shimmer { 100% { transform: translateX(100%); } }

/* ---------- Footer ---------- */
.app-footer {
  max-width: 1100px;
  margin: 10px auto 0;
  padding: 16px 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--subtle);
}
.footer-links { display: flex; gap: 14px; }
.footer-links a:hover { color: var(--rust); }

/* ---------- Responsive ---------- */
@media (min-width: 680px) {
  .tiles.simple { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
  .tiles.simple .tile { height: 48px; }
  .sheet-backdrop { align-items: center; padding: 24px; }
  .sheet { border-radius: 28px; max-height: 86dvh; }
  .sheet-handle { display: none; }
  .sheet-head { padding-top: 14px; }
  .skeleton-wall { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 980px) {
  .movie-list, .cinema-list { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .c-card.featured { grid-column: 1 / -1; }
  .skeleton-wall { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .home-greeting { font-size: 23px; }
}

@media (max-width: 440px) {
  .home-greeting { font-size: 18px; }
  .location-pill { max-width: 160px; padding: 0 10px; }
  .w-badge { font-size: 10.5px; padding: 3px 8px; }
}

@media (max-width: 380px) {
  .header-inner { gap: 8px; padding: 0 14px; }
  .brand-banner { height: 30px; }
  .home-greeting { font-size: 16px; }
  .header-actions { gap: 6px; }
  .location-pill { max-width: none; padding: 0 9px; gap: 4px; font-size: 12.5px; }
  .avatar-btn { width: 36px; height: 36px; }
  .m-poster { width: 96px; }
  .m-title { font-size: 19px; }
  .t-time { font-size: 18px; }
}
