/* Shared touch ergonomics across all three display themes. */
:root{--touch-target:48px}
html{scroll-padding-top:24px}
body{font-size:16px;line-height:1.5}
body[data-theme="terminal-light"]{--ui-muted:#526a70}
body[data-theme="terminal-dark"]{--ui-muted:#b2c7c7}
body[data-theme] :is(.page-heading p,.card-header p,.stat-foot,.row-info small,.row-right small,.data-table .sub,.detail-tile small,.visit-facts small,.order-item small,.ticket-head small,.queue-copy small,.seat-panel-guide,.seat-panel-head p,.appearance-option-copy small){color:var(--ui-muted,var(--muted))}
body[data-theme] :is(.check-line,.outreach-form label,.setup-canvas-footer,.seat-panel-server){font-size:15px;line-height:1.5}
body[data-theme] :is(button:not(.table-node),.nav-item,.choice,.outreach-consent){min-height:var(--touch-target);touch-action:manipulation}
body[data-theme] :is(.btn,.btn.small,.floor-tool,.seat-confirm){font-size:15px;padding:12px 16px;line-height:1.35}
body[data-theme] :is(.close,.icon-button,.sidebar-toggle,.seat-panel-head button,.floor-zoom button){min-width:48px;min-height:48px;flex-shrink:0}
body[data-theme] :is(.text-action,.pill-tab,.floor-area-tabs button,.demo-banner button,.seat-success button){font-size:14px;padding:10px 14px;line-height:1.4}
body[data-theme] :is(input:not([type=checkbox]):not([type=radio]),select,textarea){min-height:50px;font-size:16px;line-height:1.5;padding:12px;width:100%;max-width:100%}
body[data-theme] :is(input[type=checkbox],input[type=radio]){width:22px;height:22px;min-height:22px;flex:none;accent-color:var(--ui-accent,var(--green))}
body[data-theme] :is(.choice,.outreach-consent){padding:10px 12px;gap:10px;font-size:14px;cursor:pointer}
body[data-theme] :is(.page-heading p,.card-header p,.stat-top,.stat-foot,.row-info small,.row-right small,.data-table .sub,.guest-card p,.menu-card small,.ticket-head small,.ticket-line small,.order-item small,.drawer-section p,.visit-next p,.detail-tile small,.visit-facts small,.field label,.setup-form label,.setup-tip,.setup-panel-head p,.appearance-option-copy small,.appearance-note p,.outreach-hint,.outreach-body p,.seat-panel-guide,.seat-panel-head p,.host-toolbar span,.arrival-main p,.arrival-time small,.arrival-title span,.host-note,.arrival-tile small,.setup-status p,.empty,.alert){font-size:14px;line-height:1.55}
body[data-theme] :is(.row-info strong,.row-right strong,.order-item strong,.order-item-price,.data-table td,.detail-tile strong,.visit-facts strong,.ticket-line b,.queue-copy strong,.arrival-tile strong,.arrival-tile span){font-size:16px;line-height:1.4}
body[data-theme] :is(.badge,.service-state,.arrival-state,.order-status,.seat-advice,.queue-copy small,.legend-item,.legend-note,.danger-text,.service-summary span,.host-stats span,.seat-panel-note,.setup-size-note){font-size:13px;line-height:1.4}
body[data-theme] :is(.eyebrow,.seat-panel-kicker,.nav-caption){font-size:12px;letter-spacing:1.5px}
body[data-theme] :is(.card-header h2,.section-title,.drawer-section h3,.host-toolbar strong){font-size:20px}
body[data-theme] :is(.guest-card strong,.menu-card strong,.ticket-head strong,.arrival-title h2){font-size:18px}
body[data-theme] :is(.row-info strong,.row-info small,.queue-copy strong,.order-item small,.outreach-row small){white-space:normal;overflow-wrap:anywhere}
body[data-theme] :is(.heading-actions,.inline-actions,.modal-actions,.arrival-actions,.setup-actions,.ticket-actions){gap:12px;flex-wrap:wrap}
body[data-theme] :is(.list-row,.service-queue-row){min-height:80px;gap:14px;padding-top:16px;padding-bottom:16px}
body[data-theme] .list-row[data-visit]{width:100%;text-align:left;color:inherit;background:transparent;border-left:0;border-right:0;border-bottom:0;border-radius:8px}
body[data-theme] .list-row[data-visit]:active{background:var(--ui-panel-alt,#dce5d3)}
body[data-theme] :is(.row-icon,.queue-table){min-width:44px;min-height:44px;font-size:17px}
body[data-theme] .search{width:min(360px,100%);min-width:0}
body[data-theme] .page-heading{align-items:flex-start;margin-bottom:28px}
body[data-theme] .heading-actions{justify-content:flex-end}
body[data-theme] .card-header{flex-wrap:wrap;padding:20px 22px;gap:14px}
body[data-theme] .stat-card{padding:20px;min-height:130px}
body[data-theme] .stat-number{font-size:32px}
body[data-theme] :is(.guest-card,.menu-card,.ticket){padding:20px}
body[data-theme] :is(.guest-grid,.menu-grid,.kitchen-grid,.split-card,.grid-main,.outreach-grid){gap:20px}
body[data-theme] .ticket-line{flex-wrap:wrap;gap:14px}
body[data-theme] .ticket-actions{margin-left:auto}
body[data-theme] .data-table th{font-size:13px}
body[data-theme] .data-table td{padding:18px}
body[data-theme] .service-summary,body[data-theme] .host-stats{flex-wrap:wrap;gap:12px}
body[data-theme] :is(.service-summary>div,.host-stats>div){padding:14px 16px;flex:1;min-width:120px}
body[data-theme] :is(.service-summary strong,.host-stats strong){font-size:26px}
body[data-theme] .outreach-recipients{max-height:180px}
body[data-theme] .drawer{width:min(600px,100vw)}
body[data-theme] .drawer-head{padding:22px 24px;gap:16px}
body[data-theme] .drawer-head h2{overflow-wrap:anywhere}
body[data-theme] .drawer-body{padding:24px;scroll-padding-block:20px}
body[data-theme] .drawer-footer{padding:16px 24px max(16px,env(safe-area-inset-bottom));gap:12px;flex-wrap:wrap}
body[data-theme] .drawer-footer .btn{min-height:54px}
body[data-theme] .modal{width:min(560px,100%);max-height:calc(100dvh - 32px);padding:24px;scroll-padding-block:20px}
body[data-theme] .modal.wide{width:min(720px,100%)}
body[data-theme] .modal-head{gap:14px}
body[data-theme] .form-grid{gap:16px}
body[data-theme] .modal-actions{position:sticky;bottom:-24px;background:var(--ui-panel,var(--card));border-top:1px solid var(--ui-line,var(--line));padding:16px 0;margin-top:20px;z-index:2}
body[data-theme] .modal-actions .btn{flex:1}
body[data-theme] :is(.sidebar nav,.drawer-body,.modal,.arrival-strip,.floor-area-tabs,.pill-tabs,.outreach-recipients){-webkit-overflow-scrolling:touch;overscroll-behavior:contain}
body[data-theme] :is(.arrival-strip,.floor-area-tabs,.pill-tabs){overflow-x:auto;max-width:100%;scroll-snap-type:x proximity;scroll-padding-inline:12px}
body[data-theme] :is(.arrival-tile,.pill-tab,.floor-area-tabs button){flex-shrink:0;scroll-snap-align:start}
body[data-theme] .arrival-tile{min-width:200px;padding:18px}
body[data-theme] :is(button,a,input,select,textarea,[tabindex]):focus-visible{outline:3px solid var(--ui-accent,#267b52);outline-offset:3px}
body[data-theme] :is(button,a){-webkit-tap-highlight-color:transparent}
body[data-theme] button:active:not(:disabled){filter:brightness(.94)}
body[data-theme] .sidebar{width:260px;padding:24px 16px 16px;z-index:10}
body[data-theme] .brand{margin-bottom:24px}
body[data-theme] .nav-item{font-size:15px;padding:12px 14px;margin:4px 0;gap:12px}
body[data-theme] .nav-icon{font-size:22px}
body[data-theme] .workspace{margin-bottom:20px}
body[data-theme] :is(.workspace strong,.staff strong,.live-indicator){font-size:14px}
body[data-theme] :is(.workspace span,.staff small,.live-indicator small){font-size:12px}
body[data-theme] .sidebar-toggle{top:20px;right:-24px}
body[data-theme].sidebar-collapsed .sidebar{width:88px}
body[data-theme].sidebar-collapsed .nav-item{min-height:52px}
body[data-theme].sidebar-collapsed .live-indicator{font-size:0}
body[data-theme] .live-indicator>span{flex-shrink:0}
.mobile-nav-toggle{display:none}
.floor-touch-list{display:none}
body[data-theme] .floor-toolbar{gap:12px;flex-wrap:wrap;align-items:center}
body[data-theme] .floor-area-tabs{max-width:45%;gap:6px}
body[data-theme] .floor-title h1{font-size:22px}
body[data-theme] .floor-seat-button span{display:inline}
body[data-theme] .floor-seat-button{background:var(--ui-accent,#1d694e);color:var(--ui-accent-ink,#fff);border-color:var(--ui-accent,#1d694e)}
body[data-theme] .floor-world .table-surface strong{font-size:24px}
body[data-theme] .floor-world .table-surface small{font-size:14px}
body[data-theme] .floor-world .table-caption{font-size:18px;max-width:170px;bottom:-8px}
body[data-theme] .floor-world .table-status-tag{font-size:15px;max-width:160px;top:-15px}
body[data-theme] .floor-zoom{gap:6px}
body[data-theme] .floor-zoom span{font-size:14px;min-width:48px}
body[data-theme] .floor-hint{font-size:13px;max-width:calc(100% - 300px);line-height:1.5}
body[data-theme] .seat-panel{top:114px;max-height:calc(100% - 200px);overflow:auto;width:340px;padding:20px}
body[data-theme] .seat-panel-head h2{font-size:24px;overflow-wrap:anywhere}
body[data-theme] .seat-panel-server{font-size:14px}
body[data-theme] .seat-panel-selection strong{font-size:16px}
body[data-theme] .seat-panel-selection small{font-size:14px}
body[data-theme] .room.layout-editing :is(.table-node,.fixture-node.editable){touch-action:none;user-select:none}
body[data-theme] .layout-dragging{z-index:7;filter:drop-shadow(0 6px 8px #19332d55)}
@media(max-width:1200px){
  body[data-theme] .guest-grid,body[data-theme] .menu-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  body[data-theme] .page-heading{flex-direction:column}
  body[data-theme] .heading-actions{justify-content:flex-start}
  body[data-theme] .service-layout{grid-template-columns:1fr}
}
@media(max-width:900px){
  body[data-theme] .floor-title{display:none}
  body[data-theme] .floor-area-tabs{max-width:100%;order:2;width:100%}
  body[data-theme] .floor-toolbar-actions{width:100%;justify-content:flex-end}
  body[data-theme] .floor-hint{display:block;bottom:84px;left:12px;max-width:calc(100% - 24px);font-size:12px}
  body[data-theme] .floor-stage:has(.seat-panel) .floor-hint{display:none}
  body[data-theme] .seat-panel{top:auto;bottom:84px;left:12px;max-height:45%;width:calc(100% - 24px)}
  body[data-theme] .seat-panel-guide{margin:8px 0}
  body[data-theme] .seat-panel-server{margin:10px 0}
}
@media(max-width:700px){
  html{scroll-padding-top:135px}
  body[data-theme] .sidebar,body[data-theme].sidebar-collapsed .sidebar{position:sticky;top:0;z-index:15;width:100%;height:auto;padding:10px 12px 8px;padding-top:max(10px,env(safe-area-inset-top));transition:none;box-shadow:0 3px 16px #11211c22}
  body[data-theme] .sidebar .brand,body[data-theme].sidebar-collapsed .sidebar .brand{margin:0 100px 10px 0;min-height:44px;justify-content:flex-start}
  body[data-theme].sidebar-collapsed :is(.brand-wordmark,.nav-label){display:block}
  body[data-theme] .sidebar-toggle{display:none}
  body[data-theme] .mobile-nav-toggle{position:absolute;top:10px;right:12px;display:flex;align-items:center;gap:8px;padding:10px 14px;border:1px solid #668275;border-radius:10px;background:#284e3c;color:#eef8f0;font-weight:700;font-size:15px}
  body[data-theme] .sidebar nav,body[data-theme].sidebar-collapsed .sidebar nav{display:flex;flex:none;gap:8px;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x proximity;margin:0;padding:0 2px 2px}
  body[data-theme] .nav-item,body[data-theme].sidebar-collapsed .nav-item{width:auto;min-height:48px;flex:none;padding:10px 14px;margin:0;gap:8px;scroll-snap-align:center;justify-content:flex-start;white-space:nowrap}
  body[data-theme].sidebar-collapsed .nav-count{position:static;margin:0 0 0 6px;padding:2px 7px;font-size:11px}
  body[data-theme].mobile-nav-open .sidebar nav{position:absolute;top:100%;left:0;right:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));max-height:60dvh;overflow-y:auto;padding:12px;background:var(--ui-sidebar,#12211c);border-top:1px solid #668275;box-shadow:0 12px 24px #11211c44}
  body[data-theme].mobile-nav-open .nav-item{white-space:normal}
  body[data-theme] .topbar{padding:0 16px;height:60px}
  body[data-theme] .breadcrumbs{font-size:14px}
  body[data-theme] .top-actions{gap:10px}
  body[data-theme] :is(.top-divider,.top-avatar){display:none}
  body[data-theme] main{padding:24px 16px 40px; padding-bottom:max(40px,env(safe-area-inset-bottom))}
  body[data-theme] .page-heading h1{font-size:30px;line-height:1.15}
  body[data-theme] .heading-actions{width:100%;display:grid;grid-template-columns:repeat(auto-fit,minmax(145px,1fr));gap:12px}
  body[data-theme] .heading-actions .btn{width:100%}
  body[data-theme] .stats{gap:12px}
  body[data-theme] .floor-card.compact :is(.room,.floor-legend){display:none}
  body[data-theme] .floor-touch-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:16px}
  body[data-theme] .touch-table{min-width:0;display:flex;flex-direction:column;align-items:flex-start;text-align:left;gap:8px;padding:16px;border:1px solid var(--ui-line,var(--line));border-radius:12px;background:var(--ui-panel-alt,#dce5d3);color:var(--ui-ink,var(--ink));overflow-wrap:anywhere}
  body[data-theme] .touch-table strong{font-size:17px}
  body[data-theme] .touch-table>span:not(.badge):not(.service-state){font-size:14px}
  body[data-theme] .touch-table .service-state{white-space:normal}
  body[data-theme] .floor-touch-open{grid-column:1/-1}
  body[data-theme] .stat-card{padding:16px;min-height:130px}
  body[data-theme] .stat-top{align-items:flex-start;gap:6px}
  body[data-theme] :is(.guest-grid,.menu-grid,.kitchen-grid,.appearance-grid,.form-grid){grid-template-columns:1fr}
  body[data-theme] .content-toolbar{align-items:stretch;flex-direction:column}
  body[data-theme] .search{width:100%}
  body[data-theme] .card-header{padding:18px 16px}
  body[data-theme] .list{padding:0 16px 12px}
  body[data-theme] .list-row{flex-wrap:wrap}
  body[data-theme] .list-row .row-info{min-width:150px}
  body[data-theme] .list-row .row-right{margin-left:auto;display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:12px;max-width:100%}
  body[data-theme] .ticket{margin:0 12px 14px;padding:16px}
  body[data-theme] .ticket-head{flex-wrap:wrap}
  body[data-theme] :is(.service-summary>div,.host-stats>div){min-width:calc(50% - 12px);text-align:left;display:block}
  body[data-theme] :is(.service-summary strong,.host-stats strong){display:block}
  body[data-theme] .arrival-card{grid-template-columns:90px minmax(0,1fr);padding:16px;gap:14px}
  body[data-theme] .arrival-time strong{font-size:17px}
  body[data-theme] .arrival-actions{justify-content:stretch}
  body[data-theme] .arrival-actions .btn{flex:1}
  body[data-theme] .demo-scenarios{grid-template-columns:1fr}
  body[data-theme] .demo-scenarios button{min-height:0;padding:18px}
  body[data-theme] .demo-scenarios small{font-size:14px}
  body[data-theme] .demo-banner{font-size:13px;padding:12px 16px}
  body[data-theme] .demo-banner>div{gap:12px;flex-wrap:wrap}
  body[data-theme] .setup-intro>div:first-child{padding:24px}
  body[data-theme] .setup-panel{padding:20px}
  body[data-theme] .setup-status{flex-wrap:wrap;gap:12px}
  body[data-theme] .setup-revision{margin-left:0}
  body[data-theme] .drawer{width:100%}
  body[data-theme] .drawer-head,body[data-theme] .drawer-body{padding:18px}
  body[data-theme] .drawer-footer{padding-left:16px;padding-right:16px}
  body[data-theme] .drawer-footer .btn{flex-basis:140px}
  body[data-theme] .visit-facts{grid-template-columns:repeat(2,minmax(0,1fr))}
  body[data-theme] .modal-backdrop{padding:10px;align-items:end}
  body[data-theme] .modal{width:100%;max-height:calc(100dvh - 20px);padding:20px;border-radius:20px 20px 12px 12px;padding-bottom:max(20px,env(safe-area-inset-bottom))}
  body[data-theme] .modal-actions{bottom:-20px}
  body[data-theme] .floor-main{padding:0}
  body[data-theme] .floor-toolbar{top:12px;left:12px;right:12px;gap:8px}
  body[data-theme] .floor-zoom{right:12px;bottom:max(12px,env(safe-area-inset-bottom))}
  body[data-theme] .seat-success{top:132px;left:12px;flex-wrap:wrap}
  body[data-theme] #toastRoot{left:16px;right:16px;bottom:max(16px,env(safe-area-inset-bottom));pointer-events:none}
  body[data-theme] .toast{max-width:none;font-size:15px}
}
@media(prefers-reduced-motion:reduce){
  *,*::before,*::after{scroll-behavior:auto!important;animation:none!important;transition:none!important}
}
@media(hover:none){
  body[data-theme] :is(.table-node,.appearance-option):hover{transform:none}
  body[data-theme] .floor-card.compact .table-node:hover{transform:scale(.86)}
  @media(max-width:700px){body[data-theme] .floor-card.compact .table-node:hover{transform:scale(.64)}}
}
