﻿:root {
  --bg-a: #fefbf5;
  --bg-b: #f1f6ff;
  --card: #ffffffcc;
  --stroke: #d9e2f2;
  --text: #1f2a44;
  --muted: #5a6477;
  --accent: #0f7c9c;
  --accent-2: #27b8a5;
  --shadow: 0 16px 40px rgba(16, 55, 88, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: "Avenir Next", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 8% 15%, #ffe8cc 0%, #ffe8cc00 28%),
    radial-gradient(circle at 92% 8%, #dff4ff 0%, #dff4ff00 33%),
    linear-gradient(150deg, var(--bg-a), var(--bg-b));
}

.mini-nav,
.viewer-card,
.server-card,
.info-card {
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: 20px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(3px);
}

.page-shell {
  width: min(1080px, 100% - 24px);
  margin: 18px auto 28px;
  display: grid;
  gap: 14px;
}

.mini-nav {
  min-height: 46px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.mini-nav-brand {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.mini-nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.mini-nav-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid #c8daeb;
  color: #1f4f69;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  background: #f6fbff;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.mini-nav-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid #176b8a;
  color: #fff;
  background: #1f6f8d;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.mini-nav-download:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 12px rgba(23, 107, 138, 0.24);
}

.mini-nav-download[hidden] {
  display: none !important;
}

.mini-nav-links a:hover {
  border-color: #89adca;
  transform: translateY(-1px);
}

.viewer-card {
  padding: 14px;
}

.compare-stage {
  position: relative;
  width: min(100%, 720px);
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  border-radius: 16px;
  border: 1px solid var(--stroke);
  overflow: hidden;
  background: #e8eef8;
  cursor: ew-resize;
  touch-action: none;
}

.compare-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.new-mask {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
}

.divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(100% - 1px);
  width: 2px;
  transform: translateX(-1px);
  background: linear-gradient(180deg, #fff, #d8ecff);
  box-shadow: 0 0 0 1px #0b5a72aa, 0 0 14px #11a8c099;
  pointer-events: none;
}

.server-card {
  padding: 12px;
}

.server-box {
  border: 1px solid #cfe0f2;
  border-radius: 14px;
  background: #f4fbff;
  padding: 10px;
}

.visually-hidden-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.core-actions {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(2, minmax(148px, 1fr));
  gap: 10px;
  max-width: 680px;
}

.core-btn {
  position: relative;
  --pulse-rgb: 40, 95, 132;
  aspect-ratio: 4 / 1;
  border-radius: 16px;
  border: 1px solid #bfcfdf;
  min-height: 0;
  padding: 4px 10px;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 8px;
  text-align: center;
  font-weight: 800;
  letter-spacing: 0.01em;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.core-btn:hover {
  transform: translateY(-2px);
}

.core-btn.pulse-glow::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  border: 2px solid rgba(var(--pulse-rgb), 0.34);
  opacity: 0;
  transform: scale(0.98);
  pointer-events: none;
  animation: core-halo 1.9s ease-in-out infinite;
}

.core-btn.pulse-glow::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 25%;
  width: clamp(30px, 4.6vw, 42px);
  height: clamp(30px, 4.6vw, 42px);
  background: url("./assets/icons/hand-point.svg") center / contain no-repeat;
  pointer-events: none;
  filter: drop-shadow(0 4px 8px rgba(28, 66, 98, 0.26));
  z-index: 3;
  transform: translate(-50%, -50%) rotate(90deg);
  animation: pointer-mid-left 1.1s ease-in-out infinite;
}

.core-title {
  font-size: clamp(14px, 1.9vw, 22px);
  line-height: 1.1;
}

.core-icon {
  width: clamp(24px, 4.3vw, 40px);
  height: clamp(24px, 4.3vw, 40px);
  margin-bottom: 0;
  flex: 0 0 auto;
}

.core-sub {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 5px;
  margin-top: 0;
  max-width: 100%;
  font-size: clamp(9px, 1vw, 11px);
  line-height: 1;
  font-weight: 600;
  color: #4b5d73;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}

.core-progress {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 1px;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.24);
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.core-progress-fill {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #9dddf0 0%, #ffffff 72%, #ffffff 100%);
  transition: width 0.14s linear;
}

.core-generate.is-busy .core-progress {
  opacity: 1;
}

.core-upload {
  color: #1f3347;
  background: #f2f7fc;
  box-shadow: 0 8px 18px rgba(44, 87, 125, 0.12);
}

#pickImageBtn.pulse-glow {
  --pulse-rgb: 40, 95, 132;
  animation: breathe-upload 1.9s ease-in-out infinite;
}

.core-generate {
  border: 1px solid #195d77;
  color: #fff;
  background: #1f6f8d;
  box-shadow: 0 12px 24px rgba(21, 79, 102, 0.32);
  font-size: clamp(18px, 2.2vw, 28px);
}

#sendToServerBtn.pulse-glow {
  --pulse-rgb: 38, 184, 165;
  animation: breathe-generate 1.9s ease-in-out infinite;
}

.core-generate:disabled {
  opacity: 0.68;
  cursor: not-allowed;
  transform: none;
}

.core-sub-light {
  color: #d9eef7;
}

@keyframes breathe-upload {
  0%,
  100% {
    border-color: #bfcfdf;
    box-shadow: 0 8px 18px rgba(44, 87, 125, 0.12);
  }
  50% {
    border-color: #7d9db8;
    box-shadow:
      0 0 0 6px rgba(40, 95, 132, 0.16),
      0 12px 26px rgba(44, 87, 125, 0.24);
  }
}

@keyframes breathe-generate {
  0%,
  100% {
    border-color: #195d77;
    box-shadow: 0 12px 24px rgba(21, 79, 102, 0.32);
  }
  50% {
    border-color: #51aec6;
    box-shadow:
      0 0 0 8px rgba(38, 184, 165, 0.22),
      0 16px 28px rgba(21, 79, 102, 0.4);
  }
}

@keyframes core-halo {
  0%,
  100% {
    opacity: 0;
    transform: scale(0.98);
  }
  50% {
    opacity: 1;
    transform: scale(1.03);
  }
}

@keyframes pointer-mid-left {
  0%,
  100% {
    opacity: 0.9;
    transform: translate(-50%, -50%) translateX(0) rotate(90deg) scale(1);
  }
  50% {
    opacity: 1;
    transform: translate(-50%, -50%) translateX(8px) rotate(90deg) scale(1.06);
  }
}

@media (prefers-reduced-motion: reduce) {
  .core-btn.pulse-glow,
  .core-btn.pulse-glow::before,
  .core-btn.pulse-glow::after {
    animation: none !important;
  }
}

.server-status,
.current-meta {
  margin: 8px 0 0;
  min-height: 16px;
  color: var(--muted);
  font-size: 12px;
}

.server-status.is-error {
  color: #b23b3b;
}

.server-status.is-ok {
  color: #0f7c9c;
}

.current-meta {
  font-weight: 600;
}

.info-card {
  padding: 10px 12px;
}

.info-card h2 {
  margin: 0 0 6px;
  font-size: 14px;
}

.info-card p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}

.faq-item + .faq-item {
  margin-top: 8px;
}

.faq-item h3 {
  margin: 0 0 3px;
  font-size: 12px;
}

.quota-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 16px;
}

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

.quota-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 31, 45, 0.46);
}

.quota-modal-card {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  border-radius: 16px;
  border: 1px solid #d4e1ee;
  background: #ffffff;
  box-shadow: 0 18px 36px rgba(10, 38, 62, 0.24);
  padding: 14px;
}

.quota-modal-card h3 {
  margin: 0;
  font-size: 18px;
}

.quota-modal-card p {
  margin: 10px 0 0;
  font-size: 14px;
  color: #44556a;
  line-height: 1.45;
}

.quota-actions {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.quota-btn {
  min-height: 52px;
  border-radius: 14px;
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 12px;
  white-space: nowrap;
  cursor: pointer;
}

.store-icon {
  width: 22px;
  height: 22px;
  display: block;
  flex: 0 0 22px;
  filter: drop-shadow(0 2px 4px rgba(10, 36, 56, 0.22));
}

.quota-primary {
  background: #176b8a;
  color: #fff;
  border-color: #176b8a;
  box-shadow: 0 10px 22px rgba(23, 107, 138, 0.28);
}

.quota-ghost {
  background: #f3f8fd;
  color: #23445e;
  border-color: #c7d8e9;
}

.quota-btn.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

@media (max-width: 720px) {
  .page-shell {
    width: 100%;
    margin: 0;
    padding: 10px;
    gap: 10px;
  }

  .mini-nav,
  .viewer-card,
  .server-card,
  .info-card {
    border-radius: 16px;
  }

  .mini-nav {
    min-height: 42px;
    padding: 6px 8px;
  }

  .mini-nav-brand {
    font-size: 12px;
  }

  .mini-nav-links {
    gap: 6px;
  }

  .mini-nav-links a {
    min-height: 26px;
    padding: 0 8px;
    font-size: 11px;
  }

  .mini-nav-download {
    min-height: 26px;
    padding: 0 10px;
    font-size: 11px;
  }

  .viewer-card {
    padding: 10px;
  }

  .compare-stage {
    width: 100%;
  }

  .core-actions {
    grid-template-columns: repeat(2, minmax(116px, 1fr));
    gap: 8px;
    max-width: 100%;
  }

  .core-btn {
    border-radius: 12px;
    padding: 3px 8px;
    gap: 6px;
  }

  .core-icon {
    width: 22px;
    height: 22px;
    margin-bottom: 0;
  }

  .core-sub {
    left: 6px;
    right: 6px;
    bottom: 5px;
    margin-top: 0;
    font-size: 9px;
  }

  .core-progress {
    left: 6px;
    right: 6px;
    bottom: 1px;
    height: 4px;
  }

  .info-card {
    padding: 9px 10px;
  }

  .info-card h2 {
    font-size: 13px;
  }

  .info-card p {
    font-size: 11px;
  }

  .quota-modal-card {
    border-radius: 14px;
    padding: 12px;
  }

  .quota-modal-card h3 {
    font-size: 16px;
  }

  .quota-modal-card p {
    font-size: 13px;
  }

  .quota-actions {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .quota-btn {
    min-height: 56px;
    font-size: 16px;
  }

  .store-icon {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
  }
}

/* Site variant: CurbCanvas Lab */
:root {
  --bg-a: #ecf7f5;
  --bg-b: #e6eef9;
  --card: #ffffffdd;
  --stroke: #c5d9e4;
  --text: #123044;
  --muted: #486071;
  --accent: #0d8f73;
  --accent-2: #2bb39b;
  --shadow: 0 16px 36px rgba(13, 67, 90, 0.14);
}

body {
  font-family: "Segoe UI", "Tahoma", "PingFang SC", sans-serif;
  background:
    radial-gradient(circle at 12% 12%, #b8f1e3 0%, #b8f1e300 31%),
    radial-gradient(circle at 86% 10%, #cce4ff 0%, #cce4ff00 34%),
    linear-gradient(160deg, var(--bg-a), var(--bg-b));
}

.page-shell {
  width: min(1120px, 100% - 28px);
  gap: 16px;
}

.mini-nav,
.viewer-card,
.server-card,
.info-card {
  border-radius: 14px;
  border-width: 1px;
}

.mini-nav {
  background: linear-gradient(120deg, #0f3146, #155069);
  border-color: #1b4f68;
  box-shadow: 0 14px 28px rgba(9, 46, 66, 0.24);
}

.mini-nav-brand {
  color: #f2fcff;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.mini-nav-links a {
  border-color: #4d8096;
  color: #dff5ff;
  background: rgba(10, 54, 77, 0.7);
}

.mini-nav-download {
  border-color: #4ef2c2;
  color: #103743;
  background: linear-gradient(120deg, #6dffd6, #40e8be);
}

.mini-nav-download:hover {
  box-shadow: 0 8px 16px rgba(81, 247, 203, 0.28);
}

.viewer-card,
.server-card,
.info-card {
  background: linear-gradient(180deg, #ffffffde, #f7fcffde);
}

.compare-stage {
  border-radius: 12px;
  background: #d8e7ee;
}

.divider {
  background: linear-gradient(180deg, #e7fff7, #9ee7d5);
  box-shadow: 0 0 0 1px #0f7d6499, 0 0 14px #21aa8f99;
}

.core-upload {
  background: linear-gradient(150deg, #d4f3ea, #c0e8dc);
  border-color: #88c7b5;
  color: #19494f;
}

.core-generate {
  background: linear-gradient(150deg, #138f74, #2caf97);
  border-color: #0f775f;
}

.core-progress-fill {
  background: linear-gradient(90deg, #7bffd6, #4af0bf);
}

.server-status {
  color: #2e5e73;
}

.info-card h2 {
  color: #154359;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.faq-item {
  border-left: 3px solid #2ea890;
  padding-left: 10px;
}

.quota-modal-backdrop {
  background: rgba(8, 42, 55, 0.58);
}

.quota-modal-card {
  border-color: #b6d9ea;
  background: linear-gradient(180deg, #f6feff, #ecf7ff);
}

.quota-primary {
  background: #138f74;
  border-color: #138f74;
  box-shadow: 0 10px 22px rgba(19, 143, 116, 0.28);
}

/* Readability bump: enlarge text in the current page window */
.mini-nav-brand {
  font-size: 15px;
}

.mini-nav-links a,
.mini-nav-download {
  font-size: 13px;
}

.core-title {
  font-size: clamp(16px, 2.2vw, 24px);
}

.core-sub {
  font-size: clamp(10px, 1.2vw, 12px);
}

.server-status,
.current-meta {
  font-size: 13px;
}

.info-card h2 {
  font-size: 16px;
}

.info-card p,
.faq-item p {
  font-size: 13px;
}

.faq-item h3 {
  font-size: 15px;
}

/* Mobile fine-tuning: keep readability but avoid crowding on narrow screens */
@media (max-width: 720px) {
  .mini-nav-brand {
    font-size: 13px;
  }

  .mini-nav-links a,
  .mini-nav-download {
    font-size: 11px;
  }

  .core-title {
    font-size: clamp(15px, 4.8vw, 20px);
  }

  .core-sub {
    font-size: clamp(9px, 2.6vw, 11px);
  }

  .server-status,
  .current-meta {
    font-size: 12px;
  }

  .info-card h2 {
    font-size: 14px;
  }

  .info-card p,
  .faq-item p {
    font-size: 12px;
    line-height: 1.5;
  }

  .faq-item h3 {
    font-size: 13px;
  }
}

/* Template Variant: MetroFacade Studio */
:root {
  --bg-a: #f3f5f9;
  --bg-b: #dde4ef;
  --card: #ffffffde;
  --stroke: #b7c2d1;
  --text: #152338;
  --muted: #526075;
  --accent: #2b5a8a;
  --accent-2: #4f83b8;
  --shadow: 0 16px 36px rgba(20, 42, 66, 0.18);
}

body {
  background:
    radial-gradient(circle at 11% 9%, #ffdac3 0%, #ffdac300 29%),
    radial-gradient(circle at 89% 11%, #d5e7ff 0%, #d5e7ff00 32%),
    linear-gradient(155deg, var(--bg-a), var(--bg-b));
}

.mini-nav {
  background: linear-gradient(120deg, #1f2f45, #2c4663);
  border-color: #314f70;
}

.mini-nav-brand,
.mini-nav-links a {
  color: #e7f0ff;
}

.mini-nav-links a {
  border-color: #607fa1;
  background: rgba(31, 47, 69, 0.55);
}

.mini-nav-download {
  border-color: #f1a16c;
  color: #2b2530;
  background: linear-gradient(120deg, #ffc49d, #f5a46f);
}

.core-upload {
  background: linear-gradient(150deg, #e8edf6, #d9e2f1);
  border-color: #b2bfd3;
  color: #213550;
}

.core-generate {
  background: linear-gradient(150deg, #2b5a8a, #4f83b8);
  border-color: #214a73;
}

.core-progress-fill {
  background: linear-gradient(90deg, #ffcda7, #f3a676);
}

.faq-item {
  border-left-color: #4f83b8;
}
