/* LaChance — showcase of the four live apps (demo environment) */

/* ---------- Fonts (bundled locally, OFL) ---------- */
@font-face { font-family: "LC Amiri"; src: url("assets/fonts/Amiri-400.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "LC Amiri"; src: url("assets/fonts/Amiri-700.ttf") format("truetype"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "LC Plex"; src: url("assets/fonts/IBMPlexSansArabic-400.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "LC Plex"; src: url("assets/fonts/IBMPlexSansArabic-500.ttf") format("truetype"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "LC Plex"; src: url("assets/fonts/IBMPlexSansArabic-600.ttf") format("truetype"); font-weight: 600; font-style: normal; font-display: swap; }

/* ---------- Tokens ---------- */
:root {
  --bg-0: #120a06;
  --bg-1: #1d120c;
  --bg-2: #2b1b13;
  --bg-3: #3d281c;
  --gold: #d6b27a;
  --gold-hi: #ecd4a4;
  --gold-lo: #a9814b;
  --caramel: #c28a52;
  --cream: #f5ece2;
  --cream-2: rgba(245, 236, 226, .80);
  --cream-3: rgba(245, 236, 226, .64);
  --ink: #26160e;
  --warn: #ecbd78;
  --line: rgba(214, 178, 122, .20);
  --line-2: rgba(214, 178, 122, .34);
  --line-3: rgba(214, 178, 122, .55);
  --font-ui: "LC Plex", "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  --font-title: "LC Amiri", "Amiri", "Times New Roman", serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --s: .7;
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { margin: 0; min-height: 100%; }
body {
  position: relative;
  min-height: 100vh;
  background-color: var(--bg-1);
  color: var(--cream);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(1100px 640px at 82% -10%, rgba(156, 102, 64, .50), transparent 64%),
    radial-gradient(900px 680px at 4% 112%, rgba(194, 138, 82, .14), transparent 62%),
    radial-gradient(1700px 1100px at 50% 28%, #3a2418 0%, #24160f 46%, #140b07 100%);
}
body::after {
  /* very soft vignette */
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  box-shadow: inset 0 0 220px rgba(0, 0, 0, .45);
}
img { display: block; max-width: 100%; }
button, input { font: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
::selection { background: rgba(214, 178, 122, .38); color: #fff; }
[hidden] { display: none !important; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 3px; }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.noscript { text-align: center; padding: 40px 16px; color: var(--cream); }
.num, [dir="ltr"] { font-variant-numeric: tabular-nums; }

.shell { width: 100%; max-width: 1760px; margin-inline: auto; padding-inline: 24px; }

.mock-bar {
  text-align: center;
  font-size: 13px;
  padding: 8px 16px;
  color: var(--ink);
  background: linear-gradient(180deg, #efe1cb, #e2cdac);
  border-bottom: 1px solid rgba(120, 80, 40, .3);
}

/* ---------- Shared brand bits ---------- */
.wordmark {
  margin: 0;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 30px;
  line-height: 1.05;
  letter-spacing: .4px;
  color: var(--gold-hi);
  background: linear-gradient(180deg, #f8e7c4 0%, #dcb77c 52%, #b98c51 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  padding-bottom: 2px;
}
.ornament {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--gold);
  margin: 18px auto 22px;
  max-width: 260px;
}
.ornament::before, .ornament::after {
  content: "";
  height: 1px;
  flex: 1;
  background: linear-gradient(to left, transparent, var(--line-3));
}
.ornament::after { background: linear-gradient(to right, transparent, var(--line-3)); }
.live-dot {
  position: relative;
  flex: none;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--gold-hi);
  box-shadow: 0 0 10px rgba(236, 212, 164, .8);
}
.live-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid rgba(236, 212, 164, .7);
  animation: pulse 2.4s var(--ease) infinite;
}
@keyframes pulse { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(2); opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Gate ---------- */
.gate {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 92px 16px 48px;
  overflow: hidden;
  overflow: clip;
}
.gate-inner { width: min(440px, 100%); }
.gate-stack { position: relative; }
.gate-card {
  position: relative;
  z-index: 1;
  padding: 72px 36px 34px;
  border-radius: 28px;
  text-align: center;
  background: linear-gradient(180deg, rgba(62, 40, 28, .86), rgba(30, 19, 13, .92));
  border: 1px solid var(--line-3);
  box-shadow: 0 44px 100px rgba(0, 0, 0, .55), 0 2px 0 rgba(255, 230, 190, .05) inset;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  animation: rise .9s var(--ease) both;
}
.gate-card::before {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 22px;
  border: 1px solid var(--line);
  pointer-events: none;
}
.gate-seal {
  position: absolute;
  top: -54px;
  left: 50%;
  width: 108px; height: 108px;
  margin-left: -54px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 35% 28%, #fffaf2 0%, #f1e4d2 58%, #dcc6a6 100%);
  box-shadow: 0 0 0 1px rgba(214, 178, 122, .7), 0 0 0 7px rgba(214, 178, 122, .12), 0 20px 44px rgba(0, 0, 0, .5);
}
.gate-seal img { width: 90%; height: auto; }
.wordmark--gate { font-size: 36px; margin-bottom: 6px; }
.gate-title {
  margin: 0;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 27px;
  line-height: 1.4;
  color: var(--cream);
}
.gate-sub { margin: 4px 0 0; color: var(--cream-3); font-size: 14px; }
.gate-form { text-align: start; display: grid; gap: 18px; }
.field label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  font-size: 14px;
  color: var(--cream-2);
}
.input {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  border-radius: 14px;
  background: rgba(16, 9, 5, .55);
  border: 1px solid rgba(214, 178, 122, .30);
  color: var(--cream);
  font-size: 16px;
  transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.input:hover { border-color: rgba(214, 178, 122, .5); }
.input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(214, 178, 122, .16); background: rgba(16, 9, 5, .7); }
.input-wrap { position: relative; }
.input--pass { padding-left: 52px; padding-right: 16px; }
.eye {
  position: absolute;
  top: 6px;
  left: 6px;
  width: 40px; height: 40px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--cream-3);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.eye:hover { color: var(--gold-hi); background: rgba(214, 178, 122, .1); }
.eye .eye-shut { display: none; }
.eye[aria-pressed="true"] .eye-open { display: none; }
.eye[aria-pressed="true"] .eye-shut { display: block; }
.form-msg {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--warn);
  background: rgba(236, 189, 120, .08);
  border: 1px solid rgba(236, 189, 120, .30);
  animation: fade .3s both;
}
.form-msg svg { flex: none; margin-top: 2px; }
.form-msg.is-notice { color: var(--gold-hi); background: rgba(214, 178, 122, .09); border-color: rgba(214, 178, 122, .34); }
.btn-gold {
  position: relative;
  width: 100%;
  height: 54px;
  margin-top: 4px;
  border: 0;
  border-radius: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 600;
  font-size: 17px;
  background: linear-gradient(180deg, #f2ddb2 0%, #d8b174 50%, #bf9156 100%);
  box-shadow: inset 0 1px 0 rgba(255, 250, 235, .7), inset 0 -2px 0 rgba(120, 80, 40, .25), 0 14px 30px rgba(0, 0, 0, .38);
  transition: filter .2s, transform .15s;
}
.btn-gold:hover { filter: brightness(1.05); }
.btn-gold:active { transform: translateY(1px); }
.btn-gold[aria-busy="true"] { cursor: progress; filter: saturate(.85); }
.spinner {
  display: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(38, 22, 14, .25);
  border-top-color: var(--ink);
  animation: spin .8s linear infinite;
}
.btn-gold[aria-busy="true"] .spinner { display: inline-block; }
.gate-note {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 8px;
  margin: 26px auto 0;
  max-width: 380px;
  text-align: center;
  font-size: 13px;
  line-height: 1.7;
  color: var(--cream-3);
  animation: fade 1.2s .3s both;
}
.gate-note svg { flex: none; margin-top: 3px; color: var(--gold); }
.gate-choc {
  position: absolute;
  z-index: 0;
  height: auto;
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(0 22px 26px rgba(0, 0, 0, .55));
  animation: float 8s ease-in-out infinite;
}
.gate-choc.c1 { --r: -12deg; width: 128px; top: 18px; right: -168px; }
.gate-choc.c2 { --r: 16deg; width: 112px; bottom: 34px; left: -156px; animation-delay: -3s; }
.gate-choc.c3 { --r: 8deg; width: 70px; top: -38px; left: -92px; animation-delay: -5s; opacity: .95; }
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(var(--r)); }
  50% { transform: translateY(-9px) rotate(var(--r)); }
}

/* ---------- Stage: top bar ---------- */
.topbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: "brand tools meta";
  align-items: center;
  gap: 14px 30px;
  padding-top: 16px;
  padding-bottom: 16px;
  position: relative;
  animation: rise .8s var(--ease) both;
}
.topbar::after {
  content: "";
  position: absolute;
  bottom: 0;
  inset-inline: 24px;
  height: 1px;
  background: linear-gradient(to left, transparent, var(--line-2) 20%, var(--line-2) 80%, transparent);
}
.brand { grid-area: brand; display: flex; align-items: center; gap: 14px; min-width: 0; }
.seal-disc {
  flex: none;
  width: 54px; height: 54px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 35% 28%, #fffaf2 0%, #f0e2cf 60%, #dbc4a3 100%);
  box-shadow: 0 0 0 1px rgba(214, 178, 122, .6), 0 0 0 5px rgba(214, 178, 122, .10), 0 10px 24px rgba(0, 0, 0, .4);
}
.seal-disc img { width: 90%; height: auto; }
.brand-text { min-width: 0; text-align: start; }
.brand-text .wordmark { display: inline-block; }
#stage-title:focus { outline: none; }
.tagline { margin: 4px 0 0; font-size: 13.5px; color: var(--cream-2); }
.topbar-meta { grid-area: meta; display: flex; align-items: center; gap: 10px 14px; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 236px;
  padding: 7px 14px 7px 12px;
  border-radius: 16px;
  background: linear-gradient(180deg, #f6ecdf, #ecdcc6);
  color: #3a2417;
  font-weight: 500;
  font-size: 12.5px;
  line-height: 1.45;
  box-shadow: 0 0 0 1px rgba(214, 178, 122, .55), 0 8px 20px rgba(0, 0, 0, .28);
}
.badge svg { flex: none; color: #8a5a2f; }
.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--cream-2);
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  transition: color .2s, background-color .2s;
}
.link-btn:hover { color: var(--gold-hi); background: rgba(214, 178, 122, .08); }
.link-btn span { text-decoration: underline; text-decoration-color: rgba(214, 178, 122, .45); text-underline-offset: 5px; }

/* ---------- Stage: toolbar ---------- */
.toolbar {
  grid-area: tools;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px 18px;
}
.cta {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 54px;
  padding: 0 26px 0 30px;
  border-radius: 16px;
  cursor: pointer;
  color: #f1d9a8;
  font-weight: 600;
  font-size: 17px;
  background: linear-gradient(180deg, #5c3828 0%, #3b2319 55%, #2a1810 100%);
  border: 1px solid rgba(226, 196, 143, .78);
  box-shadow: 0 0 0 4px rgba(214, 178, 122, .10), inset 0 1px 0 rgba(255, 225, 180, .22), 0 14px 34px rgba(0, 0, 0, .45);
  transition: border-color .25s, box-shadow .25s, transform .15s;
}
.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 230, 180, .16) 50%, transparent 70%);
  transform: translateX(120%);
  transition: transform .9s var(--ease);
  pointer-events: none;
}
.cta:hover { border-color: var(--gold-hi); box-shadow: 0 0 0 6px rgba(214, 178, 122, .15), inset 0 1px 0 rgba(255, 225, 180, .26), 0 16px 38px rgba(0, 0, 0, .5); }
.cta:hover::before { transform: translateX(-120%); }
.cta:active { transform: translateY(1px); }
.cta::after {
  content: "";
  position: absolute;
  inset-inline: 16px;
  bottom: 6px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(to left, var(--gold-hi), var(--gold-lo));
  transform-origin: right center;
  transform: scaleX(0);
  opacity: 0;
}
.cta.is-cooling::after { opacity: .9; animation: cool var(--cool, 5s) linear forwards; }
@keyframes cool { from { transform: scaleX(1); } to { transform: scaleX(0); } }
.cta[aria-disabled="true"] { cursor: default; }
.cta[aria-disabled="true"] .cta-icon { filter: saturate(.6) brightness(.92); }
.cta-icon {
  flex: none;
  width: 32px; height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #2a1810;
  background: linear-gradient(180deg, #f0d9aa, #c99d5f);
  box-shadow: inset 0 1px 0 rgba(255, 250, 235, .6);
}
.cta { flex: none; }
.cta-hint { display: none; margin: 0; max-width: 30ch; font-size: 13px; line-height: 1.65; color: var(--cream-3); }
.ticker {
  flex: 1 1 260px;
  max-width: 560px;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(18, 10, 6, .42);
  border: 1px solid var(--line);
  font-size: 13.5px;
}
.ticker-label { flex: none; color: var(--gold); font-weight: 500; }
/* width:0 + flex-grow keeps the long, unwrapped line from widening the page */
.ticker-text { flex: 1 1 0; width: 0; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--cream-2); }
.ticker-text .num { color: var(--cream-3); }

/* ---------- Stage: phones ---------- */
.phones-wrap { position: relative; }
.switcher { display: none; }
.phones {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 24px;
  padding-block: 14px 30px;
}
.phones-wrap[data-mode="grid"] .phones {
  display: grid;
  grid-template-columns: repeat(2, max-content);
  justify-content: center;
  gap: 30px 28px;
}
.phones-wrap[data-mode="single"] .phones {
  display: grid;
  justify-content: center;
  padding-top: 16px;
}
.phones-wrap[data-mode="single"] .cell { grid-area: 1 / 1; }
.phones-wrap[data-mode="single"] .switcher {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  position: sticky;
  top: 0;
  z-index: 20;
  margin-inline: -16px;
  padding: 10px 16px;
  padding-top: max(10px, env(safe-area-inset-top));
  background: linear-gradient(180deg, rgba(26, 16, 11, .96), rgba(26, 16, 11, .9));
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.seg {
  min-height: 52px;
  padding: 6px 4px;
  border-radius: 14px;
  border: 1px solid var(--line-2);
  background: rgba(255, 240, 220, .04);
  color: var(--cream);
  font-weight: 600;
  font-size: 15px;
  line-height: 1.3;
  cursor: pointer;
  transition: background-color .25s, color .25s, border-color .25s, box-shadow .25s;
}
.seg:hover { border-color: var(--gold); }
.seg[aria-pressed="true"] {
  color: var(--ink);
  border-color: transparent;
  background: linear-gradient(180deg, #f0d9aa, #cda063);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 250, 235, .6);
}
.seg.is-glow:not([aria-pressed="true"]) { border-color: var(--gold-hi); box-shadow: 0 0 0 2px rgba(236, 212, 164, .35), 0 0 18px rgba(214, 178, 122, .45); }

.cell {
  width: calc(414px * var(--s));
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: rise .9s var(--d, 0ms) var(--ease) both;
}
.cell[data-hidden="true"] { visibility: hidden; pointer-events: none; }
.cell-head { padding-inline: 2px; }
.cell-title { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 8px; }
.cell-name {
  margin: 0;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 23px;
  line-height: 1.25;
  color: var(--cream);
}
.cell-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: rgba(255, 240, 220, .04);
  color: var(--gold-hi);
  font-weight: 500;
  font-size: 12px;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s, border-color .2s, color .2s;
}
.chip:hover { background: rgba(214, 178, 122, .14); border-color: var(--gold); color: #fff3dc; }
a.chip:not([href]) { opacity: .5; pointer-events: none; }
.cell-desc {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.65;
  color: var(--cream-3);
}

.device-box {
  position: relative;
  width: calc(414px * var(--s));
  height: calc(868px * var(--s));
  border-radius: calc(64px * var(--s));
  transition: box-shadow .45s var(--ease);
}
.cell.is-glow .device-box {
  box-shadow:
    0 0 0 2px rgba(236, 212, 164, .9),
    0 0 34px 6px rgba(214, 178, 122, .45),
    0 0 120px 24px rgba(214, 178, 122, .16);
}
.device {
  position: absolute;
  top: 0;
  left: 0;
  width: 414px;
  height: 868px;
  padding: 12px;
  border-radius: 64px;
  transform-origin: top left;
  transform: scale(var(--s));
  background: linear-gradient(150deg, #6a4c3a 0%, #2c1d15 20%, #16100c 48%, #34251c 76%, #6f5444 100%);
  box-shadow:
    inset 0 0 0 1.5px rgba(255, 226, 190, .30),
    inset 0 0 0 7px #0c0806,
    0 44px 80px rgba(0, 0, 0, .55),
    0 10px 20px rgba(0, 0, 0, .35);
}
.key {
  position: absolute;
  width: 4px;
  border-radius: 2px;
  background: linear-gradient(90deg, #2a1c14, #7a5c4a 50%, #2a1c14);
}
.key-action { left: -3px; top: 150px; height: 32px; }
.key-up { left: -3px; top: 212px; height: 62px; }
.key-down { left: -3px; top: 288px; height: 62px; }
.key-power { right: -3px; top: 250px; height: 100px; }
.screen {
  position: relative;
  width: 390px;
  height: 844px;
  border-radius: 52px;
  overflow: hidden;
  background: #faf6f1;
  isolation: isolate;
}
.statusbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 52px;
  direction: ltr;
  display: grid;
  grid-template-columns: 1fr 124px 1fr;
  align-items: center;
  justify-items: center;
  padding-top: 6px;
  color: #1c140f;
  background: #faf6f1;
  font: 600 17px/1 -apple-system, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  letter-spacing: -.2px;
}
.sb-icons { display: inline-flex; align-items: center; gap: 6px; }
.sb-icons svg { fill: currentColor; display: block; }
.island {
  position: absolute;
  top: 11px;
  left: 50%;
  width: 124px;
  height: 36px;
  margin-left: -62px;
  border-radius: 20px;
  background: #050302;
  z-index: 3;
}
.app {
  position: absolute;
  top: 52px;
  bottom: 24px;
  left: 0;
  right: 0;
  overflow: hidden;
  background: #faf6f1;
}
.app iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: transparent;
  opacity: 0;
  transition: opacity .6s ease;
}
.cell.is-loaded .app iframe { opacity: 1; }
.app-loader, .app-mock {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 32px;
  text-align: center;
  color: #6b4a36;
}
.cell.is-loaded .app-loader { visibility: hidden; }
.app-seal { width: 132px; height: 132px; display: grid; place-items: center; }
.app-seal img { width: 100%; height: auto; opacity: .92; }
.app-loader-text { margin: 0; font-weight: 500; font-size: 18px; color: #7a5a45; }
.app-loader-bar {
  position: relative;
  width: 132px;
  height: 3px;
  border-radius: 3px;
  overflow: hidden;
  background: rgba(122, 90, 69, .16);
}
.app-loader-bar::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 40%;
  border-radius: 3px;
  background: linear-gradient(90deg, transparent, #b48653, transparent);
  animation: load 1.4s ease-in-out infinite;
}
@keyframes load { from { left: -40%; } to { left: 100%; } }
.app-mock-title { margin: 0; font-family: var(--font-title); font-weight: 700; font-size: 32px; color: #3d261a; }
.app-mock-body { margin: 0; font-size: 18px; line-height: 1.7; color: #7a5a45; max-width: 280px; }
.app-mock-lines { display: grid; gap: 10px; width: 100%; max-width: 280px; margin-top: 18px; }
.app-mock-lines i { display: block; height: 46px; border-radius: 14px; background: linear-gradient(90deg, #f0e5d8, #f6eee4); border: 1px solid #eadccb; }
.app-mock-lines i:nth-child(2) { width: 82%; justify-self: center; }
.app-mock-lines i:nth-child(3) { width: 64%; justify-self: center; }
.homebar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 24px;
  background: #faf6f1;
}
.homebar i {
  position: absolute;
  bottom: 8px;
  left: 50%;
  width: 134px;
  height: 5px;
  margin-left: -67px;
  border-radius: 3px;
  background: #1c140f;
  opacity: .85;
}

/* ---------- Lower panels ---------- */
.lower {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  max-width: 1240px;
  margin: 12px auto 0;
}
.panel {
  position: relative;
  min-width: 0;
  padding: 26px 28px 26px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(60, 39, 27, .58), rgba(28, 18, 12, .62));
  border: 1px solid var(--line-2);
  box-shadow: inset 0 1px 0 rgba(255, 236, 200, .06), 0 22px 60px rgba(0, 0, 0, .35);
  animation: rise .9s .2s var(--ease) both;
}
.panel::before {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 19px;
  border: 1px solid rgba(214, 178, 122, .09);
  pointer-events: none;
}
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.panel-title {
  margin: 0;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 27px;
  line-height: 1.3;
  color: var(--cream);
}
.panel-sub { margin: 4px 0 0; font-size: 13.5px; color: var(--cream-3); }
.tour-toggle {
  display: none;
  flex: none;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: rgba(255, 240, 220, .04);
  color: var(--gold-hi);
  font-weight: 500;
  font-size: 13px;
  cursor: pointer;
}
.tour-toggle svg { transition: transform .25s var(--ease); }
.tour-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.step {
  width: 100%;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 12px 12px;
  border-radius: 16px;
  border: 1px solid transparent;
  background: transparent;
  text-align: start;
  color: var(--cream);
  font-size: 15px;
  line-height: 1.8;
  cursor: pointer;
  transition: background-color .25s, border-color .25s;
}
.step:hover, .step.is-active { background: rgba(214, 178, 122, .08); border-color: rgba(214, 178, 122, .28); }
.step-num {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid var(--gold);
  color: var(--gold-hi);
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 19px;
  line-height: 1;
  padding-top: 3px;
  background: radial-gradient(circle at 35% 28%, rgba(236, 212, 164, .2), transparent 70%);
  transition: background-color .25s, color .25s;
}
.step:hover .step-num, .step.is-active .step-num { background: linear-gradient(180deg, #f0d9aa, #cda063); color: var(--ink); border-color: transparent; }
.step-text { padding-top: 4px; }
.step-lead { color: var(--gold-hi); font-weight: 500; }
.note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 16px 0 0;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(242, 230, 214, .05);
  border: 1px dashed rgba(214, 178, 122, .32);
  color: var(--cream-2);
  font-size: 14px;
  line-height: 1.75;
}
.note svg { flex: none; margin-top: 3px; color: var(--gold); }

.feed-status { display: flex; align-items: center; gap: 10px; }
.feed-status.is-retry { color: var(--warn); }
.feed-status.is-retry .live-dot, .feed-status.is-paused .live-dot { background: var(--cream-3); box-shadow: none; }
.feed-status.is-retry .live-dot::after, .feed-status.is-paused .live-dot::after { display: none; }
.timeline {
  list-style: none;
  margin: 0;
  padding: 0 0 0 4px;
  max-height: 468px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(214, 178, 122, .35) transparent;
}
.timeline::-webkit-scrollbar { width: 6px; }
.timeline::-webkit-scrollbar-thumb { background: rgba(214, 178, 122, .35); border-radius: 6px; }
.ev {
  display: grid;
  grid-template-columns: 54px 20px minmax(0, 1fr);
  column-gap: 10px;
  align-items: start;
  padding: 9px 4px 9px 0;
  border-radius: 12px;
}
.ev.is-new { animation: evIn .7s var(--ease) both, evGlow 2.6s ease-out both; }
@keyframes evIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
@keyframes evGlow { from { background-color: rgba(214, 178, 122, .14); } to { background-color: transparent; } }
.ev-time {
  padding-top: 2px;
  text-align: center;
  color: var(--gold-hi);
  font-weight: 600;
  font-size: 14px;
  line-height: 1.6;
}
.ev-rail { position: relative; align-self: stretch; }
.ev-rail::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: -18px;
  left: 50%;
  width: 1px;
  margin-left: -.5px;
  background: var(--line-2);
}
.ev:first-child .ev-rail::before { top: 12px; }
.ev:last-child .ev-rail::before { bottom: auto; height: 12px; }
.ev:only-child .ev-rail::before { display: none; }
.ev-rail::after {
  content: "";
  position: absolute;
  top: 8px;
  left: 50%;
  width: 10px; height: 10px;
  margin-left: -5px;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  background: #2a1a12;
}
.ev:first-child .ev-rail::after { background: var(--gold-hi); border-color: var(--gold-hi); box-shadow: 0 0 12px rgba(236, 212, 164, .7); }
.ev-body { min-width: 0; }
.ev-text { margin: 0; font-size: 15px; line-height: 1.65; color: var(--cream); overflow-wrap: anywhere; }
.ev-order {
  display: inline-block;
  margin-top: 5px;
  padding: 1px 10px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  color: var(--cream-3);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: .4px;
}
.feed-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 34px 16px 30px;
  text-align: center;
  color: var(--cream-3);
  border-radius: 16px;
  border: 1px dashed rgba(214, 178, 122, .22);
}
.feed-empty svg { color: var(--gold); }
.feed-empty p { margin: 0; max-width: 34ch; font-size: 14.5px; line-height: 1.8; }

/* ---------- Footer ---------- */
.footer {
  text-align: center;
  padding: 46px 16px calc(34px + env(safe-area-inset-bottom));
  color: var(--cream-3);
  font-size: 13.5px;
}
.footer p { margin: 0; }
.footer-choc { display: flex; justify-content: center; align-items: center; gap: 14px; margin-bottom: 14px; }
.footer-choc img { width: 34px; height: auto; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .45)); }
.footer-choc img:nth-child(2) { width: 40px; }
.footer-mark { font-family: var(--font-title); font-weight: 700; font-size: 16px; color: var(--gold-hi); }

/* ---------- Toasts ---------- */
.toasts {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(18px + env(safe-area-inset-bottom));
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding-inline: 16px;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  max-width: 520px;
  width: fit-content;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 16px;
  background: rgba(38, 24, 16, .95);
  border: 1px solid var(--line-3);
  box-shadow: 0 22px 50px rgba(0, 0, 0, .5);
  color: var(--cream);
  font-size: 15px;
  line-height: 1.65;
  cursor: pointer;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  animation: toastIn .45s var(--ease) both;
}
.toast.is-leaving { animation: toastOut .3s ease both; }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(8px); } }
.toast-text { margin: 0; }
.toast-text .num { color: var(--gold-hi); font-weight: 600; }
.toast-icon { flex: none; margin-top: 2px; color: var(--gold-hi); }
.toast-icon svg { display: none; }
.toast--ok .ti-ok, .toast--info .ti-info, .toast--warn .ti-warn { display: block; }
.toast--warn .toast-icon { color: var(--warn); }

/* ---------- Responsive ---------- */
@media (min-width: 1680px) {
  .cta-hint { display: block; }
}
@media (max-width: 1279.98px) {
  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "brand meta" "tools tools";
    gap: 14px 20px;
  }
  .toolbar { flex-wrap: wrap; gap: 12px 22px; }
  .cta-hint { display: block; max-width: 40ch; font-size: 13.5px; }
  .ticker { flex: 1 1 300px; max-width: 600px; margin-inline-start: auto; }
}
@media (max-width: 959.98px) {
  .lower { grid-template-columns: minmax(0, 1fr); max-width: 720px; }
}
@media (max-width: 760px) {
  .gate { padding-top: 104px; }
  .gate-card { padding: 70px 22px 28px; }
  .gate-choc.c1 { width: 80px; top: -98px; right: -6px; }
  .gate-choc.c2 { width: 70px; top: -84px; bottom: auto; left: -4px; }
  .gate-choc.c3 { display: none; }
  .wordmark--gate { font-size: 32px; }
  .gate-title { font-size: 25px; }
}
@media (max-width: 719.98px) {
  .shell { padding-inline: 16px; }
  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "brand logout" "badge badge" "tools tools";
    gap: 12px 8px;
    padding-top: 14px;
  }
  .topbar::after { inset-inline: 16px; }
  .brand { grid-area: brand; gap: 12px; }
  .seal-disc { width: 46px; height: 46px; }
  .wordmark { font-size: 26px; }
  .tagline { font-size: 12.5px; }
  .topbar-meta { display: contents; }
  .badge { grid-area: badge; justify-self: stretch; max-width: none; justify-content: center; text-align: center; border-radius: 14px; padding: 8px 12px; }
  .link-btn { grid-area: logout; align-self: start; }
  .toolbar { flex-direction: column; align-items: stretch; gap: 10px; padding-top: 4px; }
  .cta { width: 100%; }
  .cta-hint { max-width: none; text-align: center; }
  .ticker { flex: none; max-width: none; margin-inline-start: 0; }
  .phones { padding-bottom: 18px; }
  .cell-name { font-size: 22px; }
  .cell-desc { min-height: 0; }
  .lower { gap: 16px; margin-top: 6px; }
  .panel { padding: 20px 16px 18px; border-radius: 20px; }
  .panel::before { border-radius: 15px; }
  .panel-title { font-size: 24px; }
  .tour-toggle { display: inline-flex; }
  .tour.is-collapsed .tour-body { display: none; }
  .tour.is-collapsed .panel-head { margin-bottom: 0; }
  .step { padding: 10px 8px; gap: 12px; grid-template-columns: 36px minmax(0, 1fr); }
  .step-num { width: 36px; height: 36px; font-size: 17px; }
  .ev { grid-template-columns: 48px 18px minmax(0, 1fr); column-gap: 8px; }
  .timeline { max-height: 420px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .cta.is-cooling::after { display: none; }
  .live-dot::after { display: none; }
}
