/* DMT kiosk (/dmt), adapted from the /moc kiosk.
   Laid out on a fixed 1080×1920 portrait stage that dmt.js scales to fit the screen.
   Colours and fonts follow the live dmt.gov.ae (checked 20 Nov 2026): white and light grey
   surfaces, charcoal #3f3e45 for text and dark panels, dark teal #005f74 as the accent (#00acc3
   on dark), Roboto and Noto Kufi Arabic. The site's stylesheet also holds an older sand-gold
   palette (#afa57d) that the live pages no longer show, so it isn't used. Photos are AI-generated
   stand-ins; logos are DMT's own.
   The layout never mirrors in Arabic: the page stays ltr and text reads in its own direction. */

:root {
  --accent: #005f74;
  --accent-dark: #004b5c;
  --accent-text: #005f74;
  --accent-light: #00acc3;
  --accent-tint: #e5eff2;
  --accent-line: #cfe0e5;
  --accent-wash: #f4f8f9;
  --ink: #3f3e45;
  --body: #3f3e45;
  --muted: #55545b;
  --muted-2: #6e6d73;
  --charcoal: #3f3e45;
  --line: #e6e8eb;
  --grey: #f5f5f7;
  --ring: #005f74;
  --surface: #ffffff;
  /* Behind the stage when the screen's shape differs: the middle of Omar's backdrop. */
  --backdrop: #e3e3e1;
  --shadow-soft: 0 10px 28px rgba(28, 27, 32, 0.12);
  --shadow-card: 0 18px 44px rgba(28, 27, 32, 0.13);
  --font: 'Roboto', 'Noto Kufi Arabic', system-ui, sans-serif;
  --font-ar: 'Noto Kufi Arabic', 'Roboto', system-ui, sans-serif;
  --speaker-label: "المساعد";
  --visitor-label: "أنت";
}

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--backdrop);
}

button { font: inherit; color: inherit; }
button:focus-visible { outline: 4px solid var(--ring); outline-offset: 4px; }
[hidden] { display: none !important; }

.g-viewport {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: var(--backdrop);
}

.g-stage {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1080px;
  height: 1920px;
  /* clip, not hidden: the avatar overhangs the stage bottom, and a hidden overflow can still be
     scrolled by focus or scrollIntoView, which shifts the whole kiosk up. */
  overflow: clip;
  transform: translate(-50%, -50%) scale(var(--stage-scale, 0.5));
  transform-origin: center;
  font-family: var(--font);
  color: var(--ink);
  /* Omar's video background, sampled at both edges of the live stream every 100 video pixels and
     placed at his scaled position (top 96px, 96.5%), so the video's edges never show. */
  background: linear-gradient(180deg, #dfdfdc 0, #dfdfdc 98px, #dedfdb 193px, #dfe0db 289px, #e0e0de 386px, #e1e1df 482px, #e2e2e1 579px, #e2e2e1 675px, #e3e3e1 772px, #e4e4e2 868px, #e5e5e4 965px, #e8e8e6 1061px, #eaeae8 1158px, #eaeae8 1254px, #ebebeb 1351px, #eeeeec 1447px, #f2f3f0 1544px, #f3f4f2 1592px, #f7f7f6 1640px, #fafbf9 1688px, #eeeeed 1737px, #f2f5f4 1785px, #eef1f1 1833px, #e9ebed 1881px, #e4e6e6 1920px);
  -webkit-font-smoothing: antialiased;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

:root[lang|="ar"] .g-stage { font-family: var(--font-ar); }
[lang="ar"], [lang|="ar"] .g-alt:not([lang="en"]) { font-family: var(--font-ar); }

/* Omar's 1080×1920 video, scaled so his head sits clear below the top banner and his shoes just
   below the bottom banner. No mask: the backdrop matches the video's own background instead. */
#avatar {
  position: absolute;
  z-index: 0;
  left: var(--avatar-left, 19px);
  top: var(--avatar-top, 96px);
  width: var(--avatar-width, 1042px);
  height: var(--avatar-height, 1853px);
  display: block;
}

/* Banners */
.g-banner {
  position: absolute;
  z-index: 4;
  overflow: hidden;
  border-radius: 24px;
  box-shadow: var(--shadow-soft);
  direction: ltr;
}

/* Top banner: The Emirates nation-brand mark and the kiosk's topics on white, a teal slash, and
   DMT's own bilingual logo over the Abu Dhabi skyline washed to pale grey, with a soft glow behind
   the logo so its lettering stays crisp. */
.g-banner-top { left: 34px; top: 34px; width: 1012px; height: 170px; background: var(--surface); }

.g-top-art {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 50%;
  overflow: hidden;
  clip-path: polygon(16% 0, 100% 0, 100% 100%, 0 100%);
  background: var(--grey);
}

.g-top-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; filter: grayscale(1) brightness(1.15) contrast(0.85); opacity: 0.4; }
.g-top-art::after { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse 66% 74% at 60% 50%, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.45) 70%, rgba(255, 255, 255, 0)); }

/* The thin teal stroke alongside the skyline's diagonal edge. */
.g-banner-top::after {
  content: '';
  position: absolute;
  z-index: 2;
  top: 0;
  bottom: 0;
  left: calc(50% - 26px);
  width: 8%;
  background: linear-gradient(to bottom right, transparent calc(50% - 2px), var(--accent) calc(50% - 1px), var(--accent) calc(50% + 1px), transparent calc(50% + 2px));
  pointer-events: none;
}

.g-top-brand { position: absolute; z-index: 2; left: 34px; top: 0; bottom: 0; display: flex; align-items: center; gap: 18px; }
.g-logo-nation { height: 56px; width: auto; }
.g-top-divider { width: 2px; height: 96px; background: var(--accent); }
.g-top-text { display: flex; flex-direction: column; align-items: flex-start; max-width: 300px; }
.g-logo-dmt { position: absolute; z-index: 2; right: 40px; top: 50%; height: 104px; width: auto; transform: translateY(-50%); }

.g-top-lead { margin: 0; font-size: 16px; line-height: 1.15; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--body); }
.g-top-name { margin-top: 4px; font-size: 21px; line-height: 1.1; font-weight: 900; letter-spacing: -0.005em; text-transform: uppercase; white-space: pre-line; color: var(--accent-dark); }
.g-pillars { margin: 10px 0 0; display: flex; align-items: center; gap: 10px; font-size: 11px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--body); white-space: nowrap; }
.g-pillars i { width: 2px; height: 13px; background: var(--accent); }
:root[lang|="ar"] .g-top-lead { letter-spacing: 0; font-size: 17px; }
:root[lang|="ar"] .g-top-name { font-size: 25px; line-height: 1.45; font-weight: 700; letter-spacing: 0; }
:root[lang|="ar"] .g-pillars { letter-spacing: 0; font-size: 14px; margin-top: 2px; }

/* Bottom banner: the Abu Dhabi skyline at blue hour behind DMT's charcoal, with live text. */
.g-banner-bottom { left: 34px; top: 1660px; width: 1012px; height: 172px; background: var(--charcoal); }
.g-banner-bottom > img { position: absolute; top: 0; right: 0; width: 66%; height: 100%; object-fit: cover; object-position: 60% 55%; }

.g-banner-bottom::before {
  content: '';
  position: absolute;
  z-index: 1;
  inset: 0;
  background: linear-gradient(90deg, var(--charcoal) 0%, var(--charcoal) 36%, rgba(63, 62, 69, 0.74) 54%, rgba(63, 62, 69, 0.16) 76%, rgba(63, 62, 69, 0) 100%);
}

.g-bottom-text {
  position: absolute;
  z-index: 2;
  left: 40px;
  top: 0;
  bottom: 0;
  width: max-content;
  max-width: 620px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  color: #ffffff;
}

.g-bottom-eyebrow { font-size: 16px; font-weight: 500; letter-spacing: 0.3em; text-transform: uppercase; opacity: 0.9; }
.g-bottom-headline { margin: 6px 0 0; font-size: 38px; line-height: 1.1; font-weight: 900; letter-spacing: -0.01em; text-transform: uppercase; white-space: nowrap; }
.g-bottom-sub { margin: 10px 0 0; font-size: 18px; letter-spacing: 0.01em; white-space: nowrap; opacity: 0.9; }
:root[lang|="ar"] .g-bottom-eyebrow { letter-spacing: 0; font-size: 18px; }
:root[lang|="ar"] .g-bottom-headline { font-size: 36px; line-height: 1.45; font-weight: 700; letter-spacing: 0; }
:root[lang|="ar"] .g-bottom-sub { letter-spacing: 0; font-size: 18px; margin-top: 2px; }

.g-accent { color: var(--accent-light); }
.g-hero .g-accent { color: var(--accent); }

/* Name and organisation beside the avatar, under the top banner as /fred's greeting. Nothing moves
   when the language changes, so Arabic lines start at the same left edge as English. */
.g-intro {
  position: absolute;
  z-index: 3;
  left: 44px;
  top: 252px;
  width: 290px;
  text-align: left;
  transition: opacity 0.3s ease, visibility 0.3s;
}

.g-intro h1 { margin: 0; font-size: 38px; line-height: 1.15; font-weight: 900; letter-spacing: -0.01em; }
.g-intro p { margin: 8px 0 0; font-size: 22px; line-height: 1.35; color: var(--body); }
.g-intro h1[dir], .g-intro p[dir] { text-align: left; }
/* During a conversation the assistant's bubble takes the intro's place. */
.is-conversing .g-intro { opacity: 0; visibility: hidden; }
:root[lang|="ar"] .g-intro h1 { font-size: 34px; line-height: 1.5; font-weight: 700; letter-spacing: 0; }
:root[lang|="ar"] .g-intro p { font-size: 21px; line-height: 1.6; }

/* Language + microphone controls, level with the intro and clear of the carousel below. */
.g-controls {
  position: absolute;
  z-index: 5;
  right: 36px;
  top: 252px;
  width: 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
}

.language-stack, .microphone-stack { display: flex; flex-direction: column; align-items: center; gap: 12px; }

.g-round {
  width: 96px;
  height: 96px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 22px rgba(28, 27, 32, 0.14);
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.g-round:active:not(:disabled) { transform: scale(0.95); }
.g-round:disabled { opacity: 0.55; cursor: wait; }
.g-round svg { width: 38px; height: 38px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.microphone { width: 112px; height: 112px; background: var(--accent); color: #ffffff; box-shadow: 0 12px 28px rgba(0, 95, 116, 0.32); }
.microphone svg { width: 44px; height: 44px; stroke-width: 2; }
.microphone .stop-icon { display: none; fill: currentColor; stroke: none; width: 34px; height: 34px; }
.microphone.listening, .microphone.speaking {
  background: var(--accent-dark);
  box-shadow: 0 0 0 12px rgba(0, 95, 116, 0.2), 0 0 0 26px rgba(0, 95, 116, 0.08), 0 8px 22px rgba(28, 27, 32, 0.2);
  animation: g-listening 1.6s ease-in-out infinite;
}
.microphone.listening .mic-icon, .microphone.speaking .mic-icon { display: none; }
.microphone.listening .stop-icon, .microphone.speaking .stop-icon { display: block; }
.microphone.processing { animation: g-processing 0.9s ease-in-out infinite alternate; }

.g-caption {
  font-size: 20px;
  line-height: 1.3;
  font-weight: 500;
  color: var(--ink);
  text-align: center;
  white-space: pre-line;
}

#language-code { font-size: 22px; font-weight: 700; color: var(--ink); font-family: var(--font-ar); }
.microphone.listening + .g-caption, .microphone.speaking + .g-caption { color: var(--accent-text); font-weight: 700; }

/* Hero card: below the carousel, as on /fred. */
.g-hero {
  position: absolute;
  z-index: 3;
  left: 47px;
  top: 1050px;
  width: 986px;
  height: 300px;
  box-sizing: border-box;
  padding: 24px 32px 24px 42px;
  border-radius: 26px;
  background: var(--surface);
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
  gap: 30px;
  transition: opacity 0.35s ease, transform 0.35s ease, visibility 0.35s;
}

.g-hero > img { flex: 0 0 auto; width: 430px; height: 252px; border-radius: 18px; object-fit: cover; }
.g-hero-text { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: stretch; }
.g-hero h2 { margin: 0 0 10px; font-size: 38px; line-height: 1.05; font-weight: 900; letter-spacing: -0.02em; }
.g-hero h2 span { display: block; }
.g-hero p { margin: 0; font-size: 17px; line-height: 1.5; color: var(--body); }
.g-hero .g-primary { align-self: flex-start; margin-top: 18px; min-height: 52px; padding: 0 26px; font-size: 19px; gap: 12px; }
.g-hero .g-primary svg { width: 20px; height: 20px; }
:root[lang|="ar"] .g-hero h2 { font-size: 30px; line-height: 1.5; letter-spacing: 0; font-weight: 700; }
:root[lang|="ar"] .g-hero p { font-size: 16px; line-height: 1.75; }

.g-primary {
  margin-top: 22px;
  min-height: 58px;
  padding: 0 28px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #ffffff;
  font-size: 20px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
}

.g-primary:active { background: var(--accent-dark); }
.g-primary svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

.is-conversing .g-hero,
[data-screen="section"] .g-hero {
  opacity: 0;
  visibility: hidden;
  transform: translateY(24px);
}

/* Home carousel, as on /fred: a strip of photo cards with arrows and dots. The arrows move the ring
   from card to card (scrolling when they need to); a tap on a card opens its section. */
.g-carousel {
  position: absolute;
  z-index: 3;
  left: 0;
  top: 728px;
  width: 1080px;
  height: 304px;
  transition: opacity 0.3s ease, visibility 0.3s;
}

[data-screen="section"] .g-carousel { opacity: 0; visibility: hidden; }

.g-track {
  position: absolute;
  /* Room around the cards for their shadows and ring, which the scrolling strip would cut off. */
  left: 32px;
  top: 0;
  width: 1016px;
  height: 312px;
  box-sizing: border-box;
  padding: 10px 40px 54px;
  display: flex;
  gap: 16px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 40px;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.g-track::-webkit-scrollbar { display: none; }

.g-card {
  position: relative;
  flex: 0 0 184px;
  height: 244px;
  padding: 0;
  border: 0;
  border-radius: 18px;
  overflow: hidden;
  scroll-snap-align: start;
  cursor: pointer;
  background: var(--charcoal);
  box-shadow: 0 10px 22px rgba(28, 27, 32, 0.16);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.g-card:active { transform: scale(0.97); }
.g-card[aria-current="true"] { box-shadow: 0 0 0 4px #ffffff, 0 0 0 8px var(--ring), 0 12px 26px rgba(28, 27, 32, 0.22); }
.g-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.g-card::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(34, 34, 38, 0) 42%, rgba(34, 34, 38, 0.84) 100%); }

.g-card-label {
  position: absolute;
  z-index: 1;
  left: 18px;
  right: 14px;
  bottom: 18px;
  font-size: 23px;
  line-height: 1.1;
  font-weight: 700;
  color: #ffffff;
  text-align: start;
  white-space: pre-line;
}

/* A line longer than eleven characters ("Transport and") steps down so it stays on one line. */
.g-card-label.is-long { font-size: 19px; }
:root[lang|="ar"] .g-card-label { font-size: 22px; line-height: 1.35; }

.g-arrow {
  position: absolute;
  /* Above the cards, which scroll under the strip's edges. */
  z-index: 2;
  top: 107px;
  width: 50px;
  height: 50px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(28, 27, 32, 0.14);
  cursor: pointer;
}

.g-arrow[data-step="-1"] { left: 14px; }
.g-arrow[data-step="1"] { right: 14px; }
.g-arrow svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

.g-dots {
  position: absolute;
  left: 0;
  top: 278px;
  width: 1080px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.g-dots span { width: 10px; height: 10px; border-radius: 5px; background: #c4c4c4; transition: width 0.25s ease, background-color 0.25s ease; }
.g-dots span.is-active { width: 30px; background: var(--accent); }

/* Section view, as on /fred: one header bar, then the section's cards as a coverflow. */
.g-section {
  position: absolute;
  z-index: 3;
  left: 48px;
  top: 690px;
  width: 984px;
  height: 852px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  animation: g-rise 0.3s ease both;
}

.g-section:has(.g-spot) { gap: 0; }
.g-section-head { display: flex; align-items: center; gap: 22px; min-height: 72px; box-sizing: border-box; padding: 10px 28px 10px 10px; border-radius: 26px; background: rgba(255, 255, 255, 0.95); box-shadow: var(--shadow-card); }
.g-section-head .g-back { height: 52px; background: var(--accent-tint); box-shadow: none; }
.g-section-head .g-back svg { color: var(--accent); }
.g-section-titles { min-width: 0; display: flex; align-items: baseline; gap: 16px; overflow: hidden; }
.g-section-head h2 { margin: 0; font-size: 34px; line-height: 1.2; font-weight: 900; letter-spacing: -0.01em; white-space: nowrap; }
:root[lang|="ar"] .g-section-head h2 { letter-spacing: 0; font-weight: 700; font-size: 30px; line-height: 1.5; }
.g-alt { font-size: 22px; font-weight: 500; color: var(--muted-2); white-space: nowrap; }
.g-alt[lang="ar"] { font-family: var(--font-ar); }
.g-alt[lang="en"] { font-family: var(--font); }

.g-back {
  flex: 0 0 auto;
  height: 54px;
  padding: 0 24px 0 16px;
  border: 0;
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 19px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 6px 16px rgba(28, 27, 32, 0.14);
  cursor: pointer;
}

.g-back svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

.g-section-body {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: none;
}

.g-section-body::-webkit-scrollbar { display: none; }

.g-hint {
  margin: 26px auto 0;
  width: fit-content;
  max-width: 760px;
  box-sizing: border-box;
  padding: 18px 26px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 24px rgba(28, 27, 32, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-size: 19px;
  line-height: 1.4;
  color: var(--body);
  text-align: center;
}

:root[lang|="ar"] .g-hint { line-height: 1.7; }

/* Coverflow: the centred card is full size with a ring; the cards beside it are smaller and dimmed
   and carry their title only. Tap a side card to centre it, the centred one to open it. */
.g-spot { position: relative; height: 620px; }

.g-spot-track {
  position: absolute;
  left: -48px;
  top: -50px;
  width: 1080px;
  height: 550px;
  box-sizing: border-box;
  padding: 0 350px;
  display: flex;
  align-items: center;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.g-spot-track::-webkit-scrollbar { display: none; }

.g-spot-card {
  position: relative;
  flex: 0 0 380px;
  height: 380px;
  margin: 0 -20px;
  padding: 0;
  border: 0;
  border-radius: 26px;
  overflow: hidden;
  scroll-snap-align: center;
  cursor: pointer;
  background: var(--charcoal);
  transform: scale(0.82);
  filter: brightness(0.88);
  box-shadow: 0 12px 26px rgba(28, 27, 32, 0.18);
  transition: transform 0.3s ease, filter 0.3s ease, box-shadow 0.3s ease;
}

.g-spot-card.is-active {
  z-index: 2;
  transform: scale(1);
  filter: none;
  box-shadow: 0 0 0 5px #ffffff, 0 0 0 10px var(--ring), 0 22px 44px rgba(28, 27, 32, 0.28);
}

.g-spot-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.g-spot-card::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(34, 34, 38, 0) 34%, rgba(34, 34, 38, 0.86) 100%); }

.g-spot-text {
  position: absolute;
  z-index: 1;
  left: 26px;
  right: 26px;
  bottom: 24px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  color: #ffffff;
  text-align: start;
}

.g-spot-text strong { font-size: 30px; line-height: 1.1; font-weight: 700; }
.g-spot-text span { font-size: 17px; line-height: 1.4; opacity: 0.92; }
.g-rule { display: block; width: 56px; height: 3px; border-radius: 2px; background: var(--accent-light); }
.g-spot-card:not(.is-active) .g-spot-text span { display: none; }
:root[lang|="ar"] .g-spot-text strong { font-size: 28px; line-height: 1.35; }
:root[lang|="ar"] .g-spot-text span { line-height: 1.7; }

.g-spot .g-dots { top: 452px; left: -48px; }
.g-spot .g-hint { position: absolute; left: 50%; top: 490px; transform: translateX(-50%); margin: 0; min-width: 460px; }

.g-badge { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: 999px; background: var(--accent-tint); color: var(--accent-text); font-size: 14px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
:root[lang|="ar"] .g-badge { letter-spacing: 0; font-size: 14px; }

/* Pop-out, as on /fred: a wide sheet with the photo on top and the words below. It starts below
   Omar's chin and ends above the bottom banner, so his face stays in view, and scrolls if longer. */
.g-popout { position: absolute; inset: 0; z-index: 30; }
/* A plain dim, no blur: blurring over the live video made a kiosk GPU draw a second copy of the
   avatar on /police, and the face stays sharp this way. */
.g-scrim { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: rgba(25, 25, 28, 0.48); animation: g-fade 0.2s ease both; }

.g-sheet {
  position: absolute;
  left: 64px;
  right: 64px;
  top: 560px;
  max-height: 1080px;
  overflow-y: auto;
  scrollbar-width: none;
  box-sizing: border-box;
  padding: 32px 48px 44px;
  border-radius: 32px;
  background: var(--surface);
  box-shadow: 0 30px 70px rgba(25, 25, 28, 0.4);
  display: flex;
  flex-direction: column;
  animation: g-sheet-in 0.28s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.g-sheet::-webkit-scrollbar { display: none; }
.g-sheet-image { flex: 0 0 auto; width: 100%; height: 360px; border-radius: 22px; object-fit: cover; object-position: 50% 40%; }

/* The close button sits on the photo's corner. */
.g-close {
  position: absolute;
  z-index: 2;
  top: 46px;
  right: 62px;
  width: 60px;
  height: 60px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 6px 18px rgba(28, 27, 32, 0.28);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.g-close svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

.g-sheet h2 { margin: 24px 0 0; font-size: 42px; line-height: 1.12; font-weight: 900; letter-spacing: -0.015em; color: var(--ink); }
:root[lang|="ar"] .g-sheet h2 { font-size: 36px; line-height: 1.4; letter-spacing: 0; font-weight: 700; }
.g-sheet > .g-alt { margin: 8px 0 0; font-size: 22px; white-space: normal; }
.g-sheet > .g-badge { margin-top: 16px; align-self: flex-start; }

.g-lead { margin: 24px 0 0; font-size: 25px; line-height: 1.5; color: var(--ink); }
:root[lang|="ar"] .g-lead { font-size: 23px; line-height: 1.8; }

/* Each bullet reads in its own direction, so an Arabic bullet has its marker on the right. */
.g-bullets { margin: 26px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 16px; }
.g-bullets li { display: flex; gap: 16px; align-items: flex-start; font-size: 23px; line-height: 1.45; color: var(--body); }
.g-bullets li::before { content: ''; flex: 0 0 auto; margin-top: 0.55em; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
:root[lang|="ar"] .g-bullets li { font-size: 21px; line-height: 1.75; }
:root[lang|="ar"] .g-bullets li::before { margin-top: 0.8em; }

.g-links { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 12px; }
.g-link {
  min-height: 54px;
  padding: 0 22px;
  border: 1.5px solid var(--accent-line);
  border-radius: 999px;
  background: var(--accent-wash);
  color: var(--ink);
  font-size: 19px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.g-link svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

.g-contact { margin: 24px 0 0; display: flex; align-items: center; gap: 12px; font-size: 20px; color: var(--muted-2); }
.g-contact svg { display: block; width: 24px; height: 24px; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.g-contact bdi { font-size: 22px; font-weight: 700; color: var(--ink); }

.g-separator { height: 1px; margin: 26px 0 22px; border: 0; background: var(--line); }
.g-ask { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.g-ask .g-primary { margin-top: 0; min-height: 64px; font-size: 22px; }
.g-ask small { font-size: 18px; line-height: 1.4; color: var(--muted-2); }
:root[lang|="ar"] .g-ask small { line-height: 1.7; }

/* Speech bubbles (rendered by app.js). They keep their side in both languages: the assistant's
   takes the intro's place on the left beside his head (dmt.html caps it at 260px, so it ends before
   his headdress widens at the shoulders), and the visitor's takes the welcome card's place. A bubble hands over
   after about eighteen words, keeping it a few lines tall. */
.g-avatar-speech {
  position: absolute;
  z-index: 6;
  left: 24px;
  top: 252px;
  /* Ends just short of the edge of Omar's headdress. */
  width: 372px;
}

.speech-bubble { box-sizing: border-box; animation: g-bubble-in 0.26s cubic-bezier(0.2, 0.8, 0.2, 1) both; }

.avatar-message {
  padding: 18px 22px 20px;
  border-radius: 22px;
  border-bottom-left-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 16px 36px rgba(28, 27, 32, 0.14);
  font-size: 18px;
  line-height: 1.42;
  font-weight: 500;
}

.avatar-message::before,
.g-user-speech::before {
  content: var(--speaker-label);
  display: block;
  flex-basis: 100%;
  margin-bottom: 6px;
  font-size: 13px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent-text);
}

.g-user-speech {
  position: absolute;
  z-index: 6;
  right: 40px;
  top: 1050px;
  width: 420px;
  padding: 16px 20px 18px;
  border-radius: 22px;
  border-bottom-right-radius: 8px;
  background: var(--ink);
  color: #ffffff;
  box-shadow: 0 16px 36px rgba(28, 27, 32, 0.22);
  font-size: 20px;
  line-height: 1.4;
  font-weight: 500;
}

.g-user-speech::before { content: var(--visitor-label); color: var(--accent-light); }
:root[lang|="ar"] .avatar-message, :root[lang|="ar"] .g-user-speech { line-height: 1.75; font-size: 17px; }
:root[lang|="ar"] .avatar-message::before, :root[lang|="ar"] .g-user-speech::before { letter-spacing: 0; font-size: 14px; }

.spoken-word {
  display: inline-block;
  clip-path: inset(0);
  animation: g-letters-in var(--reveal-duration, 240ms) steps(var(--character-count, 4), end) both;
  --reveal-start: inset(0 100% 0 0);
}

.avatar-message.is-rtl.has-word-animation { display: flex; flex-flow: row wrap; direction: rtl; justify-content: flex-start; gap: 0.12em 0.3em; }
.avatar-message.is-rtl.has-word-animation > .spoken-word { --reveal-start: inset(0 0 0 100%); }
.spoken-ltr-run { display: inline-flex; direction: ltr; gap: 0.3em; }

[data-screen="section"] .g-avatar-speech,
[data-screen="section"] .g-user-speech { visibility: hidden; }

/* Footnote, on a light pill so it reads over the assistant's clothes. */
.g-footnote {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 1604px;
  width: max-content;
  max-width: 960px;
  margin: 0;
  padding: 8px 20px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  transform: translateX(-50%);
  text-align: center;
  font-size: 17px;
  line-height: 1.4;
  color: var(--muted);
}

:root[lang|="ar"] .g-footnote { font-size: 16px; line-height: 1.7; }

/* Start gate (kept for app.js; the kiosk connects without it) */
.start-gate {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(236, 235, 232, 0.9);
  backdrop-filter: blur(6px);
}

.start-card {
  width: 700px;
  box-sizing: border-box;
  padding: 56px 56px 60px;
  border-radius: 36px;
  background: var(--surface);
  box-shadow: 0 30px 70px rgba(28, 27, 32, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.start-logo { height: 110px; width: auto; }
.start-card h1 { margin: 34px 0 0; font-size: 48px; line-height: 1.1; font-weight: 900; letter-spacing: -0.015em; }
.start-title-ar { margin: 8px 0 0; font-family: var(--font-ar); font-size: 32px; font-weight: 700; }
#start-message { margin: 22px 0 0; font-size: 22px; line-height: 1.5; color: var(--muted); }

.start-avatar {
  margin-top: 40px;
  min-height: 84px;
  padding: 0 44px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #ffffff;
  font-size: 26px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
}

.start-avatar:disabled { opacity: 0.5; cursor: wait; }
.start-avatar svg { width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.start-loading { margin-top: 40px; display: flex; align-items: center; gap: 16px; font-size: 22px; }
.start-spinner { width: 34px; height: 34px; border-radius: 50%; border: 4px solid var(--accent-tint); border-top-color: var(--accent); animation: g-spin 0.9s linear infinite; }
.start-retry { margin-top: 34px; min-height: 64px; padding: 0 34px; border: 2px solid var(--accent); border-radius: 999px; background: transparent; color: var(--accent-text); font-size: 22px; font-weight: 700; cursor: pointer; }

/* Language menu */
.language-menu { position: absolute; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center; }
.language-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: rgba(25, 25, 28, 0.5); animation: g-fade 0.2s ease both; }

.language-panel {
  position: relative;
  margin-top: 520px;
  width: 640px;
  box-sizing: border-box;
  padding: 36px 36px 32px;
  border-radius: 32px;
  background: var(--surface);
  box-shadow: 0 30px 70px rgba(25, 25, 28, 0.35);
  display: flex;
  flex-direction: column;
  gap: 22px;
  animation: g-sheet-pop 0.24s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.language-panel-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.language-eyebrow { font-size: 15px; font-weight: 700; letter-spacing: 0.1em; color: var(--accent-text); text-transform: uppercase; }
:root[lang|="ar"] .language-eyebrow { letter-spacing: 0; }
.language-panel h1 { margin: 6px 0 0; font-size: 34px; font-weight: 900; }
:root[lang|="ar"] .language-panel h1 { font-weight: 700; font-size: 30px; }
.language-title-reveal { padding: 0; border: 0; background: none; font: inherit; color: inherit; text-align: start; cursor: default; }
.language-close { width: 56px; height: 56px; padding: 0; border: 0; border-radius: 50%; background: var(--grey); color: var(--ink); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.language-close svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.language-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

.language-option {
  min-height: 88px;
  box-sizing: border-box;
  padding: 0 26px;
  border: 2px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  text-align: start;
  cursor: pointer;
}

.language-option[aria-selected="true"] { border-color: var(--accent); background: var(--accent-wash); }
.language-name { display: flex; flex-direction: column; gap: 2px; }
.language-name strong { font-size: 26px; font-weight: 700; }
.language-name strong[lang="ar"] { font-family: var(--font-ar); }
.language-name small { font-size: 16px; color: var(--muted-2); font-family: var(--font-ar), var(--font); }
.locale-code { font-size: 17px; font-weight: 700; color: var(--muted-2); }
.language-option[aria-selected="true"] .locale-code { color: var(--accent-text); }
.voice-selector { display: flex; gap: 10px; flex-wrap: wrap; padding-top: 4px; }
.voice-option { min-height: 48px; padding: 0 20px; border: 1.5px solid var(--accent-line); border-radius: 999px; background: var(--accent-wash); color: var(--ink); font-size: 17px; font-weight: 600; cursor: pointer; }
.voice-option[aria-checked="true"] { background: var(--ink); border-color: var(--ink); color: #ffffff; }
.voice-option:disabled { opacity: 0.45; }

@keyframes g-listening { 50% { box-shadow: 0 0 0 16px rgba(0, 95, 116, 0.22), 0 0 0 32px rgba(0, 95, 116, 0.07), 0 8px 22px rgba(28, 27, 32, 0.2); } }
@keyframes g-processing { from { opacity: 1; } to { opacity: 0.55; } }
@keyframes g-rise { from { opacity: 0; transform: translateY(18px); } }
@keyframes g-fade { from { opacity: 0; } }
@keyframes g-sheet-in { from { opacity: 0; transform: translateY(24px) scale(0.98); } }
@keyframes g-sheet-pop { from { opacity: 0; transform: translateY(12px) scale(0.98); } }
@keyframes g-bubble-in { from { opacity: 0; transform: translateY(8px) scale(0.97); } }
@keyframes g-letters-in { from { clip-path: var(--reveal-start); } to { clip-path: inset(0); } }
@keyframes g-spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
