html, body, #app {
    height: 100%;
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

.map-viewport {
    position: relative;
    flex: 1 1 auto;
    overflow: hidden;
    bachenground: var(--map-bg, #f5f5f5);
    user-select: none;
    touch-action: none;
}

.v-theme--dark .map-viewport {
    --map-bg: #1a1a1a;
}

.map-stage {
    position: absolute;
    inset: 0;
    transform-origin: 0 0;
    will-change: transform;
}

.map-svg {
    width: 100%;
    height: 100%;
    display: block;
    color: currentColor;
    overflow: visible;
}

.map-svg image.dark-invert {
    filter: invert(1) hue-rotate(180deg);
}

.map-empty {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--v-medium-emphasis-opacity);
}

.map-zoom-controls {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: rgba(255,255,255,0.7);
    padding: 6px;
    border-radius: 8px;
    backdrop-filter: blur(6px);
}

.v-theme--dark .map-zoom-controls {
    background: rgba(30,30,30,0.7);
}

.room-polygon {
    cursor: pointer;
    transition: filter 0.12s ease, stroke-width 0.12s ease;
}

.room-polygon.hovered {
    filter: brightness(1.08) drop-shadow(0 0 4px rgba(0,0,0,0.35));
    stroke-width: 3;
}

.room-label {
    cursor: grab;
}

.room-label:active {
    cursor: grabbing;
}

.cursor-grab { cursor: grab; }
.cursor-draw { cursor: crosshair !important; }
.cursor-paste { cursor: copy !important; }

.legend {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
}

.legend-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.legend-swatch {
    width: 22px;
    height: 14px;
    border-radius: 3px;
    border: 1px solid #888;
    display: inline-block;
}

.legend-swatch.available {
    background: repeating-linear-gradient(45deg, #ffffff, #ffffff 3px, #2e7d32 3px, #2e7d32 6px);
    border-color: #2e7d32;
}

.legend-swatch.busy {
    background: repeating-linear-gradient(45deg, #ffebee, #ffebee 3px, #c62828 3px, #c62828 6px);
    border-color: #c62828;
}

.legend-swatch.unknown {
    background: #bdbdbd;
    border-color: #757575;
}

.v-theme--dark .legend-swatch.available {
    background: repeating-linear-gradient(45deg, #1b1b1b, #1b1b1b 3px, #66bb6a 3px, #66bb6a 6px);
    border-color: #66bb6a;
}

.v-theme--dark .legend-swatch.busy {
    background: repeating-linear-gradient(45deg, #2a1010, #2a1010 3px, #ef5350 3px, #ef5350 6px);
    border-color: #ef5350;
}

.drawer-content {
    padding: 12px 16px 24px 16px;
}

.drawer-section-title {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(0, 0, 0, 0.6);
    margin: 4px 0 8px;
}

.v-theme--dark .drawer-section-title {
    color: rgba(255, 255, 255, 0.7);
}

.drawer-row {
    margin-bottom: 12px;
}

.drawer-row:last-child {
    margin-bottom: 0;
}

@keyframes attention-shake {
    0%   { transform: translateX(0); }
    15%  { transform: translateX(-6px); }
    30%  { transform: translateX(6px); }
    45%  { transform: translateX(-4px); }
    60%  { transform: translateX(4px); }
    75%  { transform: translateX(-2px); }
    100% { transform: translateX(0); }
}

.attention-shake {
    animation: attention-shake 0.55s ease-in-out;
}

.attention-shake .v-field {
    box-shadow: 0 0 0 3px rgba(255, 152, 0, 0.55);
    border-radius: 6px;
    transition: box-shadow 0.2s ease;
}

.drawer-footer {
    font-size: 0.78rem;
    color: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
}

.v-theme--dark .drawer-footer {
    color: rgba(255, 255, 255, 0.6);
}

.confirm-row {
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.confirm-row strong {
    display: inline-block;
    min-width: 90px;
    vertical-align: top;
}

.confirm-body {
    white-space: pre-wrap;
    margin-top: 4px;
    padding: 8px 10px;
    background: rgba(0, 0, 0, 0.04);
    border-radius: 6px;
    font-size: 0.9rem;
}

.v-theme--dark .confirm-body {
    background: rgba(255, 255, 255, 0.06);
}

@media (max-width: 600px) {
    .map-zoom-controls {
        top: 8px;
        right: 8px;
    }
}
