/* Seating studio (js/seating.js) — drag-and-drop canvas */
.seat-wrap { display: grid; grid-template-columns: 1fr 220px; gap: 14px; align-items: start; }
@media (max-width: 820px) { .seat-wrap { grid-template-columns: 1fr; } }
.seat-stage { overflow: auto; }

.seat-canvas {
  position: relative; margin: 0 auto; background: var(--panel);
  border: 1px solid var(--line); border-radius: 10px;
  background-image: linear-gradient(to right, rgba(120,130,150,.10) 1px, transparent 1px), linear-gradient(to bottom, rgba(120,130,150,.10) 1px, transparent 1px);
  background-position: 0 0;
}
.seat-front2 { position: absolute; left: 12px; right: 12px; top: 6px; height: 26px; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 11px; letter-spacing: .08em; color: var(--muted); background: var(--panel-2); border: 1px solid var(--line); border-radius: 7px; }
.seat-aisle { position: absolute; background: repeating-linear-gradient(45deg, rgba(120,130,150,.10) 0 6px, transparent 6px 12px); border-radius: 3px; pointer-events: none; }

.seat-teacher { position: absolute; width: 150px; height: 40px; display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--brand) 16%, var(--panel)); border: 1px solid color-mix(in srgb, var(--brand) 45%, var(--line));
  border-radius: 8px; font-size: 12px; font-weight: 700; cursor: move; user-select: none; }

.seat-card { position: absolute; width: 92px; height: 66px; box-sizing: border-box; border: 1px solid var(--line); border-radius: 10px;
  background: var(--panel); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  cursor: move; user-select: none; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.06); padding: 3px; }
.seat-card.empty { background: var(--panel-2); border-style: dashed; color: var(--muted); }
.seat-card.filled { border-bottom: 3px solid var(--line); }
.seat-card.boy.filled { border-bottom-color: #2e6fc4; }
.seat-card.girl.filled { border-bottom-color: #c0498b; }
.seat-card:hover { box-shadow: 0 3px 10px rgba(0,0,0,.16); z-index: 3; }
.seat-photo { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; object-position: center 20%; flex: 0 0 auto; }
.seat-nm { font-size: 10.5px; font-weight: 700; line-height: 1.05; text-align: center; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seat-meta { font-size: 9px; color: var(--muted); }
.seat-empty-t { font-size: 10px; }

.seat-roster { max-height: 62vh; overflow: auto; }
.seat-rchip { display: flex; align-items: center; gap: 7px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 5px; cursor: pointer; font-size: 12px; }
.seat-rchip:hover { background: var(--panel-2); }
.seat-rchip.on { background: color-mix(in srgb, var(--brand) 16%, var(--panel)); border-color: var(--brand); }
.seat-rchip { cursor: grab; touch-action: none; }
.seat-rchip img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; object-position: center 20%; flex: 0 0 auto; }

/* furniture palette + drag ghost + doors/windows */
.seat-pal { border: 1px solid var(--line); border-radius: 8px; padding: 6px 9px; font-size: 12px; cursor: grab; background: var(--panel); user-select: none; touch-action: none; white-space: nowrap; }
.seat-pal:hover { background: var(--panel-2); border-color: var(--brand); }
.seat-ghost { position: fixed; z-index: 9999; pointer-events: none; background: var(--brand); color: #fff; font-size: 12px; font-weight: 700; padding: 4px 8px; border-radius: 6px; box-shadow: 0 4px 14px rgba(0,0,0,.32); }
.seat-furn { position: absolute; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; cursor: move; user-select: none; border-radius: 6px; padding: 4px 7px; white-space: nowrap; touch-action: none; }
.seat-furn-door { background: color-mix(in srgb, #1c8b5a 16%, var(--panel)); border: 1px solid color-mix(in srgb, #1c8b5a 45%, var(--line)); color: #0f6e43; }
.seat-furn-window { background: color-mix(in srgb, #2e6fc4 14%, var(--panel)); border: 1px dashed color-mix(in srgb, #2e6fc4 50%, var(--line)); color: #1c528f; }

@media print {
  .seat-roster, .seat-wrap > .card:last-child { display: none; }
  .seat-wrap { grid-template-columns: 1fr; }
  .seat-canvas { border-color: #999; }
}
