/* The Aetheros — floor plan (shared by POS tables screen and the waiter app) */
.floor { position: relative; min-height: 520px; height: calc(100vh - 250px); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; transition: background-color .3s; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03), inset 0 10px 30px rgba(0, 0, 0, 0.35); }
.floor.editing { outline: 2px dashed var(--brand); outline-offset: -6px; cursor: grab; }
.floor.editing .ft, .floor.editing .fi { touch-action: none; }

/* floor styles (per area) */
.floor.th-dots, .floor-land.th-dots { background-color: #111111; background-image: radial-gradient(#262626 1px, transparent 1px); background-size: 22px 22px; }
.floor.th-wood, .floor-land.th-wood { background-color: #1a1a1a; background-image: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 26px), repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 180px), linear-gradient(90deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0) 50%, rgba(255, 255, 255, 0.02)); background-size: auto, auto, 360px 100%; }
.floor.th-tile, .floor-land.th-tile { background-color: #1c1c1c; background-image: linear-gradient(#2c2c2c 1px, transparent 1px), linear-gradient(90deg, #2c2c2c 1px, transparent 1px); background-size: 52px 52px; }
.floor.th-marble, .floor-land.th-marble { background-color: #1a1a1a; background-image: linear-gradient(118deg, transparent 38%, rgba(150, 140, 130, 0.13) 41%, transparent 44%), linear-gradient(64deg, transparent 58%, rgba(150, 140, 130, 0.1) 60%, transparent 63%), linear-gradient(#242424 1px, transparent 1px), linear-gradient(90deg, #242424 1px, transparent 1px); background-size: 420px 300px, 380px 260px, 120px 120px, 120px 120px; }
.floor.th-carpet, .floor-land.th-carpet { background-color: #181818; background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1.5px, transparent 1.5px), radial-gradient(rgba(255, 255, 255, 0.11) 1.5px, transparent 1.5px); background-size: 18px 18px; background-position: 0 0, 9px 9px; }
.floor.th-grass, .floor-land.th-grass { background-color: #141c14; background-image: radial-gradient(rgba(120, 190, 90, 0.16) 1px, transparent 1.5px), radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1.5px); background-size: 14px 14px, 23px 23px; }
.floor.th-concrete, .floor-land.th-concrete { background-color: #242424; background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px), radial-gradient(rgba(20, 20, 20, 0.5) 1px, transparent 1px); background-size: 9px 9px, 13px 13px; }
.floor.th-carpet .fi-label, .floor.th-carpet .fi-zone { color: #f5dcd0; }

/* tables */
.ft { position: absolute; transform: translate(-50%, -50%); cursor: pointer; user-select: none; --k: 1; z-index: 2; transition: left .35s ease, top .35s ease; }
.floor.editing .ft { transition: none; }
.ft.sz-s { --k: .8; } .ft.sz-l { --k: 1.3; }
.ft .ft-body { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; text-align: center; padding: 4px;
  background: linear-gradient(160deg, #141414 0%, #181818 100%); border: 2px solid #8fd1a8; color: var(--text);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset, 0 6px 14px rgba(0, 0, 0, 0.29), 0 1px 3px rgba(0, 0, 0, 0.26);
  transition: transform .15s ease, background .4s ease, border-color .4s ease, color .4s ease, box-shadow .2s ease; }
.ft:hover .ft-body { transform: translateY(-2px) scale(1.03); box-shadow: 0 10px 22px rgba(0, 0, 0, 0.4); }
.ft:active .ft-body { transform: scale(.98); }
.ft.sh-round .ft-body { width: calc(104px * var(--k) * var(--m, 1)); height: calc(104px * var(--k) * var(--m, 1)); border-radius: 50%; }
.ft.sh-square .ft-body { width: calc(112px * var(--k) * var(--m, 1)); height: calc(104px * var(--k) * var(--m, 1)); border-radius: 16px; }
.ft.sh-rect .ft-body { width: calc(176px * var(--k) * var(--m, 1)); height: calc(100px * var(--k) * var(--m, 1)); border-radius: 16px; }
.ft.sh-booth .ft-body { width: calc(176px * var(--k) * var(--m, 1)); height: calc(92px * var(--k) * var(--m, 1)); border-radius: 10px; }
.ft.rot.sh-rect .ft-body { width: calc(100px * var(--k) * var(--m, 1)); height: calc(176px * var(--k) * var(--m, 1)); }
.ft.rot.sh-booth .ft-body { width: calc(92px * var(--k) * var(--m, 1)); height: calc(176px * var(--k) * var(--m, 1)); }
.ft .chair { position: absolute; width: 20px; height: 16px; border-radius: 7px 7px 5px 5px; background: linear-gradient(180deg, #292929 0%, #333333 100%); box-shadow: 0 2px 3px rgba(0, 0, 0, 0.4), inset 0 -3px 0 rgba(0, 0, 0, 0.13); transform: translate(-50%, -50%) rotate(var(--r, 0deg)); z-index: 0; transition: background .4s; }
.ft .sofa { position: absolute; left: 4%; right: 4%; height: 16px; background: linear-gradient(180deg, #303030, #3a3a3a); border-radius: 8px; z-index: 0; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.33); transition: background .4s; }
.ft .sofa.s1 { top: -13px; } .ft .sofa.s2 { bottom: -13px; }
.ft.rot .sofa { left: auto; right: auto; top: 4%; bottom: 4%; width: 16px; height: auto; }
.ft.rot .sofa.s1 { left: -13px; } .ft.rot .sofa.s2 { right: -13px; }
.ft .tn { font-family: var(--font-brand); font-size: 20px; font-weight: 700; line-height: 1; }
.ft .t-amt { font-weight: 800; font-size: 14px; }
.ft .t-meta { font-size: 11px; opacity: .85; }
.ft .t-flag { font-size: 11px; font-weight: 800; background: rgba(255, 255, 255, 0.25); border-radius: 999px; padding: 1px 7px; }
.ft.st-busy .ft-body { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.ft.st-busy .chair, .ft.st-busy .sofa { background: linear-gradient(180deg, #d29a9c, #484848); }
.ft.st-ready .ft-body { background: linear-gradient(160deg, #2aa862, var(--ok)); border-color: var(--ok); color: #ffffff; }
.ft.st-ready .chair, .ft.st-ready .sofa { background: linear-gradient(180deg, #b2e0c4, #8ccaa5); }
.ft.st-bill .ft-body { background: linear-gradient(160deg, #e2c27a, var(--gold)); border-color: #b48f45; color: #2a1a00; }
.ft.st-bill .chair, .ft.st-bill .sofa { background: linear-gradient(180deg, #ecd9ae, #dcc187); }
.ft.st-res .ft-body { background: linear-gradient(160deg, #150d1f, #1a1a1a); border: 2px dashed #7b5ea7; color: #b19dd2; }
.ft.st-res .t-flag { background: #7b5ea7; color: #ffffff; }
.ft.sel .ft-body { box-shadow: 0 0 0 3px var(--gold), 0 6px 14px rgba(0, 0, 0, 0.29); }
.ft.pulse .ft-body { animation: ftPulse 1.6s ease-in-out infinite; }
@keyframes ftPulse { 50% { box-shadow: 0 0 0 8px rgba(0, 0, 0, 0.48), 0 6px 14px rgba(0, 0, 0, 0.29); } }
.ft.target .ft-body::after { content: ''; position: absolute; inset: -12px; border-radius: inherit; border: 3px solid var(--gold); animation: ftRing 1.3s ease-out infinite; pointer-events: none; }
.ft.sh-round.target .ft-body::after { border-radius: 50%; }
@keyframes ftRing { from { opacity: 1; transform: scale(.9); } to { opacity: 0; transform: scale(1.25); } }
/* a floor drawn to the owner's plan: its own proportions (tall / wide), the land shape, tables scaled to fit */
/* as wide as its proportions allow at the normal height, never wider than the screen (a wide floor gets lower, not stretched) */
.floor.shaped { width: min(100%, calc(max(520px, 100vh - 250px) * var(--fr, 1))); height: auto; min-height: 0; max-width: 100%; margin: 0 auto; }
/* Tables page: the floor keeps its normal height, so tables and drawing keep their size when the place is made
   wider ("Make the place bigger"); a floor wider than the screen slides sideways (< > buttons, scrollbar, swipe) */
.floor-scroll { overflow-x: auto; overflow-y: hidden; scroll-behavior: smooth; }
.floor-scroll .floor.shaped { height: max(520px, calc(100vh - 250px)); width: calc(max(520px, 100vh - 250px) * var(--fr, 1)); max-width: none; }
.floor.shaped .ft { --m: var(--fm, 1); }
.floor.shaped .ft .tn { font-size: calc(20px * max(var(--fm, 1), .85)); }
.floor.shaped .ft .t-meta { font-size: 10.5px; }
.floor.has-land { background-color: #1e1e1e; background-image: radial-gradient(rgba(120, 100, 90, 0.12) 1px, transparent 1px); background-size: 18px 18px; }
.floor-land { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
/* the owner's own plan picture as the floor: the picture shows the huts; a free table is just its name on top,
   a busy / ready / bill / reserved one is filled with its colour over the drawn hut */
.floor.has-image { background-color: #141414; background-size: 100% 100%; background-repeat: no-repeat; background-position: center; }
.ft .hut-svg { transform: rotate(var(--tilt, 0deg)); }
.floor.has-image .ft .tn { background: rgba(20, 20, 20, 0.92); color: #f2efea; border-radius: 999px; padding: 2px 7px; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.55); font-size: calc(17px * max(var(--fm, 1), .8)); }
.floor.has-image .ft.st-free .t-meta { display: none; }
.floor.has-image .ft.st-free.sh-hut, .floor.has-image .ft.st-free.sh-cabin { --hf: rgba(255, 255, 255, 0); --he: rgba(31, 138, 76, 0); }
.floor.has-image .ft.sh-hut .hut-table, .floor.has-image .ft.sh-cabin .hut-table { display: none; }
.floor.has-image .ft.st-free .hut-svg { filter: none; }
.floor.has-image .ft.st-busy { --hf: rgba(242, 239, 234, 0.78); }
.floor.has-image .ft.st-ready { --hf: rgba(35, 160, 90, 0.8); }
.floor.has-image .ft.st-bill { --hf: rgba(220, 183, 102, 0.85); }
.floor.has-image .ft.st-res { --hf: rgba(123, 94, 167, 0.35); }
.floor.has-image .ft:hover .hut-wall { stroke: var(--gold); }
/* small tables on the picture (front seating): the picture shows table + chairs */
.floor.has-image .ft.sz-xs { --k: .34; }
.floor.has-image .ft:not(.sh-hut):not(.sh-cabin) .chair, .floor.has-image .ft:not(.sh-hut):not(.sh-cabin) .sofa { display: none; }
.floor.has-image .ft.st-free:not(.sh-hut):not(.sh-cabin) .ft-body { background: none; border-color: transparent; box-shadow: none; }
.floor.has-image .ft:not(.sh-hut):not(.sh-cabin):not(.st-free) .ft-body { opacity: .9; }
.floor.has-image .ft.sz-xs .ft-body { overflow: visible; }
.floor.has-image .ft.sz-xs .tn { font-size: 12px; padding: 1px 5px; }
.floor.has-image .ft.sz-xs:not(.st-free) .tn { background: none; box-shadow: none; color: inherit; }
.floor.has-image .ft:not(.st-free) .tn { background: none; box-shadow: none; color: inherit; }
.floor.has-image .ft.sel .tn { box-shadow: 0 0 0 2px var(--gold); }
/* a floor drawn like the owner's plan drawing: blue hatched lawns, white roads and paths, thin dark lines */
.floor.drawn { background: #141414; background-image: none; }
.floor-drawing { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.floor-drawing .pd-plot { fill: #121212; stroke: #3b3b3b; stroke-width: 1.1; }
.floor-drawing .pd-lawn { fill: url(#pdHatch); stroke: #4a4a4a; stroke-width: 1; stroke-linejoin: round; }
.floor-drawing .pd-tiles { fill: url(#pdTiles); stroke: #4a4a4a; stroke-width: 1; }
.floor-drawing .pd-road { fill: #6f6a64; stroke: none; }
.floor-drawing .pd-walk-edge { fill: none; stroke: #6d655c; stroke-linecap: butt; stroke-linejoin: round; }
.floor-drawing .pd-walk { fill: none; stroke: #242424; stroke-linecap: butt; stroke-linejoin: round; }
.floor-drawing .pd-box { fill: #1b1b1b; stroke: #4a4a4a; stroke-width: 1; }
.floor-drawing .pd-line { fill: none; stroke: #4a4a4a; stroke-width: 1; }
.floor-drawing .pd-text { fill: #f2efea; font-family: Arial, Helvetica, sans-serif; font-weight: 700; text-anchor: middle; dominant-baseline: middle; letter-spacing: .02em; }
.hut-wall2, .hut-in { display: none; }
.floor.drawn .ft.sh-hut, .floor.drawn .ft.sh-cabin { --hf: #141414; --he: #484848; }
.floor.drawn .hut-svg { filter: none; }
.floor.drawn .hut-wall { stroke-width: 1.6; }
.floor.drawn .hut-wall2, .floor.drawn .hut-in { display: inline; fill: none; stroke: var(--he); stroke-width: 1.3; vector-effect: non-scaling-stroke; }
.floor.drawn .hut-table { display: none; }
.floor.drawn .ft.st-busy { --hf: rgba(242, 239, 234, 0.88); --he: #f2efea; }
.floor.drawn .ft.st-ready { --hf: rgba(35, 160, 90, 0.88); --he: #16703d; }
.floor.drawn .ft.st-bill { --hf: rgba(220, 183, 102, 0.92); --he: #9c7a34; }
.floor.drawn .ft.st-res { --hf: #1a1a1a; --he: #7b5ea7; }
.floor.drawn .ft:not(.st-free) .hut-wall2, .floor.drawn .ft:not(.st-free) .hut-in { stroke: rgba(20, 20, 20, 0.55); }
.floor.drawn .ft.st-res .hut-wall2, .floor.drawn .ft.st-res .hut-in { stroke: #b9a6d8; }
.floor.drawn .ft .tn { font-family: var(--font); font-size: calc(13px * max(var(--fm, 1), .85)); font-weight: 800; color: #f2efea; background: rgba(20, 20, 20, 0.9); border-radius: 999px; padding: 0 6px; line-height: 1.35; }
.floor.drawn .ft:not(.st-free):not(.st-res) .tn { background: none; color: #ffffff; }
.floor.drawn .ft.st-free .t-meta { display: none; }
.floor.drawn .ft:hover .hut-wall { stroke: var(--gold); }
.floor.drawn .ft.sel .hut-wall { stroke: var(--gold); stroke-width: 4; }
/* small tables (front seating): table + a chair each side, drawn as on the plan */
.floor.drawn .ft.sz-xs { --k: .3; }
.floor.drawn .ft:not(.sh-hut):not(.sh-cabin) .ft-body { background: #141414; border: 1.3px solid #8f8f8f; border-radius: 2px; box-shadow: none; overflow: visible; }
.floor.drawn .ft:not(.sh-hut):not(.sh-cabin) .chair { width: 10px; height: 12px; border-radius: 1px; background: #141414; border: 1.3px solid #8f8f8f; box-shadow: none; }
/* a round table stays round (and its chairs too) on the plan-drawing floor */
.floor.drawn .ft.sh-round:not(.sh-hut):not(.sh-cabin) .ft-body { border-radius: 50%; }
.floor.drawn .ft.sh-round:not(.sh-hut):not(.sh-cabin) .chair { border-radius: 50% 50% 40% 40%; }
.floor.drawn .ft.sh-booth:not(.sh-hut):not(.sh-cabin) .ft-body { border-radius: 6px; }
.floor.drawn .ft.st-busy:not(.sh-hut):not(.sh-cabin) .ft-body { background: var(--brand); border-color: var(--brand); }
.floor.drawn .ft.st-ready:not(.sh-hut):not(.sh-cabin) .ft-body { background: var(--ok); border-color: var(--ok); }
.floor.drawn .ft.st-bill:not(.sh-hut):not(.sh-cabin) .ft-body { background: var(--gold); border-color: #9c7a34; }
.floor.drawn .ft.sz-xs .tn { font-size: 11px; padding: 0 4px; }
.floor.drawn .ft.sz-xs .t-meta, .floor.drawn .ft.sz-xs .t-amt, .floor.drawn .ft.sz-xs .t-flag { display: none; }
/* plan-drawing pieces (land, grass, road, paving, boxes, curved paths): each one its own item with its own outline */
.floor.th-white { background: #141414; }
.fi.fi-shape { z-index: 0; border-radius: 0; background: none; box-shadow: none; pointer-events: none; color: transparent; }
.fi-shape .fi-fill { position: absolute; inset: 0; pointer-events: none; }
.fi-shape .fi-edge { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.fi-shape .fi-edge polygon { fill: rgba(242, 239, 234, 0); stroke: #4a4a4a; stroke-width: 1.1; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.fi-plot .fi-fill { background: #141414; }
.fi-lawn .fi-fill { background: repeating-linear-gradient(45deg, #a4cee2 0 1.3px, #162024 1.3px 6.5px); }
.fi-road .fi-fill { background: #313131; }
.fi-road .fi-edge polygon { stroke: none; }
.fi-tiles .fi-fill { background: repeating-linear-gradient(90deg, #323232 0 .8px, #1e1e1e .8px 4px); }
.fi-box .fi-fill { background: #141414; }
.fi-path.fi-shape .pe { fill: none; stroke: #6d655c; vector-effect: non-scaling-stroke; stroke-linecap: butt; stroke-linejoin: round; }
.fi-path.fi-shape .pf { fill: none; stroke: #242424; vector-effect: non-scaling-stroke; stroke-linecap: butt; stroke-linejoin: round; }
.fi-sign { z-index: 1; color: #f2efea; font: 700 calc(var(--fh, 600px) * .0175) Arial, Helvetica, sans-serif; letter-spacing: .04em; pointer-events: none; }
.fi-sign .fi-in, .fi-sign .fi-lb { overflow: visible; text-overflow: clip; max-width: none; max-height: none; white-space: nowrap; }
/* Customize: grab a piece by its own outline (not its whole box); the selected one gets a gold frame */
.floor.editing .fi.fi-shape { outline: none; }
.floor.editing .fi-shape .fi-edge polygon { pointer-events: fill; cursor: move; }
.floor.editing .fi-shape .fi-edge .pe { pointer-events: stroke; cursor: move; }
.floor.editing .fi-shape .rs { pointer-events: auto; }
.floor.editing .fi:not(.sel) .rs { display: none; }
.floor.editing .fi.fi-shape.sel { outline: 2px dashed var(--gold) !important; outline-offset: 0; }
.floor.editing .fi-sign { pointer-events: auto; }
.floor.editing .fi-plot .fi-edge polygon { pointer-events: none; }
/* footpath: a small path from the road to a hut / table */
.fi-path { z-index: 0; border-radius: 999px; background: rgba(38, 33, 25, 0.96); box-shadow: inset 0 0 0 1.5px rgba(0, 0, 0, 0.77); color: transparent; }
.floor.editing .fi-path { color: #dec492; }
/* huts (octagon gazebo) and cabins (long octagon hut): walls drawn in SVG, the table inside, colour = state */
.ft.sz-xs { --k: .6; }
.ft.sz-xs .tn { font-size: 15px; } .ft.sz-xs .t-meta, .ft.sz-xs .t-flag { font-size: 10px; } .ft.sz-xs .t-meta { display: none; }
.floor .ft.sz-xs .tn { font-size: 15px; } .ft.sz-xs .chair { width: 16px; height: 13px; }
.ft.sh-hut, .ft.sh-cabin { --hf: #1f190d; --he: #6cbf8c; }
.ft.sh-hut .ft-body, .ft.sh-cabin .ft-body { background: none; border: 0; box-shadow: none; border-radius: 30%; }
.ft.sh-hut .ft-body { width: calc(104px * var(--k) * var(--m, 1)); height: calc(104px * var(--k) * var(--m, 1)); }
.ft.sh-cabin .ft-body { width: calc(172px * var(--k) * var(--m, 1)); height: calc(96px * var(--k) * var(--m, 1)); }
.ft.rot.sh-cabin .ft-body { width: calc(96px * var(--k) * var(--m, 1)); height: calc(172px * var(--k) * var(--m, 1)); }
.hut-svg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; overflow: visible; filter: drop-shadow(0 5px 7px rgba(0, 0, 0, 0.4)); }
.hut-wall { fill: var(--hf); stroke: var(--he); stroke-width: 3; vector-effect: non-scaling-stroke; stroke-linejoin: round; transition: fill .4s, stroke .4s; }
.hut-table { fill: rgba(255, 255, 255, 0.18); stroke: var(--he); stroke-opacity: .55; stroke-width: 1.5; stroke-dasharray: 4 3; vector-effect: non-scaling-stroke; }
.ft.st-busy.sh-hut, .ft.st-busy.sh-cabin { --hf: #f2efea; --he: #f2efea; }
.ft.st-ready.sh-hut, .ft.st-ready.sh-cabin { --hf: #23a05a; --he: #16703d; }
.ft.st-bill.sh-hut, .ft.st-bill.sh-cabin { --hf: #dcb766; --he: #9c7a34; }
.ft.st-res.sh-hut, .ft.st-res.sh-cabin { --hf: #181818; --he: #7b5ea7; }
.ft.st-busy .hut-table, .ft.st-ready .hut-table { stroke: #141414; }
.ft.sel.sh-hut .hut-wall, .ft.sel.sh-cabin .hut-wall { stroke: var(--gold); stroke-width: 5; }
.ft.pulse.sh-hut .ft-body, .ft.pulse.sh-cabin .ft-body { animation: none; }
.ft.pulse .hut-svg { animation: hutPulse 1.6s ease-in-out infinite; }
@keyframes hutPulse { 50% { filter: drop-shadow(0 0 9px rgba(0, 0, 0, 0.85)); } }
/* a table turned to any angle (huts turn only their outline, see .hut-svg) */
.ft.tilted:not(.sh-hut):not(.sh-cabin) { transform: translate(-50%, -50%) rotate(var(--tilt, 0deg)); }
/* Customize: the round handle above the selected table / piece — drag it to turn */
.rot-h { position: absolute; left: 50%; top: -14px; width: 20px; height: 20px; margin-left: -10px; border-radius: 50%; background: #141414; border: 2px solid var(--brand); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.55); cursor: grab; z-index: 5; pointer-events: auto; touch-action: none; }
.rot-h::before { content: ''; position: absolute; left: 50%; top: 100%; width: 2px; height: 6px; margin-left: -1px; background: var(--brand); }
.rot-h::after { content: '⟳'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 12px; line-height: 1; color: var(--brand); font-weight: 800; }
.ft .rot-h { top: -16px; }
.ft-edit { position: absolute; top: -10px; right: -10px; z-index: 2; background: #141414; border: 1px solid var(--border); border-radius: 50%; width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; font-size: 13px; cursor: pointer; box-shadow: var(--shadow); }

/* floor objects */
.fi { position: absolute; transform: translate(-50%, -50%); display: flex; align-items: center; justify-content: center; border-radius: 8px; font-size: 12px; font-weight: 700; color: #9a948d; z-index: 1; user-select: none; min-width: 6px; min-height: 6px; }
.fi-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 2px 5px; text-align: center; overflow: hidden; pointer-events: none; max-width: 100%; max-height: 100%; }
.fi.vert .fi-in { writing-mode: vertical-rl; }
.fi-ic { font-size: 20px; line-height: 1; writing-mode: horizontal-tb; }
.fi-lb { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.fi-wall { background: linear-gradient(180deg, #7a6863, #525252); border-radius: 3px; color: transparent; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.44); }
.fi-wall.vert { background: linear-gradient(90deg, #7a6863, #525252); }
.fi-window { background: repeating-linear-gradient(90deg, #1c2932 0 8px, #131d23 8px 12px); border: 1px solid #8fc3e6; border-radius: 2px; color: transparent; }
.fi-window.vert { background: repeating-linear-gradient(0deg, #1c2932 0 8px, #131d23 8px 12px); }
.fi-door { background: #221b0e; border: 2px dashed #b48f45; color: #dec492; }
.fi-counter { background: linear-gradient(160deg, #1a1a1a, #252525); border: 2px solid #b48f45; color: #e6c789; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.26); }
.fi-kitchen { background: linear-gradient(160deg, #191919, #212121); border: 2px solid #e3b9a5; color: #e0a68f; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.22); }
.fi-bar { background: linear-gradient(160deg, #151d17, #1b251f); border: 2px solid #9fd5b4; color: #91dfaf; }
.fi-washroom { background: #161a1f; border: 2px solid #2c3135; color: #a1b8ce; }
.fi-stairs { background: repeating-linear-gradient(0deg, #222222 0 6px, #141414 6px 11px); border: 2px solid #363636; }
/* service points: a coloured icon chip with the label */
.fi-ic { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 9px; background: rgba(20, 20, 20, 0.75); color: var(--c, currentColor); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18); flex-shrink: 0; }
.fi-ic .lzi { width: 18px; height: 18px; stroke-width: 1.9; }
.fi-door .fi-ic { width: 24px; height: 24px; } .fi-door .fi-ic .lzi { width: 15px; height: 15px; }
.fi-stairs .fi-ic { background: rgba(20, 20, 20, 0.9); }
/* plants & trees drawn from above, swaying a little */
.fi-plant, .fi-tree { border-radius: 50%; }
.fi-plant { background: radial-gradient(circle at 50% 50%, #7cc85e 0 30%, #4e9a3c 46%, #2f6e28 56%, #b07a4c 58%, #8a5530 72%, rgba(255, 255, 255, 0) 74%); filter: drop-shadow(0 3px 3px rgba(0, 0, 0, 0.48)); }
.fi-tree { background:
    radial-gradient(circle at 34% 30%, rgba(20, 20, 20, 0.35) 0 8%, transparent 9%),
    radial-gradient(circle at 30% 62%, #6fb94f 0 20%, transparent 21%),
    radial-gradient(circle at 68% 34%, #6fb94f 0 22%, transparent 23%),
    radial-gradient(circle at 66% 70%, #5aa63f 0 20%, transparent 21%),
    radial-gradient(circle at 50% 50%, #4b9436 0 52%, #2f6e28 66%, rgba(255, 255, 255, 0) 69%);
  filter: drop-shadow(0 6px 5px rgba(0, 0, 0, 0.55)); }
.fi-tree, .fi-plant { animation: sway 7s ease-in-out infinite; }
.fi-plant { animation-duration: 5.5s; }
@keyframes sway { 0%, 100% { transform: translate(-50%, -50%) rotate(0deg) scale(1); } 50% { transform: translate(-50%, -50%) rotate(4deg) scale(1.03); } }
.floor.editing .fi-tree, .floor.editing .fi-plant { animation: none; }
/* a new object pops in where it was dropped */
.fi.just-added { animation: fiPop .45s var(--ease, ease) both; }
@keyframes fiPop { 0% { transform: translate(-50%, -50%) scale(.3); opacity: 0; } 70% { transform: translate(-50%, -50%) scale(1.08); opacity: 1; } 100% { transform: translate(-50%, -50%) scale(1); } }
.fi-pillar { background: radial-gradient(circle at 35% 30%, #141414, #343434 70%); border-radius: 5px; box-shadow: 0 3px 6px rgba(0, 0, 0, 0.55); }
.fi-zone { background: rgba(242, 239, 234, 0.04); border: 2px dashed #2c2c2c; border-radius: 16px; align-items: flex-start; justify-content: flex-start; padding: 6px 10px; z-index: 0; color: #6f6a64; }
.fi-label { font-family: var(--font-brand); font-size: 15px; color: var(--brand); }
/* walkway: the path waiters walk on */
.fi-walkway { z-index: 0; border-radius: 6px; color: #dec492; background-color: rgba(44, 39, 31, 0.92);
  background-image: linear-gradient(90deg, transparent calc(50% - 1px), rgba(180, 143, 69, 0.55) calc(50% - 1px), rgba(180, 143, 69, 0.55) calc(50% + 1px), transparent calc(50% + 1px)), repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.06) 0 1px, transparent 1px 30px);
  background-size: 100% 2px, auto; background-position: center, 0 0; background-repeat: no-repeat, repeat;
  box-shadow: inset 0 2px 0 rgba(0, 0, 0, 0.77), inset 0 -2px 0 rgba(0, 0, 0, 0.77); }
.fi-walkway:not(.vert) { background-image: repeating-linear-gradient(90deg, rgba(180, 143, 69, 0.55) 0 14px, transparent 14px 26px), repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 30px); background-size: 100% 2px, auto; background-position: center, 0 0; }
.fi-walkway.vert { background-image: repeating-linear-gradient(0deg, rgba(180, 143, 69, 0.55) 0 14px, transparent 14px 26px), repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 30px); background-size: 2px 100%, auto; background-position: center, 0 0; box-shadow: inset 2px 0 0 rgba(0, 0, 0, 0.77), inset -2px 0 0 rgba(0, 0, 0, 0.77); }
.fi-walkway .fi-lb { background: rgba(20, 20, 20, 0.75); padding: 0 6px; border-radius: 6px; font-size: 11px; }
.floor.editing .fi { cursor: move; outline: 1px dashed rgba(255, 255, 255, 0.25); outline-offset: 2px; }
.fi.sel { outline: 2px solid var(--gold) !important; outline-offset: 3px; }
.fi .rs { position: absolute; right: -8px; bottom: -8px; width: 16px; height: 16px; background: #141414; border: 2px solid var(--brand); border-radius: 4px; cursor: nwse-resize; touch-action: none; }

/* routes (animated "way" from the kitchen / counter to a table) */
.route-layer { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; overflow: visible; }
.route-layer path { fill: none; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round; }
.route-layer .route-bg { stroke: rgba(20, 20, 20, 0.85); stroke-width: 9; }
.route-layer .route { stroke-width: 4; stroke-dasharray: 2 12; animation: routeMove .9s linear infinite; }
.route-layer .r-ready { stroke: var(--ok); }
.route-layer .r-bill { stroke: #b48f45; }
.route-layer .r-call { stroke: var(--brand); }
@keyframes routeMove { to { stroke-dashoffset: -14; } }
.route-legend { display: inline-flex; gap: 12px; font-size: 12px; color: var(--muted); align-items: center; }
.route-legend i { display: inline-block; width: 18px; height: 0; border-top: 3px dotted; vertical-align: middle; margin-right: 4px; }

/* phones: keep the real proportions of the floor plan and let it scroll sideways */
@media (max-width: 760px) {
  .floor-scroll { overflow-x: auto; margin: 0 -12px; padding: 0 12px 8px; -webkit-overflow-scrolling: touch; scroll-behavior: smooth; }
  .floor-scroll .floor { width: 880px; height: 600px; min-height: 0; }
  .floor .ft { --m: .85; }
  .ft .tn { font-size: 17px; }
  .floor-scroll .floor.shaped { width: auto; height: 680px; max-width: none; }
  .floor.shaped .ft .tn { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) { .route-layer .route, .ft.pulse .ft-body, .ft.target .ft-body::after, .fi-tree, .fi-plant, .fi.just-added { animation: none; } }
