/* Side-dish (一品もの) frame — product clusters; each order line stays separate. */

.side-root {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  background: var(--bg-dish, #f4f5f7);
}

.side-pane-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem 0.4rem;
  border-bottom: 1px solid var(--border-soft, #e5e7eb);
  flex-shrink: 0;
}

.side-pane-title {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--fg, #1c2430);
  letter-spacing: 0.04em;
}

.side-pane-status {
  font-size: 0.7rem;
  color: var(--fg-muted, #6b7280);
}

.side-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0.55rem 0.7rem 0.85rem;
  -webkit-overflow-scrolling: touch;
}

.side-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem;
  text-align: center;
  color: var(--fg-muted, #6b7280);
  font-size: 0.85rem;
}

.side-empty[hidden] {
  display: none !important;
}

.side-groups {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.side-product-group {
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
  padding-bottom: 0.15rem;
}

/*
 * Single-line row: pin | 卓 | 商品名 | timer | handoff.
 * _K timer controls must not wrap to a second line (KDS-SIDE-K-TIMER-SINGLE-LINE-UI-001).
 */
.side-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.28rem 0.4rem;
  min-height: 2.05rem;
  max-height: 2.35rem;
  padding: 0.15rem 0.1rem;
  overflow: hidden;
}

.side-table-no {
  flex: 0 0 auto;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--fg, #1c2430);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.side-item-name {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--fg, #1c2430);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  overflow-wrap: normal;
}

.side-row > .item-pin-btn {
  flex: 0 0 auto;
}

/* Compact timer cluster — scoped to #side only (do not change shared cell for fry/udon/longcook). */
.side-row .item-timer-cell {
  display: inline-flex;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.18rem 0.28rem;
  max-width: none;
  white-space: nowrap;
}

.side-row .item-timer-badge {
  font-size: 0.68rem;
  white-space: nowrap;
}

.side-row .item-timer-start-btn {
  padding: 0.16rem 0.34rem;
  font-size: 0.66rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.side-row .item-timer-adj-btn {
  flex-shrink: 0;
  border: 1px solid #c4c4c4;
  background: #f7f7f7;
  color: var(--fg, #222);
  border-radius: 0.25rem;
  padding: 0.18rem 0.32rem;
  font-size: 0.64rem;
  font-weight: 800;
  line-height: 1.15;
  cursor: pointer;
  touch-action: manipulation;
  white-space: nowrap;
}

.side-row .item-timer-adj-btn:active {
  background: #ececec;
}

.side-row .item-timer-live,
.side-row .item-timer-overdue {
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.side-row .item-timer-remain-hit {
  flex-shrink: 0;
  border: 1px solid transparent;
  background: transparent;
  padding: 0.12rem 0.2rem;
  margin: 0;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
  color: inherit;
  cursor: pointer;
  touch-action: manipulation;
  white-space: nowrap;
}

.side-row .item-timer-remain-hit.is-paused,
.side-row .item-timer-live.is-paused {
  color: #8a5a10;
  border-color: rgba(212, 160, 23, 0.45);
  background: rgba(255, 248, 220, 0.65);
  border-radius: 0.2rem;
}

.side-row .item-timer-remain-hit.item-timer-overdue {
  color: #b33a2b;
}

/* Shared rule uses display:block + width:100% (forces 2nd line); keep inline on side. */
.side-row .item-timer-started {
  display: inline;
  width: auto;
  text-align: left;
  font-size: 0.62rem;
  font-weight: 700;
  white-space: nowrap;
}

.side-row .item-timer-forgotten-flag {
  font-size: 0.55rem;
  white-space: nowrap;
}

.side-row .item-partial-menu {
  flex-wrap: nowrap;
  white-space: nowrap;
}

.side-row .item-handoff-cell {
  flex: 0 0 auto;
  margin-left: 0.1rem;
  white-space: nowrap;
}

.side-screen {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.side-screen[hidden] {
  display: none !important;
}

.side-screen .side-pane {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
