:root{
  --ed-bg:#FFF6EF;
  --ed-primary:#8257E6;
  --ed-primary-pressed:#7551D3;
  --ed-coral:#FF705C;
  --ed-yellow:#FFDC61;
  --ed-ink:#29263A;
  --ed-muted:#68647A;
  --ed-surface:#FFFFFF;
  --ed-divider:#DDD7E8;
  --ed-soft-purple:#F2EDFF;
  --ed-soft-coral:#FFF0EC;
  --ed-shadow:0 10px 28px rgba(67,52,89,.11);
  --ed-topbar-h:58px;
  --ed-river-h:112px;
}

#edApp{
  position:relative;
  display:flex;
  flex:1;
  min-width:0;
  min-height:0;
  flex-direction:column;
  overflow:hidden;
  background:var(--ed-bg);
  color:var(--ed-ink);
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
}

#edApp [hidden]{display:none!important}
#edApp button{min-height:44px;border:0;cursor:pointer}
#edApp button:disabled{cursor:not-allowed;opacity:.42}
#edApp svg{fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
#edApp :focus-visible{outline:3px solid var(--ed-primary);outline-offset:2px}
.ed-visually-hidden{
  position:absolute!important;
  width:1px!important;
  height:1px!important;
  margin:-1px!important;
  overflow:hidden!important;
  padding:0!important;
  border:0!important;
  clip:rect(0 0 0 0)!important;
  clip-path:inset(50%)!important;
  white-space:nowrap!important;
}
.ed-a11y-outline{
  position:absolute!important;
  width:1px!important;
  height:1px!important;
  margin:-1px!important;
  overflow:hidden!important;
  padding:0!important;
  border:0!important;
  clip:rect(0 0 0 0)!important;
  clip-path:inset(50%)!important;
  white-space:nowrap!important;
}
.ed-a11y-outline:focus-within{
  position:fixed!important;
  top:calc(var(--ed-topbar-h) + 12px)!important;
  right:12px!important;
  z-index:900!important;
  width:min(380px,calc(100vw - 24px))!important;
  height:auto!important;
  max-height:calc(100vh - var(--ed-topbar-h) - 24px)!important;
  margin:0!important;
  overflow:auto!important;
  padding:14px!important;
  border:1px solid var(--ed-divider)!important;
  border-radius:12px!important;
  background:var(--ed-surface)!important;
  box-shadow:var(--ed-shadow)!important;
  clip:auto!important;
  clip-path:none!important;
  white-space:normal!important;
}
.ed-a11y-outline h3{margin:0 0 10px;font-size:15px}
.ed-outline-row{padding:8px 0 8px 12px;border-top:1px solid var(--ed-divider);font-size:13px}
.ed-outline-row>span{display:block;margin-bottom:4px;font-weight:750}
.ed-outline-row>button{
  min-height:36px!important;margin:3px;padding:0 8px;border:1px solid var(--ed-divider)!important;
  border-radius:7px;background:var(--ed-surface);color:var(--ed-ink);font:inherit
}
.ed-outline-row>button:hover{background:var(--ed-soft-purple);color:var(--ed-primary)}

.ed-export-overlay{
  position:fixed;inset:0;z-index:1000;display:grid;place-items:center;padding:18px;
  background:rgba(41,38,58,.48);backdrop-filter:blur(3px)
}
.ed-export-overlay[hidden]{display:none!important}
.ed-export-dialog{
  width:min(760px,100%);max-height:min(820px,calc(100vh - 36px));overflow:auto;
  border:1px solid var(--ed-divider);border-radius:18px;background:var(--ed-surface);
  box-shadow:0 24px 70px rgba(41,38,58,.28);color:var(--ed-ink)
}
.ed-export-dialog :focus-visible{outline:3px solid var(--ed-primary);outline-offset:2px}
.ed-export-header{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding:22px 24px 15px;border-bottom:1px solid var(--ed-divider)}
.ed-export-header h2{margin:0 0 4px;font-size:21px;line-height:1.3}
.ed-export-header p{margin:0;color:var(--ed-muted);font-size:13px;line-height:1.45}
.ed-export-close{width:44px;min-width:44px;border-radius:10px;background:var(--ed-soft-purple);color:var(--ed-ink);font-size:25px;line-height:1}
.ed-export-form{padding:18px 24px 22px}
.ed-export-options{display:grid;grid-template-columns:1.25fr 1fr;gap:14px}
.ed-export-field{min-width:0;margin:0;padding:14px;border:1px solid var(--ed-divider);border-radius:12px}
.ed-export-field legend{padding:0 6px;font-size:13px;font-weight:850}
.ed-export-pages{grid-row:span 2}
.ed-export-page-actions{display:flex;gap:7px;margin-bottom:10px}
.ed-export-page-actions button{min-height:34px!important;padding:0 10px;border:1px solid var(--ed-divider)!important;border-radius:8px;background:#fff;color:var(--ed-ink);font:inherit;font-size:12px;font-weight:750}
.ed-export-page-list{display:grid;max-height:210px;gap:3px;overflow:auto}
.ed-export-page-list label,.ed-export-toggles label,.ed-export-ack{display:flex;min-height:34px;align-items:center;gap:9px;font-size:13px;line-height:1.35}
.ed-export-page-list input,.ed-export-toggles input[type="checkbox"],.ed-export-ack input{width:18px;height:18px;flex:none;accent-color:var(--ed-primary)}
.ed-export-settings{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.ed-export-settings label,.ed-export-matte{display:grid;gap:5px;color:var(--ed-muted);font-size:12px;font-weight:700}
.ed-export-settings select,.ed-export-settings input[type="number"]{width:100%;min-height:40px;padding:0 9px;border:1px solid var(--ed-divider);border-radius:8px;background:#fff;color:var(--ed-ink);font:inherit}
.ed-export-settings input[type="range"]{width:100%;accent-color:var(--ed-primary)}
.ed-export-toggles{display:grid;grid-template-columns:1fr 1fr;column-gap:12px}
.ed-export-matte input{width:44px;height:32px;padding:2px;border:1px solid var(--ed-divider);border-radius:7px;background:#fff}
.ed-export-review{margin-top:14px;padding:13px 15px;border:1px solid #D7C7A0;border-radius:12px;background:#FFF9E8}
.ed-export-review h3{margin:0 0 7px;font-size:14px}
.ed-export-review ul{margin:0 0 9px;padding-left:20px;color:#615938;font-size:13px;line-height:1.45}
.ed-export-license{margin:10px 0;padding:10px;border-radius:8px;background:rgba(255,255,255,.72)}
.ed-export-issue-title{margin:0 0 5px;color:var(--ed-ink);font-weight:850}
.ed-export-license strong{display:block;margin-bottom:5px;color:var(--ed-ink)}
.ed-export-license dl{display:grid;gap:3px;margin:0}
.ed-export-license dl div{display:grid;grid-template-columns:105px minmax(0,1fr);gap:7px}
.ed-export-license dt{font-weight:800}.ed-export-license dd{min-width:0;margin:0;overflow-wrap:anywhere}
.ed-export-license a{color:var(--ed-primary);font-weight:750}
.ed-export-preserved{margin:8px 0 0;color:var(--ed-muted)}
.ed-export-next-action{margin:4px 0 0;color:var(--ed-ink);font-weight:750}
.ed-export-credit-note{font-weight:750}
.ed-export-status{min-height:20px;margin:14px 0 7px;color:var(--ed-muted);font-size:13px;line-height:1.45}
.ed-export-status[role="alert"]{color:#9B2C21;font-weight:750}
.ed-export-progress{width:100%;height:9px;accent-color:var(--ed-primary)}
.ed-export-footer{display:flex;justify-content:flex-end;gap:9px;margin-top:16px}
.ed-export-footer button{min-height:44px;padding:0 16px;border-radius:9px;font:inherit;font-weight:800}
.ed-export-cancel{border:1px solid var(--ed-divider)!important;background:#fff;color:var(--ed-ink)}

@media (max-width:680px){
  .ed-export-overlay{padding:0;align-items:end}
  .ed-export-dialog{width:100%;max-height:92vh;border-radius:18px 18px 0 0}
  .ed-export-header,.ed-export-form{padding-left:16px;padding-right:16px}
  .ed-export-options{grid-template-columns:1fr}
  .ed-export-pages{grid-row:auto}
  .ed-export-page-list{max-height:150px}
}

#edTopbar{
  position:relative;
  z-index:30;
  display:flex;
  height:var(--ed-topbar-h);
  flex:none;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:7px 12px 7px 16px;
  background:var(--ed-surface);
  border-bottom:1px solid var(--ed-divider);
  box-shadow:0 2px 8px rgba(61,48,79,.05);
}

.ed-title-block,.ed-top-actions{display:flex;min-width:0;align-items:center;gap:8px}
.ed-title-block{flex:1;overflow:hidden}
.ed-app-name{flex:none;color:var(--ed-primary);font-size:17px;font-weight:850;letter-spacing:-.025em}
.ed-title-divider,.ed-action-divider{width:1px;height:24px;flex:none;background:var(--ed-divider)}
.ed-document-title{
  max-width:240px;
  min-width:44px;
  min-height:44px!important;
  overflow:hidden;
  padding:7px 9px;
  border-radius:8px;
  background:transparent;
  color:var(--ed-ink);
  font-weight:700;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.ed-document-title:hover{background:var(--ed-soft-purple)}
.ed-save-state{flex:none;color:var(--ed-muted);font-size:12px}
.ed-save-state[data-save-state="dirty"],.ed-save-state[data-save-state="saving"]{color:#66587D}
.ed-save-state[data-save-state="error"]{color:#9B2C21;font-weight:750}
.ed-top-actions{flex:none}

.ed-icon-button,.ed-language-button,.ed-text-button,.ed-primary-button{
  position:relative;
  display:inline-flex;
  min-width:44px;
  align-items:center;
  justify-content:center;
  gap:7px;
  border-radius:8px;
  transition:background-color .16s ease,color .16s ease,border-color .16s ease;
}
.ed-icon-button{width:44px;background:transparent;color:var(--ed-muted)}
.ed-icon-button svg{width:20px;height:20px}
.ed-icon-button:not(:disabled):hover{background:var(--ed-soft-purple);color:var(--ed-primary)}
.ed-icon-button::after{
  position:absolute;
  top:calc(100% + 7px);
  left:50%;
  z-index:80;
  width:max-content;
  max-width:180px;
  padding:6px 8px;
  border-radius:7px;
  background:var(--ed-ink);
  color:#fff;
  content:attr(aria-label);
  font-size:12px;
  font-weight:650;
  line-height:1.2;
  opacity:0;
  pointer-events:none;
  transform:translate(-50%,-3px);
  transition:opacity .15s ease,transform .15s ease;
}
.ed-icon-button:hover::after,.ed-icon-button:focus-visible::after{opacity:1;transform:translate(-50%,0)}
.ed-language-button{padding:0 10px;border:1px solid var(--ed-divider)!important;background:var(--ed-surface);font-size:12px;font-weight:800}
.ed-language-button:hover,.ed-text-button:hover{border-color:#C8BAE8!important;background:var(--ed-soft-purple);color:var(--ed-primary)}
.ed-text-button{padding:0 12px;border:1px solid var(--ed-divider)!important;background:var(--ed-surface);font-weight:700}
.ed-text-button svg,.ed-primary-button svg{width:19px;height:19px}
.ed-primary-button{padding:0 16px;background:var(--ed-primary);color:#fff;font-weight:800;box-shadow:0 5px 13px rgba(130,87,230,.22)}
.ed-primary-button:hover{background:var(--ed-primary-pressed)}
.ed-primary-button:active{background:var(--ed-primary-pressed);transform:translateY(1px)}
.ed-ai-presence{display:inline-flex;min-height:36px;align-items:center;gap:7px;padding:0 9px;color:var(--ed-muted);font-size:12px;font-weight:650;white-space:nowrap}
.ed-presence-dot{width:8px;height:8px;border:2px solid #918BA1;border-radius:50%;background:#fff}
.ed-ai-presence[data-ai-state="working"]{color:var(--ed-ink)}
.ed-ai-presence[data-ai-state="working"] .ed-presence-dot{border-color:var(--ed-purple);background:var(--ed-purple)}

#edBanner{
  position:absolute;
  top:calc(var(--ed-topbar-h) + 10px);
  left:50%;
  z-index:70;
  width:max-content;
  max-width:min(560px,calc(100% - 28px));
  padding:10px 14px;
  border:1px solid #C9B8EE;
  border-radius:10px;
  background:var(--ed-surface);
  box-shadow:var(--ed-shadow);
  color:var(--ed-ink);
  font-size:13px;
  font-weight:650;
  transform:translateX(-50%);
}
#edBanner h2{margin:0 0 4px;font-size:15px;line-height:1.35}
#edBanner p{margin:0 0 10px;color:var(--ed-muted);font-weight:500;line-height:1.45}
#edBanner button{min-height:34px;margin:0 6px 0 0;padding:0 11px;border:1px solid var(--ed-divider);border-radius:8px;background:var(--ed-surface);color:var(--ed-ink);font:inherit;cursor:pointer}
#edBanner button:first-of-type{border-color:var(--ed-primary);background:var(--ed-primary);color:#fff}
#edBanner button:disabled{cursor:wait;opacity:.58}
#edBanner[data-recovery-error="download"]{border-color:#D9877E}

.ed-workspace{
  position:relative;
  display:grid;
  flex:1;
  min-width:0;
  min-height:0;
  grid-template-columns:76px 264px minmax(360px,1fr) 286px;
  grid-template-rows:minmax(0,1fr) var(--ed-river-h);
  overflow:hidden;
}

#edCreateDock{
  z-index:18;
  display:flex;
  grid-column:1;
  grid-row:1 / -1;
  min-height:0;
  flex-direction:column;
  gap:3px;
  padding:10px 7px;
  overflow-y:auto;
  background:#FBF0E8;
  border-right:1px solid var(--ed-divider);
}
#edCreateDock button{
  display:flex;
  min-height:62px;
  flex:none;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:5px;
  padding:6px 3px;
  border-radius:10px;
  background:transparent;
  color:var(--ed-muted);
  font-size:11px;
  font-weight:700;
  transition:background-color .16s ease,color .16s ease;
}
#edCreateDock button svg{width:23px;height:23px}
#edCreateDock button:hover,#edCreateDock button.is-active{background:var(--ed-surface);color:var(--ed-primary);box-shadow:0 2px 10px rgba(60,47,78,.08)}
#edCreateDock .ed-pages-control{display:none}
#edCreateDock .ed-mobile-actions{display:none}

#edAssetShelf,#edActionLens{
  min-width:0;
  min-height:0;
  overflow:auto;
  background:var(--ed-surface);
}
#edAssetShelf{grid-column:2;grid-row:1;padding:14px;border-right:1px solid var(--ed-divider)}
#edActionLens{grid-column:4;grid-row:1;padding:14px;overflow-x:hidden;border-left:1px solid var(--ed-divider)}
.ed-panel-heading{position:relative;display:flex;align-items:center;justify-content:space-between;min-height:38px;margin-bottom:12px}
.ed-panel-heading h2{font-size:15px;font-weight:800}
.ed-paper-tab{width:34px;height:12px;border-radius:3px;background:var(--ed-yellow);box-shadow:0 1px 2px rgba(74,54,31,.12);transform:rotate(3deg)}
.ed-lens-mark{width:17px;height:17px;border:3px solid var(--ed-coral);border-radius:50%;box-shadow:6px 6px 0 -5px var(--ed-coral)}
.ed-skeleton-search{
  display:flex;
  min-height:44px;
  align-items:center;
  gap:8px;
  padding:0 11px;
  border:1px solid var(--ed-divider);
  border-radius:9px;
  background:#FAF9FC;
  color:var(--ed-muted);
  font-size:13px;
}
.ed-skeleton-search svg{width:18px;height:18px;flex:none}
.ed-panel-empty{max-width:210px;margin:28px auto 0;color:var(--ed-muted);font-size:13px;line-height:1.55;text-align:center}
.ed-asset-search{display:grid;grid-template-columns:minmax(78px,.75fr) minmax(0,1.4fr) auto;height:auto;padding:6px;gap:6px}
.ed-asset-search select,.ed-asset-search input,.ed-asset-search button,.ed-upload-button{
  min-width:0;min-height:36px;border:1px solid var(--ed-divider);border-radius:8px;background:#fff;color:var(--ed-ink);font:inherit
}
.ed-asset-search select,.ed-asset-search input{padding:0 8px}
.ed-asset-search button,.ed-upload-button{padding:0 11px;background:var(--ed-primary);color:#fff;font-weight:800;cursor:pointer}
.ed-asset-search button:disabled,.ed-upload-button:disabled{cursor:not-allowed;opacity:.55}
.ed-asset-search :focus-visible,.ed-upload-button:focus-visible,.ed-asset-card:focus-visible{outline:3px solid rgba(130,87,230,.32);outline-offset:2px}
.ed-upload-region{margin-top:8px;padding:16px;border:1px dashed #BFB4C8;border-radius:12px;background:#FAF9FC;text-align:center}
.ed-asset-status{min-height:20px;margin:10px 2px 0;color:var(--ed-muted);font-size:12px;line-height:1.45}
.ed-asset-status[role="alert"]{color:#9B2C21;font-weight:700}
.ed-asset-viewport{position:relative;min-height:260px;margin-top:4px}
.ed-asset-results{position:relative;min-width:0}
.ed-asset-card{
  position:absolute;display:flex;height:128px;flex-direction:column;gap:6px;overflow:hidden;padding:6px;border:1px solid var(--ed-divider);border-radius:10px;background:#fff;color:var(--ed-ink);text-align:left;cursor:pointer;transition:border-color .18s ease,box-shadow .18s ease
}
.ed-asset-card:hover{border-color:var(--ed-primary);box-shadow:0 5px 14px rgba(60,47,78,.12)}
.ed-asset-thumbnail{width:100%;height:88px;flex:none;border-radius:6px;background:#F2EEF7;object-fit:cover}
.ed-asset-caption{display:block;overflow:hidden;padding:0 2px;font-size:12px;font-weight:750;line-height:1.3;text-overflow:ellipsis;white-space:nowrap}
.ed-lens-preview{display:grid;gap:8px;margin-top:10px;padding:14px;border:1px solid var(--ed-divider);border-radius:12px;background:#FBFAFD}
.ed-lens-preview span{display:block;height:9px;border-radius:8px;background:#EAE5F1}
.ed-lens-preview span:nth-child(2){width:72%}.ed-lens-preview span:nth-child(3){width:88%}
.ed-inspector-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:12px;padding:0 0 72px}
.ed-inspector-fields[hidden]{display:none}
.ed-inspector-field{display:grid;min-width:0;gap:5px;color:var(--ed-muted);font-size:11px;font-weight:750}
.ed-inspector-field:first-child{grid-column:1 / -1}
.ed-inspector-field span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ed-inspector-field input{
  box-sizing:border-box;width:100%;min-width:0;min-height:40px;padding:0 9px;
  border:1px solid var(--ed-divider);border-radius:8px;background:var(--ed-surface);color:var(--ed-ink);font:inherit;font-size:13px
}
.ed-inspector-field input[data-mixed="true"]{border-style:dashed;background:var(--ed-soft-purple)}
.ed-inspector-field input:focus{border-color:var(--ed-primary)}

#edStage{
  position:relative;
  display:flex;
  grid-column:3;
  grid-row:1;
  min-width:0;
  min-height:0;
  align-items:center;
  justify-content:center;
  overflow:auto;
  overscroll-behavior:contain;
  background:var(--ed-bg);
}
.ed-stage-grid{
  position:absolute;
  inset:0;
  opacity:.42;
  background-image:radial-gradient(circle,#CFC1B7 1px,transparent 1.2px);
  background-size:20px 20px;
  pointer-events:none;
}
#edCanvasHost{position:relative;z-index:2;padding:48px}
.ed-paper-canvas{width:min(520px,60vw);aspect-ratio:1/1.414;background:#fff;border:1px solid #D8CFCA;box-shadow:0 18px 45px rgba(61,47,77,.15)}

#edStartScreen{
  position:relative;
  z-index:4;
  width:min(760px,calc(100% - 44px));
  max-height:calc(100% - 34px);
  padding:24px;
  overflow:auto;
  border:1px solid #D9CDEA;
  border-radius:16px;
  background:rgba(255,255,255,.96);
  box-shadow:0 18px 44px rgba(70,52,89,.14),8px 8px 0 rgba(255,220,97,.45);
}
.ed-start-copy{max-width:620px;margin:0 auto 20px;text-align:center}
.ed-start-eyebrow{display:inline-block;margin-bottom:8px;padding:5px 9px;border-radius:999px;background:var(--ed-soft-coral);color:#A63F31;font-size:11px;font-weight:850;letter-spacing:.08em;text-transform:uppercase;transform:rotate(-1deg)}
.ed-start-copy h1{font-size:clamp(25px,3vw,36px);line-height:1.12;letter-spacing:-.035em}
.ed-start-copy p{max-width:580px;margin:9px auto 0;color:var(--ed-muted);font-size:14px;line-height:1.5}
.ed-start-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.ed-start-card{
  position:relative;
  display:grid;
  min-height:122px!important;
  grid-template-columns:46px 1fr;
  grid-template-rows:auto auto;
  column-gap:12px;
  align-content:center;
  padding:16px;
  border:1px solid var(--ed-divider)!important;
  border-radius:12px;
  background:var(--ed-surface);
  color:var(--ed-ink);
  text-align:left;
  transition:border-color .16s ease,background-color .16s ease,box-shadow .16s ease;
}
.ed-start-card:hover{border-color:#BDA8EB!important;background:#FCFAFF;box-shadow:0 7px 17px rgba(68,52,86,.1)}
.ed-start-card svg{grid-row:1 / 3;width:40px;height:40px;color:var(--ed-primary)}
.ed-start-card strong{align-self:end;font-size:14px}
.ed-start-card span{align-self:start;margin-top:4px;color:var(--ed-muted);font-size:12px;line-height:1.35}
.ed-start-card-primary{border-color:#C9B7EF!important;background:var(--ed-soft-purple)}
.ed-start-card-primary::after{position:absolute;top:8px;right:10px;width:28px;height:8px;border-radius:3px;background:var(--ed-yellow);content:"";transform:rotate(4deg)}

#edPageRiver{
  position:relative;
  display:flex;
  grid-column:2 / 5;
  grid-row:2;
  min-width:0;
  min-height:0;
  align-items:center;
  justify-content:center;
  gap:14px;
  padding:12px 18px;
  overflow-x:auto;
  background:#F8ECE4;
  border-top:1px solid var(--ed-divider);
  color:var(--ed-muted);
  font-size:13px;
}
.ed-river-mark{width:48px;height:62px;flex:none;border:1px dashed #BFB4C8;border-radius:7px;background:#fff;box-shadow:4px 4px 0 rgba(255,112,92,.18);transform:rotate(-2deg)}
.ed-add-page{display:inline-flex;min-width:44px;align-items:center;justify-content:center;gap:6px;padding:0 12px;border:1px solid var(--ed-divider)!important;border-radius:9px;background:var(--ed-surface);color:var(--ed-muted);font-weight:700}
.ed-add-page svg{width:19px;height:19px}

@media(max-width:1240px){
  .ed-workspace{grid-template-columns:72px 232px minmax(320px,1fr) 250px}
  .ed-save-state,.ed-ai-presence{display:none}
  .ed-document-title{max-width:180px}
}

@media(max-width:1024px){
  .ed-workspace{grid-template-columns:72px minmax(0,1fr);grid-template-rows:minmax(0,1fr) var(--ed-river-h)}
  #edStage{grid-column:2;grid-row:1}
  #edPageRiver{grid-column:2;grid-row:2}
  #edAssetShelf,#edActionLens{
    position:absolute;
    top:0;
    bottom:var(--ed-river-h);
    z-index:24;
    width:min(310px,calc(100% - 92px));
    box-shadow:var(--ed-shadow);
    transition:transform .2s ease;
  }
  #edAssetShelf{left:72px;transform:translateX(-110%)}
  #edActionLens{right:0;transform:translateX(110%)}
  #edApp[data-panel] #edAssetShelf{transform:none}
  #edApp[data-panel="action"] #edAssetShelf{transform:translateX(-110%)}
  #edApp[data-panel="action"] #edActionLens{transform:none}
  .ed-text-button span{display:none}
  .ed-text-button{width:44px;padding:0}
}

@media(max-width:680px){
  :root{--ed-topbar-h:54px;--ed-river-h:0px}
  #edApp{font-size:16px}
  #edTopbar{gap:6px;padding:5px 7px 5px 10px}
  .ed-app-name{font-size:16px}
  .ed-title-divider,.ed-document-title,.ed-action-divider,#btnUndo,#btnRedo{display:none}
  .ed-top-actions{gap:5px}
  .ed-language-button,.ed-text-button,.ed-primary-button{min-width:44px;padding:0 9px;font-size:16px}
  .ed-primary-button span{display:none}
  .ed-primary-button{width:44px;padding:0}
  .ed-workspace{display:block}
  #edStage{position:absolute;inset:0 0 72px 0;display:flex}
  #edCreateDock{
    position:absolute;
    right:0;
    bottom:0;
    left:0;
    z-index:32;
    height:72px;
    flex-direction:row;
    align-items:stretch;
    justify-content:space-around;
    gap:2px;
    padding:5px 4px;
    overflow-x:auto;
    overflow-y:hidden;
    border-top:1px solid var(--ed-divider);
    border-right:0;
  }
  #edCreateDock button{min-width:74px;min-height:60px;flex:1;font-size:16px}
  #edCreateDock button svg{width:22px;height:22px}
  #edCreateDock .ed-pages-control{display:flex}
  #edCreateDock .ed-mobile-actions{display:flex;min-width:max-content;flex:0 0 auto;align-items:stretch;gap:2px}
  #edCreateDock .ed-mobile-actions button{min-width:88px;min-height:60px;flex:0 0 auto;padding:6px 10px;white-space:nowrap}
  #edAssetShelf,#edActionLens,#edPageRiver{
    position:absolute;
    top:auto;
    right:0;
    bottom:72px;
    left:0;
    z-index:30;
    width:auto;
    height:min(52svh,420px);
    padding:16px;
    border:1px solid var(--ed-divider);
    border-width:1px 0 0;
    border-radius:16px 16px 0 0;
    background:var(--ed-surface);
    box-shadow:0 -14px 34px rgba(62,48,79,.17);
    transform:translateY(110%);
    transition:transform .2s ease;
  }
  #edPageRiver{display:flex;grid-column:auto;grid-row:auto;flex-direction:column;align-items:flex-start;justify-content:flex-start;overflow-x:auto;overflow-y:auto;color:var(--ed-muted)}
  #edPageRiver .ed-page-track{height:64px;max-height:64px;align-self:flex-start}
  #edPageRiver .ed-add-page{flex:0 0 auto;align-self:flex-start}
  #edApp[data-panel] #edAssetShelf,#edApp[data-panel="action"] #edActionLens{transform:translateY(110%)}
  #edApp[data-mobile-sheet="assets"] #edAssetShelf,
  #edApp[data-mobile-sheet="properties"] #edActionLens,
  #edApp[data-mobile-sheet="pages"] #edPageRiver{transform:none}
  #edStartScreen{width:calc(100% - 22px);max-height:calc(100% - 20px);padding:18px 14px;border-radius:14px;box-shadow:0 12px 30px rgba(70,52,89,.13),5px 5px 0 rgba(255,220,97,.42)}
  .ed-start-copy{margin-bottom:14px}
  .ed-start-copy h1{font-size:26px}
  .ed-start-copy p{font-size:16px}
  .ed-start-grid{grid-template-columns:1fr;gap:8px}
  .ed-start-card{min-height:104px!important;padding:12px 14px;font-size:16px}
  .ed-start-card span,.ed-start-eyebrow,.ed-panel-empty,.ed-skeleton-search,#edPageRiver,#edBanner{font-size:16px}
  .ed-asset-search{grid-template-columns:92px minmax(0,1fr);padding:7px}
  .ed-asset-search button{grid-column:1/-1}
  .ed-asset-search select,.ed-asset-search input,.ed-asset-search button,.ed-upload-button{min-height:44px;font-size:16px}
  .ed-export-footer .ed-primary-button{width:auto;min-width:112px;padding:0 16px;font-size:16px}
}

@media(max-width:390px){
  .ed-language-button{padding:0 7px}
  #edCreateDock button{min-width:74px}
  #edStartScreen{padding:16px 12px}
}

@media(prefers-reduced-motion:reduce){
  #edApp *,#edApp *::before,#edApp *::after{animation:none!important;scroll-behavior:auto!important;transition:none!important}
}
