/* Kiosk: designed for 1920x1080, scales with the viewport width (4K). */
html.kiosk-root { font-size: calc(100vw / 120); color-scheme: dark; } /* 16px at 1920px */
.kiosk body, html.kiosk-root body { background: var(--bg); color: var(--text); user-select: none; -webkit-user-select: none; overflow: hidden; }

.kiosk-app {
  height: 100vh; padding: 2rem 2.5rem; display: flex; flex-direction: column; gap: 1.25rem; position: relative;
}
.k-header { display: flex; align-items: center; gap: 1.5rem; flex: none; }
.k-title { display: flex; flex-direction: column; gap: .25rem; min-width: 22rem; }
.k-title h1 { margin: 0; font-size: 2.5rem; font-weight: 600; letter-spacing: -0.01em; }
.k-title span, .k-hint, .muted { color: var(--text-muted); }
.k-title span { font-size: 1.25rem; }
.k-tabs { display: flex; gap: .5rem; background: var(--surface); padding: .375rem; border-radius: 1rem; }
.k-tabs button {
  min-height: 3.75rem; padding: 0 1.5rem; border: 0; border-radius: .75rem; background: transparent; color: var(--text-muted);
  font-size: 1.25rem; font-weight: 500;
}
.k-tabs button[aria-pressed="true"] { background: var(--text); color: var(--bg); font-weight: 600; }
.k-spacer { flex: 1; }
.k-clock { display: flex; flex-direction: column; align-items: flex-end; gap: .125rem; }
.k-clock .mono { font-size: 4rem; font-weight: 500; line-height: 1; }
.k-hint { font-size: 1rem; display: flex; align-items: center; gap: .5rem; }
.dot-live { width: .625rem; height: .625rem; background: #4CC38A; }

.k-main {
  flex: 1; min-height: 0; display: grid; gap: 1rem;
  grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); grid-template-rows: repeat(var(--rows, 3), minmax(0, 1fr));
}
.k-card, .k-dep {
  background: var(--surface); border: 2px solid transparent; border-radius: 1rem; padding: 1rem 1.125rem; text-align: left;
  display: flex; flex-direction: column; justify-content: flex-start; gap: .5rem; padding: .875rem 1rem; min-width: 0; min-height: 0; overflow: hidden; color: var(--text);
}
.k-card:active { transform: scale(0.99); }
.k-card.now, .k-dep.now { border-color: var(--now-badge); }
.k-card.absent { opacity: 0.55; }
.k-dep.done { opacity: 0.5; }
.k-card-head { display: flex; align-items: center; gap: .75rem; width: 100%; }
.k-avatar { width: 2.75rem; height: 2.75rem; font-size: 1rem; }
.k-avatar.big { width: 4.5rem; height: 4.5rem; font-size: 1.5rem; }
.k-name { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.2; }
.k-name .name { font-size: 1.25rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.k-name .muted { font-size: .9375rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.k-pill { flex: none; font-size: .875rem; font-weight: 600; padding: .25rem .625rem; border-radius: .75rem; background: var(--surface-2); color: var(--text-2); }
.k-pill.busy, .k-pill.in_use { background: var(--warn-bg); color: var(--warn-text); }
.k-pill.later { background: #22314A; color: #BFD3F5; }
.k-pill.free, .k-pill.available { background: var(--ok-bg); color: var(--ok-text); }
.k-pill.workshop { background: #1F3A36; color: #9FE0D3; }
.k-pill.absent { background: var(--surface-2); color: var(--text-muted); }

.k-event { background: var(--surface-2); border-radius: .75rem; padding: .5rem .75rem; display: flex; flex-direction: column; gap: .25rem; min-width: 0; }
.k-event-time { display: flex; align-items: center; gap: .625rem; font-size: 1.0625rem; color: var(--text-2); }
.k-event-time .dot, .k-event-title .dot { width: .75rem; height: .75rem; }
.k-now {
  font-size: .8125rem; font-weight: 600; letter-spacing: .06em; background: var(--now-badge); color: var(--now-badge-text);
  padding: .125rem .5rem; border-radius: .375rem;
}
.k-event-title { font-size: 1.1875rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: .5rem; }
.k-event-title .muted { font-weight: 400; font-size: 1.0625rem; }
.k-with { font-size: 1rem; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.k-gear { display: flex; align-items: center; gap: .5rem; flex-wrap: nowrap; overflow: hidden; }
.k-gear-name { font-size: .9375rem; color: var(--text-2); white-space: nowrap; flex: none; }
.k-chip {
  display: inline-flex; align-items: center; gap: .375rem; height: 1.875rem; padding: 0 .625rem; border-radius: .5rem;
  background: #2C2E34; color: #E6E6E0; font-size: .9375rem; white-space: nowrap; flex: none;
}
.k-chip .icon { width: .9375rem; height: .9375rem; }
.plate {
  display: inline-flex; align-items: center; height: 1.875rem; padding: 0 .625rem; background: var(--plate-bg); color: var(--plate-text);
  font-weight: 600; font-size: 1rem; border-radius: .3125rem; border-top: .25rem solid var(--plate-stripe);
  border-bottom: .25rem solid var(--plate-stripe); flex: none; white-space: nowrap;
}
.plate.big { height: 2.25rem; font-size: 1.1875rem; }
.k-next { font-size: .9375rem; flex: none; color: #C4C4BE; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.k-nothing { font-size: 1.0625rem; color: var(--text-muted); }

.k-main.dense .k-card { padding: .75rem .875rem; gap: .375rem; }
.k-main.dense .k-avatar { width: 2.5rem; height: 2.5rem; font-size: .9375rem; }
.k-main.dense .k-name .name { font-size: 1.125rem; }
.k-main.dense .k-event-title { font-size: 1.0625rem; }

.k-dep-team { display: flex; flex-wrap: wrap; gap: .625rem; }
.k-person { display: inline-flex; align-items: center; gap: .5rem; font-size: 1.125rem; }
.k-person .avatar { width: 2.25rem; height: 2.25rem; font-size: .875rem; }

.k-pager { flex: none; display: flex; justify-content: center; align-items: center; gap: .5rem; font-size: 1rem; color: var(--text-muted); min-height: 1rem; }
.k-dot { width: .625rem; height: .625rem; border-radius: 50%; background: var(--border); }
.k-dot.on { background: var(--text); }

.k-res { flex: none; display: flex; flex-direction: column; gap: .625rem; }
.k-res h2 { margin: 0; font-size: 1.125rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .08em; }
.k-res-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1rem; }
.k-res-tile { background: var(--surface); border-radius: .875rem; padding: .75rem 1rem; display: flex; flex-direction: column; gap: .5rem; min-width: 0; }
.k-res-head { display: flex; align-items: center; gap: .625rem; }
.k-res-tile .name { font-size: 1.125rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }
.k-res-tile .muted { font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 1.25rem; }

.k-empty { font-size: 1.5rem; color: var(--text-muted); grid-column: 1 / -1; }

.k-overlay { position: absolute; inset: 0; background: rgba(8, 8, 10, 0.72); display: flex; align-items: center; justify-content: center; z-index: 10; }
.k-modal {
  width: 68.75rem; max-height: 56.25rem; background: var(--surface); border-radius: 1.5rem; padding: 2.25rem 2.5rem;
  display: flex; flex-direction: column; gap: 1.5rem; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}
.k-modal-head { display: flex; align-items: center; gap: 1.125rem; }
.k-modal-head h2 { margin: 0; font-size: 2.25rem; font-weight: 600; }
.k-modal-head .muted { font-size: 1.25rem; }
.k-close {
  min-height: 4rem; padding: 0 1.75rem; border: 0; border-radius: 1rem; background: var(--text); color: var(--bg);
  font-size: 1.375rem; font-weight: 600; display: flex; align-items: center; gap: .625rem;
}
.k-close .icon { width: 1.375rem; height: 1.375rem; }
.k-modal-list { display: flex; flex-direction: column; gap: .75rem; overflow-y: auto; }
.k-item { display: flex; gap: 1.5rem; padding: 1.125rem 1.25rem; border-radius: 1rem; background: var(--surface-2); border: 2px solid transparent; }
.k-item.now { border-color: var(--now-badge); }
.k-item.done { opacity: 0.5; }
.k-item-time { width: 12rem; flex: none; display: flex; flex-direction: column; gap: .25rem; align-items: flex-start; }
.k-item-time .mono { font-size: 1.5rem; font-weight: 500; }
.k-item-body { display: flex; flex-direction: column; gap: .5rem; flex: 1; min-width: 0; font-size: 1.1875rem; }
.k-item-body .k-event-title { font-size: 1.625rem; }
.k-item-body .k-chip { height: 2.25rem; font-size: 1.125rem; }
.k-note { color: #E6E6E0; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.k-modal > .muted { font-size: 1rem; }
.kiosk .connect { grid-column: 1 / -1; justify-self: center; align-self: center; font-size: 1.125rem; }
.kiosk .connect .field input { background: var(--surface-2); color: var(--text); border-color: var(--border); }
.k-pair { align-items: center; justify-content: center; }
.k-pair-card { background: var(--surface); border-radius: 1.5rem; padding: 2.5rem; width: 36rem; display: flex; flex-direction: column; gap: 1rem; }
.k-pair-card h1 { margin: 0; font-size: 2rem; }
.k-pair-card form { display: flex; flex-direction: column; gap: .75rem; }
.k-pair-card .field { font-size: 1.125rem; color: var(--text-2); }
.k-pair-card input { height: 4rem; font-size: 2rem; letter-spacing: .15em; text-transform: uppercase; background: var(--surface-2); color: var(--text); border: 1px solid var(--border); border-radius: .75rem; padding: 0 1rem; }
.k-pair-card .k-close { align-self: flex-start; }
