@font-face { font-family: 'Playfair Display'; font-weight: 600; src: url(fonts/playfair-display-latin-600-normal.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'Playfair Display'; font-weight: 700; src: url(fonts/playfair-display-latin-700-normal.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'Playfair Display'; font-weight: 600; font-style: italic; src: url(fonts/playfair-display-latin-600-italic.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'Inter'; font-weight: 400; src: url(fonts/inter-latin-400-normal.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'Inter'; font-weight: 600; src: url(fonts/inter-latin-600-normal.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'Inter'; font-weight: 700; src: url(fonts/inter-latin-700-normal.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'Space Grotesk'; font-weight: 600; src: url(fonts/space-grotesk-latin-600-normal.woff2) format('woff2'); font-display: swap; }

:root {
  --bg: #061A23; --bg2: #0A2833; --panel: #0C2731; --card: #0E2F3B; --card2: #133A48; --line: #21505F;
  --fg: #F3FAF9; --muted: #93B3BA; --dim: #5D7F88;
  --teal: #3DDCCB; --gold: #F4C35A; --coral: #FF7B5C; --red: #FF4D5E; --green: #7BD389; --sky: #5DB7FF;
  --r: 16px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: radial-gradient(120% 70% at 50% 0%, var(--bg2) 0%, var(--bg) 70%) fixed, var(--bg);
  color: var(--fg);
  font: 400 15px/1.45 Inter, system-ui, -apple-system, sans-serif;
  min-height: 100vh;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.label { font-family: 'Space Grotesk', Inter, sans-serif; font-weight: 600; font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); }
.serif { font-family: 'Playfair Display', Georgia, serif; }

/* ---------- top bar ---------- */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.brand { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.brand b { font-family: 'Playfair Display', Georgia, serif; font-size: 20px; }
.brand b span { color: var(--gold); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.pill.poc { color: var(--gold); border-color: #F4C35A66; }
.top-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 14px; border-radius: 999px; border: 1.5px solid var(--line); background: rgba(255,255,255,.03); font-weight: 600; font-size: 14px; text-decoration: none; color: var(--fg); white-space: nowrap; }
.btn:hover { border-color: var(--teal); }
.btn.primary { background: var(--teal); border-color: var(--teal); color: var(--bg); }
.btn.gold { background: var(--gold); border-color: var(--gold); color: var(--bg); }
.btn.danger { border-color: #FF4D5E88; color: #FFB3BA; }
.btn.small { padding: 6px 11px; font-size: 13px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

/* ---------- layout ---------- */
.tabs { display: none; gap: 6px; padding: 10px 16px 0; }
.tabs button { flex: 1; padding: 10px 6px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); font-weight: 600; font-size: 13px; }
.tabs button.on { border-color: var(--teal); color: var(--teal); }
.grid { display: grid; grid-template-columns: 1.15fr 1fr 1.05fr; gap: 14px; padding: 14px 16px 120px; align-items: start; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 16px; min-width: 0; transition: box-shadow .3s, border-color .3s; }
.panel.spot { border-color: var(--gold); box-shadow: 0 0 0 3px #F4C35A44, 0 20px 60px rgba(0,0,0,.35); }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.panel-head h2 { margin: 0; font-family: 'Playfair Display', Georgia, serif; font-size: 22px; }
body.single .grid { grid-template-columns: 1fr; max-width: 900px; margin: 0 auto; }
body.single .tabs { display: none !important; }
@media (max-width: 1100px) {
  .tabs { display: flex; }
  .grid { grid-template-columns: 1fr; }
  .grid > .panel:not(.show) { display: none; }
}

/* ---------- kiosk ---------- */
.kiosk-screen { position: relative; display: grid; grid-template-columns: 170px 1fr; gap: 14px; align-items: end; padding: 14px; border-radius: 18px; background: radial-gradient(80% 90% at 20% 80%, #3DDCCB33, transparent 70%), linear-gradient(180deg, #0B3540, #071E26); border: 1px solid #1B4C59; }
.avatar { width: 170px; }
.avatar svg { width: 100%; height: auto; display: block; }
.avatar .mouth-open { display: none; }
.speaking .avatar .mouth-open { display: inline; animation: talk .28s infinite alternate; transform-origin: 200px 316px; }
.speaking .avatar .mouth-closed { display: none; }
@keyframes talk { from { transform: scaleY(.35); } to { transform: scaleY(1.1); } }
.avatar .blink { animation: blink 4.5s infinite; transform-origin: 200px 245px; }
@keyframes blink { 0%, 94%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.1); } }
.kiosk-side { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.status-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.dot { width: 9px; height: 9px; border-radius: 9px; background: var(--dim); display: inline-block; }
.dot.on { background: var(--green); box-shadow: 0 0 0 4px #7BD38933; }
.dot.speak { background: var(--teal); box-shadow: 0 0 0 4px #3DDCCB44; }
.talk-btn { width: 100%; padding: 14px; border-radius: 14px; border: none; font-weight: 700; font-size: 17px; background: var(--teal); color: var(--bg); display: flex; justify-content: center; align-items: center; gap: 10px; }
.talk-btn.live { background: var(--coral); }
.lang-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.lang-chips button { padding: 4px 9px; border-radius: 999px; border: 1px solid var(--line); background: transparent; font-size: 12px; font-weight: 600; }
.lang-chips button.on { border-color: var(--teal); color: var(--teal); }
.transcript { margin-top: 12px; height: 260px; overflow-y: auto; padding: 12px; border-radius: 14px; background: rgba(0,0,0,.22); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; scroll-behavior: smooth; }
.msg { max-width: 88%; padding: 9px 12px; border-radius: 14px; line-height: 1.4; }
.msg.ai { align-self: flex-start; background: var(--card2); border-bottom-left-radius: 4px; }
.msg.user { align-self: flex-end; background: var(--teal); color: var(--bg); border-bottom-right-radius: 4px; font-weight: 600; }
.msg.sys { align-self: center; max-width: 100%; background: transparent; color: var(--muted); font-size: 12px; text-align: center; padding: 2px 6px; }
.msg.tool { align-self: flex-start; background: transparent; border: 1px dashed var(--line); color: var(--muted); font-size: 12px; padding: 4px 10px; }
.compose { display: flex; gap: 8px; margin-top: 10px; }
.compose input { flex: 1; min-width: 0; padding: 11px 14px; border-radius: 999px; border: 1.5px solid var(--line); background: rgba(0,0,0,.25); }
.compose input:focus { border-color: var(--teal); outline: none; }
.tries { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.tries button { padding: 6px 10px; border-radius: 999px; border: 1px dashed #3DDCCB77; background: transparent; color: var(--teal); font-size: 12.5px; font-weight: 600; text-align: left; }
.a11y-row { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.kcard { margin-top: 12px; padding: 14px; border-radius: 16px; background: var(--card); border: 1.5px solid var(--teal); animation: pop .35s ease-out; }
.kcard.gold { border-color: var(--gold); }
.kcard.coral { border-color: var(--coral); }
.kcard h3 { margin: 4px 0 6px; font-size: 18px; }
.kcard ol { margin: 6px 0 0; padding-left: 20px; }
.kcard .row { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; border-top: 1px solid var(--line); font-size: 14px; }
.kcard .row:first-of-type { border-top: none; }
.keyqr { width: 74px; height: 74px; border-radius: 10px; background: #fff; padding: 6px; flex-shrink: 0; }
@keyframes pop { from { transform: scale(.96); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* accessibility modes */
body.mode-deaf .transcript { height: 340px; font-size: 20px; }
body.mode-deaf .msg.ai { background: #fff; color: #000; font-weight: 600; }
body.mode-deaf .flash { animation: flash .5s 3; }
@keyframes flash { 50% { background: #F4C35A; } }
body.mode-blind .talk-btn { padding: 22px; font-size: 22px; }
.mode-banner { display: none; margin-top: 10px; padding: 10px 12px; border-radius: 12px; font-size: 13px; }
body.mode-deaf .mode-banner.deaf, body.mode-blind .mode-banner.blind { display: block; background: #F4C35A1F; border: 1px solid #F4C35A77; }

/* ---------- room tablet ---------- */
.tablet { border-radius: 26px; padding: 12px; background: #0B252D; border: 2px solid #1C4652; }
.tablet-inner { border-radius: 18px; background: linear-gradient(160deg, #0F3440, #071C23); padding: 14px; }
.door { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; border: 1.5px solid var(--line); margin-bottom: 12px; flex-wrap: wrap; }
.door.open { border-color: var(--green); background: #7BD3891A; }
.door-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: #FF7B5C22; color: var(--coral); font-size: 22px; font-weight: 700; }
.door.open .door-icon { background: #7BD38922; color: var(--green); }
.controls { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.ctl { padding: 12px; border-radius: 14px; border: 1.5px solid var(--line); background: rgba(255,255,255,.03); min-width: 0; transition: border-color .3s, background .3s; }
.ctl.on { border-color: var(--teal); background: #3DDCCB14; }
.ctl.bump { animation: bump .6s; }
@keyframes bump { 30% { box-shadow: 0 0 0 4px #F4C35A88; } }
.ctl .v { font-weight: 700; font-size: 18px; margin: 2px 0 8px; }
.ctl .acts { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.ctl input[type=range] { width: 100%; accent-color: var(--teal); }
.ctl input[type=time] { background: transparent; border: 1px solid var(--line); border-radius: 8px; padding: 4px 6px; }
.swatch { width: 22px; height: 22px; border-radius: 22px; border: 2px solid transparent; }
.swatch.on { border-color: #fff; }
.room-glow { height: 8px; border-radius: 8px; margin-bottom: 12px; transition: background .5s, opacity .5s; }
select.inline { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 6px 8px; }

/* ---------- staff console ---------- */
.stabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.stabs button { padding: 7px 11px; border-radius: 999px; border: 1px solid var(--line); background: transparent; font-weight: 600; font-size: 13px; }
.stabs button.on { border-color: var(--teal); color: var(--teal); }
.stabs .n { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px; border-radius: 9px; background: var(--coral); color: var(--bg); font-size: 11px; }
.list { display: flex; flex-direction: column; gap: 8px; max-height: 560px; overflow-y: auto; }
.item { padding: 10px 12px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); animation: pop .3s ease-out; }
.item .meta { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); }
.item .what { font-weight: 600; margin-top: 2px; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; border: 1px solid currentColor; }
.tag.urgent { color: var(--red); } .tag.high { color: var(--coral); } .tag.normal { color: var(--gold); } .tag.low { color: var(--muted); }
.tag.done { color: var(--green); }
table.avail { width: 100%; border-collapse: collapse; font-size: 13px; }
table.avail td, table.avail th { padding: 6px 4px; border-bottom: 1px solid var(--line); text-align: left; }
table.avail td.n { text-align: right; font-weight: 700; }
td.full { color: var(--coral); }
.ops { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ops .btn { width: 100%; white-space: normal; text-align: center; }
.empty { color: var(--muted); font-size: 13px; padding: 10px 2px; }

/* ---------- banners & overlays ---------- */
.alert-bar { display: none; position: sticky; top: 0; z-index: 30; padding: 12px 16px; font-weight: 700; text-align: center; }
.alert-bar.fire { display: block; background: var(--red); color: #fff; animation: pulse 1s infinite alternate; }
.alert-bar.outage { display: block; background: var(--gold); color: var(--bg); }
@keyframes pulse { to { background: #B3122A; } }
.coach { position: fixed; right: 16px; bottom: 16px; z-index: 40; width: min(420px, calc(100vw - 32px)); background: #0F3440; border: 1.5px solid var(--gold); border-radius: 18px; padding: 16px; box-shadow: 0 30px 80px rgba(0,0,0,.55); display: none; }
.coach.show { display: block; }
.coach h3 { margin: 4px 0 6px; font-family: 'Playfair Display', Georgia, serif; font-size: 21px; }
.coach p { margin: 0 0 8px; color: #D5E6E8; }
.coach .say { margin: 8px 0; display: flex; flex-direction: column; gap: 6px; }
.coach .say button { text-align: left; padding: 8px 12px; border-radius: 12px; border: 1px dashed var(--teal); background: #3DDCCB12; color: var(--fg); font-weight: 600; }
.coach .expect { font-size: 13px; color: var(--muted); border-left: 3px solid var(--teal); padding-left: 10px; margin: 8px 0; }
.coach .nav { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 10px; }
.coach .bar { height: 4px; border-radius: 4px; background: var(--line); margin-top: 10px; overflow: hidden; }
.coach .bar div { height: 100%; background: var(--gold); }
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(2,10,14,.75); display: none; place-items: center; padding: 16px; }
.modal.show { display: grid; }
.modal .box { width: min(560px, 100%); max-height: 90vh; overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 20px; }
.toast { position: fixed; left: 50%; top: 14px; transform: translateX(-50%); z-index: 60; background: var(--card2); border: 1px solid var(--teal); padding: 10px 16px; border-radius: 12px; font-weight: 600; display: none; max-width: calc(100vw - 32px); }
.toast.show { display: block; animation: pop .25s; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@media (max-width: 520px) {
  .kiosk-screen { grid-template-columns: 110px 1fr; }
  .avatar { width: 110px; }
  .controls { grid-template-columns: 1fr; }
  .ops { grid-template-columns: 1fr; }
}
