.placement-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.placement-fields label { min-width: 0; }
.guest-placement strong, .guest-placement small { display: block; }
.guest-placement small { margin-top: 3px; }
.guest-action-buttons { display: flex; flex-wrap: wrap; gap: 6px; }

.hall-layout, .tv-layout {
  --floor: #efefed;
  --floor-line: #d4d4d0;
  --chair-fill: #f8f8f6;
  --chair-border: #a5a5a0;
}
.hall-toolbar, .floor-heading, .tv-header, .tv-controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hall-toolbar { margin-bottom: 14px; flex-wrap: wrap; }
.hall-counters { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.hall-stat { display: inline-flex; align-items: baseline; gap: 7px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 8px; background: #f8f8f6; }
.hall-stat strong { font-size: 1.13rem; font-variant-numeric: tabular-nums; }
.hall-stat small { font-size: .78rem; }
.sync-status { color: var(--muted); font-size: .77rem; font-weight: 750; display: inline-flex; align-items: center; gap: 7px; }
.sync-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #a0a09a; }
.sync-status.online::before { background: var(--orange); box-shadow: 0 0 0 3px #ff69252c; }

.floor-panel {
  min-width: 0;
  padding: clamp(12px, 1.8vw, 24px);
  border: 1px solid var(--floor-line);
  border-radius: var(--radius);
  background-color: var(--floor);
  background-image: radial-gradient(ellipse at 85% 0%, #ffba8d36, transparent 62%), radial-gradient(#97928a50 .8px, transparent 1px);
  background-size: auto, 23px 23px;
  color: #191918;
}
.floor-heading { flex-wrap: wrap; }
.floor-heading h2 { font-size: clamp(1.2rem, 1.9vw, 1.65rem); }
.floor-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px 10px; align-items: start; margin-top: 12px; }
.hall-table { display: grid; justify-items: center; min-width: 0; padding-bottom: 5px; }
.hall-table svg { width: 100%; max-width: 182px; display: block; overflow: visible; }
.table-disc { fill: #242423; stroke: #101010; stroke-width: 1.15; }
.table-inner { fill: none; stroke: #666663; stroke-width: 1; }
.table-orbit { fill: none; stroke: #dc8a5c; stroke-width: .9; opacity: .52; }
.table-number, .table-label { text-anchor: middle; user-select: none; }
.table-number { fill: #fff; font-size: 25px; font-weight: 780; letter-spacing: -.05em; dominant-baseline: middle; }
.table-label { fill: #deded9; font-size: 8px; font-weight: 700; letter-spacing: .19em; }
.map-table-button { padding: 0; border: 0; border-radius: 12px; background: transparent; cursor: pointer; }
.map-table-button:hover, .map-table-button[aria-pressed="true"] { background: #ffffff80; }
.map-table-button:focus-visible { outline: 2px solid #ad4215; outline-offset: 2px; }
.chair-shape { fill: var(--chair-fill); stroke: var(--chair-border); stroke-width: 1.15; }
.chair-lit { fill: var(--orange); stroke: #a24620; }
.chair-fresh { animation: chair-arrival .9s ease-out both; }
.table-newest .table-disc { animation: table-arrival .9s ease-out both; }
@keyframes chair-arrival { 35% { filter: drop-shadow(0 0 5px #ff8b4d); } }
@keyframes table-arrival { 35% { stroke: #ff8b4d; stroke-width: 4; } }
.table-info { margin-top: 13px; min-height: 48px; padding: 11px; border-radius: 8px; border: 1px solid var(--floor-line); background: #f8f8f6; }
.table-info p { color: #545451; font-size: .82rem; }
.table-guests { list-style: none; padding: 0; margin: 6px 0 0; }
.table-guests li { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding: 5px 0; overflow-wrap: anywhere; }

.tv-layout {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: #efefec;
  background: radial-gradient(ellipse at 68% 55%, #44342e, #171519 65%, #141316);
  padding: clamp(14px, 2vw, 30px);
  border: 1px solid #292928;
  border-radius: var(--radius);
}
.tv-galaxy-backdrop { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.tv-galaxy-backdrop canvas { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 64% center; transform: scale(1.04); animation: galaxy-drift 42s ease-in-out infinite alternate; }
.tv-galaxy-backdrop span { position: absolute; width: 2px; height: 2px; border-radius: 50%; background: #f1eee9; box-shadow: 0 0 6px #f7ddc5b3; opacity: .4; animation: galaxy-twinkle 5s ease-in-out infinite alternate; }
@keyframes galaxy-drift { to { transform: translate(-1.5%, 1%) scale(1.15); } }
@keyframes galaxy-twinkle { from { opacity: .16; } to { opacity: .76; } }
.tv-header { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; padding-bottom: 13px; border-bottom: 1px solid #474745; }
.tv-galaxy { width: clamp(108px, 13vw, 186px); padding-bottom: 3px; }
.tv-header .overline, .tv-latest .overline { color: #ff925b; }
.tv-header h1 { font-size: clamp(1.7rem, 3vw, 3.6rem); margin-top: 5px; }
.tv-controls { flex-wrap: wrap; justify-content: end; }
.tv-controls .sync-status, .tv-clock { color: #dededa; white-space: nowrap; }
.tv-clock { font-weight: 740; font-variant-numeric: tabular-nums; }
.tv-grid { display: grid; grid-template-columns: minmax(235px, .8fr) minmax(0, 1.7fr); gap: clamp(10px, 1.5vw, 20px); align-items: start; margin-top: 16px; }
.tv-layout .floor-panel { color: #efefec; background: #17151bb0; border-color: #e4e4df45; }
.tv-layout .table-disc { stroke: #777771; }
.tv-layout .chair-shape { --chair-fill: #a5a39b; --chair-border: #252427; }
.tv-layout .chair-lit { stroke: #ffa164; }
.tv-layout .hall-table svg { max-width: 154px; }
.tv-arrivals { min-width: 0; }
.tv-latest {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 175px;
  align-content: center;
  background: radial-gradient(ellipse at 93% 15%, #4a3329c4, #221f25de 70%);
  border: 1px solid #454541;
  border-top: 4px solid var(--orange);
  padding: clamp(12px, 2vw, 25px);
  border-radius: 12px;
  display: grid;
  gap: 8px;
}
.tv-latest::after { content: ""; position: absolute; z-index: -1; top: 24%; left: -55%; width: 48%; height: 2px; transform: rotate(-12deg); background: linear-gradient(90deg, transparent, var(--orange)); box-shadow: 0 0 18px var(--orange); }
.tv-latest-new::after { animation: tv-comet .8s ease-out both; }
.tv-latest-new .tv-latest-name { animation: tv-name .45s ease-out both; }
.tv-latest-name { display: block; font-size: clamp(1.55rem, 3vw, 3.5rem); line-height: 1.04; letter-spacing: -.046em; overflow-wrap: anywhere; }
.tv-table { width: fit-content; padding: 2px 9px; border-radius: 4px; background: var(--orange); color: #191918; font-weight: 750; font-size: clamp(.92rem, 1.25vw, 1.4rem); }
.tv-layout time { font-variant-numeric: tabular-nums; }
.tv-latest time { color: #c9c9c5; font-size: .84rem; }
.tv-list-title { margin: 18px 0 7px; font-size: 1.03rem; }
.tv-list { padding: 0; margin: 0; list-style: none; }
.tv-arrival { display: flex; justify-content: space-between; gap: 8px; align-items: center; padding: 8px 10px; background: #18151cbc; border-top: 1px solid #e4e4df45; }
.tv-arrival-new { animation: tv-list-entry .35s ease-out both; }
@keyframes tv-comet { to { left: 120%; opacity: 0; } }
@keyframes tv-name { from { transform: translateY(9px); opacity: .3; } }
@keyframes tv-list-entry { from { transform: translateY(-5px); background-color: #ff692555; } }
.tv-arrival strong { font-size: clamp(.89rem, 1.2vw, 1.25rem); overflow-wrap: anywhere; }
.tv-arrival small { display: block; color: #c2c2bd; margin-top: 2px; }
.tv-arrival time, .tv-waiting { color: #c7c7c3; font-size: .83rem; line-height: 1.4; }
.tv-standalone { display: block; background: #161616; }
.tv-standalone .sidebar, .tv-standalone .topbar { display: none; }
.tv-standalone .page { max-width: 2040px; min-height: 100dvh; padding: 0; }
.tv-standalone .tv-layout { min-height: 100dvh; padding: clamp(14px, 2.25vw, 38px); border: 0; border-radius: 0; }
.tv-standalone .floor-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 1150px) {
  .floor-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 950px) {
  .tv-grid { grid-template-columns: 1fr; }
  .tv-standalone .floor-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 570px) {
  .floor-grid, .tv-standalone .floor-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px; }
  .tv-header { grid-template-columns: minmax(0, 1fr) auto; }
  .tv-controls { grid-column: 1 / -1; }
  .tv-controls { justify-content: start; }
}
@media (prefers-reduced-motion: reduce) {
  .chair-fresh, .table-newest .table-disc, .tv-galaxy-backdrop canvas, .tv-galaxy-backdrop span,
  .tv-latest-new::after, .tv-latest-new .tv-latest-name, .tv-arrival-new { animation: none; }
}
@media print {
  .tv-standalone { display: none !important; }
}
