/* Viewport sizing never changes SVG world coordinates. */
.shell .map-scale,.shell .map-scroll:not(.editing) .map-scale{min-width:0!important}
.shell .editing .floor-map{height:clamp(320px,calc(100dvh - 270px),1000px)}
.shell .map-scroll:not(.editing){max-height:none}
.shell .map-scroll:not(.editing) .floor-map{width:100%;height:clamp(300px,calc(100dvh - 290px),900px)}
.close-detail{display:none}
.seat-shape.is-overdue>.seat-visual{animation:none}
.seat-shape.needs-reminder>.seat-visual{animation:seat-alert-shake 1.6s ease-in-out infinite}
.editing .seat-shape.needs-reminder>.seat-visual{animation:none}
.seat-shape.is-overdue .seat-main{fill:#ffd8df;stroke:#bb2447;stroke-width:3}
.seat-shape.is-soon .seat-main{stroke:#d78310;stroke-width:3;stroke-dasharray:5 3}
.seat-shape.is-soon .seat-label{fill:#995b00}
.soon-dot{display:inline-block;width:9px;height:9px;border:2px dashed #d78310;border-radius:50%}
.shell button,.shell [role=button]{touch-action:manipulation}
.shell .floor-filters{flex-wrap:wrap}.shell .zone-tabs{min-width:0;flex-wrap:wrap}
.shell .editor-toolbar{flex-wrap:wrap}.shell .tool-group{flex-wrap:wrap}
.shell .shop-clock{background:none;border:0;box-shadow:none;backdrop-filter:none;min-width:0;padding:0}
.shell .shop-clock .clock-digits{font-variant-numeric:tabular-nums;letter-spacing:-1px}
@media(max-width:1366px){
 .shell.view-desk .topbar{display:none}
 .shell.view-desk .page{padding-top:12px}
 .shell.view-desk .page-heading{margin-bottom:12px;flex-wrap:nowrap}
 .shell.view-desk .page-heading .eyebrow,.shell.view-desk .page-heading p{display:none}
 .shell.view-desk .page-heading h1{font-size:22px}
 .shell.view-desk .heading-actions{width:auto;margin:0}
 .shell.view-desk .heading-actions [data-action=nav-editor]{display:none}
 .shell.view-desk .compact-stats{margin-bottom:12px}
 .shell.view-desk .stat-card{min-height:60px;padding:9px 12px}
 .shell.view-desk .stat-caption{display:none}
 .shell.view-desk .stat-value{font-size:24px;margin:2px 0 0}
 .shell.view-desk .workspace-grid{grid-template-columns:minmax(0,1fr)}
 .shell.view-desk .workspace-grid>.right-column{display:none}
 .shell.view-desk.detail-open .workspace-grid>.right-column{display:block;position:fixed;inset:0;z-index:90;background:#15152a35;overflow:auto;padding:16px;overscroll-behavior:contain}
 .shell.view-desk.detail-open #seat-detail{position:relative;margin-left:auto;width:min(380px,100%);min-height:calc(100dvh - 32px);padding:22px;background:var(--surface);box-shadow:0 10px 60px #0003}
 .shell.view-desk.detail-open #reminder-panel{display:none}
 .shell.view-desk .close-detail{display:flex;margin-left:auto;margin-bottom:6px;min-width:44px;min-height:44px}
 .shell.view-desk .map-bottom{flex-wrap:wrap;gap:8px}
 .shell.view-desk .map-scroll:not(.editing) .floor-map{height:clamp(260px,calc(100dvh - 270px),1000px)}
 .shell.view-editor .workspace-grid{grid-template-columns:minmax(0,1fr)}
 .shell.view-editor .right-column{display:grid;grid-template-columns:1fr}
 .shell.view-editor .editor-tip{display:none}
 .shell.view-editor .page-heading{margin-bottom:10px}
 .shell.view-editor .page-heading p,.shell.view-editor .eyebrow,.shell.view-editor .topbar{display:none}
 .shell.view-editor .editor-hint{margin:8px 0}
}
@media(pointer:coarse),(max-width:1024px){
 .shell .btn,.shell .duration,.shell .zone-tab,.shell .text-btn,.shell .icon-btn,.shell .map-controls button{min-height:44px;min-width:44px}
 .shell .btn,.shell .duration{font-size:14px}
 .shell input:not([type=checkbox]):not([type=color]),.shell select,.shell textarea{font-size:16px;min-height:44px}
 .shell .quick-seat-grid button{min-height:48px}
 .shell .modal{max-height:calc(100dvh - 32px);overflow:auto}
 .shell .modal-footer{position:sticky;bottom:0}
 .shell .map-controls{gap:6px}
 .shell .sidebar .nav-item{min-height:44px}
 .shell .package-shortcut-remove{min-width:32px;min-height:32px}
}
@media(max-width:550px){
 .shell .main,.shell.sidebar-collapsed .main{margin-left:0}
 .shell .sidebar,.shell.sidebar-collapsed .sidebar{width:100%;height:56px;position:relative;padding:0 8px}
 .shell .sidebar-toggle{display:none}
 .shell .sidebar nav{gap:1px}.shell .sidebar .nav-item{width:44px}
 .shell .brand{margin:0}.shell .page{padding:10px 10px 0}
 .shell.view-desk .page-heading{gap:8px;flex-wrap:wrap}
 .shell.view-desk .page-heading h1{font-size:18px}
 .shell.view-desk .shop-clock{flex:1;max-width:none;margin:0}
 .shell.view-desk .shop-clock .clock-digits{font-size:24px}
 .shell.view-desk .heading-actions{width:100%;justify-content:flex-end}
 .shell.view-desk .stat-card{padding:8px 5px}
 .shell .panel-heading{gap:8px;padding:10px;flex-wrap:wrap}
 .shell .floor-filters{padding:8px}
 .shell.view-desk .map-scroll:not(.editing) .floor-map{height:clamp(260px,calc(100dvh - 350px),700px)}
 .shell.view-desk.detail-open .workspace-grid>.right-column{padding:8px}
 .shell.view-desk.detail-open #seat-detail{width:100%;min-height:calc(100dvh - 16px);padding:16px}
 .shell .legend{flex-wrap:wrap}
}
@media(prefers-reduced-motion:reduce){.seat-shape.needs-reminder>.seat-visual{animation:none}}
.shell .device-mode{font-size:11px;color:var(--muted);font-weight:400}
.shell .panel-title{flex-wrap:wrap}
.shell .search-box{height:auto;min-height:44px}
.shell .map-scroll{position:relative}
.shell .map-scroll:not(.editing){height:var(--map-viewport-height,60dvh);overflow:auto}
.shell.view-desk .map-scroll:not(.editing) .floor-map,.shell.view-editor .editing .floor-map{height:calc(var(--map-viewport-height,60dvh) * var(--map-zoom,1))}
.shell .map-scroll .map-controls{position:sticky;bottom:8px;left:calc(100% - 210px);right:auto;margin:-52px 8px 8px auto;max-width:210px;background:var(--surface)}
.shell .editing{height:var(--map-viewport-height,60dvh)}

/* The drawing studio owns the tablet landscape viewport. Other views keep their layout. */
@media (pointer:coarse) and (orientation:landscape) and (min-width:700px) and (min-height:560px){
 .shell.view-pattern .topbar{display:none}
 .shell.view-pattern .page{padding:6px 8px 0;max-width:none}
 .shell.view-pattern .pattern-slot{min-height:0}
}
