:root {
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --color-ink: #0f1217; --color-panel: #171b22; --color-raise: #1e232c; --color-line: #2a3140;
  --color-fg: #f4f5f7; --color-muted: #8b919c; --color-copper: #dc2626; --color-copper-dim: #2a1518;
  --color-on-copper: #ffffff; --color-ok: #3dd68c; --color-bad: #f07167; color-scheme: dark;
}
html.light {
  --color-ink: #f6f5f2; --color-panel: #ffffff; --color-raise: #f3f1ec; --color-line: #e2e0d8;
  --color-fg: #111318; --color-muted: #5c6370; --color-copper: #dc2626; --color-copper-dim: #fde8e8;
  --color-on-copper: #ffffff; --color-ok: #157a45; --color-bad: #b42318; color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; min-height: 100vh; background: var(--color-ink); color: var(--color-fg); font-family: var(--font-sans); }
button, input, select { font: inherit; color: inherit; }
button:not(:disabled) { cursor: pointer; }
.sr-hidden { display: none !important; }
.sr-shell { max-width: 48rem; margin: 0 auto; padding: 0 12px 112px; }
.sr-top { position: sticky; top: 0; z-index: 20; margin: 0 -12px 12px; display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--color-line); background: var(--color-ink); padding: 8px 12px; }
.sr-brand { display: flex; align-items: center; gap: 8px; background: none; border: 0; padding: 0; }
.sr-brand img { height: 48px; width: 40px; object-fit: contain; }
.sr-pro { border-radius: 4px; background: var(--color-copper); padding: 2px 6px; font-size: 10px; font-weight: 800; color: #fff; }
.sr-ibtn { display: flex; width: 44px; height: 44px; align-items: center; justify-content: center; border-radius: 12px; border: 1px solid var(--color-line); background: none; font-size: 12px; font-weight: 700; }
.sr-hero { position: relative; overflow: hidden; border-radius: 16px; background: var(--color-ink); border: 1px solid var(--color-line); }
.sr-hero img { display: block; width: 100%; max-height: 290px; object-fit: cover; }
.sr-pill { position: absolute; top: 12px; left: 12px; display: flex; align-items: center; gap: 8px; border-radius: 999px; border: 1px solid var(--color-line); background: rgba(15,18,23,0.82); color: #f4f5f7; padding: 4px 12px; font-size: 11px; font-weight: 600; }
html.light .sr-pill, html.light .sr-hbtn { background: rgba(246,245,242,0.88); color: #111318; }
.sr-hactions { position: absolute; top: 12px; right: 12px; display: flex; gap: 8px; }
.sr-hbtn { display: flex; width: 44px; height: 44px; align-items: center; justify-content: center; border-radius: 12px; border: 1px solid var(--color-line); background: rgba(15,18,23,0.82); color: #f4f5f7; }
.sr-sname { margin-top: 16px; width: 100%; background: none; border: 0; font-size: 1.5rem; font-weight: 600; outline: none; }
.sr-saddr { margin-top: 4px; display: flex; align-items: center; gap: 8px; font-size: 0.875rem; color: var(--color-muted); }
.sr-saddr input { width: 100%; background: none; border: 0; outline: none; color: var(--color-fg); }
.sr-stats { margin-top: 16px; display: grid; grid-template-columns: repeat(3, 1fr); border-radius: 16px; border: 1px solid var(--color-line); background: var(--color-panel); }
.sr-stat { padding: 12px; }
.sr-stat + .sr-stat { border-left: 1px solid var(--color-line); }
.sr-slbl { font-size: 10px; font-weight: 600; color: var(--color-muted); }
.sr-sval { margin-top: 4px; font-size: 1.125rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.sr-mhdr { margin: 24px 0 8px; font-size: 12px; font-weight: 600; letter-spacing: 0.16em; color: var(--color-muted); }
.sr-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.sr-card { position: relative; border-radius: 16px; border: 1px solid var(--color-line); background: var(--color-panel); padding: 12px; text-align: left; }
.sr-card:active { transform: scale(0.99); }
.sr-cbadge { position: absolute; top: 8px; right: 8px; border-radius: 6px; background: var(--color-raise); padding: 2px 6px; font-size: 10px; font-weight: 600; color: var(--color-muted); font-variant-numeric: tabular-nums; }
.sr-csvg { height: 40px; width: 56px; display: block; }
.sr-ctitle { margin-top: 8px; font-size: 0.875rem; font-weight: 600; line-height: 1.25; }
.sr-csub { margin-top: 2px; font-size: 0.75rem; color: var(--color-muted); }
.sr-bbar { position: fixed; inset: auto 0 0 0; z-index: 20; border-top: 1px solid var(--color-line); background: rgba(15,18,23,0.95); backdrop-filter: blur(8px); padding: 12px 12px calc(12px + env(safe-area-inset-bottom,0px)); }
html.light .sr-bbar { background: rgba(246,245,242,0.95); }
.sr-binner { max-width: 48rem; margin: 0 auto; display: flex; gap: 8px; }
.sr-bproj { flex: 1; height: 48px; display: flex; align-items: center; justify-content: center; gap: 8px; border-radius: 12px; border: 1px solid var(--color-line); background: none; font-size: 0.875rem; font-weight: 600; }
.sr-bnew { flex: 1.3; height: 48px; display: flex; align-items: center; justify-content: center; gap: 6px; border-radius: 12px; border: 0; background: var(--color-copper); color: #fff; font-size: 0.875rem; font-weight: 600; }
.sr-modal { position: fixed; inset: 0; z-index: 30; display: flex; align-items: flex-end; background: rgba(0,0,0,0.55); }
.sr-sheet { max-height: 86vh; width: 100%; overflow-y: auto; border-radius: 16px 16px 0 0; border: 1px solid var(--color-line); background: var(--color-panel); padding: 16px; }
.sr-inp { margin-top: 4px; height: 44px; width: 100%; border-radius: 12px; border: 1px solid var(--color-line); background: var(--color-panel); padding: 0 12px; font-size: 0.875rem; outline: none; }
.sr-lang-ov { position: fixed; inset: 0; z-index: 40; display: flex; flex-direction: column; background: var(--color-ink); color: var(--color-fg); }
.sr-lang-btn { display: flex; height: 64px; width: 100%; align-items: center; gap: 12px; border-radius: 12px; border: 1px solid var(--color-line); background: var(--color-panel); padding: 0 12px; text-align: left; }
.sr-lang-btn.on { border-color: var(--color-copper); background: var(--color-copper-dim); }
.sr-lcode { display: flex; height: 32px; width: 48px; align-items: center; justify-content: center; border-radius: 6px; border: 1px solid var(--color-line); font-size: 12px; font-weight: 700; }
.sr-lang-btn.on .sr-lcode { background: var(--color-copper); border-color: var(--color-copper); color: #fff; }
.splash-stage { position: fixed; inset: 0; z-index: 40; display: flex; flex-direction: column; align-items: center; }
.splash-stage {
  background-color: #0f1217;
  color: #f4f5f7;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 48px 48px, 48px 48px;
}

html.light .splash-stage {
  background-color: #f6f5f2;
  color: #111318;
  background-image:
    linear-gradient(rgba(17, 19, 24, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 19, 24, 0.05) 1px, transparent 1px);
}

@keyframes cad-in {
  from {
    stroke-dashoffset: 720;
  }
  to {
    stroke-dashoffset: 0;
  }
}

.cad-line {
  stroke-dasharray: 720;
  animation: cad-in 0.7s cubic-bezier(0.4, 0, 0.2, 1) both;
}

html.sr-seen .splash-stage {
  display: none !important;
}

@keyframes splash-fill {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

@keyframes splash-sheen {
  0% {
    transform: translateX(-140%) skewX(-18deg);
  }
  100% {
    transform: translateX(180%) skewX(-18deg);
  }
}

.splash-track {
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  border: 1px solid #5c6572;
  background: linear-gradient(180deg, #050608 0%, #171b22 100%);
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.9),
    inset 0 -1px 0 rgba(255, 255, 255, 0.08);
}

html.light .splash-track {
  border-color: #c8c4ba;
  background: linear-gradient(180deg, #ffffff 0%, #f3f1ec 100%);
  box-shadow: inset 0 2px 4px rgba(17, 19, 24, 0.08);
}

.splash-fill {
  position: relative;
  height: 100%;
  width: 100%;
  overflow: hidden;
  transform-origin: left center;
  border-radius: inherit;
  background-image:
    linear-gradient(90deg, transparent 0%, transparent 62%, rgba(127, 29, 29, 0.15) 74%, #9f1239 86%, #f87171 95%, #fff 100%),
    linear-gradient(180deg, #ffffff 0%, #e6e8ec 16%, #9aa1ab 48%, #d5d8de 72%, #6d737c 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 -2px 3px rgba(0, 0, 0, 0.45);
  animation: splash-fill 1.4s cubic-bezier(0.45, 0, 0.2, 1) both;
}

.splash-glint {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.7) 48%, transparent 70%);
  animation: splash-glint 1.4s ease-in-out both;
}

@keyframes splash-glint {
  0% {
    transform: translateX(-80%);
  }
  100% {
    transform: translateX(80%);
  }
}

.splash-sheen {
  animation: splash-sheen 1.2s cubic-bezier(0.4, 0, 0.2, 1) 0.15s both;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
  .splash-fill {
    transform: scaleX(1);
  }
}

@media print {
  .no-print {
    display: none !important;
  }
  html,
  body,
  #roof-root {
    background: white !important;
    color: black !important;
  }
}


/* === Flagship LIVE 3D · CAD Studio Card (V63) === */
.sr-card-flagship {
  grid-column: 1 / -1;
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  padding: 13px 14px;
  border: 1.5px solid rgba(245, 158, 11, 0.58);
  background:
    radial-gradient(120% 130% at 0% 0%, rgba(220, 38, 38, 0.16) 0%, rgba(245, 158, 11, 0.10) 42%, transparent 78%),
    var(--color-panel);
  box-shadow:
    0 0 0 1px rgba(220, 38, 38, 0.22) inset,
    0 8px 22px -8px rgba(220, 38, 38, 0.28),
    0 4px 14px -6px rgba(245, 158, 11, 0.24);
  transition: transform 0.14s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  cursor: pointer;
}
.sr-card-flagship:hover {
  border-color: rgba(251, 191, 36, 0.88);
  box-shadow:
    0 0 0 1px rgba(239, 68, 68, 0.34) inset,
    0 10px 26px -6px rgba(220, 38, 38, 0.36),
    0 4px 16px -4px rgba(245, 158, 11, 0.32);
}
.light .sr-card-flagship {
  border-color: rgba(217, 119, 6, 0.65);
  background:
    radial-gradient(120% 130% at 0% 0%, rgba(220, 38, 38, 0.09) 0%, rgba(245, 158, 11, 0.12) 46%, transparent 82%),
    var(--color-panel);
  box-shadow:
    0 0 0 1px rgba(220, 38, 38, 0.15) inset,
    0 6px 18px -8px rgba(180, 83, 9, 0.22);
}
.sr-cflag-badges {
  position: absolute;
  top: 9px;
  right: 10px;
  display: flex;
  align-items: center;
  gap: 5px;
  z-index: 2;
}
.sr-cbadge-live {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2.5px 7px;
  border-radius: 999px;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fffbeb;
  background: linear-gradient(135deg, #dc2626 0%, #d97706 100%);
  border: 1px solid rgba(253, 224, 71, 0.55);
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.35);
}
.sr-live-dot {
  width: 5.5px;
  height: 5.5px;
  border-radius: 50%;
  background: #fde047;
  box-shadow: 0 0 6px #fde047;
}
.sr-cbadge-metric {
  position: static !important;
  border: 1px solid rgba(245, 158, 11, 0.32);
}
.sr-cflag-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 4px;
}
.sr-csvg-3d {
  width: 68px;
  height: 44px;
  flex-shrink: 0;
}
.light .sr-csvg-3d path[stroke="#fde68a"] {
  stroke: #92400e;
}
.sr-cflag-copy {
  min-width: 0;
  flex: 1;
  padding-right: 4px;
}
.sr-ctitle-flag {
  margin-top: 12px;
  font-size: 0.96rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  background: linear-gradient(90deg, #fbbf24 0%, #f97316 55%, #ef4444 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.light .sr-ctitle-flag {
  background: linear-gradient(90deg, #b45309 0%, #dc2626 85%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.sr-csub-flag {
  margin-top: 3px;
  font-size: 0.74rem;
  line-height: 1.32;
  color: var(--color-muted);
}
