/* Names carry the action; the clock remains readable without stealing height. */
@media(min-width:700px){
 body .rail{width:52px!important;min-width:52px!important}
 body .main-shell{margin-left:52px!important;width:calc(100% - 52px)!important}
 .rail>.brand{width:32px;height:32px;line-height:30px;font-size:25px;margin:14px 0 18px;border-radius:7px}
 .rail nav{gap:5px}
 .rail .nav-item{min-height:60px;gap:4px;padding:6px 2px;font-size:11px}
 .rail .nav-item svg{width:22px;height:22px}
 .rail .nav-item span{font-size:11px;white-space:nowrap}
}
.compact-console .console-clock{min-width:156px!important;max-width:none!important;gap:6px!important;padding:3px 8px!important;overflow:visible!important;grid-template-columns:34px minmax(94px,1fr)!important}
.compact-console .console-clock .clock-face{width:34px!important;height:34px!important;max-height:none!important}
.compact-console .console-clock-text{display:flex!important;flex-direction:column!important;justify-content:center!important;align-items:center!important;min-width:94px!important;gap:0!important;overflow:visible!important}
.compact-console .console-clock time{font-size:30px!important;line-height:1.02!important;font-variant-numeric:tabular-nums!important;letter-spacing:.01em!important;white-space:nowrap!important}
.compact-console .console-clock [data-clock-date]{font-size:13px!important;line-height:1.15!important;white-space:nowrap!important}
.floor-alert-chip .alert-who{font-size:20px!important;line-height:1.15!important;font-weight:850!important}
.floor-alert-chip .alert-table{font-size:12px!important}
.floor-alert-chip .alert-note,.floor-alert-chip .alert-card-bottom strong{font-size:12px!important;line-height:1.25!important}
.floor-alert-chip.seating,.floor-alert-chip.seat-check,.floor-alert-chip.unattended{background:#fff0d9!important;border-color:#db751d!important;color:#633007!important}
.floor-alert-chip.cast{background:#e6f3f1!important;border-color:#4f8e82!important;color:#163e37!important}
.floor-alert-chip.critical{border-color:#c43325!important}
.floor-alerts:not(.has-critical),.floor-alerts:not(.has-critical) .floor-alert-count,.floor-alerts .floor-alert-chip:not(.critical),.floor-alerts .floor-alert-all,.phone-nomination-wait:not(.critical){animation:none!important}
.floor-alerts:not(.has-critical){background:#fff8ec;border-color:#caac76;box-shadow:none}
.floor-alerts:not(.has-critical) .floor-alert-count{background:#f0dcba;color:#654615}
.floor-alerts .floor-alert-chip.critical{background:#93291f!important;color:#fff!important;border-color:#861d18!important;animation:attention-critical-card 1.6s ease-in-out infinite}
.helper-label{font-size:11px;font-weight:700;color:#285a50;position:absolute;left:4px;bottom:2px;max-width:48%;white-space:nowrap}
.drop-target-options,.nomination-cast-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(90px,1fr));gap:8px}
.drop-target-options button,.nomination-cast-grid button{min-height:48px;display:flex;flex-direction:column;gap:3px;justify-content:center}
.nomination-cast-grid small{font-size:11px;font-weight:400}
.plan-rounds-action{align-self:start;padding:8px 12px;font-size:14px;min-height:40px;background:#e7f3eb;color:#214f41;border-color:#87ad9b}
.store-setup-modal{max-width:920px!important;width:calc(100vw - 30px)!important}
.setup-progress{display:flex;gap:12px;justify-content:space-between;margin:4px 0 20px;padding:0 0 15px;border-bottom:1px solid #d7e4dc}
.setup-progress span{display:flex;align-items:center;gap:8px;font-size:15px;color:#6c7b74}
.setup-progress b{display:grid;place-items:center;width:32px;height:32px;border-radius:50%;background:#e5eae6;transition:background .3s,color .3s}
.setup-progress .reached{color:#265d49;font-weight:700}
.setup-progress .reached b{background:#296850;color:white}
.setup-step{animation:setup-enter .22s ease-out}
@keyframes setup-enter{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
.setup-floor-columns,.setup-cast-columns{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(180px,1fr);gap:20px;margin:12px 0}
.setup-map{height:260px;position:relative;background:#f1eee7 center/contain no-repeat;border:1px solid #cecabc;border-radius:12px;overflow:hidden;touch-action:none}
.setup-map button{position:absolute;transform:translate(-50%,-50%);background:#fff9e9;border:2px solid #bba776;color:#34473d;border-radius:9px;min-width:44px;min-height:44px;font-weight:700;touch-action:none}
.setup-map button[aria-pressed=true]{background:#327156;color:white;border-color:#327156}
.setup-image-label{display:flex;align-items:center;gap:12px;margin:10px 0;font-size:13px}
.setup-image-label input{max-width:210px}
.setup-cast-columns textarea{width:100%;font-size:18px;line-height:1.6;min-height:150px;resize:vertical}
.setup-shift-list{max-height:190px;overflow:auto;display:grid;gap:6px}
.setup-shift-list label{display:flex;align-items:center;justify-content:space-between;gap:12px}
.setup-shift-list input{width:120px;min-height:38px}
.setup-policy-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.setup-policy{display:grid;gap:10px;padding:20px;border:2px solid #d7e4dc;border-radius:12px;cursor:pointer}
.setup-policy:has(input:checked){border-color:#327156;background:#edf6ef}
.setup-policy strong{font-size:22px}.setup-policy span{font-size:14px}
.setup-round-bars{height:60px;display:flex;align-items:flex-end;gap:12px}.setup-round-bars i{display:block;flex:1;height:40px;background:#8cb2a2;border-radius:6px 6px 0 0}.setup-round-bars.bookends i{height:60px}.setup-round-bars.bookends i:nth-child(2){height:25px}
.setup-gap{margin:20px 0}.setup-step p{font-size:14px;line-height:1.65;color:#526158}
.operations-workspace .live-floor-map.photo-floor.custom-store-floor{display:block!important;position:relative;background-size:contain;background-repeat:no-repeat;background-position:center}
.custom-store-floor .custom-store-booth{position:absolute!important;transform:translate(-50%,-50%);width:17%!important;height:33%!important;grid-area:auto!important}
@media(max-width:900px){.compact-console .console-clock{min-width:144px!important;padding:2px 5px!important;grid-template-columns:28px minmax(90px,1fr)!important}.compact-console .console-clock .clock-face{width:28px!important;height:28px!important}.compact-console .console-clock time{font-size:28px!important}.floor-alert-chip .alert-who{font-size:18px!important}}
@media(max-width:600px){.setup-progress{gap:5px}.setup-progress span{font-size:12px;flex-direction:column;text-align:center}.setup-progress b{width:26px;height:26px}.setup-floor-columns,.setup-cast-columns,.setup-policy-grid{grid-template-columns:1fr}.setup-map{height:230px}.setup-policy strong{font-size:19px}.phone-toolbar time{font-size:28px!important;line-height:1.1!important;font-variant-numeric:tabular-nums}.phone-toolbar [data-clock-date]{font-size:13px!important}.store-setup-modal .modal-body{overflow:auto}}
@media(prefers-reduced-motion:reduce){.setup-step{animation:none}.floor-alert-chip.seat-check{animation:none}}

.custom-store-floor .custom-store-booth:has([data-id="VIP"]){width:20%!important;height:90%!important}

.custom-store-floor .live-aisle.roster-docked{position:absolute;left:0;top:50%;width:78%;transform:translateY(-50%)}
.floor-alert-chip:is(.seating,.seat-check,.unattended,.cast) .alert-card-bottom{color:inherit!important}

/* One guest/cast pair can use the full available sofa height. */
.custom-store-floor .room-scene.room-opposed .floor-seat-pair.full-sofa{height:90%!important;top:4%!important}


/* Use the spare sofa area before reducing labels on a narrow floor. */
@media(min-width:700px){
 .operations-workspace .live-floor-map.photo-floor{grid-template-rows:minmax(0,1fr) max-content minmax(0,1.3fr)!important}
 .operations-workspace:has(.floor-alerts:not([hidden])) .live-floor-map.photo-floor{grid-template-rows:minmax(0,1fr) max-content minmax(0,1.1fr)!important}
}
:is(#app,#modal) .room-scene:is(.room-banquette,.room-joined,.room-corner) .flow-horizontal .floor-seat-slot>.floor-cast.name-first{height:100%!important;margin-bottom:0!important;padding:1px!important;gap:1px!important}
.room-scene:is(.room-banquette,.room-joined) .floor-seat-pair.flow-horizontal:has(>.floor-seat-slot:first-child>.floor-customer):has(>.floor-seat-slot:last-child>.floor-cast){grid-template-columns:minmax(0,.55fr) minmax(0,1.45fr)!important}
.room-scene:is(.room-banquette,.room-joined) .floor-seat-pair.flow-horizontal:has(>.floor-seat-slot:first-child>.floor-cast):has(>.floor-seat-slot:last-child>.floor-customer){grid-template-columns:minmax(0,1.45fr) minmax(0,.55fr)!important}
:is(#app,#modal) .room-scene .flow-horizontal .floor-cast.name-first.fit-next-columns{display:grid!important;grid-template:"name next" minmax(0,1fr) "time time" max-content / minmax(0,1.24fr) minmax(0,.76fr)!important;gap:2px 0!important;align-items:center!important}
:is(#app,#modal) .room-scene .flow-horizontal .floor-cast.name-first.fit-next-columns .cast-name-large{grid-area:name;justify-self:center;align-self:center!important}
:is(#app,#modal) .room-scene .flow-horizontal .floor-cast.name-first.fit-next-columns .next-cast-label{grid-area:next;flex-direction:column!important;gap:1px!important;border-left:1px solid currentColor;padding-left:3px!important;align-self:center!important}
:is(#app,#modal) .room-scene .flow-horizontal .floor-cast.name-first.fit-next-columns .next-cast-label small{font-size:7px!important;line-height:1!important;font-weight:500}
:is(#app,#modal) .room-scene .flow-horizontal .floor-cast.name-first.fit-next-columns .next-cast-label b{font-weight:550!important}
:is(#app,#modal) .room-scene .flow-horizontal .floor-cast.name-first.fit-next-columns .cast-time-check{grid-area:time}
:is(#app,#modal) .room-scene:is(.room-banquette,.room-joined,.room-corner) .flow-horizontal .floor-cast.name-first .next-table-label{top:-14px!important}
:is(#app,#modal) .room-scene:is(.room-banquette,.room-joined,.room-corner) .flow-horizontal .floor-cast.name-first .name-seated-check{top:calc(-1 * var(--fit-check,18px) - 1px)!important}
:is(#app,#modal) .room-corner .flow-horizontal .floor-cast.name-first .cast-name-large{order:1}
:is(#app,#modal) .room-corner .flow-horizontal .floor-cast.name-first .next-cast-label{order:2}
:is(#app,#modal) .room-corner .flow-horizontal .floor-cast.name-first .cast-time-check{position:static!important;transform:none!important;order:3;width:100%!important;max-width:100%!important;padding:0!important;margin:0!important}
.room-corner .floor-seat-pair.flow-horizontal:has(>.floor-seat-slot:first-child>.floor-customer):has(>.floor-seat-slot:last-child>.floor-cast){grid-template-columns:minmax(0,.55fr) minmax(0,1.45fr)!important}
.room-corner .floor-seat-pair.flow-horizontal:has(>.floor-seat-slot:first-child>.floor-cast):has(>.floor-seat-slot:last-child>.floor-customer){grid-template-columns:minmax(0,1.45fr) minmax(0,.55fr)!important}
:is(#app,#modal) .room-scene .floor-cast.name-first.sofa-cast{grid-template:"name next" minmax(min-content,1fr) "time time" max-content / minmax(0,1.25fr) minmax(0,.75fr)!important;row-gap:4px!important;padding:1px!important;height:100%!important;align-content:stretch!important}
:is(#app,#modal) .room-scene .floor-cast.name-first.sofa-cast:not(:has(.next-cast-label)){grid-template:"name" minmax(min-content,1fr) "time" max-content / 1fr!important}
:is(#app,#modal) .room-scene .floor-cast.name-first.sofa-cast .cast-name-large{font-size:var(--fit-name)!important}
:is(#app,#modal) .room-scene .floor-cast.name-first.sofa-cast.fixed-name-columns{grid-template-columns:calc(var(--fit-name) * 2) minmax(0,1fr)!important;column-gap:1px!important}
:is(#app,#modal) .room-scene .floor-cast.name-first.sofa-cast.fixed-name-columns .cast-name-large{height:calc(var(--fit-name) * var(--fixed-name-rows,3))!important;width:calc(var(--fit-name) * 2)!important}

/* Small-floor contract: reserve readable label rows before allocating decoration. */
@media(min-width:700px){
 .operations-workspace .live-floor-map.photo-floor{grid-template-rows:minmax(0,1fr) max-content minmax(0,1.27fr)!important;gap:5px!important;padding:5px!important}
 .operations-workspace:has(.floor-alerts:not([hidden])) .live-floor-map.photo-floor{grid-template-rows:minmax(0,1fr) max-content minmax(0,1.27fr)!important}
 .operations-workspace .live-booth:has(.booth-seat-button)>.room-scene{height:calc(100% - 32px)!important}
 .operations-workspace .booth-seat-actions{height:30px!important;min-height:30px!important;margin-top:2px!important}
 .operations-workspace .booth-seat-button{min-height:30px!important;height:30px!important;padding:2px 8px!important;font-size:15px!important;border-width:1px!important;border-radius:5px!important;max-width:132px!important}
 .operations-workspace .booth-seat-button small{font-size:12px!important}
 .operations-workspace:has(.live-floor-map) .dispatch-panel.central-console.compact-console.roster-inside{padding:3px!important;gap:2px!important;min-height:0!important}
 .operations-workspace:has(.live-floor-map) .compact-console .console-controls,.operations-workspace:has(.live-floor-map) .compact-console .roster-tabs button{height:40px!important;min-height:40px!important}
 .operations-workspace:has(.live-floor-map) .compact-console .roster-tabs .console-arrival{font-size:18px!important}
 .compact-console .console-clock{height:40px!important;padding:1px 4px!important;min-width:0!important;grid-template-columns:26px minmax(0,1fr)!important}
 .compact-console .console-clock .clock-face{width:26px!important;height:26px!important}
 .compact-console .console-clock time{font-size:24px!important;line-height:25px!important}
 .compact-console .console-clock [data-clock-date]{font-size:11px!important;line-height:11px!important}
 .compact-console .cast-metrics{height:34px!important}
 .compact-console .cast-metrics .roster-metric{grid-template-rows:14px 20px!important}
 .compact-console .cast-metrics .metric-label,.compact-console .roster-label{font-size:12px!important;line-height:14px!important}
 .compact-console .cast-metrics .metric-value,.compact-console .arrival-metric{height:20px!important;grid-template-rows:20px!important;line-height:20px!important}
 .compact-console .cast-metrics .metric-value b,.compact-console .arrival-metric b{font-size:18px!important;line-height:20px!important}
 .operations-workspace:has(.live-floor-map) .compact-console .console-lower:has([data-cast-results=roster]),.operations-workspace:has(.live-floor-map) .compact-console .console-roster:has([data-cast-results=roster]){height:34px!important;min-height:34px!important;max-height:34px!important}
 .operations-workspace:has(.live-floor-map) .compact-console .cast-tile,.operations-workspace:has(.live-floor-map) .compact-console .cast-pick{height:32px!important;min-height:32px!important}
 .operations-workspace:has(.live-floor-map) .compact-console .cast-pick{padding:2px 9px!important;min-width:60px!important}
 .operations-workspace:has(.live-floor-map) .compact-console .cast-pick strong{font-size:18px!important;line-height:22px!important}
 .compact-console .roster-manage{height:32px!important;min-height:32px!important;padding:1px 5px!important;font-size:11px!important;line-height:13px!important}
 .operations-workspace .floor-status-bar:has(.floor-alerts:not([hidden])){height:40px!important;flex-basis:40px!important;padding-top:2px!important}
 .operations-workspace .floor-alerts{height:38px!important;padding:1px 3px!important;gap:4px!important;border-radius:6px!important}
 .operations-workspace .floor-alert-list{height:32px!important;gap:4px!important;align-items:center!important}
 .operations-workspace .floor-alert-count{height:32px!important;min-height:32px!important;min-width:0!important;flex:0 0 auto!important;padding:1px 5px!important;display:flex!important;flex-direction:row!important;align-items:center!important;gap:4px!important;white-space:nowrap!important}
 .operations-workspace .floor-alert-count>span{font-size:11px!important;line-height:18px!important}
 .operations-workspace .floor-alert-count>b{font-size:17px!important;line-height:20px!important}
 .operations-workspace .floor-alert-chip{height:32px!important;min-height:32px!important;min-width:0!important;width:max-content!important;flex:0 0 auto!important;padding:1px 6px!important;display:grid!important;grid-template:"who note action" 20px / max-content max-content max-content!important;align-content:center!important;align-items:center!important;gap:7px!important;white-space:nowrap!important}
 .operations-workspace .floor-alert-chip .alert-card-top{grid-area:who;min-height:0!important;height:20px!important;overflow:visible}
 .operations-workspace .floor-alert-chip .alert-note{grid-area:note;min-width:0!important;max-width:190px!important;overflow:hidden;text-overflow:ellipsis;white-space:nowrap!important}
 .operations-workspace .floor-alert-chip .alert-card-bottom{grid-area:action;min-height:0!important;height:20px!important;border-left:1px solid #ffffff55!important;padding-left:7px!important;white-space:nowrap!important}
 .operations-workspace .floor-alert-chip .alert-card-bottom i{display:none!important}
 .operations-workspace .floor-alert-chip .alert-card-top{display:flex!important;align-items:baseline!important;line-height:20px!important;gap:4px!important}
 .operations-workspace .floor-alert-chip .alert-table{font-size:12px!important;line-height:20px!important}
 .operations-workspace .floor-alert-chip .alert-who{font-size:16px!important;line-height:20px!important}
 .operations-workspace .floor-alert-chip .alert-note{font-size:12px!important;line-height:20px!important;margin-left:0!important}
 .operations-workspace .floor-alert-chip .alert-card-bottom{line-height:20px!important}
 .operations-workspace .floor-alert-chip .alert-card-bottom strong{font-size:12px!important;line-height:20px!important}
 .operations-workspace .alert-controls .floor-alert-all,.operations-workspace .alert-controls .alert-audio{height:32px!important;min-height:32px!important;padding:1px 7px!important;white-space:nowrap!important;font-size:12px!important}
}
@media(min-width:700px) and (max-width:1000px){.operations-workspace .live-floor-map.photo-floor{grid-template-columns:repeat(4,minmax(0,1fr)) minmax(145px,1.25fr)!important}}
#app .room-scene .floor-seat-slot>.floor-cast.name-first.board-label{display:grid!important;grid-template:"name" auto "next" auto "time" auto / minmax(0,1fr)!important;align-content:center!important;align-items:center!important;justify-items:center!important;gap:2px!important;padding:2px!important;height:100%!important;max-height:none!important;margin:0!important;overflow:visible!important;border-width:1px!important}
#app .room-scene .floor-seat-slot>.floor-cast.name-first.board-label .cast-name-large{grid-area:name!important;font-size:var(--fit-name)!important;line-height:1!important;letter-spacing:0!important;align-self:center!important;justify-self:center!important;margin:0!important;max-width:100%!important;height:auto!important;width:auto!important;writing-mode:horizontal-tb!important;white-space:nowrap!important}
#app .room-scene .floor-seat-slot>.floor-cast.name-first.board-label .next-cast-label{grid-area:next!important;position:static!important;display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:center!important;gap:3px!important;padding:0!important;margin:0!important;width:auto!important;max-width:100%!important;transform:none!important;border:0!important;background:transparent!important;opacity:1!important;color:inherit!important;align-self:center!important}
#app .room-scene .floor-seat-slot>.floor-cast.name-first.board-label .next-cast-label small{font-size:9px!important;line-height:1!important;font-weight:500!important;writing-mode:horizontal-tb!important}
#app .room-scene .floor-seat-slot>.floor-cast.name-first.board-label .next-cast-label b{font-size:var(--fit-next)!important;line-height:1!important;font-weight:650!important;white-space:nowrap!important;writing-mode:horizontal-tb!important;color:inherit!important}
#app .room-scene .floor-seat-slot>.floor-cast.name-first.board-label .cast-time-check{grid-area:time!important;position:static!important;transform:none!important;display:flex!important;flex-direction:row!important;width:100%!important;max-width:100%!important;padding:0!important;margin:0!important;line-height:1!important;align-self:center!important;background:transparent!important;border-radius:0!important}
#app .room-scene .floor-seat-slot>.floor-cast.name-first.board-label .timer{font-size:var(--fit-timer)!important;line-height:1.1!important;padding:0!important}
#app .room-scene .floor-seat-slot>.floor-cast.name-first.board-label .name-seated-check{top:-15px!important;right:0!important;width:14px!important;height:14px!important;font-size:11px!important;box-shadow:none!important}
#app .room-scene .floor-seat-slot>.floor-cast.name-first.board-label .next-table-label{top:-14px!important;left:1px!important;line-height:12px!important;font-size:10px!important;max-width:calc(100% - 18px)!important}
#app .room-scene .floor-seat-slot>.floor-cast.name-first.board-label.board-narrow{grid-template:"name next" minmax(0,1fr) "time time" auto / var(--fit-name) minmax(0,1fr)!important;column-gap:2px!important;padding:2px 1px!important}
#app .room-scene .floor-seat-slot>.floor-cast.name-first.board-label.board-narrow .cast-name-large{writing-mode:vertical-rl!important;max-width:none!important}
#app .room-scene .floor-seat-slot>.floor-cast.name-first.board-label.board-narrow .next-cast-label{flex-direction:column!important;gap:2px!important}
#app .room-scene .floor-seat-slot>.floor-cast.name-first.board-label.board-narrow .next-cast-label b{writing-mode:vertical-rl!important}
#app .room-scene .floor-seat-slot>.floor-cast.name-first.board-label.board-narrow .next-table-label{display:none!important}
#app .room-scene .floor-seat-slot>.floor-cast.name-first.board-label.board-name-wrap{grid-template-columns:calc(var(--fit-name) * 2) minmax(0,1fr)!important;column-gap:0!important;padding-inline:0!important}
#app .room-scene .floor-seat-slot>.floor-cast.name-first.board-label.board-name-wrap .cast-name-large{height:calc(var(--fit-name) * var(--board-name-rows))!important;width:calc(var(--fit-name) * 2)!important;white-space:normal!important;word-break:break-all!important;overflow-wrap:anywhere!important}
#app .room-scene .floor-seat-pair.flow-vertical:has(.board-label){grid-template-rows:18px minmax(0,1fr)!important;gap:3px!important;max-height:none!important}
#app .room-scene .floor-seat-pair.flow-vertical:has(>.floor-seat-slot:first-child>.board-label){grid-template-rows:minmax(0,1fr) 18px!important}
#app .room-scene .floor-seat-pair.flow-vertical:has(>.floor-seat-slot:first-child>.board-label):has(>.floor-seat-slot:last-child>.board-label){grid-template-rows:1fr 1fr!important}
#app .room-scene .floor-seat-pair.flow-vertical:has(.board-label) .floor-customer{padding-right:13px!important}
#app .room-corner:not(.room-detail) .floor-seat-pair.seat-bottom{top:58%!important;height:40%!important}
#app .room-scene .floor-seat-slot>.floor-cast.name-first.board-label:not(:has(.next-cast-label)){grid-template:"name" minmax(0,1fr) "time" auto / minmax(0,1fr)!important}
#app .room-scene .floor-seat-slot>.floor-cast.name-first.board-label.board-corner .cast-name-large{white-space:normal!important;word-break:break-all!important;overflow-wrap:anywhere!important;text-align:center!important;line-height:1.05!important}
#app .room-scene .floor-seat-slot>.floor-cast.name-first.board-label.board-corner .next-cast-label{display:block!important;width:100%!important;text-align:center!important;line-height:1.1!important}
#app .room-scene .floor-seat-slot>.floor-cast.name-first.board-label.board-corner .next-cast-label small{display:inline!important;margin-right:2px!important}
#app .room-scene .floor-seat-slot>.floor-cast.name-first.board-label.board-corner .next-cast-label b{display:inline!important;white-space:normal!important;word-break:break-all!important;text-align:center!important;line-height:1.1!important}
#app .room-scene .floor-seat-slot>.floor-cast.name-first.board-label.board-corner .timer[data-floor-overdue]{display:flex!important;flex-direction:column!important;align-items:center!important;line-height:1!important}
#app .board-corner .overdue-caption{font-size:9px;line-height:1}
#app .board-corner .overdue-minutes{white-space:nowrap;font-size:inherit;line-height:1}
#app .room-scene .floor-seat-slot>.floor-cast.name-first.board-label.board-corner .timer[data-floor-overdue]::after{content:none!important;display:none!important}
#app .room-scene .floor-seat-slot>.floor-cast.name-first.board-label.board-corner.board-narrow{padding:1px!important}
#app .room-scene .floor-seat-slot>.floor-cast.name-first.board-label.board-corner.board-narrow .cast-name-large{writing-mode:vertical-rl!important;white-space:nowrap!important;line-height:1!important}
#app .room-scene .floor-seat-slot>.floor-cast.name-first.board-label.board-corner.board-narrow .next-cast-label{display:flex!important;flex-direction:column!important;width:auto!important;line-height:1!important}
#app .room-scene .floor-seat-slot>.floor-cast.name-first.board-label.board-corner.board-narrow .next-cast-label b{writing-mode:vertical-rl!important;white-space:nowrap!important;line-height:1!important}
#app .room-scene .floor-seat-slot>.floor-cast.name-first.board-label.board-corner.board-narrow .cast-time-check{min-height:0!important}
#app .room-scene .floor-seat-slot>.floor-cast.name-first.board-label.board-corner.board-narrow .timer[data-floor-overdue]{gap:0!important;min-height:0!important}
#app .room-scene .floor-seat-slot>.floor-cast.name-first.board-label.board-corner.board-narrow .overdue-caption{font-size:8px!important;line-height:8px!important}
#app .room-scene .floor-seat-slot>.floor-cast.name-first.board-label.board-corner.board-narrow .overdue-minutes,#app .room-scene .floor-seat-slot>.floor-cast.name-first.board-label.board-corner.board-narrow .overdue-minutes small{font-size:11px!important;line-height:11px!important}
#app .room-scene .floor-seat-slot>.floor-cast.name-first.board-label.sofa-cast .cast-time-check:has([data-floor-overdue]){background:#b93423!important;color:#fff!important;border-radius:3px!important}

/* The attention strip owns the entire bottom edge of the screen. */
@media(min-width:700px){
 body:has(.operations-workspace .floor-alerts:not([hidden])) .rail{bottom:40px!important}
 .operations-workspace .floor-alerts:not([hidden]){position:fixed!important;inset:auto 0 0!important;width:100%!important;box-sizing:border-box!important;z-index:24!important;border-radius:0!important}
 .operations-workspace .alert-controls{gap:3px!important;flex:0 0 auto!important}
 .operations-workspace .alert-controls .floor-alert-all,.operations-workspace .alert-controls .alert-audio{width:32px!important;min-width:32px!important;max-width:32px!important;padding:4px!important;display:grid!important;place-items:center!important}
 .operations-workspace .alert-controls svg{width:21px;height:21px;flex:none}
 .operations-workspace .floor-alert-chip.stay{grid-template:"who note" 20px / max-content max-content!important}
}
/* Keep the next name at the lower left, with its own row above the timer. */
#app .room-scene .floor-seat-slot>.floor-cast.name-first.board-label.board-narrow{grid-template:"name" minmax(0,1fr) "next" max-content "time" max-content / minmax(0,1fr)!important;gap:1px!important;padding:1px!important}
#app .room-scene .floor-seat-slot>.floor-cast.name-first.board-label .next-cast-label,
#app .room-scene .floor-seat-slot>.floor-cast.name-first.board-label.board-corner .next-cast-label,
#app .room-scene .floor-seat-slot>.floor-cast.name-first.board-label.board-corner.board-narrow .next-cast-label{display:block!important;justify-self:start!important;align-self:end!important;width:100%!important;text-align:left!important;line-height:1.05!important;white-space:normal!important}
#app .room-scene .floor-seat-slot>.floor-cast.name-first.board-label .next-cast-label small{display:inline!important;margin:0 2px 0 0!important;writing-mode:horizontal-tb!important;line-height:1!important}
#app .room-scene .floor-seat-slot>.floor-cast.name-first.board-label .next-cast-label b,
#app .room-scene .floor-seat-slot>.floor-cast.name-first.board-label.board-corner.board-narrow .next-cast-label b{display:inline!important;writing-mode:horizontal-tb!important;white-space:normal!important;word-break:break-all!important;line-height:1.05!important}
#app .room-scene .floor-seat-slot>.floor-cast.name-first.board-label.board-corner.board-name-wrap .cast-name-large{writing-mode:vertical-rl!important;white-space:normal!important;line-height:1!important}
/* Compact, meaningful tabletop labels instead of scaling long sentences down. */
#app .room-scene:not(.room-detail) .table-round-label.round-badge{display:inline-flex!important;align-items:center;justify-content:center;min-width:22px;min-height:16px;border:1px solid currentColor;border-radius:3px;padding:0 2px!important;font-size:12px!important;line-height:16px!important;white-space:nowrap!important;box-sizing:border-box}
#app .room-scene.room-opposed:not(.room-detail).occupied .live-table-core{gap:3px!important;padding:2px 0!important}
#app .room-scene.room-opposed:not(.room-detail).occupied .live-table-core .table-number-plate{font-size:13px!important;line-height:16px!important}
#app .room-scene.room-opposed:not(.room-detail).occupied .live-table-core .room-headcount b{font-size:14px!important;line-height:16px!important}
#app .room-scene.room-opposed:not(.room-detail).occupied .live-table-core .room-headcount small{font-size:11px!important;line-height:16px!important}
#app .room-scene.room-opposed:not(.room-detail).occupied .live-table-core .live-stay{display:flex!important;flex-direction:column!important;align-items:center!important;gap:3px!important;width:100%!important;min-width:0!important}
#app .room-scene.room-opposed:not(.room-detail).occupied .live-table-core .live-stay [data-stay-time]{font-size:14px!important;line-height:15px!important;white-space:normal!important;word-break:normal!important;overflow-wrap:normal!important;width:100%!important;text-align:center!important}
#app .room-scene .floor-seat-slot>.floor-cast.name-first.board-label .next-cast-label{font-size:var(--fit-next)!important}
#app .room-scene .floor-seat-slot>.floor-cast.name-first.board-label.board-narrow .next-cast-label b{display:inline!important;writing-mode:horizontal-tb!important;white-space:normal!important;word-break:break-all!important;line-height:1.05!important}

/* One baseline: arrival, guest count, dial/date/time, attendance counters. */
@media(min-width:700px){
 #app .compact-console.inline-console{--console-label:clamp(12px,1.05vw,15px)}
 #app .compact-console.inline-console .console-controls{display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;align-items:center!important;gap:4px!important;height:34px!important;min-height:34px!important}
 #app .compact-console.inline-console .roster-tabs,#app .compact-console.inline-console .console-left{display:contents!important}
 #app .compact-console.inline-console .roster-tabs button{height:34px!important;min-height:34px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;flex-direction:row!important;gap:3px!important;padding:2px 5px!important;white-space:nowrap!important;min-width:0!important;width:auto!important;flex:0 0 auto!important}
 #app .compact-console.inline-console .roster-tabs .console-arrival{width:46px!important;min-width:46px!important;font-size:17px!important}
 #app .compact-console.inline-console .roster-metric,#app .compact-console.inline-console .metric-value,#app .compact-console.inline-console .cast-metrics{display:inline-flex!important;flex-direction:row!important;align-items:baseline!important;justify-content:center!important;flex-wrap:nowrap!important;width:auto!important;min-width:0!important;height:auto!important;min-height:0!important;gap:2px!important;line-height:20px!important;white-space:nowrap!important}
 #app .compact-console.inline-console .cast-metrics{gap:9px!important}
 #app .compact-console.inline-console .metric-value,#app .compact-console.inline-console .arrival-metric{gap:1px!important}
 #app .compact-console.inline-console .roster-label,#app .compact-console.inline-console .metric-label{font-size:var(--console-label)!important;line-height:20px!important;white-space:nowrap!important}
 #app .compact-console.inline-console .roster-metric b{font-size:calc(var(--console-label) + 3px)!important;line-height:20px!important;font-variant-numeric:tabular-nums}
 #app .compact-console.inline-console .roster-metric small{font-size:var(--console-label)!important;line-height:20px!important}
 #app .compact-console.inline-console .console-clock{display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:center!important;gap:4px!important;flex:1 1 auto!important;width:auto!important;min-width:0!important;height:34px!important;padding:2px 5px!important;border-radius:6px!important}
 #app .compact-console.inline-console .console-clock .clock-face{width:24px!important;height:24px!important;flex:0 0 24px!important}
 #app .compact-console.inline-console .console-clock-text{display:flex!important;flex-direction:row!important;align-items:baseline!important;justify-content:center!important;gap:4px!important;min-width:0!important;white-space:nowrap!important}
 #app .compact-console.inline-console .console-clock [data-clock-date]{order:0!important;font-size:calc(var(--console-label) + 1px)!important;line-height:22px!important;letter-spacing:0!important}
 #app .compact-console.inline-console .console-clock time{order:1!important;font-size:var(--fit-console-time,28px)!important;line-height:1!important;letter-spacing:0!important;flex-shrink:0!important}
}
@media(min-width:700px) and (max-width:740px){
 #app .compact-console.inline-console .console-controls{gap:2px!important}
 #app .compact-console.inline-console .roster-tabs button{padding-inline:3px!important;gap:2px!important}
 #app .compact-console.inline-console .cast-metrics{gap:4px!important}
 #app .compact-console.inline-console .roster-metric b{font-size:14px!important}
 #app .compact-console.inline-console .console-clock{padding-inline:3px!important;gap:2px!important}
 #app .compact-console.inline-console .console-clock .clock-face{width:20px!important;height:20px!important;flex-basis:20px!important}
 #app .compact-console.inline-console .console-clock-text{gap:2px!important}
 #app .compact-console.inline-console .console-clock [data-clock-date]{font-size:12px!important}
}

/* The current cast is the primary label; the next booking and state are secondary. */
#app .room-scene .floor-seat-slot>.floor-cast.name-first.board-label .cast-name-large{font-weight:900!important;text-shadow:0 1px 0 #00000018}
#app .room-scene .floor-seat-slot>.floor-cast.name-first.board-label .next-cast-label b{font-weight:500!important}
#app .room-scene .floor-seat-slot>.floor-cast.name-first.board-label .timer{font-weight:600!important}
/* A stationary menu beside independently scrolling/pulsing alerts. */
#app .floor-alerts:not([hidden]){animation:none!important;background:#f6e6df!important;box-shadow:none!important;overflow:hidden!important}
#app .floor-alerts .floor-alert-count{animation:none!important;transition:none!important;transform:none!important;background:#203c43!important;color:#fff!important;box-shadow:none!important;flex-shrink:0!important;position:relative!important;z-index:1}
#app .floor-alerts .floor-alert-list{min-width:0!important;overflow-x:auto!important;overflow-y:hidden!important;overscroll-behavior-x:contain}

/* Use spare sofa height for a distinct, readable next-cast block. */
#app .room-scene .floor-seat-slot>.floor-cast.name-first.board-label.board-next-readable .next-cast-label{display:block!important;padding-top:4px!important;border-top:1px solid #ffffff60!important;text-align:left!important;line-height:1.1!important}
#app .room-scene .floor-seat-slot>.floor-cast.name-first.board-label.board-next-readable .next-cast-label small{display:block!important;font-size:11px!important;line-height:12px!important;margin:0 0 2px!important;font-weight:500!important}
#app .room-scene .floor-seat-slot>.floor-cast.name-first.board-label.board-next-readable .next-cast-label b{display:block!important;font-size:var(--fit-next)!important;font-weight:700!important;line-height:1.1!important;white-space:normal!important;writing-mode:horizontal-tb!important;word-break:break-all!important}

/* Nomination is the guest tile color, never a badge over the guest name. */
:is(#app,#modal) .room-scene .floor-seat-slot>.floor-customer[data-nomination-kind=free]{background:#fffdf8!important;border:1px solid #b9c6c4!important;border-radius:4px!important;box-shadow:none!important}
:is(#app,#modal) .room-scene .floor-seat-slot>.floor-customer:is([data-nomination-kind=regular],[data-nomination-kind=inhouse]){background:var(--nomination-fill)!important;border-color:var(--nomination-color)!important;color:var(--nomination-ink)!important;box-shadow:none!important;border-radius:4px!important}
:is(#app,#modal) .room-scene .floor-seat-slot>.floor-customer:is([data-nomination-kind=regular],[data-nomination-kind=inhouse]) .floor-person-copy>b{background:transparent!important;color:var(--nomination-ink)!important;box-shadow:none!important}
#app .room-scene .floor-seat-pair.flow-vertical:has(.board-label) .floor-customer{padding-right:0!important}
/* The menu sits on a neutral rail; only individual alert cards use red borders. */
#app .floor-alerts:not([hidden]){border:0!important;outline:0!important;background:#f4f3ef!important;box-shadow:none!important}

/* Fit guest captions inside their own cushion; the portrait yields space first. */
#app .room-scene:not(.room-detail) .floor-seat-slot>.floor-customer{display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:2px!important;box-sizing:border-box!important;padding:2px!important;min-width:0!important;min-height:0!important;width:100%!important;height:100%!important;border-width:1px!important;border-radius:4px!important}
#app .room-scene:not(.room-detail) .floor-customer>.floor-portrait{display:flex!important;align-items:center!important;justify-content:center!important;flex:1 1 auto!important;min-height:0!important;max-height:calc(100% - 22px)!important;width:min(100%,26px)!important;height:auto!important;max-width:100%!important}
#app .room-scene:not(.room-detail) .floor-customer .floor-portrait>.person-symbol{width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important;object-fit:contain}
#app .room-scene:not(.room-detail) .floor-customer>.floor-person-copy{flex:0 0 auto!important;align-self:center!important;width:100%!important;min-width:0!important;min-height:0!important;align-items:center!important;justify-content:center!important}
#app .room-scene:not(.room-detail) .floor-customer .floor-person-copy>b{box-sizing:border-box!important;width:auto!important;max-width:100%!important;min-width:0!important;margin:0!important;padding:0!important;line-height:1.1!important;letter-spacing:0!important;text-align:center!important}
#app .room-scene:not(.room-detail) .floor-customer.fit-compact{flex-direction:row!important;gap:0!important;padding:1px 2px!important}
#app .room-scene:not(.room-detail) .floor-customer.fit-compact>.floor-portrait{display:none!important}
#app .room-scene .floor-seat-pair.flow-vertical:has(.board-label){grid-template-rows:var(--guest-row,20px) minmax(0,1fr)!important}
#app .room-scene .floor-seat-pair.flow-vertical:has(>.floor-seat-slot:first-child>.board-label){grid-template-rows:minmax(0,1fr) var(--guest-row,20px)!important}
#app .room-scene .floor-seat-pair.flow-vertical:has(>.floor-seat-slot:first-child>.board-label):has(>.floor-seat-slot:last-child>.board-label){grid-template-rows:1fr 1fr!important}
/* Remove legacy offsets that pushed plates past the marble surface. */
#app .room-scene:not(.room-detail) .live-table-core .table-number-plate{transform:none!important;margin:0!important;box-sizing:border-box!important;min-width:0!important;max-width:100%!important;padding:1px 2px!important;line-height:1.1!important;white-space:nowrap!important;align-self:center!important}
/* The VIP heading has its own strip, above the furniture and seat controls. */
#app .live-booth.vip-booth{padding-top:24px!important;box-sizing:border-box!important}
#app .vip-booth>.room-vip>.private-room-label{top:-20px!important;left:0!important;right:0!important;width:100%!important;height:16px!important;line-height:16px!important;font-size:10px!important;letter-spacing:.06em!important;white-space:nowrap!important;color:#776347!important;text-align:center!important}

/* Seat state belongs beside the elapsed time, inside the card. */
:is(#app,#modal) .room-scene .floor-seat-slot>.floor-cast.name-first[data-action=cast-change] .cast-time-check>.name-seated-check{position:static!important;inset:auto!important;transform:none!important;margin:0!important;box-shadow:none!important;flex:0 0 14px!important;width:14px!important;height:14px!important;min-width:14px!important;line-height:12px!important;font-size:11px!important;align-self:center!important}
:is(#app,#modal) .room-scene .floor-seat-slot>.floor-cast.name-first[data-action=cast-change] .cast-time-check{gap:3px!important;align-items:center!important;justify-content:center!important;min-width:0!important}
:is(#app,#modal) .room-scene .floor-seat-slot>.floor-cast.name-first.reserved .cast-time-check>.pending-clock,
:is(#app,#modal) .room-scene .floor-seat-slot>.floor-cast.name-first.nomination-waiting .cast-time-check>.nomination-wait-label{display:none!important}
#app .room-scene .floor-seat-slot>.floor-cast.name-first.board-narrow .cast-time-check>.timer{min-width:0!important;white-space:nowrap!important;overflow-wrap:normal!important;word-break:normal!important}
#app .room-scene .floor-seat-slot>.floor-cast.name-first.board-narrow .cast-time-check>[data-minute-clock]:not([data-floor-overdue])::after{content:'分'!important;display:inline!important}
#app .room-scene .floor-seat-slot>.floor-cast.name-first.board-label.board-narrow.board-name-wrap{gap:0!important;padding:0!important}

/* Pending cards: name, then a single next-cast / seat-check row. */
#app .room-scene .floor-seat-slot>.floor-cast.name-first.board-label.board-next-check-row{grid-template:"name name" minmax(0,1fr) "next time" max-content / minmax(0,1fr) 14px!important;gap:3px!important;padding:3px!important}
#app .room-scene .floor-seat-slot>.floor-cast.name-first.board-label.board-next-check-row .next-cast-label{display:flex!important;flex-direction:row!important;align-items:center!important;align-self:center!important;justify-content:flex-start!important;gap:2px!important;white-space:nowrap!important;width:100%!important;border:0!important;padding:0!important}
#app .room-scene .floor-seat-slot>.floor-cast.name-first.board-label.board-next-check-row .next-cast-label small{display:inline!important;margin:0!important;font-size:10px!important;line-height:14px!important}
#app .room-scene .floor-seat-slot>.floor-cast.name-first.board-label.board-next-check-row .next-cast-label b{display:inline!important;font-size:var(--fit-next)!important;font-weight:650!important;line-height:14px!important;white-space:nowrap!important}
#app .room-scene .floor-seat-slot>.floor-cast.name-first.board-label.board-next-check-row .cast-time-check{align-self:center!important;width:14px!important;max-width:14px!important}
#app .room-scene:not(.room-detail) .table-round-label.round-badge{display:inline-flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;box-sizing:border-box!important;min-width:0!important;max-width:100%!important;padding:0 1px!important;font-size:11px!important;line-height:14px!important;white-space:nowrap!important}
#app .room-scene:not(.room-detail) .table-round-label.round-badge .round-done{font-size:10px!important;line-height:11px!important}

/* All eligible names stay visible; no candidate pagination or explanatory clutter. */
#modal.candidate-screen [data-compact-candidates]{gap:5px!important;align-content:start;max-height:none!important;overflow:visible!important}
#modal.candidate-screen [data-compact-candidates] :is(.replace-option,.next-cast-option){display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:44px!important;padding:4px!important;margin:0!important;border:1px solid #bdcec4;border-radius:6px;background:#f4f8f4;color:#294f3c;gap:2px!important}
#modal.candidate-screen [data-compact-candidates] .recommendation-heading{width:100%;min-width:0;justify-content:center}
#modal.candidate-screen [data-compact-candidates] .recommendation-heading strong{font-size:17px!important;line-height:20px!important;white-space:nowrap}
#modal.candidate-screen [data-compact-candidates] [aria-pressed=true] .recommendation-heading strong{font-size:clamp(12px,calc((100cqi - 34px) / var(--candidate-name-length,5)),17px)!important}
#modal.candidate-screen [data-compact-candidates] .candidate-current-place{font-size:10px;line-height:12px}
#modal.candidate-screen .candidate-controls{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:4px 0 6px!important;padding:0;min-height:22px;color:#315441}
#modal.candidate-screen .candidate-controls :is(strong,.booking-candidate-for){font-size:16px!important;line-height:22px;margin:0!important}
#modal.candidate-screen .candidate-controls>span{font-size:13px;white-space:nowrap}
#modal.candidate-screen .next-unavailable{margin-top:3px}
#modal.candidate-screen .next-unavailable>summary{min-height:32px;padding:4px 0;font-size:12px}
#modal.candidate-screen .cast-search{margin:5px 0 0}
#modal.candidate-screen .cast-search-box{height:44px;min-height:44px;border-radius:6px;padding:0 8px;gap:6px}
#modal.candidate-screen .cast-search-box input[type=search]{height:42px;min-height:42px;padding:4px 0;font-size:15px}
#modal.candidate-screen .replace-shortcuts{min-height:30px;margin-top:3px;padding-top:0}
#modal.candidate-screen .replace-shortcuts>summary{font-size:12px;line-height:26px}

#modal.candidate-screen [data-compact-candidates] :is(.replace-option,.next-cast-option){container-type:inline-size}
#modal.candidate-screen [data-compact-candidates] .recommendation-heading strong{font-size:clamp(13px,calc(100cqi / var(--candidate-name-length,5)),17px)!important}
#modal.candidate-screen [data-compact-candidates] [aria-pressed=true] .recommendation-heading strong{font-size:clamp(12px,calc((100cqi - 34px) / var(--candidate-name-length,5)),17px)!important}
@media(min-width:700px){
 #modal.table-reservation-screen .cast-action-layout{grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr)!important;gap:10px}
 #modal.candidate-screen .modal-heading{padding:4px 16px!important;min-height:52px;box-sizing:border-box}
 #modal.candidate-screen .modal-heading h2{font-size:20px;margin:0}
 #modal.candidate-screen .modal-footer{padding:4px 16px!important;min-height:52px;box-sizing:border-box}
 #modal.candidate-screen .modal-heading .btn,#modal.candidate-screen .modal-footer .btn{min-height:44px;padding:6px 14px}
 #modal.candidate-screen .replace-current{min-height:52px!important;padding:3px 10px!important;margin-bottom:6px!important;gap:8px}
 #modal.candidate-screen .replace-current .seat-action{min-height:44px!important;font-size:17px!important;padding:5px 12px!important}
 #modal.candidate-screen .replace-current strong{font-size:22px!important}
 #modal.candidate-screen .modal-body{padding:8px 16px!important}
}
@media(min-width:700px) and (max-height:700px){
 #modal.candidate-screen[open]{height:calc(100dvh - 8px);max-height:calc(100dvh - 8px)}
 #modal.table-reservation-screen .table-booking-board>.booking-mini-wrap{height:112px;min-height:112px}
 #modal.candidate-screen .booking-reservation{margin:0!important}
}
@media(min-width:700px) and (max-height:600px){
 #modal.candidate-screen .modal-body{padding-block:4px!important}
 #modal.table-reservation-screen .table-booking-board>.booking-mini-wrap{height:96px;min-height:96px}
 #modal.table-reservation-screen .cast-move-disclosure{margin-top:3px}
 #modal.table-reservation-screen .table-booking-row{padding-block:2px}
}

/* Dialogs share a bounded frame. Long content scrolls inside, never sideways. */
#modal{min-width:0;max-width:calc(100vw - 16px)!important;max-height:calc(100dvh - 8px)!important;overflow:hidden}
#modal[open]{display:flex;flex-direction:column}
#modal>.modal-heading,#modal>.modal-footer{flex:0 0 auto;position:relative;min-width:0}
#modal>.modal-body{flex:1 1 auto;min-width:0;min-height:0;overflow:auto;overscroll-behavior:contain}
#modal .modal-heading h2{min-width:0;flex:1;overflow-wrap:anywhere;line-height:1.3;margin:0}
#modal .modal-heading>.modal-back,#modal .modal-heading>.icon-btn{flex:0 0 auto}
#modal .modal-footer{flex-wrap:wrap}
#modal :is(form,fieldset,.field,.form-row>*,.row-actions>*){min-width:0}
#modal :is(input,select,textarea){max-width:100%;box-sizing:border-box}
#modal :is(.field>span,.profile-help,.notice,.muted){overflow-wrap:anywhere}
@media(min-width:700px) and (max-width:900px){
 #modal:not(.candidate-screen)>.modal-heading{padding:8px 14px;gap:8px}
 #modal:not(.candidate-screen)>.modal-body{padding:10px 14px}
 #modal:not(.candidate-screen)>.modal-footer{padding:8px 14px;gap:6px}
 #modal .modal-heading h2{font-size:20px}
 #modal .modal-heading .btn,#modal .modal-footer .btn{min-height:44px;font-size:17px;padding:7px 12px}
}
/* Arrival: two deliberate rows; the old minimum widths cannot add up offscreen. */
@media(min-width:700px){
 #modal.quick-intake-modal.compact-intake .quick-intake-rows{grid-template-rows:none!important;grid-auto-rows:auto;gap:6px}
 #modal.quick-intake-modal.compact-intake .quick-person{min-width:0;height:112px!important;min-height:112px!important;grid-template-rows:48px 44px!important;gap:6px!important;padding:6px 0!important}
 #modal.quick-intake-modal.compact-intake .quick-person-main{display:grid!important;grid-template-columns:minmax(64px,.65fr) 140px minmax(112px,1.4fr) minmax(90px,.8fr) 32px!important;gap:6px!important}
 #modal.quick-intake-modal.compact-intake .quick-person-main>*{min-width:0!important;max-width:100%!important;width:100%!important;grid-area:auto!important;margin:0!important}
 #modal.quick-intake-modal.compact-intake .quick-person-heading{height:auto!important;min-width:0!important}
 #modal.quick-intake-modal.compact-intake .quick-person-number{font-size:20px!important;line-height:1.15!important;max-height:46px}
 #modal.quick-intake-modal.compact-intake .quick-type{height:48px!important;gap:4px!important}
 #modal.quick-intake-modal.compact-intake .quick-type button{min-height:48px!important;font-size:18px!important;padding:3px!important}
 #modal.quick-intake-modal.compact-intake .quick-person-main .quick-cast:not(:disabled){min-width:0!important;font-size:18px!important;height:44px!important;padding:5px!important}
 #modal.quick-intake-modal.compact-intake .quick-style{min-width:0!important;font-size:16px!important;height:44px!important;padding:5px!important}
 #modal.quick-intake-modal.compact-intake .quick-remove{min-width:0!important;min-height:44px!important;width:32px!important;padding:0!important}
 #modal.quick-intake-modal.compact-intake .quick-person-details,#modal.quick-intake-modal.compact-intake .quick-person-details:not(:has(.quick-cast:not(:disabled))){grid-template-columns:200px minmax(100px,1.5fr) minmax(56px,.7fr) minmax(82px,.9fr) minmax(68px,1fr)!important;gap:5px!important}
 #modal.quick-intake-modal.compact-intake .quick-person-details>*{min-width:0!important;max-width:100%!important;grid-area:auto!important}
 #modal.quick-intake-modal.compact-intake .quick-person-details .quick-colors{width:200px!important;min-width:0!important;gap:0!important;flex-wrap:nowrap!important}
 #modal.quick-intake-modal.compact-intake .quick-color{width:40px!important;min-width:40px!important;height:44px!important;padding:4px!important}
 #modal.quick-intake-modal.compact-intake .quick-person-details :is(input,select){font-size:15px!important;height:44px!important;padding:5px!important}
 #modal.quick-intake-modal.compact-intake .intake-add-row{height:56px!important;min-height:56px!important}
 #modal.quick-intake-modal.compact-intake .intake-add-under{height:52px!important;min-height:52px!important;font-size:23px!important}
 #modal.quick-intake-modal.compact-intake .intake-context{gap:8px;min-width:0}
 #modal.quick-intake-modal.compact-intake .quick-intake-caption{font-size:13px;margin:0;line-height:1.4}
 #modal.quick-intake-modal.compact-intake .intake-header-actions{gap:6px;flex:0 0 auto}
 #modal.quick-intake-modal.compact-intake .intake-header-actions .btn{font-size:20px!important;min-height:48px!important;padding:6px 14px!important}
}

/* Table actions and history must share the small window without hiding the people. */
#modal.table-screen .table-history-main .table-cast-dock>div{grid-template-columns:repeat(auto-fit,minmax(86px,1fr))}
#modal.table-screen .table-cast-dock button{container-type:inline-size}
#modal.table-screen .table-cast-dock button b{font-size:clamp(13px,calc(100cqi / var(--candidate-name-length,5)),16px);overflow:visible;text-overflow:clip;line-height:20px}
@media(min-width:700px) and (max-height:800px){
 #modal.table-screen.history-first-screen:not([data-guests="0"]){height:calc(100dvh - 8px)!important;max-height:calc(100dvh - 8px)!important}
 #modal.table-screen.history-first-screen:not([data-guests="0"]) .modal-heading{padding-block:5px;min-height:54px;box-sizing:border-box}
 #modal.table-screen.history-first-screen .table-history-layout{gap:8px}
 #modal.table-screen.history-first-screen .table-history-summary{padding:6px;gap:6px}
 #modal.table-screen.history-first-screen .table-history-main{gap:6px}
 #modal.table-screen.history-first-screen .table-history-count>strong{font-size:19px}
 #modal.table-screen.history-first-screen .table-history-count>span{font-size:14px}
 #modal.table-screen.history-first-screen .history-primary-actions{gap:4px}
 #modal.table-screen.history-first-screen .history-primary-actions .btn{min-height:44px;font-size:16px;padding:4px 6px}
 #modal.table-screen.history-first-screen .live-table-actions{gap:5px}
 #modal.table-screen.history-first-screen .live-table-actions>.btn{min-height:44px;padding:4px;font-size:14px}
 #modal.table-screen.history-first-screen .table-guest-cards{gap:6px!important}
 #modal.table-screen.history-first-screen .table-guest-summary{padding:7px!important}
 #modal.table-screen.history-first-screen .history-person-heading{padding-bottom:4px;gap:4px}
 #modal.table-screen.history-first-screen .history-person-open{padding:5px;gap:4px}
 #modal.table-screen.history-first-screen .table-guest-link b{font-size:19px!important}
 #modal.table-screen.history-first-screen .table-guest-link span{font-size:13px!important}
 #modal.table-screen.history-first-screen .history-set-count{font-size:12px!important;padding:3px}
 #modal.table-screen.history-first-screen .history-guest-kind{font-size:12px!important;margin-top:1px}
 #modal.table-screen.history-first-screen .history-set{margin-top:5px}
 #modal.table-screen.history-first-screen .history-set>h3{font-size:14px;margin-bottom:4px}
 #modal.table-screen.history-first-screen .table-round{min-height:84px!important;padding:5px 3px!important;gap:3px!important}
 #modal.table-screen.history-first-screen .table-round small{font-size:12px!important}
 #modal.table-screen.history-first-screen .table-round b{font-size:min(20px,calc(100cqi / var(--history-name-chars,3)))!important}
}
@media(min-width:700px) and (max-width:900px){
 #modal.table-screen.history-first-screen .table-history-summary{grid-template-columns:110px 140px minmax(0,1fr)}
}
/* Customer editing: keep useful fields above the fold, not large summary cards. */
#modal.customer-profile-screen .spending-summary{gap:8px;margin-bottom:8px}
#modal.customer-profile-screen .spending-summary>div{display:grid;grid-template-columns:1fr auto;align-items:center;gap:2px 8px;padding:8px 10px;border-radius:7px}
#modal.customer-profile-screen .spending-summary strong{grid-column:2;grid-row:1/3;font-size:23px;line-height:1.2}
#modal.customer-profile-screen .spending-summary small{font-size:12px}
#modal.customer-profile-screen .customer-tabs{margin-bottom:12px;padding:3px;gap:4px}
#modal.customer-profile-screen .customer-tab{min-height:44px;padding:5px;font-size:15px}
#modal.customer-profile-screen .customer-section{padding:10px;margin:8px 0}
#modal.customer-profile-screen .customer-section h3{margin-bottom:8px;font-size:18px}
#modal.customer-profile-screen .profile-help{margin:6px 0;font-size:13px;line-height:1.45}
#modal.customer-profile-screen .ng-summary{margin:6px 0;font-size:14px}
#modal.customer-profile-screen #customer-form .field{margin-bottom:8px}
#modal.customer-profile-screen .customer-extra{margin-top:8px;padding-top:4px}
@media(min-width:700px){
 #modal.customer-profile-screen #customer-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px 10px}
 #modal.customer-profile-screen #customer-form>.customer-section,#modal.customer-profile-screen #customer-form>.customer-extra{grid-column:1/-1}
 #modal.customer-profile-screen #customer-form>.check{align-self:center;margin:0}
}
/* Bulk actions stay clear without a large banner for each table. */
#modal .attention-table-seating{margin-bottom:10px}
#modal .attention-table-seating>h3{font-size:17px;margin-bottom:5px}
#modal .attention-table-seat{display:grid;grid-template-columns:1fr auto;gap:3px 8px;min-height:64px;padding:7px 10px;border-width:1px}
#modal .attention-table-seat strong{font-size:22px;line-height:1.2}
#modal .attention-table-seat span{font-size:15px;line-height:1.3}
#modal .attention-table-seat small{grid-column:1/-1;font-size:14px;line-height:1.3}
#modal.planned-review-modal .attention-intro{font-size:17px;margin-bottom:4px}
#modal.planned-review-modal .attention-timing{font-size:13px;margin-bottom:8px}
#modal.planned-review-modal .planned-review-list{gap:8px}
#modal.planned-review-modal .planned-visit{padding:9px}
@media(min-width:700px) and (max-width:1100px){
 #modal.table-screen.history-first-screen:not([data-guests="0"]) .table-history-layout{grid-template-columns:128px minmax(0,1fr);grid-template-rows:minmax(0,1fr)}
 #modal.table-screen.history-first-screen .table-history-summary{display:flex;flex-direction:column;align-items:stretch;overflow:auto}
 #modal.table-screen.history-first-screen .table-history-summary .live-table-actions{display:flex!important;flex-direction:column;margin-top:auto}
 #modal.table-screen.history-first-screen .set-choice-buttons{flex-direction:column}
 #modal.table-screen.history-first-screen .table-history-summary .history-primary-actions>.btn{white-space:normal}
 #modal.table-screen.history-first-screen .table-stay-panel>strong{font-size:25px!important}
 #modal.table-screen.history-first-screen .table-stay-panel>small{font-size:11px}
 #modal.table-screen.history-first-screen .table-history-main .table-cast-dock>div{grid-template-columns:repeat(auto-fit,minmax(78px,1fr));max-height:145px}
 #modal.table-screen.history-first-screen .table-history-main .table-cast-dock{padding:2px 0 5px}
 #modal.table-screen.history-first-screen .table-history-heading>h3{font-size:17px}
 #modal.table-screen.history-first-screen .table-guest-cards{grid-template-columns:minmax(0,1fr)!important}
 #modal.table-screen.history-first-screen .table-guest-summary{display:grid!important;grid-template-columns:120px minmax(0,1fr);gap:6px!important;align-items:start}
 #modal.table-screen.history-first-screen .table-guest-summary>.history-sets{grid-column:2;grid-row:1}
 #modal.table-screen.history-first-screen .table-guest-summary>:not(.history-sets){grid-column:1}
 #modal.table-screen.history-first-screen .history-person-heading{display:block;position:relative;padding:0 0 35px;border-bottom:0;background:transparent}
 #modal.table-screen.history-first-screen .history-person-heading .main-toggle{position:absolute;right:0;bottom:0}
 #modal.table-screen.history-first-screen .history-person-open{display:flex;flex-direction:column;width:100%}
 #modal.table-screen.history-first-screen .table-guest-link b{font-size:18px!important}
 #modal.table-screen.history-first-screen .table-guest-link span{font-size:12px!important}
 #modal.table-screen.history-first-screen .table-guest-seat{font-size:15px!important;min-height:44px;margin:0;padding:4px}
}
@media(max-width:699px){
 #modal.customer-profile-screen .spending-summary>div{display:flex;flex-direction:column;align-items:flex-start;gap:0;padding:6px 8px}
 #modal.customer-profile-screen .spending-summary strong{font-size:21px}
 #modal.customer-profile-screen .customer-tab{font-size:13px;padding:4px}
}
/* Arrival is anchored with a matching width and inset at every breakpoint. */
#modal.quick-intake-modal[open]{inset:8px 8px auto auto!important;margin:0!important;max-height:calc(100dvh - 16px)!important}
@media(max-width:900px){
 #modal #layout-form .form-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 #modal #layout-form .form-row>.check{min-width:0;min-height:44px;white-space:normal;overflow-wrap:normal;margin:0;align-items:center}
 #modal #layout-form .check input{width:20px;flex:0 0 20px}
 #modal #layout-form fieldset{padding:10px}
 #modal #layout-form .relations-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
}
@media(min-width:700px) and (max-width:899px){
 #modal.progress-correction-modal .progress-segment{grid-template-columns:54px minmax(88px,1fr) minmax(126px,1.2fr) minmax(126px,1.2fr) 50px;gap:5px;align-items:end}
 #modal.progress-correction-modal .progress-segment>label{grid-column:auto!important;grid-row:auto!important}
 #modal.progress-correction-modal .progress-segment>label:not(.progress-ongoing){grid-template-columns:minmax(0,1fr)!important;gap:3px!important}
 #modal.progress-correction-modal .progress-segment>b{font-size:14px;align-self:center}
 #modal.progress-correction-modal .progress-ongoing{font-size:13px;align-self:center}
 #modal.progress-correction-modal .progress-segment .time-wheel-trigger{padding:4px;font-size:14px;gap:4px}
}
@media(max-width:699px){
 #modal.planned-review-modal .modal-footer{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.2fr) minmax(0,.9fr);padding:8px!important;gap:6px}
 #modal.planned-review-modal .modal-footer .btn{min-width:0!important;min-height:48px!important;font-size:16px!important;padding:6px!important;white-space:nowrap}
 #modal.planned-review-modal .modal-footer .primary{font-size:20px!important}
}
/* Long guest descriptions stay in their seat cell, never over the next round. */
#modal .inline-move-seat small{width:100%;max-width:100%;white-space:normal;overflow-wrap:anywhere;text-overflow:clip;line-height:1.3}
#modal :is(.inline-round,.table-booking-cell) strong{max-width:100%;white-space:normal;overflow-wrap:anywhere;line-height:1.2}
@media(min-width:700px){
 #modal.table-reservation-screen .cast-action-layout:has(.cast-move-disclosure[open])>.table-booking-side{display:contents}
 #modal.table-reservation-screen .cast-action-layout:has(.cast-move-disclosure[open]) .table-booking-board{grid-column:1;grid-row:1}
 #modal.table-reservation-screen .cast-action-layout:has(.cast-move-disclosure[open])>.cast-replacements{grid-column:2;grid-row:1}
 #modal.table-reservation-screen .cast-move-disclosure[open]{grid-column:1/-1;grid-row:2}
 #modal.table-reservation-screen .cast-move-disclosure[open] .inline-table-content{grid-template-columns:140px minmax(0,1fr)}
 #modal.table-reservation-screen .cast-move-disclosure[open] .booking-mini-wrap{height:150px;min-height:150px}
}
#modal .booking-mini-seat{container-type:inline-size;padding:4px!important}
#modal .booking-mini-seat b{display:block;max-width:100%;font-size:clamp(14px,calc(100cqi / var(--map-name-length,5)),22px)!important;line-height:1.2;white-space:normal!important;overflow-wrap:anywhere!important}
/* Floor-wide reservations: the table list scrolls without moving the candidates. */
#modal .modal-footer .service-overview-open{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-width:142px;min-height:48px;background:#28563f;color:#fff;border-color:#28563f;font-size:19px;font-weight:800;margin-right:auto}
#modal.service-overview-screen{width:min(1180px,calc(100vw - 16px))!important;max-width:calc(100vw - 16px)!important}
#modal.service-overview-screen[open]{height:min(820px,calc(100dvh - 16px));max-height:calc(100dvh - 16px)}
#modal.service-overview-screen>.modal-body{overflow:hidden;padding:8px 12px!important}
#modal .service-overview-layout{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(0,1fr);height:100%;min-height:0;gap:12px}
#modal .service-overview-tables,#modal .service-overview-candidates{min-width:0;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin}
#modal .service-overview-tables{padding:1px 3px 1px 1px}
#modal .service-overview-tables>.table-booking-board{margin-bottom:9px}
#modal .service-overview-tables .table-booking-rows{max-height:none;overflow:visible}
#modal .service-overview-tables .table-booking-head,#modal .service-overview-tables .table-booking-row{grid-template-columns:minmax(0,1.15fr) repeat(3,minmax(0,1fr));gap:4px;padding:4px}
#modal .service-overview-tables .table-booking-head{font-size:12px;white-space:nowrap}
#modal .service-overview-tables .table-booking-person{min-height:62px;padding:4px;text-align:left;gap:2px;overflow-wrap:anywhere}
#modal .service-overview-tables .table-booking-person strong{font-size:18px;line-height:1.2}
#modal .service-overview-tables .table-booking-person small{font-size:11px;line-height:1.25}
#modal .service-overview-tables .table-booking-cell{min-height:62px;container-type:inline-size}
#modal .service-overview-tables .table-booking-cell strong{font-size:17px;line-height:1.25;overflow-wrap:anywhere}
#modal .service-overview-tables .table-booking-cell small{font-size:11px;line-height:1.25}
#modal .service-overview-target{display:flex;flex-direction:column;gap:4px;padding:7px 9px;margin-bottom:8px;background:#e9f1eb;border-radius:6px;color:#28513a;overflow-wrap:anywhere}
#modal .service-overview-target strong{font-size:19px;line-height:1.3}
#modal .service-overview-target span{font-size:13px;line-height:1.35}
#modal .service-overview-candidates .booking-reservation{margin-bottom:6px!important}
#modal .service-overview-candidates .booking-cancel{min-height:40px}
@media(min-width:700px) and (max-width:850px){
 #modal .service-overview-layout{grid-template-columns:minmax(0,1.5fr) minmax(0,1fr);gap:8px}
 #modal .service-overview-tables .table-booking-person strong{font-size:16px}
 #modal .service-overview-tables .table-booking-cell strong{font-size:15px}
}
@media(max-width:699px){
 #modal .modal-footer .service-overview-open{min-width:108px;font-size:17px;padding:6px 10px}
 #modal .service-overview-layout{display:flex;flex-direction:column;gap:8px}
 #modal .service-overview-tables{flex:0 1 44%;min-height:170px}
 #modal .service-overview-candidates{flex:1}
 #modal .service-overview-target{padding:4px 8px;margin-bottom:5px}
 #modal .service-overview-target strong{font-size:17px}
}

/* Keep each next name and number/unit together; only the small 次 label may stack. */
#app .room-scene .floor-seat-slot>.floor-cast.name-first.board-label .next-cast-label b,
#app .room-scene .floor-seat-slot>.floor-cast.name-first.board-label.board-next-readable .next-cast-label b,
#app .room-scene .floor-seat-slot>.floor-cast.name-first.board-label.board-corner.board-narrow .next-cast-label b{white-space:nowrap!important;word-break:normal!important;overflow-wrap:normal!important;writing-mode:horizontal-tb!important}
#app .room-scene .floor-seat-slot>.floor-cast.name-first.board-label.board-narrow:not(.board-next-check-row) .next-cast-label small,
#app .room-scene .floor-seat-slot>.floor-cast.name-first.board-label.board-narrow:not(.board-next-check-row) .next-cast-label b{display:block!important}
#app .room-scene .floor-seat-slot>.floor-cast.name-first.board-label .cast-time-check :is(.timer,.overdue-minutes){white-space:nowrap!important;word-break:normal!important;overflow-wrap:normal!important}
#app .room-scene .floor-seat-slot>.floor-cast.name-first.board-label .overdue-minutes,
#app .room-scene .floor-seat-slot>.floor-cast.name-first.board-label .overdue-minutes small{font-size:var(--fit-timer)!important;line-height:1.1!important}
