/* Finger-sized controls for the seven-inch kitchen tablet. */
@media (pointer: coarse), (max-width: 1200px) {
    .app-header { height: 84px; padding: 0 20px; }
    .icon-button, .add-button { height: 56px; border-radius: 14px; }
    .icon-button { width: 56px; font-size: 30px; }
    .add-button { padding: 0 22px; font-size: 15px; }
    .add-button span { margin-right: 7px; font-size: 24px; }
    .board { padding: 12px; gap: 10px; }
    .board-column { padding: 12px; min-height: calc(100vh - 112px); }
    .card-main { padding: 14px 12px 12px 8px; gap: 9px; }
    .drag-handle { min-width: 32px; font-size: 28px; text-align: center; }
    .card-copy h3 { font-size: 17px; }
    .card-actions { min-height: 56px; }
    .card-actions button { font-size: 12px; }
    .clear-button { min-height: 52px; font-size: 12px; }
    .menu-item { min-height: 74px; font-size: 16px; }
    .panel-header button { width: 48px; height: 48px; font-size: 28px; }
    .cancel-button, .add-selection { height: 56px; font-size: 13px; }
}

.manage-button, .fullscreen-button {
    height: 46px;
    padding: 0 16px;
    border: 1px solid #3a3f39;
    border-radius: 12px;
    background: #272b27;
    color: #d5d9d2;
    font-size: 13px;
    font-weight: 750;
    text-transform: uppercase;
}
.fullscreen-button { background: #202820; color: #e9f05b; }
.menu-item:disabled { opacity: .45; cursor: not-allowed; }
.manage-panel { width: min(780px, 100%); max-height: 92vh; overflow: auto; }
.new-menu-item, .manage-item {
    display: grid;
    grid-template-columns: 54px minmax(140px, 1fr) auto;
    gap: 10px;
    align-items: center;
}
.new-menu-item { padding: 12px; margin: 18px 0; border: 1px solid #454b43; border-radius: 13px; background: #242824; }
.manage-list { display: flex; flex-direction: column; gap: 8px; }
.manage-item { grid-template-columns: 54px minmax(140px, 1fr) auto 58px 48px; padding: 9px; border: 1px solid #343934; border-radius: 12px; background: #202320; }
.manage-item.disabled-item { opacity: .55; }
.color-input { width: 50px; height: 50px; padding: 4px; border: 1px solid #464c44; border-radius: 10px; background: #2d312c; }
.name-input { width: 100%; height: 50px; padding: 0 14px; border: 1px solid #41463f; border-radius: 10px; outline: 0; background: #171a17; color: #f1f3ee; font: inherit; font-size: 16px; }
.name-input:focus { border-color: #e9f05b; }
.create-item, .toggle-item, .delete-item, .reorder-buttons button { min-height: 50px; border-radius: 10px; font-weight: 800; }
.create-item { padding: 0 18px; background: #e9f05b; color: #171914; }
.create-item:disabled { opacity: .35; }
.reorder-buttons { display: flex; gap: 4px; }
.reorder-buttons button { width: 42px; background: #303530; color: #e1e4de; font-size: 20px; }
.reorder-buttons button:disabled { opacity: .2; }
.toggle-item { background: #334239; color: #67d8aa; }
.disabled-item .toggle-item { background: #383838; color: #aaa; }
.delete-item { background: #3b2927; color: #e5a39b; font-size: 22px; }
.delete-item:disabled { opacity: .2; cursor: not-allowed; }

@media (pointer: coarse), (max-width: 1200px) {
    .manage-button, .fullscreen-button { height: 56px; padding: 0 18px; font-size: 14px; }
    .manage-panel { width: min(850px, 96vw); }
}

@media (max-width: 680px) {
    .manage-button span, .fullscreen-button span { display: none; }
    .manage-button, .fullscreen-button { width: 54px; padding: 0; }
    .manage-item { grid-template-columns: 50px 1fr 52px 44px; }
    .manage-item .reorder-buttons { grid-column: 2 / -1; }
    .new-menu-item { grid-template-columns: 50px 1fr; }
    .new-menu-item .create-item { grid-column: 1 / -1; }
}

/* Fixed-height kitchen board with independent column scrolling. */
html, body, #app { height: 100%; overflow: hidden; }
.app-shell { height: 100dvh; min-height: 0; overflow: hidden; }
.board { min-height: 0; overflow: hidden; }
.board-column {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    overflow: hidden;
}
.column-heading { flex: 0 0 auto; }
.card-stack {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding-right: 5px;
    scrollbar-width: thin;
    scrollbar-color: #555c53 #1a1d1a;
}
.card-stack > .food-card,
.card-stack > .empty-state,
.card-stack > .drop-hint { flex: 0 0 auto; }
.card-stack::-webkit-scrollbar { width: 8px; }
.card-stack::-webkit-scrollbar-track { background: #1a1d1a; border-radius: 8px; }
.card-stack::-webkit-scrollbar-thumb { background: #555c53; border-radius: 8px; }
.card-stack::-webkit-scrollbar-thumb:hover { background: #6c7569; }
.clear-button { flex: 0 0 auto; }

@media (max-width: 600px) {
    .board { grid-template-columns: repeat(3, minmax(270px, 1fr)); overflow-x: auto; overflow-y: hidden; }
    .board-column { min-height: 0; }
}

/* Landscape order entry: keypad left, dishes right, actions always visible. */
@media (orientation: landscape) and (min-width: 700px) {
    .order-panel {
        width: min(1180px, 96vw);
        height: min(680px, 94dvh);
        max-height: 94dvh;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        padding: 18px;
    }
    .order-panel .panel-header,
    .order-panel .panel-help,
    .order-panel .order-summary,
    .order-panel .panel-footer { flex: 0 0 auto; }
    .order-panel .panel-header h2 { margin: 2px 0; font-size: 23px; }
    .order-panel .panel-help { margin: 3px 0 10px; }
    .order-entry-layout {
        flex: 1 1 auto;
        min-height: 0;
        display: grid;
        grid-template-columns: minmax(250px, .72fr) minmax(0, 1.8fr);
        gap: 14px;
    }
    .order-entry-keypad {
        min-height: 0;
        padding: 12px;
        border: 1px solid #3b413a;
        border-radius: 14px;
        background: #202420;
    }
    .order-entry-keypad .order-number-field {
        display: block;
        margin: 0 0 10px;
        padding: 0;
        border: 0;
        background: transparent;
    }
    .order-entry-keypad .order-number-field > span { display: block; margin: 0 0 6px; }
    .order-entry-keypad .order-number-field input { height: 54px; font-size: 24px; text-align: center; }
    .order-entry-keypad .number-pad { margin: 0; gap: 7px; }
    .order-entry-keypad .number-pad button { min-height: 48px; }
    .order-entry-dishes { min-width: 0; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-right: 4px; }
    .order-entry-dishes .menu-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
    .order-entry-dishes .order-menu-item,
    .order-entry-dishes .dish-tap,
    .order-entry-dishes .dish-minus { min-height: 64px; }
    .order-entry-dishes .dish-tap { padding: 0 9px; font-size: clamp(16px, 1.7vw, 20px); }
    .order-entry-dishes .order-menu-item { grid-template-columns: minmax(0, 1fr) 44px; }
    .order-entry-dishes .menu-color { width: 7px; }
    .order-entry-dishes .dish-tap strong { padding: 5px 6px; }
    .order-panel .order-summary { margin-top: 10px; padding: 9px 13px; }
    .order-panel .panel-footer { margin-top: 10px; }
    .order-panel .cancel-button,
    .order-panel .add-selection,
    .order-panel .remove-order-button { height: 48px; }
}

.quantity-row {
    display: grid;
    grid-template-columns: 1fr minmax(74px, .7fr) 1fr;
    min-height: 58px;
    border-top: 1px solid #32362f;
    background: #1d201d;
}
.card-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.card-title-row h3 { flex: 1; min-width: 0; }
.batch-total { flex: 0 0 auto; padding: 5px 9px; border-radius: 7px; background: #e9f05b; color: #171914; font-size: 16px; font-weight: 900; }
.order-breakdown { display: flex; flex-wrap: wrap; gap: 7px; padding: 10px 12px; border-top: 1px solid #32362f; background: #1d201d; }
.order-lines { display: flex; flex-direction: column; border-top: 1px solid #32362f; background: #1d201d; }
.order-line { min-height: 66px; padding: 8px 12px; display: grid; grid-template-columns: 9px minmax(0,1fr) auto 74px; align-items: center; gap: 12px; border-bottom: 1px solid #2d312c; color: #f0f2ed; font-size: clamp(18px, 1.8vw, 22px); font-weight: 750; }
.order-line:last-child { border-bottom: 0; }
.order-line .line-color { width: 9px; height: 38px; border-radius: 5px; }
.order-line strong { color: #fff; font-size: clamp(19px, 2vw, 23px); }
.line-name { min-width: 0; }
.line-name small { display: block; margin-top: 4px; color: #9ca198; font-size: 12px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.line-preparing .line-name small { color: #f2c14f; }
.line-complete .line-name small { color: #55c69c; }
.line-start { min-height: 52px; border-radius: 11px; background: #e9f05b; color: #171914; font-size: 13px; font-weight: 900; text-transform: uppercase; }
.line-lock { text-align: center; color: #7e857b; }
.locked-menu-item { opacity: .52; }
.order-chip { padding: 7px 9px; border: 1px solid #444a42; border-radius: 8px; background: #2a2e29; color: #c9cec6; font-size: 12px; font-weight: 700; }
.order-chip b { color: #e9f05b; }
.order-chip i { margin-left: 3px; color: #8e948b; font-style: normal; font-size: 10px; }
.order-chip.editable { color: #dfe3dc; cursor: pointer; }
.order-chip.editable:active { border-color: #e9f05b; background: #363c34; }
.order-number-field { display: grid; grid-template-columns: auto minmax(160px, 1fr); align-items: center; gap: 14px; margin: 16px 0 18px; padding: 12px 14px; border: 1px solid #4a5048; border-radius: 12px; background: #242824; }
.order-number-field > span { color: #e9f05b; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.order-number-field input { width: 100%; height: 54px; padding: 0 15px; border: 1px solid #50564e; border-radius: 10px; outline: none; background: #131613; color: #fff; font: inherit; font-size: 22px; font-weight: 800; }
.order-number-field input:focus { border-color: #e9f05b; box-shadow: 0 0 0 3px #e9f05b22; }
.number-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin: -8px 0 18px; }
.number-pad button { min-height: 52px; border: 1px solid #454b43; border-radius: 10px; background: #303530; color: #f4f6f1; font-size: 21px; font-weight: 850; }
.number-pad button:active { background: #e9f05b; color: #171914; }
.number-pad .key-clear { color: #efb2aa; font-size: 11px; text-transform: uppercase; }
.number-pad .key-delete { color: #e9f05b; font-size: 22px; }
.order-error { min-height: 42px; margin: -3px 0 8px; padding: 8px 10px; display: flex; align-items: center; gap: 9px; border: 1px solid #9f4841; border-radius: 9px; background: #422623; color: #ffc0b8; font-size: 12px; animation: order-error-pop .22s ease-out; }
.order-error > span { width: 23px; height: 23px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; background: #e06e5e; color: #1b1110; font-weight: 900; }
@keyframes order-error-pop { from { transform: scale(.96); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.order-menu-item { padding: 0; overflow: hidden; display: grid; grid-template-columns: 1fr 54px; gap: 0; }
.order-menu-item .dish-tap { min-width: 0; min-height: 72px; padding: 0 12px; display: flex; align-items: center; gap: 10px; background: transparent; color: #f1f3ef; text-align: left; font-size: clamp(17px, 1.8vw, 21px); font-weight: 800; line-height: 1.2; }
.order-menu-item .dish-tap > span:nth-child(2) { flex: 1; }
.order-menu-item .dish-tap strong { padding: 6px 9px; border-radius: 8px; background: #e9f05b; color: #171914; font-size: 17px; }
.order-menu-item .dish-tap:disabled { opacity: .55; }
.order-menu-item .dish-minus { min-height: 72px; border-left: 1px solid #41463f; background: #303530; color: #f1f3ee; font-size: 25px; font-weight: 800; }
.order-menu-item .dish-minus:disabled { opacity: .2; }
.order-summary { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; padding: 12px 14px; border-radius: 10px; background: #141714; color: #90968d; font-size: 12px; text-transform: uppercase; }
.order-summary strong { color: #e9f05b; }
.remove-order-button { height: 56px; padding: 0 16px; border-radius: 10px; background: #442b29; color: #f0a9a1; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.drag-handle { touch-action: none; user-select: none; -webkit-user-select: none; }
.touch-drag-source { opacity: .22; }
.touch-drag-ghost { position: fixed; z-index: 1000; pointer-events: none; margin: 0; opacity: .92; box-shadow: 0 22px 60px #000a; }
.board-column.touch-drop-active { border-color: #e9f05b; background: #1d211c; box-shadow: inset 0 0 0 2px #e9f05b33; }
.quantity-row button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 0;
    color: #f1f3ee;
    background: #2b2f2a;
    font-weight: 800;
}
.quantity-row button:first-child { border-right: 1px solid #3b4039; }
.quantity-row button:last-child { border-left: 1px solid #3b4039; }
.quantity-row button:active { background: #e9f05b; color: #171914; }
.quantity-row button:disabled { opacity: .35; cursor: not-allowed; }
.quantity-row button > span { font-size: 27px; line-height: 1; }
.quantity-row button small,
.quantity-row strong small { color: #92978f; font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.quantity-row button:active small { color: #171914; }
.quantity-row strong { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; }
.quantity-row strong > span { font-size: 21px; }

@media (pointer: coarse), (max-width: 1200px) {
    .card-copy h3 { white-space: normal; overflow: visible; line-height: 1.2; }
    .quantity-row { min-height: 64px; }
    .quantity-row button > span { font-size: 30px; }
    .quantity-row button small { font-size: 10px; }
}

/* Read-at-a-distance typography for 8–10 inch kitchen tablets. */
.brand h1 { font-size: 24px; line-height: 1.2; }
.brand p { font-size: 12px; }
.column-title h2 { font-size: 15px; }
.count { font-size: 14px; }
.card-copy h3 { font-size: clamp(20px, 1.9vw, 24px); font-weight: 700; line-height: 1.25; }
.card-meta { font-size: 12px; font-weight: 750; }
.batch-total { font-size: 20px; }
.card-actions button { font-size: 14px; }
.clear-button { font-size: 13px; }
.empty-state p { font-size: 14px; }
.panel-header h2 { font-size: 29px; line-height: 1.2; }
.panel-help { font-size: 15px; line-height: 1.4; }
.eyebrow { font-size: 12px; }
.manage-button, .fullscreen-button, .add-button { font-size: 15px; }
.name-input { font-size: 18px; }
.create-item, .toggle-item { font-size: 15px; }

.order-line {
    font-size: clamp(22px, 2vw, 24px);
    line-height: 1.3;
}
.order-line strong { font-size: clamp(24px, 2.2vw, 27px); }
.line-name small { font-size: 15px; line-height: 1.2; }
.line-start { font-size: 16px; }
.order-chip { font-size: 14px; }
.order-chip i { font-size: 12px; }
.order-number-field > span { font-size: 14px; }
.order-number-field input { font-size: 26px; }
.number-pad button { font-size: 24px; }
.number-pad .key-clear { font-size: 13px; }
.number-pad .key-delete { font-size: 25px; }
.order-error { font-size: 14px; }
.order-menu-item .dish-tap {
    font-size: clamp(21px, 2vw, 24px);
    line-height: 1.3;
}
.order-menu-item .dish-tap strong { font-size: 20px; }
.order-summary { font-size: 14px; }
.remove-order-button { font-size: 13px; }
.quantity-row button small,
.quantity-row strong small { font-size: 11px; }
.quantity-row strong > span { font-size: 24px; }

@media (orientation: landscape) and (min-width: 700px) {
    .order-panel .panel-header h2 { font-size: 26px; }
    .order-entry-keypad .order-number-field input { font-size: 27px; }
    .order-entry-dishes .dish-tap { font-size: clamp(19px, 1.8vw, 22px); }
}
