:root {
  --bg: #efe6da;
  --ink: #2d241a;
  --panel: rgba(255, 251, 246, 0.86);
  --panel-border: rgba(128, 96, 62, 0.16);
  --panel-shadow: 0 18px 50px rgba(60, 42, 23, 0.16);
  --accent: #c17734;
  --accent-deep: #7a4e27;
  --accent-soft: rgba(193, 119, 52, 0.16);
  --teal-soft: rgba(78, 126, 132, 0.14);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100dvh;
  min-height: 100dvh;
  overflow: hidden;
}

body {
  font-family: "Avenir Next", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(214, 186, 146, 0.26), transparent 26%),
    radial-gradient(circle at bottom right, rgba(108, 142, 151, 0.16), transparent 24%),
    linear-gradient(180deg, #f6f0e8, var(--bg));
}

button,
input,
select {
  font: inherit;
}

.work-shell,
.work-viewport {
  position: relative;
  width: 100%;
  height: 100dvh;
  min-height: 100dvh;
}

.map-canvas {
  display: block;
  width: 100%;
  height: 100dvh;
  min-height: 100dvh;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.52), rgba(255, 255, 255, 0) 34%),
    linear-gradient(180deg, #efe7dc, #e7dbca);
  touch-action: none;
}

.work-loading {
  position: absolute;
  inset: 0;
  z-index: 18;
  overflow: hidden;
  padding: 20px;
  color: rgba(255, 255, 255, 0.92);
  background:
    radial-gradient(circle at 50% 46%, rgba(255, 255, 255, 0.04), transparent 22%),
    linear-gradient(180deg, rgba(6, 7, 9, 0.96), rgba(1, 1, 2, 0.985));
  backdrop-filter: blur(10px);
}

.work-loading[hidden] {
  display: none !important;
}

.work-loading::before,
.work-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.work-loading::before {
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.12) 0 0.6px, transparent 0.8px) 0 0 / 46px 46px,
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.022) 0 1px, rgba(255, 255, 255, 0) 1px 6px);
  opacity: 0.28;
}

.work-loading::after {
  background:
    radial-gradient(circle at center, transparent 0 34%, rgba(0, 0, 0, 0.18) 62%, rgba(0, 0, 0, 0.56) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.015), rgba(255, 255, 255, 0));
}

@keyframes workLoadingFrameSpin {
  from {
    transform: translate(-50%, -50%) rotate(45deg);
  }
  to {
    transform: translate(-50%, -50%) rotate(405deg);
  }
}

@keyframes workLoadingCorePulse {
  0%,
  100% {
    opacity: 0.72;
    box-shadow:
      inset 0 0 0 1px rgba(255, 255, 255, 0.84),
      0 0 16px rgba(255, 255, 255, 0.06);
  }
  50% {
    opacity: 1;
    box-shadow:
      inset 0 0 0 1px rgba(255, 255, 255, 0.96),
      0 0 18px rgba(255, 255, 255, 0.12);
  }
}

.work-auth-gate {
  position: absolute;
  inset: 0;
  z-index: 17;
  display: grid;
  place-items: center;
  padding: 56px 32px 92px;
  cursor: default;
  overflow: hidden;
}

.work-auth-gate.is-auth-exiting {
  pointer-events: none;
}

.work-auth-gate[hidden] {
  display: none !important;
}

.work-auth-gate-scrim {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 46%, rgba(255, 255, 255, 0.03), transparent 22%),
    linear-gradient(180deg, rgba(4, 4, 5, 0.82), rgba(4, 4, 5, 0.76) 36%, rgba(4, 4, 5, 0.88));
  backdrop-filter: blur(2px);
  transition: opacity 1500ms cubic-bezier(0.22, 1, 0.36, 1), backdrop-filter 1500ms cubic-bezier(0.22, 1, 0.36, 1);
}

.work-auth-gate-scrim::before,
.work-auth-gate-scrim::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.work-auth-gate-scrim::before {
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.08) 0 0.8px, transparent 1px) 0 0 / 10px 10px,
    linear-gradient(180deg, rgba(255, 255, 255, 0.015), rgba(255, 255, 255, 0));
  opacity: 0.22;
}

.work-auth-gate-scrim::after {
  background:
    radial-gradient(circle at center, transparent 0 26%, rgba(0, 0, 0, 0.22) 58%, rgba(0, 0, 0, 0.62) 100%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.8), transparent 14%, transparent 86%, rgba(0, 0, 0, 0.8));
  opacity: 1;
}

.work-auth-gate-noise,
.work-auth-gate-column,
.work-auth-gate-stage-frame {
  position: absolute;
  pointer-events: none;
}

.work-auth-gate-noise {
  inset: 0;
  opacity: 0.06;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent 20%, transparent 80%, rgba(255, 255, 255, 0.08)),
    radial-gradient(circle, rgba(255, 255, 255, 0.72) 0 0.7px, transparent 0.9px) 0 0 / 12px 12px;
  mix-blend-mode: screen;
  transition: opacity 1100ms cubic-bezier(0.22, 1, 0.36, 1);
}

.work-auth-gate-column {
  top: 58px;
  bottom: 86px;
  width: min(20vw, 196px);
  opacity: 0.22;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02) 38%, rgba(255, 255, 255, 0.08)),
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.18) 0 1px,
      rgba(255, 255, 255, 0) 1px 6px
    );
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    0 0 24px rgba(0, 0, 0, 0.26);
  transition: opacity 1100ms cubic-bezier(0.22, 1, 0.36, 1), transform 1100ms cubic-bezier(0.22, 1, 0.36, 1);
}

.work-auth-gate-column::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 40%;
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.4);
}

.work-auth-gate-column-left {
  left: 0;
}

.work-auth-gate-column-right {
  right: 0;
}

.work-auth-gate-stage-frame {
  left: 50%;
  top: 50%;
  width: min(64vw, 690px);
  height: min(74vh, 620px);
  transform: translate(-50%, -48%);
  border: 1px solid rgba(255, 255, 255, 0.05);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.012), rgba(255, 255, 255, 0.004)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018), transparent 14%, transparent 86%, rgba(255, 255, 255, 0.018));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.02),
    0 40px 90px rgba(0, 0, 0, 0.32);
  opacity: 0;
  transition: opacity 820ms cubic-bezier(0.22, 1, 0.36, 1), transform 1100ms cubic-bezier(0.22, 1, 0.36, 1);
}

.work-auth-gate.is-dialog-open .work-auth-gate-stage-frame {
  opacity: 1;
}

@keyframes workAuthLoaderSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes workAuthLoaderPulse {
  0%,
  100% {
    opacity: 0.48;
    transform: scale(0.92);
  }
  50% {
    opacity: 0.92;
    transform: scale(1);
  }
}

.work-auth-gate-stage-frame::before,
.work-auth-gate-stage-frame::after {
  content: "";
  position: absolute;
  inset: 0;
}

.work-auth-gate-stage-frame::before {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 12%, transparent 88%, rgba(255, 255, 255, 0.02)),
    linear-gradient(90deg, transparent 0 28%, rgba(255, 255, 255, 0.035) 50%, transparent 72% 100%);
  opacity: 0.8;
}

.work-auth-gate-stage-frame::after {
  inset: 7%;
  background:
    radial-gradient(circle at 50% 44%, rgba(255, 255, 255, 0.08), transparent 20%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.16) 18%, rgba(0, 0, 0, 0.58) 100%);
  clip-path: polygon(18% 0, 82% 0, 88% 6%, 88% 94%, 82% 100%, 18% 100%, 12% 94%, 12% 6%);
  opacity: 0.42;
}

.work-auth-gate-nav {
  position: absolute;
  inset: 0 0 auto;
  z-index: 1;
  height: 54px;
  pointer-events: none;
}

.work-auth-gate-nav-shell {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  width: min(100%, 1280px);
  height: 100%;
  margin: 0 auto;
  padding: 0 28px;
  background: rgba(4, 4, 6, 0.92);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.26);
  pointer-events: auto;
  transform-origin: center top;
  transition:
    opacity 760ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 760ms cubic-bezier(0.22, 1, 0.36, 1),
    border-color 760ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 760ms cubic-bezier(0.22, 1, 0.36, 1);
}

.work-auth-gate-nav-brand {
  display: inline-flex;
  align-items: center;
  height: 100%;
  min-width: 0;
  justify-self: start;
  font: 600 12px/1 "JetBrains Mono", "Cascadia Code", monospace;
  letter-spacing: 0.26em;
  color: rgba(255, 255, 255, 0.94);
  text-transform: uppercase;
}

.work-auth-gate-nav-menu {
  display: inline-flex;
  align-items: center;
  justify-self: center;
  gap: 26px;
}

.work-auth-gate-nav-link {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.1em;
  text-align: center;
  cursor: default;
  transition: color 160ms ease, opacity 160ms ease;
}

.work-auth-gate-nav-link.is-active,
.work-auth-gate-nav-link:hover,
.work-auth-gate-nav-link:focus-visible {
  color: rgba(255, 255, 255, 0.92);
}

.work-auth-gate-nav-utility {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
}

.work-auth-gate-nav-utility span {
  display: block;
  width: 14px;
  height: 1px;
  background: rgba(255, 255, 255, 0.46);
}

.work-auth-home-stage {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: min(100%, 980px);
  min-height: min(72vh, 620px);
  padding-top: 18px;
  text-align: center;
  transition: opacity 920ms cubic-bezier(0.22, 1, 0.36, 1), transform 920ms cubic-bezier(0.22, 1, 0.36, 1), filter 920ms cubic-bezier(0.22, 1, 0.36, 1);
}

.work-auth-home-stage[hidden] {
  display: none !important;
}

.work-auth-home-copy {
  display: grid;
  justify-items: center;
  gap: 18px;
  margin-top: -14px;
  transition: opacity 920ms cubic-bezier(0.22, 1, 0.36, 1), transform 920ms cubic-bezier(0.22, 1, 0.36, 1), filter 920ms cubic-bezier(0.22, 1, 0.36, 1);
}

.work-auth-home-kicker {
  font: 500 12px/1.4 "JetBrains Mono", "Cascadia Code", monospace;
  line-height: 1.2;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.38);
}

.work-auth-home-title {
  margin: 0;
  color: rgba(255, 255, 255, 0.94);
  max-width: min(92vw, 640px);
  font: 300 clamp(36px, 5vw, 64px)/1.08 "Avenir Next", "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.work-auth-entry-button {
  position: relative;
  z-index: 2;
  min-width: 198px;
  min-height: 46px;
  padding: 0 30px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: rgba(7, 7, 8, 0.82);
  box-shadow:
    0 18px 34px rgba(0, 0, 0, 0.24),
    inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.94);
  font: 600 12px/1 "JetBrains Mono", "Cascadia Code", monospace;
  letter-spacing: 0.2em;
  cursor: pointer;
  transition:
    background 180ms ease,
    transform 760ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 760ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 760ms cubic-bezier(0.22, 1, 0.36, 1),
    filter 760ms cubic-bezier(0.22, 1, 0.36, 1);
}

.work-auth-entry-button::after {
  content: none;
}

.work-auth-entry-button:hover,
.work-auth-entry-button:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.28),
    inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.work-auth-entry-button[hidden] {
  display: none !important;
}

.work-auth-gate-meta,
.work-auth-gate-footer {
  position: absolute;
  left: 50%;
  z-index: 1;
  display: grid;
  justify-items: center;
  pointer-events: none;
  text-align: center;
  transform: translateX(-50%);
}

.work-auth-gate-meta {
  bottom: 54px;
  grid-auto-flow: column;
  gap: 20px;
  color: rgba(255, 255, 255, 0.28);
  font: 600 9px/1 "JetBrains Mono", "Cascadia Code", monospace;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: opacity 1040ms cubic-bezier(0.22, 1, 0.36, 1), transform 1040ms cubic-bezier(0.22, 1, 0.36, 1), filter 1040ms cubic-bezier(0.22, 1, 0.36, 1);
}

.work-auth-gate-footer {
  bottom: 18px;
  gap: 4px;
  color: rgba(255, 255, 255, 0.28);
  transition: opacity 1120ms cubic-bezier(0.22, 1, 0.36, 1), transform 1120ms cubic-bezier(0.22, 1, 0.36, 1), filter 1120ms cubic-bezier(0.22, 1, 0.36, 1);
}

.work-auth-gate-footer[hidden] {
  display: none !important;
}

.work-auth-gate-footer span {
  display: block;
  font-size: 9px;
  line-height: 1.4;
  letter-spacing: 0.1em;
}

.work-auth-gate-dialog {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: min(380px, calc(100vw - 40px));
  color: #f1f1f1;
  cursor: default;
  transition: opacity 920ms cubic-bezier(0.22, 1, 0.36, 1), transform 920ms cubic-bezier(0.22, 1, 0.36, 1), filter 920ms cubic-bezier(0.22, 1, 0.36, 1);
}

.work-auth-gate-dialog[hidden] {
  display: none !important;
}

.work-auth-card {
  position: relative;
  width: 100%;
  padding: 32px 28px 26px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background:
    linear-gradient(180deg, rgba(9, 9, 11, 0.92), rgba(4, 4, 5, 0.96));
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.38),
    inset 0 0 0 1px rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(12px);
  transition: transform 920ms cubic-bezier(0.22, 1, 0.36, 1), opacity 920ms cubic-bezier(0.22, 1, 0.36, 1), filter 920ms cubic-bezier(0.22, 1, 0.36, 1);
}

.work-auth-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.028), transparent 12%, transparent 88%, rgba(255, 255, 255, 0.02));
  pointer-events: none;
}

.work-auth-card::after {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(255, 255, 255, 0.03);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.016), transparent 30%);
  pointer-events: none;
  opacity: 0.7;
}

.work-auth-gate.is-auth-exiting .work-auth-gate-scrim {
  opacity: 0;
  backdrop-filter: blur(0);
}

.work-auth-gate.is-auth-exiting .work-auth-gate-noise {
  opacity: 0;
}

.work-auth-gate.is-auth-exiting .work-auth-gate-column {
  opacity: 0;
  transform: translateY(-54px) scaleY(0.86);
}

.work-auth-gate.is-auth-exiting .work-auth-gate-stage-frame {
  opacity: 0;
  transform: translate(-50%, -51%) scale(0.94);
}

.work-auth-gate.is-auth-exiting .work-auth-gate-nav-shell {
  opacity: 0;
  transform: translateY(-30px) scale(0.88);
  border-color: rgba(255, 255, 255, 0.02);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
}

.work-auth-gate.is-auth-exiting .work-auth-home-stage,
.work-auth-gate.is-auth-exiting .work-auth-home-copy,
.work-auth-gate.is-auth-exiting .work-auth-gate-dialog {
  opacity: 0;
  transform: translateY(-22px) scale(0.96);
  filter: blur(8px);
}

.work-auth-gate.is-auth-exiting .work-auth-gate-meta,
.work-auth-gate.is-auth-exiting .work-auth-gate-footer {
  opacity: 0;
  transform: translateX(-50%) translateY(-22px) scale(0.96);
  filter: blur(8px);
}

.work-auth-gate.is-auth-exiting .work-auth-card,
.work-auth-gate.is-auth-exiting .work-auth-entry-button {
  opacity: 0;
  transform: translateY(-16px) scale(0.95);
  filter: blur(8px);
}

.work-auth-gate-kicker {
  font: 700 11px/1 "JetBrains Mono", "Cascadia Code", monospace;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.34);
  text-transform: uppercase;
}

.work-auth-gate-head {
  display: block;
  margin-top: 10px;
}

.work-auth-gate-copy {
  display: grid;
  gap: 10px;
}

.work-auth-gate-title {
  display: block;
  font: 400 26px/1.08 "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.92);
}

.work-auth-gate-subtitle {
  margin: 0;
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
  line-height: 1.7;
}

.work-auth-message {
  margin-top: 18px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 120, 120, 0.18);
  background: rgba(28, 8, 8, 0.78);
  color: rgba(255, 212, 212, 0.86);
  font: 500 11px/1.65 "JetBrains Mono", "Cascadia Code", monospace;
}

.work-auth-message[data-tone="success"] {
  border-color: rgba(182, 255, 197, 0.16);
  background: rgba(18, 44, 24, 0.42);
  color: rgba(216, 255, 224, 0.9);
}

.work-auth-message[data-tone="info"] {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.82);
}

.work-auth-form,
.work-auth-locked {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}

.work-auth-locked[hidden] {
  display: none !important;
}

.work-auth-field {
  display: grid;
  gap: 10px;
}

.work-auth-field span {
  color: rgba(255, 255, 255, 0.28);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.work-auth-field-hint {
  color: rgba(255, 255, 255, 0.34);
  font-size: 10px;
  line-height: 1.6;
}

.work-auth-field input {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(2, 2, 2, 0.88);
  color: rgba(255, 255, 255, 0.92);
  outline: none;
  font: 500 12px/1.4 "JetBrains Mono", "Cascadia Code", monospace;
  letter-spacing: 0.03em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.015);
}

.work-auth-field input::placeholder {
  color: rgba(255, 255, 255, 0.18);
}

.work-auth-field input:focus {
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04),
    0 0 24px rgba(0, 0, 0, 0.22);
}

.work-auth-agreement {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 2px 0 0;
  color: rgba(255, 255, 255, 0.4);
  font: 500 10px/1.7 "JetBrains Mono", "Cascadia Code", monospace;
  letter-spacing: 0.02em;
}

.work-auth-agreement input {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  margin: 2px 0 0;
  accent-color: #ffffff;
}

.work-auth-agreement span {
  display: block;
}

.work-auth-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  margin-top: 6px;
}

.work-auth-submit,
.work-auth-ghost {
  min-height: 44px;
  border: 0;
  border-radius: 0;
  cursor: pointer;
  font-weight: 700;
}

.work-auth-submit {
  border: 1px solid rgba(255, 255, 255, 0.76);
  background: rgba(248, 248, 248, 0.92);
  color: #080808;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  box-shadow:
    0 10px 22px rgba(0, 0, 0, 0.16);
}

.work-auth-submit:hover,
.work-auth-submit:focus-visible {
  background: rgba(255, 255, 255, 1);
}

.work-auth-ghost {
  background: rgba(255, 255, 255, 0.05);
  color: #f7fbff;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.work-auth-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
  color: rgba(255, 255, 255, 0.22);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

@media (max-width: 900px) {
  .work-auth-gate-stage-frame {
    display: none;
  }

  .work-auth-gate-nav {
    inset: 14px 14px auto;
    height: auto;
  }

  .work-auth-gate-nav-shell {
    position: relative;
    width: 100%;
    min-height: 48px;
    padding: 0 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    background: rgba(6, 6, 8, 0.88);
    backdrop-filter: blur(14px);
  }

  .work-auth-gate-nav-brand {
    font-size: 10px;
    letter-spacing: 0.26em;
  }

  .work-auth-gate-nav-menu {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 10px);
    display: grid;
    gap: 0;
    padding: 8px 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    background: rgba(7, 7, 8, 0.94);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.28);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    pointer-events: none;
    transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
  }

  .work-auth-gate.is-mobile-nav-open .work-auth-gate-nav-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
  }

  .work-auth-gate-nav-link {
    min-height: 42px;
    justify-content: flex-start;
    padding: 0 16px;
  }

  .work-auth-gate-nav-utility {
    display: inline-flex;
    flex-direction: column;
    gap: 4px;
    justify-self: end;
  }

  .work-auth-gate-column {
    width: 92px;
  }

  .work-auth-gate-meta {
    bottom: 58px;
    font-size: 8px;
  }

  .work-auth-gate-footer {
    bottom: 14px;
  }

  .work-auth-gate-footer span {
    font-size: 9px;
  }

  .work-auth-entry-button {
    min-width: 184px;
    font-size: 11px;
  }
}

.work-auth-link {
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.42);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
}

.work-auth-link:hover,
.work-auth-link:focus-visible {
  color: rgba(255, 255, 255, 0.72);
}

.work-auth-card-footer-note {
  color: rgba(255, 255, 255, 0.26);
  font-size: 9px;
  letter-spacing: 0.12em;
}

.work-auth-locked strong {
  font-size: 18px;
}

.work-auth-locked p {
  margin: 0;
  color: rgba(255, 255, 255, 0.66);
  line-height: 1.65;
}

@media (max-width: 640px) {
  .work-auth-gate {
    padding: 50px 18px 84px;
  }

  .work-auth-gate-nav {
    inset: 14px 14px auto;
  }

  .work-auth-gate-column {
    display: none;
  }

  .work-auth-home-stage {
    min-height: min(68vh, 520px);
  }

  .work-auth-home-copy {
    gap: 14px;
  }

  .work-auth-home-kicker {
    font-size: 10px;
    letter-spacing: 0.08em;
  }

  .work-auth-home-title {
    font-size: clamp(28px, 8vw, 40px);
    line-height: 1.14;
    letter-spacing: 0.05em;
  }

  .work-auth-gate-dialog {
    width: min(100%, 352px);
  }

  .work-auth-card {
    padding: 24px 18px 22px;
  }

  .work-auth-gate-title {
    font-size: 22px;
  }

  .work-auth-card-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .work-auth-gate-meta {
    width: calc(100% - 32px);
    grid-auto-flow: row;
    gap: 8px;
  }

  .work-auth-gate-footer span {
    font-size: 8px;
    letter-spacing: 0.1em;
  }

}

.work-loading-shell {
  position: relative;
  width: min(100%, 1180px);
  height: min(100%, 820px);
  margin: 0 auto;
}

.work-loading-shell::before,
.work-loading-shell::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border-color: rgba(255, 255, 255, 0.28);
  pointer-events: none;
}

.work-loading-shell::before {
  right: 8px;
  top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.28);
  border-right: 1px solid rgba(255, 255, 255, 0.28);
}

.work-loading-shell::after {
  left: 8px;
  bottom: 8px;
  border-left: 1px solid rgba(255, 255, 255, 0.28);
  border-bottom: 1px solid rgba(255, 255, 255, 0.28);
}

.work-loading-brand-block {
  position: absolute;
  top: 20px;
  left: 18px;
  display: grid;
  gap: 8px;
}

.work-loading-brand {
  font: 600 14px/1 "JetBrains Mono", "Cascadia Code", monospace;
  letter-spacing: 0.42em;
  color: rgba(255, 255, 255, 0.86);
  text-transform: uppercase;
}

.work-loading-brand-sub {
  font: 400 10px/1 "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0.16em;
  color: rgba(255, 255, 255, 0.42);
}

.work-loading-card {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(100%, 430px);
  display: grid;
  justify-items: center;
  transform: translate(-50%, -44%);
}

.work-loading-loader {
  position: relative;
  width: 156px;
  height: 156px;
}

.work-loading-loader-outer,
.work-loading-loader-tilt,
.work-loading-loader-core {
  position: absolute;
  left: 50%;
  top: 50%;
  display: block;
}

.work-loading-loader-outer {
  width: 148px;
  height: 148px;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.work-loading-loader-tilt {
  width: 96px;
  height: 96px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  animation: workLoadingFrameSpin 8s linear infinite;
}

.work-loading-loader-core {
  width: 74px;
  height: 74px;
  transform: translate(-50%, -50%);
  border: 2px solid rgba(255, 255, 255, 0.86);
  animation: workLoadingCorePulse 1.85s ease-in-out infinite;
}

.work-loading-percent {
  font: 600 18px/1 "JetBrains Mono", "Cascadia Code", monospace;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.72);
}

.work-loading-title {
  display: block;
  margin-top: 28px;
  font: 500 24px/1.2 "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0.36em;
  text-indent: 0.36em;
  color: rgba(255, 255, 255, 0.9);
  text-align: center;
}

.work-loading-detail {
  margin: 10px 0 0;
  min-height: 18px;
  color: rgba(255, 255, 255, 0.26);
  font: 500 10px/1.6 "JetBrains Mono", "Cascadia Code", monospace;
  letter-spacing: 0.14em;
  text-align: center;
}

.work-loading-track {
  position: relative;
  margin-top: 14px;
  width: 100%;
  height: 1px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.12);
}

.work-loading-bar {
  position: absolute;
  inset: 0 auto 0 0;
  width: 100%;
  transform-origin: left center;
  transform: scaleX(0);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.56));
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.16);
  transition: transform 220ms ease;
}

.work-loading-status {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 18px;
}

.work-loading-status-item {
  display: grid;
  gap: 6px;
}

.work-loading-status-item-right {
  justify-items: end;
  text-align: right;
}

.work-loading-status-label {
  color: rgba(255, 255, 255, 0.2);
  font: 500 10px/1 "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0.12em;
}

.work-loading-status-value {
  color: rgba(255, 255, 255, 0.56);
  font: 500 12px/1.2 "JetBrains Mono", "Cascadia Code", monospace;
  letter-spacing: 0.06em;
}

.work-loading-meta {
  margin-top: 12px;
  min-height: 16px;
  color: rgba(255, 255, 255, 0.18);
  font: 500 10px/1.5 "JetBrains Mono", "Cascadia Code", monospace;
  letter-spacing: 0.08em;
  text-align: center;
}

.work-loading-footer {
  position: absolute;
  left: 50%;
  bottom: 24px;
  display: inline-flex;
  align-items: center;
  gap: 16px;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.22);
  font: 600 9px/1 "JetBrains Mono", "Cascadia Code", monospace;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.work-loading-version {
  position: absolute;
  right: 18px;
  bottom: 20px;
  color: rgba(255, 255, 255, 0.16);
  font: 500 9px/1.5 "JetBrains Mono", "PingFang SC", sans-serif;
  letter-spacing: 0.12em;
  text-align: right;
}

.work-panel {
  position: absolute;
  z-index: 3;
  border-radius: 24px;
  border: 1px solid var(--panel-border);
  background: var(--panel);
  box-shadow: var(--panel-shadow);
  backdrop-filter: blur(16px);
}

.work-panel-primary {
  top: 18px;
  left: 18px;
  width: min(360px, calc(100vw - 36px));
  padding: 16px 18px;
}

.work-panel-primary h1 {
  margin: 6px 0 0;
  font-size: 28px;
  line-height: 1.04;
}

.work-panel-meta {
  top: 18px;
  right: 18px;
  width: min(420px, calc(100vw - 36px));
  padding: 14px 16px;
}

.work-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.work-meta-item {
  border-radius: 18px;
  border: 1px solid rgba(160, 130, 96, 0.14);
  background: rgba(255, 255, 255, 0.48);
  padding: 12px 13px;
}

.work-meta-item span {
  display: block;
  font-size: 12px;
  color: #7a634b;
}

.work-meta-item strong {
  display: block;
  margin-top: 5px;
  font-size: 14px;
  line-height: 1.45;
}

.work-panel-controls {
  left: 18px;
  bottom: 18px;
  width: min(360px, calc(100vw - 36px));
  padding: 16px 18px;
  display: none !important;
  gap: 10px;
}

.roam-work-badge {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 6;
  width: min(378px, calc(100vw - 36px));
  min-height: 122px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 122px;
  gap: 16px;
  padding: 18px 19px 18px 22px;
  border-radius: 16px;
  border: 1px solid rgba(136, 147, 164, 0.18);
  background: rgba(255, 255, 255, 0.96);
  box-shadow:
    0 22px 48px rgba(20, 30, 46, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  pointer-events: auto;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  transition: opacity 820ms cubic-bezier(0.22, 1, 0.36, 1) 220ms, transform 820ms cubic-bezier(0.22, 1, 0.36, 1) 220ms, filter 820ms cubic-bezier(0.22, 1, 0.36, 1) 220ms;
}

.roam-work-badge[hidden] {
  display: none !important;
}

.roam-work-badge::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(99, 125, 175, 0.08), transparent 44%),
    radial-gradient(circle at top right, rgba(94, 197, 187, 0.08), transparent 30%);
  pointer-events: none;
}

.roam-work-badge::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 14px;
  height: 6px;
  border-radius: 999px;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(124, 143, 171, 0.22) 0 8px,
      rgba(124, 143, 171, 0.04) 8px 12px
    );
  opacity: 0.62;
}

.roam-work-badge-copy,
.roam-work-badge-portrait {
  position: relative;
  z-index: 1;
}

.roam-work-badge-copy {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
}

.roam-work-badge-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.roam-work-badge-topline-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.roam-work-badge-brand {
  font: 700 11px/1 "JetBrains Mono", "Cascadia Code", monospace;
  letter-spacing: 0.18em;
  color: rgba(102, 68, 39, 0.78);
}

.roam-work-badge-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(55, 101, 87, 0.14);
  color: #2f5e50;
  font: 700 10px/1 "JetBrains Mono", "Cascadia Code", monospace;
  letter-spacing: 0.14em;
}

.roam-work-badge-fps {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 62px;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(24, 35, 56, 0.08);
  color: #314257;
  font: 700 10px/1 "JetBrains Mono", "Cascadia Code", monospace;
  letter-spacing: 0.1em;
}

.roam-work-badge-status[data-state="syncing"] {
  background: rgba(193, 119, 52, 0.16);
  color: #8a5426;
}

.roam-work-badge-status[data-state="offline"] {
  background: rgba(112, 90, 67, 0.14);
  color: #725743;
}

.roam-work-badge-name {
  display: block;
  margin-top: 2px;
  padding-right: 6px;
  min-width: 0;
  max-width: 100%;
  font-size: 24px;
  line-height: 1.02;
  color: #2f2418;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.roam-work-badge-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: baseline;
  gap: 10px;
}

.roam-work-badge-row span {
  font-size: 12px;
  color: #81654c;
}

.roam-work-badge-row strong {
  min-width: 0;
  font-size: 13px;
  line-height: 1.4;
  color: #453220;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.roam-work-badge-portrait {
  display: grid;
  align-items: center;
  justify-items: end;
}

.roam-work-badge-avatar {
  --badge-avatar-hue: 28;
  position: relative;
  width: 98px;
  height: 98px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1.5px solid rgba(0, 0, 0, 0.72);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.92), transparent 36%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(240, 244, 250, 0.96));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 12px 24px rgba(35, 50, 72, 0.12);
}

.roam-work-badge-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 13px;
}

.roam-work-badge-avatar span {
  position: relative;
  z-index: 1;
  font: 700 28px/1 "Avenir Next", "PingFang SC", sans-serif;
  color: rgba(53, 32, 17, 0.9);
  letter-spacing: 0.06em;
  transition: opacity 160ms ease;
}

.roam-work-badge-avatar.has-model span {
  opacity: 0;
}

.work-eyebrow {
  font: 700 12px/1 "JetBrains Mono", "Cascadia Code", monospace;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-deep);
}

.work-status {
  margin-top: 10px;
  min-height: 22px;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: #5c3f22;
  font-size: 13px;
  line-height: 1.45;
}

.camera-mode-summary {
  margin-top: 10px;
  color: #6d5841;
  font-size: 13px;
  line-height: 1.55;
}

.field-row {
  display: grid;
  gap: 6px;
}

.field-row span {
  font-size: 12px;
  color: #705a43;
}

.field-row input,
.field-row select {
  width: 100%;
  height: 40px;
  border-radius: 14px;
  border: 1px solid rgba(145, 111, 75, 0.2);
  background: rgba(255, 255, 255, 0.72);
  padding: 0 13px;
  color: var(--ink);
}

.field-row input:focus,
.field-row select:focus {
  outline: 2px solid rgba(193, 119, 52, 0.18);
  border-color: rgba(193, 119, 52, 0.34);
}

.map-face-overlay-renderer {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.map-face-overlay-renderer > div {
  overflow: hidden;
}

.map-program-surface {
  position: relative;
  overflow: hidden;
  border-radius: 2px;
  background: #f5efe6;
  box-shadow: inset 0 0 0 1px rgba(109, 81, 52, 0.08);
  transform-style: preserve-3d;
  backface-visibility: hidden;
  pointer-events: none;
}

.map-program-surface iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #f5efe6;
  pointer-events: none;
}

.viewport-hint,
.roam-hud {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 12px;
  line-height: 1.3;
  backdrop-filter: blur(10px);
  pointer-events: none;
  transition: opacity 420ms ease, transform 420ms ease, filter 420ms ease;
}

.work-viewport.is-auth-transitioning .roam-work-badge,
.work-viewport.is-auth-transitioning .viewport-hint,
.work-viewport.is-auth-transitioning .roam-hud {
  opacity: 0;
  filter: blur(8px);
}

.work-viewport.is-auth-transitioning .roam-work-badge {
  transform: translateY(-18px) scale(0.96);
}

.work-viewport.is-auth-transitioning .viewport-hint,
.work-viewport.is-auth-transitioning .roam-hud {
  transform: translate(-50%, 18px);
}

.viewport-hint {
  bottom: 24px;
  border: 1px solid rgba(184, 116, 52, 0.18);
  background: rgba(255, 248, 241, 0.92);
  color: #6d5134;
}

.roam-hud {
  top: 24px;
  border: 1px solid rgba(78, 123, 133, 0.24);
  background: rgba(247, 252, 250, 0.92);
  color: #38505a;
  display: none !important;
}

.roam-web-modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  pointer-events: auto;
}

.roam-web-modal[hidden] {
  display: none !important;
}

.roam-web-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(30, 22, 15, 0.38);
  backdrop-filter: blur(20px);
}

.roam-web-modal-card {
  position: relative;
  z-index: 1;
  width: min(calc(100vw - 32px), 960px);
  height: min(calc(100vh - 32px), 720px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 250, 244, 0.96);
  box-shadow:
    0 26px 80px rgba(28, 19, 11, 0.28),
    0 0 0 1px rgba(126, 89, 54, 0.12);
}

.roam-web-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 14px 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.58)),
    rgba(243, 232, 219, 0.84);
  border-bottom: 1px solid rgba(122, 78, 39, 0.1);
}

.roam-web-modal-header strong {
  font-size: 14px;
  color: #4d3925;
}

.roam-web-modal-close {
  height: 36px;
  min-width: 72px;
  border: 0;
  border-radius: 999px;
  padding: 0 14px;
  background: rgba(74, 54, 34, 0.1);
  color: #4d3925;
  cursor: pointer;
}

.roam-web-modal-close:hover {
  background: rgba(74, 54, 34, 0.16);
}

.roam-web-modal-frame {
  width: 100%;
  height: 100%;
  border: 0;
  background: #ffffff;
}

.roam-bubble-layer {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}

.roam-chat-bubble {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 5;
  max-width: min(360px, calc(100vw - 36px));
  transform: translate(-50%, -100%);
  pointer-events: none;
}

.roam-chat-bubble-text {
  position: relative;
  border-radius: 18px;
  background: rgba(255, 251, 246, 0.97);
  border: 1px solid rgba(145, 111, 75, 0.22);
  box-shadow:
    0 16px 36px rgba(39, 29, 18, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.36);
  color: #402f1d;
  padding: 11px 14px;
  font-size: 14px;
  line-height: 1.45;
  white-space: normal;
  word-break: break-word;
}

.roam-chat-bubble-label {
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #6f593f;
}

.roam-chat-bubble-body {
  display: grid;
  gap: 8px;
}

.roam-chat-bubble-line {
  white-space: pre-wrap;
  word-break: break-word;
}

.roam-chat-bubble-image {
  display: block;
  width: auto;
  max-width: min(240px, calc(100vw - 92px));
  max-height: 180px;
  border-radius: 14px;
  background: rgba(247, 242, 235, 0.94);
  object-fit: contain;
}

.roam-chat-bubble-file {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(245, 239, 230, 0.92);
  color: #3f2f1f;
  text-decoration: none;
  box-shadow: inset 0 0 0 1px rgba(145, 111, 75, 0.14);
}

.roam-chat-bubble-file-icon {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: rgba(193, 119, 52, 0.12);
  color: #8a5426;
  font: 800 12px/1 "JetBrains Mono", "Cascadia Code", monospace;
  letter-spacing: 0.08em;
}

.roam-chat-bubble-file-meta {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.roam-chat-bubble-file-name {
  font-size: 13px;
  font-weight: 700;
  color: inherit;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.roam-chat-bubble-file-copy {
  font-size: 11px;
  color: #735a42;
}

.roam-chat-bubble-text::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -8px;
  width: 14px;
  height: 14px;
  margin-left: -7px;
  border-right: 1px solid rgba(145, 111, 75, 0.22);
  border-bottom: 1px solid rgba(145, 111, 75, 0.22);
  background: rgba(255, 251, 246, 0.97);
  transform: rotate(45deg);
}

.roam-chat-bubble.is-remote .roam-chat-bubble-text {
  background: rgba(249, 252, 255, 0.96);
  border-color: rgba(103, 123, 148, 0.24);
  color: #243142;
}

.roam-chat-bubble.is-remote .roam-chat-bubble-text::after {
  border-right-color: rgba(103, 123, 148, 0.24);
  border-bottom-color: rgba(103, 123, 148, 0.24);
  background: rgba(249, 252, 255, 0.96);
}

.roam-chat-composer {
  position: absolute;
  left: 50%;
  bottom: 22px;
  z-index: 6;
  display: none;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  width: min(720px, calc(100vw - 40px));
  padding: 12px;
  border-radius: 24px;
  border: 1px solid rgba(145, 111, 75, 0.2);
  background: rgba(255, 251, 246, 0.94);
  box-shadow: 0 20px 44px rgba(37, 28, 18, 0.2);
  backdrop-filter: blur(18px);
  transform: translateX(-50%);
}

.roam-chat-composer.is-open {
  display: flex;
}

.roam-chat-composer[hidden] {
  display: none !important;
}

.roam-chat-composer-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.roam-chat-input {
  flex: 1 1 auto;
  min-width: 0;
  height: 48px;
  border: 0;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  padding: 0 16px;
  font-size: 15px;
  box-shadow: inset 0 0 0 1px rgba(145, 111, 75, 0.16);
}

.roam-chat-attach-wrap {
  position: relative;
  flex: 0 0 auto;
}

.roam-chat-attach {
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  color: #7d542d;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(145, 111, 75, 0.16);
}

.roam-chat-attach.is-open {
  background: rgba(255, 244, 232, 0.96);
  box-shadow:
    inset 0 0 0 1px rgba(193, 119, 52, 0.22),
    0 14px 28px rgba(127, 76, 33, 0.12);
}

.roam-chat-attach.has-pending {
  color: #fffaf1;
  background: linear-gradient(180deg, #cb8541, #a8652d);
  box-shadow: 0 14px 28px rgba(127, 76, 33, 0.2);
}

.roam-chat-attach-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  display: grid;
  gap: 8px;
  min-width: 108px;
  padding: 10px;
  border-radius: 18px;
  border: 1px solid rgba(145, 111, 75, 0.18);
  background: rgba(255, 251, 246, 0.96);
  box-shadow: 0 18px 36px rgba(37, 28, 18, 0.18);
}

.roam-chat-attach-menu[hidden] {
  display: none !important;
}

.roam-chat-attach-menu-item {
  height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
  color: #533c25;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(145, 111, 75, 0.12);
}

.roam-chat-attach-menu-item-danger {
  color: #8a3f2d;
  background: rgba(255, 242, 238, 0.9);
  box-shadow: inset 0 0 0 1px rgba(186, 92, 64, 0.16);
}

.roam-chat-input:focus {
  outline: 2px solid rgba(193, 119, 52, 0.22);
  box-shadow: inset 0 0 0 1px rgba(193, 119, 52, 0.22);
}

.roam-chat-send {
  flex: 0 0 auto;
  height: 48px;
  padding: 0 18px;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(180deg, #cb8541, #a8652d);
  color: #fffaf1;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 14px 28px rgba(127, 76, 33, 0.2);
}

.roam-chat-send:active {
  transform: translateY(1px);
}

.roam-crosshair {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 24px;
  height: 24px;
  margin-left: -12px;
  margin-top: -12px;
  pointer-events: none;
  z-index: 3;
  border-radius: 50%;
  border: 1px solid rgba(112, 246, 255, 0.84);
  box-shadow:
    0 0 0 1px rgba(255, 48, 184, 0.12),
    0 0 12px rgba(53, 242, 255, 0.32),
    0 0 24px rgba(255, 48, 184, 0.18);
  background: radial-gradient(circle, rgba(255, 255, 255, 0.22) 0, rgba(255, 255, 255, 0) 62%);
}

.roam-crosshair::before,
.roam-crosshair::after {
  content: "";
  position: absolute;
  background: rgba(232, 253, 255, 0.95);
  box-shadow:
    0 0 0 1px rgba(26, 95, 106, 0.16),
    0 0 10px rgba(72, 243, 255, 0.38);
}

.roam-crosshair::before {
  top: 11px;
  left: 4px;
  right: 4px;
  height: 2px;
  border-radius: 999px;
}

.roam-crosshair::after {
  left: 11px;
  top: 4px;
  bottom: 4px;
  width: 2px;
  border-radius: 999px;
}

.roam-debug-cursor {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 14;
  width: 26px;
  height: 36px;
  pointer-events: none;
  transform: translate(-9999px, -9999px);
  filter:
    drop-shadow(0 0 10px rgba(88, 235, 255, 0.42))
    drop-shadow(0 3px 10px rgba(9, 36, 53, 0.34));
}

.roam-debug-cursor[hidden] {
  display: none !important;
}

.roam-debug-cursor svg {
  display: block;
  width: 100%;
  height: 100%;
}

.roam-debug-cursor-stroke {
  fill: rgba(8, 30, 42, 0.94);
}

.roam-debug-cursor-fill {
  fill: rgba(108, 242, 255, 0.96);
  transform: translate(1.2px, 1.2px) scale(0.88);
  transform-origin: 0 0;
}

.roam-inspect-prompt {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  min-width: 88px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(66, 234, 255, 0.52);
  background:
    linear-gradient(180deg, rgba(7, 19, 31, 0.92), rgba(14, 9, 30, 0.88));
  color: #e9fdff;
  font: 700 13px/1 "JetBrains Mono", "Cascadia Code", "PingFang SC", monospace;
  letter-spacing: 0.18em;
  text-align: center;
  text-transform: uppercase;
  transform: translate(-50%, 28px);
  box-shadow:
    0 0 0 1px rgba(255, 51, 187, 0.14),
    0 0 18px rgba(30, 246, 255, 0.28),
    0 0 42px rgba(255, 34, 174, 0.16);
  backdrop-filter: blur(16px);
  pointer-events: none;
  text-shadow:
    0 0 8px rgba(88, 245, 255, 0.62),
    0 0 18px rgba(255, 57, 191, 0.28);
}

.roam-debug-panel {
  position: absolute;
  top: calc(18px + env(safe-area-inset-top));
  right: calc(18px + env(safe-area-inset-right));
  z-index: 6;
  display: grid;
  gap: 6px;
  min-width: 264px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(66, 234, 255, 0.28);
  background:
    linear-gradient(180deg, rgba(9, 16, 24, 0.9), rgba(15, 12, 28, 0.86));
  box-shadow:
    0 16px 38px rgba(5, 8, 12, 0.3),
    0 0 28px rgba(36, 228, 255, 0.12);
  backdrop-filter: blur(16px);
  pointer-events: none;
}

.roam-debug-panel[hidden] {
  display: none !important;
}

.roam-debug-panel-title {
  color: #7ff8ff;
  font: 700 11px/1 "JetBrains Mono", "Cascadia Code", "PingFang SC", monospace;
  letter-spacing: 0.26em;
  text-transform: uppercase;
}

.roam-debug-panel-line {
  color: rgba(238, 248, 255, 0.94);
  font: 600 12px/1.45 "JetBrains Mono", "Cascadia Code", "PingFang SC", monospace;
  letter-spacing: 0.04em;
  word-break: break-word;
}

.mobile-eye-dock {
  position: absolute;
  top: calc(12px + env(safe-area-inset-top));
  right: calc(12px + env(safe-area-inset-right));
  z-index: 4;
  pointer-events: none;
}

.mobile-eye-handle {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border: 0;
  border-radius: 18px;
  background: rgba(18, 16, 24, 0.58);
  color: #eefbff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 16px 32px rgba(16, 12, 22, 0.24);
  backdrop-filter: blur(12px);
  pointer-events: auto;
  touch-action: none;
}

.mobile-eye-handle.is-active {
  transform: scale(0.985);
  background: rgba(32, 26, 46, 0.74);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 18px 36px rgba(9, 7, 14, 0.32),
    0 0 24px rgba(63, 233, 255, 0.22);
}

.mobile-eye-icon {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 12px rgba(79, 232, 255, 0.26));
}

.mobile-controls {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 20px clamp(16px, env(safe-area-inset-right), 22px) calc(18px + env(safe-area-inset-bottom)) clamp(16px, env(safe-area-inset-left), 22px);
  z-index: 4;
  pointer-events: none;
}

.mobile-controls-left,
.mobile-controls-right {
  pointer-events: none;
}

.mobile-controls-right {
  display: grid;
  grid-template-columns: repeat(2, 76px);
  gap: 10px;
  justify-items: end;
}

.mobile-joystick {
  position: relative;
  width: 132px;
  height: 132px;
  pointer-events: auto;
}

.mobile-joystick-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(34, 29, 22, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 18px 40px rgba(23, 19, 15, 0.18);
  backdrop-filter: blur(10px);
}

.mobile-joystick-stick {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 58px;
  height: 58px;
  margin-left: -29px;
  margin-top: -29px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.36);
  background: linear-gradient(180deg, rgba(255, 250, 244, 0.92), rgba(219, 201, 177, 0.88));
  box-shadow: 0 10px 24px rgba(24, 18, 13, 0.22);
}

.mobile-action {
  pointer-events: auto;
  min-height: 56px;
  border: 0;
  border-radius: 18px;
  background: rgba(34, 29, 22, 0.28);
  color: #fffaf1;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 16px 32px rgba(20, 16, 12, 0.18);
  backdrop-filter: blur(10px);
}

.mobile-action:active,
.mobile-action.is-active {
  transform: translateY(1px) scale(0.985);
  background: rgba(62, 46, 28, 0.46);
}

.mobile-action-primary {
  background: linear-gradient(180deg, rgba(204, 131, 56, 0.96), rgba(160, 96, 35, 0.96));
}

.mobile-action-small {
  min-height: 48px;
  font-size: 12px;
}

.orientation-overlay {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: none;
  place-items: center;
  padding: 20px;
  background: rgba(31, 24, 18, 0.72);
  backdrop-filter: blur(14px);
}

.orientation-card {
  max-width: 360px;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 250, 245, 0.92);
  padding: 22px 24px;
  text-align: center;
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.18);
}

.orientation-card strong {
  display: block;
  margin-top: 8px;
  font-size: 22px;
}

.orientation-card p {
  margin: 10px 0 0;
  color: #6d5841;
  line-height: 1.55;
  font-size: 14px;
}

@media (max-width: 1100px) {
  .work-panel-primary,
  .work-panel-controls {
    width: min(320px, calc(100vw - 28px));
  }

  .work-panel-meta {
    width: min(360px, calc(100vw - 28px));
  }

  .work-meta-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .work-panel-primary,
  .work-panel-meta,
  .work-panel-controls {
    border-radius: 20px;
  }

  .roam-work-badge {
    top: 12px;
    left: 12px;
    width: min(336px, calc(100vw - 24px));
    min-height: 104px;
    grid-template-columns: minmax(0, 1fr) 92px;
    gap: 12px;
    padding: 15px 15px 15px 17px;
    border-radius: 20px;
  }

  .roam-work-badge-name {
    font-size: 22px;
  }

  .roam-work-badge-avatar {
    width: 80px;
    height: 80px;
    border-radius: 18px;
  }

  .roam-work-badge-avatar span {
    font-size: 24px;
  }

  .work-loading {
    padding: 16px;
  }

  .work-loading-shell {
    height: min(100%, 720px);
  }

  .work-loading-brand-block {
    top: 14px;
    left: 10px;
    gap: 6px;
  }

  .work-loading-brand {
    font-size: 12px;
    letter-spacing: 0.34em;
  }

  .work-loading-brand-sub {
    font-size: 9px;
  }

  .work-loading-card {
    width: min(100%, 360px);
    transform: translate(-50%, -42%);
  }

  .work-loading-loader {
    width: 124px;
    height: 124px;
  }

  .work-loading-loader-outer {
    width: 118px;
    height: 118px;
  }

  .work-loading-loader-tilt {
    width: 78px;
    height: 78px;
  }

  .work-loading-loader-core {
    width: 58px;
    height: 58px;
  }

  .work-loading-title {
    margin-top: 22px;
    font-size: 18px;
    letter-spacing: 0.24em;
    text-indent: 0.24em;
  }

  .work-loading-percent {
    font-size: 16px;
  }

  .work-loading-footer {
    bottom: 18px;
    gap: 10px;
    font-size: 8px;
    letter-spacing: 0.1em;
  }

  .work-loading-version {
    right: 12px;
    bottom: 16px;
    font-size: 8px;
  }

  .work-panel-primary {
    top: 12px;
    left: 12px;
    width: min(300px, calc(100vw - 24px));
  }

  .work-panel-meta {
    top: 12px;
    right: 12px;
    width: min(280px, calc(100vw - 24px));
  }

  .work-panel-controls {
    left: 12px;
    bottom: 12px;
    width: min(320px, calc(100vw - 24px));
    padding-bottom: calc(18px + env(safe-area-inset-bottom));
  }

  .viewport-hint,
  .roam-hud {
    max-width: calc(100vw - 24px);
    text-align: center;
  }

  .roam-chat-composer {
    bottom: 14px;
    width: min(640px, calc(100vw - 24px));
  }

}

@media (hover: none) and (pointer: coarse) {
  html,
  body,
  .work-shell,
  .work-viewport,
  .work-viewport * {
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
  }

  .mobile-controls,
  .mobile-eye-dock,
  .mobile-eye-dock *,
  .mobile-controls *,
  .roam-chat-bubble,
  .roam-chat-bubble *,
  .roam-inspect-prompt,
  .roam-chat-composer,
  .roam-chat-composer *,
  .orientation-card,
  .orientation-card * {
    -webkit-user-select: none !important;
    user-select: none !important;
    -webkit-touch-callout: none !important;
  }

  .work-panel,
  .viewport-hint,
  .roam-hud {
    display: none !important;
  }

  .roam-work-badge {
    display: grid !important;
  }

  .mobile-controls {
    display: flex;
  }

  .mobile-eye-dock {
    display: block;
  }

  .roam-chat-composer {
    bottom: calc(8px + env(safe-area-inset-bottom));
    width: calc(100vw - 20px);
    max-width: none;
    padding: 10px;
    border-radius: 20px;
    touch-action: manipulation;
  }

  .mobile-joystick,
  .mobile-action,
  .orientation-card {
    touch-action: manipulation;
  }

  .roam-chat-input {
    -webkit-user-select: text !important;
    user-select: text !important;
    -webkit-touch-callout: default !important;
  }

  .roam-chat-composer-row {
    align-items: stretch;
  }

  .roam-chat-attach,
  .roam-chat-send {
    min-width: 52px;
  }

  .roam-chat-send {
    min-width: 82px;
  }

  .roam-chat-attach-menu {
    right: 0;
    left: auto;
  }
}

@media (max-width: 640px) {
  .work-loading-card {
    width: min(100%, 320px);
    transform: translate(-50%, -40%);
  }

  .work-loading-title {
    font-size: 16px;
    letter-spacing: 0.18em;
    text-indent: 0.18em;
  }

  .work-loading-detail,
  .work-loading-meta {
    font-size: 9px;
  }

  .work-loading-status {
    gap: 12px;
  }

  .work-loading-status-value {
    font-size: 11px;
  }

  .work-loading-footer {
    left: 16px;
    bottom: 14px;
    display: grid;
    justify-items: start;
    gap: 6px;
    transform: none;
  }

  .work-loading-version {
    display: none;
  }
}

@media (hover: none) and (pointer: coarse) and (orientation: portrait) {
  .orientation-overlay {
    display: grid;
  }
}
