/* Citywalk kiosk · cinema showtime reference (test data) */

:root {
  --page: #f5f2ed;
  --stage: #ede9e3;
  --paper: #ffffff;
  --pink: #de007c;
  --pink-dark: #b80066;
  --pink-soft: #f7d9e8;
  --ink: #333333;
  --muted: #736357;
  --line: #d9d4cf;
  --line-soft: #e7e1da;
  --shadow: 0 10px 24px rgba(124, 54, 91, 0.14);
  --sans: "PingFang HK", "PingFang SC", "Noto Sans TC", "Helvetica Neue", Arial, sans-serif;
  --serif: "Songti SC", "Noto Serif TC", "Source Han Serif TC", serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { color-scheme: light; }

body {
  background: var(--page);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--pink);
  outline-offset: 3px;
  border-radius: 8px;
}

[hidden] { display: none !important; }

/* ---- kiosk grid ------------------------------------------------------- */

.kiosk {
  width: 100%;
  height: 100vh;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px 292px;
  grid-template-rows: 112px minmax(0, 1fr) 54px;
  background: var(--page);
  overflow: hidden;
}

/* ---- header ----------------------------------------------------------- */

.topbar {
  grid-column: 1 / 3;
  grid-row: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 40px;
  background: var(--page);
}

.brand { display: inline-flex; align-items: center; }
.brand img { height: 48px; width: auto; }

.sino { height: 38px; width: auto; }

.topbar-clock {
  display: none;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--muted);
  line-height: 1.4;
  text-align: right;
}

.clock-panel {
  grid-column: 3;
  grid-row: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 22px;
  border-left: 1px solid var(--line-soft);
  background: var(--page);
}

.clock-date {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.clock-time {
  margin-top: 1px;
  font-size: 27px;
  font-weight: 300;
  letter-spacing: 0.02em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.weather {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.weather img { width: 30px; height: 30px; }
.weather span { font-size: 12px; color: var(--muted); }

/* ---- stage ------------------------------------------------------------ */

.stage {
  grid-column: 1;
  grid-row: 2;
  position: relative;
  padding: 22px 40px 30px;
  background: var(--stage);
  overflow-y: auto;
  min-height: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.65);
}

.view { animation: view-in 0.32s ease both; }

@keyframes view-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.section-head {
  display: flex;
  align-items: center;
  gap: 18px;
}

.head-rule {
  flex: 1;
  height: 1px;
  background: var(--line);
}

.section-head h1,
.section-head h2 {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--pink);
  white-space: nowrap;
}

.section-head.small h2 { font-size: 22px; }

/* ---- home poster row -------------------------------------------------- */

.poster-row {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 42px;
  padding: 28px 0 0;
  flex-wrap: wrap;
}

.poster-card {
  width: 226px;
  padding: 0;
  text-align: left;
  border-radius: 12px;
}

.poster-frame {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 10px;
  background: #d8d2ca;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
}

.poster-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.poster-card:hover .poster-frame img { transform: scale(1.045); }
.poster-card:active .poster-frame { transform: scale(0.99); }

.poster-title {
  margin-top: 12px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--ink);
}

.poster-cinema {
  margin-top: 3px;
  font-size: 12px;
  color: var(--muted);
}

.poster-time {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--pink);
}

.test-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 28px;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.test-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--pink);
}

/* ---- detail view ------------------------------------------------------ */

.view-detail { max-width: 980px; margin: 0 auto; }

.back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  margin-bottom: 18px;
  color: var(--pink);
  font-size: 14px;
  font-weight: 700;
}

.back-arrow { font-size: 18px; line-height: 1; }

.detail-grid {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 30px;
  align-items: start;
}

.detail-poster {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 12px;
  background: #d8d2ca;
  box-shadow: var(--shadow);
}
.detail-poster img { width: 100%; height: 100%; object-fit: cover; }

.eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.26em;
  color: var(--pink);
}

.detail-title {
  margin-top: 8px;
  font-size: 34px;
  font-weight: 800;
  line-height: 1.24;
  color: var(--ink);
}
.detail-title:focus { outline: none; }

.detail-title-en {
  margin-top: 4px;
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-transform: uppercase;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  list-style: none;
}
.meta li {
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  font-size: 12px;
  color: var(--ink);
}

.synopsis {
  margin-top: 16px;
  max-width: 60ch;
  font-size: 14px;
  line-height: 1.9;
  color: var(--muted);
}

.fallback {
  margin-top: 8px;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.cinema-line {
  margin-top: 18px;
  font-size: 13px;
  color: var(--ink);
}
.cinema-line strong {
  color: var(--pink);
  font-weight: 700;
  margin-right: 8px;
}

.showtimes { margin-top: 24px; }

.cinema-block { margin-top: 12px; }

.cinema-heading {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--pink);
}
.cinema-heading small {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--muted);
}

.date-block { margin-top: 12px; }

.date-heading {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}
.date-heading small {
  margin-left: 8px;
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
}

.time-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.time-chip {
  min-width: 118px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  text-align: left;
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.time-chip:hover {
  border-color: var(--pink);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(124, 54, 91, 0.12);
}
.time-chip strong {
  display: block;
  font-size: 17px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.time-chip span {
  display: block;
  max-width: 150px;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  color: var(--muted);
}
.time-chip em {
  display: block;
  margin-top: 4px;
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
  color: var(--pink);
}

/* ---- icon rail -------------------------------------------------------- */

.rail {
  grid-column: 2;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px 18px;
  background: var(--page);
  min-height: 0;
}

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

.tile {
  min-width: 0;
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 4px 2px;
  border-radius: 13px;
  background: var(--pink);
  color: #fff;
  box-shadow: 0 3px 6px rgba(124, 54, 91, 0.2);
  transition: transform 0.18s ease, background-color 0.18s ease;
}
.tile:hover { transform: translateY(-2px); background: var(--pink-dark); }
.tile img { width: 22px; height: 22px; }
.tile span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 9px;
  line-height: 1.1;
  white-space: nowrap;
}

.lang { display: flex; gap: 6px; }
.lang button {
  flex: 1;
  height: 30px;
  border: 1px solid var(--pink);
  border-radius: 6px;
  background: var(--paper);
  color: var(--pink);
  font-size: 12px;
  font-weight: 700;
}
.lang button.active { background: var(--pink); color: #fff; }

/* ---- media rail ------------------------------------------------------- */

.media-rail {
  grid-column: 3;
  grid-row: 2 / 4;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 14px 16px 18px;
  border-left: 1px solid var(--line-soft);
  background: var(--page);
  min-height: 0;
}

.media-card { border-radius: 12px; overflow: hidden; }

.media-card.dark {
  min-height: 190px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 18px;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.04) 0%, rgba(0, 0, 0, 0.86) 100%),
    url("posters/bd140a6a151d.png") center / cover no-repeat;
  box-shadow: var(--shadow);
}

.media-kicker {
  font-size: 9px;
  letter-spacing: 0.22em;
  opacity: 0.82;
}
.media-title { margin-top: 5px; font-size: 22px; font-weight: 800; }
.media-sub { margin-top: 3px; font-size: 11px; opacity: 0.82; }

.media-card.light {
  padding: 16px;
  border: 1px solid var(--line);
  background: var(--paper);
  text-align: center;
}
.media-card.light .qr { width: 84px; height: 84px; margin: 0 auto 8px; }
.media-title.small { font-size: 13px; color: var(--ink); }
.media-card.light .media-sub { color: var(--muted); opacity: 1; }

/* ---- footer ----------------------------------------------------------- */

.footer {
  grid-column: 1 / 3;
  grid-row: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 40px;
  border-top: 1px solid var(--line-soft);
  background: var(--page);
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.06em;
}

/* ---- toast ------------------------------------------------------------ */

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 50;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 12px;
  opacity: 0;
  transform: translateX(-50%) translateY(8px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.noscript {
  padding: 20px;
  text-align: center;
  color: var(--muted);
}

/* ---- responsive ------------------------------------------------------- */

@media (max-width: 1280px) {
  .kiosk { grid-template-columns: minmax(0, 1fr) 150px 252px; }
  .topbar { padding: 0 28px; }
  .stage { padding: 20px 28px 28px; }
  .poster-card { width: 200px; }
  .footer { padding: 0 28px; }
}

@media (max-width: 1100px) {
  .kiosk {
    grid-template-columns: minmax(0, 1fr) 160px;
    grid-template-rows: 96px minmax(0, 1fr) 48px;
  }
  .media-rail { display: none; }
  .clock-panel { display: none; }
  .topbar-clock { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; }
  .footer { grid-column: 1 / 3; }
}

@media (max-width: 860px) {
  .kiosk { display: block; height: auto; overflow: visible; min-height: 100vh; }
  .topbar { padding: 14px 20px; }
  .brand img { height: 40px; }
  .sino { height: 28px; }
  .topbar-clock { display: none; }
  .clock-panel {
    display: flex;
    padding: 0 20px 14px;
    border-left: 0;
  }
  .clock-time { font-size: 22px; }
  .stage { padding: 18px 20px 24px; overflow: visible; }
  .poster-row {
    justify-content: flex-start;
    gap: 18px;
    padding-bottom: 8px;
    overflow-x: auto;
  }
  .poster-card { flex: 0 0 180px; }
  .detail-grid { grid-template-columns: 1fr; gap: 20px; }
  .detail-poster { max-width: 200px; }
  .detail-title { font-size: 28px; }
  .rail { padding: 0 20px 24px; }
  .tiles { grid-template-columns: repeat(4, 1fr); }
  .lang { margin-top: 14px; max-width: 240px; }
  .footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 14px 20px;
  }
}

@media (max-width: 420px) {
  .brand img { height: 34px; }
  .sino { height: 24px; }
  .poster-card { flex-basis: 160px; }
  .tiles { grid-template-columns: repeat(4, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
