:root {
  --ink: #191b18;
  --muted: #72766f;
  --paper: #f0f0e8;
  --panel: rgba(250, 250, 244, 0.82);
  --line: rgba(25, 27, 24, 0.16);
  --lime: #c9ff38;
  --lime-deep: #97c315;
  --dark: #20231f;
  --cyan: #55e5d0;
  --shadow: 0 22px 80px rgba(39, 43, 35, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 80% 12%, rgba(201, 255, 56, 0.14), transparent 26rem),
    linear-gradient(135deg, #f5f5ee 0%, #ecece3 100%);
  font-family: "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
  min-height: 100vh;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
  font: inherit;
}

.noise {
  position: fixed;
  z-index: -1;
  inset: 0;
  opacity: 0.18;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.15'/%3E%3C/svg%3E");
}

.topbar {
  height: 86px;
  padding: 0 clamp(24px, 5vw, 76px);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.topbar-actions {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.account-chip,
.auth-button {
  min-height: 34px;
  padding: 0 11px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  background: rgba(250, 250, 244, 0.58);
  font-size: 9px;
}

.account-chip {
  color: var(--muted);
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-button {
  cursor: pointer;
}

.auth-button.primary {
  color: #151713;
  border-color: var(--lime);
  background: var(--lime);
}

.auth-button.upgrade {
  color: rgba(49, 54, 44, 0.58);
  border-color: rgba(49, 54, 44, 0.18);
  background: rgba(255, 255, 255, 0.42);
  cursor: not-allowed;
}
.auth-button.upgrade:hover {
  background: rgba(255, 255, 255, 0.42);
  border-color: rgba(49, 54, 44, 0.18);
}

.auth-button.upgrade.is-disabled {
  pointer-events: auto;
  opacity: 0.78;
}

.sub-badge {
  min-height: 34px;
  padding: 0 11px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  font-size: 9px;
  border-radius: 0;
}
.sub-badge.free {
  color: var(--muted);
  background: rgba(250, 250, 244, 0.58);
}
.sub-badge.premium {
  color: #fff;
  background: #007aff;
  border-color: #007aff;
}
.sub-badge.exhausted {
  color: #ff6b6b;
  background: rgba(255, 107, 107, 0.1);
  border-color: rgba(255, 107, 107, 0.3);
}

.brand {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  width: fit-content;
  color: inherit;
  text-decoration: none;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 16px;
  letter-spacing: 0.04em;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.24em;
}

.brand-mark {
  position: relative;
  width: 36px;
  height: 36px;
  border: 1px solid var(--ink);
  border-radius: 50%;
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid var(--ink);
  border-radius: 50%;
}

.brand-mark span {
  position: absolute;
  z-index: 1;
  top: 3px;
  width: 10px;
  height: 12px;
  background: var(--paper);
  border: 1px solid var(--ink);
  transform: rotate(45deg);
}

.brand-mark span:first-child {
  left: 4px;
}

.brand-mark span:last-child {
  right: 4px;
  transform: rotate(45deg) scale(-1);
}

.system-state {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lime-deep);
  box-shadow: 0 0 0 4px rgba(151, 195, 21, 0.12);
}

.privacy-label {
  margin-left: 10px;
  padding-left: 18px;
  border-left: 1px solid var(--line);
}

.icon-button {
  justify-self: end;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.icon-button svg {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.icon-button.is-muted .sound-wave {
  opacity: 0.15;
}

.app-shell {
  width: min(1440px, calc(100% - 48px));
  margin: 0 auto;
  padding: 70px 0 56px;
}

.hero-copy {
  display: grid;
  grid-template-columns: minmax(420px, 1fr) minmax(280px, 420px);
  align-items: end;
  gap: 64px;
  margin-bottom: 42px;
}

.eyebrow {
  margin: 0 0 22px;
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
}

.eyebrow span {
  display: inline-grid;
  place-items: center;
  width: 25px;
  height: 18px;
  margin-right: 8px;
  color: var(--ink);
  background: var(--lime);
  border-radius: 9px;
  letter-spacing: 0;
}

h1 {
  max-width: 760px;
  margin: 0;
  font-family: Georgia, "Songti SC", serif;
  font-size: clamp(48px, 6.2vw, 96px);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.055em;
}

h1 em {
  position: relative;
  color: transparent;
  font-weight: 400;
  -webkit-text-stroke: 1.2px var(--ink);
}

h1 em::after {
  content: "";
  position: absolute;
  left: 2%;
  right: -2%;
  bottom: 7%;
  height: 12px;
  z-index: -1;
  background: var(--lime);
  transform: rotate(-1deg);
}

.hero-description {
  margin: 0 0 4px;
  color: #555952;
  font-size: 14px;
  line-height: 1.9;
}

.workspace {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 74px minmax(0, 1fr);
  align-items: center;
}

.panel {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.panel-heading {
  min-height: 92px;
  padding: 22px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.panel-index {
  margin: 0 0 7px;
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 9px;
  letter-spacing: 0.16em;
}

.panel h2 {
  margin: 0;
  font-family: Georgia, "Songti SC", serif;
  font-size: 24px;
  font-weight: 400;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 11px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 20px;
  font-size: 10px;
}

.status-chip i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #a7aaa4;
}

.status-chip.online {
  color: var(--ink);
}

.status-chip.online i,
.status-chip.active i {
  background: var(--lime-deep);
  box-shadow: 0 0 0 3px rgba(151, 195, 21, 0.13);
}

.camera-stage,
.pet-stage {
  position: relative;
  height: 410px;
  overflow: hidden;
  background: #d9dad2;
}

.camera-stage {
  background:
    linear-gradient(rgba(201, 255, 56, 0.05), rgba(201, 255, 56, 0.05)),
    repeating-linear-gradient(90deg, transparent 0 59px, rgba(26, 28, 25, 0.035) 60px),
    repeating-linear-gradient(0deg, transparent 0 59px, rgba(26, 28, 25, 0.035) 60px),
    #d7d8d1;
}

#cameraFeed,
#poseCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

#cameraFeed {
  object-fit: cover;
  transform: scaleX(-1);
  opacity: 0;
  transition: opacity 0.5s ease;
  filter: saturate(0.65) contrast(1.05);
}

#cameraFeed.active {
  opacity: 0.72;
}

#cameraFeed.no-mirror {
  transform: none;
}

#poseCanvas {
  z-index: 2;
  pointer-events: none;
}

.camera-placeholder {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.35s ease;
}

.camera-placeholder.hidden {
  opacity: 0;
  pointer-events: none;
}

.scan-frame {
  position: relative;
  width: 146px;
  height: 126px;
  display: grid;
  place-items: center;
}

.scan-frame > span {
  position: absolute;
  width: 24px;
  height: 24px;
  border-color: var(--ink);
}

.scan-frame > span:nth-child(1) {
  top: 0;
  left: 0;
  border-top: 1px solid;
  border-left: 1px solid;
}

.scan-frame > span:nth-child(2) {
  top: 0;
  right: 0;
  border-top: 1px solid;
  border-right: 1px solid;
}

.scan-frame > span:nth-child(3) {
  right: 0;
  bottom: 0;
  border-right: 1px solid;
  border-bottom: 1px solid;
}

.scan-frame > span:nth-child(4) {
  bottom: 0;
  left: 0;
  border-bottom: 1px solid;
  border-left: 1px solid;
}

.scan-frame svg {
  width: 74px;
  fill: none;
  stroke: #60645e;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.2;
}

.scan-line {
  position: absolute;
  z-index: 2;
  left: 8px;
  right: 8px;
  height: 1px;
  background: var(--lime-deep);
  box-shadow: 0 0 12px var(--lime);
  animation: scan 2.4s ease-in-out infinite;
}

@keyframes scan {
  0%,
  100% {
    top: 12px;
  }
  50% {
    top: 112px;
  }
}

.camera-placeholder p {
  margin: 22px 0 5px;
  font-size: 13px;
}

.camera-placeholder small {
  color: var(--muted);
  font-size: 10px;
}

.camera-overlay {
  position: absolute;
  z-index: 3;
  inset: 16px 18px auto;
  display: flex;
  justify-content: space-between;
  color: rgba(25, 27, 24, 0.64);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 9px;
  letter-spacing: 0.1em;
}

.camera-overlay span {
  padding: 5px 7px;
  background: rgba(238, 239, 232, 0.62);
  backdrop-filter: blur(6px);
}

.camera-actions,
.twin-footer {
  min-height: 74px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid var(--line);
}

.camera-actions {
  flex-wrap: wrap;
}

.camera-source {
  width: 100%;
  padding: 5px 0 10px;
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  align-items: center;
  gap: 6px 10px;
}

.camera-source label {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.camera-source small {
  grid-column: 2;
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 8px;
  line-height: 1.5;
}

.source-control {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 36px;
  gap: 6px;
}

.source-control select,
.source-control button {
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.36);
}

.source-control select {
  min-width: 0;
  padding: 0 10px;
  color: var(--ink);
  font: 10px "Helvetica Neue", "PingFang SC", sans-serif;
}

.source-control button {
  cursor: pointer;
  font-size: 16px;
}

.source-control button:disabled,
.source-control select:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.primary-button,
.secondary-button,
.calibrate-button,
.pause-button {
  min-height: 42px;
  padding: 0 18px;
  border: 0;
  border-radius: 2px;
  cursor: pointer;
  font-size: 11px;
  letter-spacing: 0.03em;
  transition:
    transform 0.2s ease,
    background 0.2s ease;
}

.primary-button {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: #11130f;
  background: var(--lime);
}

.primary-button:hover,
.secondary-button:hover,
.pause-button:hover:not(:disabled) {
  transform: translateY(-2px);
}

.primary-button svg {
  width: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.secondary-button {
  background: transparent;
  border: 1px solid var(--line);
}

.remote-button {
  flex: 1;
}

.scan-button {
  flex: 1;
}

.calibrate-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: transparent;
  border: 1px solid var(--line);
}

.calibrate-button span {
  width: 11px;
  height: 11px;
  border: 1px solid currentColor;
  border-radius: 50%;
  box-shadow: inset 0 0 0 3px var(--paper);
  background: var(--lime-deep);
}

.calibrate-button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.calibrate-button.is-calibrating span {
  animation: calibrate-pulse 0.7s ease-in-out infinite alternate;
}

@keyframes calibrate-pulse {
  to {
    box-shadow: 0 0 12px var(--lime);
    transform: scale(1.18);
  }
}

.sync-bridge {
  position: relative;
  z-index: 2;
  height: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.bridge-line {
  position: absolute;
  left: 0;
  right: 0;
  top: 45px;
  height: 1px;
  background: var(--line);
}

.bridge-core {
  z-index: 1;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
}

.bridge-core svg {
  width: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.sync-bridge p {
  margin: 11px 0 0;
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 8px;
  letter-spacing: 0.12em;
}

.pet-stage {
  isolation: isolate;
  background:
    radial-gradient(circle at 47% 47%, rgba(255, 224, 205, 0.22), transparent 30%),
    radial-gradient(circle at 67% 38%, rgba(210, 229, 255, 0.12), transparent 28%),
    linear-gradient(180deg, #292725, #1b1a19);
}

.twin-3d-canvas {
  position: absolute;
  z-index: 4;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.45s ease;
}

.pet-stage.has-3d-model .twin-3d-canvas {
  opacity: 1;
}

.pet-stage.has-3d-model .cyber-cat {
  visibility: hidden;
}

.pet-stage.has-3d-model .pet-shadow {
  width: 290px;
  opacity: 0.55;
  filter: blur(15px);
}

.twin-skin-control {
  padding: 13px 16px 14px;
  color: #e9ebe3;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: #20231f;
}

.twin-skin-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.twin-skin-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.twin-skin-heading > div:first-child span,
.twin-skin-heading > div:first-child strong {
  display: block;
}

.twin-skin-heading > div:first-child span {
  color: rgba(233, 235, 227, 0.46);
  font: 7px "SFMono-Regular", Consolas, monospace;
  letter-spacing: 0.14em;
}

.twin-skin-heading > div:first-child strong {
  margin-top: 3px;
  font-size: 12px;
  font-weight: 500;
}

.twin-skin-actions > button {
  min-height: 34px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #151713;
  border: 0;
  background: var(--lime);
  cursor: pointer;
  font-size: 9px;
}

.twin-skin-actions > button > span:first-child {
  font-size: 15px;
  line-height: 1;
}

.twin-skin-actions .desktop-toggle-button {
  min-width: 88px;
  color: rgba(233, 235, 227, 0.74);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
}

.twin-skin-actions .desktop-download-button {
  min-width: 96px;
  color: rgba(233, 235, 227, 0.86);
  border: 1px solid rgba(198, 235, 103, 0.34);
  background: rgba(198, 235, 103, 0.1);
}

.twin-skin-actions .desktop-download-button:disabled {
  cursor: wait;
  opacity: 0.54;
}

.desktop-toggle-button > span:first-child {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(233, 235, 227, 0.34);
  box-shadow: none;
}

.desktop-toggle-button.is-on {
  color: #151713;
  border-color: transparent;
  background: var(--lime);
}

.desktop-toggle-button.is-on > span:first-child {
  background: #151713;
  box-shadow: 0 0 9px rgba(21, 23, 19, 0.35);
}

.twin-skin-presets {
  margin-top: 11px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}

.twin-build-status {
  margin-top: 11px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.twin-build-status span {
  padding: 7px 9px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(233, 235, 227, 0.68);
  border: 1px solid rgba(201, 255, 56, 0.2);
  background: rgba(201, 255, 56, 0.04);
  font: 8px "SFMono-Regular", Consolas, monospace;
}

.twin-build-status i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 7px rgba(201, 255, 56, 0.72);
}

.twin-skin-presets button {
  min-width: 0;
  padding: 4px;
  color: rgba(233, 235, 227, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.11);
  background: rgba(255, 255, 255, 0.025);
  cursor: pointer;
  font-size: 8px;
  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease;
}

.twin-skin-presets button:hover,
.twin-skin-presets button.active {
  color: var(--lime);
  border-color: rgba(201, 255, 56, 0.72);
  background: rgba(201, 255, 56, 0.07);
}

.twin-skin-presets .skin-swatch {
  height: 20px;
  margin-bottom: 5px;
}

.twin-skin-control > p {
  margin: 8px 0 0;
  color: rgba(233, 235, 227, 0.42);
  font-size: 8px;
}

.pet-stage::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  opacity: 0.16;
  background-image: radial-gradient(rgba(201, 255, 56, 0.5) 0.75px, transparent 0.75px);
  background-size: 18px 18px;
  mask-image: linear-gradient(to bottom, black, transparent 76%);
}

.ground-grid {
  z-index: 0;
  position: absolute;
  left: -20%;
  right: -20%;
  bottom: -35%;
  height: 72%;
  opacity: 0.25;
  background-image:
    linear-gradient(rgba(201, 255, 56, 0.22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201, 255, 56, 0.22) 1px, transparent 1px);
  background-size: 34px 34px;
  transform: perspective(220px) rotateX(58deg);
}

.orbit {
  z-index: 1;
  position: absolute;
  left: 50%;
  top: 51%;
  border: 1px solid rgba(201, 255, 56, 0.18);
  border-radius: 50%;
  transform: translate(-50%, -50%) rotateX(68deg);
}

.orbit::after {
  content: "";
  position: absolute;
  top: -3px;
  left: 48%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 12px var(--lime);
}

.orbit-one {
  width: 330px;
  height: 330px;
  animation: orbit-spin 8s linear infinite;
}

.orbit-two {
  width: 250px;
  height: 250px;
  opacity: 0.55;
  animation: orbit-spin 6s linear reverse infinite;
}

.pet-stage.has-particle-avatar .orbit {
  display: none;
}

@keyframes orbit-spin {
  to {
    transform: translate(-50%, -50%) rotateX(68deg) rotateZ(360deg);
  }
}

.pet-shadow {
  position: absolute;
  left: 50%;
  bottom: 81px;
  width: 250px;
  height: 42px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.42);
  filter: blur(12px);
  transform: translateX(-50%);
}

.cyber-cat {
  --cat-light: #d6d7cd;
  --cat-mid: #777c73;
  --cat-dark: #252824;
  --twin-x: 0px;
  --twin-y: 0px;
  --twin-turn: 0deg;
  --view-turn: 0deg;
  --twin-scale: 1;
  --device-scale: 1;
  --pet-texture: none;
  --pet-primary: #d6d7cd;
  --pet-secondary: #777c73;
  position: absolute;
  left: 50%;
  bottom: 96px;
  width: 310px;
  height: 190px;
  transform:
    translateX(calc(-50% + var(--twin-x)))
    translateY(var(--twin-y))
    rotateY(calc(var(--view-turn) + var(--twin-turn)))
    scale(var(--twin-scale))
    scale(var(--device-scale));
  transform-origin: 50% 75%;
  transition: transform 0.55s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.cyber-cat > div {
  position: absolute;
}

.cyber-cat .body,
.cyber-cat .head,
.cyber-cat .neck,
.cyber-cat .leg,
.cyber-cat .tail {
  transition:
    top 0.48s cubic-bezier(0.2, 0.8, 0.2, 1),
    left 0.48s cubic-bezier(0.2, 0.8, 0.2, 1),
    right 0.48s cubic-bezier(0.2, 0.8, 0.2, 1),
    width 0.48s cubic-bezier(0.2, 0.8, 0.2, 1),
    height 0.48s cubic-bezier(0.2, 0.8, 0.2, 1),
    transform 0.48s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.cyber-cat:not(.skin-original) .head {
  background-color: var(--pet-primary);
  background-image:
    linear-gradient(145deg, rgba(255, 255, 255, 0.18), rgba(16, 18, 16, 0.42)),
    var(--pet-texture);
  background-blend-mode: soft-light, normal;
}

.cyber-cat.texture-photo .head {
  background-size: cover;
  background-position: center 34%;
}

.cyber-cat.texture-atlas .head {
  background-size: 200% 200%;
  background-position: left top;
}

.cyber-cat:not(.skin-original) .body {
  background-color: var(--pet-secondary);
  background-image:
    linear-gradient(105deg, rgba(19, 22, 19, 0.76) 0 18%, transparent 42% 67%, rgba(15, 17, 15, 0.72) 88%),
    linear-gradient(155deg, rgba(255, 255, 255, 0.16), rgba(12, 14, 12, 0.56)),
    var(--pet-texture);
  background-blend-mode: normal, soft-light, normal;
}

.cyber-cat.texture-photo .body {
  background-size: auto, auto, 145%;
  background-position: center, center, center 56%;
  filter: saturate(0.72) contrast(1.08);
}

.cyber-cat.texture-atlas .body {
  background-size: auto, auto, 200% 200%;
  background-position: center, center, right top;
}

.cyber-cat:not(.skin-original) .neck,
.cyber-cat:not(.skin-original) .ear {
  background-color: var(--pet-secondary);
  background-image:
    linear-gradient(145deg, rgba(255, 255, 255, 0.24), rgba(18, 20, 18, 0.48)),
    linear-gradient(120deg, var(--pet-primary), var(--pet-secondary));
  background-blend-mode: soft-light, normal;
}

.cyber-cat.texture-atlas .neck,
.cyber-cat.texture-atlas .ear {
  background-image:
    linear-gradient(145deg, rgba(255, 255, 255, 0.24), rgba(18, 20, 18, 0.48)),
    var(--pet-texture);
  background-size: auto, 200% 200%;
  background-position: center, left bottom;
}

.cyber-cat:not(.skin-original) .leg,
.cyber-cat:not(.skin-original) .leg::after {
  background-color: var(--pet-secondary);
  background-image:
    linear-gradient(90deg, rgba(255, 255, 255, 0.25), transparent 38%, rgba(9, 11, 9, 0.62)),
    linear-gradient(145deg, var(--pet-primary), #30342f 68%);
  background-blend-mode: soft-light, normal;
}

.cyber-cat.texture-atlas .leg,
.cyber-cat.texture-atlas .leg::after {
  background-image:
    linear-gradient(90deg, rgba(255, 255, 255, 0.25), transparent 38%, rgba(9, 11, 9, 0.62)),
    var(--pet-texture);
  background-size: auto, 200% 200%;
  background-position: center, right bottom;
}

.cyber-cat:not(.skin-original) .tail {
  border-color: color-mix(in srgb, var(--pet-secondary) 68%, #30342f);
  border-left-color: transparent;
  border-bottom-color: transparent;
}

.cyber-cat.skin-soft .body,
.cyber-cat.skin-soft .head {
  filter: saturate(0.88) contrast(1.06);
}

.cyber-cat:not(.skin-original) .body::after {
  content: "";
  position: absolute;
  inset: 5px 8px;
  pointer-events: none;
  border-radius: inherit;
  background:
    linear-gradient(118deg, transparent 0 24%, rgba(20, 23, 20, 0.78) 25% 27%, transparent 28%),
    linear-gradient(96deg, transparent 0 69%, rgba(201, 255, 56, 0.34) 70% 71%, transparent 72%);
  box-shadow: inset 0 0 0 1px rgba(220, 228, 213, 0.12);
}

.cyber-cat:not(.skin-original) .head::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 4px;
  pointer-events: none;
  border: 1px solid rgba(217, 224, 209, 0.15);
  border-radius: inherit;
  box-shadow:
    inset 9px 0 12px rgba(17, 19, 17, 0.18),
    inset -9px 0 12px rgba(17, 19, 17, 0.18);
}

.cyber-cat:not(.skin-original) .head > * {
  z-index: 2;
}

.cyber-cat.skin-pixel .body,
.cyber-cat.skin-pixel .head,
.cyber-cat.skin-pixel .neck,
.cyber-cat.skin-pixel .ear,
.cyber-cat.skin-pixel .leg {
  image-rendering: pixelated;
  filter: saturate(1.15) contrast(1.28);
}

.cyber-cat.texture-photo.skin-pixel .head {
  background-size: auto, 42px 42px;
}

.cyber-cat.texture-photo.skin-pixel .body {
  background-size: auto, auto, 42px 42px;
}

.cyber-cat.skin-neon .body,
.cyber-cat.skin-neon .head,
.cyber-cat.skin-neon .neck,
.cyber-cat.skin-neon .ear,
.cyber-cat.skin-neon .leg {
  background-color: var(--pet-primary);
  background-blend-mode: color-dodge, luminosity;
  filter: saturate(2.4) contrast(1.22) hue-rotate(18deg);
}

.cyber-cat.skin-mono .body,
.cyber-cat.skin-mono .head,
.cyber-cat.skin-mono .neck,
.cyber-cat.skin-mono .ear,
.cyber-cat.skin-mono .leg {
  background-blend-mode: multiply, luminosity;
  filter: grayscale(1) contrast(1.65);
}

.body {
  left: 70px;
  top: 58px;
  width: 176px;
  height: 91px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 53% 45% 41% 50% / 52% 45% 49% 54%;
  background:
    linear-gradient(115deg, transparent 0 40%, rgba(201, 255, 56, 0.52) 41% 43%, transparent 44%),
    linear-gradient(145deg, var(--cat-light), #858a80 54%, #373a35);
  box-shadow:
    inset -18px -15px 28px rgba(16, 18, 16, 0.42),
    0 0 45px rgba(201, 255, 56, 0.08);
  transform: rotate(4deg);
}

.body::before,
.face-panel::before {
  content: "";
  position: absolute;
  inset: 12px 28px 16px 32px;
  opacity: 0.36;
  border: 1px solid var(--lime);
  border-radius: 50%;
}

.body-line {
  position: absolute;
  top: 16px;
  left: 68px;
  width: 1px;
  height: 70px;
  background: rgba(26, 29, 25, 0.55);
  transform: rotate(15deg);
}

.flank-light {
  position: absolute;
  right: 22px;
  bottom: 23px;
  width: 38px;
  height: 3px;
  background: var(--lime);
  box-shadow: 0 0 9px var(--lime);
}

.neck {
  z-index: 4;
  left: 70px;
  top: 51px;
  width: 55px;
  height: 65px;
  border-radius: 46% 40% 45% 50%;
  background: linear-gradient(120deg, #bfc2b8, #4f534c);
  transform: rotate(-19deg);
}

.head {
  z-index: 5;
  left: 22px;
  top: 12px;
  width: 86px;
  height: 75px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 48% 53% 47% 50%;
  background:
    linear-gradient(90deg, transparent 48%, rgba(31, 34, 30, 0.44) 49% 51%, transparent 52%),
    linear-gradient(145deg, #dde0d5, #7c8177 60%, #333630);
  box-shadow: inset -12px -8px 16px rgba(20, 21, 19, 0.32);
  transition: transform 0.28s ease;
}

.face-panel {
  position: absolute;
  inset: 10px;
  border-radius: 48%;
}

.face-panel::before {
  inset: 4px 8px 12px;
  border-color: rgba(201, 255, 56, 0.32);
}

.ear {
  position: absolute;
  top: -20px;
  width: 33px;
  height: 41px;
  overflow: hidden;
  background: linear-gradient(145deg, #cacdc2, #62665f);
  clip-path: polygon(50% 0, 100% 100%, 0 78%);
}

.ear i {
  position: absolute;
  inset: 9px 8px 4px;
  background: rgba(201, 255, 56, 0.35);
  clip-path: polygon(50% 0, 100% 100%, 0 78%);
}

.ear-left {
  left: 3px;
  transform: rotate(-13deg);
}

.ear-right {
  right: 2px;
  transform: rotate(18deg) scaleX(-1);
}

.eye {
  position: absolute;
  z-index: 2;
  top: 35px;
  width: 14px;
  height: 4px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 9px var(--lime);
}

.eye-left {
  left: 18px;
}

.eye-right {
  right: 18px;
}

.nose {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 48px;
  width: 6px;
  height: 5px;
  background: #262824;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform: translateX(-50%);
}

.leg {
  z-index: 3;
  top: 126px;
  width: 27px;
  height: 58px;
  border-radius: 45% 45% 28% 28%;
  background: linear-gradient(90deg, #aeb1a8, #454943);
  transform-origin: top center;
}

.leg::after {
  content: "";
  position: absolute;
  left: -3px;
  bottom: -5px;
  width: 36px;
  height: 15px;
  border-radius: 50% 60% 35% 35%;
  background: #696d65;
}

.leg-back-left {
  z-index: 1;
  left: 188px;
  filter: brightness(0.58);
}

.leg-back-right {
  left: 217px;
}

.leg-front-left {
  z-index: 2;
  left: 81px;
  filter: brightness(0.7);
}

.leg-front-right {
  left: 108px;
}

.tail {
  z-index: 0;
  right: -4px;
  top: 30px;
  width: 103px;
  height: 78px;
  border: 18px solid #6f746b;
  border-left-color: transparent;
  border-bottom-color: transparent;
  border-radius: 50%;
  transform: rotate(-13deg);
  transform-origin: 8% 84%;
}

.tail span {
  position: absolute;
  right: -15px;
  top: -15px;
  width: 17px;
  height: 35px;
  border-radius: 12px;
  background: var(--lime);
  box-shadow: 0 0 12px rgba(201, 255, 56, 0.5);
}

.tracker {
  position: absolute;
  z-index: 8;
  width: 7px;
  height: 7px;
  border: 1px solid var(--lime);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--lime);
}

.tracker-head {
  left: 60px;
  top: 45px;
}

.tracker-hip {
  right: 74px;
  top: 93px;
}

.tracker-paw {
  left: 118px;
  bottom: 6px;
}

.cyber-cat.is-idle {
  --motion-lift: 0px;
}

.cyber-cat.is-walking .leg-front-right,
.cyber-cat.is-walking .leg-back-left {
  animation: step 0.58s ease-in-out infinite alternate;
}

.cyber-cat.is-walking .leg-front-left,
.cyber-cat.is-walking .leg-back-right {
  animation: step 0.58s ease-in-out infinite alternate-reverse;
}

.cyber-cat.is-walking .body {
  animation: body-walk 0.58s ease-in-out infinite alternate;
}

.cyber-cat.is-tracking .tail {
  animation: tail-track 1.1s ease-in-out infinite alternate;
}

.cyber-cat.is-alert .head {
  transform: rotate(-8deg) translateY(-5px);
}

.cyber-cat.is-alert .ear {
  filter: brightness(1.2);
}

.cyber-cat.is-lying .body {
  top: 88px;
  left: 66px;
  width: 188px;
  height: 67px;
  border-radius: 54% 47% 38% 48% / 58% 54% 43% 44%;
  transform: rotate(1deg) scaleX(1.04);
}

.cyber-cat.is-lying .neck {
  top: 80px;
  left: 71px;
  height: 47px;
  transform: rotate(-32deg);
}

.cyber-cat.is-lying .head {
  top: 52px;
  left: 18px;
  transform: rotate(4deg);
}

.cyber-cat.is-lying .leg {
  top: 136px;
  height: 22px;
  border-radius: 55% 55% 40% 40%;
  transform: rotate(76deg);
}

.cyber-cat.is-lying .leg::after {
  bottom: -2px;
  transform: scale(0.82);
}

.cyber-cat.is-lying .leg-front-left {
  left: 80px;
}

.cyber-cat.is-lying .leg-front-right {
  left: 104px;
}

.cyber-cat.is-lying .leg-back-left {
  left: 190px;
}

.cyber-cat.is-lying .leg-back-right {
  left: 216px;
}

.cyber-cat.is-lying .tail {
  top: 82px;
  right: -8px;
  transform: rotate(17deg) scaleY(0.72);
}

.cyber-cat.is-lying .eye {
  height: 2px;
  opacity: 0.76;
}

.cyber-cat.is-jumping .body {
  animation: jump-body 1.05s cubic-bezier(0.34, 0, 0.22, 1) infinite;
}

.cyber-cat.is-jumping .head,
.cyber-cat.is-jumping .neck {
  animation: jump-front 1.05s cubic-bezier(0.34, 0, 0.22, 1) infinite;
}

.cyber-cat.is-jumping .leg-front-left,
.cyber-cat.is-jumping .leg-front-right {
  animation: jump-front-legs 1.05s cubic-bezier(0.34, 0, 0.22, 1) infinite;
}

.cyber-cat.is-jumping .leg-back-left,
.cyber-cat.is-jumping .leg-back-right {
  animation: jump-back-legs 1.05s cubic-bezier(0.34, 0, 0.22, 1) infinite;
}

.cyber-cat.is-jumping .tail {
  animation: jump-tail 1.05s cubic-bezier(0.34, 0, 0.22, 1) infinite;
}

.cyber-cat.is-jumping .tracker {
  animation: jump-trackers 1.05s cubic-bezier(0.34, 0, 0.22, 1) infinite;
}

@keyframes breathe {
  50% {
    opacity: 0.96;
  }
}

@keyframes step {
  to {
    transform: rotate(16deg) translateY(-3px);
  }
}

@keyframes body-walk {
  to {
    transform: rotate(2deg) translateY(-4px);
  }
}

@keyframes tail-track {
  to {
    transform: rotate(3deg);
  }
}

@keyframes jump-body {
  0%,
  100% {
    transform: rotate(5deg) translateY(0) scaleY(0.92);
  }
  18% {
    transform: rotate(7deg) translateY(9px) scaleY(0.84);
  }
  48% {
    transform: rotate(-4deg) translateY(-62px) scaleY(1.04);
  }
  70% {
    transform: rotate(1deg) translateY(-42px);
  }
}

@keyframes jump-front {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  18% {
    transform: translateY(7px) rotate(5deg);
  }
  48% {
    transform: translateY(-65px) rotate(-9deg);
  }
  70% {
    transform: translateY(-44px) rotate(-3deg);
  }
}

@keyframes jump-front-legs {
  0%,
  100% {
    transform: rotate(0deg);
  }
  18% {
    transform: rotate(-16deg) translateY(8px);
  }
  48%,
  70% {
    transform: rotate(58deg) translate(10px, -42px) scaleY(0.72);
  }
}

@keyframes jump-back-legs {
  0%,
  100% {
    transform: rotate(0deg);
  }
  18% {
    transform: rotate(18deg) translateY(8px);
  }
  48%,
  70% {
    transform: rotate(-54deg) translate(-8px, -38px) scaleY(0.76);
  }
}

@keyframes jump-tail {
  0%,
  100% {
    transform: rotate(-13deg);
  }
  18% {
    transform: rotate(-24deg);
  }
  48% {
    transform: translateY(-54px) rotate(12deg);
  }
  70% {
    transform: translateY(-36px) rotate(2deg);
  }
}

@keyframes jump-trackers {
  48% {
    transform: translateY(-58px);
  }
  70% {
    transform: translateY(-40px);
  }
}

.pet-readout {
  position: absolute;
  top: 18px;
  left: 20px;
  color: #b7bbb0;
  font-family: "SFMono-Regular", Consolas, monospace;
}

.pet-readout span,
.pet-readout strong {
  display: block;
}

.twin-telemetry {
  position: absolute;
  left: 20px;
  bottom: 18px;
  display: flex;
  gap: 14px;
  color: #777c73;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 8px;
  letter-spacing: 0.06em;
}

.twin-telemetry strong {
  color: #c9ff38;
  font-weight: 500;
}

.pet-readout span {
  font-size: 8px;
  letter-spacing: 0.13em;
}

.pet-readout strong {
  margin-top: 5px;
  color: var(--lime);
  font-size: 12px;
  font-weight: 500;
}

.view-controls {
  position: absolute;
  right: 16px;
  bottom: 16px;
  display: flex;
  padding: 3px;
  background: rgba(12, 14, 12, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
}

.view-controls button {
  min-width: 34px;
  height: 30px;
  color: #9da197;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 9px;
}

.view-controls button.active {
  color: #151713;
  background: var(--lime);
}

.pose-controls {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 9;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  color: rgba(233, 235, 227, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(12, 14, 12, 0.62);
  backdrop-filter: blur(8px);
  font: 7px "SFMono-Regular", Consolas, monospace;
  letter-spacing: 0.08em;
}

.pose-controls > span {
  padding: 0 5px;
}

.pose-controls button {
  height: 28px;
  padding: 0 10px;
  color: #d7dacf;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: transparent;
  cursor: pointer;
  font-size: 9px;
}

.pose-controls button:hover,
.pose-controls button.active {
  color: #151713;
  border-color: var(--lime);
  background: var(--lime);
}


.twin-footer {
  justify-content: space-between;
}

.signal-meter {
  display: grid;
  grid-template-columns: auto auto auto;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 9px;
}

.signal-meter strong {
  min-width: 29px;
  color: var(--ink);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
}

.bars {
  height: 18px;
  display: flex;
  align-items: end;
  gap: 3px;
}

.bars i {
  width: 3px;
  background: #c3c5bf;
  transition: background 0.3s ease;
}

.bars i:nth-child(1) {
  height: 5px;
}

.bars i:nth-child(2) {
  height: 8px;
}

.bars i:nth-child(3) {
  height: 11px;
}

.bars i:nth-child(4) {
  height: 14px;
}

.bars i:nth-child(5) {
  height: 18px;
}

.bars i.active {
  background: var(--lime-deep);
}

.pause-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px solid var(--line);
}

.pause-button span {
  width: 8px;
  height: 10px;
  border-left: 2px solid currentColor;
  border-right: 2px solid currentColor;
}

.pause-button:disabled {
  opacity: 0.36;
  cursor: not-allowed;
}

.metrics {
  margin-top: 32px;
  display: grid;
  grid-template-columns: 1.15fr repeat(3, 1fr);
  gap: 12px;
}

.metric-intro,
.metric-card {
  min-height: 122px;
  padding: 22px;
  border: 1px solid var(--line);
}

.metric-intro {
  border-left: 0;
  border-top: 0;
  border-bottom: 0;
}

.metric-intro .eyebrow {
  margin-bottom: 15px;
}

.metric-intro h2 {
  margin: 0;
  font-family: Georgia, "Songti SC", serif;
  font-size: 24px;
  font-weight: 400;
}

.metric-card {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 15px;
  overflow: hidden;
  background: rgba(250, 250, 244, 0.58);
}

.metric-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  align-self: start;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-family: Georgia, serif;
}

.metric-card small {
  color: var(--muted);
  font-size: 10px;
}

.metric-card strong {
  display: block;
  margin-top: 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 35px;
  font-weight: 400;
  line-height: 1;
}

.metric-card strong em {
  margin-left: 4px;
  color: var(--muted);
  font-family: "Helvetica Neue", sans-serif;
  font-size: 10px;
  font-style: normal;
}

.metric-card p {
  position: absolute;
  right: 18px;
  bottom: 13px;
  margin: 0;
  color: var(--muted);
  font-size: 8px;
}

.accent-card {
  color: #f1f2e9;
  background: var(--dark);
  border-color: var(--dark);
}

.accent-card .metric-icon {
  color: var(--lime);
  border-color: rgba(255, 255, 255, 0.15);
}

.accent-card small,
.accent-card p,
.accent-card strong em {
  color: #9ca096;
}

.mini-chart {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 86px;
  height: 28px;
  display: flex;
  align-items: end;
  gap: 3px;
}

.mini-chart i {
  flex: 1;
  min-height: 2px;
  background: var(--lime-deep);
  opacity: 0.75;
  transition: height 0.4s ease;
}

footer {
  min-height: 72px;
  padding: 0 clamp(24px, 5vw, 76px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 8px;
  letter-spacing: 0.12em;
}

.toast {
  position: fixed;
  z-index: 20;
  left: 50%;
  bottom: 28px;
  padding: 12px 18px;
  color: #eef0e8;
  background: rgba(24, 27, 23, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 2px;
  font-size: 11px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 16px);
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.pair-dialog {
  width: min(92vw, 520px);
  padding: 30px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #f1f1e9;
  box-shadow: 0 30px 100px rgba(16, 18, 15, 0.3);
}

.pair-dialog::backdrop {
  background: rgba(18, 21, 17, 0.62);
  backdrop-filter: blur(8px);
}

.pair-dialog h2 {
  margin: 0;
  font: 400 36px Georgia, "Songti SC", serif;
}

.pair-close {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  font-size: 19px;
}

.pair-description,
.pair-note {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}

.pair-description {
  margin: 14px 0 24px;
}

.pair-code {
  padding: 20px;
  text-align: center;
  color: #151713;
  background: var(--lime);
  font: 600 clamp(34px, 10vw, 52px) "SFMono-Regular", Consolas, monospace;
  letter-spacing: 0.2em;
}

.pair-dialog label {
  display: block;
  margin: 20px 0 7px;
  color: var(--muted);
  font-size: 9px;
}

.pair-url {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
}

.pair-url input,
.pair-url button {
  height: 42px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.45);
}

.certificate-setup {
  margin-top: 10px;
}

.certificate-setup span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 10px;
}

.certificate-setup input {
  width: 100%;
  height: 38px;
  padding: 0 10px;
  color: var(--ink);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.45);
  font: 10px monospace;
}

.pair-url input {
  min-width: 0;
  padding: 0 10px;
  color: var(--ink);
  font: 10px monospace;
}

.pair-url button {
  padding: 0 15px;
  cursor: pointer;
  border-left: 0;
}

.pair-status {
  margin-top: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
}

.pair-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lime-deep);
  box-shadow: 0 0 0 4px rgba(151, 195, 21, 0.13);
}

.pair-note {
  margin: 16px 0 0;
}

.skin-upload {
  padding: 12px;
  display: grid !important;
  grid-template-columns: 72px 1fr;
  align-items: center;
  gap: 14px;
  border: 1px dashed var(--line);
  cursor: pointer;
}

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

.skin-upload-grid .skin-upload {
  grid-template-columns: 1fr;
  align-content: start;
  padding: 10px;
}

.skin-upload-grid .skin-upload-preview {
  width: 100%;
  height: 112px;
}

.skin-upload-grid .skin-upload strong,
.skin-upload-grid .skin-upload small {
  text-align: center;
}

.skin-upload input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.skin-upload-preview {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.48);
  font: 300 30px Georgia, serif;
  background-position: center;
  background-size: cover;
}

.skin-upload strong,
.skin-upload small {
  display: block;
}

.skin-upload strong {
  font-size: 12px;
}

.skin-upload small {
  margin-top: 6px;
  color: var(--muted);
  font-size: 9px;
}

@media (max-width: 620px) {
  .skin-upload-grid {
    grid-template-columns: 1fr;
  }

  .skin-upload-grid .skin-upload {
    grid-template-columns: 86px 1fr;
  }

  .skin-upload-grid .skin-upload-preview {
    height: 86px;
  }

  .skin-upload-grid .skin-upload strong,
  .skin-upload-grid .skin-upload small {
    text-align: left;
  }
}

.skin-options {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.fusion-principles {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.fusion-principles span {
  padding: 9px 8px;
  color: var(--muted);
  border: 1px solid var(--line);
  font-size: 8px;
}

.fusion-principles i {
  margin-right: 5px;
  color: var(--lime-deep);
  font: normal 8px "SFMono-Regular", Consolas, monospace;
}

.skin-options button {
  min-width: 0;
  padding: 8px;
  text-align: left;
  border: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
}

.skin-options button.active {
  border-color: var(--lime-deep);
  box-shadow: inset 0 -2px var(--lime-deep);
}

.skin-options strong,
.skin-options small {
  display: block;
}

.skin-options strong {
  margin-top: 7px;
  font-size: 9px;
}

.skin-options small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 7px;
}

.skin-swatch {
  height: 34px;
  display: block;
  background: linear-gradient(135deg, #d6d7cd, #343832);
}

.skin-swatch.soft {
  background: linear-gradient(135deg, #d0a477, #6d4938);
}

.skin-swatch.pixel {
  background: repeating-conic-gradient(#c9ff38 0 25%, #383d35 0 50%) 0 / 12px 12px;
}

.skin-swatch.neon {
  background: linear-gradient(135deg, #ff3bd4, #2efcff 55%, #c9ff38);
}

.skin-swatch.mono {
  background: repeating-linear-gradient(135deg, #171917 0 3px, #e4e5dc 3px 7px);
}

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

.skin-actions button {
  height: 42px;
  border: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
  font-size: 10px;
}

.skin-actions .skin-apply-button {
  color: #151713;
  border-color: var(--lime);
  background: var(--lime);
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 14px 0;
}

.auth-tabs button,
.plan-card button,
.auth-submit {
  height: 40px;
  border: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
  font-size: 10px;
}

.auth-tabs button.active,
.plan-card.is-featured button,
.auth-submit {
  color: #151713;
  border-color: var(--lime);
  background: var(--lime);
}

.auth-field {
  margin-top: 10px;
  display: grid;
  gap: 6px;
}

.auth-field span {
  color: var(--muted);
  font-size: 9px;
}

.auth-field input {
  height: 42px;
  padding: 0 12px;
  color: var(--ink);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.66);
  font: inherit;
  font-size: 12px;
}

.auth-submit {
  width: 100%;
  margin-top: 14px;
}

/* --- Auth method tabs (Email / Phone / WeChat) --- */
.auth-method-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
  margin: 10px 0 6px;
}

.auth-method-tabs button {
  height: 36px;
  border: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
  font-size: 10px;
  border-radius: 6px;
  transition: all 0.15s;
}

.auth-method-tabs button.active {
  color: #151713;
  border-color: var(--lime);
  background: var(--lime);
}

/* --- SMS code row --- */
.auth-sms-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  margin-top: 6px;
}

.auth-field-code {
  flex: 1;
  margin-top: 0;
}

.auth-send-code-btn {
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--lime);
  background: transparent;
  color: var(--lime-deep);
  font-size: 10px;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.15s;
}

.auth-send-code-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.auth-send-code-btn:hover:not(:disabled) {
  background: var(--lime);
  color: #151713;
}

.auth-phone-note {
  margin: 10px 0 0;
  color: rgba(233, 235, 227, 0.48);
  font-size: 11px;
}

/* --- WeChat QR --- */
.auth-wechat-qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 0;
}

.auth-wechat-pending {
  color: var(--muted);
  font-size: 10px;
  text-align: center;
  line-height: 1.6;
}

.auth-wechat-hint {
  color: var(--ink);
  font-size: 11px;
}

.auth-wechat-qr-img {
  width: 180px;
  height: 180px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.auth-fields-wechat small {
  display: block;
  text-align: center;
  color: var(--muted);
  font-size: 9px;
}

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

.plan-card {
  padding: 13px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.52);
}

.plan-card.is-featured {
  border-color: rgba(151, 195, 21, 0.45);
  background: rgba(201, 255, 56, 0.09);
}

.plan-card span,
.plan-card strong,
.plan-card p {
  display: block;
}

.plan-card span {
  color: var(--muted);
  font: 8px "SFMono-Regular", Consolas, monospace;
  letter-spacing: 0.16em;
}

.plan-card strong {
  margin-top: 5px;
  font-size: 13px;
  font-weight: 500;
}

.plan-card p {
  min-height: 48px;
  margin: 8px 0 12px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}

.plan-card button {
  width: 100%;
}

.custom-locked-panel {
  margin-top: 12px;
  padding: 13px;
  display: grid;
  gap: 5px;
  color: rgba(49, 54, 44, 0.56);
  border: 1px dashed rgba(49, 54, 44, 0.22);
  background: rgba(255, 255, 255, 0.34);
}

.custom-locked-panel strong {
  color: rgba(49, 54, 44, 0.68);
  font-size: 12px;
  font-weight: 500;
}

.custom-locked-panel span {
  font-size: 10px;
  line-height: 1.5;
}

.skin-upload-grid.is-locked,
.custom-identity-field.is-locked,
.skin-dialog:has(.custom-locked-panel:not([hidden])) .fusion-principles,
.skin-dialog:has(.custom-locked-panel:not([hidden])) .skin-actions {
  filter: grayscale(1);
  opacity: 0.42;
  pointer-events: none;
}

.custom-identity-field {
  margin-top: 12px;
  display: grid;
  gap: 6px;
}

.custom-identity-field span {
  color: rgba(49, 54, 44, 0.7);
  font-size: 10px;
}

.custom-identity-field input {
  width: 100%;
  padding: 10px 11px;
  color: var(--ink);
  border: 1px solid rgba(49, 54, 44, 0.18);
  background: rgba(255, 255, 255, 0.72);
  font: inherit;
  outline: none;
}

.custom-identity-field input:focus {
  border-color: rgba(49, 54, 44, 0.42);
}

.custom-identity-field small {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.payment-amount {
  margin-top: 12px;
  padding: 12px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border: 1px solid rgba(201, 255, 56, 0.32);
  background: rgba(201, 255, 56, 0.09);
}

.payment-amount span {
  color: var(--muted);
  font-size: 10px;
}

.payment-amount strong {
  color: #151713;
  font-size: 28px;
  font-weight: 700;
}

.payment-qr-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.payment-qr-grid article {
  padding: 10px;
  text-align: center;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.62);
}

.payment-qr-grid span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 10px;
}

.payment-qr-grid img {
  width: 100%;
  height: 220px;
  object-fit: contain;
  background: #fff;
}

.payment-order-box {
  margin-top: 10px;
  padding: 9px 10px;
  color: rgba(49, 54, 44, 0.72);
  border: 1px solid rgba(49, 54, 44, 0.14);
  background: rgba(255, 255, 255, 0.52);
  font: 9px "SFMono-Regular", Consolas, monospace;
  overflow-wrap: anywhere;
}

.payment-confirm-button {
  width: 100%;
  margin-top: 12px;
}

.skin-actions .skin-apply-button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.fusion-status {
  margin-top: 10px;
  padding: 10px 11px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  border: 1px solid var(--line);
  font-size: 9px;
}

.fusion-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #a7aaa4;
}

.fusion-status.is-working i {
  background: var(--lime-deep);
  box-shadow: 0 0 0 4px rgba(151, 195, 21, 0.13);
  animation: fusion-pulse 1s ease-in-out infinite alternate;
}

.fusion-status.is-ready i {
  background: var(--lime-deep);
}

.fusion-status.is-error {
  color: #a64c35;
}

.fusion-status.is-error i {
  background: #a64c35;
}

@keyframes fusion-pulse {
  to {
    opacity: 0.35;
  }
}

@media (max-width: 1020px) {
  .hero-copy {
    grid-template-columns: 1fr 300px;
  }

  .workspace {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .sync-bridge {
    height: 42px;
  }

  .bridge-line {
    top: 20px;
  }

  .bridge-core {
    transform: rotate(90deg);
  }

  .sync-bridge p {
    display: none;
  }

  .metrics {
    grid-template-columns: repeat(3, 1fr);
  }

  .metric-intro {
    grid-column: 1 / -1;
    min-height: auto;
    padding-left: 0;
    border-right: 0;
  }
}

@media (max-width: 560px) {
  .skin-options {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 720px) {
  .topbar {
    height: 70px;
    padding: 0 18px;
    grid-template-columns: 1fr auto;
  }

  .system-state {
    display: none;
  }

  .app-shell {
    width: min(100% - 28px, 620px);
    padding-top: 42px;
  }

  .hero-copy {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  h1 {
    font-size: clamp(44px, 14vw, 70px);
  }

  .camera-stage,
  .pet-stage {
    height: 360px;
  }

  .metrics {
    grid-template-columns: 1fr;
  }

  .metric-intro {
    grid-column: auto;
  }

  footer {
    padding: 20px;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
  }
}

@media (max-width: 430px) {
  .panel-heading {
    padding: 18px;
  }

  .twin-skin-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .twin-skin-actions {
    width: 100%;
  }

  .twin-skin-actions > button {
    flex: 1;
    justify-content: center;
  }

  .camera-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .camera-source {
    grid-template-columns: 1fr;
  }

  .camera-source small {
    grid-column: 1;
  }

  .primary-button,
  .secondary-button,
  .calibrate-button {
    width: 100%;
  }

  .camera-stage,
  .pet-stage {
    height: 320px;
  }

  .cyber-cat {
    bottom: 74px;
    --device-scale: 0.82;
  }

  .pet-shadow {
    bottom: 66px;
  }

  .twin-footer {
    gap: 8px;
  }

  .signal-meter {
    grid-template-columns: auto auto;
  }

  .signal-meter strong {
    display: none;
  }
}

/* --- Community --- */
.community-section {
  width: min(1440px, calc(100% - 48px));
  margin: 0 auto 64px;
}

.community-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.community-topics {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.community-topic-chip {
  padding: 5px 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255,255,255,0.4);
  color: var(--muted);
  font-size: 11px;
  cursor: pointer;
  transition: all 0.15s;
}
.community-topic-chip:hover { border-color: var(--lime); color: #151713; }
.community-topic-chip.active {
  background: var(--lime);
  border-color: var(--lime);
  color: #151713;
}

/* Share box */
.community-share-box {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 24px;
  position: relative;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

.share-box-inner {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.share-image-btn {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px dashed rgba(0,0,0,0.15);
  border-radius: 12px;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
}
.share-image-btn:hover { border-color: var(--lime); color: var(--lime-dark, #7a8c2f); }

.community-textarea {
  flex: 1;
  min-height: 44px;
  padding: 8px 0;
  background: transparent;
  border: none;
  color: #151713;
  font: 14px/1.55 "SF Pro Display", "Helvetica Neue", "PingFang SC", sans-serif;
  resize: vertical;
  outline: none;
  box-sizing: border-box;
}
.community-textarea::placeholder { color: #bbb; }

.share-preview {
  margin-top: 10px;
  position: relative;
  display: inline-block;
}
.share-preview img {
  max-height: 200px;
  border-radius: 12px;
  object-fit: cover;
}
.share-remove-img {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.5);
  color: #fff;
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.community-share-row {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  align-items: center;
}

.community-topic-select {
  flex: 1;
  height: 34px;
  padding: 0 10px;
  background: rgba(0,0,0,0.03);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 8px;
  color: #555;
  font: 12px "SF Pro Display", "Helvetica Neue", "PingFang SC", sans-serif;
  outline: none;
  cursor: pointer;
}

.community-post-btn {
  height: 34px;
  padding: 0 22px;
  color: #fff;
  background: #ff2442;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.15s;
}
.community-post-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.community-post-btn:not(:disabled):hover { opacity: 0.9; }

.community-login-hint {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(4px);
  border-radius: 16px;
  font-size: 13px;
  color: var(--muted);
}
.community-share-box.is-logged-in .community-login-hint { display: none; }

/* Feed - Xiaohongshu waterfall cards */
.community-feed {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

@media (max-width: 700px) {
  .community-feed { grid-template-columns: 1fr; }
}

.community-loading {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  padding: 48px;
}

.community-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}
.community-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.community-card-image {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
}

.community-card-body {
  padding: 14px 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.community-card-content {
  font-size: 13px;
  line-height: 1.65;
  color: #222;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Text-only card styling */
.community-card.is-text .community-card-body {
  background: linear-gradient(135deg, #fef9f0 0%, #fdf5e6 100%);
}
.community-card.is-text .community-card-content {
  font-size: 15px;
  line-height: 1.7;
  -webkit-line-clamp: 6;
}

.community-card-topic {
  display: inline-block;
  padding: 2px 8px;
  background: rgba(255,36,66,0.08);
  color: #ff2442;
  font-size: 10px;
  font-weight: 500;
  border-radius: 4px;
  width: fit-content;
}

.community-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 8px;
  border-top: 0.5px solid rgba(0,0,0,0.05);
}

.community-card-user-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.community-card-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff9a56, #ff2442);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.community-card-pet {
  font-size: 11px;
  font-weight: 600;
  color: #333;
}

.community-card-time {
  font-size: 10px;
  color: #bbb;
}

.community-like-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: none;
  border: none;
  color: #999;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
  border-radius: 12px;
}
.community-like-btn:hover { background: rgba(255,36,66,0.06); color: #ff2442; }
.community-like-btn.is-liked { color: #ff2442; }

.community-empty {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  padding: 64px 0;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
