: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;
  overscroll-behavior: none;
  overscroll-behavior-x: none;
}

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;
  overscroll-behavior: none;
  overscroll-behavior-x: none;
}

.work-shell.is-flat-mode .work-viewport {
  display: none;
}

.work-shell.is-flat-mode.is-loading-3d-workspace .work-viewport {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: block;
  width: 100vw;
  height: 100dvh;
  min-height: 100dvh;
  pointer-events: auto;
  background: rgba(255, 255, 255, 0.3);
}

.work-shell.is-flat-mode.is-loading-3d-workspace .map-canvas {
  opacity: 0;
}

.work-shell.is-flat-mode.is-loading-3d-workspace .work-loading {
  position: fixed;
  z-index: 121;
}

.work-shell.is-flat-mode.is-loading-3d-workspace .work-flat-shell {
  pointer-events: none;
}

.work-studio-embed,
.work-studio-embed body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #060708;
}

.work-studio-embed .work-shell {
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
  overflow: hidden;
  background: #060708;
}

.work-studio-embed .work-mode-switch,
.work-studio-embed .roam-hud,
.work-studio-embed .viewport-hint,
.work-studio-embed .roam-work-badge,
.work-studio-embed .mobile-controls,
.work-studio-embed .mobile-eye-dock,
.work-studio-embed .roam-video-panel,
.work-studio-embed .roam-video-toggle,
.work-studio-embed .roam-fps-overlay {
  display: none !important;
}

.work-studio-embed .work-viewport {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  opacity: 1;
  pointer-events: auto;
  background: #060708;
}

.work-studio-embed .map-canvas {
  width: 100% !important;
  height: 100% !important;
}

.work-studio-embed .work-loading {
  background: #060708;
}

.work-mode-switch {
  position: fixed;
  top: 16px;
  right: max(16px, env(safe-area-inset-right));
  z-index: 80;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 42px;
  padding: 4px;
  color: #151515;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(20, 20, 20, 0.12);
  border-radius: 8px;
  box-shadow: 0 16px 36px rgba(12, 12, 12, 0.14);
  backdrop-filter: blur(16px);
}

.work-mode-switch-label {
  padding: 0 8px 0 10px;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  color: rgba(18, 18, 18, 0.58);
  text-transform: uppercase;
}

.work-mode-switch-button {
  min-width: 54px;
  height: 32px;
  padding: 0 12px;
  color: rgba(22, 22, 22, 0.72);
  cursor: pointer;
  background: transparent;
  border: 0;
  border-radius: 6px;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.work-mode-switch-button:hover {
  color: #111;
  background: rgba(0, 0, 0, 0.06);
}

.work-mode-switch-button.is-active {
  color: #fff !important;
  -webkit-text-fill-color: #fff;
  font-weight: 800;
  background: #101010 !important;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.work-mode-switch-button:active {
  transform: translateY(1px);
}

.work-mode-switch-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.mobile-work-menu-toggle,
.mobile-work-menu-panel,
.mobile-work-menu-flat-nav {
  display: none;
}

.work-passkey-bind-prompt {
  position: fixed;
  inset: 0;
  z-index: 160;
  display: grid;
  place-items: center;
  padding: 20px;
  color: #ffffff;
}

.work-passkey-bind-prompt[hidden] {
  display: none !important;
}

.work-passkey-bind-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(5px);
}

.work-passkey-bind-card {
  position: relative;
  z-index: 1;
  width: min(390px, calc(100vw - 36px));
  display: grid;
  gap: 12px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(20, 20, 22, 0.98), rgba(6, 6, 7, 0.98));
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.48);
}

.work-passkey-bind-eyebrow {
  color: rgba(255, 255, 255, 0.46);
  font: 900 10px/1.2 "JetBrains Mono", monospace;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.work-passkey-bind-card strong {
  color: #ffffff;
  font-size: 22px;
  line-height: 1.1;
}

.work-passkey-bind-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 14px;
  line-height: 1.7;
}

.work-passkey-bind-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 4px;
}

.work-passkey-bind-actions button {
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.86);
  background: rgba(255, 255, 255, 0.08);
  font-size: 14px;
  font-weight: 900;
}

.work-passkey-bind-actions button:first-child {
  color: #000000;
  background: #ffffff;
}

.work-shell.is-work-view-transitioning .work-mode-switch {
  pointer-events: none;
}

.work-shell.is-real-object-morphing .work-auth-gate,
.work-shell.is-real-object-morphing .roam-hud,
.work-shell.is-real-object-morphing .roam-work-badge,
.work-shell.is-real-object-morphing .viewport-hint,
.work-shell.is-real-object-morphing .mobile-controls,
.work-shell.is-real-object-morphing .mobile-eye-dock {
  opacity: 0 !important;
  pointer-events: none !important;
  transition: opacity 160ms ease !important;
}

.work-shell.is-progressive-flat-reveal .work-viewport {
  display: block;
  position: relative;
  opacity: var(--work-3d-reveal-opacity, 1);
  transition: opacity 80ms linear;
}

.work-shell.is-dismissing-flat .work-viewport {
  z-index: 38;
}

.work-shell.is-progressive-flat-reveal .work-flat-shell {
  position: fixed;
  inset: 0;
  z-index: 24;
  display: block;
  opacity: var(--work-flat-reveal-progress, 0);
  background: transparent;
  background-image: none;
  clip-path: none;
  transform: none;
  filter: none;
  pointer-events: none;
  box-shadow: none;
}

.work-shell.is-dismissing-flat .work-flat-shell {
  z-index: 18;
  opacity: var(--work-flat-reveal-progress, 1);
}

.work-shell.is-dismissing-flat .work-flat-shell::before {
  opacity: 0 !important;
}

.work-shell.is-dismissing-flat .work-flat-reveal-item {
  mix-blend-mode: multiply;
}

.work-shell.is-progressive-flat-reveal .work-flat-main,
.work-shell.is-progressive-flat-reveal .work-flat-shell {
  perspective: 1200px;
}

.work-shell.is-progressive-flat-reveal .work-flat-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: var(--work-flat-backdrop-opacity, 0);
  background:
    radial-gradient(rgba(120, 120, 124, 0.16) 1px, transparent 1px),
    linear-gradient(180deg, rgba(249, 249, 250, 0.98), rgba(243, 243, 244, 0.96));
  background-repeat: repeat, no-repeat;
  background-position: center top, center;
  background-size: 8px 8px, auto;
  transition: opacity 140ms linear;
}

.work-shell.is-progressive-flat-reveal .work-flat-main {
  position: relative;
  z-index: 1;
}

.work-shell.is-progressive-flat-reveal .work-flat-reveal-item {
  transform-origin: var(--work-flat-item-origin-x, 50%) 0%;
  transform:
    translate3d(var(--work-flat-item-x, 0px), var(--work-flat-item-y, 26px), var(--work-flat-item-z, 0px))
    rotateX(var(--work-flat-item-rotate, -78deg))
    rotateY(var(--work-flat-item-rotate-y, 0deg))
    rotateZ(var(--work-flat-item-rotate-z, 0deg))
    scale(var(--work-flat-item-scale, 1))
    scaleY(var(--work-flat-item-scale-y, 0.16));
  opacity: var(--work-flat-item-opacity, 0.08);
  clip-path: inset(var(--work-flat-item-clip-y, 42%) 0 0 0 round 8px);
  filter:
    blur(var(--work-flat-item-blur, 5px))
    brightness(var(--work-flat-item-brightness, 1));
  box-shadow: var(--work-flat-item-shadow, 0 0 0 rgba(0, 0, 0, 0));
  backface-visibility: hidden;
  transform-style: preserve-3d;
  will-change: transform, opacity, clip-path, filter, box-shadow;
  transition:
    transform 90ms linear,
    opacity 90ms linear,
    clip-path 90ms linear,
    filter 90ms linear,
    box-shadow 90ms linear;
}

.work-shell.is-progressive-flat-reveal .work-mode-switch {
  z-index: 70;
}

.work-view-room-landing-layer {
  position: fixed;
  inset: 0;
  z-index: 86;
  overflow: hidden;
  pointer-events: none;
  perspective: 1400px;
  transform-style: preserve-3d;
}

.work-view-room-landing-card {
  --landing-label-opacity: 0;
  --landing-radius: 4px;
  --landing-sheen-opacity: 0.16;
  --landing-art-scale: 116%;
  --landing-shadow-alpha: 0.24;
  position: absolute;
  left: 0;
  top: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-width: 42px;
  min-height: 34px;
  padding: clamp(8px, 1.45vw, 18px);
  overflow: hidden;
  color: #0d1513;
  background-color: #f8f4ed;
  background-image:
    var(--landing-art, none),
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(248, 244, 237, 0.92));
  background-repeat: no-repeat, no-repeat;
  background-position: center 58%, center;
  background-size: var(--landing-art-scale, 116%) auto, cover;
  border: 1px solid color-mix(in srgb, var(--landing-accent, #247067) 54%, rgba(255, 255, 255, 0.62));
  border-radius: var(--landing-radius, 4px);
  box-shadow:
    0 28px 68px rgba(6, 16, 14, var(--landing-shadow-alpha, 0.24)),
    inset 0 0 0 1px rgba(255, 255, 255, 0.56);
  transform-origin: center center;
  transform-style: preserve-3d;
  will-change: left, top, width, height, transform, opacity, filter;
}

.work-view-room-landing-card::before,
.work-view-room-landing-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.work-view-room-landing-card::before {
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.34), transparent 38%, rgba(255, 255, 255, 0.16)),
    radial-gradient(circle at 24% 20%, color-mix(in srgb, var(--landing-accent, #247067) 18%, transparent), transparent 36%);
  opacity: var(--landing-sheen-opacity, 0.16);
}

.work-view-room-landing-card::after {
  border: 1px solid color-mix(in srgb, var(--landing-accent, #247067) 34%, transparent);
  border-radius: inherit;
}

.work-view-room-landing-card.is-handoff {
  box-shadow:
    0 12px 36px rgba(6, 16, 14, 0.14),
    inset 0 0 0 1px rgba(255, 255, 255, 0.72);
}

.work-view-room-landing-card > * {
  position: relative;
  z-index: 1;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  opacity: var(--landing-label-opacity, 0);
  transform: translateY(var(--landing-label-y, 4px));
}

.work-view-room-landing-kicker {
  align-self: flex-start;
  max-width: min(100%, 180px);
  margin-bottom: 8px;
  padding: 3px 7px;
  color: #ffffff;
  background: color-mix(in srgb, var(--landing-accent, #247067) 78%, #111111);
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
}

.work-view-room-landing-card strong {
  font-size: clamp(12px, 1.25vw, 18px);
  line-height: 1.18;
  color: #101312;
}

.work-view-transition {
  position: fixed;
  inset: 0;
  z-index: 95;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  perspective: 1100px;
  background:
    radial-gradient(circle at 50% 46%, rgba(255, 255, 255, 0.16), transparent 24%),
    linear-gradient(180deg, rgba(8, 10, 10, 0.38), rgba(8, 10, 10, 0.14));
  backdrop-filter: blur(3px) saturate(1.08);
  transition: opacity 220ms ease;
}

.work-view-transition.is-running {
  opacity: 1;
}

.work-view-transition.is-leaving {
  opacity: 0;
}

.work-view-transition-viewport {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}

.work-view-transition-grid {
  position: absolute;
  inset: -12%;
  opacity: 0.34;
  background:
    linear-gradient(rgba(36, 112, 103, 0.18) 1px, transparent 1px) 0 0 / 42px 42px,
    linear-gradient(90deg, rgba(36, 112, 103, 0.16) 1px, transparent 1px) 0 0 / 42px 42px;
  transform: rotateX(63deg) translateY(9vh) translateZ(-120px);
  transform-origin: center;
  animation: workViewGridPulse 1400ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.work-view-transition-label {
  position: absolute;
  left: 50%;
  bottom: max(34px, env(safe-area-inset-bottom));
  min-width: min(520px, calc(100vw - 48px));
  padding: 12px 18px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 13px;
  font-weight: 900;
  text-align: center;
  letter-spacing: 0;
  background: rgba(10, 12, 12, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
  transform: translateX(-50%);
}

.work-view-transition-node {
  position: absolute;
  left: 0;
  top: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  padding: 12px;
  overflow: hidden;
  color: #f8fff9;
  background:
    linear-gradient(135deg, hsla(var(--node-hue), 54%, 36%, 0.88), rgba(12, 14, 14, 0.92));
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 14px;
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.34),
    inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  transform-style: preserve-3d;
  will-change: transform, width, height, opacity;
}

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

.work-view-transition-node::before {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.22), transparent 34%, rgba(255, 255, 255, 0.14)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), transparent 42%);
  opacity: 0.36;
}

.work-view-transition-node::after {
  inset: auto 10px 10px 10px;
  height: 2px;
  background: rgba(255, 255, 255, 0.44);
  box-shadow: 0 -14px 0 rgba(255, 255, 255, 0.1), 0 -28px 0 rgba(255, 255, 255, 0.08);
}

.work-view-transition-node-index {
  position: relative;
  z-index: 1;
  width: 34px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  font-size: 11px;
  font-weight: 900;
  color: #101312;
  background: rgba(255, 255, 255, 0.88);
  border-radius: 6px;
}

.work-view-transition-node strong {
  position: relative;
  z-index: 1;
  max-width: 100%;
  overflow: hidden;
  font-size: 15px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.work-view-transition.is-to-flat .work-view-transition-node {
  width: var(--from-w);
  height: var(--from-h);
  animation: workViewNodeToFlat 1320ms cubic-bezier(0.19, 1, 0.22, 1) var(--node-delay) both;
}

.work-view-transition.is-to-3d .work-view-transition-node {
  width: var(--to-w);
  height: var(--to-h);
  animation: workViewNodeTo3d 1320ms cubic-bezier(0.19, 1, 0.22, 1) var(--node-delay) both;
}

.work-view-transition-object {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--object-size);
  height: var(--object-size);
  border-radius: 4px;
  background:
    radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.26) 32%, transparent 34%),
    linear-gradient(135deg, hsla(var(--object-hue), 72%, 58%, 0.96), hsla(var(--object-hue), 64%, 28%, 0.9));
  box-shadow:
    0 0 calc(var(--object-size) * 1.6) hsla(var(--object-hue), 80%, 62%, 0.48),
    0 10px 24px rgba(0, 0, 0, 0.24);
  transform-style: preserve-3d;
  will-change: transform, opacity, border-radius;
}

.work-view-transition-object::after {
  content: "";
  position: absolute;
  inset: -5px;
  border: 1px solid hsla(var(--object-hue), 78%, 68%, 0.22);
  border-radius: inherit;
}

.work-view-transition-object.is-structure {
  border-radius: 2px;
  background:
    linear-gradient(90deg, hsla(var(--object-hue), 46%, 66%, 0.9) 0 18%, transparent 18% 28%, hsla(var(--object-hue), 46%, 48%, 0.88) 28% 100%);
}

.work-view-transition-object.is-panel,
.work-view-transition-object.is-portal {
  width: calc(var(--object-size) * 1.65);
  height: calc(var(--object-size) * 0.9);
  border-radius: 3px;
}

.work-view-transition-object.is-portal {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), hsla(var(--object-hue), 78%, 68%, 0.86) 34%, hsla(var(--object-hue), 66%, 32%, 0.96));
}

.work-view-transition-object.is-model {
  border-radius: 999px 999px 6px 6px;
}

.work-view-transition.is-to-flat .work-view-transition-object {
  animation: workViewObjectToFlat 1420ms cubic-bezier(0.19, 1, 0.22, 1) var(--object-delay) both;
}

.work-view-transition.is-to-3d .work-view-transition-object {
  animation: workViewObjectTo3d 1420ms cubic-bezier(0.19, 1, 0.22, 1) var(--object-delay) both;
}

.work-view-transition-shard {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--shard-size);
  height: var(--shard-size);
  background: rgba(255, 255, 255, 0.88);
  border-radius: 2px;
  box-shadow: 0 0 18px rgba(36, 112, 103, 0.4);
  will-change: transform, opacity;
}

.work-view-transition.is-to-flat .work-view-transition-shard {
  animation: workViewShardToFlat 1120ms cubic-bezier(0.2, 0.9, 0.2, 1) var(--shard-delay) both;
}

.work-view-transition.is-to-3d .work-view-transition-shard {
  animation: workViewShardTo3d 1120ms cubic-bezier(0.2, 0.9, 0.2, 1) var(--shard-delay) both;
}

.work-flat-shell.is-measuring {
  position: fixed;
  inset: 0;
  z-index: -1;
  display: block !important;
  visibility: hidden;
  pointer-events: none;
}

@keyframes workViewGridPulse {
  0% {
    opacity: 0;
    transform: rotateX(70deg) translateY(18vh) translateZ(-220px) scale(0.82);
  }
  48% {
    opacity: 0.42;
  }
  100% {
    opacity: 0.18;
    transform: rotateX(0deg) translateY(0) translateZ(0) scale(1.02);
  }
}

@keyframes workViewNodeToFlat {
  0% {
    width: var(--from-w);
    height: var(--from-h);
    opacity: 0;
    transform: translate3d(var(--from-x), var(--from-y), var(--from-z)) rotateX(68deg) rotateY(-18deg) rotateZ(var(--node-angle)) scale(0.72);
    filter: saturate(1.22) blur(0);
  }
  18% {
    opacity: 1;
  }
  48% {
    width: var(--from-w);
    height: var(--from-h);
    transform: translate3d(50vw, 42vh, 230px) translate(-50%, -50%) rotateX(74deg) rotateY(8deg) rotateZ(0deg) scale(1.12);
    filter: saturate(1.38) blur(0);
  }
  72% {
    filter: saturate(0.96) blur(0.5px);
  }
  100% {
    width: var(--to-w);
    height: var(--to-h);
    opacity: 0.94;
    transform: translate3d(var(--to-x), var(--to-y), var(--to-z)) rotateX(0deg) rotateY(0deg) rotateZ(0deg) scale(1);
    filter: saturate(0.9) blur(0);
    border-radius: 8px;
  }
}

@keyframes workViewNodeTo3d {
  0% {
    width: var(--to-w);
    height: var(--to-h);
    opacity: 0.9;
    transform: translate3d(var(--to-x), var(--to-y), var(--to-z)) rotateX(0deg) rotateY(0deg) rotateZ(0deg) scale(1);
    filter: saturate(0.9) blur(0);
    border-radius: 8px;
  }
  42% {
    width: var(--from-w);
    height: var(--from-h);
    opacity: 1;
    transform: translate3d(50vw, 42vh, 230px) translate(-50%, -50%) rotateX(68deg) rotateY(-8deg) rotateZ(0deg) scale(1.14);
    filter: saturate(1.32) blur(0);
  }
  100% {
    width: var(--from-w);
    height: var(--from-h);
    opacity: 0;
    transform: translate3d(var(--from-x), var(--from-y), var(--from-z)) rotateX(68deg) rotateY(-18deg) rotateZ(var(--node-angle)) scale(0.72);
    filter: saturate(1.2) blur(1px);
  }
}

@keyframes workViewObjectToFlat {
  0% {
    opacity: 0;
    transform: translate3d(var(--from-x), var(--from-y), var(--from-z)) translate(-50%, -50%) rotateX(70deg) rotateY(-22deg) rotateZ(var(--object-angle)) scale(calc(0.7 * var(--object-depth)));
    border-radius: 18px;
    filter: saturate(1.35) blur(0);
  }
  14% {
    opacity: 0.92;
  }
  46% {
    opacity: 1;
    transform: translate3d(50vw, 44vh, 220px) translate(-50%, -50%) rotateX(64deg) rotateY(10deg) rotateZ(calc(var(--object-angle) * 0.22)) scale(calc(1.25 * var(--object-depth)));
    filter: saturate(1.5) blur(0);
  }
  72% {
    opacity: 0.92;
    filter: saturate(1) blur(0.4px);
  }
  100% {
    opacity: 0.76;
    transform: translate3d(var(--to-x), var(--to-y), 0) translate(-50%, -50%) rotateX(0deg) rotateY(0deg) rotateZ(0deg) scale(0.74);
    border-radius: 3px;
    filter: saturate(0.86) blur(0);
  }
}

@keyframes workViewObjectTo3d {
  0% {
    opacity: 0.72;
    transform: translate3d(var(--to-x), var(--to-y), 0) translate(-50%, -50%) rotateX(0deg) rotateY(0deg) rotateZ(0deg) scale(0.74);
    border-radius: 3px;
    filter: saturate(0.86) blur(0);
  }
  42% {
    opacity: 1;
    transform: translate3d(50vw, 44vh, 220px) translate(-50%, -50%) rotateX(64deg) rotateY(10deg) rotateZ(calc(var(--object-angle) * 0.22)) scale(calc(1.25 * var(--object-depth)));
    filter: saturate(1.5) blur(0);
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--from-x), var(--from-y), var(--from-z)) translate(-50%, -50%) rotateX(70deg) rotateY(-22deg) rotateZ(var(--object-angle)) scale(calc(0.7 * var(--object-depth)));
    border-radius: 18px;
    filter: saturate(1.35) blur(1px);
  }
}

@keyframes workViewShardToFlat {
  0% {
    opacity: 0;
    transform: translate3d(var(--from-x), var(--from-y), 180px) rotate(0deg) scale(0.4);
  }
  20% {
    opacity: 1;
  }
  100% {
    opacity: 0.24;
    transform: translate3d(var(--to-x), var(--to-y), 0) rotate(180deg) scale(1);
  }
}

@keyframes workViewShardTo3d {
  0% {
    opacity: 0.24;
    transform: translate3d(var(--to-x), var(--to-y), 0) rotate(180deg) scale(1);
  }
  76% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--from-x), var(--from-y), 180px) rotate(0deg) scale(0.4);
  }
}

.work-flat-shell {
  --flat-ink: #1a1c1d;
  --flat-muted: #5f5e61;
  --flat-soft: rgba(0, 0, 0, 0.05);
  --flat-panel: rgba(255, 255, 255, 0.94);
  --flat-panel-strong: #ffffff;
  --flat-line: rgba(0, 0, 0, 0.1);
  --flat-line-soft: rgba(0, 0, 0, 0.06);
  --flat-node: #000000;
  --flat-surface: #f9f9fa;
  --flat-surface-low: #f3f3f4;
  --flat-surface-high: #e8e8e9;
  --flat-shadow: 0 12px 32px rgba(0, 0, 0, 0.04);
  width: 100%;
  height: 100dvh;
  min-height: 100dvh;
  overflow: auto;
  overflow-x: hidden;
  color: var(--flat-ink);
  background:
    radial-gradient(rgba(120, 120, 124, 0.16) 1px, transparent 1px),
    linear-gradient(180deg, rgba(249, 249, 250, 0.98), rgba(243, 243, 244, 0.96));
  background-repeat: repeat, no-repeat;
  background-position: center top, center;
  background-size: 8px 8px, auto;
  font-feature-settings: "tnum" 1;
  overscroll-behavior: contain;
  transition: transform 220ms ease;
}

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

.work-flat-shell a {
  color: inherit;
  text-decoration: none;
}

.work-flat-topbar {
  position: sticky;
  top: 0;
  z-index: 35;
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr) minmax(178px, 236px);
  gap: 24px;
  align-items: center;
  min-height: 72px;
  padding: 14px 330px 14px max(28px, env(safe-area-inset-left));
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid var(--flat-line);
  box-shadow: var(--flat-shadow);
  backdrop-filter: blur(20px) saturate(1.04);
}

.work-flat-brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.work-flat-brand-mark {
  display: grid;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  place-items: center;
  background: #000000;
  background-image: url("/assets/logo-light.svg");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 28px 28px;
  border-radius: 4px;
  box-shadow: none;
}

.work-flat-brand strong,
.work-flat-brand small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.work-flat-brand strong {
  font-size: 16px;
  line-height: 1.2;
  color: #000000;
}

.work-flat-brand small {
  margin-top: 3px;
  font-size: 12px;
  color: var(--flat-muted);
}

.work-flat-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.work-flat-nav a {
  padding: 8px 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--flat-muted);
  border: 0;
  border-radius: 4px;
  transition: color 150ms ease, background 150ms ease;
}

.work-flat-nav a:hover {
  color: #000000;
  background: transparent;
}

.work-flat-user {
  min-width: 0;
  padding: 10px 12px;
  background: rgba(249, 249, 250, 0.72);
  border: 1px solid var(--flat-line);
  border-radius: 4px;
  box-shadow: none;
}

.work-flat-user span,
.work-flat-user small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.work-flat-user span {
  font-size: 13px;
  font-weight: 700;
}

.work-flat-user small {
  margin-top: 3px;
  font-size: 11px;
  color: var(--flat-muted);
}

.work-flat-main {
  width: min(1280px, calc(100% - 56px));
  margin: 0 auto;
  padding: 32px 0 72px;
}

.work-flat-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
  width: min(1280px, calc(100% - 56px));
  margin: -34px auto 0;
  padding: 0 0 max(34px, env(safe-area-inset-bottom));
  font-size: 12px;
  line-height: 1.7;
  color: var(--flat-muted);
  text-align: center;
}

.work-flat-footer span {
  display: inline-flex;
  min-width: 0;
  align-items: center;
}

.work-flat-footer a {
  color: inherit;
  text-decoration: none;
  overflow-wrap: anywhere;
  border-bottom: 1px solid transparent;
  transition: color 150ms ease, border-color 150ms ease;
}

.work-flat-footer a:hover,
.work-flat-footer a:focus-visible {
  color: #000000;
  border-color: rgba(0, 0, 0, 0.28);
  outline: 0;
}

.work-beian-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
}

.work-beian-mps-icon {
  flex: 0 0 auto;
  width: 14px;
  height: auto;
  object-fit: contain;
}

.work-flat-hero {
  position: relative;
  display: block;
  min-height: 248px;
  padding: 48px;
  overflow: hidden;
  color: var(--flat-ink);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--flat-line-soft);
  border-radius: 8px;
  box-shadow: var(--flat-shadow);
  isolation: isolate;
}

.work-flat-hero::before {
  content: "";
  position: absolute;
  left: 48px;
  top: 56px;
  width: 8px;
  height: 8px;
  z-index: 0;
  background: #000000;
  border: 0;
  border-radius: 0;
  pointer-events: none;
}

.work-flat-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 auto;
  width: 44%;
  height: 100%;
  z-index: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(243, 243, 244, 0.72)),
    radial-gradient(rgba(0, 0, 0, 0.09) 1px, transparent 1px);
  background-size: auto, 10px 10px;
  opacity: 0.7;
  transform: none;
  pointer-events: none;
}

.work-flat-hero-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-width: 0;
  max-width: 100%;
  padding-left: 24px;
}

.work-flat-eyebrow {
  display: block;
  margin-bottom: 14px;
  font-size: 11px;
  font-weight: 800;
  color: var(--flat-muted);
  letter-spacing: 0;
  text-transform: uppercase;
}

.work-flat-hero .work-flat-eyebrow {
  color: #000000;
}

.work-flat-hero h1 {
  max-width: 820px;
  margin: 0;
  font-size: 46px;
  line-height: 1.08;
  color: #000000;
  letter-spacing: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.work-flat-hero p {
  max-width: 680px;
  margin: 18px 0 0;
  font-size: 16px;
  line-height: 1.8;
  color: var(--flat-muted);
  overflow-wrap: anywhere;
}

.work-flat-hero-actions,
.work-flat-strip-actions,
.work-flat-agent-actions,
.work-flat-card-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.work-flat-hero-actions {
  margin-top: 34px;
}

.work-flat-button,
.work-flat-auth-strip button,
.work-flat-agent-actions a,
.work-flat-card-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  font-weight: 700;
  cursor: pointer;
  border-radius: 4px;
  transition: color 150ms ease, background 150ms ease, border-color 150ms ease;
}

.work-flat-button {
  color: #000000;
  background: transparent;
  border: 1px solid var(--flat-line);
  min-width: 0;
}

.work-flat-button:hover,
.work-flat-auth-strip button:hover,
.work-flat-agent-actions a:hover,
.work-flat-card-links a:hover {
  color: #ffffff;
  background: #3b3b3e;
  border-color: #3b3b3e;
}

.work-flat-button-primary {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff;
  background: #000000;
  border-color: #000000;
  box-shadow: none;
}

.work-flat-auth-strip {
  position: relative;
  display: grid;
  grid-template-columns: minmax(150px, 220px) minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 18px 20px;
  margin: 0 0 44px;
  color: var(--flat-ink);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--flat-line-soft);
  border-radius: 4px;
  box-shadow: var(--flat-shadow);
  overflow: hidden;
}

.work-flat-auth-strip::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: #000000;
}

.work-flat-auth-strip div,
.work-flat-auth-strip p {
  min-width: 0;
}

.work-flat-strip-label {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--flat-muted);
}

.work-flat-auth-strip strong {
  display: block;
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.work-flat-auth-strip p {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--flat-muted);
}

.work-flat-auth-strip button {
  color: #fff;
  background: #000000;
  border: 1px solid #000000;
}

.work-flat-auth-modal {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: grid;
  place-items: end center;
  padding: 16px;
}

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

.work-flat-auth-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.28);
}

.work-flat-auth-card {
  position: relative;
  z-index: 1;
  width: min(420px, calc(100vw - 28px));
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--flat-line);
  border-radius: 18px;
  color: var(--flat-ink);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(18px);
}

.work-flat-auth-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
}

.work-flat-auth-head h2 {
  margin: 4px 0 0;
  font-size: 22px;
  line-height: 1.1;
}

.work-flat-auth-close {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--flat-line);
  border-radius: 999px;
  color: var(--flat-muted);
  background: rgba(0, 0, 0, 0.03);
  font-weight: 800;
}

.work-flat-auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 4px;
  border: 1px solid var(--flat-line-soft);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.035);
}

.work-flat-auth-tabs button {
  min-height: 38px;
  border: 0;
  border-radius: 9px;
  color: var(--flat-muted);
  background: transparent;
  font-weight: 900;
}

.work-flat-auth-tabs button.is-active {
  color: #ffffff;
  background: #000000;
}

.work-flat-auth-form {
  display: grid;
  gap: 12px;
}

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

.work-flat-auth-form label {
  display: grid;
  gap: 7px;
  color: var(--flat-muted);
  font-size: 12px;
  font-weight: 800;
}

.work-flat-auth-form input {
  width: 100%;
  min-height: 46px;
  box-sizing: border-box;
  border: 1px solid rgba(0, 0, 0, 0.14);
  border-radius: 12px;
  padding: 0 12px;
  color: #000000;
  background: rgba(0, 0, 0, 0.045);
  font: inherit;
}

.work-flat-auth-form .work-password-field-shell {
  display: block;
}

.work-flat-auth-form .work-password-field-shell input {
  padding-right: 52px;
}

.work-flat-auth-form .work-password-toggle {
  right: 7px;
  color: rgba(0, 0, 0, 0.66);
  background: rgba(255, 255, 255, 0.72);
}

.work-flat-auth-form .work-password-toggle:hover,
.work-flat-auth-form .work-password-toggle:focus-visible,
.work-flat-auth-form .work-password-toggle.is-visible {
  color: #ffffff;
  background: #000000;
}

.work-flat-auth-agreement {
  grid-template-columns: 22px 1fr;
  align-items: center;
  color: var(--flat-ink);
  line-height: 1.45;
}

.work-flat-auth-agreement input {
  width: 22px;
  min-height: 22px;
  height: 22px;
  accent-color: #000000;
}

.work-flat-auth-submit {
  min-height: 46px;
  border: 0;
  border-radius: 12px;
  color: #ffffff;
  background: #000000;
  font-size: 15px;
  font-weight: 900;
}

.work-flat-passkey-button {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(0, 0, 0, 0.14);
  border-radius: 12px;
  color: #000000;
  background: rgba(0, 0, 0, 0.045);
  font-size: 14px;
  font-weight: 900;
}

.work-flat-passkey-button:hover,
.work-flat-passkey-button:focus-visible {
  background: #ffffff;
}

.work-flat-passkey-panel {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.045);
}

.work-flat-passkey-panel[hidden] {
  display: none !important;
}

.work-flat-passkey-panel strong {
  color: #000000;
  font-size: 18px;
  line-height: 1.15;
}

.work-flat-passkey-panel p {
  margin: 0;
  color: var(--flat-muted);
  font-size: 13px;
  line-height: 1.55;
}

.work-flat-passkey-other {
  min-height: 40px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 12px;
  color: var(--flat-muted);
  background: rgba(255, 255, 255, 0.62);
  font-weight: 900;
}

.work-flat-auth-message {
  margin: 0;
  min-height: 20px;
  color: #9b1c1c;
  font-size: 13px;
  line-height: 1.45;
}

.work-flat-auth-message[data-type="info"] {
  color: rgba(0, 0, 0, 0.62);
  font-size: 12px;
}

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

.work-flat-section,
.work-flat-flow,
.work-flat-split {
  margin-top: 48px;
}

.work-flat-section-head {
  display: grid;
  grid-template-columns: minmax(180px, 320px) minmax(0, 1fr);
  gap: 24px;
  align-items: end;
  margin-bottom: 24px;
  padding-top: 2px;
}

.work-flat-section-head .work-flat-eyebrow {
  grid-column: 1;
  margin-bottom: 0;
}

.work-flat-section-head h2 {
  grid-column: 1;
  margin: 0;
  font-size: 20px;
  line-height: 1.1;
  letter-spacing: 0;
  color: #000000;
}

.work-flat-section-head p {
  grid-column: 2;
  grid-row: 1 / span 2;
  max-width: 640px;
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--flat-muted);
}

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

.work-flat-region-card,
.work-flat-flow-item,
.work-flat-agent-panel,
.work-flat-trust-list a {
  min-width: 0;
  background: var(--flat-panel);
  border: 1px solid var(--flat-line-soft);
  border-radius: 4px;
  box-shadow: var(--flat-shadow);
}

.work-flat-region-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 232px;
  padding: 24px;
  isolation: isolate;
  --region-line-art-opacity: 0.16;
  --region-line-art-scale: 1;
  --region-line-art-y: 0px;
  --region-content-wash-opacity: 1;
  transition: background 150ms ease, border-color 150ms ease;
}

.work-flat-region-card.has-room-background {
  --region-line-art-opacity: 0.2;
}

.work-flat-region-card.is-room-landing {
  border-color: rgba(36, 112, 103, 0.34);
}

.work-flat-region-card:hover {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.16);
  box-shadow: var(--flat-shadow);
  transform: none;
}

.work-flat-region-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: var(--region-line-art);
  background-repeat: no-repeat;
  background-position: center 106%;
  background-size: 116% auto;
  opacity: var(--region-line-art-opacity, 0.16);
  filter: grayscale(1) contrast(1.16);
  transform: translate3d(0, var(--region-line-art-y, 0px), 0) scale(var(--region-line-art-scale, 1));
  transform-origin: 50% 72%;
  pointer-events: none;
  transition: opacity 120ms linear, transform 120ms linear, filter 120ms linear;
}

.work-flat-region-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.72) 48%, rgba(255, 255, 255, 0.94));
  opacity: var(--region-content-wash-opacity, 1);
  pointer-events: none;
  transition: opacity 120ms linear;
}

.work-flat-region-card > * {
  position: relative;
  z-index: 1;
}

.work-flat-region-card > span {
  align-self: flex-end;
  min-width: 54px;
  max-width: 100%;
  height: 24px;
  display: inline-grid;
  place-items: center;
  margin-bottom: 30px;
  padding: 0 8px;
  overflow: hidden;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 10px;
  font-weight: 700;
  color: var(--flat-muted);
  background: var(--flat-surface-low);
  border-radius: 2px;
  box-shadow: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.work-flat-region-card h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
  color: #000000;
  overflow-wrap: anywhere;
}

.work-flat-region-card p {
  margin: 12px 0 18px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--flat-muted);
  overflow-wrap: anywhere;
}

.work-flat-region-description {
  display: -webkit-box;
  overflow: hidden;
  white-space: pre-line;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.work-flat-region-card.is-empty {
  min-height: 184px;
}

.work-flat-card-links {
  margin-top: auto;
}

.work-flat-card-links a {
  min-height: 36px;
  padding: 0 12px;
  font-size: 12px;
  color: #000000;
  background: transparent;
  border: 1px solid var(--flat-line-soft);
  border-radius: 2px;
}

.work-flat-flow-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  padding: 32px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--flat-line-soft);
  border-radius: 4px;
  box-shadow: var(--flat-shadow);
}

.work-flat-flow-grid::before {
  content: "";
  position: absolute;
  left: 48px;
  right: 48px;
  top: 56px;
  height: 1px;
  background: var(--flat-line-soft);
}

.work-flat-flow-item {
  display: block;
  position: relative;
  padding: 84px 16px 0;
  overflow: hidden;
  text-align: center;
  background: transparent;
  border: 0;
  box-shadow: none;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.work-flat-flow-item::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 14px;
  width: 48px;
  height: 48px;
  background: #ffffff;
  border: 1px solid #d7d7d7;
  border-radius: 8px;
  opacity: 1;
  transform: translateX(-50%);
}

.work-flat-flow-icon {
  position: absolute;
  left: 50%;
  top: 14px;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  color: #000000;
  transform: translateX(-50%);
}

.work-flat-flow-item:nth-child(even) .work-flat-flow-icon {
  color: #000000;
}

.work-flat-flow-icon svg {
  display: block;
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.work-flat-flow-item:hover {
  background: transparent;
  border-color: transparent;
  transform: none;
}

.work-flat-flow-item > span:not(.work-flat-flow-icon),
.work-flat-trust-list span {
  display: block;
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 800;
  color: #000000;
}

.work-flat-flow-item strong,
.work-flat-trust-list strong {
  display: block;
  font-size: 17px;
  line-height: 1.35;
}

.work-flat-flow-item small {
  display: block;
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--flat-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.work-flat-split {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.92fr);
  gap: 14px;
}

.work-flat-agent-panel {
  position: relative;
  padding: 28px;
  color: var(--flat-ink);
  background: rgba(255, 255, 255, 0.94);
  overflow: hidden;
  box-shadow: var(--flat-shadow);
}

.work-flat-agent-panel::after {
  content: "";
  position: absolute;
  right: 24px;
  bottom: 24px;
  width: 180px;
  height: 56px;
  background: radial-gradient(rgba(0, 0, 0, 0.12) 1px, transparent 1px);
  background-size: 8px 8px;
  opacity: 0.36;
  pointer-events: none;
}

.work-flat-agent-panel > * {
  position: relative;
  z-index: 1;
}

.work-flat-agent-panel .work-flat-eyebrow {
  color: var(--flat-muted);
}

.work-flat-agent-panel h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.1;
  color: #000000;
}

.work-flat-agent-panel p {
  max-width: 720px;
  margin: 14px 0 22px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--flat-muted);
}

.work-flat-agent-actions a {
  min-height: 36px;
  font-size: 12px;
  color: #000000;
  background: transparent;
  border: 1px solid var(--flat-line-soft);
  border-radius: 2px;
}

.work-flat-trust-list {
  display: grid;
  gap: 14px;
}

.work-flat-trust-list a {
  position: relative;
  display: block;
  padding: 22px 22px 22px 24px;
  overflow: hidden;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.work-flat-trust-list a::before {
  content: "";
  position: absolute;
  inset: 18px auto 18px 0;
  width: 3px;
  background: #000000;
  border-radius: 0;
}

.work-flat-trust-list a:hover {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.14);
  transform: none;
}

@media (max-width: 1100px) {
  .work-flat-topbar {
    grid-template-columns: 1fr;
    padding-right: 28px;
  }

  .work-shell.is-flat-mode .work-mode-switch {
    top: auto;
    right: max(16px, env(safe-area-inset-right));
    bottom: max(16px, env(safe-area-inset-bottom));
  }

  .work-flat-hero,
  .work-flat-split {
    grid-template-columns: 1fr;
  }

  .work-flat-hero {
    padding: 36px;
  }

  .work-flat-region-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .work-flat-flow-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .work-flat-flow-grid::before {
    display: none;
  }
}

@media (max-width: 720px) {
  .work-mode-switch {
    right: 12px;
  }

  .work-mode-switch-label {
    display: none;
  }

  .work-mode-switch-button {
    min-width: 48px;
    padding: 0 10px;
  }

  .work-shell.is-flat-mode .work-mode-switch {
    top: 14px;
    right: max(12px, env(safe-area-inset-right));
    bottom: auto;
  }

  .work-shell.is-flat-mode.is-mobile-work-menu-open .work-flat-shell {
    transform: translateX(min(286px, 78vw));
  }

  .work-flat-main {
    width: calc(100% - 36px);
    padding-top: 20px;
    padding-bottom: 32px;
    overflow: hidden;
  }

  .work-flat-footer {
    display: grid;
    justify-items: flex-start;
    justify-content: stretch;
    gap: 4px;
    width: calc(100% - 36px);
    margin-top: 18px;
    padding-bottom: calc(28px + env(safe-area-inset-bottom));
    font-size: 11px;
    line-height: 1.55;
    text-align: left;
  }

  .work-flat-footer span {
    display: flex;
    min-height: 18px;
    width: 100%;
    align-items: center;
    overflow-wrap: anywhere;
  }

  .work-flat-footer .work-beian-link {
    align-items: center;
    justify-content: flex-start;
  }

  .work-flat-topbar {
    grid-template-columns: 1fr;
    min-height: 64px;
    padding: 12px max(14px, env(safe-area-inset-right)) 12px calc(max(14px, env(safe-area-inset-left)) + 58px);
  }

  .work-flat-nav {
    display: none;
  }

  .work-flat-user {
    display: none;
  }

  .work-flat-hero {
    min-height: auto;
    padding: 26px 18px;
  }

  .work-flat-hero::before {
    left: 18px;
    top: 34px;
    width: 7px;
    height: 7px;
  }

  .work-flat-hero::after {
    display: none;
  }

  .work-flat-hero h1 {
    max-width: 100%;
    font-size: 28px;
    line-height: 1.12;
    word-break: break-all;
  }

  .work-flat-hero p {
    max-width: 100%;
    font-size: 14px;
    line-height: 1.7;
    word-break: break-all;
  }

  .work-flat-hero-actions {
    display: grid;
    grid-template-columns: 1fr;
    max-width: 100%;
  }

  .work-flat-button {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .work-flat-auth-strip,
  .work-flat-section-head,
  .work-flat-region-grid,
  .work-flat-flow-grid {
    grid-template-columns: 1fr;
  }

  .work-flat-section-head p,
  .work-flat-section-head h2,
  .work-flat-section-head .work-flat-eyebrow {
    grid-column: 1;
    grid-row: auto;
  }

  .work-flat-auth-strip {
    align-items: start;
  }

  .work-flat-strip-actions,
  .work-flat-agent-actions,
  .work-flat-card-links {
    display: grid;
    grid-template-columns: 1fr;
  }

  .work-flat-region-card {
    min-height: 220px;
  }
}

.map-canvas {
  display: block;
  width: 100%;
  height: 100dvh;
  min-height: 100dvh;
  overscroll-behavior: none;
  overscroll-behavior-x: none;
  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: 6;
  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;
  gap: 9px;
  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-logo {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  background: url("/assets/logo-light.svg") center / contain no-repeat;
}

.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-home-subtitle {
  max-width: min(92vw, 680px);
  margin: -4px 0 2px;
  color: rgba(255, 255, 255, 0.68);
  font: 500 14px/1.85 "PingFang SC", "Microsoft YaHei", sans-serif;
}

.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-agent-brief {
  width: min(100%, 760px);
  display: grid;
  gap: 0;
  margin-top: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)),
    rgba(4, 4, 6, 0.78);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(12px);
  text-align: left;
}

.work-auth-agent-brief[open] {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(4, 4, 6, 0.8);
}

.work-auth-agent-brief-summary {
  position: relative;
  display: grid;
  gap: 6px;
  padding: 14px 48px 14px 18px;
  list-style: none;
  cursor: pointer;
}

.work-auth-agent-brief-summary::-webkit-details-marker {
  display: none;
}

.work-auth-agent-brief-summary::before,
.work-auth-agent-brief-summary::after {
  content: "";
  position: absolute;
  right: 20px;
  top: 50%;
  width: 10px;
  height: 1px;
  background: rgba(255, 255, 255, 0.58);
  transform-origin: center;
  transition: transform 180ms ease, opacity 180ms ease, background 180ms ease;
}

.work-auth-agent-brief-summary::before {
  transform: translateY(-50%) rotate(45deg);
}

.work-auth-agent-brief-summary::after {
  transform: translateY(-50%) rotate(-45deg);
}

.work-auth-agent-brief[open] .work-auth-agent-brief-summary::before {
  transform: translateY(-50%) rotate(-45deg);
}

.work-auth-agent-brief[open] .work-auth-agent-brief-summary::after {
  transform: translateY(-50%) rotate(45deg);
}

.work-auth-agent-brief-summary:hover::before,
.work-auth-agent-brief-summary:hover::after,
.work-auth-agent-brief-summary:focus-visible::before,
.work-auth-agent-brief-summary:focus-visible::after {
  background: rgba(255, 255, 255, 0.84);
}

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

.work-auth-agent-brief-summary-copy {
  color: rgba(255, 255, 255, 0.78);
  font-size: 10px;
  font: 500 12px/1.6 "PingFang SC", "Microsoft YaHei", sans-serif;
}

.work-auth-agent-brief-body {
  display: grid;
  gap: 12px;
  padding: 0 18px 16px;
}

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

.work-auth-agent-brief-title,
.work-auth-agent-brief-copy,
.work-auth-agent-brief-footnote {
  margin: 0;
}

.work-auth-agent-brief-title {
  color: rgba(255, 255, 255, 0.94);
  font: 500 18px/1.45 "PingFang SC", "Microsoft YaHei", sans-serif;
}

.work-auth-agent-brief-copy {
  color: rgba(255, 255, 255, 0.72);
  font: 500 12px/1.75 "PingFang SC", "Microsoft YaHei", sans-serif;
}

.work-auth-agent-brief-copy strong {
  color: rgba(255, 255, 255, 0.92);
  font-weight: 700;
}

.work-auth-agent-brief-copy a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration-color: rgba(255, 255, 255, 0.28);
  text-underline-offset: 2px;
}

.work-auth-agent-brief-copy a:hover,
.work-auth-agent-brief-copy a:focus-visible {
  color: rgba(255, 255, 255, 0.98);
  text-decoration-color: rgba(255, 255, 255, 0.54);
}

.work-auth-agent-brief-copy code {
  padding: 1px 5px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.92);
  font: 600 11px/1.4 "JetBrains Mono", "Cascadia Code", monospace;
}

.work-auth-agent-brief-copy-en {
  color: rgba(255, 255, 255, 0.54);
  font-family: "JetBrains Mono", "Cascadia Code", monospace;
  letter-spacing: 0.01em;
}

.work-auth-agent-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.work-auth-agent-link {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.86);
  font: 600 10px/1 "JetBrains Mono", "Cascadia Code", monospace;
  letter-spacing: 0.06em;
  text-decoration: none;
  transition:
    transform 180ms ease,
    background 180ms ease,
    border-color 180ms ease,
    color 180ms ease;
}

.work-auth-agent-link:hover,
.work-auth-agent-link:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.96);
}

.work-auth-agent-brief-footnote {
  color: rgba(255, 255, 255, 0.42);
  font: 500 10px/1.7 "JetBrains Mono", "Cascadia Code", monospace;
  letter-spacing: 0.02em;
}

.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-footer a {
  color: rgba(255, 255, 255, 0.62);
  text-decoration: none;
  pointer-events: auto;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.work-auth-gate-footer a:hover,
.work-auth-gate-footer a:focus-visible {
  color: rgba(255, 255, 255, 0.88);
  border-bottom-color: rgba(255, 255, 255, 0.42);
}

.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);
  isolation: isolate;
}

.work-auth-gate.is-mobile-nav-open .work-auth-gate-dialog {
  z-index: 1;
}

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

.work-auth-gate-dialog.is-upload-active {
  min-height: 468px;
}

.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 360ms linear, opacity 360ms linear, filter 360ms linear;
}

.work-auth-card.is-upload-target {
  transform-origin: center center;
  will-change: transform, opacity, filter;
}

.work-auth-card.is-upload-target > * {
  transition: opacity 140ms linear, transform 140ms linear;
}

.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-upload-sequence {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 22px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 320ms ease, transform 320ms ease;
}

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

.work-auth-gate-dialog.is-upload-active .work-auth-upload-sequence {
  opacity: 1;
}

.work-auth-upload-status {
  display: grid;
  justify-items: center;
  gap: 10px;
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 180ms linear, transform 240ms linear;
}

.work-auth-upload-status-line {
  width: min(240px, calc(100vw - 160px));
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.84) 18%, rgba(255, 255, 255, 0.84) 82%, rgba(255, 255, 255, 0));
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.18);
  transform-origin: center center;
  transition: opacity 180ms linear, transform 360ms linear;
}

.work-auth-upload-copy {
  color: rgba(255, 255, 255, 0.82);
  font: 500 11px/1.5 "JetBrains Mono", "Cascadia Code", monospace;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.work-auth-upload-preview-shell {
  display: grid;
  justify-items: center;
  gap: 12px;
  opacity: 0;
  transform: none;
  transition: opacity 180ms linear;
}

.work-auth-upload-preview-frame {
  position: relative;
  width: min(284px, calc(100vw - 124px));
  aspect-ratio: 1 / 1.16;
  overflow: hidden;
  border: 1px solid rgba(116, 255, 173, 0.26);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(222, 255, 235, 0.1), rgba(64, 255, 142, 0.04)),
    rgba(4, 16, 10, 0.22);
  box-shadow:
    0 22px 70px rgba(0, 0, 0, 0.32),
    0 0 34px rgba(44, 255, 128, 0.08),
    inset 0 0 0 1px rgba(168, 255, 206, 0.08);
  backdrop-filter: blur(20px);
  opacity: 0;
  transform: none;
  transition:
    opacity 180ms linear,
    box-shadow 360ms linear,
    border-color 360ms linear,
    background 360ms linear;
}

.work-auth-upload-preview-frame::before {
  content: "";
  position: absolute;
  inset: 16px;
  border: 1px solid rgba(164, 255, 205, 0.14);
  border-radius: 18px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 180ms linear 60ms;
}

.work-auth-upload-preview-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 22%, rgba(156, 255, 199, 0.16), transparent 42%),
    linear-gradient(180deg, rgba(118, 255, 178, 0.05), transparent 44%, rgba(100, 255, 162, 0.02));
  pointer-events: none;
  opacity: 0;
  transition: opacity 180ms linear 40ms;
}

.work-auth-upload-canvas {
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 200ms linear 50ms;
}

.work-auth-upload-overlay {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  mix-blend-mode: screen;
  transition: opacity 220ms linear 60ms;
}

.work-auth-upload-preview-caption {
  display: grid;
  gap: 3px;
  justify-items: center;
  color: rgba(131, 255, 182, 0.52);
  text-align: center;
  opacity: 0;
  transform: translateY(-12px);
  transition: opacity 180ms linear 60ms, transform 240ms linear 60ms;
}

.work-auth-upload-preview-caption span:first-child {
  font: 500 11px/1.5 "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0.08em;
  color: rgba(214, 255, 228, 0.84);
}

.work-auth-upload-preview-caption span:last-child {
  font: 500 9px/1.5 "JetBrains Mono", "Cascadia Code", monospace;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(104, 255, 156, 0.72);
}

.work-auth-gate.is-auth-uploading .work-auth-card.is-upload-target > * {
  opacity: 0;
  transform: translateY(14px) scale(0.98);
}

.work-auth-gate[data-auth-upload-stage="collapsing"] .work-auth-card.is-upload-target,
.work-auth-gate[data-auth-upload-stage="line"] .work-auth-card.is-upload-target,
.work-auth-gate[data-auth-upload-stage="preview"] .work-auth-card.is-upload-target {
  box-shadow:
    0 12px 36px rgba(0, 0, 0, 0.18),
    inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  filter: saturate(0.75);
}

.work-auth-gate[data-auth-upload-stage="collapsing"] .work-auth-card.is-upload-target {
  transform: scaleY(0.04);
}

.work-auth-gate[data-auth-upload-stage="line"] .work-auth-card.is-upload-target,
.work-auth-gate[data-auth-upload-stage="preview"] .work-auth-card.is-upload-target {
  opacity: 0.66;
  transform: scaleY(0.022);
}

.work-auth-gate[data-auth-upload-stage="line"] .work-auth-upload-status,
.work-auth-gate[data-auth-upload-stage="preview"] .work-auth-upload-status {
  opacity: 1;
  transform: translateY(-54px);
}

.work-auth-gate[data-auth-upload-stage="preview"] .work-auth-upload-preview-shell {
  opacity: 1;
}

.work-auth-gate[data-auth-upload-stage="preview"] .work-auth-upload-status-line {
  opacity: 0.18;
  transform: scaleX(1.08);
}

.work-auth-gate[data-auth-upload-stage="preview"] .work-auth-upload-preview-frame {
  opacity: 1;
  border-radius: 26px;
}

.work-auth-gate[data-auth-upload-stage="preview"] .work-auth-upload-canvas {
  opacity: 1;
}

.work-auth-gate[data-auth-upload-stage="preview"] .work-auth-upload-overlay {
  opacity: 1;
}

.work-auth-gate[data-auth-upload-stage="preview"] .work-auth-upload-preview-frame::before,
.work-auth-gate[data-auth-upload-stage="preview"] .work-auth-upload-preview-frame::after,
.work-auth-gate[data-auth-upload-stage="preview"] .work-auth-upload-preview-caption {
  opacity: 1;
}

.work-auth-gate[data-auth-upload-stage="preview"] .work-auth-upload-preview-caption {
  transform: translateY(0);
}

.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-agent-inline {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.work-auth-agent-inline-title,
.work-auth-agent-inline-copy {
  margin: 0;
}

.work-auth-agent-inline-title {
  color: rgba(255, 255, 255, 0.9);
  font: 700 11px/1.4 "JetBrains Mono", "Cascadia Code", monospace;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.work-auth-agent-inline-copy {
  color: rgba(255, 255, 255, 0.68);
  font: 500 11px/1.7 "PingFang SC", "Microsoft YaHei", sans-serif;
}

.work-auth-agent-inline a {
  color: rgba(255, 255, 255, 0.92);
  text-decoration-color: rgba(255, 255, 255, 0.36);
}

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

.work-auth-form[hidden],
.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-password-field-shell {
  position: relative;
  display: block;
  min-width: 0;
}

.work-auth-field .work-password-field-shell {
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: 0;
  text-transform: none;
}

.work-auth-field .work-password-field-shell input {
  padding-right: 48px;
}

.work-password-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.54);
  background: rgba(255, 255, 255, 0.075);
  transform: translateY(-50%);
  cursor: pointer;
}

.work-password-toggle:hover,
.work-password-toggle:focus-visible,
.work-password-toggle.is-visible {
  color: #080808;
  background: rgba(255, 255, 255, 0.92);
}

.work-password-toggle svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.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-agreement a {
  color: rgba(255, 255, 255, 0.92);
  text-decoration-color: rgba(255, 255, 255, 0.36);
}

.work-auth-agreement a:hover,
.work-auth-agreement a:focus-visible {
  text-decoration: underline;
}

.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-passkey-button {
  width: 100%;
  min-height: 42px;
  margin-top: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 0;
  color: rgba(255, 255, 255, 0.86);
  background: rgba(255, 255, 255, 0.055);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.work-auth-passkey-button:hover,
.work-auth-passkey-button:focus-visible {
  color: #080808;
  background: rgba(255, 255, 255, 0.94);
}

.work-auth-passkey-panel {
  display: grid;
  gap: 11px;
  margin-top: 22px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.055);
}

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

.work-auth-passkey-eyebrow {
  color: rgba(255, 255, 255, 0.34);
  font: 800 9px/1.2 "JetBrains Mono", monospace;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.work-auth-passkey-panel strong {
  color: rgba(255, 255, 255, 0.94);
  font-size: 18px;
  line-height: 1.15;
}

.work-auth-passkey-panel p {
  margin: 0;
  color: rgba(255, 255, 255, 0.52);
  font-size: 12px;
  line-height: 1.6;
}

.work-auth-passkey-primary {
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  color: #080808;
  background: rgba(255, 255, 255, 0.92);
  font-size: 13px;
  font-weight: 900;
}

.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.is-mobile-nav-open .work-auth-gate-nav {
    z-index: 12;
  }

  .work-auth-gate.is-mobile-nav-open .work-auth-gate-nav-shell {
    z-index: 12;
  }

  .work-auth-gate.is-mobile-nav-open .work-auth-gate-dialog {
    z-index: 1;
    pointer-events: none;
  }

  .work-auth-gate.is-mobile-nav-open .work-auth-gate-dialog .work-auth-card,
  .work-auth-gate.is-mobile-nav-open .work-auth-gate-dialog .work-auth-form,
  .work-auth-gate.is-mobile-nav-open .work-auth-gate-dialog .work-auth-card-footer {
    pointer-events: none;
  }

  .work-auth-mobile-menu {
    position: fixed;
    top: 70px;
    right: 14px;
    left: auto;
    z-index: 999;
    display: grid;
    width: min(240px, calc(100vw - 28px));
    max-width: calc(100vw - 28px);
    padding: 10px 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    background: rgba(7, 7, 8, 0.98);
    box-shadow: 0 22px 48px rgba(0, 0, 0, 0.34);
    opacity: 0;
    visibility: hidden;
    transform: translateX(14px) translateY(-8px);
    pointer-events: none;
    transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
  }

  .work-auth-mobile-menu[hidden] {
    display: grid !important;
  }

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

  .work-auth-mobile-menu-link {
    appearance: none;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-height: 44px;
    width: 100%;
    border: 0;
    padding: 0 16px;
    background: transparent;
    color: rgba(255, 255, 255, 0.88);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-align: left;
    cursor: pointer;
  }

  .work-auth-mobile-menu-link:hover,
  .work-auth-mobile-menu-link:focus-visible,
  .work-auth-mobile-menu-link.is-active {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 1);
  }

  .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 {
    display: none;
  }

  .work-auth-gate.is-mobile-nav-open .work-auth-gate-nav-menu {
    display: none;
  }

  .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-agent-inline {
    display: none;
  }
}

.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-home-subtitle {
    font-size: 13px;
    line-height: 1.8;
  }

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

  .work-auth-agent-inline {
    display: none;
  }

  .work-auth-gate-dialog.is-upload-active {
    min-height: 424px;
  }

  .work-auth-agent-brief {
    width: min(100%, 100%);
  }

  .work-auth-agent-brief-summary {
    padding: 14px 42px 14px 16px;
  }

  .work-auth-agent-brief-body {
    padding: 0 16px 14px;
  }

  .work-auth-agent-brief-title {
    font-size: 16px;
  }

  .work-auth-agent-links {
    gap: 8px;
  }

  .work-auth-agent-link {
    min-height: 32px;
    padding: 0 10px;
    font-size: 9px;
  }

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

  .work-auth-form {
    gap: 16px;
    margin-top: 18px;
  }

  .work-auth-field {
    gap: 8px;
  }

  .work-auth-field span {
    color: rgba(255, 255, 255, 0.56);
    font-size: 10px;
  }

  .work-auth-field input {
    min-height: 50px;
    padding: 13px 14px;
    border-color: rgba(255, 255, 255, 0.22);
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.08)),
      rgba(12, 12, 14, 0.96);
    color: rgba(255, 255, 255, 0.98);
    font-size: 14px;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.12),
      0 10px 24px rgba(0, 0, 0, 0.2);
  }

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

  .work-auth-field input:focus {
    border-color: rgba(255, 255, 255, 0.88);
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1)),
      rgba(18, 18, 20, 0.98);
    box-shadow:
      0 0 0 3px rgba(255, 255, 255, 0.16),
      0 14px 30px rgba(0, 0, 0, 0.24);
  }

  .work-auth-agreement {
    position: relative;
    gap: 12px;
    min-height: 58px;
    padding: 12px 12px 12px 54px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.72);
    font-size: 11px;
    line-height: 1.65;
    letter-spacing: 0.02em;
    cursor: pointer;
    touch-action: manipulation;
  }

  .work-auth-agreement::before {
    content: "";
    position: absolute;
    left: 14px;
    top: 16px;
    width: 24px;
    height: 24px;
    border: 2px solid rgba(255, 255, 255, 0.58);
    background: rgba(0, 0, 0, 0.55);
    box-shadow:
      inset 0 0 0 2px rgba(0, 0, 0, 0.38),
      0 0 0 1px rgba(255, 255, 255, 0.08);
  }

  .work-auth-agreement::after {
    content: "";
    position: absolute;
    left: 22px;
    top: 21px;
    width: 8px;
    height: 14px;
    border: solid #000000;
    border-width: 0 3px 3px 0;
    opacity: 0;
    transform: rotate(42deg) scale(0.74);
    transition: opacity 140ms ease, transform 140ms ease;
  }

  .work-auth-agreement input {
    position: absolute;
    left: 10px;
    top: 12px;
    width: 36px;
    height: 36px;
    margin: 0;
    opacity: 0.01;
    cursor: pointer;
  }

  .work-auth-agreement:has(input:checked) {
    border-color: rgba(255, 255, 255, 0.82);
    background: rgba(255, 255, 255, 0.16);
    color: rgba(255, 255, 255, 0.92);
  }

  .work-auth-agreement:has(input:checked)::before {
    border-color: rgba(255, 255, 255, 0.96);
    background: #ffffff;
    box-shadow:
      0 0 0 3px rgba(255, 255, 255, 0.16),
      0 10px 20px rgba(0, 0, 0, 0.26);
  }

  .work-auth-agreement:has(input:checked)::after {
    opacity: 1;
    transform: rotate(42deg) scale(1);
  }

  .work-auth-agreement span {
    min-width: 0;
  }

  .work-auth-agreement a {
    color: rgba(255, 255, 255, 1);
    font-weight: 800;
    text-decoration-color: rgba(255, 255, 255, 0.7);
  }

  .work-auth-upload-status-line {
    width: min(188px, calc(100vw - 120px));
  }

  .work-auth-upload-copy {
    font-size: 10px;
    letter-spacing: 0.12em;
  }

  .work-auth-upload-preview-frame {
    width: min(236px, calc(100vw - 116px));
    border-radius: 22px;
  }

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

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

  .work-auth-gate {
    padding-bottom: max(132px, calc(104px + env(safe-area-inset-bottom)));
  }

  .work-auth-gate-meta {
    bottom: calc(96px + env(safe-area-inset-bottom));
    width: calc(100% - 32px);
    grid-auto-flow: row;
    gap: 5px;
  }

  .work-auth-gate-footer {
    right: 16px;
    bottom: calc(14px + env(safe-area-inset-bottom));
    left: 16px;
    width: auto;
    max-width: none;
    gap: 3px;
    transform: none;
  }

  .work-auth-gate-footer span {
    width: 100%;
    font-size: 8px;
    line-height: 1.45;
    letter-spacing: 0.04em;
    overflow-wrap: anywhere;
  }

  .work-auth-gate-footer .work-beian-link {
    justify-content: center;
  }

}

.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;
  grid-template-columns: 34px minmax(0, 1fr);
  grid-template-areas:
    "logo brand"
    "logo sub";
  column-gap: 10px;
  row-gap: 6px;
  align-items: center;
}

.work-loading-logo {
  grid-area: logo;
  width: 34px;
  height: 34px;
  background: url("/assets/logo-light.svg") center / contain no-repeat;
}

.work-loading-brand {
  grid-area: 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 {
  grid-area: 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-shell.is-flat-mode.is-loading-3d-workspace .work-loading {
  color: rgba(13, 17, 23, 0.92);
  background:
    radial-gradient(circle at 50% 44%, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0) 36%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.3));
  backdrop-filter: blur(14px) saturate(1.08);
}

.work-shell.is-flat-mode.is-loading-3d-workspace .work-loading::before {
  background:
    radial-gradient(circle, rgba(12, 18, 28, 0.11) 0 0.6px, transparent 0.8px) 0 0 / 46px 46px,
    repeating-linear-gradient(180deg, rgba(12, 18, 28, 0.045) 0 1px, rgba(12, 18, 28, 0) 1px 6px);
  opacity: 0.18;
}

.work-shell.is-flat-mode.is-loading-3d-workspace .work-loading::after {
  background:
    radial-gradient(circle at center, transparent 0 42%, rgba(255, 255, 255, 0.06) 64%, rgba(255, 255, 255, 0.1) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0));
}

.work-shell.is-flat-mode.is-loading-3d-workspace .work-loading-shell::before {
  border-top-color: rgba(13, 17, 23, 0.22);
  border-right-color: rgba(13, 17, 23, 0.22);
}

.work-shell.is-flat-mode.is-loading-3d-workspace .work-loading-shell::after {
  border-left-color: rgba(13, 17, 23, 0.22);
  border-bottom-color: rgba(13, 17, 23, 0.22);
}

.work-shell.is-flat-mode.is-loading-3d-workspace .work-loading-logo {
  background-image: url("/assets/logo.svg");
  filter: drop-shadow(0 6px 14px rgba(13, 17, 23, 0.14));
}

.work-shell.is-flat-mode.is-loading-3d-workspace .work-loading-brand {
  color: rgba(13, 17, 23, 0.82);
}

.work-shell.is-flat-mode.is-loading-3d-workspace .work-loading-brand-sub,
.work-shell.is-flat-mode.is-loading-3d-workspace .work-loading-detail {
  color: rgba(13, 17, 23, 0.58);
}

.work-shell.is-flat-mode.is-loading-3d-workspace .work-loading-loader-outer {
  border-color: rgba(13, 17, 23, 0.16);
}

.work-shell.is-flat-mode.is-loading-3d-workspace .work-loading-loader-tilt {
  border-color: rgba(13, 17, 23, 0.3);
}

.work-shell.is-flat-mode.is-loading-3d-workspace .work-loading-loader-core {
  border-color: rgba(13, 17, 23, 0.78);
}

.work-shell.is-flat-mode.is-loading-3d-workspace .work-loading-title {
  color: rgba(13, 17, 23, 0.9);
}

.work-shell.is-flat-mode.is-loading-3d-workspace .work-loading-percent {
  color: rgba(13, 17, 23, 0.78);
}

.work-shell.is-flat-mode.is-loading-3d-workspace .work-loading-track {
  background: rgba(13, 17, 23, 0.16);
}

.work-shell.is-flat-mode.is-loading-3d-workspace .work-loading-bar {
  background: linear-gradient(90deg, rgba(13, 17, 23, 0.96), rgba(13, 17, 23, 0.5));
  box-shadow: 0 0 14px rgba(13, 17, 23, 0.12);
}

.work-shell.is-flat-mode.is-loading-3d-workspace .work-loading-status-label,
.work-shell.is-flat-mode.is-loading-3d-workspace .work-loading-footer,
.work-shell.is-flat-mode.is-loading-3d-workspace .work-loading-version {
  color: rgba(13, 17, 23, 0.42);
}

.work-shell.is-flat-mode.is-loading-3d-workspace .work-loading-status-value,
.work-shell.is-flat-mode.is-loading-3d-workspace .work-loading-meta {
  color: rgba(13, 17, 23, 0.62);
}

.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(226px, calc(100vw - 36px));
  min-height: 312px;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto 1fr;
  gap: 7px;
  justify-items: stretch;
  padding: 12px 15px 14px;
  border-radius: 30px;
  border: 4px solid #080808;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 246, 238, 0.96)),
    radial-gradient(circle at 72% 14%, rgba(233, 232, 221, 0.9), transparent 22%);
  box-shadow:
    0 18px 0 rgba(0, 0, 0, 0.04),
    0 28px 54px rgba(4, 7, 12, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  pointer-events: auto;
  overflow: visible;
  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.is-dialog-portrait {
  width: 96px;
  min-height: 96px;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
  gap: 0;
  padding: 10px;
  border-radius: 22px;
  border-width: 1px;
  background:
    linear-gradient(180deg, rgba(7, 9, 14, 0.92), rgba(12, 14, 20, 0.84));
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.roam-work-badge.is-dialog-portrait::before,
.roam-work-badge.is-dialog-portrait::after,
.roam-work-badge.is-dialog-portrait .roam-work-badge-head,
.roam-work-badge.is-dialog-portrait .roam-work-badge-copy,
.roam-work-badge.is-dialog-portrait .roam-work-badge-footer {
  display: none;
}

.roam-work-badge.is-dialog-portrait .roam-work-badge-portrait {
  display: grid;
  place-items: center;
  width: auto;
  height: auto;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.roam-work-badge.is-dialog-portrait .roam-work-badge-avatar {
  width: 74px;
  height: 74px;
  transform: none;
  border-radius: 18px;
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 12px 24px rgba(0, 0, 0, 0.24);
}

.roam-work-badge::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(122deg, rgba(255, 255, 255, 0.46), transparent 42%),
    radial-gradient(circle at 80% 16%, rgba(229, 228, 218, 0.86), transparent 19%);
  pointer-events: none;
}

.roam-work-badge::after {
  display: none;
}

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

.roam-work-badge-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  min-height: 44px;
}

.roam-work-badge-mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #0b0b0b;
  color: #fff;
  font: 900 14px/1 "Avenir Next", "PingFang SC", sans-serif;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.14);
}

.roam-work-badge-issue {
  display: block;
  padding-top: 1px;
  color: rgba(35, 35, 35, 0.44);
  font: 900 7px/1.2 "JetBrains Mono", "Cascadia Code", monospace;
  letter-spacing: 0.14em;
  text-align: right;
}

.roam-work-badge-copy {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  min-width: 0;
  text-align: left;
}

.roam-work-badge-topline,
.roam-work-badge-row {
  display: block;
  width: 100%;
}

.roam-work-badge-topline-meta {
  display: none;
}

.roam-work-badge-topline > span,
.roam-work-badge-row span {
  display: block;
  margin-bottom: 1px;
  color: rgba(25, 25, 25, 0.46);
  font: 900 7px/1.05 "JetBrains Mono", "Cascadia Code", monospace;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  white-space: nowrap;
}

.roam-work-badge-brand {
  max-width: 100%;
  color: #171717;
  font: 900 10px/1.25 "Avenir Next", "PingFang SC", sans-serif;
  letter-spacing: 0.02em;
  overflow-wrap: anywhere;
}

.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: 0;
  min-width: 0;
  max-width: none;
  color: #171717;
  font: 900 22px/1 "Avenir Next", "PingFang SC", sans-serif;
  letter-spacing: 0;
  white-space: normal;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.roam-work-badge-brand,
.roam-work-badge-row strong {
  min-width: 0;
  max-width: 100%;
  min-height: 0;
  padding: 0;
  border-bottom: 0;
  color: #171717;
  font: 900 10px/1.12 "Avenir Next", "PingFang SC", sans-serif;
  white-space: normal;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.roam-work-badge-row .roam-work-badge-name {
  color: #171717;
  font: 900 22px/1 "Avenir Next", "PingFang SC", sans-serif;
}

.roam-work-badge-role strong {
  color: rgba(20, 20, 20, 0.58);
  font: 900 9px/1.1 "JetBrains Mono", "Cascadia Code", monospace;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.roam-work-badge-rule {
  height: 2px;
  margin: 4px 0 9px;
  border-radius: 999px;
  background: rgba(18, 18, 18, 0.08);
}

.roam-work-badge-portrait {
  display: grid;
  align-items: stretch;
  justify-items: center;
  position: relative;
  justify-self: center;
  width: 140px;
  height: 140px;
  margin: 0 0 2px;
  border: 3px solid #111;
  border-radius: 20px;
  background:
    linear-gradient(180deg, #f7f1e8 0%, #d7e0df 100%),
    radial-gradient(circle at 50% 14%, rgba(255, 255, 255, 0.9), transparent 34%);
  box-shadow:
    0 8px 16px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.74);
  overflow: hidden;
}

.roam-work-badge-verified {
  position: absolute;
  right: 10px;
  bottom: 8px;
  display: inline-flex;
  align-items: center;
  height: 14px;
  padding: 0 7px;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font: 900 6px/1 "JetBrains Mono", "Cascadia Code", monospace;
  letter-spacing: 0.14em;
}

.roam-work-badge-access {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-top: 2px;
}

.roam-work-badge-access-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.roam-work-badge-access-copy span {
  color: rgba(25, 25, 25, 0.45);
  font: 900 7px/1 "JetBrains Mono", "Cascadia Code", monospace;
  letter-spacing: 0.16em;
}

.roam-work-badge-dots {
  display: flex;
  gap: 4px;
}

.roam-work-badge-dots i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #111;
}

.roam-work-badge-dots i:nth-child(2) {
  opacity: 0.6;
}

.roam-work-badge-dots i:nth-child(3) {
  opacity: 0.32;
}

.roam-work-badge-menu-button {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  gap: 4px;
  padding: 9px;
  border: 3px solid #1a1a1a;
  border-radius: 6px;
  background: #eef2ee;
  color: #111;
  cursor: pointer;
  box-shadow: inset 0 0 0 5px rgba(255, 255, 255, 0.74);
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.roam-work-badge-menu-button span {
  display: block;
  width: 18px;
  height: 3px;
  border-radius: 999px;
  background: currentColor;
}

.roam-work-badge-menu-button:hover {
  background: #f8faf7;
}

.roam-work-badge-menu-button:active {
  transform: translateY(1px);
}

.roam-work-badge-menu-button.is-active {
  background: #111;
  color: #fff;
  box-shadow: inset 0 0 0 5px rgba(255, 255, 255, 0.1);
}

.roam-work-badge-menu-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.roam-work-badge-footer {
  position: absolute;
  z-index: 1;
  top: calc(100% + 10px);
  left: 0;
  width: min(280px, calc(100vw - 36px));
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
  pointer-events: none;
}

.roam-work-badge-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.roam-work-badge-nav-button {
  min-width: 0;
  height: 24px;
  padding: 0 8px;
  border: 0;
  border-radius: 8px;
  background: rgba(24, 35, 56, 0.08);
  color: #2b394d;
  font: 700 9px/1 "JetBrains Mono", "Cascadia Code", monospace;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.roam-work-badge-nav-button:hover {
  background: rgba(24, 35, 56, 0.12);
}

.roam-work-badge-nav-button:active {
  transform: translateY(1px);
}

.roam-work-badge-nav-button.is-active {
  background: linear-gradient(135deg, #1d2d45, #324863);
  color: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 24px rgba(24, 35, 56, 0.16);
}

.roam-work-badge-nav-button.is-danger {
  background: rgba(141, 80, 52, 0.1);
  color: #7c4931;
}

.roam-work-badge-nav-button.is-danger:hover {
  background: rgba(141, 80, 52, 0.16);
}

.roam-work-badge-nav-button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.roam-agent-panel {
  position: relative;
  display: grid;
  gap: 12px;
  max-height: clamp(180px, calc(100vh - 370px), 430px);
  padding: 14px;
  overflow-y: auto;
  overscroll-behavior: contain;
  pointer-events: auto;
  border-radius: 24px;
  border: 4px solid #080808;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 246, 238, 0.98)),
    radial-gradient(circle at 82% 12%, rgba(229, 228, 218, 0.78), transparent 22%);
  box-shadow:
    0 12px 0 rgba(0, 0, 0, 0.04),
    0 26px 48px rgba(4, 7, 12, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.96);
}

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

.roam-agent-panel-head {
  display: grid;
  gap: 3px;
  padding-bottom: 10px;
  border-bottom: 2px solid rgba(18, 18, 18, 0.08);
}

.roam-agent-panel-eyebrow {
  font: 900 7px/1 "JetBrains Mono", "Cascadia Code", monospace;
  letter-spacing: 0.22em;
  color: rgba(25, 25, 25, 0.46);
}

.roam-agent-panel-title {
  color: #171717;
  font: 900 18px/1.05 "Avenir Next", "PingFang SC", sans-serif;
}

.roam-agent-list {
  display: grid;
  gap: 10px;
}

.roam-work-badge-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 12px;
}

.roam-work-badge-actions button {
  min-height: 38px;
  border: 3px solid #111111;
  border-radius: 14px;
  color: #111111;
  background: rgba(255, 255, 255, 0.92);
  font-size: 12px;
  font-weight: 900;
}

.roam-work-badge-actions button:hover,
.roam-work-badge-actions button:focus-visible {
  color: #ffffff;
  background: #111111;
}

.roam-agent-card {
  min-width: 0;
  display: grid;
  gap: 8px;
  padding: 11px;
  border: 3px solid #111;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(241, 240, 230, 0.92));
  color: #171717;
  text-align: left;
  box-shadow: 0 7px 0 rgba(0, 0, 0, 0.05);
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.roam-agent-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 9px 0 rgba(0, 0, 0, 0.06), 0 14px 24px rgba(0, 0, 0, 0.1);
}

.roam-agent-card.is-active {
  border-color: #111;
  background:
    linear-gradient(180deg, rgba(21, 21, 21, 0.96), rgba(48, 48, 45, 0.96));
  color: #fff;
  box-shadow: 0 9px 0 rgba(0, 0, 0, 0.1), 0 16px 28px rgba(0, 0, 0, 0.18);
}

.roam-agent-card.is-custom {
  border-color: #111;
  background:
    linear-gradient(180deg, rgba(251, 252, 245, 0.96), rgba(235, 238, 228, 0.94));
}

.roam-agent-card.is-active.is-custom {
  background:
    linear-gradient(180deg, rgba(21, 21, 21, 0.96), rgba(48, 48, 45, 0.96));
  color: #fff;
}

.roam-agent-card:disabled {
  cursor: not-allowed;
  opacity: 0.58;
  box-shadow: none;
  transform: none;
}

.roam-agent-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.roam-agent-card-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.roam-agent-card-name {
  color: currentColor;
  font: 900 15px/1.1 "Avenir Next", "PingFang SC", sans-serif;
}

.roam-agent-card-meta {
  font: 900 7px/1 "JetBrains Mono", "Cascadia Code", monospace;
  letter-spacing: 0.2em;
  color: rgba(25, 25, 25, 0.46);
}

.roam-agent-card.is-active .roam-agent-card-meta {
  color: rgba(255, 255, 255, 0.56);
}

.roam-agent-card-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 66px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  border: 2px solid currentColor;
  background: rgba(255, 255, 255, 0.68);
  color: #111;
  font: 900 8px/1 "JetBrains Mono", "Cascadia Code", monospace;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.roam-agent-card.is-active .roam-agent-card-state {
  background: #fff;
  color: #111;
}

.roam-agent-card-state.is-warn {
  background: #fff3e7;
  color: #8d5632;
}

.roam-agent-card-desc {
  color: rgba(23, 23, 23, 0.68);
  font-size: 12px;
  line-height: 1.35;
}

.roam-agent-card.is-active .roam-agent-card-desc {
  color: rgba(255, 255, 255, 0.72);
}

.roam-agent-card-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.roam-agent-card-actions.is-manageable {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.roam-agent-card-action {
  min-width: 0;
  height: 32px;
  padding: 0 10px;
  border: 2px solid #111;
  border-radius: 8px;
  background: #111;
  color: #fff;
  font: 900 10px/1 "JetBrains Mono", "Cascadia Code", monospace;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease, background 160ms ease;
}

.roam-agent-card-action:hover {
  box-shadow: 0 7px 0 rgba(0, 0, 0, 0.08);
}

.roam-agent-card-action:active {
  transform: translateY(1px);
}

.roam-agent-card-action.is-secondary {
  background: #f4f3ea;
  color: #111;
}

.roam-agent-card-action.is-secondary:hover {
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.06);
  background: #fff;
}

.roam-agent-card-action.is-secondary.is-pending {
  background: #fff;
  color: #111;
}

.roam-agent-card-action.is-danger {
  background: #fff3e7;
  color: #8a3535;
}

.roam-agent-card-action.is-danger:hover {
  box-shadow: 0 6px 0 rgba(78, 24, 24, 0.08);
  background: #fff8f1;
}

.roam-agent-card-action:disabled {
  cursor: not-allowed;
  opacity: 0.46;
  box-shadow: none;
  transform: none;
}

.roam-agent-card-manage {
  display: grid;
  gap: 9px;
  padding-top: 10px;
  border-top: 2px solid rgba(18, 18, 18, 0.1);
}

.roam-agent-card-manage-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font: 900 7px/1 "JetBrains Mono", "Cascadia Code", monospace;
  letter-spacing: 0.12em;
  color: rgba(25, 25, 25, 0.48);
}

.roam-agent-card.is-active .roam-agent-card-manage-meta {
  color: rgba(255, 255, 255, 0.58);
}

.roam-agent-card-field {
  display: grid;
  gap: 6px;
}

.roam-agent-card-field span {
  font: 900 7px/1 "JetBrains Mono", "Cascadia Code", monospace;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(25, 25, 25, 0.48);
}

.roam-agent-card.is-active .roam-agent-card-field span {
  color: rgba(255, 255, 255, 0.58);
}

.roam-agent-card-input {
  min-width: 0;
  height: 34px;
  padding: 0 10px;
  border: 2px solid #111;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.78);
  color: #171717;
  font-size: 12px;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.roam-agent-card-input:focus {
  outline: none;
  border-color: #111;
  box-shadow: 0 5px 0 rgba(0, 0, 0, 0.07);
  background: #fff;
}

.roam-agent-card-input:disabled {
  opacity: 0.72;
  cursor: not-allowed;
}

.roam-agent-card-feedback {
  padding: 8px 9px;
  border: 2px solid #111;
  border-radius: 9px;
  background: #eef2ee;
  color: #111;
  font-size: 12px;
  line-height: 1.5;
}

.roam-agent-card-feedback.is-warn {
  background: #fff3e7;
  color: #8d5632;
}

.roam-agent-card-manage-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.roam-work-badge-avatar {
  --badge-avatar-hue: 28;
  position: relative;
  width: 100%;
  height: 170px;
  display: grid;
  place-items: end center;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  pointer-events: none;
  transform: translateY(-24px);
}

.roam-work-badge-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 0;
  filter: saturate(1.16) contrast(1.08) drop-shadow(0 8px 0 rgba(0, 0, 0, 0.08));
}

.roam-work-badge-avatar span {
  position: relative;
  z-index: 1;
  align-self: center;
  justify-self: center;
  font: 900 24px/1 "Avenir Next", "PingFang SC", sans-serif;
  color: rgba(17, 17, 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-shell {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
  justify-items: stretch;
}

.roam-web-modal-chrome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 6px;
}

.roam-web-modal-chrome strong {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  max-width: min(58vw, 560px);
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 248, 240, 0.32);
  background: rgba(31, 22, 15, 0.46);
  color: rgba(255, 248, 240, 0.96);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  backdrop-filter: blur(14px);
}

.roam-web-modal-card {
  position: relative;
  width: min(calc(100vw - 32px), 960px);
  height: min(calc(100vh - 32px), 720px);
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 248, 240, 0.18);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.05), transparent 28%),
    linear-gradient(180deg, rgba(18, 14, 11, 0.98), rgba(10, 8, 7, 0.98));
  box-shadow:
    0 32px 96px rgba(15, 10, 7, 0.26),
    0 0 0 1px rgba(122, 78, 39, 0.08);
}

.roam-web-modal-loading {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  gap: 14px;
  padding: 28px;
  text-align: center;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.06), transparent 24%),
    linear-gradient(180deg, rgba(18, 14, 11, 0.96), rgba(9, 7, 6, 0.98));
  color: rgba(255, 247, 240, 0.94);
  transition: opacity 180ms ease;
}

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

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

.roam-web-modal-loading-spinner {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid rgba(255, 247, 240, 0.18);
  border-top-color: rgba(255, 247, 240, 0.94);
  animation: roamWebModalSpinner 820ms linear infinite;
}

.roam-web-modal-loading-copy {
  display: grid;
  gap: 6px;
}

.roam-web-modal-loading-copy strong {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.roam-web-modal-loading-copy span {
  max-width: 360px;
  color: rgba(255, 247, 240, 0.68);
  font-size: 13px;
  line-height: 1.7;
}

.roam-web-modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  min-width: 66px;
  border: 1px solid rgba(255, 248, 240, 0.28);
  border-radius: 999px;
  padding: 0 13px;
  background: rgba(31, 22, 15, 0.46);
  color: rgba(255, 248, 240, 0.96);
  cursor: pointer;
  backdrop-filter: blur(14px);
}

.roam-web-modal-close:hover {
  background: rgba(31, 22, 15, 0.62);
}

.roam-web-modal-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #ffffff;
  opacity: 1;
  transition: opacity 180ms ease;
}

.roam-web-modal-card.is-loading .roam-web-modal-frame {
  opacity: 0;
}

.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;
}

.work-viewport.is-video-mode .roam-chat-bubble:not(.is-self-dialog) .roam-chat-bubble-text {
  display: grid;
  align-content: center;
  min-height: 42px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.work-viewport.is-video-mode .roam-chat-bubble:not(.is-self-dialog) .roam-chat-bubble-body {
  align-items: center;
}

.work-viewport.is-video-mode .roam-chat-bubble:not(.is-self-dialog) .roam-chat-bubble-line {
  line-height: 1.5;
}

.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-bubble.is-self-dialog {
  left: 50%;
  top: auto;
  bottom: 28px;
  z-index: 6;
  width: fit-content;
  min-width: min(320px, calc(100vw - 48px));
  max-width: min(920px, calc(100vw - 48px));
  transform: translateX(-50%);
  overflow: visible;
}

.roam-chat-bubble.is-self-dialog .roam-chat-bubble-text {
  position: relative;
  z-index: 2;
  box-sizing: border-box;
  display: grid;
  align-content: center;
  width: fit-content;
  min-width: min(320px, calc(100vw - 48px));
  min-height: 92px;
  max-width: min(920px, calc(100vw - 48px));
  padding: 18px 22px 20px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(8, 10, 14, 0.96), rgba(12, 14, 20, 0.9));
  border-color: rgba(255, 255, 255, 0.12);
  color: rgba(247, 251, 255, 0.96);
  box-shadow:
    0 22px 44px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.roam-chat-bubble.is-self-dialog .roam-chat-bubble-text::after {
  display: none;
}

.roam-chat-bubble.is-self-dialog .roam-chat-bubble-label {
  margin-bottom: 10px;
  color: rgba(164, 214, 255, 0.82);
  font: 700 11px/1.2 "JetBrains Mono", "Cascadia Code", monospace;
  letter-spacing: 0.14em;
}

.roam-fps-overlay {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 8;
  min-width: 84px;
  padding: 8px 12px;
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(7, 9, 14, 0.92), rgba(12, 14, 20, 0.84));
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    0 18px 36px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  color: rgba(247, 251, 255, 0.94);
  font: 700 12px/1 "JetBrains Mono", "Cascadia Code", monospace;
  letter-spacing: 0.12em;
  text-align: center;
  pointer-events: none;
}

.roam-fps-overlay[hidden] {
  display: none !important;
}

.work-viewport.is-video-mode .roam-fps-overlay {
  right: 82px;
}

.roam-chat-bubble.is-self-dialog .roam-chat-bubble-line {
  font-size: 16px;
  line-height: 1.75;
  color: inherit;
}

.roam-chat-bubble.is-self-dialog .roam-chat-bubble-file {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(247, 251, 255, 0.94);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.roam-chat-bubble.is-self-dialog .roam-chat-bubble-file-icon {
  background: rgba(140, 198, 255, 0.14);
  color: rgba(182, 221, 255, 0.94);
}

.roam-chat-bubble.is-self-dialog .roam-chat-bubble-file-copy {
  color: rgba(206, 223, 239, 0.72);
}

.roam-hover-badge {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 6;
  width: min(248px, calc(100vw - 40px));
  transform: translate(-50%, -100%);
  pointer-events: none;
}

.roam-hover-badge-card {
  display: grid;
  gap: 10px;
  padding: 11px 12px 12px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(16, 22, 30, 0.96), rgba(18, 26, 35, 0.92)),
    rgba(16, 22, 30, 0.94);
  border: 1px solid rgba(120, 151, 184, 0.22);
  box-shadow:
    0 18px 38px rgba(8, 12, 18, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
}

.roam-hover-badge-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.roam-hover-badge-brand {
  font: 700 10px/1 "JetBrains Mono", "Cascadia Code", monospace;
  letter-spacing: 0.18em;
  color: rgba(206, 223, 239, 0.68);
}

.roam-hover-badge-status {
  flex: 0 0 auto;
  min-width: 54px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(88, 203, 155, 0.14);
  color: #8df1c3;
  text-align: center;
  font: 700 10px/1 "JetBrains Mono", "Cascadia Code", monospace;
  letter-spacing: 0.12em;
}

.roam-hover-badge-status[data-state="syncing"] {
  background: rgba(124, 189, 255, 0.14);
  color: #9ed0ff;
}

.roam-hover-badge-status[data-state="offline"] {
  background: rgba(255, 129, 129, 0.14);
  color: #ffb1b1;
}

.roam-hover-badge-body {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
}

.roam-hover-badge-avatar {
  --hover-badge-hue: 28;
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.24), transparent 42%),
    linear-gradient(135deg, hsl(var(--hover-badge-hue) 72% 58%), hsl(calc(var(--hover-badge-hue) + 30) 64% 46%));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 10px 20px rgba(0, 0, 0, 0.22);
  color: #fdf7ef;
  font: 800 15px/1 "Avenir Next", "Segoe UI", "PingFang SC", sans-serif;
  letter-spacing: 0.05em;
}

.roam-hover-badge-copy {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.roam-hover-badge-name {
  display: block;
  font-size: 16px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #f3f7fb;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.roam-hover-badge-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.roam-hover-badge-row span {
  flex: 0 0 auto;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: rgba(181, 201, 220, 0.58);
}

.roam-hover-badge-row strong {
  min-width: 0;
  font-size: 12px;
  font-weight: 700;
  color: #dce9f5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.roam-remote-menu {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 7;
  width: min(164px, calc(100vw - 32px));
  transform: translate(-50%, -100%);
  pointer-events: auto;
}

.roam-remote-menu-card {
  display: grid;
  gap: 8px;
  padding: 10px 10px 11px;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(18, 25, 33, 0.96), rgba(17, 23, 31, 0.92)),
    rgba(17, 23, 31, 0.94);
  border: 1px solid rgba(124, 151, 180, 0.24);
  box-shadow:
    0 16px 34px rgba(8, 12, 18, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
}

.roam-remote-menu-name {
  display: block;
  font-size: 13px;
  line-height: 1.2;
  color: #f2f7fb;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.roam-remote-menu-action {
  width: 100%;
  height: 34px;
  border: 0;
  border-radius: 11px;
  background: linear-gradient(135deg, #68d4a6, #2f8f76);
  color: #0f1a17;
  font: 700 12px/1 "Avenir Next", "PingFang SC", sans-serif;
  letter-spacing: 0.08em;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 10px 18px rgba(16, 71, 58, 0.28);
}

.roam-remote-menu-action:hover {
  filter: brightness(1.04);
}

.roam-remote-menu-action:active {
  transform: translateY(1px);
}

.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-self-dialog {
  width: min(920px, calc(100vw - 48px));
  padding: 14px 16px;
  border-radius: 20px;
  border-color: rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(8, 10, 14, 0.96), rgba(12, 14, 20, 0.9));
  box-shadow:
    0 22px 44px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  overflow: visible;
}

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

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

.roam-chat-self-portrait {
  position: absolute;
  left: 18px;
  bottom: calc(100% - 12px);
  z-index: 1;
  width: 150px;
  height: 236px;
  display: grid;
  place-items: end center;
  background: transparent;
  pointer-events: none;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.24));
}

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

.roam-chat-self-portrait-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.roam-chat-self-portrait span {
  position: relative;
  z-index: 1;
  font: 700 28px/1 "Avenir Next", "PingFang SC", sans-serif;
  color: rgba(236, 244, 255, 0.84);
  text-shadow: 0 12px 24px rgba(0, 0, 0, 0.32);
  transition: opacity 160ms ease;
}

.roam-chat-self-portrait.has-model span {
  opacity: 0;
}

.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-composer.is-self-dialog .roam-chat-input {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(247, 251, 255, 0.96);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.roam-chat-composer.is-self-dialog .roam-chat-input::placeholder {
  color: rgba(206, 223, 239, 0.58);
}

.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-composer.is-self-dialog .roam-chat-attach {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(182, 221, 255, 0.94);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.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-composer.is-self-dialog .roam-chat-send {
  background: linear-gradient(180deg, #74b8ff, #2f7dd1);
  color: #f7fbff;
  box-shadow: 0 14px 28px rgba(28, 81, 146, 0.24);
}

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

.roam-chat-history {
  position: absolute;
  left: 18px;
  bottom: 20px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  width: min(360px, calc(100vw - 40px));
  padding: 12px;
  max-height: 50dvh;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(180deg, rgba(4, 5, 8, 0.92), rgba(6, 7, 10, 0.78));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 20px 42px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(12px);
  overflow: hidden;
  pointer-events: auto;
}

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

.roam-chat-history.is-collapsed {
  left: 0;
  width: auto;
  max-height: none;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  overflow: visible;
}

.roam-chat-history-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.roam-chat-history-label {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.54);
  font: 700 10px/1.1 "Avenir Next", "PingFang SC", sans-serif;
  letter-spacing: 0.24em;
}

.roam-chat-history-toggle {
  flex: 0 0 auto;
  min-width: 52px;
  height: 28px;
  padding: 0 10px;
  border: 0;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

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

.roam-chat-history.is-collapsed .roam-chat-history-head {
  margin-bottom: 0;
}

.roam-chat-history.is-collapsed .roam-chat-history-label,
.roam-chat-history.is-collapsed .roam-chat-history-list {
  display: none;
}

.roam-chat-history.is-collapsed .roam-chat-history-toggle {
  min-width: 0;
  width: 38px;
  height: 120px;
  padding: 10px 0;
  border-radius: 0 12px 12px 0;
  background: linear-gradient(180deg, rgba(7, 9, 13, 0.92), rgba(18, 22, 31, 0.78));
  color: rgba(255, 255, 255, 0.88);
  letter-spacing: 0.12em;
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

.roam-chat-history-list {
  flex: 1 1 auto;
  display: grid;
  gap: 6px;
  min-height: 0;
  max-height: calc(50dvh - 56px);
  overflow-y: scroll;
  padding-right: 6px;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  scrollbar-gutter: stable;
  scrollbar-width: auto;
  scrollbar-color: rgba(255, 255, 255, 0.42) rgba(255, 255, 255, 0.08);
}

.roam-chat-history-list::-webkit-scrollbar {
  width: 8px;
}

.roam-chat-history-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
}

.roam-chat-history-list::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.52), rgba(255, 255, 255, 0.24));
  border-radius: 999px;
  border: 1px solid rgba(5, 6, 9, 0.48);
}

.roam-chat-history-list::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.34));
}

.roam-video-frame {
  position: absolute;
  inset: 12px;
  z-index: 7;
  pointer-events: none;
  border: 2px solid rgba(255, 84, 84, 0.62);
  box-shadow:
    inset 0 0 0 1px rgba(255, 132, 132, 0.34),
    0 0 0 1px rgba(255, 54, 54, 0.18);
}

.roam-video-frame[hidden] {
  display: none !important;
}

.roam-video-frame.is-recording {
  border-color: rgba(255, 54, 54, 0.94);
  box-shadow:
    inset 0 0 0 1px rgba(255, 171, 171, 0.5),
    0 0 24px rgba(255, 54, 54, 0.18);
}

.roam-video-frame-head {
  position: absolute;
  top: 12px;
  left: 12px;
  display: none;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 12px;
  background: rgba(18, 8, 10, 0.82);
  border: 1px solid rgba(255, 94, 94, 0.34);
  color: #ffe8e8;
  box-shadow: 0 12px 28px rgba(36, 8, 12, 0.24);
  backdrop-filter: blur(12px);
}

.roam-video-frame-label,
.roam-video-frame-status {
  font: 700 11px/1 "JetBrains Mono", "Cascadia Code", monospace;
  letter-spacing: 0.12em;
}

.roam-video-frame-status {
  color: #ffb4b4;
}

.roam-video-frame.is-recording .roam-video-frame-status {
  color: #ff5c5c;
}

.roam-video-toggle {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 9;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(176, 186, 198, 0.18);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(22, 26, 32, 0.94), rgba(12, 15, 19, 0.88));
  color: rgba(190, 198, 208, 0.76);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 18px 34px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(14px);
  cursor: pointer;
}

.roam-video-toggle[hidden] {
  display: none !important;
}

.roam-video-toggle-icon {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.roam-video-toggle:hover {
  color: rgba(234, 241, 248, 0.94);
}

.roam-video-toggle.is-expanded {
  border-color: rgba(255, 116, 116, 0.26);
  color: rgba(255, 228, 228, 0.96);
}

.roam-video-toggle.is-recording {
  border-color: rgba(255, 110, 110, 0.38);
  background:
    linear-gradient(180deg, rgba(86, 18, 22, 0.96), rgba(46, 9, 13, 0.9));
  color: #ff7474;
  animation: roam-video-toggle-pulse 1.08s ease-in-out infinite;
}

@keyframes roam-video-toggle-pulse {
  0%,
  100% {
    opacity: 1;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.06),
      0 18px 34px rgba(0, 0, 0, 0.24),
      0 0 0 0 rgba(255, 84, 84, 0.18);
  }

  50% {
    opacity: 0.48;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.04),
      0 18px 34px rgba(0, 0, 0, 0.24),
      0 0 0 8px rgba(255, 84, 84, 0);
  }
}

.roam-video-panel {
  position: absolute;
  top: 74px;
  right: 18px;
  z-index: 8;
  display: grid;
  gap: 12px;
  width: min(380px, calc(100vw - 36px));
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 97, 97, 0.22);
  background:
    linear-gradient(180deg, rgba(14, 10, 13, 0.92), rgba(8, 7, 9, 0.88));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 22px 46px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(16px);
  pointer-events: auto;
  max-height: calc(100dvh - 92px);
  overflow-y: auto;
}

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

.roam-video-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.roam-video-panel-copy {
  display: grid;
  gap: 5px;
}

.roam-video-panel-kicker {
  font: 700 10px/1 "JetBrains Mono", "Cascadia Code", monospace;
  letter-spacing: 0.16em;
  color: rgba(255, 184, 184, 0.74);
}

.roam-video-panel-copy strong {
  font-size: 18px;
  line-height: 1.1;
  color: #fff1f1;
}

.roam-video-exit,
.roam-video-action {
  min-width: 0;
  height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(255, 111, 111, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: #fff1f1;
  cursor: pointer;
}

.roam-video-exit {
  flex: 0 0 auto;
}

.roam-video-action:hover,
.roam-video-exit:hover {
  background: rgba(255, 255, 255, 0.1);
}

.roam-video-action:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.roam-video-action-primary {
  background: linear-gradient(180deg, #ff7272, #d33b3b);
  border-color: rgba(255, 160, 160, 0.26);
  color: #fff9f9;
}

.roam-video-panel-status {
  padding: 10px 12px;
  border: 1px solid rgba(255, 117, 117, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 236, 236, 0.88);
  font-size: 13px;
  line-height: 1.55;
}

.roam-video-camera {
  display: grid;
  gap: 9px;
  padding: 10px;
  border: 1px solid rgba(255, 117, 117, 0.14);
  background: rgba(255, 255, 255, 0.04);
}

.roam-video-camera-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: rgba(255, 236, 236, 0.9);
  font-size: 12px;
  font-weight: 700;
}

.roam-video-camera-head small {
  min-width: 0;
  color: rgba(255, 204, 204, 0.72);
  font: 700 10px/1 "JetBrains Mono", "Cascadia Code", monospace;
  letter-spacing: 0.08em;
  text-align: right;
}

.roam-video-camera-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.roam-video-camera-option {
  min-width: 0;
  height: 34px;
  padding: 0 8px;
  border: 1px solid rgba(255, 111, 111, 0.16);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 236, 236, 0.82);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.roam-video-camera-option:hover {
  background: rgba(255, 255, 255, 0.09);
}

.roam-video-camera-option.is-active {
  border-color: rgba(255, 154, 154, 0.34);
  background: linear-gradient(180deg, rgba(255, 114, 114, 0.28), rgba(211, 59, 59, 0.18));
  color: #fff9f9;
}

.roam-video-panel-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.roam-video-preview {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020202;
  object-fit: contain;
}

.roam-video-preview-empty {
  padding: 14px 12px;
  border: 1px dashed rgba(255, 117, 117, 0.18);
  color: rgba(255, 214, 214, 0.72);
  font-size: 12px;
  line-height: 1.5;
}

.roam-chat-history-entry {
  display: grid;
  gap: 4px;
  padding: 9px 10px;
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.roam-chat-history-entry.is-self {
  background:
    linear-gradient(180deg, rgba(89, 167, 255, 0.18), rgba(40, 103, 166, 0.1));
  border-color: rgba(98, 176, 255, 0.18);
}

.roam-chat-history-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.roam-chat-history-name {
  min-width: 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.roam-chat-history-time {
  flex: 0 0 auto;
  color: rgba(255, 255, 255, 0.42);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.roam-chat-history-line {
  color: rgba(255, 255, 255, 0.76);
  font-size: 13px;
  line-height: 1.45;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.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: auto;
}

.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: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  background: rgba(7, 7, 8, 0.72);
  color: rgba(255, 255, 255, 0.92);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 16px 34px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(14px);
  pointer-events: auto;
  touch-action: none;
}

.mobile-eye-handle.is-active {
  transform: scale(0.985);
  background: rgba(20, 22, 26, 0.84);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 18px 36px rgba(0, 0, 0, 0.28),
    0 0 22px rgba(255, 255, 255, 0.08);
}

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

.mobile-controls {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  justify-content: center;
  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-left {
  position: absolute;
  left: 50%;
  bottom: calc(18px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  display: grid;
  place-items: center;
}

.mobile-controls-right {
  position: absolute;
  right: max(12px, env(safe-area-inset-right));
  bottom: calc(20px + env(safe-area-inset-bottom));
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 48px;
  gap: 10px;
  justify-items: end;
}

.mobile-joystick {
  position: relative;
  width: 136px;
  height: 136px;
  opacity: 0.62;
  pointer-events: auto;
  touch-action: none;
}

.mobile-joystick-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.1), transparent 34%),
    rgba(8, 9, 11, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 18px 42px rgba(0, 0, 0, 0.14);
  backdrop-filter: blur(14px);
}

.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.28);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.58), rgba(218, 224, 230, 0.42));
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.16),
    0 0 20px rgba(255, 255, 255, 0.08);
}

.mobile-action {
  display: grid;
  place-items: center;
  pointer-events: auto;
  width: 48px;
  height: 48px;
  min-height: 48px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  background: rgba(7, 7, 8, 0.72);
  color: rgba(255, 255, 255, 0.92);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 16px 34px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(14px);
}

.mobile-action:active,
.mobile-action.is-active {
  transform: translateY(1px) scale(0.985);
  background: rgba(20, 22, 26, 0.84);
}

.mobile-chat-icon {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.14));
}

.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-overlay[hidden] {
  display: none !important;
}

.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-shell.is-work-authenticated .work-mode-switch,
  .work-shell.is-work-authenticated .roam-work-badge {
    display: none !important;
  }

  .work-shell.is-work-authenticated .mobile-work-menu-toggle {
    position: fixed;
    top: max(12px, env(safe-area-inset-top));
    left: max(12px, env(safe-area-inset-left));
    z-index: 92;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 16px;
    color: rgba(255, 255, 255, 0.92);
    background: rgba(7, 7, 8, 0.72);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.1),
      0 16px 34px rgba(0, 0, 0, 0.24);
    backdrop-filter: blur(14px);
    pointer-events: auto;
  }

  .mobile-work-menu-toggle[hidden] {
    display: none !important;
  }

  .mobile-work-menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    background: currentColor;
    border-radius: 999px;
  }

  .mobile-work-menu-panel {
    position: fixed;
    inset: 0;
    z-index: 91;
    display: block;
    pointer-events: none;
  }

  .mobile-work-menu-panel[hidden] {
    display: none !important;
  }

  .mobile-work-menu-backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(0, 0, 0, 0.28);
    pointer-events: auto;
  }

  .mobile-work-menu-card {
    position: absolute;
    top: calc(max(12px, env(safe-area-inset-top)) + 52px);
    left: max(12px, env(safe-area-inset-left));
    width: min(328px, calc(100vw - 24px));
    display: grid;
    gap: 14px;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 18px;
    color: rgba(255, 255, 255, 0.9);
    background:
      linear-gradient(180deg, rgba(24, 24, 26, 0.98), rgba(8, 8, 10, 0.98));
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.44);
    backdrop-filter: blur(20px);
    pointer-events: auto;
  }

  .mobile-work-menu-head,
  .mobile-work-menu-badge {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .mobile-work-menu-head span {
    color: rgba(255, 255, 255, 0.44);
    font: 800 10px/1.2 "JetBrains Mono", monospace;
    letter-spacing: 0.16em;
  }

  .mobile-work-menu-close {
    min-height: 30px;
    padding: 0 10px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.82);
    background: rgba(255, 255, 255, 0.06);
  }

  .mobile-work-menu-badge {
    justify-content: flex-start;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.07);
  }

  .mobile-work-menu-avatar {
    flex: 0 0 auto;
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #000;
    background: #fff;
    font-weight: 900;
  }

  .mobile-work-menu-badge strong,
  .mobile-work-menu-badge span {
    display: block;
  }

  .mobile-work-menu-badge strong {
    font-size: 17px;
  }

  .mobile-work-menu-badge span {
    margin-top: 5px;
    color: rgba(255, 255, 255, 0.56);
    font-size: 12px;
  }

  .mobile-work-menu-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .mobile-work-menu-action {
    min-height: 44px;
    padding: 0 12px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.08);
    font-size: 13px;
    font-weight: 800;
  }

  .mobile-work-menu-action.is-active,
  .mobile-work-menu-action:hover,
  .mobile-work-menu-action:focus-visible {
    color: #000;
    background: #fff;
  }

  .mobile-work-menu-action.is-danger {
    border-color: rgba(255, 126, 126, 0.32);
    color: rgba(255, 205, 205, 0.96);
    background: rgba(92, 15, 15, 0.38);
  }

  .work-shell.is-flat-mode .mobile-work-menu-panel {
    z-index: 120;
  }

  .work-shell.is-flat-mode .mobile-work-menu-backdrop {
    background: rgba(0, 0, 0, 0.18);
  }

  .work-shell.is-flat-mode .mobile-work-menu-card {
    top: 0;
    left: 0;
    width: min(286px, 78vw);
    height: 100dvh;
    align-content: start;
    gap: 16px;
    padding: calc(18px + env(safe-area-inset-top)) 16px calc(18px + env(safe-area-inset-bottom));
    border-width: 0 1px 0 0;
    border-radius: 0;
    background:
      linear-gradient(180deg, rgba(17, 18, 20, 0.98), rgba(7, 7, 8, 0.98));
    box-shadow: 18px 0 54px rgba(0, 0, 0, 0.36);
  }

  .work-shell.is-flat-mode .mobile-work-menu-actions {
    display: none;
  }

  .work-shell.is-flat-mode .mobile-work-menu-flat-nav {
    display: grid;
    gap: 8px;
    padding-top: 4px;
  }

  .mobile-work-menu-flat-nav a {
    display: flex;
    align-items: center;
    min-height: 46px;
    padding: 0 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.06);
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
  }

  .mobile-work-menu-flat-nav a:active,
  .mobile-work-menu-flat-nav a:focus-visible {
    color: #000000;
    background: #ffffff;
  }

  .work-panel-primary,
  .work-panel-meta,
  .work-panel-controls {
    border-radius: 20px;
  }

  .roam-work-badge {
    top: 12px;
    left: 12px;
    width: min(214px, calc(100vw - 24px));
    min-height: 300px;
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    gap: 6px;
    padding: 10px 13px 13px;
    border-width: 4px;
    border-radius: 28px;
  }

  .roam-work-badge.is-dialog-portrait {
    width: 88px;
    min-height: 88px;
    padding: 8px;
    border-radius: 18px;
  }

  .roam-work-badge::after {
    display: none;
  }

  .roam-work-badge-portrait {
    width: 132px;
    height: 132px;
    margin: 0 0 2px;
    border-radius: 18px;
  }

  .roam-work-badge-name,
  .roam-work-badge-row .roam-work-badge-name {
    font-size: 20px;
  }

  .roam-work-badge-brand,
  .roam-work-badge-row strong {
    font-size: 9px;
  }

  .roam-work-badge-avatar {
    width: 100%;
    height: 160px;
    transform: translateY(-22px);
  }

  .roam-work-badge.is-dialog-portrait .roam-work-badge-avatar {
    width: 68px;
    height: 68px;
    transform: none;
    border-radius: 16px;
  }

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

  .roam-work-badge-footer {
    top: calc(100% + 8px);
    width: min(270px, calc(100vw - 24px));
  }

  .roam-agent-panel {
    max-height: clamp(170px, calc(100vh - 334px), 360px);
    padding: 12px;
    border-radius: 22px;
  }

  .roam-work-badge-nav {
    gap: 8px;
  }

  .roam-work-badge-nav-button {
    height: 24px;
    padding: 0 8px;
    border-radius: 8px;
    font-size: 9px;
  }

  .roam-agent-panel {
    padding: 10px;
    border-radius: 12px;
  }

  .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));
  }

  .roam-chat-self-portrait {
    left: 14px;
    bottom: calc(100% - 10px);
    width: 132px;
    height: 208px;
  }

  .roam-video-panel {
    top: 68px;
    right: 12px;
    width: min(360px, calc(100vw - 24px));
  }

  .roam-fps-overlay {
    top: 12px;
    right: 12px;
  }

  .work-viewport.is-video-mode .roam-fps-overlay {
    right: 74px;
  }

  .roam-video-toggle {
    top: 12px;
    right: 12px;
  }

}

@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;
  }

  .roam-work-badge-nav-button {
    touch-action: manipulation;
  }

  .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;
  }

  .roam-chat-composer.is-self-dialog {
    width: calc(100vw - 20px);
    border-radius: 18px;
  }

  .roam-chat-self-portrait {
    left: 8px;
    bottom: calc(100% - 6px);
    width: 108px;
    height: 170px;
  }

  .roam-chat-self-portrait span {
    font-size: 22px;
  }

  .roam-chat-bubble.is-self-dialog {
    width: fit-content;
    min-width: min(280px, calc(100vw - 20px));
    max-width: calc(100vw - 20px);
    bottom: calc(24px + env(safe-area-inset-bottom));
  }

  .roam-chat-bubble.is-self-dialog .roam-chat-bubble-text {
    width: fit-content;
    min-width: min(280px, calc(100vw - 20px));
    min-height: 84px;
    max-width: calc(100vw - 20px);
  }

  .roam-chat-history {
    left: 10px;
    bottom: calc(16px + env(safe-area-inset-bottom));
    width: min(308px, calc(100vw - 108px));
    padding: 10px;
    border-radius: 12px;
  }

  .roam-chat-composer.is-open ~ .roam-chat-history {
    bottom: calc(104px + env(safe-area-inset-bottom));
    width: calc(100vw - 20px);
  }

  .roam-chat-composer.is-open ~ .roam-chat-history.is-collapsed {
    bottom: calc(16px + env(safe-area-inset-bottom));
    width: auto;
  }

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

  .mobile-joystick {
    touch-action: none;
  }

  .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;
  }

  .roam-video-frame {
    inset: 8px;
  }

  .roam-video-frame-head {
    top: 8px;
    left: 8px;
  }

  .roam-video-panel {
    top: 64px;
    right: 10px;
    left: 10px;
    width: auto;
  }

  .roam-fps-overlay {
    top: 10px;
    right: 10px;
  }

  .work-viewport.is-video-mode .roam-fps-overlay {
    right: 68px;
  }

  .roam-video-toggle {
    top: 10px;
    right: 10px;
    width: 44px;
    height: 44px;
  }

  .roam-video-panel-actions {
    grid-template-columns: 1fr;
  }
}

@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;
  }

  .roam-chat-history {
    width: min(320px, calc(100vw - 108px));
  }

  .roam-work-badge {
    width: min(204px, calc(100vw - 24px));
    min-height: 294px;
  }

  .roam-work-badge-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .roam-work-badge-nav-button {
    width: 100%;
  }

  .roam-chat-history-label {
    margin-bottom: 8px;
    font-size: 9px;
  }

  .roam-chat-history-entry {
    padding: 9px 10px;
  }

  .roam-chat-history-line {
    font-size: 12px;
  }

  .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;
  }
}

.roam-route-modal {
  position: fixed;
  inset: 0;
  z-index: 88;
  display: grid;
  place-items: center;
}

.roam-route-modal[hidden] {
  display: none;
}

.roam-route-modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  background:
    radial-gradient(circle at top, rgba(58, 255, 240, 0.18), transparent 36%),
    linear-gradient(180deg, rgba(4, 9, 18, 0.36), rgba(2, 5, 12, 0.82));
  backdrop-filter: blur(10px);
}

.roam-route-modal-shell {
  position: relative;
  width: min(88vw, 760px);
  padding: 30px;
  perspective: 1400px;
}

.roam-route-modal-stage {
  position: relative;
  padding: 28px;
  border: 1px solid rgba(79, 255, 242, 0.42);
  background:
    linear-gradient(155deg, rgba(8, 16, 30, 0.96), rgba(4, 10, 22, 0.92));
  box-shadow:
    0 28px 90px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(79, 255, 242, 0.08) inset,
    0 0 42px rgba(34, 229, 255, 0.18);
  clip-path: polygon(0 0, calc(100% - 30px) 0, 100% 30px, 100% 100%, 28px 100%, 0 calc(100% - 28px));
  transform: rotateX(9deg);
}

.roam-route-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.roam-route-modal-copy {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.roam-route-modal-eyebrow,
.roam-route-option-eyebrow {
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(124, 255, 245, 0.72);
}

.roam-route-modal-copy strong {
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1;
  color: #ecfffb;
  text-shadow: 0 0 22px rgba(70, 241, 255, 0.24);
}

.roam-route-modal-copy span:last-child {
  font-size: 14px;
  color: rgba(203, 244, 255, 0.76);
}

.roam-route-modal-close {
  border: 1px solid rgba(127, 255, 247, 0.28);
  background: rgba(5, 16, 32, 0.76);
  color: #edfffb;
  min-width: 46px;
  height: 46px;
  font-size: 19px;
  cursor: pointer;
}

.roam-route-modal-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.roam-route-option {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 20px 18px;
  border: 1px solid rgba(80, 255, 240, 0.18);
  background: linear-gradient(180deg, rgba(17, 37, 58, 0.92), rgba(8, 19, 34, 0.92));
  color: #effffe;
  text-align: left;
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.roam-route-option strong {
  font-size: 24px;
  line-height: 1.05;
}

.roam-route-option span:last-child {
  color: rgba(197, 238, 245, 0.72);
}

.roam-route-option:hover,
.roam-route-option:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(116, 255, 244, 0.52);
  box-shadow: 0 0 0 1px rgba(116, 255, 244, 0.16) inset, 0 16px 36px rgba(10, 162, 182, 0.18);
  outline: none;
}

@media (max-width: 720px) {
  .roam-route-modal-shell {
    width: min(94vw, 560px);
    padding: 18px;
  }

  .roam-route-modal-stage {
    padding: 22px;
    transform: none;
  }

  .roam-route-modal-actions {
    grid-template-columns: 1fr;
  }
}
