* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f2f2f2;
    touch-action: manipulation;
    -webkit-text-size-adjust: 100%;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    padding-bottom: calc(64px + env(safe-area-inset-bottom));
}

.title-bar {
    padding: 10px 12px;
    background: #fff;
    border-bottom: 1px solid #ddd;
    text-align: center;
    flex-shrink: 0;
}

.title-text {
    font-size: 15px;
    font-weight: bold;
    color: #222;
}

.legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 14px;
    padding: 8px 12px;
    background: #fff;
    border-bottom: 1px solid #ddd;
    flex-shrink: 0;
}

.legend-chip {
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 13px;
    font-weight: bold;
    color: #fff;
    white-space: nowrap;
}

.legend-chip.available {
    background: oklch(91% 0.15 98);
    color: #000;
}

.legend-chip.booked {
    background: #B5215A;
}

.legend-chip.held {
    background: #FBE1EA;
    color: #7C1440;
    box-shadow: inset 0 0 0 2px #DE7FA3;
}

.legend-chip.progress {
    background: #F2B8CD;
    color: #5E1030;
    box-shadow: inset 0 0 0 2px #C94F7C;
}

.legend-chip.selected {
    background: oklch(60% 0.17 258);
}

.viewport {
    position: relative;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    background: #ddd;
    touch-action: none;
}

.zoom-layer {
    position: absolute;
    top: 0;
    left: 0;
    transform-origin: 0 0;
    will-change: transform;
}

.layout-image {
    display: block;
    user-select: none;
    pointer-events: none;
}

.stall-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.zoom-tools {
    position: fixed;
    right: 12px;
    bottom: 84px;
    z-index: 400;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.zoom-tools button {
    -webkit-appearance: none;
    appearance: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    color: #333;
    border: 1px solid #c4c7c5;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
}

.zoom-tools svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 450;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: #fff;
    border-top: 1px solid #ddd;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.08);
}

.selection-count {
    font-size: 13px;
    color: #444;
}

.selection-count strong {
    display: block;
    font-size: 17px;
    color: #111;
}

#bookNowBtn {
    padding: 12px 26px;
    background: #28a745;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
}

#bookNowBtn:disabled {
    background: #b7bdb9;
    cursor: not-allowed;
}
