@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");
:root {
  color-scheme: dark;
  --protocol-black: #020504;
  --protocol-gold: #e8c66b;
  --protocol-mint: #78efb1;
  --protocol-ink: #f3f1e8;
  --protocol-mute: #9aa79f;
  --protocol-line: rgba(232, 198, 107, 0.28);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--protocol-black);
  color: var(--protocol-ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.protocol-world {
  overflow: hidden;
  height: 100svh;
}

body.protocol-warp-arrive #protocol-canvas {
  animation: protocol-emerge 1.25s ease-out;
}

#protocol-arrive {
  position: fixed;
  left: 50%;
  top: 22%;
  z-index: 8;
  transform: translateX(-50%);
  width: min(28rem, calc(100vw - 32px));
  padding: 22px 22px 18px;
  border: 1px solid var(--protocol-line);
  border-radius: 18px;
  background: rgba(2, 5, 4, 0.82);
  color: var(--protocol-ink);
  text-align: center;
  pointer-events: auto;
  backdrop-filter: blur(10px);
}
#protocol-arrive[hidden] { display: none; }
#protocol-arrive .eyebrow {
  margin: 0 0 8px;
  color: var(--protocol-gold);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
#protocol-arrive h1 {
  margin: 0 0 10px;
  font-family: Georgia, serif;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 400;
  letter-spacing: -0.03em;
}
#protocol-arrive p {
  margin: 0 0 16px;
  color: var(--protocol-mute);
  font-size: 15px;
  line-height: 1.55;
}
#protocol-arrive-play {
  min-height: 44px;
  padding: 8px 16px;
  border: 1px solid var(--protocol-gold);
  border-radius: 999px;
  background: var(--protocol-gold);
  color: #041018;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.protocol-campaign {
  position: fixed;
  left: 16px;
  bottom: 88px;
  z-index: 9;
  width: min(22rem, calc(100vw - 32px));
  padding: 16px 16px 14px;
  border: 1px solid var(--protocol-gold);
  border-radius: 16px;
  background: rgba(2, 5, 4, 0.88);
  color: var(--protocol-ink);
  pointer-events: auto;
  backdrop-filter: blur(10px);
}
.protocol-campaign[hidden] { display: none; }
.protocol-campaign h2 {
  margin: 0 0 8px;
  font-family: Georgia, serif;
  font-size: 1.4rem;
  font-weight: 400;
}
.protocol-campaign p { margin: 0 0 8px; color: var(--protocol-mute); font-size: 14px; line-height: 1.5; }
.protocol-campaign-how { color: var(--protocol-gold) !important; }
#protocol-presence {
  margin: 0;
  color: var(--protocol-gold);
  font-size: 13px;
  letter-spacing: 0.02em;
}
#protocol-presence[hidden] { display: none; }
#protocol-arrive-share {
  min-height: 44px;
  padding: 8px 16px;
  border: 1px solid var(--protocol-gold);
  border-radius: 999px;
  background: rgba(232, 198, 107, 0.14);
  color: var(--protocol-gold);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

@keyframes protocol-emerge {
  from { filter: blur(18px) brightness(0.15); transform: scale(1.08); }
  to { filter: none; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  body.protocol-warp-arrive #protocol-canvas { animation: none; }
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 40;
  min-height: 44px;
  padding: 11px 14px;
  background: #141c19;
  color: var(--protocol-ink);
  text-decoration: none;
  transform: translateY(calc(-100% - 24px));
}

.skip-link:focus { transform: none; }

#protocol-canvas {
  display: block;
  width: 100%;
  height: 100svh;
  background: #020504;
}

.protocol-hud {
  position: fixed;
  left: 10px;
  right: auto;
  bottom: 10px;
  z-index: 6;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
  max-width: min(34ch, calc(100vw - 20px));
  pointer-events: none;
  transition: opacity 0.35s ease;
}

#protocol-stage,
#protocol-gate {
  margin: 0;
  padding: 5px 10px;
  border: 1px solid var(--protocol-line);
  border-radius: 999px;
  background: rgba(2, 5, 4, 0.62);
  color: var(--protocol-gold);
  font-size: 12px;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#protocol-stage { color: #5ce1e6; }
#protocol-gate { font-size: 11px; }
#protocol-gate a { pointer-events: auto; color: inherit; }

.protocol-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

#protocol-link-form,
#protocol-setup,
#protocol-captain {
  position: fixed;
  left: 50%;
  bottom: 88px;
  z-index: 12;
  transform: translateX(-50%);
  width: min(420px, calc(100vw - 24px));
  padding: 12px 14px;
  border: 1px solid var(--protocol-line);
  border-radius: 14px;
  background: rgba(2, 5, 4, 0.92);
  color: var(--protocol-ink);
  pointer-events: auto;
}

#protocol-captain {
  top: 10px;
  right: 10px;
  left: auto;
  bottom: auto;
  transform: none;
  width: auto;
  padding: 0;
  border: 0;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
#protocol-captain.protocol-captain-slim {
  width: auto;
  padding: 0;
  background: transparent;
  box-shadow: none;
}
#protocol-captain #protocol-captain-line,
#protocol-captain #protocol-command,
#protocol-captain #protocol-now {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
#protocol-ring-prev,
#protocol-ring-next {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(2, 5, 4, 0.5);
  color: var(--protocol-gold);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
#protocol-captain-toggle {
  width: 72px;
  height: 72px;
  min-width: 72px;
  min-height: 72px;
  padding: 8px;
  border-radius: 50%;
  border: 2px solid rgba(232, 198, 107, 0.85);
  background: rgba(2, 5, 4, 0.42);
  color: var(--protocol-gold);
  box-shadow: 0 0 0 6px rgba(232, 198, 107, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: pointer;
}
#protocol-ring-mark {
  font-size: 20px;
  line-height: 1;
}
#protocol-ring-name {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
#protocol-ring-hint {
  margin: 0;
  color: var(--protocol-mute);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  pointer-events: none;
}
#protocol-command {
  display: flex;
  gap: 6px;
  width: 100%;
  margin: 0 0 8px;
}
#protocol-command input {
  flex: 1;
  min-height: 36px;
  padding: 6px 10px;
  border: 1px solid var(--protocol-line);
  border-radius: 8px;
  background: #0b100e;
  color: inherit;
}
#protocol-setup {
  width: min(520px, calc(100vw - 24px));
  border-color: rgba(232, 198, 107, 0.65);
}
#protocol-setup h2 {
  margin: 0 0 8px;
  font-family: Georgia, serif;
  font-size: 28px;
  font-weight: 500;
}
#protocol-setup .eyebrow {
  margin: 0 0 4px;
  color: #e8c66b;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 11px;
}
#protocol-setup-say {
  margin: 0 0 12px;
  white-space: pre-wrap;
}
#protocol-setup-close {
  margin-top: 8px;
}
#protocol-link-form[hidden],
#protocol-setup[hidden],
#protocol-captain[hidden] { display: none; }
#protocol-link-form p { margin: 0 0 8px; }
#protocol-link-form label { display: block; font-size: 12px; color: var(--protocol-mute); }
#protocol-link-form input {
  width: 100%;
  min-height: 44px;
  margin: 6px 0 10px;
  padding: 8px 10px;
  border: 1px solid var(--protocol-line);
  border-radius: 8px;
  background: #0b100e;
  color: inherit;
}
.protocol-link-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
#protocol-now,
#protocol-link-form button,
#protocol-link-form a {
  min-height: 44px;
  padding: 8px 12px;
}
.protocol-overlay .tip-continue {
  margin: 12px 0 0;
  padding: 10px 12px;
  border: 1px solid rgba(232, 198, 107, 0.28);
  border-radius: 12px;
  color: var(--protocol-mute);
  font-size: 14px;
}
.protocol-overlay .tip-continue a { color: var(--protocol-gold); }

.protocol-hud p,
.protocol-place {
  margin: 0;
  padding: 5px 10px;
  border: 1px solid var(--protocol-line);
  border-radius: 999px;
  background: rgba(2, 5, 4, 0.62);
  color: var(--protocol-mute);
  font-size: 12px;
  line-height: 1.3;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}

.protocol-top {
  position: fixed;
  top: 8px;
  left: 8px;
  right: auto;
  z-index: 7;
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  align-items: center;
  max-width: calc(100vw - 168px);
  pointer-events: none;
  transition: opacity 0.35s ease;
}
.protocol-top > * { pointer-events: auto; }

.protocol-wordmark {
  color: var(--protocol-ink);
  font-weight: 800;
  letter-spacing: 0.18em;
  text-decoration: none;
  font-size: 12px;
}

.protocol-wordmark span { color: var(--protocol-gold); }

.protocol-controls {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  align-items: center;
}
.protocol-ring {
  position: fixed;
  top: 10px;
  right: 10px;
  z-index: 24;
  display: grid;
  grid-template-columns: 36px 72px 36px;
  grid-template-rows: auto auto;
  align-items: center;
  justify-items: center;
  column-gap: 2px;
  touch-action: pan-y;
  user-select: none;
  pointer-events: auto;
}
.protocol-ring #protocol-ring-hint {
  grid-column: 1 / -1;
}

.protocol-bubble-spin {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  max-width: min(72vw, 28rem);
}

.protocol-bubbles {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 2px 4px;
  max-width: 100%;
}

.protocol-bubbles::-webkit-scrollbar { display: none; }

.protocol-bubble,
.protocol-spin-btn {
  flex: 0 0 auto;
  scroll-snap-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  padding: 0 4px;
  border: 1px solid var(--protocol-line);
  border-radius: 50%;
  background: rgba(8, 14, 12, 0.9);
  color: var(--protocol-ink);
  font: inherit;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.protocol-bubble.primary {
  border-color: var(--protocol-gold);
  color: var(--protocol-gold);
}

.protocol-spin-btn {
  width: 36px;
  height: 36px;
  font-size: 18px;
}

#protocol-plaza { display: none; }
body.protocol-in-room #protocol-plaza {
  display: inline-flex;
  border-color: var(--protocol-gold);
  color: var(--protocol-gold);
}

body.protocol-in-room.protocol-chrome-slim .protocol-bubble-spin,
body.protocol-in-room.protocol-locked .protocol-bubble-spin,
body.protocol-in-room.protocol-chrome-slim .protocol-top,
body.protocol-in-room.protocol-locked .protocol-top {
  opacity: 1;
  pointer-events: auto;
}

.protocol-controls a,
.protocol-controls button,
.protocol-tool-actions a,
.protocol-tool-actions button,
.protocol-directory a,
.protocol-more a,
.protocol-more button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 6px 10px;
  border: 1px solid var(--protocol-line);
  border-radius: 999px;
  background: rgba(8, 14, 12, 0.88);
  color: var(--protocol-ink);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.protocol-more {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  min-width: 196px;
  padding: 8px;
  border: 1px solid var(--protocol-line);
  border-radius: 14px;
  background: rgba(8, 14, 12, 0.94);
}

.protocol-more[hidden] { display: none !important; }

.protocol-more a,
.protocol-more button {
  justify-content: flex-start;
  min-height: 40px;
  border-radius: 10px;
}

@media (pointer: coarse) {
  .protocol-controls a,
  .protocol-controls button,
  .protocol-more a,
  .protocol-more button {
    min-height: 44px;
  }
}

.protocol-controls button.primary,
.protocol-tool-actions button.primary,
.protocol-directory a.primary {
  border-color: var(--protocol-gold);
  background: rgba(232, 198, 107, 0.16);
}

.protocol-crosshair {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border: 1px solid rgba(232, 198, 107, 0.8);
  border-radius: 50%;
  pointer-events: none;
  z-index: 5;
}

.protocol-touch {
  position: fixed;
  right: 16px;
  bottom: calc(88px + env(safe-area-inset-bottom));
  z-index: 7;
  display: none;
  grid-template-columns: repeat(3, 48px);
  gap: 6px;
}

.protocol-touch button,
.protocol-sit {
  min-height: 44px;
  min-width: 44px;
  border: 1px solid var(--protocol-line);
  border-radius: 10px;
  background: rgba(8, 14, 12, 0.82);
  color: var(--protocol-gold);
  font-weight: 800;
}

.protocol-thumbs {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(18px + env(safe-area-inset-bottom));
  z-index: 14;
  display: none;
  align-items: flex-end;
  justify-content: space-between;
  pointer-events: none;
  isolation: isolate;
}

.protocol-stick {
  pointer-events: auto;
  position: relative;
  width: 96px;
  height: 96px;
  opacity: 0.72;
  border: 1px solid var(--protocol-line);
  border-radius: 50%;
  background: rgba(8, 14, 12, 0.55);
  touch-action: none;
}

.protocol-stick i {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  border-radius: 50%;
  background: rgba(232, 198, 107, 0.85);
  pointer-events: none;
}

.protocol-stick span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -22px;
  text-align: center;
  font-size: 11px;
  color: var(--protocol-mute);
}

.protocol-sit {
  pointer-events: auto;
  margin-bottom: 28px;
  border-radius: 999px;
  padding: 10px 16px;
}

body[data-controls="thumbs"] .protocol-thumbs { display: flex; }
body[data-controls="thumbs"] .protocol-top {
  z-index: 16;
}
body[data-controls="thumbs"] .protocol-more {
  position: fixed;
  top: 56px;
  left: 8px;
  bottom: auto;
  max-height: calc(100svh - 56px - 148px - env(safe-area-inset-bottom));
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
body[data-controls="thumbs"] .protocol-hud {
  top: 52px;
  bottom: auto;
  left: 8px;
  right: 8px;
  max-width: none;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 6px;
}
body[data-controls="thumbs"] #protocol-hud {
  display: none;
}
body[data-controls="thumbs"] #protocol-place,
body[data-controls="thumbs"] #protocol-stage,
body[data-controls="thumbs"] #protocol-gate {
  max-width: min(46vw, 22ch);
}
body[data-controls="thumbs"] #protocol-link-form,
body[data-controls="thumbs"] #protocol-setup {
  bottom: calc(148px + env(safe-area-inset-bottom));
  max-height: min(46svh, 360px);
  overflow: auto;
}
body[data-controls="thumbs"] #protocol-captain {
  top: 8px;
  right: 8px;
  left: auto;
  transform: none;
  max-height: none;
}
body[data-controls="thumbs"] .protocol-crosshair,
body[data-controls="wasd"] .protocol-crosshair { display: none; }

@media (pointer: coarse) {
  .protocol-crosshair { display: none; }
  body[data-controls="wasd"] .protocol-touch { display: grid; }
  .protocol-hud {
    top: 52px;
    bottom: auto;
    left: 8px;
    right: 8px;
    max-width: none;
    flex-direction: row;
    flex-wrap: wrap;
  }
  #protocol-hud { display: none; }
  #protocol-link-form,
  #protocol-setup {
    bottom: calc(148px + env(safe-area-inset-bottom));
    max-height: min(46svh, 360px);
    overflow: auto;
  }
  #protocol-captain {
    top: 8px;
    right: 8px;
    left: auto;
    transform: none;
    max-height: none;
  }
}

body.protocol-chrome-slim .protocol-top,
body.protocol-chrome-slim .protocol-hud,
body.protocol-locked .protocol-top,
body.protocol-locked .protocol-hud {
  opacity: 0;
  pointer-events: none;
}

body.protocol-chrome-slim #protocol-captain,
body.protocol-locked #protocol-captain,
body.protocol-chrome-slim .protocol-ring,
body.protocol-locked .protocol-ring,
body.protocol-chrome-slim #protocol-ring-hint,
body.protocol-locked #protocol-ring-hint {
  opacity: 1;
  pointer-events: auto;
}
body.protocol-chrome-slim .protocol-top,
body.protocol-locked .protocol-top {
  opacity: 1;
}
body.protocol-chrome-slim .protocol-wordmark,
body.protocol-locked .protocol-wordmark,
body.protocol-chrome-slim #protocol-enter-look,
body.protocol-locked #protocol-enter-look,
body.protocol-chrome-slim #protocol-more-toggle,
body.protocol-locked #protocol-more-toggle {
  opacity: 0;
  pointer-events: none;
}

body.protocol-chrome-slim .protocol-top > *,
body.protocol-locked .protocol-top > *,
body.protocol-chrome-slim #protocol-gate a,
body.protocol-locked #protocol-gate a {
  pointer-events: none;
}
body.protocol-world #protocol-stage,
body.protocol-world #protocol-gate {
  display: none;
}
body.protocol-world .protocol-hud {
  max-width: min(42ch, calc(100vw - 24px));
}

.protocol-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.62);
}

body.protocol-world .protocol-overlay {
  place-items: end;
  justify-items: end;
  padding: 12px 12px 78px;
  background: transparent;
  pointer-events: none;
}

body.protocol-world .protocol-overlay .protocol-panel {
  pointer-events: auto;
  width: min(440px, calc(100vw - 24px));
  max-height: min(70svh, 720px);
}

@media (max-width: 800px) {
  body.protocol-world .protocol-hud { display: none; }
  .protocol-wordmark span { display: none; }
  .protocol-top {
    max-width: calc(100vw - 168px);
  }
  .protocol-ring {
    top: calc(8px + env(safe-area-inset-top));
    right: 8px;
    left: auto;
    bottom: auto;
    z-index: 24;
  }
  body.protocol-world .protocol-overlay {
    place-items: end center;
    padding: 0;
  }
  body.protocol-world .protocol-overlay .protocol-panel {
    width: 100%;
    max-height: 46svh;
    border-radius: 18px 18px 0 0;
  }
}

.protocol-overlay[hidden],
.protocol-directory[hidden],
.protocol-fallback[hidden] {
  display: none !important;
}

.protocol-panel {
  width: min(920px, 100%);
  max-height: min(88svh, 900px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 16px 18px 12px;
  border: 1px solid var(--protocol-line);
  border-radius: 18px;
  background: linear-gradient(180deg, #101816, #070b0a);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}
.protocol-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex: 0 0 auto;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--protocol-line);
}
.protocol-panel-head h2 {
  margin: 0;
  font-size: clamp(22px, 3vw, 32px);
}
.protocol-panel-close {
  flex: 0 0 auto;
  min-width: 44px;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--protocol-line);
  border-radius: 999px;
  background: rgba(8, 14, 12, 0.9);
  color: var(--protocol-ink);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.protocol-panel-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 12px 0;
}
.protocol-brain {
  margin: 0 0 12px;
  padding: 8px 10px;
  border: 1px solid var(--protocol-line);
  border-radius: 12px;
}
.protocol-brain summary {
  cursor: pointer;
  color: var(--protocol-gold);
  font-size: 13px;
  font-weight: 700;
}
.protocol-arrive-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.protocol-panel h2 {
  margin: 0 0 8px;
  font-family: Georgia, serif;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 500;
}

.protocol-lane {
  margin: 0 0 12px;
  color: var(--protocol-gold);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.protocol-sections {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 14px;
}
.protocol-sections button {
  min-height: 36px;
  padding: 6px 12px;
  border: 1px solid var(--protocol-gold);
  border-radius: 999px;
  background: transparent;
  color: var(--protocol-gold);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.protocol-sections button.primary {
  background: var(--protocol-gold);
  color: #041018;
}
.protocol-world-screen {
  position: fixed;
  inset: 4vh 4vw;
  z-index: 30;
  display: flex;
  align-items: stretch;
  justify-content: center;
  pointer-events: none;
  perspective: 1400px;
}
.protocol-world-bezel {
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  width: min(1200px, 100%);
  height: 100%;
  padding: 16px 16px 12px;
  border: 3px solid var(--protocol-gold);
  border-radius: 8px 8px 18px 18px;
  background: linear-gradient(180deg, rgba(18, 22, 28, 0.98), rgba(6, 10, 14, 0.96));
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55), 0 0 40px rgba(232, 198, 107, 0.22);
  transform: rotateX(1.2deg);
}
.protocol-world-bezel iframe,
.protocol-world-bezel video {
  flex: 1;
  width: 100%;
  min-height: 0;
  border: 1px solid var(--protocol-line);
  border-radius: 10px;
  background: #05090c;
}
.protocol-world-note {
  margin: 0 0 10px;
  color: var(--protocol-mute);
  font-size: 13px;
}
.protocol-panel .eyebrow {
  margin: 0 0 6px;
  color: var(--protocol-gold);
  letter-spacing: 0.22em;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.protocol-panel p.lead {
  margin: 0 0 18px;
  color: var(--protocol-mute);
  line-height: 1.6;
}

.protocol-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin: 16px 0;
}

.protocol-card {
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
}

.protocol-card strong { display: block; font-size: 18px; }
.protocol-card small { color: var(--protocol-mute); }

.protocol-form,
.brain-form {
  display: grid;
  gap: 10px;
  margin: 14px 0;
}

.protocol-form label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: var(--protocol-mute);
}

.protocol-form input,
.protocol-form select {
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--protocol-line);
  border-radius: 10px;
  background: #050807;
  color: var(--protocol-ink);
  font: inherit;
}

.protocol-chat {
  max-height: 280px;
  overflow: auto;
  margin: 0 0 12px;
  padding: 12px;
  border: 1px solid rgba(74, 210, 255, 0.28);
  border-radius: 12px;
  background: #05090c;
}

.protocol-chat p {
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 1.5;
}

.protocol-chat-assistant { color: #b8f3ff; }
.protocol-chat-user { color: var(--protocol-ink); }

.protocol-setup {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}

.protocol-log,
.protocol-pre {
  margin: 12px 0 0;
  padding: 12px;
  border-radius: 10px;
  background: #050807;
  color: #c9d4cc;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.protocol-tool-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 0;
  flex: 0 0 auto;
  padding-top: 10px;
  background: #070b0a;
}

.protocol-directory {
  position: fixed;
  inset: 0;
  z-index: 18;
  overflow: auto;
  padding: 72px 18px 32px;
  background:
    radial-gradient(circle at 50% 18%, rgba(232, 198, 107, 0.12), transparent 28%),
    rgba(2, 5, 4, 0.94);
}

.protocol-directory h1 {
  margin: 0 auto 10px;
  max-width: 920px;
  font-family: Georgia, serif;
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 500;
}

.protocol-directory > p {
  max-width: 920px;
  margin: 0 auto 22px;
  color: var(--protocol-mute);
}

.protocol-directory-kind {
  max-width: 920px;
  margin: 28px auto 10px;
  color: var(--protocol-gold);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.protocol-directory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  max-width: 920px;
  margin: 0 auto 8px;
}

.protocol-directory article {
  padding: 16px;
  border: 1px solid var(--protocol-line);
  border-radius: 16px;
  background: rgba(16, 24, 22, 0.88);
}

.protocol-directory article h2 {
  margin: 0 0 6px;
  font-size: 18px;
}

.protocol-kind {
  display: inline-block;
  margin: 0 0 8px;
  padding: 2px 8px;
  border: 1px solid var(--protocol-line);
  border-radius: 999px;
  color: var(--protocol-mute);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.protocol-fallback {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 32px 18px;
  text-align: center;
}

.protocol-ships {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.protocol-ships figure {
  margin: 0;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: #080c0b;
}

.protocol-ships img {
  display: block;
  width: 100%;
  height: auto;
}

.protocol-bubble-map {
  display: block;
  width: 100%;
  max-width: 640px;
  height: auto;
  margin: 8px 0 12px;
  border: 1px solid var(--protocol-line);
  border-radius: 12px;
  background: #05090c;
}

.protocol-fleet-host { margin: 8px 0 16px; }
.protocol-fleet-board { display: grid; gap: 8px; margin-top: 10px; }
.protocol-fleet-row {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}
.protocol-fleet-swatch {
  display: block;
  width: 12px;
  height: 12px;
  margin-top: 4px;
  border-radius: 50%;
}
.protocol-fleet-row strong { display: block; font-size: 14px; }
.protocol-fleet-row small { display: block; color: var(--protocol-mute); font-size: 12px; }
.protocol-fleet-track {
  display: block;
  height: 8px;
  margin-top: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}
.protocol-fleet-fill { display: block; height: 100%; border-radius: inherit; }

.protocol-ships figcaption {
  margin-top: 6px;
  font-size: 11px;
  color: var(--protocol-mute);
}

.fleet-ships {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.fleet-ships figure {
  margin: 0;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: #080c0b;
}

.fleet-ships img {
  display: block;
  width: 100%;
  height: auto;
}

.fleet-ships figcaption {
  margin-top: 6px;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.fleet-ships p {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--protocol-mute, #9aa79f);
}

.fleet-ships figure.is-aboard {
  border-color: rgba(212, 180, 106, 0.7);
}

.fleet-ships figure.is-away {
  opacity: 0.45;
}

.fleet-coins {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin: 8px 0 16px;
}

.fleet-coins article {
  padding: 12px;
  border: 1px solid rgba(212, 180, 106, 0.35);
  border-radius: 12px;
  background: rgba(7, 9, 14, 0.6);
}

.fleet-coins small {
  display: block;
  color: #d4b46a;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.fleet-coins strong {
  display: block;
  margin-top: 4px;
  font-size: 22px;
}

.fleet-coins em {
  display: block;
  margin-top: 4px;
  color: var(--protocol-mute, #9aa79f);
  font-size: 12px;
  font-style: normal;
}

.fleet-duty {
  margin: 0 0 14px;
  color: #d4b46a;
}

body.protocol-in-room .protocol-overlay {
  padding-bottom: 96px;
}

@media (prefers-reduced-motion: reduce) {
  #protocol-canvas { display: none; }
}
