:root {
  color-scheme: dark;
  font: 15px/1.45 system-ui, sans-serif;
  background: #27221d;
  color: #fff9ea;
  --edge: 20px;
  --safe-bottom: max(14px, env(safe-area-inset-bottom));
}
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
button, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .55; cursor: default; }
:focus-visible { outline: 3px solid #e5af67; outline-offset: 3px; }
canvas { display: block; position: fixed; inset: 0; width: 100%; height: 100%; touch-action: none; }
.staff-voice {
  position:fixed; pointer-events:none; transform:translate(-50%,calc(-100% - 8px));
  width:max-content; max-width:min(15rem,calc(100vw - 32px)); padding:8px 12px;
  border:1px solid #d8b993; border-radius:13px; background:#fff2dc; color:#392c23;
  box-shadow:0 3px 12px #1b130d52; font-size:.9rem; font-weight:600; text-align:center;
  line-height:1.42; text-wrap:balance;
}
.staff-voice::after {
  content:''; position:absolute; left:clamp(14px,calc(50% + var(--tail,0px)),calc(100% - 14px));
  bottom:-6px; width:9px; height:9px; transform:translateX(-50%) rotate(45deg);
  border-right:1px solid #d8b993; border-bottom:1px solid #d8b993; background:inherit;
}
.top {
  position: fixed; inset: 0 0 auto;
  display: flex; align-items: start; justify-content: space-between; gap: 12px;
  padding: max(14px, env(safe-area-inset-top)) var(--edge) 16px;
  background: linear-gradient(#21170ee6, transparent);
  pointer-events: none;
}
.identity { min-width: 0; }
.brand { font: 600 22px Georgia, serif; letter-spacing: .045em; }
.roominfo { margin-top: 5px; font-size: 12px; color: #f6e9d5; overflow-wrap: anywhere; }
.connection-notice { width:fit-content; max-width:100%; margin-top:7px; padding:4px 8px; border-radius:7px; background:#382b20; color:#ffe5bd; font-size:.84rem; }
.top-actions, .actions, .dialog-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.top-actions { flex-shrink: 0; pointer-events: auto; }
#music-toggle{pointer-events:auto;padding:3px 9px;min-height:32px;margin-block:5px;font-size:.78rem}
.actor-label{position:fixed;pointer-events:none;translate:-50% -100%;padding:2px 7px;border-radius:7px;background:#2e231dc0;color:#fff0d6;font-size:12px;white-space:nowrap}
.guest-label{background:#1f2425d9;color:#fffbeb;border:1px solid #ffedc647}
.button {
  min-height: 44px; padding: 9px 14px; border: 1px solid #c6a7758c; border-radius: 10px;
  background: #392d23ef; color: #fff8ea; text-align: center;
}
.button.primary { background: #f1ca93; border-color: #f1ca93; color: #342719; font-weight: 700; }
.bottom {
  position: fixed; bottom: var(--safe-bottom); left: 50%; transform: translateX(-50%);
  width:max-content;max-width:calc(100% - 2 * var(--edge));
  pointer-events:none;
}
.bottom .actions{justify-content:center}
.bottom .button{
  pointer-events:auto;border-radius:999px;border-color:#f8e5bd88;
  background:#29231fce;box-shadow:0 2px 12px #120d083b;
  backdrop-filter:blur(10px);
}
.bottom .button.primary{color:#352a20;background:#f7dfafeb;border-color:#f7dfaf}
.bottom .button:not(:disabled):active{box-shadow:inset 0 0 0 2px #f6d49970}
.bottom .meal-wheel-trigger:not([hidden]){display:inline-flex;align-items:center;justify-content:center;gap:6px;border-color:#edcd94;color:#ffeac2}
.meal-wheel-trigger svg{flex:none}
#meal-clock{width:max-content;max-width:100%;margin:0 auto 8px;padding:4px 11px;background:#33281ed9;border-radius:999px;font-size:.8rem}
.seat-notice{width:max-content;max-width:100%;margin:0 auto 8px;padding:6px 12px;color:#fff8ea;background:#35271dea;border-radius:10px;font-size:.82rem}
.status { margin-top: 4px; font-size: 12px; color: #f3cf9a; }
.status:empty { display: none; }
.joystick {
  position: fixed; display: none; left: max(var(--edge),env(safe-area-inset-left)); z-index:2;
  bottom: calc(var(--safe-bottom) + var(--controls-height, 156px) + 12px);
  width: var(--pad-size,88px); height: var(--pad-size,88px); border-radius: 50%;
  background: #241b14bd; border: 1px solid #f2dfc3aa;
  pointer-events:auto; touch-action:none; user-select:none; -webkit-user-select:none;
  -webkit-tap-highlight-color:transparent;
}
.stick{position:absolute;left:28%;top:28%;width:44%;height:44%;background:#f2dfc3ba;border-radius:50%;pointer-events:none}
.joystick.engaged{border-color:#f2dfc3}
.joystick.engaged .stick{background:#f2dfc3}
body:has(#dialog[open],#meal-wheel[open]) .joystick{visibility:hidden}
.overlay{position:fixed;inset:0;isolation:isolate;display:grid;grid-template-rows:auto 1fr;overflow:auto;background:#211912}
.entry-photo,.overlay::before{position:fixed;inset:0;width:100%;height:100%;z-index:-2}
.entry-photo{object-fit:cover;object-position:55% center}
.overlay::before{content:"";z-index:-1;background:linear-gradient(90deg,#18120ff5 0%,#19130fe9 22%,#21160c75 54%,transparent 84%),linear-gradient(#15110e80,transparent 24%,transparent 70%,#17100cc2)}
.entry-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:max(18px,env(safe-area-inset-top)) clamp(18px,4.5vw,76px) 14px}
.entry-toolbar .brand{color:#ffdfab}
.entry-tools,.entry-room-link,.room-shortcuts{display:flex;align-items:center;flex-wrap:wrap;gap:10px}
.entry-tools select{width:auto;max-width:110px;margin:0}
.card{width:min(610px,100%);align-self:center;padding:clamp(18px,6vw,96px);padding-right:clamp(18px,3vw,46px)}
.card h1{font:600 clamp(44px,7.7vw,100px)/1.02 Georgia,"Songti SC","Nanum Myeongjo",serif;letter-spacing:-.04em;margin:0 0 15px;text-wrap:balance;color:#fff2d7}
.card .entry-tagline{font:500 clamp(20px,2.8vw,31px)/1.3 Georgia,"Songti SC",serif;margin:0 0 12px;color:#ffe7c1}
.card .entry-description{color:#e7d8bf;margin:0 0 26px;font-size:1rem}
.entry-actions .primary{min-height:48px}
.entry-progress{margin-top:10px;min-height:1.35rem}
.entry-progress .status{color:#ffe1af;font-size:.875rem}
.entry-progress .button{margin-top:8px}
.overlay.starting #enter{cursor:progress}
.overlay.starting #entryStatus::before{content:"";display:inline-block;width:.72em;height:.72em;margin-inline-end:.55em;border:1px solid currentColor;border-inline-end-color:transparent;border-radius:50%;animation:entry-spin .8s linear infinite}
@keyframes entry-spin{to{transform:rotate(1turn)}}
@media(prefers-reduced-motion:reduce){.overlay.starting #entryStatus::before{animation:none}}
.entry-room-link{margin-top:15px}
.entry-room-link .button{background:transparent;border-color:#ddbd8766}
.entry-room-link p{margin:0;color:#eadac5}
.room-menu-trigger{background:#251b14ee;border-radius:999px;min-width:80px}
#dialog.room-menu{position:fixed;inset:max(68px,calc(env(safe-area-inset-top) + 60px)) max(14px,env(safe-area-inset-right)) auto auto;margin:0;width:min(390px,calc(100% - 28px));max-height:calc(100dvh - 82px);border-radius:20px}
.room-shortcuts .button{flex:1 1 135px;background:#6b4430;color:#fff6e7}
.language-field{margin-top:8px}
@media(max-width:650px){
  .overlay::before{background:linear-gradient(0deg,#1a130ffb 4%,#1a130fee 30%,#21160c65 67%,#17100c66)}
  .entry-photo{object-position:57% 50%}
  .card{align-self:end;padding:26px 21px max(28px,env(safe-area-inset-bottom))}
  .card h1{font-size:clamp(42px,12vw,60px)}
}
@media(max-width:365px){
  .card{padding-inline:16px}
  .entry-actions,.entry-room-link{gap:7px}
  .entry-actions .button,.entry-room-link .button{padding-inline:10px}
}
dialog {
  color-scheme: light; max-height: min(86dvh, 720px); overflow: auto;
  width: min(466px, calc(100% - 28px)); padding: 18px; border: 1px solid #dfc79b;
  border-radius: 16px; background: #fff9ed; color: #38281d;
}
dialog::backdrop { background: #100d0bb8; }
#meal-wheel{
  position:fixed;inset:0;margin:auto auto clamp(16px,10dvh,84px);box-sizing:border-box;
  width:min(298px,calc(100vw - 24px),calc(100dvh - 86px));
  max-height:calc(100dvh - 24px);padding:0 0 8px;border:0;overflow:visible;
  text-align:center;background:transparent;color:#fff5e3;color-scheme:dark;
}
#meal-wheel::backdrop{background:#1d140d40}
#meal-wheel h2{
  width:max-content;max-width:100%;margin:0 auto 8px;padding:4px 12px;border-radius:99px;
  background:#35271ff5;border:1px solid #d3af7970;font-size:.95rem;line-height:1.25;
}
.wheel-face{
  position:relative;isolation:isolate;aspect-ratio:1;border-radius:50%;
  background:radial-gradient(circle,#3d2d2375 0 15%,#2a211a92 16% 26%,#9a795c78 26.5% 27%,#46342769 27.5% 66%,#35281f4c 100%);
  border:1px solid #f5d6a69e;box-shadow:inset 0 0 0 5px #eed2aa14,0 13px 36px #160e0b66;
}
#meal-wheel-options button,#meal-wheel-close{
  position:absolute;translate:-50% -50%;min-width:44px;min-height:44px;padding:5px 8px;
  border:1px solid #bf9867a3;border-radius:999px;background:#2c221a;color:#fff3dd;font-size:.83rem;
}
#meal-wheel-options button{
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;
  top:var(--wheel-y);left:var(--wheel-x);white-space:nowrap;line-height:1.12;
  width:max-content;min-width:min(64px,27%);min-height:clamp(44px,8dvh,59px);
}
#meal-wheel-options svg{width:21px;height:21px;color:#f1cf99}
#meal-wheel-close{top:50%;left:50%;color:#e6d3bc;background:#49382b;font-size:.78rem}
#meal-wheel-options button:hover,#meal-wheel-close:hover{background:#70533a}
#meal-wheel button:focus-visible{outline:2px solid #ffdb9f;outline-offset:3px}
#meal-wheel-feedback{position:absolute;top:100%;left:50%;translate:-50% 0;width:max-content;max-width:98%;margin:0;padding:4px 9px;border-radius:9px;background:#35271ff5;color:#fff0d6;font-size:.8rem}
#meal-wheel-feedback:empty{display:none}
@media (max-width:600px) and (min-height:431px){
  #meal-wheel{margin-bottom:max(10dvh,calc(var(--controls-height, 44px) + var(--safe-bottom) + 9px))}
}
@media (max-height:430px){#meal-wheel{margin-bottom:24px;width:min(250px,calc(100vw - 24px),calc(100dvh - 86px))}}
dialog h2 { margin: 0 0 10px; font-size: 22px; }
dialog h3 { margin: 13px 0 6px; font-size: 13px; color: #594632; }
dialog p { color: #6b5440; }
dialog .button { background: #76563a; color: #fff; }
dialog .button.primary {background:#6e4b30;color:#fff4df;border-color:#6e4b30}
dialog .secondary, .menu-grid .button { background: #f5e9d7; color: #3c2b1e; border-color: #d7c4a8; }
dialog label { display: block; }
dialog input:not([type=checkbox]), dialog select, dialog textarea {
  display: block; width: 100%; padding: 9px; margin: 4px 0 12px; min-height: 44px;
  border: 1px solid #bfae96; border-radius: 8px; background: #fff; color: #33291e;
}
dialog textarea { resize: vertical; }
dialog input[type=checkbox] { accent-color: #876343; margin-right: 8px; }
.check-row { display: flex; align-items: center; min-height: 44px; }
.dialog-actions { justify-content: flex-end; margin-top: 14px; }
.menu-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.menu-grid .button { text-align: start; overflow-wrap: anywhere; }
dialog a.button { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
@media (max-width: 700px), (pointer: coarse) {
  :root { --edge: 12px; --pad-size:clamp(78px,21vw,90px); }
  .top{padding-left:max(var(--edge),env(safe-area-inset-left));padding-right:max(var(--edge),env(safe-area-inset-right))}
  #music-toggle{min-height:44px}
  .joystick { display: block; }
  #dialog.room-menu{max-height:calc(100dvh - 82px - env(safe-area-inset-bottom));overscroll-behavior:contain;scroll-padding-block-end:64px}
  #dialog.room-menu .dialog-actions{position:sticky;bottom:-18px;margin-inline:-18px;margin-bottom:-18px;padding:8px 18px;background:#fff9ed;z-index:1}
  .bottom .button{text-wrap:balance}
}
@media (max-width: 430px) {
  .top-actions .button { padding-inline: 9px; font-size: 13px; }
  .bottom .actions { gap: 8px; }
  .bottom .button { padding-inline: 8px; font-size: 13px; }
}

#room-people{overflow-wrap:anywhere}
#volume{width:100%;margin-block:.35rem}

.order-seconds{min-height:1.4em;font-variant-numeric:tabular-nums}
#dialog.order-sheet{
  margin:auto auto var(--safe-bottom);
  background:#f6ecdcf0;
  backdrop-filter:blur(16px);
  box-shadow:0 12px 42px #170e1048;
}
#dialog.order-sheet::backdrop{background:#23190c42}
#dialog.order-sheet:has(.dish-grid) .dish{min-height:44px}
#dialog.order-sheet .dialog-actions{position:sticky;bottom:-18px;margin-inline:-18px;margin-bottom:-18px;padding:6px 18px 12px;background:#f3e8d9fa;z-index:1}
.dish-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:0;border:0;margin:12px 0}
dialog .dish{display:flex;align-items:center;gap:7px;min-height:50px;padding:6px 9px;border:1px solid #dac5a9;border-radius:10px;background:#fbefdc;font-size:.95rem;cursor:pointer}
dialog .dish:has(input:checked){border-color:#7d5936;background:#ecdec5}
.dish input{margin:0 !important}
.dish-icon{width:17px;height:17px;flex-shrink:0;border:3px solid #d5c0a2;border-radius:50%;background:var(--dish-color)}
.order-items{padding-inline-start:1.4em}
@media (max-width:350px){.dish-icon{display:none}.dish-grid{gap:6px}}
@media (orientation:landscape) and (max-height:500px) and (max-width:950px){
  .bottom{left:auto;right:max(var(--edge),env(safe-area-inset-right));transform:none;max-width:calc(100% - var(--pad-size,88px) - 44px - env(safe-area-inset-left) - env(safe-area-inset-right))}
  .bottom .actions{justify-content:flex-end}
  .joystick{display:block;bottom:var(--safe-bottom)}
}

.room-actions{margin-top:12px}
.seat-grid .button{font-variant-numeric:tabular-nums}
dialog details{border-bottom:1px solid #e5d7be;padding:5px 0}
dialog summary{min-height:44px;padding-block:9px;cursor:pointer}
dialog details:last-of-type{margin-bottom:12px}
.overlay{overflow:auto;overscroll-behavior:contain}
@media (max-height:480px){
  .entry-toolbar{padding-block:10px 4px}
  .card{padding-block:18px 25px}
  .card h1{font-size:clamp(35px,10vh,62px);margin-bottom:6px}
  .card .entry-tagline{font-size:clamp(18px,5vh,25px);margin-bottom:7px}
  .card .entry-description{margin-bottom:12px}
  dialog{max-height:90dvh}
}

@media (max-width:430px){
  .top-actions{max-width:min(62%,13.6rem);justify-content:flex-end}
  .top-actions .button{min-width:44px}
}
