:root { color-scheme: dark; font-family: system-ui, sans-serif; background: #261d29; color: #e5faff; }
body { margin: 0; }
.arrival { position: relative; isolation: isolate; display: grid; min-height: 100svh; align-items: end; justify-items: end; }
.james-house { position: absolute; inset: 0; z-index: -1; }
.james-hologram-stage { position: relative; width: 100%; height: 100%; background: radial-gradient(ellipse at 38% 33%, #543e36, #241c2c 72%); }
.james-house img, .james-house canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.james-house img { object-fit: contain; }
.james-house [hidden] { display: none; }
.james-house canvas { touch-action: none; cursor: grab; }
.james-house canvas[data-dragging] { cursor: grabbing; }
.james-house canvas:focus-visible { outline: 2px solid #a8f1ff; outline-offset: -2px; }
.guide { width: min(22rem, calc(100% - 4rem)); margin: clamp(1rem, 4vw, 4rem); padding: 1rem 1.25rem; border: 1px solid #a8f1ff70; border-radius: .85rem; background: #12252dd9; backdrop-filter: blur(10px); box-shadow: inset 1px 1px 9px #a8f1ff30; }
.guide h1 { margin: 0; font-size: clamp(1.4rem, 3vw, 2rem); }
.guide p { line-height: 1.5; }
.guide summary { cursor: pointer; }
.guide a { display: inline-block; margin-top: 1rem; padding: .55rem .8rem; border-radius: .45rem; background: #a8f1ff; color: #12252d; font-weight: 650; }
@media (max-width: 44rem) {
  .arrival { grid-template-rows: minmax(22rem, 65svh) auto; }
  .james-house { position: relative; width: 100%; height: 100%; }
  .guide { justify-self: center; margin: 0 1rem 1rem; }
}
.james-hologram-stage[data-distorcao]::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, transparent 0 5px, #9af6ff16 5px 6px),
              linear-gradient(115deg, #7cf4ff2b, transparent 28% 76%, #a698ff27);
  mask-image: radial-gradient(ellipse, transparent 42%, black 100%);
}
.james-hologram-stage[data-distorcao]:has(canvas[hidden])::after { display: none; }
#invite-start { margin-top: 1rem; }
#invite-start summary, #invite-start button { display: inline-block; padding: .55rem .8rem; border: 0; border-radius: .45rem; background: #a8f1ff; color: #12252d; font: inherit; font-weight: 650; cursor: pointer; }
#invite-start form { display: grid; gap: .5rem; margin-top: .8rem; }
#invite-start input { min-width: 0; border: 1px solid #a8f1ff70; border-radius: .45rem; padding: .55rem .7rem; font: inherit; background: #142630; color: inherit; }
#invite-start button { justify-self: start; }
.arrival > .guide { box-sizing: border-box; margin: 0; isolation: isolate; }
.arrival > .guide > * { position: relative; z-index: 1; }
.fala-james { text-align: center; }
.fala-james p { margin-bottom: 0; }
@media (min-width: 55rem) {
  .arrival > .guide { position: absolute; }
  .fala-james { bottom: clamp(1rem, 4vh, 3rem); left: 50%; transform: translateX(-50%); width: min(32rem, 38vw); }
  .menu-james { right: clamp(1rem, 4vw, 4rem); top: 50%; transform: translateY(-50%); width: clamp(13rem, 22vw, 20rem); }
}
@media (max-width: 54.999rem) {
  .arrival { grid-template: minmax(18rem, 60svh) auto auto / minmax(0, 1fr); gap: .65rem; align-items: start; padding: .6rem; box-sizing: border-box; }
  .arrival .james-house { position: relative; width: 100%; height: 100%; }
  .arrival > .guide { position: relative; width: min(100%, 26rem); padding: .75rem; }
  .fala-james { justify-self: center; }
  .menu-james { justify-self: end; }
}
.james-audio { display: flex; flex-wrap: wrap; gap: .4rem; margin: .65rem 0; }
.james-audio button { border: 1px solid #a8f1ff70; border-radius: .4rem; color: inherit; background: #142630; padding: .4rem .6rem; font: inherit; cursor: pointer; }
.james-audio button[aria-pressed="true"] { border-color: #a8f1ff; }
#james-voice-hint { font-size: .8rem; margin: 0 0 .65rem; }

.arrival > .guide {
  color-scheme: light;
  color: #142d38;
  background: linear-gradient(140deg, #ffffffa6, #f4fbff68 65%, #ffffff80);
  border-color: #ffffffa8;
  backdrop-filter: blur(14px) saturate(135%) brightness(1.28);
  box-shadow: 0 8px 28px #101b2a28, inset 0 1px 0 #ffffffdb, inset 0 -1px 0 #d3effb80;
}
#invite-start summary, #invite-start button {
  background: #234653;
  color: #fff;
}
.james-audio button, #invite-start input {
  background: #ffffff9e;
  color: #142d38;
  border-color: #3658676b;
}
.james-audio button[aria-pressed="true"] { border-color: #365867; }
.arrival > .guide :focus-visible { outline: 2px solid #214b5e; outline-offset: 2px; }

.arrival > .guide {
  background:
    radial-gradient(ellipse at 0 0, #72f4ff9c, transparent 29%),
    radial-gradient(ellipse at 100% 100%, #c59bff78, transparent 30%),
    linear-gradient(140deg, #ffffffa6, #f4fbff68 65%, #ffffff80);
  border-color: #a8f6ffe0;
  box-shadow: 0 8px 28px #101b2a28, 0 0 16px #6be7ff44,
              inset 0 1px 0 #efffff, inset 0 -1px 0 #bd9affb3;
}
.arrival > .guide::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, transparent 0 5px, #e7ffff42 5px 6px);
  mask-image: linear-gradient(115deg, #000 0%, transparent 38% 70%, #000 100%);
}
.arrival > .guide {
  border-radius: 1.35rem;
  background:
    radial-gradient(ellipse at 3% 0%, #b8f4ff69, transparent 34%),
    radial-gradient(ellipse at 98% 100%, #cbbaff4b, transparent 38%),
    linear-gradient(145deg, #ffffff99, #f1faff55 56%, #ffffff78);
  border: 1px solid #f8ffffb3;
  backdrop-filter: blur(18px) saturate(150%) brightness(1.23);
  box-shadow: inset 0 1px 1px #ffffffed, inset 0 -1px 1px #c4adff90,
              0 10px 30px #0b17283b, 0 0 12px #8ae8ff33;
}
.arrival > .guide::after {
  background: linear-gradient(120deg, #fff7 0%, transparent 31% 72%, #bdefff44 100%);
  mask-image: none;
}
@media (prefers-reduced-transparency: reduce) {
  .arrival > .guide { background: #f1f8fb; backdrop-filter: none; }
}
:root, .james-hologram-stage { background: #000; }
.arrival > .guide, .guide a, .james-audio button, #invite-start input {
  color: #000;
}
#invite-start summary, #invite-start button {
  color: #000;
  background: #d4f6ff;
}
#invite-start input::placeholder { color: #363636; }

/* Clear material with a rounded optical rim and a quiet center for the copy. */
.arrival > .guide {
  border-radius: 1.8rem;
  border-color: #f4fdffb8;
  background: linear-gradient(150deg, #eaf7ff8f, #c8e4f562 58%, #e5f5ff91);
  backdrop-filter: blur(10px) saturate(155%) brightness(1.45);
  box-shadow: inset 0 1px 2px #fffffff5, inset 1px 0 2px #ffffffb8,
              inset 0 -1px 3px #bce9ffa0, 0 2px 5px #0003, 0 10px 24px #0003;
}
.arrival > .guide::after {
  background: linear-gradient(155deg, #ffffffa6, #d3f1ff00 34% 72%, #dbf6ff64);
  padding: 4px;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
}
.arrival > .guide #invite-start button {
  border-radius: 999px;
  background: #f5fcff8c;
  color: #000;
  box-shadow: inset 0 1px 1px #ffffffcd;
}
@media (prefers-reduced-transparency: reduce) {
  .arrival > .guide { background: #f1f8fb; backdrop-filter: none; }
  .arrival > .guide::after { display: none; }
}
.arrival > .guide {
  border-radius: .9rem;
  border-color: #d7e5eb9c;
  background: linear-gradient(150deg, #dcecf061, #a3bec947);
  backdrop-filter: blur(5px) saturate(115%);
  box-shadow: inset 0 1px 1px #ffffffa6, inset 0 -1px 1px #9bbbc470, 0 5px 18px #0004;
}
.arrival > .guide::after {
  background: linear-gradient(145deg, #ffffff70, transparent 32% 75%, #c1dbe066);
  padding: 2px;
}
.audio-james {
  position: absolute;
  z-index: 2;
  top: clamp(.55rem, calc(var(--pe-y, 45%) + .75rem), calc(var(--altura-cena, 55svh) - 3.25rem));
  left: clamp(6rem, var(--pe-x, 50%), calc(100% - 6rem));
  transform: translateX(-50%);
}
.audio-james .james-audio {
  width: max-content;
  max-width: calc(100vw - 2rem);
  gap: .15rem;
  margin: 0;
  padding: .24rem;
  border: 1px solid #c8d5d991;
  border-radius: 1.65rem;
  background: linear-gradient(155deg, #657c844a, #15232f60 62%, #34474f42);
  backdrop-filter: blur(4px) saturate(135%);
  box-shadow: inset 0 1px 1px #fff8, inset 0 -1px 2px #adc7cf73, 0 4px 16px #0005;
}
.audio-james .james-audio button {
  color: #fff; background: transparent; border-color: transparent;
  border-radius: 1.25rem; padding: .42rem .55rem; font-size: .78rem;
}
.audio-james .james-audio button[aria-pressed="true"] { background: #07111a5c; }
.audio-james #james-voice-hint {
  position: absolute; overflow: hidden; width: 1px; height: 1px; clip-path: inset(50%); white-space: nowrap;
}
@media (min-width: 55rem) {
  .arrival > .fala-james {
    bottom: auto;
    top: clamp(1rem, calc(var(--cabeca-y, 40%) - 2.2rem), 72%);
    left: clamp(1rem, calc(var(--cabeca-x, 50%) - min(23rem, 27vw) - 2rem), calc(100% - min(23rem, 27vw) - 1rem));
    width: min(23rem, 27vw);
    transform: skewY(var(--inclinacao-balao, 0deg));
    transform-origin: right center;
    text-align: left;
  }
}
@media (prefers-reduced-transparency: reduce) {
  .arrival > .guide { background: #edf5f8; backdrop-filter: none; }
  .audio-james .james-audio { background: #354851; backdrop-filter: none; }
}
.audio-james {
  transform: translateX(-50%) skewY(var(--inclinacao-balao, 0deg));
  transform-origin: center top;
}
.audio-james .james-audio { gap: .35rem; }
.audio-james .james-audio button {
  display: grid; place-items: center; width: 2.75rem; height: 2.75rem; padding: 0;
  border-color: #e7f4f751; background: #1b2e3a55;
}
.audio-james button svg {
  width: 1.4rem; height: 1.4rem; fill: none; stroke: currentColor;
  stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round;
}
#james-mute[aria-pressed="true"] .audio-on,
#james-mute[aria-pressed="false"] .audio-off { display: none; }
.audio-james button:focus-visible { outline: 2px solid #e3fcff; outline-offset: 2px; }
.arrival > .fala-james {
  position: absolute;
  z-index: 1;
  top: auto;
  bottom: max(.85rem, env(safe-area-inset-bottom));
  left: 50%;
  width: min(33rem, calc(100% - 2rem));
  padding: .55rem .9rem;
  transform: translateX(-50%);
  text-align: center;
}
.fala-james h2 { margin: 0; font-size: 1rem; line-height: 1.2; }
.fala-james p { margin: .2rem 0 0; font-size: .9rem; line-height: 1.3; }
.fala-james::before {
  content: ""; position: absolute; top: -.33rem; left: calc(50% - .33rem); width: .66rem; height: .66rem;
  transform: rotate(45deg); border-top: 1px solid #d7e5eb9c; border-left: 1px solid #d7e5eb9c;
  background: #bccfd88a; pointer-events: none;
}
@media (max-width: 54.999rem) {
  .arrival { grid-template-rows: minmax(18rem, 60svh) auto; padding-bottom: 6.5rem; }
}
.audio-james {
  top: auto;
  bottom: max(1rem, env(safe-area-inset-bottom));
  left: max(1rem, env(safe-area-inset-left));
  transform: none;
}
.audio-james .james-audio {
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  backdrop-filter: none;
}
.audio-james .james-audio button {
  border: 1px solid #d8f2ff66;
  background: #2537447d;
  backdrop-filter: blur(4px);
  box-shadow: inset 0 1px 1px #ffffff40;
}
@media (max-width: 54.999rem) {
  .audio-james { bottom: max(5.5rem, calc(env(safe-area-inset-bottom) + 4.5rem)); }
}
@media (min-width: 55rem) {
  .arrival > .fala-james { width: min(33rem, calc(100% - 15rem)); }
}
.arrival > .menu-james {
  z-index: 2;
  inset: auto auto max(.85rem, env(safe-area-inset-bottom)) max(.85rem, env(safe-area-inset-left));
  width: max-content;
  max-width: min(19rem, calc(100vw - 2rem));
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: .45rem .65rem;
  transform: none;
  padding: .55rem .65rem;
}
.menu-james #invite-start { grid-row: 1; grid-column: 1; margin: 0; }
.menu-james:has(#invite-start[open]) #invite-start { grid-column: 1 / -1; }
.menu-james:has(#invite-start[open]) > .audio-james { grid-row: 1; grid-column: 2; align-self: end; }
.menu-james #invite-start[open] > .james-identidade { width: min(100%, 9.5rem); min-height: 2.1rem; }
.menu-james > .audio-james {
  grid-row: 1;
  grid-column: 2;
  position: relative;
  inset: auto;
  transform: none;
}
.menu-james .james-audio button { width: 2.45rem; height: 2.45rem; }
@media (max-width: 54.999rem) {
  .arrival > .menu-james { inset: auto; position: relative; justify-self: start; }
}
@media (min-width: 55rem) {
  .arrival > .fala-james { width: min(33rem, calc(100% - 40rem)); }
}
.menu-james .james-audio button {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  backdrop-filter: none;
  color: #172631;
}
.menu-james .james-audio button:hover,
.menu-james .james-audio button[aria-pressed="true"] { background: #e7f6ff55; }
.menu-james .james-audio button svg { width: 1.2rem; height: 1.2rem; stroke-width: 2; }

.arrival > .guide {
  color-scheme: dark;
  color: #fff;
  background: linear-gradient(150deg, #253c4fa8, #122331bf);
}
.fala-james h1 { font-size: clamp(1.15rem, 2vw, 1.45rem); }
.fala-james p { margin-top: .3rem; font-size: clamp(1rem, 1.5vw, 1.18rem); line-height: 1.4; }
#invite-start summary, #invite-start button, #invite-start input {
  color: #fff;
  background: #152d40c4;
  font-size: 1.05rem;
}
#invite-start input::placeholder { color: #dfebf4; }
.menu-james .james-audio button { color: #fff; }
@media (prefers-reduced-transparency: reduce) {
  .arrival > .guide { background: #193040; }
}

@font-face {
  font-family: Inter;
  src: url("/inter-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}
.arrival { font-family: Inter, system-ui, sans-serif; }
.arrival > .guide { border-radius: .55rem; }
.fala-james h1 { font-weight: 750; letter-spacing: -.025em; }
.fala-james p { font-weight: 500; }
#invite-start summary, #invite-start button, #invite-start input { border-radius: .4rem; font-family: inherit; }

.menu-james > .audio-james { display: flex; align-items: center; gap: .12rem; }
.audio-james-opcoes > summary {
  display: grid; place-items: center; width: 1.7rem; height: 2.45rem;
  cursor: pointer; border-radius: .4rem; list-style: none;
}
.audio-james-opcoes > summary::-webkit-details-marker { display: none; }
.audio-james-opcoes > summary:hover, .audio-james-opcoes[open] > summary { background: #dff5ff24; }
.audio-james-opcoes svg { width: .9rem; height: .9rem; fill: none; stroke: currentColor; stroke-width: 2; }
.audio-james-painel {
  position: absolute; bottom: calc(100% + .65rem); right: 0; display: grid; gap: .65rem;
  width: max-content; max-width: 75vw; padding: .75rem .9rem;
  border-radius: .6rem; border: 1px solid #b8eff278;
  background: #142737eb; box-shadow: 0 5px 18px #0006;
}
.audio-james-painel input { width: min(13rem, 65vw); accent-color: #a8f1ff; }

.arrival > .menu-james { max-width: min(23rem, calc(100vw - 1.7rem)); }
#invite-start > .james-identidade {
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .25rem;
  background: transparent;
  box-shadow: none;
  list-style: none;
}
.james-identidade::-webkit-details-marker { display: none; }
.james-identidade strong, .james-identidade small { display: block; white-space: nowrap; }
.james-identidade strong { font-size: .86rem; }
.james-identidade small { color: #d8eaf8; font-size: .7rem; font-weight: 500; }
.james-identidade-marca {
  display: grid; place-items: center; flex: 0 0 1.95rem; height: 1.95rem;
  border-radius: .55rem; background: #b8edf51f; border: 1px solid #b8edf57a;
  font: 700 .98rem/1 Inter, system-ui, sans-serif;
}
@media (min-width: 55rem) and (max-width: 68rem) {
  .arrival > .fala-james { bottom: max(5.25rem, calc(env(safe-area-inset-bottom) + 4rem)); }
}

/* Shared glass frame for the speech, account dock and audio menu. */
.arrival {
  --raio-painel: .55rem;
  --vidro-painel: rgba(10, 25, 38, .27);
  --borda-painel: rgba(116, 208, 255, .34);
}
.arrival > .guide, .arrival .audio-james-painel {
  border: 1px solid var(--borda-painel);
  border-radius: var(--raio-painel);
  background: var(--vidro-painel);
  backdrop-filter: blur(5px);
  box-shadow: inset 0 0 6px #63caff12, 0 0 8px #46bfff18;
}
.arrival > .guide::after { display: none; }
.arrival > .fala-james::before {
  background: var(--vidro-painel);
  border-color: var(--borda-painel);
}
.arrival > .guide, .arrival .audio-james-painel { text-shadow: 0 1px 3px #000b; }
@media (prefers-reduced-transparency: reduce) {
  .arrival > .guide, .arrival .audio-james-painel {
    background: #142635;
    backdrop-filter: none;
  }
}

/* Compact account controls, with the same glass border as the speech panel. */
.arrival > .menu-james {
  grid-template-columns: minmax(0, 1fr) auto;
  width: min(17.75rem, calc(100vw - 1.7rem));
  min-height: 3.35rem;
  gap: .3rem .45rem;
  padding: .36rem .48rem;
  background: rgba(5, 12, 19, .48);
  border-color: rgba(151, 209, 239, .27);
  box-shadow: inset 0 0 5px #6ad0ff0b, 0 0 6px #46bfff12;
}
#invite-start > .james-identidade { gap: .48rem; padding: .12rem; }
.james-identidade-marca { flex-basis: 1.85rem; height: 1.85rem; }
.james-identidade strong { font-size: .78rem; line-height: 1.18; }
.james-identidade small { font-size: .67rem; line-height: 1.25; }
.menu-james > .audio-james, .menu-james .james-audio { gap: .02rem; }
.menu-james .james-audio button { width: 1.95rem; height: 2.1rem; color: #b9c4cb; }
.menu-james .james-audio button svg { width: 1.05rem; height: 1.05rem; }
.menu-james .audio-james-opcoes > summary { width: 1.3rem; height: 2.1rem; color: #b9c4cb; }
@media (prefers-reduced-transparency: reduce) {
  .arrival > .menu-james { background: #12202c; }
}

.james-identidade-marca {
  position: relative;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 26%, #b9efff, #527081 54%, #182c3a);
  color: #0c2736;
  text-shadow: none;
}
.james-identidade-marca::after {
  content: "";
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: .49rem;
  height: .49rem;
  border: 2px solid #152536;
  border-radius: 50%;
  background: #8a9aa5;
}
.menu-james .james-audio { align-items: center; }
.menu-james .microfone-opcoes { position: relative; }
.microfone-opcoes .audio-james-painel { left: 0; right: auto; font-size: .83rem; }
@media (max-width: 30rem) {
  .microfone-opcoes .audio-james-painel { left: auto; right: -3rem; }
}

.menu-james .james-audio button,
.menu-james .james-audio button:hover,
.menu-james .james-audio button[aria-pressed="true"],
.menu-james .audio-james-opcoes > summary,
.menu-james .audio-james-opcoes > summary:hover,
.menu-james .audio-james-opcoes[open] > summary,
.menu-james #invite-start button {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}
.menu-james .james-audio button:hover,
.menu-james .audio-james-opcoes > summary:hover,
.menu-james #invite-start button:hover { color: #fff; }

.menu-james .audio-james-opcoes > summary {
  padding: 0;
  align-content: center;
}
.menu-james .audio-james-opcoes > summary svg {
  display: block;
  width: .8rem;
  height: .8rem;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform: none;
}

.menu-james .james-audio { flex-wrap: nowrap; }
.menu-james .microfone-opcoes { margin-inline-end: .22rem; }
.menu-james .audio-james-opcoes { position: relative; }

.menu-james .james-audio button,
.menu-james .audio-james-opcoes > summary { color: #a6a8ae; }
.menu-james .james-audio button:hover,
.menu-james .audio-james-opcoes > summary:hover { color: #e1e2e5; }
.menu-james .james-identidade strong { color: #f1f1f3; }
.menu-james .james-identidade small { color: #a6a8ae; }
.menu-james .james-audio button svg { width: 1.12rem; height: 1.12rem; stroke-width: 1.9; }
.menu-james .audio-james-opcoes > summary svg { width: .75rem; height: .75rem; stroke-width: 2.1; }

/* The blue tint belongs only to the glass surface. */
.arrival > .menu-james {
  background: rgba(14, 27, 39, .42);
  border-color: rgba(210, 214, 219, .24);
  box-shadow: 0 3px 12px #0004;
}
.menu-james .audio-james-painel {
  background: rgba(14, 27, 39, .86);
  border-color: rgba(210, 214, 219, .24);
  box-shadow: 0 5px 18px #0006;
}
.menu-james .james-identidade-marca {
  color: #232529;
  border-color: #c0c2c777;
  background: radial-gradient(circle at 30% 26%, #f0f0f2, #a4a7ad 54%, #65686e);
}
.menu-james .james-identidade-marca::after { border-color: #28292d; background: #95989e; }
.menu-james #invite-start input { border-color: #c0c2c777; }
.menu-james #invite-start input::placeholder { color: #c4c5c9; }
.menu-james .audio-james-painel input { accent-color: #c4c5c9; }
.arrival > .menu-james :focus-visible { outline-color: #e1e2e5; }

.james-house canvas[data-foco-do-ponteiro]:focus-visible { outline: none; }

.menu-james .configuracoes-james > summary {
  width: 1.95rem;
  margin-inline-start: .2rem;
}
.menu-james .configuracoes-james > summary svg { width: 1.12rem; height: 1.12rem; stroke-width: 1.5; }
.menu-james #james-ouvir { width: auto; height: auto; padding: .35rem; color: #eee; white-space: nowrap; }

.arrival > .menu-james #invite-start > .james-identidade,
.arrival > .menu-james .james-audio button,
.arrival > .menu-james .james-audio button[aria-pressed="true"],
.arrival > .menu-james .audio-james-opcoes > summary {
  background: none;
  border-color: transparent;
  box-shadow: none;
}
.arrival > .menu-james .james-audio button,
.arrival > .menu-james .audio-james-opcoes > summary { color: #a6a8ae; }
.arrival > .menu-james .james-audio button:hover,
.arrival > .menu-james .audio-james-opcoes > summary:hover { color: #e5e5e8; }
.james-identidade > span:last-child { min-width: 0; }
.james-identidade strong, .james-identidade small { overflow: hidden; text-overflow: ellipsis; }

.james-menu-cena {
  position: absolute;
  z-index: 2;
  top: clamp(.7rem, var(--cabeca-y, 34%), calc(var(--altura-cena, 55svh) - 8rem));
  left: clamp(.7rem, calc(var(--cabeca-x, 50%) + 1.75rem), calc(100% - 10.5rem));
  width: 9.75rem;
  transform: skewY(var(--inclinacao-balao, 0deg));
  transform-origin: left center;
  border: 1px solid rgba(154, 208, 233, .38);
  border-radius: .45rem;
  background: rgba(14, 31, 45, .64);
  backdrop-filter: blur(5px);
  color: #fff;
  font: 600 .82rem/1.3 Inter, system-ui, sans-serif;
}
.james-menu-cena summary { padding: .48rem .65rem; cursor: pointer; }
.james-menu-acoes { display: grid; gap: .15rem; padding: .2rem .35rem .4rem; }
.james-menu-acoes button {
  padding: .38rem .3rem; border: 0; border-radius: .25rem; background: none;
  color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.james-menu-acoes button:hover { background: #b8e7ff20; }
.james-menu-cena :focus-visible { outline: 2px solid #d7f3ff; outline-offset: -2px; }

.james-menu-cena {
  --distancia-do-james: clamp(4rem, 7vw, 7rem);
  left: clamp(.7rem, calc(var(--cabeca-x, 50%) + var(--distancia-do-james)), calc(100% - 10.5rem));
  top: clamp(.7rem, calc(var(--cabeca-y, 34%) - 1.1rem), calc(var(--altura-cena, 55svh) - 8rem));
  border-color: #f2faffac;
  background: linear-gradient(145deg, #f8fdffc7, #dbeaf4a1);
  backdrop-filter: blur(10px) saturate(125%);
  box-shadow: inset 0 1px 1px #fffcb3, 0 4px 16px #0d233b37;
  color: #142a38;
}
.james-menu-cena[data-lado-esquerdo] {
  left: clamp(.7rem, calc(var(--cabeca-x, 50%) - var(--distancia-do-james) - 9.75rem), calc(100% - 10.5rem));
  transform-origin: right center;
}
.james-menu-acoes button:hover { background: #fff8; }
.james-menu-cena :focus-visible { outline-color: #244d63; }
@media (prefers-reduced-transparency: reduce) {
  .james-menu-cena { background: #eef6fc; backdrop-filter: none; }
}

.james-entrada-privada { margin: .6rem .25rem .2rem; font-size: .8rem; }
.james-entrada-privada p { margin: 0 0 .55rem; }
.menu-james .james-entrada-privada a {
  margin: 0;
  border: 1px solid #adbdc768;
  border-radius: .4rem;
  background: transparent;
  color: #fff;
}

.menu-james .james-identidade strong { font-size: .88rem; }
.menu-james .james-identidade small { font-size: .72rem; }
.menu-james .james-identidade-marca { flex-basis: 2rem; height: 2rem; }
.menu-james button[hidden] { display: none; }

#invite-start [hidden] { display: none !important; }
#james-profile-cities { margin: .8rem 0; border-top: 1px solid #a9d4ec36; padding-top: .65rem; }
#james-cities-title { margin: 0 0 .45rem; font-size: .8rem; }
.james-profile-city { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .45rem; }
.menu-james #james-share-city { font-size: .72rem; }
#james-share-link { width: 100%; margin-top: .45rem; }
#james-share-status:not(:empty) { margin-top: .4rem; }


.james-monitor-review[hidden] { display: none; }
.arrival > .james-monitor-review {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 10;
  width: 40vw;
  max-width: none;
  max-height: 100dvh;
  overflow: auto;
  overscroll-behavior: contain;
  padding: clamp(.9rem, 2vw, 1.5rem);
  border-radius: .7rem 0 0 .7rem;
  color: #edf9ff;
  background: rgba(12, 25, 33, .94);
}
.james-monitor-review header { display: flex; align-items: center; justify-content: space-between; gap: .4rem; }
.james-monitor-review h2, .james-monitor-review h3 { margin: .2rem 0 .45rem; }
.james-monitor-review label { display: grid; gap: .25rem; margin: .55rem 0; }
.james-monitor-review button, .james-monitor-review select { color: #edf9ff; background: #162a34; border: 1px solid #587785; border-radius: .3rem; padding: .35rem; }
.james-monitor-review button:disabled { opacity: .55; }

.james-review-actions { display: flex; flex-wrap: wrap; gap: .55rem; }
.james-monitor-review #james-monitor-pr[hidden] { display: none; }
@media (max-width: 650px) {
  .arrival > .james-monitor-review {
    inset: auto 0 0;
    width: 100%;
    max-height: 44dvh;
    border-radius: .7rem .7rem 0 0;
  }
}
.arrival > .fala-james[hidden] { display: none; }

/* Decisão do monitor, ao lado da prévia 3D. */
.arrival > .james-monitor-review {
  width: 52vw;
  padding: clamp(1rem, 2.5vw, 2.3rem);
  border-radius: 0;
  background: #10191e;
  border: 0;
  border-left: 1px solid #34474f;
}
.james-monitor-review .james-review-header { align-items: start; gap: 1rem; }
.james-review-header p { margin: 0 0 .35rem; color: #b3c9d1; font-size: .83rem; }
.james-review-header h2 { font-size: clamp(1.45rem, 2.8vw, 2.6rem); line-height: 1.08; }
.james-review-intro { color: #b9cdd4; margin: .4rem 0 1.25rem; }
.james-review-actions { align-items: center; justify-content: space-between; margin-top: .8rem; }
.james-review-actions p { margin: 0; font-size: .85rem; color: #b9cdd4; }
.james-monitor-review #james-monitor-approve { background: #a8f1ff; color: #12252d; font-weight: 700; padding: .58rem .8rem; }
@media (max-width: 650px) {
  .arrival > .james-monitor-review { width: 100%; max-height: 59dvh; border-left: 0; border-top: 1px solid #34474f; }
  .james-review-intro { margin-bottom: .7rem; font-size: .9rem; }
}


.james-model-gallery { display: grid; gap: 1.15rem; }
.james-model-group h3 { font-size: .86rem; color: #bfced3; margin-bottom: .5rem; font-weight: 600; }
.james-model-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .55rem; }
.james-monitor-review .james-model-card {
  padding: 0; overflow: hidden; display: flex; flex-direction: column; text-align: left;
  background: #151f24; border-color: #384950; color: #f1f7f8; cursor: pointer;
  transition: background-color 170ms ease, border-color 170ms ease, transform 170ms ease;
}
.james-model-card img { width: 100%; aspect-ratio: 5 / 4; object-fit: cover; display: block; }
.james-model-card span { padding: .55rem; font-weight: 650; font-size: clamp(.72rem, 1.05vw, .92rem); }
.james-monitor-review .james-model-card[aria-pressed="true"] { border-color: #b2eff4; background: #203840; }
.james-monitor-review .james-model-card:focus-visible { outline: 2px solid #b2eff4; outline-offset: 2px; }
@media (hover: hover) {
  .james-monitor-review .james-model-card:hover { border-color: #91adb4; transform: translateY(-2px); }
}
.james-monitor-review .james-review-actions {
  position: sticky; bottom: 0; background: #10191e; padding-block: .8rem .2rem;
  border-top: 1px solid #34474f; margin-top: 1.1rem;
}
@media (prefers-reduced-motion: reduce) {
  .james-monitor-review .james-model-card { transition: none; transform: none; }
}

.menu-james #invite-start[open] { display: flex; flex-direction: column-reverse; }
.menu-james .james-entrada-privada { margin: 0 0 .5rem; padding: .65rem .35rem; border-bottom: 1px solid #a9d4ec36; }
.menu-james #james-profile-cities { margin: 0 0 .8rem; border: 0; padding: 0; }
.james-profile-city[hidden] { display: none; }
#james-city-list { list-style: none; margin: .45rem 0; padding: 0; }
#james-city-list li + li { margin-top: .35rem; }
#james-city-dialog {
  width: min(66rem, calc(100% - 2rem));
  max-height: 90dvh;
  box-sizing: border-box;
  color: #edf5f8;
  background: #111b21;
  border: 1px solid #64777c;
  border-radius: .65rem;
  padding: 1rem;
}
#james-city-dialog::backdrop { background: #080d10da; }
#james-city-dialog header { display: flex; justify-content: space-between; align-items: center; gap: .75rem; }
#james-city-dialog header h2 { margin: 0; overflow-wrap: anywhere; }
#james-city-dialog :is(button, input, select) {
  padding: .45rem .55rem;
  border-radius: .35rem;
  border: 1px solid #64777c;
  background: #213239;
  color: inherit;
  font: inherit;
}
#james-city-dialog form { margin-top: .65rem; }
#james-city-dialog label { display: inline-block; margin: .3rem .35rem .3rem 0; }
#james-city-dialog input { max-width: 100%; box-sizing: border-box; }
#james-city-stage { position: relative; min-height: 16rem; height: 52dvh; margin-top: .75rem; }
#james-city-stage :is(img, canvas) { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
#james-city-stage canvas { touch-action: none; }
#james-cities-title { display: flex; align-items: center; gap: .4rem; }
#james-cities-title span { font-size: 1.15rem; color: #a8dbe7; }
.menu-james #james-account-menu > summary { cursor: pointer; padding: .3rem 0; }
.menu-james #james-account-menu button { margin: .35rem .35rem 0 0; }
.menu-james #james-share-status { margin: .4rem 0 0; color: #bcc9d1; font-size: .72rem; }

.james-inventory { margin-top: 1.1rem; padding-top: .7rem; border-top: 1px solid #34474f; }
.james-inventory ul { list-style: none; margin: 0; padding: 0; }
.james-inventory li { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; padding: .45rem 0; }
.james-inventory li span { flex: 1 1 11rem; }

.arrival > .menu-james { width: min(21rem, calc(100vw - 1.5rem)); }
#james-login-title { margin: 0 0 .55rem; font-size: .93rem; }
.james-login-providers { display: flex; gap: .45rem; }
.arrival > .menu-james #invite-start .james-login-providers > button {
  display: grid;
  place-items: center;
  place-content: center;
  box-sizing: border-box;
  width: 42px;
  height: 42px;
  min-height: 0;
  padding: 0;
  border: 1px solid #ffffff14;
  border-radius: 5px;
  background: #ffffff0e;
  color: #a7b6bf;
  box-shadow: none;
}
.arrival > .menu-james #invite-start .james-login-providers > button:hover:not(:disabled) {
  background: #ffffff1a;
  color: #c4d1d8;
}
.arrival > .menu-james #invite-start .james-login-providers > button:disabled { opacity: .55; cursor: wait; }
.james-login-providers img, .james-login-providers svg { display: block; justify-self: center; align-self: center; }
#james-email-form { display: grid; gap: .45rem; margin-top: .6rem; }
#james-email-form label { display: grid; gap: .2rem; }
#james-email-form input { min-width: 0; width: 100%; }
#james-email-form button { justify-self: start; }

.arrival > .menu-james .james-audio [data-audio-tooltip] {
  position: relative;
  border-radius: 5px;
}
.arrival > .menu-james .james-audio [data-audio-tooltip]:is(:hover, :focus-visible),
.arrival > .menu-james .james-audio details[open] > [data-audio-tooltip] {
  background: #d8edf51b;
  color: #edf7fa;
}
.james-audio [data-audio-tooltip]::before,
.james-audio [data-audio-tooltip]::after {
  position: absolute;
  left: 50%;
  z-index: 8;
  pointer-events: none;
  opacity: 0;
  transform: translateX(-50%);
  transition: opacity 100ms ease;
}
.james-audio [data-audio-tooltip]::before {
  content: "";
  bottom: calc(100% + 4px);
  width: 7px;
  height: 7px;
  background: #172228;
  border-right: 1px solid #405158;
  border-bottom: 1px solid #405158;
  transform: translateX(-50%) rotate(45deg);
}
.james-audio [data-audio-tooltip]::after {
  content: attr(aria-label) / "";
  bottom: calc(100% + 7px);
  padding: .36rem .52rem;
  background: #172228;
  border: 1px solid #405158;
  border-radius: 5px;
  color: #eaf2f5;
  font: 600 .77rem/1.25 inherit;
  font-size: .77rem;
  line-height: 1.25;
  font-weight: 600;
  text-shadow: none;
  white-space: nowrap;
}
.james-audio [data-audio-tooltip]:focus-visible::before,
.james-audio [data-audio-tooltip]:focus-visible::after { opacity: 1; }
@media (hover: hover) {
  .james-audio [data-audio-tooltip]:hover::before,
  .james-audio [data-audio-tooltip]:hover::after { opacity: 1; transition-delay: 180ms; }
}
.james-audio details[open] > [data-audio-tooltip]::before,
.james-audio details[open] > [data-audio-tooltip]::after { visibility: hidden; }
@media (prefers-reduced-motion: reduce) {
  .james-audio [data-audio-tooltip]::before,
  .james-audio [data-audio-tooltip]::after { transition: none; }
}

.james-character-queue { margin: 1rem 0 1.3rem; padding-bottom: 1rem; border-bottom: 1px solid #34474f; }
.james-character-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(8.5rem, 100%), 1fr)); gap: .65rem; }
.james-character-queue .james-character-card { display: grid; text-align: left; gap: .3rem; padding: .5rem; cursor: pointer; }
.james-character-card[aria-pressed="true"] { border-color: #a8f1ff; }
.james-character-card img { width: 100%; background: #0c1318; aspect-ratio: 3 / 2; object-fit: contain; }
.james-character-card small, #james-character-status { color: #bdcdd3; }
#james-character-status { font-size: .85rem; margin: .65rem 0; }
#james-character-viewer { width: 100%; height: clamp(11rem, 34vh, 20rem); display: block; touch-action: none; margin-top: .6rem; background: #0c1318; }
#james-character-viewer[hidden], #james-character-play[hidden] { display: none; }
.james-character-actions { display: flex; gap: .4rem; flex-wrap: wrap; }
.james-character-actions #james-character-gesture-label:not([hidden]) {
  display: flex; align-items: center; flex-wrap: wrap; gap: .35rem; margin: 0;
}

#james-character-viewer { height: clamp(16rem, 45dvh, 30rem); }
#james-character-expanded {
  width: min(78rem, calc(100vw - 1.5rem)); max-width: none;
  max-height: calc(100dvh - 1.5rem); padding: .85rem; border: 1px solid #415663;
  border-radius: .55rem; background: #10191e; color: #edf5f8;
}
#james-character-expanded::backdrop { background: #080d10c9; }
#james-character-expanded header { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
#james-character-expanded h3 { margin: 0; font-size: 1rem; }
#james-character-expanded #james-character-viewer { height: min(72dvh, 54rem); }
#james-character-expanded button {
  color: #edf5f8; background: #1b313b; border: 1px solid #66818c;
  border-radius: .3rem; padding: .45rem .65rem;
}
#james-character-expanded button:disabled { opacity: .55; }

.james-monitor-review [hidden], .james-menu-cena #james-monitor-review[hidden] { display: none; }
.james-approval-views { display: flex; flex-wrap: wrap; gap: .45rem; margin: 1rem 0; }
.james-approval-views button[aria-pressed="true"] { border-color: #a8f1ff; background: #203840; }

#james-profile-avatar {
  display: block; width: 100%; height: 100%; border-radius: inherit; object-fit: cover;
}

.arrival > .menu-james #invite-start #james-share-city {
  display: grid; place-items: center; width: 34px; height: 34px; padding: 0;
  border: 1px solid #82969e45; border-radius: 5px; background: #ffffff0d;
  color: #a6b9c2; box-shadow: none;
}
#james-share-city:disabled { opacity: .65; }
.arrival > .menu-james #invite-start #james-share-city[hidden] { display: none; }
.james-settings-panel { min-width: 13rem; }
.james-settings-panel p { margin: .6rem 0 0; font-size: .76rem; color: #b5c5cb; }
.arrival > .menu-james .james-settings-panel #james-logout,
.arrival > .menu-james .james-settings-panel #james-link-github { width: auto; padding-inline: .4rem; }
.james-settings-panel [hidden] { display: none !important; }

/* Shared window surface, based on the profile and login reference. */
.arrival {
  --james-window-bg: rgb(14 19 23 / 58%);
  --james-window-border: rgb(220 232 237 / 24%);
  --james-window-text: #f2f5f6;
}

.arrival > .guide,
.arrival > .james-monitor-review,
.arrival :is(.james-menu-cena, .audio-james-painel, #james-character-expanded) {
  background: var(--james-window-bg);
  color: var(--james-window-text);
  border: 1px solid var(--james-window-border);
  border-radius: 8px;
  box-shadow: 0 4px 18px rgb(0 0 0 / 18%);
  backdrop-filter: blur(12px);
}

.arrival .james-menu-cena :focus-visible { outline-color: #a8e6f4; }

@media (prefers-reduced-transparency: reduce) {
  .arrival { --james-window-bg: #151d22; }
}

#james-workspace {
  width: min(36rem, calc(100% - 2rem));
  max-height: 85dvh;
  padding: 1.25rem;
  color: var(--james-window-text, #f2f5f6);
  background: var(--james-window-bg, #151d22);
  border: 1px solid var(--james-window-border, #52616b);
  border-radius: 8px;
  backdrop-filter: blur(12px);
}
#james-workspace::backdrop { background: rgb(0 0 0 / 20%); }
#james-workspace-plan {
  width: min(40rem, calc(100% - 1.5rem));
  max-width: none;
  box-sizing: border-box;
  padding: 1rem;
  color: var(--james-window-text);
  background: var(--james-window-bg);
  border: 1px solid var(--james-window-border);
  border-radius: .55rem;
  backdrop-filter: blur(12px);
}
#james-workspace-plan::backdrop { background: rgb(5 9 12 / 70%); }
#james-workspace-plan header { display: flex; align-items: center; justify-content: space-between; gap: .65rem; }
#james-workspace-plan h2 { margin: 0; }
#james-workspace-plan-task { white-space: pre-wrap; overflow-wrap: anywhere; }
#james-workspace-plan textarea { display: block; width: 100%; max-height: 50dvh; box-sizing: border-box; resize: vertical; }
#james-workspace-plan :is(textarea, button) {
  color: inherit; background: #1d313c; border: 1px solid #82939d; border-radius: 5px; padding: .45rem;
}
#james-workspace-plan :is(textarea, button):focus-visible { outline: 2px solid #a8f1ff; outline-offset: 2px; }
#james-workspace-plan-approve:not(:disabled) { background: #a8f1ff; color: #12252d; }
#james-workspace header { display: flex; gap: 1rem; align-items: center; justify-content: space-between; }
#james-workspace header h2 { margin: 0; }
#james-workspace form:not([hidden]) { display: grid; gap: .45rem; margin-block: 1rem; }
#james-workspace :is(textarea, input, select) { display: block; width: 100%; box-sizing: border-box; }
#james-workspace :is(button, textarea, input, select) {
  color: inherit; background: #1d313c; border: 1px solid #82939d; border-radius: 4px; padding: .45rem;
}
#james-workspace article { margin: .8rem 0; padding: .8rem; border: 1px solid #82939d70; border-radius: 6px; }
#james-workspace article h4 { margin: 0; }
#james-workspace-audit { margin-block: .8rem; }
#james-workspace-audit table { width: 100%; border-collapse: collapse; margin-block: .5rem; }
#james-workspace-audit caption,
#james-workspace-audit :is(th, td) { text-align: start; padding: .35rem .3rem; }
#james-workspace-audit :is(th, td) { border-bottom: 1px solid #82939d70; }
#james-workspace article code { display: block; overflow-wrap: anywhere; margin-bottom: .6rem; }
.james-menu-cena #james-workspace-open[hidden] { display: none; }

#james-workspace[open] { position: fixed; inset: 1rem 1rem auto auto; margin: 0; z-index: 20; }
@media (min-width: 800px) {
  #james-workspace[open] { width: min(40vw, 36rem); }
}

#james-workspace #james-monitor-review[hidden] { display: none; }
#james-workspace input[hidden] { display: none; }

#james-voice-hud[hidden] { display: none; }
#james-voice-hud {
  position: fixed; z-index: 25; left: 50%; bottom: max(1rem, env(safe-area-inset-bottom)); translate: -50% 0;
  width: min(30rem, calc(100% - 2rem)); padding: .65rem .85rem;
  color: #f2f5f6; background: var(--james-window-bg, #10191edc);
  border: 1px solid var(--james-window-border, #57656c); border-radius: 8px; backdrop-filter: blur(12px);
}
.james-voice-controls { display: flex; align-items: center; gap: .75rem; }
#james-voice-status { flex: 1; margin: 0; font-size: .82rem; }
#james-voice-hud p:not(#james-voice-status) { margin: .35rem 0 0; max-height: 5rem; overflow: auto; font-size: .85rem; }
#james-voice-hud strong { margin-inline-end: .35rem; }
#james-voice-meter {
  width: 2.75rem; height: 2.75rem; display: grid; place-items: center; flex: 0 0 auto;
  border-radius: 50%; border: 1px solid #76898f; color: #ebf5f7; background: #203138;
}
#james-voice-meter svg { width: 1.35rem; height: 1.35rem; }
#james-voice-meter[data-state="on"] { color: #a9ffd0; background: #124130; border-color: #58dc94; }
#james-voice-meter[data-speaking="true"] { box-shadow: 0 0 calc(6px + 20px * var(--level)) #4cff9d; }
#james-mic[aria-pressed="true"] svg, #james-mute[aria-pressed="false"] svg { color: #89f9b8; }
#james-mic[data-speaking="true"] svg { filter: drop-shadow(0 0 .28rem #57fb9a); }
#james-voice-end { border: 1px solid #758a90; background: #23343a; color: #f2f5f6; border-radius: 4px; padding: .35rem .55rem; }
#james-voice-hud button:focus-visible { outline: 2px solid #a8e6f4; outline-offset: 3px; }
@media (max-width: 680px) { #james-voice-hud { bottom: max(5.25rem, env(safe-area-inset-bottom)); } }
@media (prefers-reduced-motion: reduce) { #james-voice-meter[data-speaking="true"] { box-shadow: none; outline: 2px solid #60fca8; } }

:is(#james-mic, #james-voice-meter)[aria-pressed="false"] {
  color: #ff8089;
  background-color: rgb(157 36 51 / 20%);
}
#james-mic[aria-pressed="false"] svg { color: inherit; }
:is(#james-mic, #james-voice-meter) .james-mic-slash {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  opacity: 0;
  transition: stroke-dashoffset .16s ease, opacity .12s ease;
}
:is(#james-mic, #james-voice-meter)[aria-pressed="false"] .james-mic-slash {
  stroke-dashoffset: 0;
  opacity: 1;
}
#james-voice-meter { transition: background-color .16s ease, border-color .16s ease, box-shadow .12s ease-out; }
@media (prefers-reduced-motion: reduce) {
  :is(#james-mic, #james-voice-meter) .james-mic-slash, #james-voice-meter { transition: none; }
}

/* Hallmark, custom. The channel rail keeps the map and the current conversation in view. */
.arrival {
  --channel-surface: rgb(15 22 25 / 91%);
  --channel-line: #64777c;
  --channel-text: #f3f6f7;
  --channel-secondary: #c0ced0;
  --channel-control: #213239;
  --channel-accent: #8cf5bd;
  --channel-selected: #193e32;
}
#james-channel-rail, #james-channel-chat {
  position: fixed; z-index: 18; color: var(--channel-text); background: var(--channel-surface);
  border: 1px solid var(--channel-line); border-radius: 8px; padding: .65rem;
  backdrop-filter: blur(12px); box-sizing: border-box;
}
#james-channel-rail { inset: 1rem auto auto 1rem; width: 13rem; max-height: 62dvh; overflow: auto; font-size: .83rem; }
#james-channel-chat {
  inset: 1rem 1rem auto auto;
  width: min(28rem, calc(100% - 2rem));
  max-height: 82dvh;
  display: flex;
  flex-direction: column;
  overflow: auto;
}
:is(#james-channel-rail, #james-channel-chat) header { display: flex; align-items: center; justify-content: space-between; gap: .4rem; margin-bottom: .55rem; }
#james-channel-rail h1 { margin: 0; font: inherit; font-weight: 700; }
#james-channel-chat h2 { margin: 0; font-size: 1.1rem; }
:is(#james-channel-rail, #james-channel-chat) :is(button,input:not([type=checkbox])) {
  background: var(--channel-control); color: inherit; border: 1px solid var(--channel-line); border-radius: 5px;
  font: inherit; padding: .35rem .5rem;
}
:is(#james-channel-rail, #james-channel-chat) :is(button,input):focus-visible { outline: 2px solid var(--channel-accent); outline-offset: 2px; }
#james-channel-rail button[aria-pressed="true"], #james-channel-rail button[aria-expanded="true"] { background: var(--channel-selected); }
#james-channel-rail section { margin-top: .5rem; }
#james-channel-rail p, #james-channel-status { color: var(--channel-secondary); margin: .35rem 0; }
.james-channel-actions { display: flex; flex-wrap: wrap; gap: .35rem; }
.james-channel-actions label { width: 100%; }
#james-channel-members, .james-chat-messages { padding: 0; margin: .4rem 0; list-style: none; }
#james-channel-members li { display: flex; gap: .4rem; align-items: center; padding: .2rem; }
#james-channel-members li span {
  width: 1.35rem; height: 1.35rem; display: grid; place-items: center; border: 1px solid var(--channel-line);
  border-radius: 50%; transition: box-shadow .15s ease;
}
#james-channel-members li[data-speaking="true"] span { box-shadow: 0 0 0 2px var(--channel-accent); color: var(--channel-accent); }
.james-channel-nav { display: grid; gap: .2rem; }
#james-channel-rail .james-channel-row { min-height: 2.25rem; text-align: start; }
#james-channel-rail #james-workspace-rail[hidden] { display: none; }
#james-channel-rail #james-workspace-rail[aria-expanded="true"] { background: var(--channel-selected); }
#james-channel-rail[data-compact="true"] { width: 10.5rem; }
#james-channel-rail[data-compact="true"] :is(#james-channel-connection, .james-channel-actions, #james-channel-meter, #james-channel-mic-sample) { display: none; }
@media (min-width: 36rem) {
  #james-channel-rail[data-compact="true"] {
    display: grid;
    gap: .35rem;
  }
  #james-channel-rail[data-compact="true"] header { grid-column: 1 / -1; margin: 0; }
  #james-channel-rail[data-compact="true"] section { margin-top: 0; }
}
#james-channel-status:empty { display: none; }
.james-channel-history-note { color: var(--channel-secondary); font-size: .78rem; margin: .25rem .35rem; }
.james-chat-messages { min-height: 0; overflow-y: auto; overscroll-behavior-y: contain; }
.james-chat-messages li { border-top: 1px solid var(--channel-line); padding: .55rem 0; overflow-wrap: anywhere; }
.james-chat-messages time { margin-inline-start: .55rem; color: var(--channel-secondary); font-size: .75rem; }
.james-chat-messages p { margin: .25rem 0; white-space: pre-wrap; }
.james-chat-compose { display: flex; align-items: end; gap: .4rem; flex-wrap: wrap; }
.james-chat-compose label { width: 100%; }
#james-channel-audio-draft { width: 100%; }
#james-channel-audio-draft audio { display: block; width: 100%; margin-bottom: .35rem; }
.james-chat-compose input:not([type]) { flex: 1 1 10rem; min-width: 0; }
.james-call-gallery {
  display: none;
  flex: none;
  max-height: 33dvh;
  overflow: auto;
  overscroll-behavior-y: contain;
}
.james-call-gallery:has(> div:not([hidden])) { display: block; }
.james-call-gallery > div:not([hidden]) {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr));
  gap: .5rem;
}
.james-call-gallery > div + div:not([hidden]) { margin-top: .5rem; }
.james-call-gallery figure { margin: 0; min-width: 0; }
.james-call-gallery :is(video, audio) { display: block; width: 100%; }
.james-call-gallery video { background: #000; max-height: 19dvh; object-fit: contain; }
.james-call-gallery .james-channel-actions { margin-block: .35rem; }
#james-call-screen-viewer {
  width: min(76rem, calc(100% - 1.25rem));
  max-width: none;
  box-sizing: border-box;
  padding: clamp(.65rem, 2vw, 1rem);
  border: 1px solid var(--james-window-border);
  border-radius: .55rem;
  color: var(--james-window-text);
  background: var(--james-window-bg);
  backdrop-filter: blur(12px);
}
#james-call-screen-viewer::backdrop { background: rgb(5 9 12 / 72%); }
#james-call-screen-viewer header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  margin-block-end: .6rem;
}
#james-call-screen-viewer h2 { margin: 0; font-size: 1rem; overflow-wrap: anywhere; }
#james-call-screen-viewer button {
  flex: none;
  min-height: 2.5rem;
  padding: .35rem .6rem;
  border: 1px solid var(--channel-line);
  border-radius: .35rem;
  color: inherit;
  background: var(--channel-control);
  font: inherit;
}
#james-call-screen-viewer button:focus-visible { outline: 2px solid var(--channel-accent); outline-offset: 2px; }
#james-call-screen-viewer video { display: block; width: 100%; max-height: 75dvh; object-fit: contain; background: #000; }
#james-channel-chat[hidden] { display: none; }
@media (max-width: 660px) {
  #james-channel-rail { max-height: 48dvh; }
  #james-channel-chat { inset-block-start: auto; inset-block-end: 5rem; max-height: 53dvh; }
}
@media (prefers-reduced-motion: reduce) { #james-channel-members li span { transition: none; } }
#james-channel-mic-sample { width: 100%; }

#james-channel-file[hidden] { display: none; }
.james-chat-messages a { color: var(--channel-accent); text-underline-offset: .16em; }
.james-chat-messages a:focus-visible { outline: 2px solid var(--channel-accent); }

#james-channel-rail .james-channel-row {
  width: 100%;
  min-height: 2.35rem;
  text-align: start;
  border-color: transparent;
  background: transparent;
}
#james-channel-rail .james-channel-row:hover { background: var(--channel-control); }
#james-channel-rail #james-channel-general[aria-expanded="true"] { background: var(--channel-selected); }
#james-channel-chat > header, .james-chat-compose {
  flex: none;
  padding: .55rem .35rem;
}
#james-channel-chat > header { border-bottom: 1px solid var(--channel-line); }
.james-chat-compose { border-top: 1px solid var(--channel-line); }
.james-chat-messages { flex: 1 1 auto; padding-inline: .35rem; }
.james-chat-compose[hidden], #james-channel-general-status[hidden], #james-channel-general-status:empty { display: none; }
.james-general-draft { width: 100%; overflow-wrap: anywhere; }
.james-general-audio { width: 100%; }
#james-channel-review-notices { flex: none; }
#james-channel-review-notices h3 { margin: .35rem 0 0; font-size: .88rem; }
#james-channel-review-notices ul { max-height: min(10rem, 24dvh); }
.james-chat-switch { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .45rem; }
#james-channel-chat .james-chat-switch button[aria-pressed="true"] { background: var(--channel-selected); border-color: var(--channel-accent); }

@media (min-width: 64rem) {
  #casa:has(#james-channel-chat:not([hidden]), #james-workspace[open]) {
    --channels-space: 15rem;
    --chat-space: min(33vw, 28rem);
    --panel-gutter: .9rem;
  }
  #casa:has(#james-channel-chat:not([hidden])) > .james-house {
    inset-inline: var(--channels-space) calc(var(--chat-space) + var(--panel-gutter));
  }
  #casa:has(#james-channel-chat:not([hidden])) #james-channel-rail {
    width: calc(var(--channels-space) - 2 * var(--panel-gutter));
    inset: var(--panel-gutter) auto 5rem var(--panel-gutter);
    max-height: none;
    display: flex;
    flex-direction: column;
    gap: .5rem;
  }
  #casa:has(#james-channel-chat:not([hidden])) #james-channel-rail header {
    border-bottom: 1px solid var(--channel-line);
    padding-bottom: .55rem;
  }
  #casa #james-channel-chat {
    width: var(--chat-space, 28rem);
    inset: var(--panel-gutter, .9rem) var(--panel-gutter, .9rem) 4.65rem auto;
    max-height: none;
  }
}

:is(#james-workspace, #james-monitor-approvals) { isolation: isolate; }
.james-approval-chrome {
  position: absolute; z-index: -1; inset: 0; pointer-events: none;
  transform: translateY(var(--chrome-scroll, 0));
  background:
    radial-gradient(ellipse at 90% 12%, rgb(176 190 201 / 25%), transparent 45%),
    radial-gradient(ellipse at 14% 74%, rgb(153 163 172 / 20%), transparent 43%);
  overflow: hidden; border-radius: inherit;
}
.james-approval-chrome canvas { display: block; width: 100%; height: 100%; opacity: .23; }
.james-approval-chrome canvas[hidden] { display: none; }
.james-approval-chrome::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgb(9 14 17 / 46%), rgb(9 14 17 / 30%));
}
@media (prefers-reduced-transparency: reduce) { .james-approval-chrome { display: none; } }

#casa { overflow-x: clip; }
#casa[data-assembling] .james-menu-cena,
#casa[data-assembling] .fala-james { visibility: hidden; }
#casa .james-house canvas { touch-action: pan-y; }
#casa :is(#james-channel-rail, #james-channel-chat) { position: absolute; }

.james-visit-nav {
  position: absolute;
  inset: auto max(1.1rem, env(safe-area-inset-right)) max(1.1rem, env(safe-area-inset-bottom)) auto;
  z-index: 1;
  display: flex;
  align-items: end;
  gap: .5rem;
}

.james-visit-link {
  display: inline-flex;
  align-items: center;
  gap: .9rem;
  padding: .7rem .9rem;
  border: 1px solid #63747c;
  border-radius: .55rem;
  background: #11181de8;
  color: #f5f4ed;
  font: 600 .9rem/1.25 Inter, system-ui, sans-serif;
  text-decoration: none;
  cursor: pointer;
}

.james-visit-link[hidden] { display: none; }
:root:has(#james-sign-in-options[hidden]) { overflow: clip; }
:root:has(#james-sign-in-options[hidden]) #casa {
  box-sizing: border-box;
  block-size: 100dvh;
  min-block-size: 0;
  --james-scene-min-height: 0px;
}
:root:has(#james-sign-in-options[hidden]) #casa .james-house canvas { touch-action: none; }
:root:has(#james-sign-in-options[hidden]) :is(#visita, .james-visit-primary) { display: none; }
.james-visit-link[aria-pressed="true"] { border-color: #b5dda2; color: #ceffbb; background: #2c3730; }
.james-visit-link:disabled { opacity: .7; cursor: wait; }
.james-visit-status {
  position: absolute;
  inset: auto 0 calc(100% + .45rem) auto;
  width: max-content;
  max-width: min(22rem, 85vw);
  padding: .38rem .6rem;
  margin: 0;
  border-radius: .4rem;
  color: #f5f4ed;
  background: #11181df5;
  font-size: .8rem;
  line-height: 1.4;
}
.james-visit-status:empty { display: none; }

.james-visit {
  border-top: 1px solid #353633;
  background: #161a19;
  color: #f7efe2;
  padding: clamp(3rem, 8vw, 7.5rem) clamp(1.2rem, 7vw, 7rem);
}

.james-visit-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  align-items: center;
  column-gap: clamp(2rem, 8vw, 8rem);
  row-gap: 2.4rem;
  max-width: 72rem;
  margin-inline: auto;
}

.james-visit h2 {
  max-inline-size: 12ch;
  margin: 0;
  font: 600 clamp(2.65rem, 6vw, 5.75rem)/.98 Inter, system-ui, sans-serif;
  letter-spacing: -.055em;
  text-wrap: balance;
}

.james-visit p {
  max-inline-size: 37ch;
  margin: .9rem 0 0;
  color: #bfbfb3;
  line-height: 1.55;
}

.james-visit-actions a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  min-height: 3.5rem;
  padding: .25rem .5rem;
  border-block-end: 1px solid #59605a;
  color: inherit;
  font-weight: 650;
  text-decoration: none;
  transition: background-color .16s ease, color .16s ease;
}

.james-visit-actions a:first-child { border-block-start: 1px solid #59605a; }
.james-visit-actions a:hover, .james-visit-link:hover { background: #2c3730; color: #ceffbb; }
.james-visit-actions span, .james-visit-link span { color: #b5dda2; }
.james-visit-primary, .james-visit-primary:hover {
  border-color: #b5dda2;
  background: #b5dda2;
  color: #162119;
}
.james-visit-primary:hover { background: #ceffbb; }
.james-visit-primary span { color: currentColor; }
.james-visit-back { justify-self: start; color: #d1dfca; text-underline-offset: .22em; }
:is(.james-visit a, .james-visit-link):focus-visible { outline: 2px solid #b5dda2; outline-offset: 3px; }

@media (max-width: 55rem) {
  #casa {
    grid-template: minmax(var(--james-scene-min-height, 27rem), 1fr) auto / minmax(0, 1fr);
    padding: 0 .65rem max(.85rem, env(safe-area-inset-bottom));
    gap: .65rem;
  }
  #casa .james-house { position: relative; width: 100%; height: 100%; }
  #casa > .fala-james { bottom: max(4.85rem, calc(env(safe-area-inset-bottom) + 4rem)); }
  .james-visit-nav {
    inset: max(1rem, env(safe-area-inset-top)) 1rem auto auto;
    max-width: calc(100% - 15rem);
    flex-direction: column-reverse;
  }
  .james-visit-status {
    inset: calc(100% + .45rem) 0 auto auto;
    width: 100%;
    box-sizing: border-box;
  }
  .james-visit-link { min-height: 2.5rem; box-sizing: border-box; padding: .35rem .6rem; }
}
@media (max-width: 24rem) {
  #casa #james-channel-rail { width: 10.5rem; }
  #casa #james-channel-rail[data-compact="true"] { width: 10.5rem; }
  .james-visit-nav { max-width: calc(100% - 12.5rem); }
}
@media (max-width: 42rem) {
  #casa > .fala-james { bottom: max(4.85rem, calc(50% - 52vw)); }
  .james-visit-inner { grid-template-columns: minmax(0, 1fr); row-gap: 1.8rem; }
}
@media (prefers-reduced-motion: reduce) {
  .james-visit-actions a { transition: none; }
}

#james-workspace #james-t3-pending select {
  margin-block: .65rem;
  max-width: 17rem;
}
#james-workspace #james-t3-pending select[hidden] { display: none; }
