.intro-story { position: relative; }
.project-showcase {
  position: relative;
  z-index: 3;
  isolation: isolate;
  min-height: 100svh;
  padding: 144px 4.5vw 100px;
  display: grid;
  place-items: center;
  background: #231c16;
}
.showcase-background { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; z-index: -1; }
.studio-editor {
  --edge: rgba(237, 230, 218, .15);
  --muted: #bdb7ae;
  width: min(100%, 1440px);
  border: 1px solid rgba(245, 235, 219, .33);
  border-radius: 18px;
  color: #f1eee8;
  background: rgba(24, 24, 23, .55);
  backdrop-filter: blur(16px) saturate(75%);
  -webkit-backdrop-filter: blur(16px) saturate(75%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 26px 80px rgba(0,0,0,.32);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
  overflow: hidden;
}
.studio-editor button { font: inherit; color: inherit; border: 0; appearance: none; }
.studio-editor button:disabled { cursor: default; opacity: 1; -webkit-text-fill-color: currentColor; }
.editor-icon { width: 18px; height: 18px; flex: 0 0 auto; }
.editor-topbar { min-height: 64px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding: 12px 22px; border-bottom: 1px solid var(--edge); background: rgba(32,31,29,.18); }
.editor-brand { display: flex; align-items: center; gap: 14px; color: var(--muted); }
.editor-brand > .editor-icon { width: 12px; height: 12px; }
.editor-logo { width: 30px; height: 30px; object-fit: contain; }
.editor-preview-controls { display: flex; align-items: center; gap: 10px; }
.device-switch { display: flex; padding: 3px; background: rgba(0,0,0,.15); border: 1px solid var(--edge); border-radius: 8px; }
.device-switch button { display: grid; place-items: center; width: 62px; height: 30px; background: transparent; border-radius: 5px; color: var(--muted); cursor: pointer; transition: background-color .2s, color .2s; }
.device-switch button[aria-pressed="true"] { background: rgba(218,209,193,.19); color: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.12), inset 0 0 0 1px rgba(255,255,255,.1); }
.device-switch button:hover { color: #fff; }
.device-switch button:focus-visible { outline: 2px solid #f1eee8; outline-offset: 3px; }
.editor-readout { display: flex; align-items: center; gap: 14px; border: 1px solid var(--edge); border-radius: 7px; padding: 9px 13px; font-variant-numeric: tabular-nums; color: #d3cec5; white-space: nowrap; }
.editor-readout > span { display: inline-flex; align-items: center; gap: 5px; }
.editor-readout .editor-icon { width: 12px; height: 12px; }
.readout-divider { width: 1px; height: 12px; background: var(--edge); }
.editor-body { display: grid; grid-template-columns: minmax(0,21fr) minmax(0,58fr) minmax(0,21fr); height: clamp(560px, 48vw, 660px); }
.editor-pages, .editor-inspector { min-width: 0; background: rgba(28,27,25,.14); }
.editor-pages { border-right: 1px solid var(--edge); padding: 18px 16px; }
.editor-tabs { display: flex; padding: 3px; border-radius: 9px; background: rgba(0,0,0,.12); }
.editor-static { background: transparent; }
.editor-tabs button { flex: 1; min-width: 0; height: 34px; padding: 0 5px; border-radius: 6px; color: var(--muted); font-size: 11px; }
.studio-editor .selected { color: #fff; background: rgba(220,209,194,.17); box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
.editor-page-list { display: grid; gap: 7px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--edge); }
.editor-page { display: flex; align-items: center; gap: 12px; min-height: 44px; width: 100%; padding: 0 12px; border-radius: 7px; text-align: left; }
.editor-page:not(.selected) { color: #c8c2b9; }
.editor-page .editor-icon { width: 16px; height: 16px; }
.editor-page > .editor-icon:last-child:not(:first-child) { width: 12px; margin-left: auto; }
.editor-canvas { min-width: 0; position: relative; background: rgba(15,15,14,.12); overflow: hidden; }
.preview-viewport { position: absolute; inset: 30px 0 100px; overflow: hidden; }
.preview-track { display: flex; align-items: center; gap: 24px; height: 100%; padding-left: 30px; }
.preview-board { position: relative; flex: 0 0 88%; height: 100%; border: 1px solid rgba(239,233,222,.35); border-radius: 12px; background: #9d978e; box-shadow: inset 0 0 0 4px rgba(242,237,227,.08), 0 8px 20px rgba(0,0,0,.13); transition: flex-basis .28s ease, border-radius .28s ease, background-color .28s ease; }
.phone-island, .phone-home { display: none; }
.studio-editor[data-preview="phone"] .preview-track { justify-content: center; padding: 0 18px; }
.studio-editor[data-preview="phone"] .preview-board { flex: 0 0 auto; width: auto; height: min(100%, 490px); aspect-ratio: 393 / 852; border: 6px solid #242321; border-radius: 35px; box-shadow: 0 0 0 1px rgba(245,236,220,.3), inset 0 0 0 1px rgba(255,255,255,.12), 0 12px 28px rgba(0,0,0,.22); }
.studio-editor[data-preview="phone"] .preview-board:not(:first-child) { display: none; }
.studio-editor[data-preview="phone"] .phone-island { display: block; position: absolute; top: 9px; left: 50%; transform: translateX(-50%); width: 30%; height: 16px; border-radius: 14px; background: #242321; }
.studio-editor[data-preview="phone"] .phone-home { display: block; position: absolute; bottom: 7px; left: 50%; transform: translateX(-50%); width: 32%; height: 3px; border-radius: 3px; background: #393631; }
.editor-tools { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 3px; padding: 5px; border: 1px solid rgba(235,227,214,.25); border-radius: 12px; background: rgba(30,29,27,.72); box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 6px 18px rgba(0,0,0,.2); }
.tool-button { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 7px; }
.tool-button .editor-icon { width: 22px; height: 22px; }
.editor-inspector { border-left: 1px solid var(--edge); }
.editor-alignments { display: flex; justify-content: space-between; gap: 2px; padding: 17px 16px; border-bottom: 1px solid var(--edge); }
.alignment-button { display: grid; place-items: center; width: 26px; height: 26px; color: var(--muted) !important; }
.alignment-button:nth-child(n+4) .editor-icon { transform: rotate(90deg); }
.property-group { padding: 18px 16px; border-bottom: 1px solid var(--edge); }
.property-group:last-child { border-bottom: 0; }
.property-group h3 { display: flex; align-items: center; justify-content: space-between; margin: 0 0 15px; font-size: 12px; font-weight: 500; }
.property-group h3 button { display: grid; place-items: center; padding: 0; color: var(--muted); }
.property-group h3 .editor-icon { width: 14px; height: 14px; }
.property-row { display: grid; grid-template-columns: minmax(55px,.9fr) minmax(0,1.3fr); align-items: center; gap: 8px; margin-top: 10px; font-size: 11px; }
.property-row > span { color: var(--muted); }
.property-value { display: flex; justify-content: space-between; align-items: center; gap: 4px; min-width: 0; padding: 8px; height: 32px; background: rgba(215,204,186,.1); border-radius: 5px; text-align: left; }
.property-value .editor-icon { width: 9px; height: 9px; color: var(--muted); }
.property-pair { display: grid; grid-template-columns: 1fr 1.1fr; gap: 5px; }
.property-pair .property-value { padding: 7px; }
.property-pair .property-value:first-child .editor-icon { display: none; }
.property-segments { display: flex; padding: 2px; height: 32px; border-radius: 5px; background: rgba(0,0,0,.10); }
.property-segments button { flex: 1; min-width: 0; display: grid; place-items: center; padding: 0 3px; border-radius: 4px; }
.property-segments .editor-icon { width: 15px; height: 15px; }
.editor-bottom-edge { height: 14px; border-top: 1px solid var(--edge); background: rgba(28,27,25,.35); }
@media (max-width: 1100px) {
  .editor-body { grid-template-columns: 180px minmax(0,1fr) 210px; height: 570px; }
  .editor-pages { padding: 16px 10px; }
  .property-group { padding: 16px 12px; }
  .editor-alignments { padding-inline: 10px; }
  .preview-track { padding-left: 20px; gap: 18px; }
}
@media (max-width: 900px) {
  .editor-body { grid-template-columns: 160px minmax(0,1fr); }
  .editor-inspector { display: none; }
  .project-showcase { padding-inline: 4vw; }
}
@media (max-width: 600px) {
  .project-showcase { padding: 138px 14px 64px; }
  .studio-editor { border-radius: 14px; }
  .editor-topbar { min-height: 60px; grid-template-columns: 30px minmax(0,1fr); padding: 10px 12px; gap: 10px; }
  .editor-brand { gap: 0; }
  .editor-logo { width: 25px; height: 25px; }
  .editor-brand > svg, .editor-top-spacer, .editor-readout { display: none; }
  .editor-preview-controls { justify-content: flex-end; }
  .device-switch button { width: 50px; height: 34px; }
  .editor-body { display: flex; flex-direction: column; height: 570px; }
  .editor-pages { padding: 10px 8px; border-right: 0; border-bottom: 1px solid var(--edge); flex: 0 0 auto; }
  .editor-tabs { max-width: 240px; margin: 0 auto 8px; }
  .editor-tabs button { height: 28px; }
  .editor-page-list { display: flex; margin: 0; padding: 0; border: 0; gap: 2px; }
  .editor-page { flex: 1; min-width: 0; padding: 7px 2px; min-height: 44px; justify-content: center; gap: 4px; flex-direction: column; font-size: 10px; }
  .editor-page .editor-icon { width: 14px; height: 14px; }
  .editor-page > .editor-icon:last-child:not(:first-child) { display: none; }
  .editor-canvas { flex: 1; width: 100%; }
  .preview-viewport { top: 22px; bottom: 88px; }
  .preview-track { padding-left: 18px; gap: 16px; }
  .preview-board { height: 72%; }
  .studio-editor[data-preview="phone"] .preview-board { height: 100%; border-radius: 30px; }
  .editor-tools { bottom: 20px; gap: 1px; padding: 4px; }
  .tool-button { width: 36px; height: 38px; }
  .tool-button .editor-icon { width: 20px; height: 20px; }
  .editor-bottom-edge { height: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .studio-editor *, .studio-editor *::before, .studio-editor *::after { transition: none !important; }
}

.project-live-viewport { position: absolute; inset: 0; overflow: hidden; border-radius: inherit; background: #050505; }
.project-live-frame { display: block; border: 0; transform-origin: top left; background: #050505; }
.preview-board--live .phone-island, .preview-board--live .phone-home { z-index: 2; pointer-events: none; }
.studio-editor[data-preview="phone"] .preview-board--live .project-live-viewport { inset: 30px 0 16px; border-radius: 0; }
.preview-board--live { background: #050505 !important; }
