/* KitchenOrderList — full (standalone kitchen) + compact (overview upper-left)
 * Row: [table] [【n】name] [timer] [済] — no trailing ×n qty.
 */

.kitchen-screen {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bg, #1a1a1a);
  color: var(--fg, #f2f2f2);
}

.kitchen-screen[hidden] {
  display: none !important;
}

.kol-root {
  flex: 1;
  min-height: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: inherit;
  color: inherit;
}

.kol-root--full {
  --kol-table: clamp(1.35rem, 2.2vw, 2rem);
  --kol-name: clamp(1.05rem, 1.8vw, 1.5rem);
  --kol-head: clamp(1rem, 1.5vw, 1.35rem);
}

.kol-root--compact {
  --kol-table: clamp(1rem, 1.5vw, 1.25rem);
  --kol-name: clamp(0.9rem, 1.3vw, 1.15rem);
  height: 100%;
}

.kol-head {
  flex: 0 0 auto;
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  padding: 0.45rem 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.kol-title {
  font-size: var(--kol-head);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.kol-count {
  font-size: 0.9em;
  opacity: 0.75;
}

.kol-status {
  margin-left: auto;
  font-size: 0.85rem;
  opacity: 0.7;
}

.kol-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 0.35rem 0.55rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}

.kol-empty {
  padding: 1rem 0.85rem;
  opacity: 0.55;
  font-size: 1rem;
}

.kol-empty[hidden] {
  display: none !important;
}

/* Main row: table | product | timer | 済 */
.kol-line {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 0.25rem 0.45rem;
  align-items: center;
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.kol-root--compact .kol-line {
  grid-template-columns: auto minmax(0, 1fr);
  padding: 0.22rem 0.35rem;
  gap: 0.15rem 0.35rem;
}

.kol-root--compact .kol-line-timer,
.kol-root--compact .kol-line-done {
  display: none;
}

.kol-line-table {
  font-size: var(--kol-table);
  font-weight: 800;
  line-height: 1.15;
  min-width: 1.6rem;
  padding-right: 0.35rem;
  border-right: 1px solid rgba(255, 255, 255, 0.18);
  white-space: nowrap;
}

.kol-line-product {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
}

.kol-line-name {
  font-size: var(--kol-name);
  font-weight: 650;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kol-line-tag {
  margin-left: 0.3rem;
  font-size: 0.72em;
  font-weight: 700;
  opacity: 0.75;
  padding: 0.05rem 0.3rem;
  border-radius: 999px;
  background: rgba(196, 92, 38, 0.35);
  white-space: nowrap;
}

/* Order time / elapsed — auxiliary under name; does not break main columns */
.kol-line-meta {
  font-size: 0.72em;
  opacity: 0.55;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kol-line-timer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.25rem;
  max-width: 42vw;
  min-width: 0;
}

.kol-line-timer .item-timer-cell {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.2rem;
  justify-content: flex-end;
}

.kol-line-done {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-shrink: 0;
}

.kol-line-done .item-handoff-cell {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

.kol-line.is-unclassified {
  border-color: rgba(196, 92, 38, 0.45);
}

/* Station「済」= 調理完了 (Formal handoff allHanded). Not Dish-up serve. */
.kol-line.is-station-handed {
  opacity: 0.55;
}

.kol-line.is-station-handed .kol-line-name {
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}

/* Portrait / narrow: keep name·timer·済 from spreading too far */
@media (max-width: 720px) {
  .kol-root--full .kol-line {
    gap: 0.2rem 0.35rem;
    padding: 0.3rem 0.4rem;
  }

  .kol-root--full .kol-line-timer {
    max-width: 48vw;
  }
}
