/* assets/css/style.css */
:root {
  --pad: clamp(16px, 3vw, 36px);
  --shadow: 0 10px 30px rgba(0, 0, 0, .45);
  --card: rgba(0, 0, 0, .42);
  --stroke: rgba(255, 255, 255, .18);
  --text: rgba(255, 255, 255, .96);
  --muted: rgba(255, 255, 255, .82);
  --accent: #D99F54;
  --accent-glow: rgba(217, 159, 84, 0.35);
  --accent-dim: rgba(217, 159, 84, 0.12);
  --agent-dock-h: 0px; /* lifted on desktop when the Agent dock exists */
  --ui-font: "Lato", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  --serif-font: "Cormorant Garamond", serif;

  --fun-min: 18px;
  --fun-max: 28px;
  --sig-min: 30px;
  --sig-max: 54px;

  --x-bottom: 0px;
  --footer-gap: 14px;
  --soundwave-gap: 120px;

  --spec-width: min(460px, calc((100vw - (var(--pad) * 2)) * 0.48));
  --spec-height: 40px;
  --spec-bar-w: 3px;
  --spec-gap: 2px;

  --panel-max: 520px;
}

body.has-agent-dock { --agent-dock-h: 64px; }

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--ui-font);
  background: #000;
  color: var(--text);
  cursor: default;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  overflow: hidden;
  transition: cursor .2s;
}

/* -------------------------------------------------
   Cursor: only show pointer on real interactive UI
------------------------------------------------- */

button,
a,
[role="button"],
.navlink,
.lang-btn,
.ctrl-btn,
.mute-btn,
.tipbtn,
.role-clickable,
.client-rotator-link,
#agentOpenBtn,
#agentClose,
#modalClose,
.role-modal-close,
#fullscreenBtn,
#collapseBtn,
#audioStartBtn {
  cursor: pointer;
}

.topui:not(.playing) {
  cursor: pointer;
}

body.fullscreen { cursor: none; }

.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  transition: filter .4s ease;
}

body.fullscreen .bg { filter: brightness(1.12) saturate(1.05); }

.bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: none;
}

.bg-image {
  position: absolute;
  inset: 0;
  background: url("/assets/pano-website.jpg") center/cover no-repeat;
  display: block;
}

.bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, .10), rgba(0, 0, 0, .66));
  transition: opacity .4s ease;
  opacity: 1;
}

/* 10% less dark when modal is open */
body.modal-open .bg-overlay { opacity: .90; }

body.fullscreen .bg-overlay { opacity: .5; }

.fun-text {
  position: fixed;
  left: var(--pad);
  top: calc(var(--pad) + env(safe-area-inset-top));
  z-index: 6;
  max-width: calc(100vw - (var(--pad) * 2));
  font-size: clamp(var(--fun-min), 3.4vw, var(--fun-max));
  line-height: 1.15;
  opacity: .92;
  pointer-events: none;
  font-weight: 700;
  letter-spacing: .01em;
  text-shadow: 0 12px 34px rgba(0, 0, 0, .55), 0 0 40px var(--accent-glow);
  transition: opacity .35s ease, text-shadow .4s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.fullscreen .fun-text {
  opacity: 1;
  text-shadow: 0 12px 40px rgba(0, 0, 0, .7), 0 0 60px var(--accent-glow);
}

.lang-selector {
  position: fixed;
  left: var(--pad);
  top: calc(var(--pad) + env(safe-area-inset-top) + clamp(var(--fun-min), 3.4vw, var(--fun-max)) * 1.15 + 8px);
  z-index: 6;
  display: flex;
  gap: 8px;
  pointer-events: auto;
  opacity: .6;
  transition: opacity .3s ease;
}

.lang-selector:hover { opacity: 1; }

.lang-btn {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  color: rgba(255, 255, 255, .6);
  background: rgba(0, 0, 0, .3);
  border: 1px solid rgba(255, 255, 255, .15);
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all .25s ease;
  text-transform: uppercase;
}

.lang-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(217, 159, 84, .08);
}

.lang-btn.active {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(217, 159, 84, .15);
}

body.fullscreen .lang-selector {
  opacity: 0;
  pointer-events: none;
}

.meije-signature {
  position: fixed;
  left: var(--pad);
  bottom: calc(var(--pad) + env(safe-area-inset-bottom));
  z-index: 5;
  max-width: min(92vw, 820px);
  font-family: var(--serif-font);
  font-size: clamp(var(--sig-min), 6vw, var(--sig-max));
  line-height: 0.98;
  font-weight: 600;
  letter-spacing: .01em;
  color: rgba(255, 255, 255, .92);
  text-shadow: 0 10px 44px rgba(0, 0, 0, .55);
  pointer-events: none;
  opacity: 1;
  transform: translateY(0);
  transition: opacity .35s ease, transform .35s ease;
}

body.fullscreen .meije-signature {
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
}

.meije-signature span {
  display: block;
  margin-top: 8px;
  font-size: clamp(12px, 2.8vw, 18px);
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  opacity: .86;
  font-family: var(--ui-font);
  transition: opacity 400ms ease, transform 400ms ease;
}

.panel {
  position: fixed;
  right: var(--pad);
  bottom: calc(var(--pad) + env(safe-area-inset-bottom));
  z-index: 2;
  width: min(520px, calc(100vw - (var(--pad)*2)));
  padding: clamp(16px, 1.8vw, 24px);
  border-radius: 18px;
  background: var(--card);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow), 0 0 80px var(--accent-dim);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  text-align: right;
  transform: translateX(0);
  opacity: 1;
  transition: transform .4s cubic-bezier(0.4, 0, 0.2, 1), opacity .4s ease, box-shadow .3s ease;
}

.panel:hover { box-shadow: var(--shadow), 0 0 100px var(--accent-glow); }

body:not(.menu-visible) .panel {
  opacity: 0;
  transform: translateX(56px);
  pointer-events: none;
}

body.menu-visible .panel {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
  transition-delay: .08s;
}

.showcase-rail {
  --showcase-gap: clamp(12px, .82vw, 18px);
  --showcase-height: 70vh;
  --showcase-width: calc(var(--showcase-height) * 800 / 1809);
  position: fixed;
  top: 50%;
  left: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--showcase-gap);
  height: var(--showcase-height);
  width: max-content;
  z-index: 1;
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.showcase-panel {
  position: relative;
  margin: 0;
  flex: 0 0 auto;
  width: var(--showcase-width);
  height: 100%;
  aspect-ratio: 800 / 1809;
  border-radius: 18px;
  overflow: hidden;
  background: #000;
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow), 0 0 46px rgba(217, 159, 84, .08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  transform: translate3d(calc(100vw + 220px), 0, 0);
  will-change: transform, opacity;
  transition:
    transform .92s cubic-bezier(.19, 1, .22, 1),
    opacity .42s ease,
    box-shadow .3s ease,
    border-color .26s ease;
  pointer-events: auto;
  cursor: pointer;
}

.showcase-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(circle at 50% 28%, rgba(255,255,255,.05) 0%, rgba(255,255,255,0) 36%),
    linear-gradient(180deg, rgba(0,0,0,.18) 0%, rgba(0,0,0,.08) 14%, rgba(0,0,0,.22) 26%, rgba(0,0,0,.10) 40%, rgba(0,0,0,.10) 58%, rgba(0,0,0,.30) 74%, rgba(0,0,0,.54) 100%),
    radial-gradient(circle at 50% 50%, rgba(0,0,0,0) 38%, rgba(0,0,0,.12) 70%, rgba(0,0,0,.34) 100%);
  opacity: 1;
  transition: opacity .26s ease, background .26s ease;
  pointer-events: none;
  z-index: 1;
}

.showcase-panel:hover::before,
.showcase-panel:focus-visible::before {
  opacity: 0;
}

.showcase-panel:hover,
.showcase-panel:focus-visible {
  box-shadow: var(--shadow), 0 0 66px rgba(217, 159, 84, .18);
  border-color: rgba(217, 159, 84, .42);
  outline: none;
}

.showcase-media {
  --showcase-img-inset-x: clamp(8px, .75vw, 12px);
  --showcase-img-top: clamp(64px, 8.2vh, 88px);
  --showcase-img-bottom: clamp(102px, 12vh, 132px);
  --showcase-media-scale: 1;
  position: absolute;
  left: 50%;
  top: var(--showcase-img-top);
  width: calc(100% - (var(--showcase-img-inset-x) * 2));
  height: calc(100% - var(--showcase-img-top) - var(--showcase-img-bottom));
  transform: translateX(-50%);
  border-radius: 14px;
  overflow: hidden;
  background: #0b0b0b;
  border: 1px solid rgba(217, 159, 84, .24);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.03), 0 10px 28px rgba(0,0,0,.28);
  z-index: 0;
}

.showcase-media img,
.showcase-media video,
.showcase-media .showcase-media-video {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: inherit;
  filter: brightness(1) saturate(1);
  transition: filter .26s ease, transform .46s ease;
}

.showcase-media img {
  object-fit: cover;
  object-position: center center;
  transform: scale(var(--showcase-media-scale));
  transform-origin: center center;
}

.showcase-media video,
.showcase-media .showcase-media-video {
  object-fit: cover;
  object-position: center center;
}

.showcase-panel:hover .showcase-media img,
.showcase-panel:focus-visible .showcase-media img {
  filter: brightness(.5) saturate(.92);
  transform: scale(calc(var(--showcase-media-scale) * 1.012));
}

.showcase-panel:hover .showcase-media video,
.showcase-panel:hover .showcase-media .showcase-media-video,
.showcase-panel:focus-visible .showcase-media video,
.showcase-panel:focus-visible .showcase-media .showcase-media-video {
  filter: brightness(.5) saturate(.92);
  transform: scale(1.012);
}


.showcase-copy {
  position: absolute;
  left: 10%;
  top: 5%;
  width: 80%;
  height: 90%;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .26s ease;
}

.showcase-copy-inner {
  width: 100%;
  max-height: 100%;
  overflow: auto;
  color: rgba(255,255,255,.98);
  text-align: left;
  text-shadow: 0 2px 16px rgba(0,0,0,.55);
  scrollbar-width: none;
}

.showcase-copy-inner::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.showcase-copy-inner h3 {
  margin: 0 0 14px;
  font-size: clamp(19px, 1.28vw, 27px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: .02em;
}

.showcase-copy-inner p {
  margin: 0 0 18px;
  font-size: clamp(12px, .84vw, 15px);
  line-height: 1.55;
  font-weight: 700;
}

.showcase-copy-inner p:last-child {
  margin-bottom: 0;
}

.showcase-copy-inner a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.58);
  background: rgba(255,255,255,.10);
  color: rgba(255,255,255,.98);
  text-decoration: none;
  font-size: clamp(11px, .76vw, 14px);
  letter-spacing: .10em;
  text-transform: uppercase;
  font-weight: 900;
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
  pointer-events: auto;
}

.showcase-copy-inner a:hover,
.showcase-copy-inner a:focus-visible {
  background: rgba(255,255,255,.18);
  border-color: rgba(255,255,255,.82);
  transform: translateY(-1px);
  outline: none;
}

.showcase-panel:hover .showcase-copy,
.showcase-panel:focus-visible .showcase-copy {
  opacity: 1;
}

.showcase-panel:hover .showcase-top-label,
.showcase-panel:hover .showcase-tech-pills,
.showcase-panel:focus-visible .showcase-top-label,
.showcase-panel:focus-visible .showcase-tech-pills {
  opacity: 0;
  transition: opacity .2s ease;
}

.showcase-top-label {
  position: absolute;
  left: 50%;
  top: clamp(12px, 1.8vh, 20px);
  transform: translateX(-50%);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: min(90%, 296px);
  max-width: calc(100% - 20px);
  min-height: 46px;
  padding: 12px 20px 11px;
  border-radius: 999px;
  border: 1px solid rgba(217, 159, 84, .44);
  background: linear-gradient(180deg, rgba(217, 159, 84, .20) 0%, rgba(161, 108, 46, .24) 100%);
  box-shadow: 0 10px 34px rgba(0, 0, 0, .34), inset 0 1px 0 rgba(255,255,255,.10), 0 0 30px rgba(217, 159, 84, .16);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: rgba(255,255,255,.97);
  text-shadow: 0 2px 14px rgba(0,0,0,.34);
  font-size: clamp(11px, .82vw, 15px);
  letter-spacing: .12em;
  font-weight: 900;
  pointer-events: none;
}

.showcase-tech-pills {
  position: absolute;
  left: 50%;
  bottom: clamp(18px, 2.8vh, 30px);
  transform: translateX(-50%);
  z-index: 2;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: calc(100% - 18px);
  pointer-events: none;
}

.showcase-tech-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: min(88%, 198px);
  max-width: 100%;
  padding: 9px 17px 8px;
  border-radius: 999px;
  border: 1px solid rgba(217, 159, 84, .42);
  background: linear-gradient(180deg, rgba(217, 159, 84, .18) 0%, rgba(161, 108, 46, .22) 100%);
  box-shadow: 0 8px 30px rgba(0, 0, 0, .32), inset 0 1px 0 rgba(255,255,255,.10), 0 0 28px rgba(217, 159, 84, .16);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: rgba(255,255,255,.95);
  text-shadow: 0 2px 14px rgba(0,0,0,.34);
  font-size: clamp(8px, .645vw, 11px);
  letter-spacing: .18em;
  font-weight: 800;
}

.showcase-panel-1 { transition-delay: .12s; }
.showcase-panel-2 { transition-delay: .22s; }
.showcase-panel-3 { transition-delay: .32s; }
.showcase-panel-4 { transition-delay: .42s; }
.showcase-panel-5 { transition-delay: .52s; }

/* Per-panel image zoom tuning */
.showcase-panel-1 .showcase-media { --showcase-media-scale: 1.00; }
.showcase-panel-2 .showcase-media { --showcase-media-scale: 1.00; }
.showcase-panel-3 .showcase-media { --showcase-media-scale: 1.00; } /* video panel */
.showcase-panel-4 .showcase-media { --showcase-media-scale: 1.00; }
.showcase-panel-5 .showcase-media { --showcase-media-scale: 1.00; }

body.page-ready .showcase-panel {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

body.panels-hidden .showcase-panel {
  opacity: 0;
  transform: translate3d(calc(100vw + 160px), 0, 0);
  transition-duration: .52s, .24s, .3s;
}

body.panels-hidden .showcase-panel-1 { transition-delay: .00s; }
body.panels-hidden .showcase-panel-2 { transition-delay: .05s; }
body.panels-hidden .showcase-panel-3 { transition-delay: .10s; }
body.panels-hidden .showcase-panel-4 { transition-delay: .15s; }
body.panels-hidden .showcase-panel-5 { transition-delay: .20s; }

body.fullscreen .showcase-rail,
body.modal-open .showcase-rail,
body.menu-visible .showcase-rail {
  pointer-events: none;
}

@media (max-width: 1919px), (max-height: 820px) {
  .showcase-rail {
    display: none;
  }
}

body.fullscreen .panel,
body.panel-collapsed .panel {
  transform: translateX(calc(100% + var(--pad) + 20px));
  opacity: 0;
  pointer-events: none;
}

.fade { opacity: 0; animation: fadeIn .6s ease-out forwards; }
.delay-1 { animation-delay: .15s; }
.delay-2 { animation-delay: .3s; }
.delay-3 { animation-delay: .45s; }
.delay-4 { animation-delay: .6s; }
.delay-5 { animation-delay: .75s; }

@keyframes fadeIn { to { opacity: 1; } }

.kicker {
  margin: 0 0 8px 0;
  font-size: clamp(12px, 1.25vw, 14px);
  letter-spacing: .12em;
  text-transform: uppercase;
  opacity: .88;
  font-weight: 700;
  color: var(--accent);
}

h1 {
  margin: 0;
  font-size: clamp(20px, 2.3vw, 40px);
  line-height: 1.1;
  font-weight: 700;
  background: linear-gradient(135deg, var(--text) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.lede {
  margin: 10px 0 0 0;
  font-size: clamp(13px, 1.35vw, 16px);
  line-height: 1.55;
  color: var(--muted);
}

.brand-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-bottom: 10px;
}

.brand-row img {
  width: 210px;
  height: auto;
  display: block;
  filter: drop-shadow(0 10px 28px rgba(0, 0, 0, .55));
}

.roles {
  margin-top: 16px;
  width: 100%;
  margin-left: auto;
  text-align: right;
  opacity: 1;
  transform: none;
  animation: flyIn .6s ease-out .3s forwards;
}

.roles .line {
  font-size: clamp(14px, 1.55vw, 18px);
  line-height: 1.45;
  margin: 0;
  font-weight: 800;
  letter-spacing: .01em;
  color: rgba(255, 255, 255, .90);
}

.roles .line + .line { margin-top: 10px; }

@keyframes flyIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.role-clickable {
  cursor: pointer;
  transition: transform .18s ease, color .18s ease, text-shadow .18s ease;
  position: relative;
  padding-left: 22px;
  color: var(--accent);
  text-shadow: 0 0 20px rgba(217, 159, 84, .18);
}

.role-clickable::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent);
  opacity: .85;
  transform: translateX(-2px);
  transition: transform .18s ease, opacity .18s ease;
}

.role-clickable:hover {
  color: #fff;
  transform: translateX(6px);
  text-shadow: 0 0 26px rgba(217, 159, 84, .28);
}

.role-clickable:hover::before {
  opacity: 1;
  transform: translateX(0);
}

nav {
  margin-top: 16px;
  display: grid;
  gap: 10px;
  justify-items: end;
}

.navlink {
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid rgba(217, 159, 84, .25);
  background: rgba(0, 0, 0, .2);
  font-size: clamp(13px, 1.25vw, 16px);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  transition: all .25s ease;
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
}

.navlink::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent-dim), transparent);
  opacity: 0;
  transition: opacity .25s ease;
}

.navlink:hover {
  border-color: var(--accent);
  background: rgba(217, 159, 84, .08);
  transform: translateX(-3px);
  box-shadow: 0 0 20px var(--accent-glow);
}

.navlink:hover::before { opacity: 1; }

.navrow {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  width: 100%;
}

.spamwarn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(217, 159, 84, .35);
  background: rgba(0, 0, 0, .35);
  color: rgba(255, 255, 255, .92);
  font-weight: 900;
  letter-spacing: .10em;
  text-transform: uppercase;
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
  user-select: none;
  pointer-events: none;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .35), 0 0 18px rgba(217, 159, 84, .18);
}

@keyframes spamblink {
  0%, 100% { opacity: .35; transform: scale(1); }
  50%      { opacity: 1; transform: scale(1.08); }
}

.spamwarn.blink { animation: spamblink 1.05s ease-in-out infinite; }

.tipbtn {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid rgba(217, 159, 84, .35);
  color: var(--accent);
  background: rgba(0, 0, 0, .35);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .25);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, opacity .15s ease;
}

.tipbtn:hover {
  transform: scale(1.08);
  background: rgba(217, 159, 84, .10);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .35), 0 0 18px rgba(217, 159, 84, .18);
}

.tipbtn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(217, 159, 84, .18), 0 6px 18px rgba(0, 0, 0, .35);
}

@keyframes tipblink {
  0%, 100% { opacity: .35; transform: scale(1); }
  50%      { opacity: 1; transform: scale(1.12); }
}

.tipbtn.blink {
  animation: tipblink 1.0s ease-in-out infinite;
  box-shadow: 0 0 18px rgba(217, 159, 84, .22);
}

.tipbtn.blink:hover { animation: none; }

.tip {
  position: fixed;
  z-index: 9999;
  max-width: min(420px, calc(100vw - 40px));
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(217, 159, 84, .28);
  background: rgba(0, 0, 0, .82);
  color: rgba(255, 255, 255, .92);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .01em;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .45), 0 0 26px rgba(217, 159, 84, .18);
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity .15s ease, transform .15s ease;
}

.tip.show { opacity: 1; transform: translateY(0); }

.tip::after {
  content: '';
  position: absolute;
  width: 10px;
  height: 10px;
  background: rgba(0, 0, 0, .82);
  border-left: 1px solid rgba(217, 159, 84, .28);
  border-top: 1px solid rgba(217, 159, 84, .28);
  left: var(--arrow-x, 14px);
  top: var(--arrow-y, calc(100% - 6px));
  transform: rotate(var(--arrow-rot, 45deg));
}

.controls {
  position: fixed;
  right: var(--pad);
  bottom: calc(var(--pad) + env(safe-area-inset-bottom));
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 10px;
  opacity: 1;
  transform: translateX(0);
  transition: right .4s cubic-bezier(0.4, 0, 0.2, 1), transform .4s cubic-bezier(0.4, 0, 0.2, 1), opacity .4s ease;
}

body:not(.menu-visible) .controls {
  right: var(--pad);
}

body.menu-visible:not(.panel-collapsed) .controls {
  right: calc(var(--pad) + min(520px, calc(100vw - (var(--pad)*2))) + 16px);
}

body.panel-collapsed .controls {
  right: var(--pad) !important;
  transform: none !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

body.fullscreen .controls {
  transform: translateX(calc(100% + var(--pad))) !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

body.panel-collapsed #collapseBtn {
  position: static;
  right: auto;
  bottom: auto;
  transform: none !important;
}

body.fullscreen #fullscreenBtn {
  position: fixed;
  right: var(--pad);
  bottom: calc(var(--pad) + env(safe-area-inset-bottom));
  transform: translateX(0) !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

.ctrl-btn {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  border: 1px solid rgba(217, 159, 84, .3);
  background: rgba(0, 0, 0, .45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .25s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .3);
  pointer-events: auto;
}

.ctrl-btn:hover {
  background: rgba(217, 159, 84, .12);
  border-color: var(--accent);
  transform: scale(1.08);
  box-shadow: 0 6px 20px var(--accent-glow);
}

.ctrl-btn svg {
  width: 22px;
  height: 22px;
  stroke: var(--accent);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .25s ease;
}

.ctrl-btn:hover svg { transform: scale(1.1); }

@keyframes blink {
  0%, 100% { visibility: visible; }
  50%      { visibility: hidden; }
}

.topui {
  position: fixed;
  right: var(--pad);
  top: calc(var(--pad) + env(safe-area-inset-top));
  z-index: 7;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(217, 159, 84, .3);
  background: rgba(0, 0, 0, .4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .3);
  transition: all .3s ease;
}

body.fullscreen .topui { opacity: 0; pointer-events: none; }

.topui:hover {
  box-shadow: 0 6px 24px var(--accent-glow);
  border-color: var(--accent);
}

.hint {
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  animation: blink 1.1s steps(1, end) infinite;
  font-weight: 700;
  color: var(--accent);
  cursor: pointer;
  pointer-events: auto;
  user-select: none;
}

.vol {
  display: none;
  align-items: center;
  gap: 12px;
}

.topui.playing .vol { display: flex; }
.topui.playing .hint { display: none; }

.vol label {
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--accent);
}

.vol input[type="range"] {
  width: 140px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, .15);
  outline: none;
  -webkit-appearance: none;
}

.vol input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 0 10px var(--accent-glow);
  transition: transform .2s;
}

.vol input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.2); }

.vol input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: none;
  box-shadow: 0 0 10px var(--accent-glow);
}

.vol .pct {
  width: 32px;
  text-align: right;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
}

.mute-btn {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid rgba(217, 159, 84, .3);
  background: rgba(0, 0, 0, .3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .25s ease;
  flex-shrink: 0;
}

.mute-btn:hover {
  background: rgba(217, 159, 84, .12);
  border-color: var(--accent);
  transform: scale(1.1);
  box-shadow: 0 0 15px var(--accent-glow);
}

.mute-btn svg {
  width: 16px;
  height: 16px;
  stroke: var(--accent);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.soundwave {
  position: fixed;
  left: 50%;
  width: var(--spec-width);
  height: var(--spec-height);
  transform: translateX(-50%);
  z-index: 1;
  pointer-events: none;
  bottom: calc(
    var(--pad) + env(safe-area-inset-bottom) + var(--x-bottom) + var(--footer-gap) + var(--soundwave-gap)
    + var(--agentDockH, 0px)
  );
  display: none;
  align-items: center;
  justify-content: center;
}

.soundwave.active { display: flex; }

.soundwave .bars {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spec-gap);
  opacity: .85;
}

.soundwave .bar {
  width: var(--spec-bar-w);
  height: 100%;
  border-radius: 6px;
  transform: scaleY(.08);
  transform-origin: center;
  background: transparent;
  position: relative;
  will-change: transform;
}

.soundwave .bar::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 6px;
  background: linear-gradient(180deg,
      rgba(248, 248, 248, 0.60) 0%,
      rgba(217, 159, 84, 0.75) 45%,
      rgba(217, 159, 84, 0.85) 100%);
  box-shadow: 0 0 10px rgba(217, 159, 84, .18);
  filter: blur(0.35px);
  will-change: opacity;
}

.soundwave .bar.edge::before { opacity: .55; }
.soundwave .bar.mid::before  { opacity: .72; }
.soundwave .bar.core::before { opacity: .90; }

.modal-soundwave {
  position: fixed;
  left: calc(var(--pad) + min(560px, calc(100vw - (var(--pad) * 2))) + 50px);
  top: 50%;
  transform: translateY(-50%);
  z-index: 102;
  width: 18px;
  height: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity .4s ease, height .4s ease;
}

.modal-soundwave.active { opacity: .85; }

.modal-soundwave .bars {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
}

.modal-soundwave .bar {
  height: 2px;
  width: 100%;
  border-radius: 4px;
  transform: scaleX(.08);
  transform-origin: center;
  background: transparent;
  position: relative;
  will-change: transform;
}

.modal-soundwave .bar::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 6px;
  background: linear-gradient(90deg,
      rgba(248, 248, 248, 0.55) 0%,
      rgba(217, 159, 84, 0.80) 50%,
      rgba(217, 159, 84, 0.90) 100%);
  box-shadow: 0 0 10px rgba(217, 159, 84, .18);
  filter: blur(0.35px);
}

.modal-soundwave .bar.edge::before { opacity: .55; }
.modal-soundwave .bar.mid::before  { opacity: .72; }
.modal-soundwave .bar.core::before { opacity: .90; }

.copyright {
  position: fixed;
  left: 50%;
  bottom: calc(
    var(--pad) + env(safe-area-inset-bottom) + var(--x-bottom) + var(--footer-gap)
    + var(--agentDockH, 0px) - 44px
  );
  transform: translateX(-50%);
  z-index: 1;
  font-size: clamp(10px, 1.1vw, 12px);
  color: #c0c0c0;
  text-align: center;
  opacity: .78;
  pointer-events: none;
  font-weight: 400;
  letter-spacing: .02em;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .4);
}

/* -------------------------
   Agent dock + modal (desktop only)
------------------------- */
:root { --agentDockH: 46px; }

/* lift copyright so it doesn’t overlap the dock */
body:not(.panel-collapsed) .copyright {
  bottom: calc(
    var(--pad) + env(safe-area-inset-bottom) + var(--x-bottom) + var(--footer-gap)
    + var(--agentDockH) - 44px
  );
}

.agent-dock {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(320px, 92vw);
  max-width: 360px;
  z-index: 15;
  display: flex;
  justify-content: center;
  pointer-events: auto;
}

.agent-dock-btn {
  width: 100%;
  height: var(--agentDockH);
  border: 1px solid rgba(217,159,84,.55);
  border-bottom: none;
  border-radius: 18px 18px 0 0;
  background: linear-gradient(180deg, rgba(217,159,84,.98), rgba(204,136,48,.98));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: rgba(10,10,10,.92);
  font: inherit;
  letter-spacing: .02em;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

.agent-dock-btn:hover {
  background: linear-gradient(180deg, rgba(232,176,92,.98), rgba(212,144,56,.98));
  border-color: rgba(255,255,255,.22);
}

.agent-dock-btn:active { transform: translateY(1px); }

.agent-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.62);
  z-index: 60;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.agent-modal-overlay.active { display: flex; }

.agent-modal {
  width: min(980px, 92vw);
  height: min(62vh, 640px);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 20px;
  overflow: hidden;
  background: rgba(0,0,0,.58);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 18px 60px rgba(0,0,0,.55);
}

.agent-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.agent-modal-title {
  font-weight: 700;
  font-size: 14px;
  opacity: .92;
  letter-spacing: .02em;
}

.agent-modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.40);
  cursor: pointer;
}

.agent-modal-close svg {
  width: 18px;
  height: 18px;
  stroke: rgba(255,255,255,.85);
  stroke-width: 2;
  fill: none;
}

.agent-modal-body { height: calc(100% - 58px); }

.agent-iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
}

/* no dock/modal on mobile */
@media (max-width: 768px), (pointer:coarse) {
  .agent-dock { display: none !important; }
  .agent-modal-overlay { display: none !important; }
  body:not(.panel-collapsed) .copyright {
    bottom: calc(var(--pad) + env(safe-area-inset-bottom) + var(--x-bottom) + var(--footer-gap));
  }
}

.ripple {
  position: absolute;
  border-radius: 999px;
  transform: scale(0);
  opacity: .55;
  background: rgba(217, 159, 84, .35);
  animation: ripple .65s ease-out forwards;
  pointer-events: none;
}

@keyframes ripple {
  to {
    transform: scale(1);
    opacity: 0;
  }
}

/* --- client rotator ABOVE copyright --- */
.client-rotator {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(
    var(--pad) + env(safe-area-inset-bottom) + var(--x-bottom) + var(--footer-gap)
    + var(--agentDockH, 0px) - 26px
  );
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 14px;
  opacity: .78;
  pointer-events: auto;
  transition: opacity .25s ease;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .4);
}

.client-rotator-label {
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 900;
  color: rgba(255, 255, 255, .7);
  white-space: nowrap;
  line-height: 1;
  display: flex;
  align-items: center;
  height: 39px;
}

.client-rotator-logo {
  height: 39px;
  width: auto;
  display: block;
  opacity: .88;
  filter: grayscale(100%) contrast(1.05);
  transform: translateY(0);
  transition: opacity .35s ease, filter .35s ease, transform .35s ease;
  will-change: opacity, transform;
}

.client-rotator:hover .client-rotator-logo {
  opacity: 1;
  filter: grayscale(0%) contrast(1.05);
  transform: translateY(-1px);
}

.client-rotator-logo.is-fading {
  opacity: 0 !important;
  transform: translateY(1px) !important;
}

.role-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, .75);
  opacity: 0;
  pointer-events: none;
  transition: opacity .4s ease;
}

body.modal-open .role-modal-overlay { background: rgba(0,0,0,.35); }

body.modal-open .bg-overlay {
  opacity: 1;
  background: linear-gradient(180deg, rgba(0,0,0,.05), rgba(0,0,0,.28));
}

.role-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.role-modal {
  position: fixed;
  left: var(--pad);
  top: 50%;
  transform: translateY(-50%) translateX(-120%);
  z-index: 101;
  width: min(560px, calc(100vw - (var(--pad) * 2)));
  max-height: 75vh;
  background: rgba(0, 0, 0, .42);
  border: 1px solid var(--stroke);
  border-radius: 20px;
  box-shadow: var(--shadow), 0 0 100px var(--accent-glow);
  overflow: hidden;
  transition: transform .5s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  flex-direction: column;
}

.role-modal::before {
  content: "";
  position: absolute;
  inset: -30px;
  z-index: 0;
  background:
    radial-gradient(1200px 600px at 20% 10%, rgba(217, 159, 84, .14), transparent 55%),
    radial-gradient(900px 500px at 80% 30%, rgba(255, 255, 255, .08), transparent 55%),
    rgba(0, 0, 0, .58);
  filter: blur(14px);
  transform: scale(1.08);
}

.role-modal>* { position: relative; z-index: 1; }

.role-modal-overlay.active .role-modal { transform: translateY(-50%) translateX(0); }

.role-modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid rgba(217, 159, 84, .15);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.role-modal-title {
  margin: 0;
  font-size: clamp(18px, 2.2vw, 26px);
  font-weight: 700;
  background: linear-gradient(135deg, var(--text) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.role-modal-close {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(217, 159, 84, .3);
  background: rgba(0, 0, 0, .3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .25s ease;
  flex-shrink: 0;
}

.role-modal-close:hover {
  background: rgba(217, 159, 84, .12);
  border-color: var(--accent);
  transform: rotate(90deg) scale(1.1);
  box-shadow: 0 0 20px var(--accent-glow);
}

.role-modal-close svg {
  width: 18px;
  height: 18px;
  stroke: var(--accent);
  stroke-width: 2.5;
  stroke-linecap: round;
}

.role-modal-content {
  padding: 22px 24px;
  overflow-y: auto;
  flex: 1;
  scrollbar-width: thin;
  scrollbar-color: var(--accent) rgba(255, 255, 255, .08);
}

/* -------------------------
   Link/Document modal (external links + previews)
------------------------- */
#ngmLinkModal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.72);
  backdrop-filter: blur(6px);
}

#ngmLinkModal.active { display: flex; }

#ngmLinkModal .ngm-link-modal {
  width: min(1100px, calc(100vw - 28px));
  height: min(82vh, 780px);
  background: rgba(0,0,0,.55);
  border: 1px solid rgba(217,159,84,.24);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.55);
}

#ngmLinkModal .ngm-link-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(217,159,84,.16);
  background: linear-gradient(180deg, rgba(20,20,20,.78), rgba(0,0,0,.28));
}

#ngmLinkModal .ngm-link-title {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .02em;
  color: rgba(255,255,255,.92);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#ngmLinkModal .ngm-link-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

#ngmLinkModal .ngm-link-btn {
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(217,159,84,.22);
  background: rgba(217,159,84,.10);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}

#ngmLinkModal .ngm-link-btn:hover {
  background: rgba(217,159,84,.22);
  border-color: rgba(217,159,84,.42);
  transform: translateY(-1px);
}

#ngmLinkModal .ngm-link-body {
  height: calc(100% - 50px);
  overflow: auto;
  padding: 0;
}

#ngmLinkModal .ngm-link-body::-webkit-scrollbar { width: 8px; }
#ngmLinkModal .ngm-link-body::-webkit-scrollbar-track { background: rgba(217,159,84,.08); }
#ngmLinkModal .ngm-link-body::-webkit-scrollbar-thumb { background: rgba(217,159,84,.35); border-radius: 999px; }
#ngmLinkModal .ngm-link-body { scrollbar-color: rgba(217,159,84,.35) rgba(217,159,84,.08); scrollbar-width: thin; }

#ngmLinkModal iframe.ngm-link-iframe { width: 100%; height: 100%; border: 0; background: #0a0a0a; }

#ngmLinkModal img, .role-modal-content img, .role-modal-image {
  max-width: 100%; height: auto; display: block;
}

#ngmLinkModal .ngm-img-wrap { padding: 14px; }
#ngmLinkModal .ngm-img-wrap img { border-radius: 12px; border: 1px solid rgba(217,159,84,.18); }

.role-modal-content::-webkit-scrollbar { width: 8px; }
.role-modal-content::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, .05);
  border-radius: 10px;
  margin: 8px 0;
}
.role-modal-content::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--accent), rgba(217, 159, 84, .6));
  border-radius: 10px;
}
.role-modal-content::-webkit-scrollbar-thumb:hover { background: var(--accent); }

.role-modal-content h3 {
  margin: 0 0 10px 0;
  font-size: clamp(15px, 1.7vw, 18px);
  font-weight: 800;
  color: var(--accent);
  letter-spacing: .02em;
}

.role-modal-content p {
  margin: 0 0 12px 0;
  font-size: clamp(13px, 1.35vw, 15px);
  line-height: 1.65;
  color: var(--muted);
}

.role-modal-content ul { margin: 0; padding-left: 18px; color: var(--muted); }
.role-modal-content li { margin: 0 0 8px 0; line-height: 1.5; }

.role-modal-content a { color: #d0d0d0; text-decoration: none; }
.role-modal-content a:hover { text-decoration: underline; color: #fff; }

.role-modal-image {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 12px 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .10);
  box-shadow: 0 10px 26px rgba(0, 0, 0, .35);
  object-fit: contain;
}

.team-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
  margin-top: 8px;
}

.team-card {
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(0, 0, 0, .25);
  border-radius: 16px;
  padding: 14px 14px;
}

.team-top {
  display: flex;
  align-items: center;
  gap: 14px;
}

.team-avatar {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(217, 159, 84, .25);
  background: linear-gradient(180deg, rgba(217, 159, 84, .18), rgba(255, 255, 255, .06));
  box-shadow: 0 10px 22px rgba(0, 0, 0, .35);
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  letter-spacing: .06em;
  color: rgba(255, 255, 255, .88);
}

.team-name { font-weight: 900; color: #fff; line-height: 1.15; font-size: 14px; }

.team-role {
  color: rgba(255, 255, 255, .74);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .02em;
  margin-top: 3px;
}

.team-meta {
  color: rgba(255, 255, 255, .72);
  font-size: 13px;
  line-height: 1.6;
  margin: 0;
}

.team-pillrow { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; }

.team-pill {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(217, 159, 84, .22);
  background: rgba(217, 159, 84, .08);
  color: rgba(255, 255, 255, .88);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.team-photo {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  object-fit: contain;
  flex-shrink: 0;
  border: 1px solid rgba(217, 159, 84, .30);
  background: linear-gradient(180deg, rgba(217, 159, 84, .12), rgba(255, 255, 255, .04));
  box-shadow:
    0 10px 22px rgba(0, 0, 0, .45),
    0 0 20px rgba(217, 159, 84, .18);
  transition:
    transform .28s ease,
    box-shadow .28s ease,
    border-color .28s ease,
    filter .28s ease;
  filter: saturate(1.02) contrast(1.03);
}

.team-card:hover .team-photo {
  transform: translateY(-2px) scale(1.06);
  border-color: rgba(217, 159, 84, .55);
  box-shadow:
    0 14px 30px rgba(0, 0, 0, .55),
    0 0 32px rgba(217, 159, 84, .28);
}

#applyOverlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100000;
  pointer-events: none;
}
#applyOverlay.show { display: flex; }

#applyOverlay .applyOverlayInner {
  padding: 18px 18px;
  border-radius: 16px;
  border: 1px solid rgba(217, 159, 84, .35);
  background: rgba(0, 0, 0, .78);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .55), 0 0 36px rgba(217, 159, 84, .18);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: clamp(14px, 2.0vw, 18px);
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  text-shadow: 0 0 26px rgba(217, 159, 84, .25);
}

@keyframes recvblink {
  0%, 100% { opacity: .35; transform: scale(1); }
  50%      { opacity: 1; transform: scale(1.08); }
}

#applyOverlay.blink .applyOverlayInner { animation: recvblink 1.05s ease-in-out infinite; }

.applyFormHidden { display: none !important; }

@media (max-width:768px) {
  .topui, .controls { display: none !important; }
  .meije-signature { display: none !important; }

  .panel {
    position: fixed;
    top: calc(var(--pad) + env(safe-area-inset-top) + 80px);
    bottom: auto;
    left: var(--pad);
    right: var(--pad);
    width: auto;
    text-align: left;
    border-radius: 18px;
    padding: 14px 14px 16px;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  nav { justify-items: start; }
  .navrow { justify-content: flex-start; }
  .navlink { justify-content: flex-start; }
  .roles { text-align: left; }

  .client-rotator { display: none !important; }
  .soundwave { display: none !important; }
  .modal-soundwave { display: none !important; }
}

/* =========================================================
   BRIEF / TRAJECTORY INTAKE — NGM styling
========================================================= */

.brief-panel, .panel-inner { color: rgba(255,255,255,.88); }

.brief-panel h2 { margin: 0 0 8px 0; letter-spacing: .2px; }

.brief-panel p {
  margin: 0 0 16px 0;
  color: rgba(255,255,255,.72);
  line-height: 1.45;
}

.brief-panel .grid, .panel-inner .grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 820px) {
  .brief-panel .grid,
  .panel-inner .grid { grid-template-columns: 1fr; }
}

.brief-panel label, .panel-inner label {
  display: block;
  margin: 10px 0 6px;
  font-size: 13px;
  color: rgba(255,255,255,.70);
}

.brief-panel input,
.brief-panel select,
.brief-panel textarea,
.panel-inner input,
.panel-inner select,
.panel-inner textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.35);
  color: rgba(255,255,255,.92);
  outline: none;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.brief-panel textarea { resize: vertical; min-height: 110px; }

.brief-panel input:focus,
.brief-panel select:focus,
.brief-panel textarea:focus,
.panel-inner input:focus,
.panel-inner select:focus,
.panel-inner textarea:focus {
  border-color: rgba(255,255,255,.26);
  background: rgba(0,0,0,.44);
}

.bf-stepper {
  user-select: none;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(0,0,0,.25);
}

.bf-step {
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(0,0,0,.18);
  color: rgba(255,255,255,.62);
}

.bf-step.bf-step-active {
  color: rgba(255,255,255,.92);
  border-color: rgba(255,255,255,.22);
  background: rgba(255,255,255,.06);
}

.brief-panel button, .panel-inner button {
  appearance: none;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.30);
  color: rgba(255,255,255,.88);
  padding: 10px 14px;
  border-radius: 12px;
  cursor: pointer;
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
}

.brief-panel button:hover, .panel-inner button:hover {
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.22);
}

.brief-panel button:active, .panel-inner button:active { transform: translateY(1px); }

.brief-panel .primary-btn, .panel-inner .primary-btn {
  border-color: rgba(255,255,255,.24);
  background: rgba(255,255,255,.08);
}

.brief-panel .primary-btn:hover, .panel-inner .primary-btn:hover { background: rgba(255,255,255,.12); }

#briefStatus { font-size: 13px; color: rgba(255,255,255,.72); }
#briefEstimate { background: rgba(0,0,0,.22); }

#bfAudio { height: 36px; border-radius: 10px; overflow: hidden; }
#bfReview b { color: rgba(255,255,255,.92); }

/* Mobile: push copyright BELOW the panel (not fixed overlay) */
@media (max-width:768px) {
  body { overflow: auto !important; }

  .panel {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    width: auto !important;
    margin: calc(var(--pad) + env(safe-area-inset-top) + 70px) var(--pad) 0 !important;
  }

  footer.copyright, .copyright {
    position: relative !important;
    left: auto !important;
    bottom: auto !important;
    transform: none !important;
    margin: 14px var(--pad) calc(var(--pad) + env(safe-area-inset-bottom)) !important;
    padding-bottom: env(safe-area-inset-bottom);
    pointer-events: none;
  }

  /* Hard kill all blinking */
  .blink,
  .blink * {
    animation: none !important;
  }
}