:root{
  --ui-border: rgba(255,255,255,0.12);
  --ui-text: #e7ecf5;
  --ui-muted: #b7c2d6;
  --shadow: 0 10px 24px rgba(0,0,0,.28);
  --radius: 10px;
  --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;

  --panel-w: 420px;

  --bg-top: #486fa9;
  --bg-mid: #355a8a;
  --bg-bottom: #1e2b41;

  --design-ar: 16 / 9;
}

*{ box-sizing: border-box; }

html, body{
  min-height: 100%;
  margin: 0;
  background: linear-gradient(to bottom, var(--bg-top) 0%, var(--bg-mid) 55%, var(--bg-bottom) 100%);
  color: var(--ui-text);
  font-family: var(--font);
  overflow-x: hidden;
}

.app{
  height: 100vh;
  display: grid;
  grid-template-columns: var(--panel-w) 1fr;
}

.mobileUnsupported{
  display: none;
}

/* SEO content */
.seo-hero,
.seo-tool-intro,
.seo-features,
.seo-faq{
  width: 100%;
  padding: 16px 18px;
}
.seo-hero-inner,
.seo-tool-intro,
.seo-features,
.seo-faq{
  max-width: 1180px;
  margin: 0 auto;
}
.seo-hero{
  background: rgba(8,10,14,0.34);
  border-bottom: 1px solid rgba(255,255,255,0.10);
}
.seo-hero-inner{
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 18px;
  align-items: center;
}
.seo-hero h1{
  grid-column: 1 / -1;
  margin: 0;
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.08;
}
.seo-hero p{
  margin: 0;
  color: var(--ui-muted);
  font-size: 14px;
  line-height: 1.45;
}
.seo-hero-trial{
  color: rgba(235,242,255,0.94) !important;
  font-weight: 700;
}
.seo-hero-cta{
  align-self: end;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(106,167,255,0.55);
  background: rgba(106,167,255,0.18);
  color: var(--ui-text);
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}
.seo-hero-cta:hover{ background: rgba(106,167,255,0.28); }

.seo-tool-intro,
.seo-features,
.seo-faq{
  padding-top: 28px;
  padding-bottom: 28px;
}
.seo-tool-intro{
  border-top: 1px solid rgba(255,255,255,0.10);
}
.seo-tool-intro h2{
  margin: 0 0 12px;
  font-size: 24px;
  line-height: 1.2;
}
.seo-tool-intro p{
  margin: 0 0 10px;
  color: var(--ui-muted);
  font-size: 14px;
  line-height: 1.5;
}
.seo-tool-trial{
  color: rgba(235,242,255,0.94) !important;
  font-weight: 800;
}
.seo-features h2,
.seo-faq h2{
  margin: 0 0 14px;
  font-size: 22px;
  line-height: 1.2;
}
.seo-feature-grid{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.seo-feature-grid article,
.seo-faq details{
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  background: rgba(8,10,14,0.44);
  box-shadow: 0 10px 24px rgba(0,0,0,.16);
}
.seo-feature-grid article{
  padding: 14px;
}
.seo-feature-grid h3{
  margin: 0 0 8px;
  font-size: 15px;
}
.seo-feature-grid p,
.seo-faq p{
  margin: 0;
  color: var(--ui-muted);
  font-size: 13px;
  line-height: 1.5;
}
.seo-faq details{
  padding: 12px 14px;
  margin-top: 10px;
}
.seo-faq summary{
  cursor: pointer;
  font-weight: 800;
}
.seo-faq p{
  margin-top: 10px;
}

/* Power BI Design Studio landing page */
.landingPage{
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 8%, rgba(37,127,151,0.36), transparent 32%),
    radial-gradient(circle at 86% 16%, rgba(72,111,169,0.34), transparent 30%),
    linear-gradient(145deg, #050608 0%, #0b0d12 46%, #132033 100%);
  overflow-x: hidden;
}
.landingNav{
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.landingBrand{
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ui-text);
  text-decoration: none;
  font-weight: 900;
}
.landingBrand img{
  width: 54px;
  height: 54px;
  object-fit: contain;
}
.landingNavLinks{
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.landingNavLinks a{
  color: var(--ui-muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
  padding: 9px 10px;
  border-radius: 10px;
}
.landingNavLinks a:hover{
  color: var(--ui-text);
  background: rgba(255,255,255,0.07);
}
.landingNavLinks .landingNavCta,
.landingPrimary,
.toolLaunch{
  border: 1px solid rgba(106,167,255,0.58);
  background: rgba(106,167,255,0.17);
  color: var(--ui-text);
}
.landingHero,
.landingSection{
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}
.landingHero{
  min-height: calc(100vh - 78px);
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.92fr);
  align-items: center;
  gap: 44px;
  padding: 46px 0 72px;
}
.landingEyebrow,
.toolStatus{
  width: fit-content;
  border: 1px solid rgba(130,255,170,0.36);
  border-radius: 999px;
  background: rgba(130,255,170,0.11);
  color: rgba(228,255,237,0.94);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 900;
}
.landingHero h1{
  margin: 18px 0 18px;
  font-size: clamp(46px, 8vw, 92px);
  line-height: 0.95;
  letter-spacing: 0;
}
.landingLead{
  font-size: clamp(20px, 2.5vw, 30px);
  line-height: 1.22;
  color: rgba(245,248,255,0.96);
  font-weight: 800;
}
.landingHero p,
.landingSection p,
.toolCard p,
.toolCard li,
.faqSection p{
  color: var(--ui-muted);
  line-height: 1.55;
}
.landingActions{
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 26px;
}
.landingPrimary,
.landingSecondary,
.toolLaunch{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 16px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 900;
}
.landingSecondary{
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  color: var(--ui-text);
}
.landingHeroMedia{
  min-height: 470px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 28px;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.10), rgba(255,255,255,0.025)),
    rgba(8,10,14,0.42);
  box-shadow: 0 28px 80px rgba(0,0,0,0.42);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.landingHeroMedia img{
  width: min(78%, 430px);
  height: auto;
  filter: drop-shadow(0 22px 34px rgba(0,0,0,0.42));
}
.productHero{
  align-items: stretch;
}
.productHeroPanel{
  min-height: 470px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 28px;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.10), rgba(255,255,255,0.025)),
    rgba(8,10,14,0.42);
  box-shadow: 0 28px 80px rgba(0,0,0,0.42);
  overflow: hidden;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.productHeroPanel img{
  display: block;
  width: 100%;
  height: auto;
  max-height: 560px;
  object-fit: contain;
  object-position: center;
  border-radius: 18px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.34);
}
.productFinalCta{
  margin-top: 24px;
}
.videoSection{
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(420px, 1.15fr);
  align-items: center;
  gap: 28px;
}
.videoCopy h2{
  margin: 16px 0 12px;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.05;
}
.videoCopy .landingEyebrow{
  margin-bottom: 10px;
}
.videoCopy a{
  color: rgba(154,198,255,0.98);
  font-weight: 900;
}
.videoFrame{
  position: relative;
  width: 100%;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(8,10,14,0.64);
  box-shadow: 0 24px 70px rgba(0,0,0,0.38);
}
.videoFrame video{
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #06080d;
  object-fit: contain;
}
.videoFallback{
  border-top: 1px solid rgba(255,255,255,0.10);
  background: rgba(10,12,18,0.82);
  color: var(--ui-muted);
  font-size: 13px;
  line-height: 1.45;
  padding: 12px 14px;
}
.videoFallback a{
  color: rgba(154,198,255,0.98);
  font-weight: 900;
}
.landingSection{
  padding: 74px 0;
  border-top: 1px solid rgba(255,255,255,0.10);
}
.landingSectionHead{
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 22px;
}
.landingSection h2{
  margin: 0;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.05;
}
.landingSectionHead p{
  max-width: 520px;
  margin: 0;
}
.toolGrid{
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr;
  gap: 14px;
}
.toolCard{
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 18px;
  background: rgba(8,10,14,0.58);
  box-shadow: 0 18px 46px rgba(0,0,0,0.26);
  padding: 22px;
}
.featuredTool{
  background:
    linear-gradient(145deg, rgba(37,127,151,0.18), rgba(106,167,255,0.08)),
    rgba(8,10,14,0.68);
}
.toolCard h3{
  margin: 16px 0 10px;
  font-size: 24px;
}
.toolCard ul{
  padding-left: 18px;
  margin: 18px 0 22px;
}
.comingSoon{
  opacity: 0.78;
}
.splitSection{
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.85fr);
  gap: 28px;
}
.benefitList{
  display: grid;
  gap: 10px;
}
.benefitList div{
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  background: rgba(255,255,255,0.06);
  padding: 14px;
  font-weight: 800;
}
.faqSection details{
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  background: rgba(8,10,14,0.48);
  padding: 15px 16px;
  margin-top: 12px;
}
.faqSection summary{
  cursor: pointer;
  font-weight: 900;
}
.faqSection p{
  margin-bottom: 0;
}

@media (max-width: 940px){
  .landingHero,
  .videoSection,
  .toolGrid,
  .splitSection{
    grid-template-columns: 1fr;
  }
  .landingHero{
    min-height: auto;
    padding-top: 32px;
  }
  .landingHeroMedia{
    min-height: 340px;
  }
  .videoSection{
    gap: 18px;
  }
  .landingSectionHead{
    display: block;
  }
  .landingSectionHead p{
    margin-top: 12px;
  }
}

@media (max-width: 720px){
  .landingNav{
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 0;
  }
  .landingNavLinks{
    justify-content: flex-start;
  }
  .landingHero h1{
    font-size: clamp(42px, 15vw, 68px);
  }
  .landingHeroMedia{
    min-height: 280px;
  }
  .landingSection{
    padding: 46px 0;
  }
}

/* LEFT PANEL */
.panel{
  height: 100%;
  overflow: hidden;
  border-right: 1px solid var(--ui-border);
  background: rgba(10,12,18,0.55);
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.panelQuickActions{
  flex: 0 0 auto;
  padding: 10px 14px 14px;
  border-top: 1px solid var(--ui-border);
  background: rgba(8,10,14,0.74);
}

.panelHeader{
  padding: 14px 18px;
  border-bottom: 1px solid var(--ui-border);
  flex: 0 0 auto;
}

.panelHeaderRow{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel h1{
  margin: 0;
  font-size: 18px;
  letter-spacing: 0.2px;
}

.appProductTitle{
  color: var(--ui-text);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
  margin: -8px 0 4px;
}

.hint{
  font-size: 12px;
  color: var(--ui-muted);
  line-height: 1.4;
  margin-top: 6px;
}

/* Burger / icon */
.iconBtn{
  border: 1px solid var(--ui-border);
  background: rgba(255,255,255,0.06);
  border-radius: 10px;
  width: 36px;
  height: 36px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.iconBtn:hover{ background: rgba(255,255,255,0.10); }

.burgerLines{
  width: 16px;
  height: 2px;
  background: var(--ui-text);
  position: relative;
}
.burgerLines::before,
.burgerLines::after{
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 2px;
  background: var(--ui-text);
}
.burgerLines::before{ top: -5px; }
.burgerLines::after{ top: 5px; }

.closeX{ font-size: 20px; line-height: 1; }

/* Account drawer */
.drawer{
  position: fixed;
  inset: 0;
  display: none;
  z-index: 1200;
}
.drawer.show{ display:block; }

.drawerBackdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(3px);
}
.drawerPanel{
  position: absolute;
  top: 0;
  right: 0;
  width: min(360px, 92%);
  height: 100%;
  background: rgba(10,12,18,0.92);
  border-left: 1px solid var(--ui-border);
  box-shadow: var(--shadow);
  padding: 16px;
  display: flex;
  flex-direction: column;
}
.drawerHead{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom: 12px;
}
.drawerTitle{
  font-size: 15px;
  font-weight: 600;
}

/* Scroll area */
.scroll{
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 12px 12px max(32px, calc(18px + env(safe-area-inset-bottom)));
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
}

/* Sections */
.section{
  border: 1px solid var(--ui-border);
  border-radius: 10px;
  background: rgba(8,10,14,0.55);
  box-shadow: var(--shadow);
  padding: 12px;
  margin-bottom: 10px;
}

.section h2{
  margin: 0 0 12px 0;
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.inlineMeta{
  font-size: 12px;
  color: var(--ui-muted);
  margin-top: 6px;
}

.legalLinks{
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  color: var(--ui-muted);
}
.legalLinks a{
  color: rgba(190,215,255,0.95);
  text-decoration: none;
}
.legalLinks a:hover{ text-decoration: underline; }

/* details collapse */
.sectionHead{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.presetsDetails > summary,
details.section > summary{
  list-style: none;
  cursor: pointer;
  outline: none;
}
.presetsDetails > summary::-webkit-details-marker,
details.section > summary::-webkit-details-marker{
  display:none;
}

.sectionToggle{
  border: 1px solid var(--ui-border);
  background: rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 8px 12px;
  min-width: 90px;
  text-align:center;
  user-select:none;
}

#exportSection{
  scroll-margin-bottom: 120px;
}

@media (max-height: 760px){
  .panelHeader{
    padding: 10px 14px;
  }
  .panelHeader img{
    width: 62% !important;
    margin: 8px auto 10px !important;
  }
  .scroll{
    padding-top: 10px;
  }
  .section{
    padding: 12px;
    margin-bottom: 10px;
  }
}

@media (max-width: 900px){
  html, body{
    overflow: auto;
  }
  body.appPage{
    min-height: 100vh;
  }
  body.appPage > :not(.mobileUnsupported){
    display: none !important;
  }
  .mobileUnsupported{
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 18px;
    background:
      radial-gradient(circle at top left, rgba(20,128,150,0.22), transparent 36%),
      linear-gradient(to bottom, #132337 0%, #0b0d12 100%);
  }
  .mobileUnsupportedCard{
    width: min(100%, 520px);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 22px;
    background: rgba(12,16,24,0.88);
    box-shadow: 0 24px 80px rgba(0,0,0,0.36);
    padding: 26px;
  }
  .mobileUnsupportedCard img{
    display: block;
    width: 116px;
    height: auto;
    margin-bottom: 18px;
  }
  .mobileUnsupportedEyebrow{
    width: fit-content;
    border: 1px solid rgba(130,255,170,0.36);
    border-radius: 999px;
    background: rgba(130,255,170,0.11);
    color: rgba(228,255,237,0.94);
    padding: 6px 10px;
    margin-bottom: 12px;
    font-size: 12px;
    font-weight: 900;
  }
  .mobileUnsupported h1{
    margin: 0 0 14px;
    font-size: clamp(30px, 10vw, 44px);
    line-height: 1.04;
    letter-spacing: 0;
  }
  .mobileUnsupported p{
    margin: 0 0 12px;
    color: var(--ui-muted);
    font-size: 15px;
    line-height: 1.55;
  }
  .mobileUnsupportedActions{
    display: grid;
    gap: 10px;
    margin-top: 22px;
  }
  .mobileUnsupportedActions a{
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    padding: 12px 14px;
    color: var(--ui-text);
    font-weight: 900;
    text-align: center;
    text-decoration: none;
  }
  .mobileUnsupportedPrimary{
    border: 1px solid rgba(106,167,255,0.72);
    background: rgba(106,167,255,0.24);
  }
  .mobileUnsupportedSecondary{
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.06);
  }
  body.appPage .seo-hero,
  body.appPage .seo-tool-intro,
  body.appPage .seo-features,
  body.appPage .seo-faq,
  body.appPage .modalMask,
  body.appPage .app{
    display: none !important;
  }
  .seo-hero-inner{
    grid-template-columns: 1fr;
  }
  .seo-hero-cta{
    justify-self: start;
  }
  .seo-feature-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1180px){
  .shortcutsGrid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px){
  .shortcutsGrid{
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px){
  .seo-feature-grid{
    grid-template-columns: 1fr;
  }
  .seo-hero,
  .seo-tool-intro,
  .seo-features,
  .seo-faq{
    padding-left: 14px;
    padding-right: 14px;
  }
}

.presetsDetails > summary .sectionToggle::after,
details.section > summary .sectionToggle::after{
  content: "Expand";
}
.presetsDetails[open] > summary .sectionToggle::after,
details.section[open] > summary .sectionToggle::after{
  content: "Collapse";
}

/* Form */
.row{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}
.row.one{ grid-template-columns: 1fr; }

.quickStartGrid,
.toolGrid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.layoutBtn,
.toolGrid button{
  min-height: 38px;
  padding: 9px 10px;
  font-size: 12px;
}

.alignGrid{
  margin-top: 8px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.layersList{
  display: grid;
  gap: 6px;
}

.layerRow{
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 6px;
  padding: 8px;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 9px;
  background: rgba(255,255,255,0.045);
}

.layerRow.selected{
  border-color: rgba(106,167,255,0.78);
  background: rgba(106,167,255,0.12);
}

.layerName{
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--ui-text);
  font-size: 12px;
  text-align: left;
  background: transparent;
  border: 0;
  padding: 0;
}

.layerMini{
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 8px;
  font-size: 13px;
}

.layersEmpty{
  color: var(--ui-muted);
  font-size: 12px;
  padding: 6px 2px;
}

label{
  font-size: 12px;
  color: var(--ui-muted);
  margin-bottom: 6px;
  display:block;
}

input[type="text"],
input[type="number"],
select{
  width:100%;
  border-radius: 14px;
  border: 1px solid var(--ui-border);
  background: rgba(255,255,255,0.06);
  color: var(--ui-text);
  padding: 10px 12px;
}

input[type="range"]{ width:100%; }

input[type="color"]{
  width:100%;
  height:44px;              /* ensures Box BG and Border Color match */
  border-radius: 14px;
  border: 1px solid var(--ui-border);
  background: rgba(255,255,255,0.06);
  padding: 6px;
}

/* Buttons */
button{
  width:100%;
  border-radius: 10px;
  border: 1px solid var(--ui-border);
  background: rgba(255,255,255,0.06);
  color: var(--ui-text);
  padding: 12px;
  cursor:pointer;
}
button:hover{ background: rgba(255,255,255,0.09); }

button.primary{
  border-color: rgba(106,167,255,0.55);
  background: rgba(106,167,255,0.16);
}
button.primary:hover{ background: rgba(106,167,255,0.24); }

button.danger{
  border-color: rgba(255,120,120,0.45);
  background: rgba(255,120,120,0.12);
}

button.disabled,
button:disabled{
  opacity: 0.55;
  cursor: not-allowed;
}

/* Stage / Canvas */
.stage{
  height: 100%;
  overflow: hidden;
  display:flex;
}

.canvasWrap{
  width: 100%;
  height: 100%;
  padding: 18px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;

  gap: 10px;
  overflow: hidden;
}

.stageToolbar{
  width: min(100%, 1180px);
  min-height: 58px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  background: rgba(8,10,14,0.66);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
}

.stageInfo{
  min-width: 0;
}

.stageProjectName{
  font-size: 14px;
  font-weight: 800;
  color: var(--ui-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 42vw;
}

.stageMeta{
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 3px;
  color: var(--ui-muted);
  font-size: 12px;
  white-space: nowrap;
}

.stageAccessMode{
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  margin-top: 7px;
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid rgba(106,167,255,0.42);
  background: rgba(106,167,255,0.14);
  color: rgba(235,242,255,0.96);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stageAccessMode.subscriber{
  border-color: rgba(130,255,170,0.45);
  background: rgba(130,255,170,0.14);
}
.stageAccessMode.developer{
  border-color: rgba(255,215,130,0.45);
  background: rgba(255,215,130,0.13);
}

.stageTools{
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.toolBtn{
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 9px;
  font-size: 17px;
  font-weight: 800;
  line-height: 1;
}

.textTool{
  width: auto;
  padding: 0 12px;
  font-size: 12px;
}

.zoomReadout{
  min-width: 48px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 9px;
  color: var(--ui-text);
  background: rgba(0,0,0,0.16);
  font-size: 12px;
  font-weight: 700;
}

.toolDownload{
  width: auto;
  min-width: 104px;
  height: 34px;
  padding: 0 14px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 800;
}

.workspacePane{
  width: min(100%, 1180px);
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  padding: 22px;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 10px;
  background:
    linear-gradient(45deg, rgba(255,255,255,0.045) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255,255,255,0.045) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(255,255,255,0.045) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(255,255,255,0.045) 75%),
    rgba(6,8,12,0.32);
  background-size: 28px 28px;
  background-position: 0 0, 0 14px, 14px -14px, -14px 0;
}

/* -------------------------------------------------------
   DESIGN FRAME (FIXED — NO CLIPPING)
   - We do NOT clip the canvas with border-radius/overflow hidden.
   - We draw the rounded card using ::before/::after.
-------------------------------------------------------- */
.designFrame{
  position: relative;

  /* JS may set exact px width/height. Provide safe defaults. */
  width: 1px;
  height: 1px;

  /* Do NOT clip child drawing */
  overflow: visible;

  /* Visuals are handled by pseudo elements */
  background: transparent;
  border: none;
  border-radius: 0;
  flex: 0 0 auto;
  box-shadow:
    0 24px 60px rgba(0,0,0,0.38),
    0 0 0 1px rgba(255,255,255,0.08);
}

/* Rounded background behind the canvas */
.designFrame::before{
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 18px;
  background: rgba(0,0,0,0.22);
  pointer-events: none;
  z-index: 0;
}

/* Rounded border above the canvas */
.designFrame::after{
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 14px;
  border: 2px solid rgba(205,224,255,0.32);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.22);
  pointer-events: none;
  z-index: 3;
}

#c{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  display:block;
  background: transparent;

  /* IMPORTANT: do not mask bitmap */
  border-radius: 0 !important;

  z-index: 1;
}

.emptyCanvasHint{
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transition: opacity 140ms ease;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(10,12,18,0.72);
  color: rgba(255,255,255,0.86);
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 10px 28px rgba(0,0,0,0.28);
}
.emptyCanvasHint.show{ opacity: 1; }

/* Toast */
.toast{
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid var(--ui-border);
  background: rgba(10,12,18,0.85);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
}
.toast.show{ opacity: 1; }

/* Preset grid cards */
.presetGrid{
  display:grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 10px;
}

.presetCard{
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
  border-radius: 16px;
  padding: 10px;
  cursor:pointer;
  display:flex;
  flex-direction: column;
  overflow: hidden;
}
.presetCard:hover{ background: rgba(255,255,255,0.08); }
.presetCard.selected{
  border-color: rgba(106,167,255,0.9);
  box-shadow: 0 0 0 2px rgba(106,167,255,0.35) inset;
}

.presetThumb{
  width:100%;
  aspect-ratio: 16/9;
  border-radius: 12px;
  overflow:hidden;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.25);
  margin-bottom: 8px;
}
.presetThumbImg{
  width:100%;
  height:100%;
  object-fit: cover;
  display:block;
}
.presetName{
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
}
.presetDesc{
  font-size: 12px;
  color: var(--ui-muted);
  line-height: 1.35;
}

/* Modal (paywall) */
.modalMask{
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
  z-index: 1000;
}
.modalMask.show{ display:flex; }

.modal{
  width: min(560px, 92%);
  border-radius: 18px;
  border: 1px solid var(--ui-border);
  background: rgba(10,12,18,0.90);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.modal header{
  padding: 14px 16px;
  border-bottom: 1px solid var(--ui-border);
}
.modal .body{
  padding: 18px 18px 16px;
  color: var(--ui-text);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: 0;
}
.modal .actions{
  padding: 14px 16px;
  border-top: 1px solid var(--ui-border);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.modal .actions .wide{ grid-column: 1 / -1; }

.linkBtn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
  border-radius: 16px;
  border: 1px solid var(--ui-border);
  background: rgba(255,255,255,0.06);
  color: var(--ui-text);
  padding: 12px 12px;
  cursor: pointer;
}
.linkBtn.primary{
  border-color: rgba(106,167,255,0.55);
  background: rgba(106,167,255,0.14);
}

/* Locked overlay (SaaS modal) */
.lockMask{
  position:absolute;
  inset:0;
  border-radius: 18px;
  display:none;
  align-items:center;
  justify-content:center;
  background: rgba(0,0,0,0.50);
  backdrop-filter: blur(6px);
  z-index: 4; /* above frame border */
}
.lockMask.show{ display:flex; }

.lockCard{
  width: min(880px, 92%);
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(10,12,18,0.92);
  box-shadow: 0 18px 70px rgba(0,0,0,0.55);
  overflow: hidden;
}

/* Entrance animation */
@keyframes lockIn {
  from { opacity: 0; transform: translateY(16px) scale(0.985); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.lockEnter{
  animation: lockIn 260ms ease-out both;
}

.lockSplit{
  display:grid;
  grid-template-columns: 1fr 1px 1fr;
}

.lockPane{
  padding: 28px 24px;
  display:flex;
  flex-direction: column;
  justify-content: center;
}

.lockLeft{
  background: linear-gradient(to bottom, rgba(106,167,255,0.18), rgba(106,167,255,0.06));
}

.lockRight{
  background: rgba(255,255,255,0.04);
}

.lockDivider{
  background: rgba(255,255,255,0.12);
}

.lockH{
  margin: 0 0 10px 0;
  font-size: 18px;
}

.lockSub{
  font-size: 13px;
  color: var(--ui-muted);
  margin: 0 0 18px 0;
  line-height: 1.4;
}

button.big{
  padding: 14px;
  font-size: 15px;
}

.subscribeBtn{
  display:block;
  text-align:center;
  text-decoration:none;
  padding: 12px;
  border-radius: 14px;
  margin-bottom: 10px;
  font-weight: 700;
  border: 1px solid rgba(106,167,255,0.55);
  background: rgba(106,167,255,0.18);
  color: var(--ui-text);
}
.subscribeBtn:hover{ background: rgba(106,167,255,0.28); }

.subscribeBtn.secondary{
  border-color: rgba(130,255,170,0.55);
  background: rgba(130,255,170,0.16);
}
.subscribeBtn.secondary:hover{ background: rgba(130,255,170,0.26); }

.lockNote{
  margin-top: 6px;
  font-size: 12px;
  color: var(--ui-muted);
  text-align:center;
}

.lockMicro{
  margin-top: 10px;
  font-size: 12px;
  color: var(--ui-muted);
  text-align:center;
}

.lockLegal{ margin-top: 12px; }

.linkLike{
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  color: rgba(106,167,255,0.95);
  cursor: pointer;
  font-weight: 700;
}
.linkLike:hover{ text-decoration: underline; }

.testimonials{
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.10);
}
.tTitle{
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.80);
  margin-bottom: 8px;
}
.tItem{
  font-size: 12px;
  color: var(--ui-muted);
  line-height: 1.35;
  margin-bottom: 6px;
}

/* Keep these in DOM for JS compatibility but hide visually */
.lockBodyVisuallyHidden{
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}
.lockDismissHidden{
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.lockMask.upgradeMode .lockDismissHidden{
  top: 14px;
  right: 14px;
  width: auto;
  height: auto;
  opacity: 1;
  pointer-events: auto;
  overflow: visible;
  padding: 8px 12px;
  border-radius: 999px;
  z-index: 2;
}

/* Keyboard shortcuts card */
.shortcutsCard{
  width: min(100%, 1180px);
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(10,12,18,0.55);
  box-shadow: var(--shadow);
  padding: 10px 12px;
}

.shortcutsTitle{
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85);
  margin-bottom: 10px;
}

.shortcutsGrid{
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.scRow{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 7px 8px;
  border-radius: 9px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
}

.scKey{
  font-size: 12px;
  color: rgba(255,255,255,0.92);
  padding: 4px 8px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.18);
  white-space: nowrap;
}

.scText{
  font-size: 12px;
  color: var(--ui-muted);
  text-align: left;
}

/* =========================================================
   FULL-SCREEN LOCKED STATE
   Hide left panel when lock overlay is visible
========================================================= */
.app:has(#editorLock.show){
  grid-template-columns: 1fr !important;
}
.app:has(#editorLock.show) .panel{
  display: none !important;
}
.app:has(#editorLock.show) .stage{
  width: 100% !important;
}
.app:has(#editorLock.show) .lockCard{
  width: min(980px, 94%) !important;
}

/* Legal pages */
.legalPage{
  min-height: 100%;
  overflow: auto;
}
.legalShell{
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0 56px;
}
.legalTop{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}
.legalBrand{
  color: var(--ui-text);
  font-weight: 800;
  font-size: 18px;
  text-decoration: none;
}
.legalBack{
  color: rgba(190,215,255,0.95);
  font-size: 14px;
  text-decoration: none;
}
.legalBack:hover{ text-decoration: underline; }
.legalDoc{
  border: 1px solid var(--ui-border);
  border-radius: 18px;
  background: rgba(8,10,14,0.68);
  box-shadow: var(--shadow);
  padding: 28px;
}
.legalDoc h1{
  margin: 0 0 6px;
  font-size: 34px;
  line-height: 1.1;
}
.legalUpdated{
  color: var(--ui-muted);
  font-size: 13px;
  margin-bottom: 26px;
}
.legalDoc h2{
  margin: 26px 0 8px;
  font-size: 17px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.legalDoc p,
.legalDoc li{
  color: #d8e0ee;
  line-height: 1.62;
  font-size: 15px;
}
.legalDoc ul{
  margin: 10px 0 0;
  padding-left: 22px;
}
.legalDoc a{
  color: rgba(190,215,255,0.98);
}
