/* Scheme A uses one type family, including its technical labels. */
:root {
  --font-sans: 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, sans-serif;
  --font-mono: var(--font-sans);
  --demo-font-body: clamp(16px, 1rem, 24px);
  --demo-font-small: clamp(13px, .8rem, 19px);
  --demo-bar-font: clamp(12px, .7rem, 14px);
  scrollbar-gutter: stable;
}
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #a7b2be; border-radius: 8px; }
button, input, select, textarea { font-family: inherit; }
#scene-2-featured-work { font-variant-numeric: tabular-nums; }
.stage02-active #stage-theatre { z-index: 5; }
@media (min-width: 961px) {
  .s2-workbench-stage { max-height: min(62svh, 42rem); }
}
.static-preview .mcdash-preview-slot { min-height: 440px; }
.mcdash-preview-slot {
  position: relative;
  min-width: 0;
  min-height: 0;
  height: 100%;
  padding: 0;
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
  isolation: isolate;
}
.mcdash-experience {
  --mcdash-card-shadow: 0 20px 48px rgba(24, 45, 65, .16), 0 3px 9px rgba(24, 45, 65, .06);
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  color: #0b1120;
  background: #eef3f4;
  border: 0;
  border-radius: 18px;
  box-shadow: var(--mcdash-card-shadow);
  font-family: var(--font-sans);
  font-size: var(--demo-font-body);
  font-weight: 500;
  line-height: 1.6;
  font-variant-numeric: tabular-nums;
  text-align: left;
  transform-origin: center;
  transition: transform 110ms ease, box-shadow 180ms ease;
}
.mcdash-experience:not([open]) { display: none; }
.mcdash-experience.is-pressing:not(:modal) {
  transform: scale(.985);
  box-shadow: 0 8px 20px rgba(24, 45, 65, .13);
}
.mcdash-experience:modal {
  position: fixed;
  inset: auto;
  border: 0;
  outline: none;
  transition: none;
}
.mcdash-experience.is-handing-off { transition: none; }
.mcdash-experience::backdrop {
  background: rgba(15, 23, 42, 0);
  transition: background 200ms ease;
}
.mcdash-experience.is-modal-visible::backdrop { background: rgba(15, 23, 42, .14); }
.mcdash-experience.is-closing::backdrop { background: transparent; }
.mcdash-vignette, .mcdash-edge {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}
.mcdash-vignette {
  z-index: 3;
  background: linear-gradient(180deg, transparent 68%, rgba(11, 27, 43, .64));
}
/* A visual edge has no layout width to change when entering the top layer. */
.mcdash-edge { z-index: 6; box-shadow: inset 0 0 0 1px rgba(97, 123, 144, .24); }
.mcdash-demo-viewport {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #edf2f4;
}
.mcdash-demo-viewport iframe {
  display: block;
  position: absolute;
  inset: 0 auto auto 0;
  border: 0;
  max-width: none;
  transform-origin: top left;
  background: #edf2f4;
}
.mcdash-launch {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  height: 100%;
  padding: 22px;
  border: 0;
  border-radius: inherit;
  color: #fff;
  background: transparent;
  font: inherit;
  cursor: pointer;
  touch-action: pan-y pinch-zoom;
  text-align: left;
  transition: opacity 110ms ease;
}
.mcdash-experience.is-pressing .mcdash-launch, .mcdash-experience:modal .mcdash-launch { opacity: 0; }
.mcdash-experience:modal .mcdash-launch { pointer-events: none; transition: none; }
.mcdash-launch:focus-visible { outline: 3px solid #1d4ed8; outline-offset: 5px; }
.mcdash-launch[hidden] { display: none; }
.mcdash-preview-label { font-size: var(--demo-font-small); font-weight: 600; letter-spacing: .015em; line-height: 1.6; }
.mcdash-preview-cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 15px;
  border: 1px solid rgba(255,255,255,.6);
  border-radius: 999px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 3px 12px rgba(0,0,0,.08);
  color: #152435;
  font-size: clamp(15px, .95rem, 23px);
  font-weight: 600;
  white-space: nowrap;
  transition: background 180ms ease, box-shadow 180ms ease;
}
.mcdash-launch:hover .mcdash-preview-cta { background: #fff; box-shadow: 0 5px 20px rgba(0,0,0,.16); }
.mcdash-preview-plus { font-size: 1.4em; line-height: 1; font-weight: 500; }
.mcdash-demo-toolbar {
  position: absolute;
  inset: auto 0 0;
  z-index: 4;
  display: none;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  color: #536174;
  background: #f8f8f5;
  border-top: 1px solid #dfe3e7;
  box-shadow: 0 -3px 14px rgba(24,45,65,.04);
  font-size: var(--demo-bar-font);
  font-weight: 500;
  line-height: 1.5;
}
.mcdash-experience:modal .mcdash-demo-toolbar { display: block; }
.demo-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.demo-toolbar-main {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 10px;
  min-height: 54px;
  padding: 8px 16px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.demo-toolbar-brand { flex: 0 0 auto; padding-right: 12px; border-right: 1px solid #dce1e5; }
.demo-toolbar-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #637187;
  white-space: nowrap;
}
.demo-toolbar-badge::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: #5485d5; }
.demo-toolbar-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 4px; margin-left: auto; }
.demo-control {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 5px 9px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: #42536a;
  background: transparent;
  font-family: inherit;
  font-size: inherit;
  font-weight: 500;
  line-height: 1.5;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.demo-control:hover { color: #1d4ed8; border-color: #d8e1ee; background: #edf1f6; }
.demo-control:active { transform: scale(.975); }
.demo-control:focus-visible { outline: 2px solid #1d4ed8; outline-offset: 3px; }
.demo-return { padding: 5px 11px; color: #fff; background: #101a2b; border-color: #101a2b; font-weight: 600; }
.demo-return:hover { color: #fff; background: #243550; border-color: #243550; }
.demo-return:disabled { cursor: wait; opacity: .65; }
.demo-control[aria-pressed="true"] { color: #1d4ed8; background: #e9f0fc; font-weight: 600; }
.demo-menu { position: static; }
.demo-menu > summary { list-style: none; }
.demo-menu > summary::-webkit-details-marker { display: none; }
.demo-menu:not([open]) > .demo-popover { display: none; }
.demo-menu[open] > summary { color: #1d4ed8; border-color: #c3d3f1; background: #e9f0fc; }
.demo-scenario-picker { flex: 0 1 auto; min-width: 0; }
.demo-scenario-trigger { display: flex; gap: 7px; min-width: 0; max-width: 100%; border-color: #dce1e5; background: #fff; }
.demo-scenario-prefix { color: #7a8795; }
.demo-scenario-current { max-width: 10em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.demo-popover {
  position: absolute;
  z-index: 10;
  bottom: calc(100% + 10px);
  display: grid;
  gap: 6px;
  max-height: min(60svh, calc(var(--mcdash-viewport-height, 100svh) - var(--mcdash-toolbar-height, 60px) - 24px));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 10px;
  border: 1px solid #dce3e9;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(24,45,65,.16);
}
.demo-scenario-menu { left: max(clamp(12px, 10vw, 160px), env(safe-area-inset-left, 0px)); width: min(340px, calc(100vw - max(12px, env(safe-area-inset-left, 0px)) - max(12px, env(safe-area-inset-right, 0px)))); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.demo-more-menu { right: max(12px, env(safe-area-inset-right, 0px)); width: min(320px, calc(100vw - max(12px, env(safe-area-inset-left, 0px)) - max(12px, env(safe-area-inset-right, 0px)))); }
.demo-popover-heading { grid-column: 1 / -1; margin: 0 0 2px; padding: 3px 6px; color: #657286; font-size: inherit; font-weight: 600; }
.demo-popover .demo-control { justify-content: flex-start; text-align: left; }
.demo-local-note, .demo-scenario-note { margin: 0; padding: 4px 6px; color: #637187; line-height: 1.7; }
.demo-scenario-note { padding: 8px 6px; border-top: 1px solid #e8ecf0; }
.demo-mobile-recover { display: none; }
.mcdash-is-open { overflow: hidden !important; overscroll-behavior: none; overflow-anchor: none; scrollbar-gutter: stable; }
/* Keep body out of the scroll-container chain: otherwise the sticky stage
   moves to its document origin and the return target is outside the viewport. */
.mcdash-is-open body { overscroll-behavior: none; }
/* Preserve the page and fixed-canvas width while the modal spans innerWidth. */
/* The modal covers the live page; its particles and preset animations keep playing. */
@media (max-width: 960px) {
  .mcdash-preview-slot { height: clamp(320px, 70vw, 540px); min-height: 320px; }
  .mcdash-launch { padding: 16px; }
}
@media (max-width: 680px) {
  .demo-toolbar-main { min-height: 52px; gap: 6px; padding: 8px 10px; }
  .demo-toolbar-main { padding-left: max(10px, env(safe-area-inset-left, 0px)); padding-right: max(10px, env(safe-area-inset-right, 0px)); }
  .demo-toolbar-brand { display: none; }
  .demo-scenario-menu { left: max(12px, env(safe-area-inset-left, 0px)); right: max(12px, env(safe-area-inset-right, 0px)); width: auto; }
  .demo-control { min-width: 44px; min-height: 44px; }
  .mcdash-preview-label { max-width: 105px; }
  .mcdash-preview-cta { padding: 9px 12px; gap: 8px; }
}
@media (max-width: 520px) {
  .demo-scenario-prefix, .demo-recover { display: none; }
  .demo-mobile-recover { display: inline-flex; }
  .demo-scenario-current { max-width: 6.5em; }
  .demo-control { padding-inline: 8px; }
}
@media (pointer: coarse) {
  .demo-control { min-width: 44px; min-height: 44px; }
}
@media (max-width: 960px) and (max-height: 520px) and (orientation: landscape) {
  .mcdash-preview-slot { height: clamp(240px, 70svh, 360px); min-height: 240px; }
}
@media (prefers-reduced-motion: reduce) {
  .mcdash-experience, .mcdash-preview-cta, .mcdash-launch, .mcdash-experience::backdrop { transition: none; }
}
