: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: #e2f0fd; --color-panel: #f8fbff; --color-raise: #e6f2fe; --color-line: #b8d0ea;
  --color-fg: #0c192c; --color-muted: #435975; --color-copper: #dc2626; --color-copper-dim: #fee2e2;
  --color-on-copper: #ffffff; --color-ok: #059669; --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; max-width: 100%; overflow-x: clip; overscroll-behavior-x: none; background: var(--color-ink); color: var(--color-fg); font-family: var(--font-sans); }
#roof-root { max-width: 100%; overflow-x: clip; }
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);
}

/* === V101: 24-Language Flag Picker + Offline QR Referral Card & Modal === */
.sr-ibtn-lang {
  width: auto !important;
  min-width: 56px;
  padding: 0 10px;
  gap: 5px;
  font-size: 12px;
  font-weight: 800;
}
.sr-ibtn-qr {
  border-color: rgba(220, 38, 38, 0.55) !important;
  background: var(--color-copper-dim) !important;
  color: var(--color-fg) !important;
}
.sr-lflag {
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
}
.sr-lang-btn {
  height: 58px;
}
.sr-qr-banner {
  margin-top: 12px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-radius: 14px;
  border: 1px solid rgba(220, 38, 38, 0.48);
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.14) 0%, rgba(245, 158, 11, 0.08) 100%), var(--color-panel);
  padding: 11px 14px;
  text-align: left;
  font-size: 0.85rem;
  font-weight: 700;
  transition: transform 0.12s ease, border-color 0.16s ease;
}
.sr-qr-banner:hover {
  border-color: var(--color-copper);
}
.sr-qr-banner:active {
  transform: scale(0.99);
}
.sr-qr-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: #ffffff;
  color: #0f172a;
  padding: 16px;
  margin: 12px auto;
  max-width: 248px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}
.sr-qr-box svg {
  display: block;
  width: 192px;
  height: 192px;
}
.sr-qr-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}
.sr-qr-act-primary {
  height: 44px;
  border-radius: 12px;
  border: 0;
  background: var(--color-copper);
  color: #ffffff;
  font-size: 0.84rem;
  font-weight: 700;
}
.sr-qr-act-sec {
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--color-line);
  background: var(--color-panel);
  color: var(--color-fg);
  font-size: 0.84rem;
  font-weight: 700;
}

#langList { min-height: 0; -webkit-overflow-scrolling: touch; touch-action: pan-y; }
.sr-lang-btn { flex-shrink: 0; }

/* === V128: Mobile & Galaxy Z Fold Cover Screen Topbar Anti-Overflow Fix === */
.sr-top { max-width: 100vw; }
.sr-brand { min-width: 0; flex-shrink: 1; }
.sr-ibtn { flex-shrink: 0; }
@media (max-width: 540px) {
  .sr-top { gap: 5px; padding: 7px 10px; }
  .sr-brand { gap: 5px; }
  .sr-brand img { height: 34px; width: 28px; flex-shrink: 0; }
  .sr-brand > div { font-size: 1.02rem !important; white-space: nowrap; }
  .sr-pro { padding: 2px 5px; font-size: 9.5px; }
  .sr-ibtn { width: 35px; height: 35px; border-radius: 10px; }
  .sr-ibtn-lang { min-width: 0 !important; padding: 0 7px; height: 35px; font-size: 11px; gap: 3px; }
  #btnLicTop.sr-lic-pill { height: 34px; padding: 0 7px; font-size: 10.5px; border-radius: 9px; }
}
@media (max-width: 395px) {
  .sr-top { gap: 4px; padding: 6px 8px; }
  .sr-brand img { height: 30px; width: 24px; }
  .sr-brand > div { font-size: 0.94rem !important; }
  .sr-brand .sr-pro { display: none; }
  .sr-ibtn { width: 32px; height: 32px; border-radius: 9px; }
  .sr-ibtn-lang { padding: 0 5px; height: 32px; font-size: 10.5px; }
  #btnLicTop.sr-lic-pill { height: 32px; padding: 0 6px; font-size: 10px; }
}

/* === V129: Strict Viewport & Splash Centering Lock (Galaxy Z Fold 7 344px + S24 Ultra) === */
html, body { width: 100%; max-width: 100vw; overflow-x: clip !important; overflow-y: visible !important; position: relative; }
#roof-root, .sr-shell { width: 100%; max-width: 48rem; overflow-x: clip; }
.splash-stage {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  max-width: 100vw !important;
  overflow: hidden !important;
  padding: 0 16px;
}
.sr-top {
  width: calc(100% + 24px);
  max-width: 100vw;
  overflow: hidden;
}
.sr-stat, .sr-card, .sr-qr-banner > span { min-width: 0; }
.sr-sval, .sr-slbl { overflow-wrap: anywhere; }
@media (max-width: 395px) {
  .sr-top { gap: 3px !important; padding: 6px 8px !important; }
  .sr-brand { gap: 4px !important; }
  .sr-brand img { height: 26px !important; width: 21px !important; }
  .sr-brand > div { font-size: 0.86rem !important; }
  .sr-ibtn { width: 30px !important; height: 30px !important; border-radius: 8px !important; }
  .sr-ibtn-lang { padding: 0 4px !important; height: 30px !important; font-size: 10px !important; }
  #btnLicTop.sr-lic-pill { height: 30px !important; padding: 0 5px !important; font-size: 9.5px !important; }
}

/* === V147: Matching 3D Depth, Ambient Studio Glow & Layered Shadows on Home Dashboard === */
html:not(.light) body {
  background-color: #0a0e15;
  background-image:
    radial-gradient(120% 420px at 50% 0%, rgba(56, 189, 248, 0.08) 0%, rgba(220, 38, 38, 0.035) 44%, transparent 78%),
    linear-gradient(180deg, #0d121b 0%, #090c12 100%);
}
html.light body {
  background-color: #ebe8df;
  background-image:
    radial-gradient(120% 420px at 50% 0%, #f9f8f4 0%, #e8e5dc 82%),
    linear-gradient(180deg, #f2f0e9 0%, #e7e4da 100%);
}
html:not(.light) .sr-top {
  background: linear-gradient(180deg, rgba(26, 33, 46, 0.96) 0%, rgba(18, 23, 32, 0.94) 100%);
  backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 6px 18px -8px rgba(0, 0, 0, 0.45);
}
html.light .sr-top {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.97) 0%, rgba(246, 244, 238, 0.95) 100%);
  backdrop-filter: blur(10px);
  border-bottom-color: #d5d0c4;
  box-shadow: inset 0 1px 0 #ffffff, 0 6px 18px -8px rgba(15, 23, 42, 0.09);
}
.sr-hero {
  box-shadow: 0 14px 30px -10px rgba(0, 0, 0, 0.45), 0 3px 8px rgba(0, 0, 0, 0.2);
}
html.light .sr-hero {
  border-color: #cfc9bc;
  box-shadow: 0 12px 26px -8px rgba(15, 23, 42, 0.14), 0 3px 8px rgba(15, 23, 42, 0.06);
}
html:not(.light) .sr-stats {
  background: linear-gradient(180deg, #1b2433 0%, #131924 100%);
  border-color: #2d3a4f;
  border-top: 2.5px solid #10b981;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 10px 26px -8px rgba(0, 0, 0, 0.58);
}
html.light .sr-stats {
  background: linear-gradient(180deg, #ffffff 0%, #f3faf7 100%);
  border-color: #bddfd1;
  border-top: 2.5px solid #059669;
  box-shadow: inset 0 1px 0 #ffffff, 0 10px 24px -8px rgba(5, 150, 105, 0.12), 0 2px 6px rgba(15, 23, 42, 0.05);
}
html:not(.light) #valArea { color: #38bdf8; }
html:not(.light) #valPitch { color: #fbbf24; }
html:not(.light) #valQuote { color: #34d399; }
html.light #valArea { color: #0369a1; }
html.light #valPitch { color: #b45309; }
html.light #valQuote { color: #047857; }

html:not(.light) .sr-card:not(.sr-card-flagship) {
  background: linear-gradient(180deg, #1e2636 0%, #141923 100%);
  border-color: #2d374a;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.085), 0 10px 24px -8px rgba(0, 0, 0, 0.58), 0 2px 6px rgba(0, 0, 0, 0.32);
  transition: transform 0.14s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}
html:not(.light) .sr-card:not(.sr-card-flagship):hover {
  border-color: #43526d;
  transform: translateY(-1px);
}
html.light .sr-card:not(.sr-card-flagship) {
  background: linear-gradient(180deg, #ffffff 0%, #faf9f5 100%);
  border-color: #d4cfc3;
  box-shadow: inset 0 1px 0 #ffffff, 0 10px 22px -8px rgba(15, 23, 42, 0.11), 0 2px 6px rgba(15, 23, 42, 0.05);
  transition: transform 0.14s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}
html.light .sr-card:not(.sr-card-flagship):hover {
  border-color: #b4ae9f;
  transform: translateY(-1px);
}
html:not(.light) .sr-ibtn,
html:not(.light) .sr-bproj {
  background: linear-gradient(180deg, #262f40 0%, #181e2a 100%);
  border-color: #364258;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09), 0 2px 6px rgba(0, 0, 0, 0.32);
}
html.light .sr-ibtn,
html.light .sr-bproj {
  background: linear-gradient(180deg, #ffffff 0%, #eeeae0 100%);
  border-color: #c2bcb0;
  box-shadow: inset 0 1px 0 #ffffff, 0 2px 5px rgba(15, 23, 42, 0.07);
}
.sr-bnew {
  background: linear-gradient(180deg, #f24646 0%, #dc2626 55%, #b91c1c 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.34), 0 6px 16px -3px rgba(220, 38, 38, 0.45);
}

/* === V149: ALPINE SUNNY DAY LIGHT THEME & 3D BEVELED MODULE TILES (html.light ONLY — Dark Mode 100% Untouched!) === */
html.light body {
  background-color: #e1effd !important;
  background-image:
    radial-gradient(92% 420px at 88% 0%, rgba(253, 224, 71, 0.44) 0%, rgba(251, 191, 36, 0.19) 38%, transparent 72%),
    radial-gradient(95% 460px at 10% 8%, rgba(56, 189, 248, 0.28) 0%, transparent 72%),
    linear-gradient(180deg, #edf6ff 0%, #e1effd 52%, #d6e8fa 100%) !important;
  background-attachment: fixed;
}

html.light .splash-stage {
  background-color: #e4f1fe;
  background-image:
    radial-gradient(85% 360px at 82% 8%, rgba(253, 224, 71, 0.42) 0%, transparent 70%),
    linear-gradient(rgba(14, 58, 108, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(14, 58, 108, 0.05) 1px, transparent 1px),
    linear-gradient(180deg, #eff7ff 0%, #dcebfb 100%);
  background-size: auto, 48px 48px, 48px 48px, auto;
}

html.light .sr-top {
  background: linear-gradient(90deg, rgba(242, 249, 255, 0.96) 0%, rgba(255, 252, 235, 0.96) 55%, rgba(238, 247, 255, 0.96) 100%) !important;
  border-bottom: 1.5px solid #b5cfe9 !important;
  box-shadow: inset 0 1px 0 #ffffff, 0 8px 20px -8px rgba(12, 58, 110, 0.14) !important;
}

html.light .sr-ibtn,
html.light .sr-bproj {
  background: linear-gradient(180deg, #ffffff 0%, #e7f2fd 100%) !important;
  border: 1.5px solid #adc9e6 !important;
  border-bottom: 3px solid #86add6 !important;
  color: #0f233d !important;
  box-shadow: inset 0 1px 0 #ffffff, 0 5px 12px -3px rgba(12, 58, 110, 0.14) !important;
  transition: transform 0.1s ease, box-shadow 0.12s ease !important;
}
html.light .sr-ibtn:active,
html.light .sr-bproj:active {
  transform: translateY(1.5px) !important;
  border-bottom-width: 1.5px !important;
}

html.light .sr-ibtn-qr {
  background: linear-gradient(180deg, #fffbeb 0%, #fee2e2 100%) !important;
  border-color: #f87171 !important;
  border-bottom: 3px solid #dc2626 !important;
  color: #991b1b !important;
}

html.light .sr-hero {
  border: 1.5px solid #aac7e5 !important;
  box-shadow: 0 16px 32px -10px rgba(12, 58, 110, 0.22), 0 4px 10px rgba(12, 58, 110, 0.09) !important;
}
html.light .sr-pill,
html.light .sr-hbtn {
  background: linear-gradient(180deg, rgba(255, 254, 248, 0.94) 0%, rgba(235, 246, 255, 0.92) 100%) !important;
  border: 1px solid #b3cee9 !important;
  color: #0c192c !important;
  box-shadow: 0 4px 12px rgba(12, 58, 110, 0.18) !important;
}

/* 3D Sunlit Stats Strip (Powierzchnia · Kąt dachu · Kosztorys) */
html.light .sr-stats {
  background:
    radial-gradient(120% 140% at 92% 0%, rgba(253, 224, 71, 0.24) 0%, transparent 62%),
    linear-gradient(180deg, #fffef9 0%, #edf6ff 100%) !important;
  border: 1.5px solid #adc9e6 !important;
  border-top: 3px solid #0284c7 !important;
  border-bottom: 3.5px solid #88afd8 !important;
  box-shadow:
    inset 0 1.5px 0 #ffffff,
    0 14px 28px -8px rgba(12, 58, 110, 0.16),
    0 4px 10px rgba(12, 58, 110, 0.07) !important;
}
html.light .sr-stat + .sr-stat {
  border-left: 1px solid #cbe0f5 !important;
}
html.light .sr-mhdr {
  color: #2c4a6e !important;
  font-weight: 800 !important;
}

/* Flagship Card: Więźba 3D · CAD Studio — Warm Sunlit Gold & Sky Hero 3D Tile */
html.light .sr-card-flagship {
  background:
    radial-gradient(110% 130% at 95% 0%, rgba(253, 224, 71, 0.42) 0%, rgba(251, 146, 60, 0.15) 45%, transparent 78%),
    linear-gradient(135deg, #fffdf5 0%, #fef5d9 48%, #e6f3ff 100%) !important;
  border: 1.5px solid #f59e0b !important;
  border-bottom: 4px solid #d97706 !important;
  box-shadow:
    inset 0 1.5px 0 #ffffff,
    0 14px 28px -7px rgba(180, 83, 9, 0.22),
    0 5px 12px rgba(12, 58, 110, 0.10) !important;
}
html.light .sr-card-flagship:hover {
  transform: translateY(-1.5px);
  box-shadow:
    inset 0 1.5px 0 #ffffff,
    0 18px 32px -7px rgba(180, 83, 9, 0.28),
    0 6px 14px rgba(12, 58, 110, 0.12) !important;
}
html.light .sr-card-flagship:active {
  transform: translateY(2px) !important;
  border-bottom-width: 2px !important;
}
html.light .sr-cbadge-metric {
  background: #fffbeb !important;
  color: #92400e !important;
  border: 1px solid #f59e0b !important;
  font-weight: 800 !important;
}

/* 6 Main Module Tiles (.sr-card) — True 3D Sculpted Elevation + Individual Sunlit Color Accents! */
html.light .sr-grid {
  gap: 10px;
}

html.light .sr-card:not(.sr-card-flagship) {
  background:
    radial-gradient(125% 110% at 100% 0%, var(--tile-glow, rgba(253, 224, 71, 0.22)) 0%, transparent 68%),
    linear-gradient(180deg, #fffefb 0%, #eef6ff 100%) !important;
  border: 1.5px solid var(--tile-brd, #aac7e5) !important;
  border-top: 3px solid var(--tile-top, #0284c7) !important;
  border-bottom: 4px solid var(--tile-lip, #82aad4) !important;
  box-shadow:
    inset 0 1.5px 0 #ffffff,
    inset 0 -1px 0 rgba(255, 255, 255, 0.6),
    0 12px 24px -6px rgba(12, 54, 102, 0.17),
    0 4px 9px rgba(12, 54, 102, 0.08) !important;
  transition: transform 0.12s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.16s ease, border-color 0.16s ease !important;
}

html.light .sr-card:not(.sr-card-flagship):hover {
  transform: translateY(-2px) !important;
  box-shadow:
    inset 0 1.5px 0 #ffffff,
    0 16px 28px -6px rgba(12, 54, 102, 0.22),
    0 6px 12px rgba(12, 54, 102, 0.10) !important;
}

html.light .sr-card:not(.sr-card-flagship):active {
  transform: translateY(2px) !important;
  border-bottom-width: 2px !important;
  box-shadow:
    inset 0 1px 2px rgba(12, 54, 102, 0.12),
    0 4px 10px -3px rgba(12, 54, 102, 0.14) !important;
}

html.light .sr-card:not(.sr-card-flagship) .sr-ctitle {
  color: #0c1d33 !important;
  font-weight: 800 !important;
}
html.light .sr-card:not(.sr-card-flagship) .sr-csub {
  color: #456080 !important;
  font-weight: 600 !important;
}
html.light .sr-card:not(.sr-card-flagship) .sr-cbadge {
  background: var(--tile-bdg-bg, #e0f2fe) !important;
  color: var(--tile-bdg-fg, #0369a1) !important;
  border: 1px solid var(--tile-bdg-brd, #7dd3fc) !important;
  font-weight: 800 !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
}
html.light .sr-card:not(.sr-card-flagship) .sr-csvg {
  color: var(--tile-ico, #1e3a5f) !important;
  filter: drop-shadow(0 2px 3px rgba(12, 54, 102, 0.10));
}

/* Individual Sunlit Color Personalities for the 6 Tiles */
html.light .sr-card[data-mod="steil"] {
  --tile-top: #f59e0b; --tile-brd: #d8c39e; --tile-lip: #d99b38;
  --tile-glow: rgba(251, 191, 36, 0.28);
  --tile-bdg-bg: #fef3c7; --tile-bdg-fg: #92400e; --tile-bdg-brd: #fcd34d;
  --tile-ico: #9a3412;
}
html.light .sr-card[data-mod="flat"] {
  --tile-top: #0284c7; --tile-brd: #9ec8ea; --tile-lip: #5b9bd5;
  --tile-glow: rgba(56, 189, 248, 0.26);
  --tile-bdg-bg: #e0f2fe; --tile-bdg-fg: #0369a1; --tile-bdg-brd: #7dd3fc;
  --tile-ico: #0369a1;
}
html.light .sr-card[data-mod="sheet"] {
  --tile-top: #4f46e5; --tile-brd: #b2bcef; --tile-lip: #7684d8;
  --tile-glow: rgba(129, 140, 248, 0.24);
  --tile-bdg-bg: #e0e7ff; --tile-bdg-fg: #3730a3; --tile-bdg-brd: #a5b4fc;
  --tile-ico: #312e81;
}
html.light .sr-card[data-mod="flash"] {
  --tile-top: #059669; --tile-brd: #9ed4c0; --tile-lip: #54ad8d;
  --tile-glow: rgba(52, 211, 153, 0.24);
  --tile-bdg-bg: #d1fae5; --tile-bdg-fg: #065f46; --tile-bdg-brd: #6ee7b7;
  --tile-ico: #065f46;
}
html.light .sr-card[data-mod="timber"] {
  --tile-top: #ea580c; --tile-brd: #e2bfa3; --tile-lip: #d4874c;
  --tile-glow: rgba(251, 146, 60, 0.26);
  --tile-bdg-bg: #ffedd5; --tile-bdg-fg: #9a3412; --tile-bdg-brd: #fdba74;
  --tile-ico: #7c2d12;
}
html.light .sr-card[data-mod="geom"] {
  --tile-top: #e11d48; --tile-brd: #e5b3c0; --tile-lip: #d66b85;
  --tile-glow: rgba(251, 113, 133, 0.24);
  --tile-bdg-bg: #ffe4e6; --tile-bdg-fg: #9f1239; --tile-bdg-brd: #fda4af;
  --tile-ico: #881337;
}

/* 3D QR Banner & Bottom Bar in Light Mode */
html.light .sr-qr-banner {
  background: linear-gradient(135deg, #fffdf4 0%, #fef3c7 52%, #fee2e2 100%) !important;
  border: 1.5px solid #f59e0b !important;
  border-bottom: 3.5px solid #dc2626 !important;
  color: #1e293b !important;
  box-shadow: inset 0 1px 0 #ffffff, 0 10px 22px -7px rgba(220, 38, 38, 0.18) !important;
}
html.light .sr-bbar {
  background: linear-gradient(90deg, rgba(238, 247, 255, 0.95) 0%, rgba(255, 252, 238, 0.95) 100%) !important;
  border-top: 1.5px solid #b5cfe9 !important;
  box-shadow: 0 -6px 20px -8px rgba(12, 58, 110, 0.14) !important;
}
html.light .sr-sheet {
  background: linear-gradient(180deg, #fffef9 0%, #edf6ff 100%) !important;
  border-color: #aac7e5 !important;
}
html.light .sr-inp {
  background: #ffffff !important;
  border: 1.5px solid #8eb4db !important;
  box-shadow: inset 0 2px 4px rgba(12, 58, 110, 0.07) !important;
}
