:root {
  --paper: #e7e5e0;
  --paper-2: #efede8;
  --ink: #16150f;
  --ink-2: #46443c;
  --ink-3: #78766c;
  --ink-4: #a4a29a;
  --hair: rgba(20, 19, 12, 0.14);
  --hair-2: rgba(20, 19, 12, 0.07);
  --signal: #d0311e; /* 唯一訊號色:今天 / 輪到你 / 錯誤 */
  --glass: rgba(255, 255, 255, 0.46);
  --glass-2: rgba(255, 255, 255, 0.62);
  --glass-brd: rgba(255, 255, 255, 0.7);
  --glass-hi: rgba(255, 255, 255, 0.85);
  --shadow: 0 22px 60px rgba(20, 19, 12, 0.16);
  --shadow-sm: 0 8px 26px rgba(20, 19, 12, 0.1);
  --blur: saturate(160%) blur(22px);
  --serif: Georgia, "Songti TC", "STSong", "Noto Serif TC", "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang TC", "Helvetica Neue", Arial, "Noto Sans TC", sans-serif;
  --r: 18px;
  --r-sm: 12px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0c0c0e;
    --paper-2: #141416;
    --ink: #f2f0ea;
    --ink-2: #c3c1b8;
    --ink-3: #8f8d84;
    --ink-4: #63625b;
    --hair: rgba(255, 255, 255, 0.14);
    --hair-2: rgba(255, 255, 255, 0.07);
    --signal: #ff5442;
    --glass: rgba(30, 30, 34, 0.5);
    --glass-2: rgba(38, 38, 42, 0.62);
    --glass-brd: rgba(255, 255, 255, 0.14);
    --glass-hi: rgba(255, 255, 255, 0.18);
    --shadow: 0 22px 60px rgba(0, 0, 0, 0.55);
    --shadow-sm: 0 8px 26px rgba(0, 0, 0, 0.45);
  }
}

* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
}
body {
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(80vw 60vh at 78% -6%, rgba(0, 0, 0, 0.05), transparent 60%),
    radial-gradient(70vw 55vh at 5% 8%, rgba(0, 0, 0, 0.045), transparent 55%),
    linear-gradient(180deg, var(--paper-2), var(--paper) 55%);
  background-attachment: fixed;
}
@media (prefers-color-scheme: dark) {
  body {
    background:
      radial-gradient(80vw 60vh at 78% -6%, rgba(255, 255, 255, 0.06), transparent 60%),
      radial-gradient(70vw 55vh at 5% 8%, rgba(255, 255, 255, 0.05), transparent 55%),
      linear-gradient(180deg, #101012, #060607 60%);
  }
}
/* 細顆粒 */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.055;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
/* 背景大明體浮水印(編輯風底、玻璃層次)*/
body::before {
  content: "電影";
  position: fixed;
  top: -0.06em;
  right: 0;
  z-index: 0;
  pointer-events: none;
  font-family: var(--serif);
  font-size: 40vw;
  line-height: 0.8;
  letter-spacing: -0.05em;
  color: var(--ink);
  opacity: 0.04;
  white-space: nowrap;
}
.muted {
  color: var(--ink-3);
}
.grow {
  flex: 1;
}
img {
  max-width: 100%;
}

/* 玻璃工具 */
.glass {
  background: var(--glass);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 1px solid var(--glass-brd);
  box-shadow: inset 0 1px 0 var(--glass-hi), var(--shadow);
}

/* 編排用標籤 [ NEXT ] */
.tag-label {
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.tag-label::before {
  content: "[ ";
}
.tag-label::after {
  content: " ]";
}

/* ---------- 頭像(黑白字母)---------- */
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0;
  flex: none;
}
.who-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  vertical-align: middle;
}

.illo {
  width: 100%;
  height: 100%;
  display: block;
}

/* ---------- 導覽列 ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--glass-2);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border-bottom: 1px solid var(--hair);
}
.nav-inner {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 18px;
  height: 54px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand {
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 400;
  letter-spacing: 0.02em;
}
.nav-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}
.who {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.who > span {
  display: none;
}
.who select {
  background: transparent;
  color: var(--ink);
  border: none;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  padding: 4px 20px 4px 2px;
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
  max-width: 42vw;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='11' fill='none' stroke='%2378766c' stroke-width='1.5'%3E%3Cpath d='M2 4l3.5 3.5L9 4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 2px center;
}
.conn {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  white-space: nowrap;
}
.conn .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink-4);
}
.conn.online .dot {
  background: var(--signal);
}
.conn.poll .dot {
  background: var(--ink-2);
}
.conn #conn-text {
  display: none;
}

main {
  max-width: 1040px;
  margin: 0 auto;
  padding: 18px 18px 90px;
}

/* ---------- 按鈕 ---------- */
button {
  font-family: var(--sans);
  cursor: pointer;
}
.btn {
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  padding: 13px 22px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: background 0.2s ease, color 0.2s ease, transform 0.08s ease;
}
.btn:active {
  transform: scale(0.98);
}
.btn.primary {
  background: var(--ink);
  color: var(--paper);
}
.btn.line,
.btn.btn-tinted {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.btn.ghost {
  border-color: var(--hair);
  background: var(--glass);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
}
.btn.danger {
  border-color: var(--signal);
  color: var(--signal);
}
.btn.sm {
  padding: 9px 16px;
  font-size: 12px;
}
.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
@media (hover: hover) {
  .btn:hover {
    background: var(--ink);
    color: var(--paper);
  }
  .btn.primary:hover {
    background: var(--ink-2);
  }
  .btn.danger:hover {
    background: var(--signal);
    color: #fff;
  }
}

/* ---------- Hero(玻璃 + 模糊灰階海報底)---------- */
.hero {
  margin-bottom: 30px;
}
.hero-card {
  position: relative;
  border-radius: var(--r);
  overflow: hidden;
  padding: 22px;
  display: block;
  isolation: isolate;
  background: var(--glass);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 1px solid var(--glass-brd);
  box-shadow: inset 0 1px 0 var(--glass-hi), var(--shadow);
}
.hero-backdrop {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-size: cover;
  background-position: center 28%;
  filter: contrast(1.05) blur(24px);
  transform: scale(1.3);
  opacity: 0.5;
}
.hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(231, 229, 224, 0.2), rgba(231, 229, 224, 0.55));
}
@media (prefers-color-scheme: dark) {
  .hero-card::before {
    background: linear-gradient(180deg, rgba(12, 12, 14, 0.35), rgba(12, 12, 14, 0.62));
  }
}
.hero-figure {
  margin: 0;
  flex: none;
  width: 116px;
}
.hero-poster {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: var(--r-sm);
  filter: contrast(1.02);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--hair);
}
.hero-poster.empty {
  overflow: hidden;
  background: var(--paper-2);
  filter: none;
}
.hero-top {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.hero-head {
  min-width: 0;
  flex: 1;
}
.hero-eyebrow {
  margin-bottom: 8px;
}
.hero-title {
  font-family: var(--serif);
  font-size: clamp(30px, 8vw, 52px);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.01em;
  margin: 0 0 10px;
  overflow-wrap: anywhere;
}
.hero-title .tv {
  font-family: var(--sans);
  font-size: 0.28em;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-3);
  vertical-align: middle;
  margin-left: 8px;
}
.hero-turn {
  font-size: 14px;
  color: var(--ink-2);
  margin-bottom: 14px;
}
.hero-turn.mine {
  color: var(--signal);
  font-weight: 600;
}
.hero-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin-top: 18px;
  background: var(--hair);
  border: 1px solid var(--hair);
  border-radius: 12px;
  overflow: hidden;
}
.stat {
  background: var(--glass-2);
  padding: 12px 15px;
}
.stat .k {
  display: block;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-4);
  margin-bottom: 5px;
}
.stat .v {
  font-size: 17px;
  font-weight: 500;
}
.hero-overview {
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-2);
  margin: 16px 0 0;
  max-width: 640px;
}
.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 18px;
}
.hero-actions .btn {
  width: 100%;
}

/* ---------- 參加 +1 ---------- */
.attendees {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px solid var(--hair);
  border-radius: 12px;
  background: var(--glass-2);
}
.att-info {
  flex: 1;
  min-width: 0;
}
.att-label {
  display: block;
  margin-bottom: 8px;
}
.att-avatars {
  display: flex;
  align-items: center;
  min-height: 26px;
}
.att-avatars .avatar {
  width: 26px;
  height: 26px;
  font-size: 11px;
  margin-left: -6px;
  border: 1.5px solid var(--paper);
}
.att-avatars .avatar:first-child {
  margin-left: 0;
}
.att-empty {
  font-size: 13px;
  color: var(--ink-4);
}
.attendees .btn {
  flex: none;
}
.att-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}
.att-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px 6px 6px;
  border: 1px solid var(--hair);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
}
.att-chip.on {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.att-chip.on::after {
  content: "✓";
  font-size: 12px;
}
.att-chip.on .avatar {
  outline: 1.5px solid var(--paper);
}

/* ---------- 區塊標頭 ---------- */
.block {
  margin-bottom: 30px;
}
.block-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--ink);
}
.block-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 24px;
}
.block-sub {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-4);
}
.chev {
  margin-left: auto;
  width: 8px;
  height: 8px;
  border-right: 1.5px solid var(--ink-3);
  border-bottom: 1.5px solid var(--ink-3);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}
#admin[open] .chev {
  transform: rotate(-135deg);
}
#range-label {
  display: none;
}

/* ---------- 本週新上映(橫向海報條)---------- */
.nr-toggle {
  display: inline-flex;
  border: 1px solid var(--hair);
  border-radius: 999px;
  overflow: hidden;
}
.nr-tab {
  border: none;
  background: transparent;
  color: var(--ink-3);
  padding: 6px 15px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-family: var(--sans);
}
.nr-tab.active {
  background: var(--ink);
  color: var(--paper);
}
.nr-nav {
  display: none;
  gap: 6px;
}
.nr-arrow {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--hair);
  background: var(--glass-2);
  color: var(--ink);
  font-size: 18px;
  line-height: 1;
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
}
.nr-arrow:hover {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.poster-strip {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x proximity;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}
.poster-strip::-webkit-scrollbar {
  height: 0;
}
.poster-strip .movie-cell {
  flex: 0 0 40vw;
  max-width: 168px;
  scroll-snap-align: start;
}
.poster-strip .state-msg {
  flex: 1;
}
@media (min-width: 720px) {
  .poster-strip .movie-cell {
    flex: 0 0 150px;
  }
}

/* ---------- 節目單(月份大數字 + 髮線列)---------- */
.month-group {
  margin-bottom: 24px;
}
.month-label {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  margin: 0 0 8px 2px;
}
.month-label .mnum {
  font-family: var(--serif);
  font-size: 56px;
  line-height: 0.85;
  font-weight: 400;
  letter-spacing: -0.02em;
}
.month-label .mword {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-4);
  padding-bottom: 8px;
}
.rounds-grid {
  border-radius: var(--r);
  overflow: hidden;
  background: var(--glass);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 1px solid var(--glass-brd);
  box-shadow: inset 0 1px 0 var(--glass-hi), var(--shadow-sm);
}
.round {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 13px 16px;
  cursor: pointer;
  border-bottom: 1px solid var(--hair);
  transition: background 0.18s ease;
}
.round:last-child {
  border-bottom: none;
}
.round:hover {
  background: var(--glass-2);
}
.round.current {
  box-shadow: inset 3px 0 0 var(--signal);
}
.round.past {
  opacity: 0.5;
}
.round-thumb {
  width: 42px;
  height: 63px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--paper-2);
  flex: none;
  filter: contrast(1.02);
}
.round-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.round:hover .round-thumb,
.round.current .round-thumb {
  filter: contrast(1.02);
}
.round-body {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.round-no {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-4);
}
.round-no .extra {
  color: var(--signal);
  font-weight: 700;
}
.round-date {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 400;
}
.round-person {
  font-size: 13px;
  color: var(--ink-2);
}
.round-person .avatar {
  width: 18px;
  height: 18px;
  font-size: 9px;
}
.round-movie {
  font-size: 12px;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.round-right {
  flex: none;
  text-align: right;
}
.badge {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  white-space: nowrap;
}
.badge::before {
  content: "[ ";
}
.badge::after {
  content: " ]";
}
.badge.picked {
  color: var(--ink);
}
.badge.skipped {
  color: var(--ink-4);
  text-decoration: line-through;
}

/* ---------- 管理 ---------- */
details summary {
  cursor: pointer;
  list-style: none;
}
details summary::-webkit-details-marker {
  display: none;
}
.admin-panel {
  margin-top: 14px;
  padding: 6px 18px 18px;
  border-radius: var(--r);
  background: var(--glass);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 1px solid var(--glass-brd);
  box-shadow: inset 0 1px 0 var(--glass-hi), var(--shadow-sm);
}
.member-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--hair);
}
.member-row .avatar {
  width: 30px;
  height: 30px;
  font-size: 12px;
}
.admin-panel input {
  background: rgba(255, 255, 255, 0.4);
  color: var(--ink);
  border: 1px solid var(--hair);
  border-radius: 8px;
  padding: 9px 11px;
  font-size: 15px;
  font-family: var(--sans);
}
@media (prefers-color-scheme: dark) {
  .admin-panel input {
    background: rgba(255, 255, 255, 0.06);
  }
}
.admin-panel input:focus {
  outline: none;
  border-color: var(--ink);
}
.member-row input.name {
  flex: 1;
  min-width: 0;
}
.order-btns {
  display: flex;
  gap: 5px;
}
.icon-btn {
  background: transparent;
  border: 1px solid var(--hair);
  color: var(--ink-3);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 14px;
  flex: none;
}
.icon-btn.del {
  color: var(--signal);
  border-color: var(--hair);
}
.icon-btn:hover {
  border-color: var(--ink);
  color: var(--ink);
}
.admin-add {
  display: flex;
  gap: 8px;
  margin: 14px 0 4px;
}
.admin-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--hair);
}

/* ---------- Modal(玻璃)---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.modal.hidden {
  display: none;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 8, 0.32);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.modal-box {
  position: relative;
  z-index: 1;
  width: 100%;
  max-height: 92vh;
  overflow: auto;
  padding: 22px;
  padding-bottom: calc(22px + env(safe-area-inset-bottom));
  border-radius: var(--r) var(--r) 0 0;
  background: var(--glass-2);
  -webkit-backdrop-filter: saturate(180%) blur(30px);
  backdrop-filter: saturate(180%) blur(30px);
  border: 1px solid var(--glass-brd);
  box-shadow: inset 0 1px 0 var(--glass-hi), 0 -20px 60px rgba(0, 0, 0, 0.3);
  animation: up 0.3s cubic-bezier(0.2, 0.9, 0.25, 1);
}
@keyframes up {
  from {
    transform: translateY(100%);
  }
}
@keyframes fade {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}
.modal-title {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 400;
  margin: 0 0 4px;
  line-height: 1.1;
}
.modal-sub {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-4);
  margin-bottom: 18px;
}
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--glass);
  border: 1px solid var(--hair);
  color: var(--ink-2);
  font-size: 13px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  z-index: 3;
}
.tabs {
  display: flex;
  gap: 0;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--hair);
}
.tab {
  flex: 1;
  background: transparent;
  border: none;
  border-bottom: 1.5px solid transparent;
  color: var(--ink-4);
  padding: 10px 6px;
  margin-bottom: -1px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-family: var(--sans);
}
.tab.active {
  color: var(--ink);
  border-bottom-color: var(--ink);
}
.search-row {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.search-row.hidden {
  display: none;
}
.search-row input {
  flex: 1;
  background: rgba(255, 255, 255, 0.4);
  color: var(--ink);
  border: 1px solid var(--hair);
  border-radius: 999px;
  padding: 11px 16px;
  font-size: 15px;
  font-family: var(--sans);
}
@media (prefers-color-scheme: dark) {
  .search-row input {
    background: rgba(255, 255, 255, 0.06);
  }
}
.search-row input:focus {
  outline: none;
  border-color: var(--ink);
}
.movie-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.movie-grid.hidden {
  display: none;
}
.movie-cell {
  cursor: pointer;
}
.movie-cell .poster {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--paper-2);
  border: 1px solid var(--hair);
  box-shadow: var(--shadow-sm);
  filter: contrast(1.02);
  transition: filter 0.3s ease, transform 0.16s ease;
}
.movie-cell:active .poster {
  transform: scale(0.97);
}
.movie-cell:hover .poster {
  filter: contrast(1.02);
}
.movie-cell .poster img,
.movie-cell .poster .noimg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.movie-cell .mc-grad {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 26px 10px 10px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.85));
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.movie-cell .mc-title {
  color: #fff;
  font-family: var(--serif);
  font-size: 14px;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.movie-cell .mc-type {
  color: rgba(255, 255, 255, 0.7);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.rate-pill {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
}
.seg {
  display: inline-flex;
  gap: 0;
  border: 1px solid var(--hair);
  border-radius: 999px;
  overflow: hidden;
}
.seg-btn {
  border: none;
  background: transparent;
  color: var(--ink-3);
  padding: 9px 22px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-family: var(--sans);
}
.seg-btn.active {
  background: var(--ink);
  color: var(--paper);
}
.form-field {
  margin-bottom: 16px;
}
.form-field label {
  display: block;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 8px;
}
.form-field input,
.form-field textarea,
.form-field select {
  width: 100%;
  background: rgba(255, 255, 255, 0.4);
  color: var(--ink);
  border: 1px solid var(--hair);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  font-size: 15px;
  font-family: var(--sans);
}
@media (prefers-color-scheme: dark) {
  .form-field input,
  .form-field textarea,
  .form-field select {
    background: rgba(255, 255, 255, 0.06);
  }
}
.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  outline: none;
  border-color: var(--ink);
}
.form-field textarea {
  min-height: 78px;
  resize: vertical;
}
.hint {
  font-size: 12px;
  color: var(--ink-4);
  margin-top: 7px;
}
.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}
.modal-actions .btn {
  flex: 1;
}
.picked-preview {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 12px;
  margin-bottom: 18px;
  border: 1px solid var(--hair);
  border-radius: var(--r-sm);
  background: var(--glass);
}
.picked-preview img,
.picked-preview .pp-illo {
  width: 52px;
  aspect-ratio: 2/3;
  object-fit: cover;
  border-radius: 6px;
  overflow: hidden;
  flex: none;
  filter: none;
}
.picked-preview b {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 17px;
}
.state-msg {
  text-align: center;
  color: var(--ink-3);
  padding: 30px 12px;
  font-size: 14px;
}

/* ---------- 活動卡:黑底票根 ---------- */
.ecard {
  margin: -22px -22px 0;
}
.ecard-hero {
  position: relative;
  padding: 24px 22px 18px;
  display: flex;
  gap: 16px;
  align-items: flex-end;
  min-height: 190px;
  border-radius: var(--r) var(--r) 0 0;
  overflow: hidden;
  isolation: isolate;
  background: #0b0b0c;
}
.ecard-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-size: cover;
  background-position: center 24%;
  filter: contrast(1.05);
  opacity: 0.62;
}
.ecard-hero::after {
  content: "";
  position: absolute;
  inset: 10px;
  z-index: -1;
  border: 1px solid rgba(255, 255, 255, 0.28);
  pointer-events: none;
}
.ecard-poster {
  width: 82px;
  aspect-ratio: 2/3;
  object-fit: cover;
  border-radius: 4px;
  overflow: hidden;
  flex: none;
  filter: none;
  border: 1px solid rgba(255, 255, 255, 0.4);
}
.ecard-head {
  min-width: 0;
  padding-bottom: 2px;
}
.ecard-index {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
}
.ecard-title {
  font-family: var(--serif);
  font-size: clamp(26px, 7vw, 40px);
  font-weight: 400;
  color: #fff;
  margin: 6px 0 2px;
  line-height: 1.04;
  overflow-wrap: anywhere;
}
.ecard-body {
  padding: 8px 22px 0;
}
.ecard-rows {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin: 6px 0 18px;
  background: var(--hair);
  border: 1px solid var(--hair);
  border-radius: var(--r-sm);
  overflow: hidden;
}
.ecard-row {
  background: var(--glass);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  padding: 12px 14px;
}
.ecard-row.full {
  grid-column: 1 / -1;
}
.ecard-row .lb {
  display: block;
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-4);
  margin-bottom: 5px;
}
.ecard-row .vl {
  font-size: 15px;
  font-weight: 500;
}
.ecard-row.full .vl {
  font-size: 13px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--ink-2);
}
.ecard-share {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}
.ecard-share .btn {
  flex: 1;
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--paper);
  padding: 13px 22px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  z-index: 200;
  box-shadow: var(--shadow);
  max-width: calc(100vw - 32px);
  text-align: center;
}
.toast.hidden {
  display: none;
}
.toast.err {
  background: var(--signal);
  color: #fff;
}
.footer {
  text-align: center;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-4);
  margin-top: 26px;
}

/* ---------- 平板 / 桌面 ---------- */
@media (min-width: 720px) {
  .who > span {
    display: inline;
  }
  .conn #conn-text {
    display: inline;
  }
  main {
    padding: 26px 20px 90px;
  }
  .hero-card {
    padding: 30px;
    gap: 26px;
  }
  .hero-figure {
    width: 200px;
  }
  .hero-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .hero-actions .btn {
    width: auto;
  }
  #range-label {
    display: inline;
  }
  .nr-nav {
    display: flex;
  }
  .movie-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
  }
  .modal {
    align-items: center;
    padding: 18px;
  }
  .modal-box {
    max-width: 640px;
    border-radius: var(--r);
    padding-bottom: 24px;
    animation: fade 0.24s ease;
  }
  .ecard {
    margin: -22px -22px 0;
  }
  .modal-actions {
    justify-content: flex-end;
  }
  .modal-actions .btn {
    flex: 0 0 auto;
  }
}
