/* Belt 18: a baggage reclaim hall late at night, seen from above at an angle. */

:root {
  --night: #0a0c10;
  --floor: #13161b;
  --ink: #eceff4;
  --muted: #a9b1bc;
  --yellow: #f2c64a;
  --paper: #f4f0e6;
  --paper-ink: #17181b;
  --lcd-a: #0f1f42;
  --lcd-b: #091329;
  --lcd-ink: #eef3fb;
  --lcd-dim: #8ea3cc;
  --green: #8be0ac;
  color-scheme: dark;
}

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

html { background: var(--night); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Overpass", "Helvetica Neue", Arial, sans-serif;
  background-color: var(--floor);
  background-image:
    radial-gradient(ellipse 55% 45% at 32% 42%, rgba(150, 180, 230, 0.11), rgba(150, 180, 230, 0) 70%),
    radial-gradient(ellipse 35% 30% at 80% 18%, rgba(150, 180, 230, 0.07), rgba(150, 180, 230, 0) 70%),
    linear-gradient(rgba(255, 255, 255, 0.032) 1px, rgba(255, 255, 255, 0) 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.032) 1px, rgba(255, 255, 255, 0) 1px),
    radial-gradient(rgba(255, 255, 255, 0.06) 1px, rgba(255, 255, 255, 0) 1.6px),
    radial-gradient(rgba(255, 255, 255, 0.035) 1.2px, rgba(255, 255, 255, 0) 2px),
    radial-gradient(rgba(0, 0, 0, 0.35) 1.4px, rgba(0, 0, 0, 0) 2.2px);
  background-size: 100% 1200px, 100% 1200px, 120px 72px, 120px 72px, 23px 23px, 37px 31px, 29px 27px;
  background-repeat: no-repeat, no-repeat, repeat, repeat, repeat, repeat, repeat;
  background-position: 0 0, 0 0, 0 0, 0 0, 0 0, 11px 7px, 5px 17px;
}

.page {
  position: relative;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 40px 56px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  grid-template-rows: auto 1fr;
  grid-template-areas: "sign screen" "floor screen";
  column-gap: 40px;
  overflow-x: clip;
}

/* ---------- Hanging sign ---------- */

.sign { grid-area: sign; position: relative; padding-top: 38px; margin-bottom: 4px; min-width: 0; }

.sign-rod {
  position: absolute;
  top: 0;
  width: 3px;
  height: 40px;
  background: linear-gradient(90deg, #2b2f35, #737a84, #2b2f35);
}
.sign-rod-a { left: 12%; }
.sign-rod-b { left: 58%; }

.sign-panel {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: "picto eyebrow belt" "picto name belt" "picto line belt";
  column-gap: 22px;
  align-items: center;
  padding: 18px 22px 20px;
  background: linear-gradient(180deg, #17191d, #0d0e11);
  border: 1px solid #262a30;
  border-radius: 6px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 24px 50px rgba(0, 0, 0, 0.55);
}

.sign-picto {
  grid-area: picto;
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  background: var(--yellow);
  color: #121315;
  border-radius: 4px;
}
.sign-picto svg { display: block; width: 60px; height: 60px; }

.sign-eyebrow {
  grid-area: eyebrow;
  align-self: end;
  margin: 0;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--yellow);
}

.sign-name {
  grid-area: name;
  margin: 4px 0 0;
  font-weight: 900;
  font-size: clamp(34px, 4vw, 58px);
  line-height: 1;
  letter-spacing: -0.015em;
  color: #fff;
}

.sign-line {
  grid-area: line;
  align-self: start;
  margin: 6px 0 0;
  font-size: 17px;
  line-height: 1.35;
  color: var(--muted);
}

.sign-belt { grid-area: belt; margin: 0; display: flex; align-items: center; gap: 12px; }
.sign-belt-label { font-weight: 800; font-size: 14px; letter-spacing: 0.18em; text-transform: uppercase; }
.sign-belt-no {
  display: grid;
  place-items: center;
  min-width: 78px;
  height: 78px;
  padding: 7px 8px 0;
  background: var(--yellow);
  color: #121315;
  font-weight: 900;
  font-size: 46px;
  line-height: 1;
  border-radius: 4px;
}

.sound {
  position: absolute;
  top: 5px;
  right: 0;
  z-index: 3;
  padding: 8px 13px 6px;
  font: 600 12px/1 "Overpass Mono", monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  background: #121418;
  border: 1px solid #30343b;
  border-radius: 999px;
  cursor: pointer;
}
.sound:hover { color: #fff; border-color: #50565f; }
.sound[aria-pressed="true"] { color: #121315; background: var(--yellow); border-color: var(--yellow); }
.sound:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }

/* ---------- The belt ---------- */

.floor { grid-area: floor; position: relative; min-width: 0; }

.hall {
  --u: 1;
  --tag-w: 150px;
  position: relative;
  width: 100%;
  height: 640px;
  overflow-x: clip;
}

.belt { position: absolute; left: 0; top: 0; display: block; overflow: hidden; pointer-events: none; }

.bags { position: absolute; inset: 0; z-index: 2; pointer-events: none; }

.beacon { opacity: 0.55; }
.beacon-glow { opacity: 0; }
.hall.is-starting .beacon { animation: beacon 0.5s linear 5; }
.hall.is-starting .beacon-glow { animation: beacon-glow 0.5s linear 5; }
@keyframes beacon { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0.25; } }
@keyframes beacon-glow { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

/* ---------- Luggage ---------- */

.bag {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  color: var(--paper-ink);
  text-decoration: none;
  outline: none;
  pointer-events: auto;
  will-change: transform;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-drag: none;
  -webkit-user-select: none;
  user-select: none;
}

.bag-case  { --sw: 172px; --sr: 0.7;    --sh: 0.2;  --tag-top: 48%; }
.bag-crate { --sw: 118px; --sr: 1.0286; --sh: 0.26; --tag-top: 52%; }
.bag-tube  { --sw: 206px; --sr: 0.3167; --sh: 0.13; --tag-top: 26%; }
.bag-soft  { --sw: 168px; --sr: 0.66;   --sh: 0.2;  --tag-top: 48%; }

.bag-lift,
.bag-shadow {
  position: absolute;
  left: 0;
  top: 0;
  width: calc(var(--sw) * var(--u));
  height: calc(var(--sw) * var(--u) * var(--sr));
  transform-origin: 50% 68%;
}

.bag-shadow { transform: translate(-50%, -68%); }
.bag-shadow::after {
  content: "";
  position: absolute;
  left: 2%;
  right: 2%;
  bottom: -5%;
  height: calc(var(--sw) * var(--u) * var(--sh));
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0));
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.bag-lift {
  transform: translate(-50%, -68%) rotate(var(--tilt, 0deg));
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.4s ease;
}

.spr { display: block; width: 100%; height: 100%; overflow: visible; }

.bag.is-up .bag-lift {
  transform: translate(-50%, -68%) translateY(-26px) scale(1.06);
  filter: drop-shadow(0 20px 16px rgba(0, 0, 0, 0.5));
}
.bag.is-up .bag-shadow::after { transform: scale(0.82); opacity: 0.55; }

/* Paper tag */
.tag {
  position: absolute;
  left: 50%;
  top: var(--tag-top);
  width: var(--tag-w);
  padding: 6px 9px 7px 24px;
  color: var(--paper-ink);
  text-align: left;
  background-color: var(--paper);
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0) 45%);
  border-radius: 3px 7px 7px 3px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25), 0 8px 14px rgba(0, 0, 0, 0.42);
  transform: translateX(-50%) rotate(var(--tag-tilt, 0deg));
  transition: width 0.38s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.38s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.2s ease;
}
.tag::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 15px;
  background: var(--band);
  border-radius: 3px 0 0 3px;
}
.tag-hole {
  position: absolute;
  left: 4px;
  top: 11px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #0c0d10;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85);
}
.tag-top { display: flex; align-items: baseline; gap: 6px; }
.tag-no { font-weight: 900; font-size: 22px; line-height: 1; letter-spacing: -0.02em; }
.tag-kind {
  margin-left: auto;
  font: 600 10px/1 "Overpass Mono", monospace;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #55585e;
}
.tag-title { display: block; margin-top: 4px; font-weight: 800; font-size: 14px; line-height: 1.16; }
.tag-more {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.38s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.tag-more-in { min-height: 0; overflow: hidden; }
.tag-line { display: block; padding-top: 7px; font-weight: 400; font-size: 16px; line-height: 1.35; color: #2a2b2f; }
.tag-open {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 10px 0 2px;
  padding: 8px 12px 6px;
  font-weight: 800;
  font-size: 14px;
  line-height: 1;
  color: var(--paper);
  background: var(--paper-ink);
  border-radius: 4px;
}
.tag-open::after {
  content: "";
  width: 7px;
  height: 7px;
  margin-top: -2px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
}
.code { display: block; width: 100%; height: 9px; margin-top: 6px; fill: var(--paper-ink); opacity: 0.8; }

.bag.is-up .tag {
  width: var(--tag-open-w, 270px);
  transform: translateX(calc(-50% + var(--tag-dx, 0px))) rotate(0deg);
}
.bag.is-up .tag-more { grid-template-rows: 1fr; }
.bag.is-called .tag,
.bag.is-up .tag { box-shadow: 0 0 0 3px var(--yellow), 0 10px 18px rgba(0, 0, 0, 0.45); }
.bag:focus-visible .tag { outline: 3px solid #fff; outline-offset: 4px; }

.hall.is-phone { --tag-w: 132px; }
.hall.is-phone .tag-no { font-size: 19px; }
.hall.is-phone .tag-title { font-size: 13px; }

/* ---------- Reclaim screen ---------- */

.screen-wrap { grid-area: screen; position: sticky; top: 0; align-self: start; min-width: 0; }

.screen-pole {
  display: block;
  width: 12px;
  height: 38px;
  margin: 0 auto;
  background: linear-gradient(90deg, #24272c, #5c626b 50%, #24272c);
}

.screen {
  padding: 9px;
  background: #07080a;
  border: 1px solid #2b2e34;
  border-radius: 10px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.55);
}

.lcd {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 76px);
  color: var(--lcd-ink);
  background: linear-gradient(180deg, var(--lcd-a), var(--lcd-b) 70%);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: inset 0 0 50px rgba(70, 130, 255, 0.12);
}

.lcd-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 14px 11px;
  background: #14295c;
  border-bottom: 2px solid var(--yellow);
  flex: none;
}
.lcd-picto {
  flex: none;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  color: #121315;
  background: var(--yellow);
  border-radius: 3px;
}
.lcd-picto svg { display: block; width: 24px; height: 24px; }
.lcd-head h2 { margin: 0; padding-top: 3px; font-weight: 800; font-size: 21px; line-height: 1; letter-spacing: 0.01em; }
.lcd-belt {
  margin-left: auto;
  padding: 5px 7px 3px;
  font-weight: 900;
  font-size: 13px;
  line-height: 1;
  letter-spacing: 0.04em;
  white-space: nowrap;
  color: #121315;
  background: var(--yellow);
  border-radius: 3px;
}
.lcd-clock { min-width: 3.1em; text-align: right; font: 600 15px/1 "Overpass Mono", monospace; color: #fff; }

.lcd-cols,
.row a {
  display: grid;
  grid-template-columns: 2.1em minmax(0, 1fr) auto;
  column-gap: 12px;
}
.lcd-cols {
  flex: none;
  padding: 9px 14px 7px;
  font: 600 10.5px/1 "Overpass Mono", monospace;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--lcd-dim);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.screen-list {
  flex: 1 1 auto;
  min-height: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #2b3f6d transparent;
}

.row a {
  align-items: start;
  padding: 10px 14px 9px;
  color: var(--lcd-ink);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
  transition: background-color 0.15s ease;
}
.row:nth-child(even) a { background-color: rgba(255, 255, 255, 0.022); }
.row-no { font-weight: 800; font-size: 17px; line-height: 1.25; color: var(--yellow); }
.row-title { display: block; font-weight: 700; font-size: 16px; line-height: 1.25; }
.row-kind {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font: 600 11px/1 "Overpass Mono", monospace;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #a3b5d9;
}
.picto { flex: none; width: 14px; height: 14px; }
.row-status {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-top: 3px;
  font: 600 11px/1.4 "Overpass Mono", monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--green);
}
.row-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 6px currentColor; }

.row a:hover,
.row.is-hover a { background-color: rgba(242, 198, 74, 0.13); }
.row a:focus-visible { outline: 3px solid var(--yellow); outline-offset: -3px; background-color: rgba(242, 198, 74, 0.13); }
.row.is-lit a { background-color: rgba(242, 198, 74, 0.2); }
.row.is-lit .row-status { color: var(--yellow); }

.lcd-foot {
  flex: none;
  display: flex;
  justify-content: space-between;
  margin: 0;
  padding: 10px 14px 9px;
  font: 600 11px/1 "Overpass Mono", monospace;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--lcd-dim);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* ---------- Narrower screens: the screen moves below the belt ---------- */

@media (max-width: 959px) {
  .page {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    grid-template-areas: "sign" "floor" "screen";
    padding: 0 12px 40px;
  }
  .screen-wrap { position: relative; margin-top: 4px; }
  .lcd { max-height: none; }
}

/* ---------- Phone ---------- */

@media (max-width: 619px) {
  .sign { padding-top: 42px; }
  .sign-panel {
    grid-template-areas: "picto eyebrow belt" "name name name" "line line line";
    column-gap: 12px;
    padding: 14px 14px 16px;
  }
  .sign-picto { width: 46px; height: 46px; }
  .sign-picto svg { width: 36px; height: 36px; }
  .sign-eyebrow { align-self: center; font-size: 12px; letter-spacing: 0.14em; }
  .sign-name { margin-top: 14px; font-size: 34px; }
  .sign-line { font-size: 16px; }
  .sign-belt { gap: 8px; }
  .sign-belt-label { font-size: 12px; letter-spacing: 0.14em; }
  .sign-belt-no { min-width: 46px; height: 46px; padding-top: 5px; font-size: 27px; }
  .lcd-head h2 { font-size: 19px; }
}

@media (prefers-reduced-motion: reduce) {
  .bag-lift, .tag, .tag-more, .bag-shadow::after, .row a { transition: none; }
  .hall.is-starting .beacon, .hall.is-starting .beacon-glow { animation: none; }
}

/* Phones: the lifted bag keeps its shadow on the case only, so the tag opens outside the filter */
@media (max-width: 820px), (pointer: coarse) {
  .bag.is-up .bag-lift { filter: none; }
  .bag.is-up .spr { filter: drop-shadow(0 20px 16px rgba(0, 0, 0, 0.5)); }
}
