/* ============================================================
   KFC India Kitchen OS — Design Tokens & Base Styles
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Barlow+Condensed:wght@500;600;700;800&family=Noto+Sans:wght@400;500;600;700;800&family=Noto+Sans+Devanagari:wght@500;600;700&family=JetBrains+Mono:wght@500;700&display=swap');
@import url('https://fonts.googleapis.com/icon?family=Material+Symbols+Rounded');

:root {
  /* Brand */
  --kfc-red: #E4002B;
  --kfc-red-dark: #B30022;
  --kfc-red-deep: #7A0019;
  --kfc-black: #1A1A1A;
  --kfc-ink: #0D0D0D;
  --kfc-charcoal: #232323;
  --kfc-graphite: #2E2E2E;
  --kfc-white: #FFFFFF;
  --kfc-bone: #F5F2EC;
  --kfc-gold: #F0A500;
  --kfc-gold-deep: #C58800;

  /* States */
  --state-ready: #1FAA59;
  --state-ready-deep: #128043;
  --state-warn: #F0A500;
  --state-urgent: #E4002B;
  --state-off: #5A5A5A;

  /* Type */
  --display: 'Bebas Neue', 'Barlow Condensed', sans-serif;
  --tile: 'Barlow Condensed', sans-serif;
  --body: 'Noto Sans', 'Noto Sans Devanagari', sans-serif;
  --hi: 'Noto Sans Devanagari', 'Noto Sans', sans-serif;
  --mono: 'JetBrains Mono', monospace;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-font-smoothing: antialiased; }

html, body {
  background: #050505;
  color: var(--kfc-white);
  font-family: var(--body);
  overflow: hidden;
  height: 100%;
  width: 100%;
  touch-action: manipulation;
}

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
button:focus-visible { outline: 2px solid var(--kfc-gold); outline-offset: 2px; }

.material-symbols-rounded {
  font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 24;
}

/* ============================================================
   APP ROOT — fills full browser window
   ============================================================ */
#root {
  position: fixed;
  inset: 0;
}

.screen {
  width: 100%; height: 100%;
  background: var(--kfc-bone);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* film grain subtle texture */
.screen::after {
  content: '';
  position: absolute; inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(rgba(255,255,255,0.018) 1px, transparent 1px);
  background-size: 3px 3px;
  mix-blend-mode: overlay;
  opacity: 0.6;
}

/* ============================================================
   TOP BAR (persistent)
   ============================================================ */
.topbar {
  height: 84px;
  flex-shrink: 0;
  background: var(--kfc-ink);
  color: var(--kfc-white);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 22px;
  position: relative;
  z-index: 30;
  border-bottom: 3px solid var(--kfc-red);
}
.topbar::before {
  /* red glow */
  content: '';
  position: absolute; left: 0; right: 0; bottom: -3px; height: 3px;
  background: linear-gradient(90deg, transparent, var(--kfc-red) 20%, var(--kfc-red) 80%, transparent);
  filter: drop-shadow(0 0 8px rgba(228,0,43,0.6));
}

.tb-left, .tb-right { display: flex; align-items: center; gap: 14px; }
.tb-right { justify-content: flex-end; }

.kfc-logo {
  display: flex; align-items: center; gap: 12px;
  cursor: pointer;
}
.kfc-logo .mark {
  width: 56px; height: 56px;
  background: var(--kfc-red);
  display: grid; place-items: center;
  border-radius: 6px;
  box-shadow: 0 4px 0 var(--kfc-red-deep), inset 0 -3px 0 rgba(0,0,0,0.25);
  position: relative;
  overflow: hidden;
  padding: 7px;
  flex-shrink: 0;
}
.kfc-logo .mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.kfc-logo .mark::after {
  content: '';
  position: absolute; inset: 4px;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 3px;
  pointer-events: none;
}
.kfc-logo .text {
  font-family: var(--display);
  font-size: 22px;
  letter-spacing: 2px;
  line-height: 1;
}
.kfc-logo .text small {
  display: block;
  font-family: var(--body);
  font-size: 10px;
  letter-spacing: 3px;
  color: var(--kfc-gold);
  font-weight: 700;
  margin-top: 3px;
}

.tb-center {
  display: flex; align-items: center; gap: 24px;
  background: var(--kfc-charcoal);
  padding: 10px 22px;
  border-radius: 10px;
  border: 1px solid #333;
}
.tb-loc {
  display: flex; flex-direction: column;
  font-size: 11px;
  letter-spacing: 1.5px;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
}
.tb-loc strong {
  font-family: var(--tile);
  font-size: 18px;
  letter-spacing: 0.5px;
  color: white;
  font-weight: 700;
}
.tb-divider { width: 1px; height: 28px; background: #3a3a3a; }
.tb-shift {
  font-family: var(--tile);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--kfc-gold);
  display: flex; align-items: center; gap: 8px;
}
.tb-shift .pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--state-ready);
  box-shadow: 0 0 0 0 rgba(31,170,89,0.7);
  animation: pulse 1.6s var(--ease) infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(31,170,89,0.7); }
  70%  { box-shadow: 0 0 0 10px rgba(31,170,89,0); }
  100% { box-shadow: 0 0 0 0 rgba(31,170,89,0); }
}
.tb-clock {
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 700;
  color: white;
  font-feature-settings: 'tnum';
  min-width: 96px;
  text-align: center;
}

.tb-icon {
  position: relative;
  width: 56px; height: 56px;
  border-radius: 10px;
  background: var(--kfc-charcoal);
  border: 1px solid #333;
  display: grid; place-items: center;
  transition: all 0.18s var(--ease);
}
.tb-icon:hover { background: #2c2c2c; }
.tb-icon:active { transform: scale(0.95); }
.tb-icon .material-symbols-rounded { font-size: 28px; color: white; }
.tb-icon .badge {
  position: absolute; top: -6px; right: -6px;
  min-width: 22px; height: 22px;
  border-radius: 11px;
  background: var(--kfc-red);
  color: white;
  font-family: var(--tile);
  font-weight: 800;
  font-size: 12px;
  display: grid; place-items: center;
  padding: 0 6px;
  border: 2px solid var(--kfc-ink);
  letter-spacing: 0.5px;
}
.tb-icon .badge.gold { background: var(--kfc-gold); color: var(--kfc-black); }

.tb-user {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 14px 6px 6px;
  background: var(--kfc-charcoal);
  border: 1px solid #333;
  border-radius: 10px;
}
.tb-user .av {
  width: 44px; height: 44px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--kfc-red), var(--kfc-red-deep));
  display: grid; place-items: center;
  font-family: var(--tile);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.5px;
  color: white;
}
.tb-user .name {
  display: flex; flex-direction: column; line-height: 1.1;
}
.tb-user .name strong {
  font-family: var(--tile);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.4px;
}
.tb-user .name small {
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  margin-top: 1px;
}

/* ============================================================
   CONTENT AREA
   ============================================================ */
.content {
  flex: 1;
  min-height: 0;
  position: relative;
  overflow: hidden;
  display: flex;
}

.view {
  flex: 1;
  min-height: 0;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* page transition */
.view-enter { animation: viewEnter 0.32s var(--ease) both; }
@keyframes viewEnter {
  from { opacity: 0; transform: translateY(8px) scale(0.995); }
  to { opacity: 1; transform: none; }
}

/* ============================================================
   BREADCRUMB / SECONDARY HEADER
   ============================================================ */
.subhead {
  flex-shrink: 0;
  background: white;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 26px;
  border-bottom: 1px solid #e8e0d6;
}
.back-btn {
  display: flex; align-items: center; gap: 10px;
  height: 56px;
  padding: 0 18px 0 12px;
  background: var(--kfc-black);
  color: white;
  border-radius: 10px;
  transition: all 0.16s var(--ease);
  font-family: var(--tile);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.5px;
}
.back-btn:hover { background: var(--kfc-red); }
.back-btn:active { transform: scale(0.97); }
.back-btn .material-symbols-rounded { font-size: 28px; }

.subhead-title {
  display: flex; flex-direction: column; line-height: 1;
}
.subhead-title .en {
  font-family: var(--display);
  font-size: 36px;
  letter-spacing: 1.5px;
  color: var(--kfc-black);
}
.subhead-title .hi {
  font-family: var(--hi);
  font-size: 18px;
  font-weight: 600;
  color: var(--kfc-red);
  margin-top: 4px;
  letter-spacing: 0.5px;
}

.subhead-spacer { flex: 1; }

.subhead-stat {
  display: flex; flex-direction: column; line-height: 1;
  text-align: right;
  padding: 0 14px;
}
.subhead-stat .v {
  font-family: var(--display);
  font-size: 32px;
  color: var(--kfc-black);
  letter-spacing: 1px;
}
.subhead-stat .l {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #777;
  margin-top: 4px;
  font-weight: 700;
}
.subhead-stat.urgent .v { color: var(--kfc-red); }

/* ============================================================
   COMMON: status pills, badges
   ============================================================ */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  height: 28px; padding: 0 12px;
  border-radius: 14px;
  font-family: var(--tile);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}
.pill.ready  { background: rgba(31,170,89,0.12); color: var(--state-ready-deep); border: 1px solid rgba(31,170,89,0.3); }
.pill.warn   { background: rgba(240,165,0,0.14); color: #8a5d00; border: 1px solid rgba(240,165,0,0.35); }
.pill.urgent { background: rgba(228,0,43,0.10); color: var(--kfc-red); border: 1px solid rgba(228,0,43,0.3); }
.pill.off    { background: rgba(0,0,0,0.06); color: #555; border: 1px solid rgba(0,0,0,0.12); }
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }

.chip-ai {
  display: inline-flex; align-items: center; gap: 4px;
  height: 22px; padding: 0 10px;
  border-radius: 6px;
  background: linear-gradient(135deg, #F0A500, #C58800);
  color: var(--kfc-black);
  font-family: var(--tile);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 1.5px;
  box-shadow: 0 2px 0 #8a5d00, inset 0 1px 0 rgba(255,255,255,0.4);
}

/* ============================================================
   CONFIRM OVERLAY
   ============================================================ */
.overlay {
  position: absolute; inset: 0; z-index: 100;
  background: rgba(10,10,10,0.7);
  backdrop-filter: blur(6px);
  display: grid; place-items: center;
  animation: fadeIn 0.2s var(--ease);
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.confirm {
  width: 560px;
  background: white;
  border-radius: 16px;
  border-top: 6px solid var(--kfc-red);
  padding: 36px;
  text-align: center;
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
  animation: pop 0.28s var(--ease);
}
@keyframes pop { from { transform: scale(0.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.confirm .icon {
  width: 88px; height: 88px;
  margin: 0 auto 18px;
  background: var(--kfc-red);
  border-radius: 50%;
  display: grid; place-items: center;
}
.confirm .icon .material-symbols-rounded { font-size: 56px; color: white; }
.confirm h2 {
  font-family: var(--display);
  font-size: 44px;
  letter-spacing: 2px;
  color: var(--kfc-black);
  line-height: 1;
}
.confirm .hi {
  font-family: var(--hi);
  font-size: 22px;
  color: var(--kfc-red);
  margin-top: 8px;
  font-weight: 600;
}
.confirm p {
  font-size: 18px;
  color: #555;
  margin: 16px 0 28px;
}
.confirm .btn-row {
  display: flex; gap: 14px;
}
.confirm .btn-row > button {
  flex: 1; height: 80px;
  border-radius: 12px;
  font-family: var(--display);
  font-size: 30px;
  letter-spacing: 1.5px;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  transition: transform 0.12s var(--ease);
}
.confirm .btn-row > button:active { transform: scale(0.97); }
.btn-yes {
  background: var(--kfc-red); color: white;
  box-shadow: 0 6px 0 var(--kfc-red-deep);
}
.btn-no {
  background: white; color: var(--kfc-black);
  box-shadow: inset 0 0 0 2px var(--kfc-black);
}

/* ============================================================
   APP NAV (bottom nav for quick switch)
   ============================================================ */
.appnav-shell {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 126px;
  z-index: 55;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  pointer-events: none;
}
.appnav-handle {
  position: absolute;
  left: 50%;
  bottom: 8px;
  transform: translateX(-50%);
  width: 92px;
  height: 20px;
  border-radius: 999px;
  background: rgba(20,20,20,0.92);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 8px 26px rgba(0,0,0,0.35);
  display: grid;
  place-items: center;
  pointer-events: auto;
  transition: opacity 0.2s var(--ease), transform 0.24s var(--ease), background 0.2s var(--ease);
}
.appnav-handle span {
  width: 42px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,0.72);
}
.appnav-handle:hover,
.appnav-handle:focus-visible {
  background: rgba(35,35,35,0.98);
}
.appnav-shell.nav-open .appnav-handle,
.appnav-shell:focus-within .appnav-handle {
  opacity: 0.16;
  transform: translateX(-50%) translateY(18px);
}
.appnav {
  max-width: min(1040px, calc(100vw - 24px));
  margin-bottom: 14px;
  display: flex;
  gap: 6px;
  padding: 8px;
  background: rgba(20,20,20,0.94);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 18px 50px rgba(0,0,0,0.52);
  overflow-x: auto;
  scrollbar-width: none;
  opacity: 0;
  transform: translateY(calc(100% + 22px)) scale(0.98);
  pointer-events: none;
  transition: transform 0.28s var(--ease), opacity 0.2s var(--ease);
}
.appnav::-webkit-scrollbar { display: none; }
.appnav-shell.nav-open .appnav,
.appnav-shell:focus-within .appnav {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.appnav button {
  width: 74px;
  min-width: 74px;
  height: 64px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: rgba(255,255,255,0.68);
  transition: background 0.16s var(--ease), color 0.16s var(--ease), transform 0.16s var(--ease), box-shadow 0.16s var(--ease);
}
.appnav button:hover,
.appnav button:focus-visible {
  color: white;
  background: rgba(255,255,255,0.08);
}
.appnav button.active {
  background: var(--kfc-red); color: white;
  box-shadow: 0 4px 0 var(--kfc-red-deep);
}
.appnav button .material-symbols-rounded { font-size: 27px; line-height: 1; }
.appnav button .nav-label {
  font-family: var(--tile);
  font-weight: 800;
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  white-space: nowrap;
}
.appnav button.active .nav-label { color: white; }

@media (max-width: 720px) {
  .appnav-shell { height: 116px; }
  .appnav {
    max-width: calc(100vw - 14px);
    margin-bottom: 10px;
    padding: 7px;
    border-radius: 16px;
  }
  .appnav button {
    width: 64px;
    min-width: 64px;
    height: 58px;
    border-radius: 10px;
  }
  .appnav button .material-symbols-rounded { font-size: 24px; }
  .appnav button .nav-label { font-size: 10px; letter-spacing: 0.2px; }
  .appnav-handle { bottom: 7px; width: 82px; height: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .appnav,
  .appnav-handle {
    transition: none;
  }
}

/* ============================================================
   SCROLLABLE BODY
   ============================================================ */
.body-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 24px;
}
.body-scroll::-webkit-scrollbar { width: 8px; }
.body-scroll::-webkit-scrollbar-track { background: transparent; }
.body-scroll::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); border-radius: 4px; }

/* ============================================================
   FOOD PHOTO PLACEHOLDER
   ============================================================ */
.food-photo {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(228,0,43,0.85), rgba(122,0,25,0.95)),
    repeating-linear-gradient(45deg, transparent 0 8px, rgba(255,255,255,0.04) 8px 9px);
  display: grid; place-items: center;
  color: white;
  font-family: var(--tile);
  font-weight: 800;
  text-align: center;
  letter-spacing: 1px;
  text-transform: uppercase;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08), inset 0 -30px 50px rgba(0,0,0,0.4);
}
.food-photo::before {
  /* "image" badge in corner */
  content: 'IMG';
  position: absolute; top: 8px; left: 8px;
  font-size: 10px;
  letter-spacing: 1.5px;
  padding: 2px 6px;
  background: rgba(255,255,255,0.15);
  border-radius: 4px;
  font-weight: 800;
}
.food-photo .label-stack { padding: 12px; line-height: 1.1; }
.food-photo .label-stack .name { font-size: 20px; }
.food-photo .label-stack .sub  { font-size: 12px; opacity: 0.7; margin-top: 4px; letter-spacing: 2px; }

/* shimmer */
.food-photo::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,0.08) 50%, transparent 65%);
  pointer-events: none;
}

/* ============================================================
   TILE PRESS / HOVER
   ============================================================ */
.press {
  transition: transform 0.14s var(--ease), box-shadow 0.14s var(--ease);
}
.press:active { transform: translateY(2px) scale(0.995); }

/* ============================================================
   BROADCAST BANNER
   ============================================================ */
.broadcast {
  flex-shrink: 0;
  background: linear-gradient(90deg, var(--kfc-gold) 0%, #ffba2e 100%);
  color: var(--kfc-black);
  padding: 10px 24px;
  display: flex; align-items: center; gap: 14px;
  font-family: var(--tile);
  font-weight: 700;
  letter-spacing: 0.5px;
  position: relative;
  border-bottom: 2px solid var(--kfc-gold-deep);
}
.broadcast .icon-tag {
  width: 32px; height: 32px;
  background: var(--kfc-black);
  color: var(--kfc-gold);
  border-radius: 6px;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.broadcast .marquee {
  flex: 1;
  font-size: 16px;
  display: flex; gap: 60px;
  white-space: nowrap;
  overflow: hidden;
}
.broadcast .marquee span {
  animation: marquee 28s linear infinite;
}
@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.broadcast button.dismiss {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(0,0,0,0.15);
  display: grid; place-items: center;
  color: var(--kfc-black);
}

/* ============================================================
   FLOATING NAV
   ============================================================ */

/* ── STATE B: floating expanded pill ── */
.fn-pill {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 8px;
  background: rgba(26,26,26,0.95);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 12px 40px rgba(0,0,0,0.55), 0 4px 12px rgba(0,0,0,0.35);
  -webkit-user-select: none;
  user-select: none;
  touch-action: none;
}

.fn-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  width: 54px;
  height: 54px;
  border-radius: 10px;
  color: rgba(255,255,255,0.5);
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
  padding: 5px 2px 3px;
}
.fn-item:hover   { color: white; background: rgba(255,255,255,0.08); }
.fn-item.fn-active {
  background: var(--kfc-red);
  color: white;
  box-shadow: 0 4px 0 var(--kfc-red-deep);
}
.fn-item .material-symbols-rounded { font-size: 22px; }
.fn-item .fn-lbl {
  font-family: var(--tile);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
}

.fn-collapse {
  display: grid; place-items: center;
  width: 38px; height: 38px;
  border-radius: 8px;
  margin-left: 4px;
  color: rgba(255,255,255,0.3);
  border-left: 1px solid rgba(255,255,255,0.08);
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.fn-collapse:hover { color: white; background: rgba(255,255,255,0.08); }
.fn-collapse .material-symbols-rounded { font-size: 20px; }

/* ── STATE C: collapsed icon ── */
.fn-collapsed {
  width: 56px; height: 56px;
  border-radius: 14px;
  background: rgba(26,26,26,0.95);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 12px 40px rgba(0,0,0,0.55);
  display: grid; place-items: center;
  color: white;
  cursor: pointer;
  user-select: none;
  touch-action: none;
}
.fn-collapsed .material-symbols-rounded { font-size: 28px; }

/* glow on drag activation */
.fn-glow {
  animation: fnGlow 0.55s var(--ease) forwards;
}
@keyframes fnGlow {
  0%   { box-shadow: 0 0 0 0   rgba(240,165,0,0.9); }
  40%  { box-shadow: 0 0 0 10px rgba(240,165,0,0.4); }
  100% { box-shadow: 0 0 0 0   rgba(240,165,0,0);   }
}

/* ── STATE A: docked top bar ── */
.fn-topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 84px;
  background: var(--kfc-ink);
  color: white;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  padding: 0 22px;
  gap: 16px;
  z-index: 9999;
  border-bottom: 3px solid var(--kfc-red);
  user-select: none;
  touch-action: none;
}
.fn-topbar::before {
  content: '';
  position: absolute; left: 0; right: 0; bottom: -3px; height: 3px;
  background: linear-gradient(90deg, transparent, var(--kfc-red) 20%, var(--kfc-red) 80%, transparent);
  filter: drop-shadow(0 0 8px rgba(228,0,43,0.6));
}

/* push screen content down when top bar is active */
.fn-topbar-offset .content,
.fn-topbar-offset .broadcast {
  position: relative;
}
.fn-topbar-offset > .content { margin-top: 84px; }
.fn-topbar-offset > .broadcast { margin-top: 84px; }

.fn-logo {
  display: flex; align-items: center; gap: 12px; flex-shrink: 0;
}
.fn-mark {
  width: 56px; height: 56px;
  background: var(--kfc-red);
  display: grid; place-items: center;
  border-radius: 6px;
  box-shadow: 0 4px 0 var(--kfc-red-deep);
  overflow: hidden;
  padding: 7px;
  flex-shrink: 0;
}
.fn-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.fn-wordmark {
  font-family: var(--display);
  font-size: 22px;
  letter-spacing: 2px;
  line-height: 1;
}
.fn-wordmark small {
  display: block;
  font-family: var(--body);
  font-size: 10px;
  letter-spacing: 3px;
  color: var(--kfc-gold);
  font-weight: 700;
  margin-top: 3px;
}

.fn-items-top {
  display: flex; gap: 2px;
  justify-content: center;
  overflow: hidden;
}
.fn-item-top {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  min-width: 60px; height: 68px;
  border-radius: 10px;
  color: rgba(255,255,255,0.5);
  padding: 6px 4px 4px;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.fn-item-top:hover    { color: white; background: rgba(255,255,255,0.08); }
.fn-item-top.fn-active { background: var(--kfc-red); color: white; }
.fn-item-top .material-symbols-rounded { font-size: 24px; }
.fn-item-top .fn-lbl {
  font-family: var(--tile);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.fn-topbar-right {
  display: flex; align-items: center; gap: 14px; flex-shrink: 0;
}
.fn-loc {
  display: flex; flex-direction: column;
  font-size: 11px; letter-spacing: 1.5px;
  color: rgba(255,255,255,0.5);
}
.fn-loc small { font-size: 10px; text-transform: uppercase; }
.fn-loc strong { font-family: var(--tile); font-size: 18px; color: white; font-weight: 700; }
.fn-divider { width: 1px; height: 28px; background: #3a3a3a; }
.fn-clock {
  font-family: var(--mono); font-size: 22px; font-weight: 700; color: white;
}
.fn-detach {
  width: 44px; height: 44px;
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  display: grid; place-items: center;
  color: rgba(255,255,255,0.5);
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.fn-detach:hover { color: white; background: rgba(255,255,255,0.12); }
.fn-detach .material-symbols-rounded { font-size: 20px; }
