/* ==========================================================================
   BeWise Systems × Odoo Enterprise Planet — 3D WebGL Stage & HUD Styles
   Supports RTL (Arabic default) & LTR (English) + Day & Night Modes
   ========================================================================== */

:root,
[data-theme="day"] {
  color-scheme: light;
  --bg-paper: #EEEBE4;
  --bg-paper-deep: #E3DED3;
  --bg-paper-tint: #F6F3EE;
  --ink-primary: #141619;
  --ink-secondary: #484E56;
  --ink-muted: #767D86;
  --ink-faint: rgba(20, 22, 25, 0.36);

  --accent-teal: #17806D;
  --accent-teal-hover: #126657;
  --accent-teal-soft: rgba(23, 128, 109, 0.11);
  --accent-teal-border: rgba(23, 128, 109, 0.32);

  --accent-plum: #714B67;
  --accent-plum-hover: #5B3B53;
  --accent-plum-soft: rgba(113, 75, 103, 0.12);
  --accent-plum-border: rgba(113, 75, 103, 0.32);

  --accent-amber: #D97724;
  --accent-coral: #C85A32;

  --glass-bg: rgba(246, 243, 238, 0.90);
  --glass-bg-strong: rgba(249, 247, 243, 0.95);
  --glass-card: rgba(255, 253, 249, 0.76);
  --glass-card-hover: rgba(255, 255, 255, 0.95);
  --glass-border: rgba(20, 22, 25, 0.11);
  --glass-border-strong: rgba(20, 22, 25, 0.20);
  --glass-highlight: rgba(255, 255, 255, 0.75);

  --shadow-hud: 0 12px 34px -8px rgba(20, 22, 25, 0.12), 0 2px 8px rgba(20, 22, 25, 0.05);
  --shadow-panel: 0 24px 64px -12px rgba(20, 22, 25, 0.20), 0 4px 18px rgba(20, 22, 25, 0.08);
  --shadow-card: 0 6px 20px -6px rgba(20, 22, 25, 0.08);

  --font-serif: Georgia, 'Times New Roman', serif;
  --font-sans: 'Readex Pro', system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --radius-xl: 22px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --radius-pill: 999px;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

[data-theme="night"],
body.is-night {
  color-scheme: dark;
  --bg-paper: #0C1017;
  --bg-paper-deep: #121824;
  --bg-paper-tint: #161E2C;
  --ink-primary: #F3F1EC;
  --ink-secondary: #B6C0CC;
  --ink-muted: #7F8A9A;
  --ink-faint: rgba(243, 241, 236, 0.35);

  --accent-teal: #24B89C;
  --accent-teal-hover: #31CEB0;
  --accent-teal-soft: rgba(36, 184, 156, 0.16);
  --accent-teal-border: rgba(36, 184, 156, 0.38);

  --accent-plum: #B278A3;
  --accent-plum-hover: #C48AB5;
  --accent-plum-soft: rgba(178, 120, 163, 0.18);
  --accent-plum-border: rgba(178, 120, 163, 0.38);

  --glass-bg: rgba(15, 20, 29, 0.87);
  --glass-bg-strong: rgba(18, 24, 35, 0.94);
  --glass-card: rgba(25, 33, 47, 0.76);
  --glass-card-hover: rgba(33, 43, 60, 0.94);
  --glass-border: rgba(243, 241, 236, 0.12);
  --glass-border-strong: rgba(243, 241, 236, 0.24);
  --glass-highlight: rgba(255, 255, 255, 0.07);

  --shadow-hud: 0 14px 38px -6px rgba(0, 0, 0, 0.50), 0 2px 10px rgba(0, 0, 0, 0.35);
  --shadow-panel: 0 28px 70px -10px rgba(0, 0, 0, 0.68), 0 6px 22px rgba(0, 0, 0, 0.45);
  --shadow-card: 0 8px 24px -6px rgba(0, 0, 0, 0.4);
}

:root:has(body.is-night) { color-scheme: dark; }

/* BASE RESET, MODE CONTAINERS & RTL GUARD */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; background-color: var(--lv-bg, var(--bg-paper)); color: var(--lv-ink, var(--ink-primary)); font-family: var(--font-sans); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
html:has(body.is-landing-mode), body.is-landing-mode { height: auto; min-height: 100%; overflow-x: clip; overflow-y: visible; user-select: text; -webkit-user-select: text; scroll-behavior: smooth; background-color: var(--lv-bg, #FCFBFD); color: var(--lv-ink, #1A1523); }
body.is-landing-mode .planet-root { opacity: 0; visibility: hidden; pointer-events: none; position: fixed; inset: 0; z-index: 0; }
html:has(body.is-planet-mode), body.is-planet-mode { height: 100%; overflow: hidden; user-select: none; -webkit-user-select: none; background-color: var(--bg-paper); color: var(--ink-primary); }
body.is-planet-mode .landing-view { display: none; }

[dir="rtl"] :is(body, h1, h2, h3, h4, h5, h6, p, a, button, label, span, div, li, strong, small, input, textarea, text):not(.ltr-num):not(.nav-pill-code):not(.panel-hub-num):not(.key-badge):not(.app-tag):not(.idc-val):not(.cd-val):not(.panel-coords-badge):not(.tnum):not([dir="ltr"]) {
  letter-spacing: 0 !important;
}
[dir="rtl"] :is(.ltr-num, .nav-pill-code, .panel-hub-num, .key-badge, .app-tag, .idc-val, .cd-val, .panel-coords-badge) {
  font-family: var(--font-mono); direction: ltr; unicode-bidi: isolate;
}
[dir="ltr"] .ltr-num { font-family: var(--font-mono); letter-spacing: 0.06em; }

button, input, textarea, select { font-family: inherit; color: inherit; background: none; border: none; outline: none; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:where(a, button, input, select, textarea, [tabindex]):focus-visible { outline: 2px solid var(--accent-teal); outline-offset: 2px; }

/* 3D PLANET STAGE & ARCHITECTURAL VIEWPORT FRAME */
.planet-root { position: relative; width: 100%; height: 100dvh; overflow: hidden; }
.planet-stage { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; cursor: grab; touch-action: none; }
.planet-stage:active { cursor: grabbing; }
.planet-stage canvas { display: block; width: 100% !important; height: 100% !important; outline: none; }

.viewport-frame { position: fixed; inset: 10px; pointer-events: none; z-index: 20; border: 1px solid rgba(20, 22, 25, 0.06); border-radius: 18px; transition: border-color 0.4s ease; }
[data-theme="night"] .viewport-frame { border-color: rgba(243, 241, 236, 0.06); }
.vf-corner { position: absolute; width: 10px; height: 10px; border-color: var(--ink-faint); border-style: solid; border-width: 0; }
.vf-tl { top: -1px; left: -1px; border-top-width: 1.5px; border-left-width: 1.5px; border-top-left-radius: 4px; }
.vf-tr { top: -1px; right: -1px; border-top-width: 1.5px; border-right-width: 1.5px; border-top-right-radius: 4px; }
.vf-bl { bottom: -1px; left: -1px; border-bottom-width: 1.5px; border-left-width: 1.5px; border-bottom-left-radius: 4px; }
.vf-br { bottom: -1px; right: -1px; border-bottom-width: 1.5px; border-right-width: 1.5px; border-bottom-right-radius: 4px; }

/* TOP FLOATING NAVIGATION BAR (.planet-hud / #hud-topbar) */
.planet-hud, #hud-topbar {
  position: fixed; top: 16px; inset-inline: 18px; z-index: 200; pointer-events: none;
  transition: transform 0.5s var(--ease-out-expo), opacity 0.5s ease;
}
body.is-loading :is(.planet-hud, #hud-topbar) { opacity: 0; transform: translateY(-16px); }

.hud-inner {
  pointer-events: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px 12px; background: var(--glass-bg); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border); box-shadow: var(--shadow-hud), inset 0 1px 0 var(--glass-highlight);
  border-radius: var(--radius-pill); max-width: 1480px; margin: 0 auto;
}
.hud-brand-group { display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; }
.hud-back-landing-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: var(--radius-pill);
  font-size: 12px; font-weight: 700; color: var(--ink-primary); background: var(--glass-card);
  border: 1px solid var(--glass-border-strong); white-space: nowrap; flex-shrink: 0;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.hud-back-landing-btn:hover { background: var(--accent-teal-soft); border-color: var(--accent-teal-border); color: var(--accent-teal); transform: translateY(-1px); }
.hud-back-landing-btn svg { width: 15px; height: 15px; flex-shrink: 0; }
[dir="rtl"] .hud-back-landing-btn svg { transform: scaleX(-1); }

.hud-brand { display: inline-flex; align-items: center; gap: 10px; padding: 4px 10px 4px 6px; border-radius: var(--radius-pill); transition: background 0.2s ease; flex-shrink: 0; }
.hud-brand:hover { background: var(--accent-teal-soft); }
.hud-brand-emblem { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; color: var(--ink-primary); flex-shrink: 0; }
.hud-brand-emblem.is-wide-logo { width: auto; max-width: 156px; height: 38px; }
.brand-logo-img { height: 100%; width: auto; max-width: 100%; object-fit: contain; display: block; }
html:not([data-theme="night"]) .hud-brand-emblem.is-uploaded-logo img,
html:not([data-theme="night"]) .partner-brand-logo.is-uploaded-logo { mix-blend-mode: multiply; }
html[data-theme="night"] .hud-brand-emblem.is-day-fallback-on-night {
  height: 36px; padding: 3px 8px; border-radius: 8px;
  background: rgba(255, 255, 255, 0.94); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.28);
}
html[data-theme="night"] .partner-brand-logo.is-uploaded-logo {
  padding: 4px 10px; border-radius: 9px; background: rgba(255, 255, 255, 0.94);
}
.hud-brand-text { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; }
.hud-brand-title { font-size: 14px; font-weight: 700; color: var(--ink-primary); }
[dir="ltr"] .hud-brand-title { letter-spacing: -0.01em; }
.hud-brand-dot { color: var(--accent-teal); }
.hud-brand-sub { font-family: var(--font-sans); font-size: 9.5px; color: var(--ink-muted); }
[dir="ltr"] .hud-brand-sub { font-family: var(--font-mono); letter-spacing: 0.04em; }

.hud-cta-demo-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: var(--radius-pill);
  background: var(--accent-teal); color: #FFFFFF; font-size: 12.5px; font-weight: 700; white-space: nowrap;
  box-shadow: 0 4px 12px rgba(20, 22, 25, 0.16); transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.hud-cta-demo-btn:hover { background: var(--accent-teal-hover); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(20, 22, 25, 0.24); }

/* Quick-Sail Pills & HUD Controls */
.hud-nav { flex: 1; min-width: 0; overflow: hidden; }
.hud-nav-scroll { display: flex; align-items: center; gap: 5px; overflow-x: auto; scrollbar-width: none; padding: 2px 4px; }
.hud-nav-scroll::-webkit-scrollbar { display: none; }
.nav-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: var(--radius-pill);
  font-size: 12.5px; font-weight: 500; color: var(--ink-secondary); background: transparent; border: 1px solid transparent;
  white-space: nowrap; flex-shrink: 0; transition: all 0.22s var(--ease-out-expo);
}
.nav-pill:hover { color: var(--ink-primary); background: var(--glass-card-hover); border-color: var(--glass-border); transform: translateY(-1px); }
.nav-pill.is-active { color: #FAF8F3; background: var(--ink-primary); border-color: var(--ink-primary); box-shadow: 0 6px 16px -4px rgba(20, 22, 25, 0.26); }
[data-theme="night"] .nav-pill.is-active { color: #0D1118; background: #F3F1EC; border-color: #F3F1EC; }
.nav-pill-code { font-family: var(--font-mono); font-size: 10.5px; font-weight: 600; padding: 1px 5px; border-radius: 99px; background: rgba(20, 22, 25, 0.07); color: var(--pill-accent, var(--accent-teal)); }
[data-theme="night"] .nav-pill-code { background: rgba(255, 255, 255, 0.1); }
.nav-pill.is-active .nav-pill-code { background: var(--pill-accent, var(--accent-teal)); color: #FFF; }
.nav-pill-icon { display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px; color: var(--pill-accent, var(--accent-teal)); flex-shrink: 0; }
.nav-pill-icon svg { width: 15px; height: 15px; }
.nav-pill.is-active .nav-pill-icon { color: currentColor; }

.hud-utils { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.hud-util-btn {
  width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink-primary); background: var(--glass-card); border: 1px solid var(--glass-border); transition: all 0.2s ease;
}
.hud-util-btn:hover { background: var(--glass-card-hover); border-color: var(--glass-border-strong); transform: translateY(-1px); }
.hud-util-btn svg { width: 17px; height: 17px; }
html[data-theme="day"] .planet-hud .icon-sun { display: none; }
html[data-theme="night"] .planet-hud .icon-moon { display: none; }
html[data-theme="night"] .planet-hud [data-action="toggle-time"] { color: #FBBF24; border-color: rgba(251, 191, 36, 0.38); }
.hud-mode-btn {
  height: 36px; padding: 0 11px; border-radius: var(--radius-pill);
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: 0.02em;
  color: var(--accent-teal); background: var(--accent-teal-soft); border: 1px solid var(--accent-teal-border);
  white-space: nowrap; flex-shrink: 0; transition: all 0.2s ease;
}
.hud-mode-btn:hover { background: var(--accent-teal); color: #FFF; transform: translateY(-1px); }
.hud-mode-btn.is-2d { color: var(--accent-plum); background: var(--accent-plum-soft); border-color: var(--accent-plum-border); }
.hud-mode-btn.is-2d:hover { background: var(--accent-plum); color: #FFF; }

[data-action="toggle-sound"] .icon-vol-on { display: none; }
[data-action="toggle-sound"] .icon-vol-off { display: block; opacity: 0.85; }
[data-action="toggle-sound"].is-on { color: var(--accent-teal); border-color: var(--accent-teal-border); background: var(--accent-teal-soft); }
[data-action="toggle-sound"].is-on .icon-vol-on { display: block; }
[data-action="toggle-sound"].is-on .icon-vol-off { display: none; }

.hud-lang-btn {
  height: 36px; padding: 0 14px; border-radius: var(--radius-pill); font-family: var(--font-sans); font-size: 12px;
  font-weight: 700; color: var(--ink-primary); background: var(--glass-card); border: 1px solid var(--glass-border); transition: all 0.2s ease;
}
.hud-lang-btn:hover { background: var(--accent-teal); color: #FFF; border-color: var(--accent-teal); }

/* FLIGHT TELEMETRY BANNER */
.flight-telemetry[hidden] { display: none; }
.flight-telemetry {
  position: fixed; top: 82px; left: 50%; transform: translateX(-50%); z-index: 150;
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px;
  width: max-content; max-width: calc(100vw - 20px); white-space: nowrap;
  background: var(--glass-bg); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border); border-radius: var(--radius-pill); box-shadow: var(--shadow-hud);
  font-size: 12.5px; animation: fadeSlideDown 0.35s var(--ease-out-expo);
}
.ft-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ft-open-btn { flex-shrink: 0; white-space: nowrap; }
@keyframes fadeSlideDown { from { opacity: 0; transform: translate(-50%, -10px); } to { opacity: 1; transform: translate(-50%, 0); } }
.ft-pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-teal); outline: 4px solid var(--accent-teal-soft); }
.ft-code { font-family: var(--font-mono); font-size: 11px; font-weight: 700; color: var(--accent-teal); }
.ft-text { font-weight: 600; color: var(--ink-primary); }
.ft-open-btn { padding: 3px 10px; border-radius: var(--radius-pill); font-size: 11.5px; font-weight: 600; background: var(--accent-teal); color: #FFF; }

/* SLIDE-OVER INTERACTIVE BUILDING PANEL (.building-panel / #building-panel) */
.building-panel, #building-panel {
  position: fixed; top: 80px; bottom: 18px; width: min(510px, calc(100vw - 28px)); z-index: 250; pointer-events: none;
  transition: transform 0.55s var(--ease-out-expo), opacity 0.45s var(--ease-out-expo); opacity: 0;
}
[dir="rtl"] :is(.building-panel, #building-panel) { left: 18px; right: auto; transform: translateX(-108%); }
[dir="ltr"] :is(.building-panel, #building-panel) { right: 18px; left: auto; transform: translateX(108%); }
:is(.building-panel, #building-panel).is-open { pointer-events: auto; opacity: 1; transform: translateX(0); }

.panel-glass-shell {
  width: 100%; height: 100%; display: flex; flex-direction: column;
  background: var(--glass-bg); backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px);
  border: 1px solid var(--glass-border-strong); box-shadow: var(--shadow-panel), inset 0 1px 0 var(--glass-highlight);
  border-radius: var(--radius-xl); overflow: hidden;
}
.panel-top-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 18px; border-bottom: 1px solid var(--glass-border); background: rgba(20, 22, 25, 0.025); flex-shrink: 0; }
.panel-meta-badges { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.panel-sector-code { font-family: var(--font-sans); font-size: 10.5px; font-weight: 700; padding: 3px 8px; border-radius: 6px; background: var(--ink-primary); color: var(--bg-paper); }
[dir="ltr"] .panel-sector-code { font-family: var(--font-mono); letter-spacing: 0.08em; }
.panel-category-badge { font-size: 11.5px; font-weight: 600; padding: 3px 10px; border-radius: var(--radius-pill); background: var(--accent-teal-soft); color: var(--accent-teal); border: 1px solid var(--accent-teal-border); }
.panel-coords-badge { font-family: var(--font-mono); font-size: 10px; color: var(--ink-muted); }
.panel-meta-actions { display: flex; align-items: center; gap: 5px; }
.panel-step-btn { width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--glass-card); border: 1px solid var(--glass-border); color: var(--ink-secondary); transition: all 0.2s ease; }
.panel-step-btn:hover { background: var(--glass-card-hover); color: var(--ink-primary); }
.panel-step-btn svg { width: 14px; height: 14px; }
[dir="ltr"] .panel-step-btn svg { transform: scaleX(-1); }
.panel-close-btn { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: var(--radius-pill); font-size: 12px; font-weight: 600; background: var(--glass-card); border: 1px solid var(--glass-border-strong); color: var(--ink-primary); transition: all 0.2s ease; }
.panel-close-btn:hover { background: #C85A32; border-color: #C85A32; color: #FFF; }
.panel-close-icon { font-size: 16px; line-height: 1; }

.panel-hero { padding: 16px 20px 14px; border-bottom: 1px solid var(--glass-border); flex-shrink: 0; }
.panel-hero-title-row { display: flex; align-items: flex-start; gap: 14px; }
.panel-number-serif {
  font-family: var(--font-serif); font-size: 38px; line-height: 0.9; font-style: italic;
  color: var(--panel-accent, var(--accent-teal)); flex-shrink: 0; display: inline-flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 4px; width: 54px; height: 58px; border-radius: 14px;
  background: color-mix(in srgb, var(--panel-accent, #17806D) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--panel-accent, #17806D) 28%, transparent);
}
.panel-hub-svg, .panel-hub-svg svg { display: inline-flex; width: 24px; height: 24px; }
.panel-hub-num { font-family: var(--font-mono); font-style: normal; font-size: 10px; font-weight: 700; letter-spacing: 0.06em; opacity: 0.85; }
.heading-svg-icon, .btn-svg-icon { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.panel-title-stack { flex: 1; min-width: 0; }
.panel-title { font-size: clamp(18px, 2vw, 22px); font-weight: 700; color: var(--ink-primary); line-height: 1.25; }
.panel-description { margin-top: 5px; font-size: 13px; line-height: 1.55; color: var(--ink-secondary); }

.panel-telemetry-bar { margin-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; background: var(--glass-card); border: 1px solid var(--glass-border); border-radius: var(--radius-md); }
.pt-item { display: flex; flex-direction: column; gap: 1px; }
.pt-label { font-size: 10px; color: var(--ink-muted); }
.pt-val { font-size: 11.5px; font-weight: 600; color: var(--ink-primary); }
.pt-divider { width: 1px; height: 22px; background: var(--glass-border); }

.panel-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 16px 18px 22px; display: flex; flex-direction: column; gap: 12px; scrollbar-width: thin; scrollbar-color: var(--ink-faint) transparent; }
.panel-body::-webkit-scrollbar { width: 5px; }
.panel-body::-webkit-scrollbar-thumb { background: var(--ink-faint); border-radius: 99px; }
.panel-section-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 2px; }
.panel-section-title { font-size: 12px; font-weight: 700; color: var(--ink-muted); }
[dir="ltr"] .panel-section-title { text-transform: uppercase; letter-spacing: 0.05em; }
.panel-expand-all-btn { font-size: 11.5px; font-weight: 600; color: var(--accent-teal); padding: 2px 8px; border-radius: 6px; transition: background 0.2s ease; }
.panel-expand-all-btn:hover { background: var(--accent-teal-soft); }

/* ODOO APPS ACCORDION CARDS */
.apps-grid { display: flex; flex-direction: column; gap: 10px; }
.app-card { background: var(--glass-card); border: 1px solid var(--glass-border); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); transition: all 0.25s var(--ease-out-expo); overflow: hidden; }
.app-card:hover { background: var(--glass-card-hover); border-color: var(--glass-border-strong); }
.app-card.is-expanded { background: var(--glass-card-hover); border-color: var(--app-color, var(--accent-teal)); box-shadow: 0 12px 28px -10px rgba(0, 0, 0, 0.20); }
.app-card-trigger { width: 100%; display: flex; align-items: flex-start; gap: 12px; padding: 13px 14px; text-align: start; }
.app-icon-box {
  width: 42px; height: 42px; border-radius: 11px; display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--app-color, #17806D) 14%, transparent); color: var(--app-color, #17806D);
  border: 1px solid color-mix(in srgb, var(--app-color, #17806D) 30%, transparent); flex-shrink: 0; transition: transform 0.25s ease;
}
.app-card:hover .app-icon-box { transform: scale(1.05); }
.app-icon-box svg { width: 22px; height: 22px; }
.app-card-main { flex: 1; min-width: 0; }
.app-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.app-card-name { font-size: 14.5px; font-weight: 700; color: var(--ink-primary); }
.app-card-badge { font-size: 10.5px; font-weight: 600; padding: 2px 8px; border-radius: var(--radius-pill); background: color-mix(in srgb, var(--app-color, #17806D) 13%, transparent); color: var(--app-color, #17806D); }
.app-card-summary { margin-top: 4px; font-size: 12.5px; line-height: 1.48; color: var(--ink-secondary); }
.app-card-chevron { width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: rgba(20, 22, 25, 0.05); color: var(--ink-muted); flex-shrink: 0; margin-top: 2px; transition: transform 0.28s var(--ease-out-expo), background 0.2s ease, color 0.2s ease; }
.app-card.is-expanded .app-card-chevron { transform: rotate(180deg); background: var(--app-color, var(--accent-teal)); color: #FFF; }
.app-card-details { display: none; padding: 0 14px 14px; border-top: 1px dashed var(--glass-border); margin-top: 2px; animation: appExpandFade 0.28s var(--ease-out-expo); }
.app-card.is-expanded .app-card-details { display: block; }
@keyframes appExpandFade { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
.app-features-label { margin-top: 10px; margin-bottom: 7px; font-size: 11px; font-weight: 700; color: var(--ink-muted); }
[dir="ltr"] .app-features-label { text-transform: uppercase; letter-spacing: 0.04em; }
.app-features-list { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.app-feature-item { display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; line-height: 1.45; color: var(--ink-primary); }
.app-feature-check { width: 16px; height: 16px; border-radius: 50%; background: color-mix(in srgb, var(--app-color, #17806D) 16%, transparent); color: var(--app-color, #17806D); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 2px; }
.app-feature-check svg { width: 10px; height: 10px; }
.app-card-actions { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--glass-border); display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.app-tags { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.app-tag { font-family: var(--font-mono); font-size: 10px; padding: 2px 7px; border-radius: 5px; background: rgba(20, 22, 25, 0.06); color: var(--ink-secondary); }
[data-theme="night"] .app-tag { background: rgba(255, 255, 255, 0.08); }
.btn-app-demo { display: inline-flex; align-items: center; gap: 6px; padding: 6px 13px; border-radius: var(--radius-pill); font-size: 12px; font-weight: 600; color: #FFF; background: var(--app-color, var(--accent-teal)); box-shadow: 0 4px 12px -2px rgba(20, 22, 25, 0.24); transition: transform 0.2s ease, opacity 0.2s ease; }
.btn-app-demo:hover { transform: translateY(-1px); opacity: 0.94; }

/* PANEL 07 STUDIO & BRAND HELPERS */
.partner-brand-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: var(--radius-md); background: var(--glass-card); border: 1px solid var(--accent-teal-border); flex-wrap: wrap; }
.partner-brand-logo { max-height: 40px; max-width: 170px; width: auto; object-fit: contain; display: block; }
.partner-official-tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: var(--radius-pill); background: var(--accent-teal-soft); color: var(--accent-teal); font-size: 11px; font-weight: 700; }
.trust-badges-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.trust-badge-pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: var(--radius-pill); font-size: 11px; font-weight: 600; background: rgba(20, 22, 25, 0.04); border: 1px solid var(--glass-border-strong); color: var(--ink-primary); }
[data-theme="night"] .trust-badge-pill { background: rgba(255, 255, 255, 0.05); }
.btn-profile-pdf { display: inline-flex; align-items: center; justify-content: center; gap: 7px; width: 100%; padding: 10px 14px; border-radius: var(--radius-md); background: var(--accent-plum-soft); color: var(--accent-plum); border: 1px solid var(--accent-plum-border); text-decoration: none; font-size: 12.5px; font-weight: 700; transition: all 0.2s ease; }
.btn-profile-pdf:hover { background: var(--accent-plum); color: #FFFFFF; }
.social-links-bar { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 6px; }
.social-link-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--radius-pill); background: var(--glass-card); border: 1px solid var(--glass-border-strong); color: var(--ink-primary); text-decoration: none; font-size: 11.5px; font-weight: 600; transition: all 0.2s ease; }
.social-link-chip:hover { border-color: var(--accent-teal); color: var(--accent-teal); transform: translateY(-1px); }

.studio-metrics-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; }
.studio-metric-card { padding: 12px 14px; background: var(--glass-card); border: 1px solid var(--glass-border); border-radius: var(--radius-md); display: flex; flex-direction: column; gap: 2px; }
.studio-metric-num { font-family: var(--font-serif); font-size: 30px; line-height: 1; color: var(--accent-teal); }
.studio-metric-card:nth-child(2) .studio-metric-num { color: var(--accent-plum); }
.studio-metric-label { font-size: 12px; font-weight: 600; color: var(--ink-primary); }
.studio-metric-sub { font-size: 11px; color: var(--ink-muted); }
.studio-pillars-box { padding: 14px; background: var(--glass-card); border: 1px solid var(--glass-border); border-radius: var(--radius-lg); }
.studio-box-heading { font-size: 13px; font-weight: 700; color: var(--ink-primary); margin-bottom: 10px; display: flex; align-items: center; gap: 7px; }
.studio-Integration-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.integration-chip { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: var(--radius-pill); font-size: 11.5px; font-weight: 600; background: var(--accent-teal-soft); color: var(--accent-teal); border: 1px solid var(--accent-teal-border); }
.integration-chip.is-plum { background: var(--accent-plum-soft); color: var(--accent-plum); border-color: var(--accent-plum-border); }
.methodology-steps { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.method-step { padding: 10px 11px; border-radius: var(--radius-md); background: rgba(20, 22, 25, 0.03); border: 1px solid var(--glass-border); }
[data-theme="night"] .method-step { background: rgba(255, 255, 255, 0.03); }
.method-step-num { font-family: var(--font-sans); font-size: 10px; font-weight: 700; color: var(--accent-teal); }
[dir="ltr"] .method-step-num { font-family: var(--font-mono); letter-spacing: 0.06em; }
.method-step-title { font-size: 12.5px; font-weight: 700; color: var(--ink-primary); margin-top: 2px; }
.method-step-desc { font-size: 11px; color: var(--ink-secondary); margin-top: 2px; line-height: 1.4; }

/* PANEL 08 CONTACT & DEMO FORM + INSTANT PASS */
.contact-form-card { padding: 15px; background: var(--glass-card); border: 1px solid var(--glass-border-strong); border-radius: var(--radius-lg); display: flex; flex-direction: column; gap: 11px; }
.cf-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.cf-field { display: flex; flex-direction: column; gap: 4px; }
.cf-label { font-size: 11.5px; font-weight: 600; color: var(--ink-secondary); }
.cf-input, .cf-textarea { width: 100%; padding: 9px 11px; font-size: 13px; color: var(--ink-primary); background: var(--bg-paper-tint); border: 1px solid var(--glass-border-strong); border-radius: var(--radius-sm); transition: border-color 0.2s ease, box-shadow 0.2s ease; user-select: text; -webkit-user-select: text; }
.cf-input:focus, .cf-textarea:focus { border-color: var(--accent-teal); outline: 2px solid var(--accent-teal); outline-offset: 1px; }
.cf-textarea { resize: vertical; min-height: 68px; }
.cf-apps-selector { display: flex; flex-wrap: wrap; gap: 6px; }
.cf-app-chip { cursor: pointer; display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: var(--radius-pill); font-size: 11.5px; font-weight: 500; color: var(--ink-secondary); background: var(--bg-paper-tint); border: 1px solid var(--glass-border); transition: all 0.18s ease; }
.cf-app-chip input { display: none; }
.cf-app-chip.is-checked { background: var(--accent-teal); color: #FFF; border-color: var(--accent-teal); font-weight: 600; }
.cf-submit-row { display: grid; grid-template-columns: 1.2fr 1fr; gap: 8px; margin-top: 4px; }
.btn-cf-whatsapp { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 10px 14px; border-radius: var(--radius-md); font-size: 13px; font-weight: 700; color: #FFF; background: var(--accent-teal); transition: all 0.2s ease; }
.btn-cf-whatsapp:hover { background: var(--accent-teal-hover); transform: translateY(-1px); }
.btn-cf-submit { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 10px 14px; border-radius: var(--radius-md); font-size: 13px; font-weight: 600; color: var(--bg-paper); background: var(--ink-primary); transition: all 0.2s ease; }
.btn-cf-submit:hover { opacity: 0.9; transform: translateY(-1px); }
.cf-confirmation { padding: 14px; border-radius: var(--radius-md); background: var(--accent-teal-soft); border: 1px solid var(--accent-teal-border); color: var(--ink-primary); font-size: 12.5px; line-height: 1.5; }

.instant-demo-card { margin-top: 10px; padding: 14px; border-radius: var(--radius-md); background: var(--glass-bg-strong); border: 1.5px solid var(--accent-teal); box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.22); display: flex; flex-direction: column; gap: 10px; }
.idc-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.idc-badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 99px; background: var(--accent-teal); color: #fff; font-size: 10.5px; font-weight: 700; }
.idc-grid { display: grid; grid-template-columns: 1fr; gap: 6px; padding: 10px; border-radius: var(--radius-sm); background: rgba(20, 22, 25, 0.04); border: 1px solid var(--glass-border); }
[data-theme="night"] .idc-grid { background: rgba(255, 255, 255, 0.05); }
.idc-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; }
.idc-label { color: var(--ink-secondary); font-weight: 600; }
.idc-val { font-family: var(--font-mono); font-weight: 700; color: var(--ink-primary); direction: ltr; user-select: all; -webkit-user-select: all; }
.btn-launch-demo { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border-radius: var(--radius-md); background: linear-gradient(135deg, var(--accent-teal), var(--accent-teal-hover)); color: #fff; text-decoration: none; font-size: 13px; font-weight: 700; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.btn-launch-demo:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.24); }

.contact-direct-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.contact-direct-card { padding: 10px 12px; border-radius: var(--radius-md); background: var(--glass-card); border: 1px solid var(--glass-border); text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 2px; transition: border-color 0.2s ease, transform 0.2s ease; }
.contact-direct-card:hover { border-color: var(--accent-teal); transform: translateY(-1px); }
.cd-label { font-size: 10.5px; color: var(--ink-muted); }
.cd-val { font-family: var(--font-mono); font-size: 12px; font-weight: 600; color: var(--ink-primary); direction: ltr; text-align: start; }

/* PANEL FOOTER */
.panel-footer { padding: 11px 18px; border-top: 1px solid var(--glass-border); background: rgba(20, 22, 25, 0.025); display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-shrink: 0; }
.panel-footer-info { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--ink-muted); }
.pf-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-teal); flex-shrink: 0; }
.btn-hub-demo { display: inline-flex; align-items: center; gap: 7px; padding: 8px 15px; border-radius: var(--radius-pill); font-size: 12px; font-weight: 600; color: #FFF; background: linear-gradient(135deg, var(--accent-teal), var(--accent-plum)); white-space: nowrap; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.btn-hub-demo:hover { transform: translateY(-1px); box-shadow: 0 8px 20px -4px rgba(0, 0, 0, 0.28); }
.btn-hub-demo svg { width: 14px; height: 14px; }
[dir="ltr"] .btn-hub-demo svg { transform: scaleX(-1); }

/* 3D PLANET MODALS (#about-modal, #contact-modal) */
dialog:is(#about-modal, #contact-modal) {
  margin: auto; width: min(640px, calc(100vw - 24px)); max-height: min(86dvh, 760px); padding: 0;
  border: 1px solid var(--glass-border-strong); border-radius: var(--radius-xl);
  background: var(--glass-bg-strong); color: var(--ink-primary); box-shadow: var(--shadow-panel); overflow: hidden; flex-direction: column;
}
dialog:is(#about-modal, #contact-modal)[open] { display: flex; }
dialog:is(#about-modal, #contact-modal):modal { overscroll-behavior: contain; }
dialog:is(#about-modal, #contact-modal)::backdrop { overflow: hidden; overscroll-behavior: contain; background: rgba(7, 10, 18, 0.62); }

/* BOTTOM HUD, TOASTS & PORTAL OVERLAY */
.planet-bottom-hud { position: fixed; bottom: max(18px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); z-index: 180; pointer-events: none; transition: opacity 0.35s ease, transform 0.4s var(--ease-out-expo); }
body.is-loading .planet-bottom-hud, body.has-open-panel .planet-bottom-hud { opacity: 0; pointer-events: none !important; transform: translate(-50%, 16px); }
.hint-pill { pointer-events: auto; display: inline-flex; align-items: center; gap: 12px; padding: 7px 10px 7px 14px; background: var(--glass-bg); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border: 1px solid var(--glass-border-strong); box-shadow: var(--shadow-hud); border-radius: var(--radius-pill); max-width: min(92vw, 760px); }
.hint-keys { display: inline-flex; align-items: center; gap: 3px; flex-shrink: 0; }
.key-badge { width: 21px; height: 21px; border-radius: 5px; display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: 10px; font-weight: 700; color: var(--ink-primary); background: var(--glass-card); border: 1px solid var(--glass-border-strong); box-shadow: 0 2px 0 var(--glass-border); }
.hint-text { font-size: 12.5px; font-weight: 500; color: var(--ink-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hint-text-mobile { display: none; }
.hint-tour-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 13px; border-radius: var(--radius-pill); font-size: 11.5px; font-weight: 600; color: var(--accent-teal); background: var(--accent-teal-soft); border: 1px solid var(--accent-teal-border); white-space: nowrap; flex-shrink: 0; transition: all 0.2s ease; }
.hint-tour-btn:hover, .hint-tour-btn.is-touring { background: var(--accent-teal); color: #FFF; }
.tour-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.toast-stack, #toast { position: fixed; bottom: 72px; left: 50%; transform: translateX(-50%); z-index: 950; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
body.is-landing-mode :is(.toast-stack, #toast) { bottom: 20px; left: auto; inset-inline-end: 20px; transform: none; }
.toast-item { pointer-events: auto; display: inline-flex; align-items: center; gap: 10px; padding: 10px 18px; border-radius: var(--radius-pill); background: var(--ink-primary); color: var(--bg-paper); font-size: 13px; font-weight: 600; box-shadow: var(--shadow-panel); animation: toastIn 0.3s var(--ease-out-expo); }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px) scale(0.96); } to { opacity: 1; transform: translateY(0) scale(1); } }

.portal-transition-overlay, [data-portal-overlay] {
  position: fixed; inset: 0; z-index: 980; pointer-events: none; opacity: 0;
  background: radial-gradient(circle at center, color-mix(in srgb, var(--accent-teal) 52%, transparent) 0%, color-mix(in srgb, var(--accent-plum) 42%, var(--bg-paper)) 46%, var(--bg-paper) 100%);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.portal-transition-overlay.is-active, [data-portal-overlay].is-active { pointer-events: auto; will-change: transform, opacity; }

/* INTERACTIVE 2D PLANET EXPLORER FALLBACK (.p2d-*) */
.p2d-stage {
  position: absolute; inset: 0; width: 100%; height: 100%; padding: 94px 16px 76px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; overflow: hidden; cursor: default;
  background: radial-gradient(circle at 50% 48%, #F8F5EE 0%, #EEEBE4 58%, #E3DED3 100%);
  transition: background 0.4s ease, color 0.3s ease;
}
[data-theme="night"] .p2d-stage, .p2d-stage.is-night {
  background: radial-gradient(circle at 50% 48%, #0E172E 0%, #0C1017 62%, #070A10 100%);
}
.p2d-stars {
  position: absolute; inset: 0; pointer-events: none; opacity: 0.22;
  background-image:
    radial-gradient(1.5px 1.5px at 14% 22%, var(--ink-muted) 60%, transparent 100%),
    radial-gradient(1.5px 1.5px at 78% 18%, var(--ink-muted) 60%, transparent 100%),
    radial-gradient(2px 2px at 86% 74%, var(--accent-teal) 50%, transparent 100%),
    radial-gradient(1.5px 1.5px at 22% 82%, var(--ink-muted) 60%, transparent 100%);
  background-size: 320px 320px;
}
.p2d-stage.is-night .p2d-stars { opacity: 0.78; }
.p2d-orbit-box {
  position: relative; flex: 1 1 auto; width: min(92vw, 720px); max-height: 100%; min-height: 290px;
  display: grid; place-items: center; --p2d-rx: 37%; --p2d-ry: 38%;
}
.p2d-ring { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); border-radius: 50%; pointer-events: none; }
.p2d-ring-outer { width: 74%; max-width: 440px; aspect-ratio: 1; max-height: 82%; border: 1.5px dashed color-mix(in srgb, var(--p2d-accent, var(--accent-teal)) 36%, transparent); }
.p2d-ring-inner { width: 54%; max-width: 310px; aspect-ratio: 1; max-height: 60%; border: 1px solid color-mix(in srgb, var(--glass-border-strong) 80%, transparent); }
.p2d-planet-wrap { position: relative; width: min(62vw, 440px); max-height: 66%; display: flex; align-items: center; justify-content: center; pointer-events: none; z-index: 2; }
.p2d-planet-img { width: 100%; max-height: 100%; height: auto; object-fit: contain; display: block; transition: opacity 0.35s ease; filter: drop-shadow(0 18px 34px rgba(20, 22, 25, 0.16)); }
.p2d-stage.is-night .p2d-planet-img {
  filter: drop-shadow(0 20px 44px rgba(0, 0, 0, 0.65));
  -webkit-mask-image: radial-gradient(closest-side circle at 50% 50%, #000 72%, rgba(0, 0, 0, 0.65) 86%, transparent 98%);
  mask-image: radial-gradient(closest-side circle at 50% 50%, #000 72%, rgba(0, 0, 0, 0.65) 86%, transparent 98%);
}
.p2d-pins { position: absolute; inset: 0; z-index: 5; pointer-events: none; }
.p2d-pin {
  position: absolute; left: calc(50% + var(--dx) * var(--p2d-rx)); top: calc(50% + var(--dy) * var(--p2d-ry));
  transform: translate(-50%, -50%); pointer-events: auto; min-width: 44px; min-height: 44px;
  padding-block: 6px; padding-inline: 8px 12px; border-radius: var(--radius-pill); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  background: var(--glass-bg-strong); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1.5px solid color-mix(in srgb, var(--pin-accent, var(--accent-teal)) 42%, var(--glass-border));
  box-shadow: var(--shadow-card); color: var(--ink-primary); font-size: 12.5px; font-weight: 700;
  transition: transform 0.24s var(--ease-out-expo), border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.p2d-pin:hover { transform: translate(-50%, -52%) scale(1.04); border-color: var(--pin-accent, var(--accent-teal)); }
.p2d-pin.is-active {
  transform: translate(-50%, -50%) scale(1.07); background: var(--pin-accent, var(--accent-teal)); color: #FFF;
  border-color: var(--pin-accent, var(--accent-teal)); box-shadow: 0 10px 26px -6px color-mix(in srgb, var(--pin-accent, var(--accent-teal)) 55%, transparent);
}
.p2d-pin-code {
  display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 99px;
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 700; background: var(--pin-accent, var(--accent-teal)); color: #FFF; flex-shrink: 0;
}
.p2d-pin.is-active .p2d-pin-code { background: rgba(255, 255, 255, 0.22); }
.p2d-pin-ic, .p2d-pin-ic svg { display: inline-flex; width: 15px; height: 15px; color: var(--pin-accent, var(--accent-teal)); flex-shrink: 0; }
.p2d-pin.is-active .p2d-pin-ic { color: #FFF; }
.p2d-rocket {
  position: absolute; z-index: 4; left: calc(50% + var(--rocket-dx, 0) * var(--p2d-rx)); top: calc(50% + var(--rocket-dy, -0.58) * var(--p2d-ry));
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; pointer-events: none;
  background: var(--glass-bg-strong); border: 1.5px solid var(--p2d-accent, var(--accent-teal)); color: var(--p2d-accent, var(--accent-teal));
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22); transform: translate(-50%, -50%) rotate(var(--rocket-ang, 0deg));
  transition: left 320ms var(--ease-out-expo), top 320ms var(--ease-out-expo), transform 320ms ease;
}
.p2d-rocket svg { width: 18px; height: 18px; }
.p2d-rocket.is-flying { box-shadow: 0 0 18px color-mix(in srgb, var(--p2d-accent, var(--accent-teal)) 65%, transparent); }
.p2d-status-bar {
  position: relative; z-index: 7; flex-shrink: 0; display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center;
  padding: 5px 10px; border-radius: var(--radius-pill); background: var(--glass-bg); backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border); box-shadow: var(--shadow-card);
}
.p2d-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; color: var(--ink-secondary); }
.p2d-badge-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--p2d-accent, var(--accent-teal)); }
.p2d-switch-btn { min-height: 30px; padding: 4px 11px; border-radius: var(--radius-pill); font-size: 11.5px; font-weight: 700; color: #FFF; background: var(--p2d-accent, var(--accent-teal)); transition: transform 0.2s ease, opacity 0.2s ease; }
.p2d-switch-btn:hover { transform: translateY(-1px); opacity: 0.92; }

/* RESPONSIVE BREAKPOINTS & REDUCED MOTION */
@media (max-width: 1024px) {
  .hud-brand-sub, .hud-cta-demo-btn span { display: none; }
  .hud-cta-demo-btn { width: 44px; padding: 0; justify-content: center; }
  .building-panel, #building-panel { width: min(440px, calc(100vw - 24px)); }
}

@media (max-width: 768px), (pointer: coarse) {
  .hud-util-btn, .hud-back-landing-btn, .hud-lang-btn, .hud-mode-btn, .hud-cta-demo-btn,
  .nav-pill, .panel-step-btn, .panel-close-btn, .ft-open-btn, .hint-tour-btn, .p2d-switch-btn {
    min-height: 44px; min-width: 44px;
  }
  .hud-lang-btn, .hud-mode-btn, .nav-pill, .panel-close-btn, .ft-open-btn, .hint-tour-btn, .p2d-switch-btn {
    padding: 0 12px;
  }
}

@media (max-width: 768px) {
  .viewport-frame { display: none; }
  .planet-hud, #hud-topbar { top: 8px; inset-inline: 8px; transition: opacity 0.22s ease; }
  body.has-open-panel .planet-hud,
  body.has-open-panel .flight-telemetry { opacity: 0; pointer-events: none; }
  .hud-inner { flex-wrap: wrap; justify-content: space-between; border-radius: 14px; padding: 5px 8px; gap: 5px; }
  .hud-brand { padding: 2px 4px; gap: 5px; min-width: 0; }
  .hud-brand-emblem { width: 28px; height: 28px; }
  .hud-brand-emblem.is-wide-logo { max-width: 108px; height: 30px; }
  html[data-theme="night"] .hud-brand-emblem.is-day-fallback-on-night { height: 29px; padding: 2px 6px; border-radius: 6px; }
  .hud-brand-title { font-size: 12.5px; }
  .hud-brand-group { order: 1; gap: 6px; flex: 1 1 auto; min-width: 0; }
  .hud-back-landing-btn { width: 44px; height: 44px; padding: 0; justify-content: center; flex-shrink: 0; }
  .hud-back-landing-btn span:not(.btn-svg-icon) { display: none; }
  .hud-utils { order: 2; gap: 4px; flex-shrink: 0; }
  .hud-util-btn { width: 44px; height: 44px; }
  .hud-lang-btn, .hud-mode-btn { height: 44px; font-size: 11px; }
  .hud-nav {
    order: 3; flex-basis: 100%; border-top: 1px solid var(--glass-border); padding-top: 4px;
    mask-image: linear-gradient(to left, transparent 0, #000 18px, #000 calc(100% - 18px), transparent 100%);
    -webkit-mask-image: linear-gradient(to left, transparent 0, #000 18px, #000 calc(100% - 18px), transparent 100%);
  }
  .nav-pill { padding: 0 12px; font-size: 11.5px; }
  .flight-telemetry { top: 124px; max-width: calc(100vw - 16px); padding: 6px 11px; font-size: 11.5px; transition: opacity 0.22s ease; }
  .p2d-stage { padding: 126px 12px 74px; }
  .p2d-orbit-box { --p2d-rx: 34%; --p2d-ry: 38%; }

  [dir="rtl"] :is(.building-panel, #building-panel),
  [dir="ltr"] :is(.building-panel, #building-panel),
  .building-panel, #building-panel { top: auto; bottom: 0; left: 0 !important; right: 0 !important; width: 100vw; max-width: 100vw; z-index: 260; height: min(86dvh, 700px); transform: translateY(105%) !important; }
  :is(.building-panel, #building-panel).is-open { opacity: 1 !important; transform: translateY(0) !important; }
  .panel-glass-shell { border-radius: 22px 22px 0 0; border-bottom: none; border-inline: none; }
  .panel-top-meta { padding: 8px 14px; }
  .panel-coords-badge, .panel-footer-info, .hint-keys, .hint-text-desktop { display: none; }
  .panel-hero { padding: 8px 14px; }
  .panel-number-serif { font-size: 30px; }
  .panel-title { font-size: 15.5px; }
  .panel-description {
    font-size: 12px; line-height: 1.4;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  }
  .panel-body { padding: 12px 14px 18px; }
  .panel-footer { padding: 10px 14px max(12px, env(safe-area-inset-bottom)); justify-content: center; }
  .panel-footer-cta, .btn-hub-demo { width: 100%; }
  .btn-hub-demo { justify-content: center; padding: 11px 16px; font-size: 13px; }
  .planet-bottom-hud { bottom: max(12px, env(safe-area-inset-bottom)); width: calc(100vw - 16px); display: flex; justify-content: center; }
  .hint-pill { width: auto; max-width: 100%; padding: 5px 7px; gap: 6px; justify-content: space-between; }
  .hint-text-mobile { display: block; font-size: 10.2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .hint-tour-btn { padding: 0 12px; font-size: 10.8px; }
  .cf-input, .cf-textarea { font-size: 16px; min-height: 44px; }
  .cf-row-2, .cf-submit-row, .contact-direct-grid, .methodology-steps { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .hud-utils { flex-basis: 100%; justify-content: space-between; }
  .hud-mode-btn { padding: 0 9px; font-size: 10.5px; }
  .flight-telemetry { top: 174px; }
  .p2d-stage { padding: 172px 8px 74px; }
  .p2d-orbit-box { --p2d-rx: 32%; --p2d-ry: 37%; min-height: 250px; }
  .p2d-pin { padding-block: 4px; padding-inline: 6px 8px; font-size: 11px; gap: 4px; max-width: 124px; }
  .p2d-pin-label { overflow: hidden; text-overflow: ellipsis; }
}

@media (prefers-reduced-motion: reduce) {
  html:has(body.is-landing-mode), body.is-landing-mode { scroll-behavior: auto; }
  .flight-telemetry, .toast-item, .app-card-details { animation: none !important; }
  .p2d-pin, .p2d-rocket, .p2d-planet-img { transition: none !important; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}
