/* Shared ownership: shell/tokens + editor chrome. Home and library own
   their named v5 components. Legacy CSS remains for unchanged functional panels. */
body[data-studio-version="5"] {
  /* User's A-stage review: brighter mint/leaf accents for an innovation studio.
     These are interface tokens, never recolors of the logo or approved PNGs. */
  --v5-ink:#183E35; --v5-jade:#236D5D; --v5-control:#D0EFDF;
  --v5-page:#F7FAF2; --v5-surface:#FFFFFF; --v5-accent:#C4EE67;
  --brand:var(--v5-jade); --brand-deep:var(--v5-jade); --brand-ink:var(--v5-ink);
  --bg:var(--v5-page); --card:var(--v5-surface); --ink:var(--v5-ink);
  --muted:#52675D; --line:#CCD9D0; --shadow:none;
  color:var(--v5-ink);background:var(--v5-page);
  font-family:-apple-system,"PingFang SC","Microsoft YaHei",sans-serif;
  font-size:15px;line-height:1.6;
}
body[data-studio-version="5"] .shell {grid-template-columns:208px minmax(0,1fr)}
body[data-studio-version="5"] .sidebar {
  background:#EAF5E8;background-image:none;color:var(--v5-ink);
  padding:24px 12px 16px;border-right:1px solid var(--line);gap:0;
}
body[data-studio-version="5"] .sidebar .sidebar-wordmark {
  width:84px;margin:0 16px 12px;padding:0;background:transparent;
  border-radius:0;box-shadow:none;filter:none;
}
body[data-studio-version="5"] .sidebar .s-brand {padding:0 16px 24px}
body[data-studio-version="5"] .s-brand b {font-size:15px;color:var(--v5-ink);font-weight:650}
body[data-studio-version="5"] .s-brand span {display:block;margin-top:6px;font-size:12px;color:var(--muted)}
body[data-studio-version="5"] .sidebar .nav-item {
  min-height:48px;gap:12px;margin:0 0 4px;padding:7px 12px;
  border:0;border-radius:10px;color:var(--v5-ink);background:transparent;
  box-shadow:none;font-size:14px;transition:background-color .14s,color .14s;
}
body[data-studio-version="5"] .sidebar .nav-item:hover {background:#CDEACB}
body[data-studio-version="5"] .sidebar .nav-item.on {background:var(--v5-jade);color:white;box-shadow:none}
body[data-studio-version="5"] .sidebar .nav-item svg {color:currentColor}
body[data-studio-version="5"] .sidebar .nav-label {display:block;font-size:14px;line-height:1.5;font-weight:550}
body[data-studio-version="5"] .sidebar .ip-nav-item .ip-nav-art {
  width:34px;height:34px;display:grid;place-items:center;flex:none;
  border:0;background:transparent;border-radius:0;box-shadow:none;
}
body[data-studio-version="5"] .sidebar .ip-nav-art .ip-companion {
  width:34px;height:34px;border:0;background:transparent;overflow:visible;
}
body[data-studio-version="5"] .sidebar .ip-visible-subject {
  position:relative;width:calc(32px * var(--ip-visible-ratio));height:32px;
}
body[data-studio-version="5"] .sidebar .ip-visible-subject img {
  position:absolute;object-fit:fill;max-width:none;max-height:none;filter:none;
}
body[data-studio-version="5"] .v5-nav-icon {width:34px;display:grid;place-items:center;flex:none}
body[data-studio-version="5"] .v5-nav-icon svg {width:20px;height:20px}
body[data-studio-version="5"] .sidebar .s-foot {border-color:#C3D1C6;padding-top:12px}
body[data-studio-version="5"] .sidebar .s-foot .nav-item {min-height:40px}
body[data-studio-version="5"] .sidebar .s-foot svg {margin:0 8px;width:18px}
body[data-studio-version="5"] .sidebar-header {display:flex;flex-direction:column;align-items:stretch}
body[data-studio-version="5"] .nav-collapse-toggle {align-self:flex-start;margin:0 12px 16px;min-height:36px;padding:5px 10px;border:1px solid #577C6A;border-radius:8px;color:var(--v5-ink);background:#FFF;cursor:pointer;font:inherit;font-size:13px}
body[data-studio-version="5"] .shell.nav-collapsed {grid-template-columns:120px minmax(0,1fr)}
body[data-studio-version="5"] .nav-collapsed .sidebar .sidebar-wordmark {width:64px;margin-inline:auto}
body[data-studio-version="5"] .nav-collapsed .sidebar .s-brand {padding:0 4px 12px;text-align:center}
body[data-studio-version="5"] .nav-collapsed .sidebar .s-brand b {font-size:13px}
body[data-studio-version="5"] .nav-collapsed .sidebar .s-brand span {display:none}
body[data-studio-version="5"] .nav-collapsed .sidebar .nav-item {flex-direction:column;gap:3px;padding:7px 2px;justify-content:center;min-height:64px;position:relative}
body[data-studio-version="5"] .nav-collapsed .sidebar .nav-label {font-size:12px;text-align:center}
body[data-studio-version="5"] .nav-collapsed .sidebar .cnt {position:absolute;right:2px;top:2px}
body[data-studio-version="5"] .topbar {
  background:#C7EFA1;background-image:linear-gradient(110deg,#D4F398 0%,#ABE8BA 52%,#A1E8DC 100%);
  min-height:76px;padding:16px 32px;gap:16px;color:var(--v5-ink);
  border-bottom:1px solid #83B69C;position:sticky;top:0;isolation:isolate;
}
body[data-studio-version="5"] .topbar h1 {font-size:24px;line-height:1.25;font-weight:650;letter-spacing:0;flex-shrink:0}
body[data-studio-version="5"] .topbar .crumb {font-size:13px;max-width:42%;line-height:1.5;color:#284F40}
body[data-studio-version="5"] .topbar .user-chip {padding:1px 10px 1px 4px;background:#FFFFFF;border-radius:10px;gap:8px;color:var(--v5-ink);min-width:0;max-width:300px}
body[data-studio-version="5"] .topbar .user-chip>div:last-child {min-width:0}
body[data-studio-version="5"] .topbar .user-chip .avatar {flex:none}
/* CSS clipping preserves the full account name in the accessible DOM. */
body[data-studio-version="5"] .topbar .user-chip .u-name {max-width:220px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body[data-studio-version="5"] .avatar {background:var(--v5-jade);box-shadow:none}
body[data-studio-version="5"] .u-name {font-size:14px}
body[data-studio-version="5"] .u-role {font-size:12px}
body[data-studio-version="5"] .content {padding:24px 32px 40px}
body[data-studio-version="5"] :is(button,input,select,textarea) {font-family:inherit}
body[data-studio-version="5"] .btn {
  min-height:40px;border-radius:10px;font-size:14px;
  transition:background-color .14s,border-color .14s,color .14s;box-shadow:none;
}
body[data-studio-version="5"] .btn.primary {background:var(--v5-jade);border-color:var(--v5-jade);color:white;filter:none}
body[data-studio-version="5"] .btn.primary:hover {background:#195344;border-color:#195344;color:white}
body[data-studio-version="5"] .btn:not(.primary):not(.danger):not(.orange):hover {background:#E8F0E8;color:var(--v5-ink);border-color:var(--v5-jade)}
body[data-studio-version="5"] .btn.sm {min-height:34px;font-size:13px;padding:5px 10px}
body[data-studio-version="5"] .btn:active {box-shadow:inset 0 0 0 2px #183E3525}
body[data-studio-version="5"] :is(a,button,summary,input,select,textarea,[tabindex]):focus-visible {
  outline:3px solid var(--v5-jade);outline-offset:3px;scroll-margin-block:96px;
}
body[data-studio-version="5"] .sidebar :is(a,button):focus-visible {outline-color:var(--v5-ink);outline-offset:2px}
body[data-studio-version="5"] .input {border-color:#577C6A;border-radius:10px}
body[data-studio-version="5"] .input:focus {box-shadow:none}
body[data-studio-version="5"] .card {box-shadow:none}
/* Remaining work routes use the same quiet content surface as A3. */
body[data-studio-version="5"] .plans-controls {display:flex;align-items:end;flex-wrap:wrap;gap:16px;margin:20px 0 16px;padding:16px 20px;background:#FFF;border:1px solid var(--line);border-radius:12px}
body[data-studio-version="5"] .plans-search {flex:1;min-width:180px;display:grid;grid-template-columns:minmax(150px,1fr) auto auto;column-gap:8px}
body[data-studio-version="5"] .plans-search label {grid-column:1/-1}
body[data-studio-version="5"] .plans-search .btn {min-height:40px}
body[data-studio-version="5"] .plans-sort {min-width:150px;margin:0!important}
body[data-studio-version="5"] .plans-controls label {display:block;font-size:13px;font-weight:600;margin-bottom:6px}
body[data-studio-version="5"] .plans-controls .input {width:100%;min-height:40px}
body[data-studio-version="5"] .plans-result-summary {font-size:14px;color:var(--muted);margin:12px 0}
body[data-studio-version="5"] .plan-card {display:flex;flex-direction:column;border-radius:14px}
body[data-studio-version="5"] .plan-card .p-body {flex:1;display:flex;flex-direction:column;gap:8px;min-width:0}
body[data-studio-version="5"] .plan-card .p-body h3 {overflow-wrap:anywhere;line-height:1.5;margin:0}
body[data-studio-version="5"] .plan-card .p-ops {margin-top:auto;flex-wrap:wrap}
body[data-studio-version="5"] .asset-compare {align-items:stretch}
body[data-studio-version="5"] .asset-compare figure {min-width:0;display:flex;flex-direction:column}
body[data-studio-version="5"] .asset-compare figcaption {min-height:3em;line-height:1.5}
body[data-studio-version="5"] .asset-compare .asset-preview-check {flex:1}
body[data-studio-version="5"] .asset-preview-check {flex:1}
/* Shared vivid header, not a second title system for individual routes. */
body[data-studio-version="5"] .topbar .u-role {color:#455F51}
/* One login brand, with the same original abstract art as the home welcome. */
body[data-studio-version="5"] .login-page {min-height:100dvh;grid-template-columns:1.08fr 1fr;background:#FCFDF9}
body[data-studio-version="5"] .login-hero {padding:48px clamp(32px,4vw,64px);justify-content:flex-start;isolation:isolate;background:#EEF8EB}
body[data-studio-version="5"] .login-hero::after {display:none}
body[data-studio-version="5"] .brand-v31-login-culture {margin-bottom:24px}
body[data-studio-version="5"] .brand-v31-login-culture .brand-v31-logo {width:100px;margin-bottom:32px;display:block}
body[data-studio-version="5"] .brand-v31-login-culture h1 {font-size:36px;line-height:1.3;font-weight:650;letter-spacing:0;margin:0 0 12px;color:var(--v5-ink)}
body[data-studio-version="5"] .brand-v31-login-culture>span {font-size:15px;color:#355746}
body[data-studio-version="5"] .v5-login-intro {position:relative;z-index:1;font-size:24px;font-weight:550;line-height:1.6;margin:0;max-width:24em;color:var(--v5-ink)}
body[data-studio-version="5"] .v5-login-features {position:relative;z-index:1;display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:28px;max-width:560px}
body[data-studio-version="5"] .v5-login-features>div {padding:16px;background:#FFFFFFEB;border:1px solid #BDDAC5;border-radius:14px}
body[data-studio-version="5"] .v5-login-features>div>span {width:24px;height:24px;display:block;margin-bottom:10px;color:var(--v5-jade)}
body[data-studio-version="5"] .v5-login-features svg {width:24px;height:24px}
body[data-studio-version="5"] .v5-login-features b {font-size:15px;font-weight:650}
body[data-studio-version="5"] .v5-login-features p {font-size:13px;line-height:1.6;margin:6px 0 0;color:#3F6050}
body[data-studio-version="5"] .v5-login-art {position:absolute;bottom:-30px;right:-115px;width:950px;max-width:155%;height:580px;z-index:0;pointer-events:none;mask-image:linear-gradient(to bottom,transparent 0%,#000 32%)}
body[data-studio-version="5"] .v5-login-art img {width:100%;height:100%;object-fit:cover;object-position:center 70%;display:block}
body[data-studio-version="5"] .login-panel {padding:40px;background:#FCFDF9}
body[data-studio-version="5"] .login-card h2 {font-size:28px;font-weight:650}
body[data-studio-version="5"] .login-card .input {min-width:0;background:#FFFFFF;font-size:16px}
/* Inline errors stay beside their field semantically, but below the input row
   visually. They must not compete with the phone input for flex width. */
body[data-studio-version="5"] .login-row {flex-wrap:wrap}
body[data-studio-version="5"] .login-row>.field-error {order:3;flex-basis:100%;width:100%;margin:0}
/* Calm working space; no IP decoration in editor panels, canvas or exports. */
body[data-studio-version="5"][data-page="editor"] .content {padding:0;min-height:0}
body[data-studio-version="5"][data-page="editor"] .topbar {min-height:64px;padding-block:12px}
body[data-studio-version="5"][data-page="editor"] .topbar h1 {font-size:22px}
body[data-studio-version="5"] #ed-root .editor {
  margin:0;height:calc(100dvh - 64px);grid-template-columns:var(--ed-left-track,232px) var(--ed-left-handle,8px) minmax(0,1fr) var(--ed-right-handle,8px) var(--ed-right-track,252px);
  grid-template-rows:auto minmax(0,1fr);background:var(--v5-surface);
}
body[data-studio-version="5"] #ed-root .editor:not(.ed-compact)>.ed-panel.left {grid-column:1;grid-row:2}
body[data-studio-version="5"] #ed-root .editor:not(.ed-compact)>.stage-wrap {grid-column:3;grid-row:2}
body[data-studio-version="5"] #ed-root .editor:not(.ed-compact)>.ed-panel.right {grid-column:5;grid-row:2}
body[data-studio-version="5"] #ed-root .editor:not(.ed-compact)>.ed-pane-switch {display:none}
body[data-studio-version="5"] #ed-root .ed-resizer {grid-row:2;min-width:0;cursor:col-resize;touch-action:none;background:#D2DDD4;position:relative;outline-offset:-2px}
body[data-studio-version="5"] #ed-root [data-ed-resize="left"] {grid-column:2}
body[data-studio-version="5"] #ed-root [data-ed-resize="right"] {grid-column:4}
body[data-studio-version="5"] #ed-root .ed-resizer::after {content:"";position:absolute;inset:42% 2px;background:#698777;border-radius:3px}
body[data-studio-version="5"] #ed-root .ed-resizer::before {content:"";position:absolute;inset:0 -8px;z-index:1}
body[data-studio-version="5"] #ed-root .ed-resizer:hover {background:#BCD5C5}
body[data-studio-version="5"] #ed-root .ed-resizer:focus-visible {outline:3px solid var(--v5-jade);z-index:1}
body[data-studio-version="5"] #ed-root .ed-resizing {user-select:none;cursor:col-resize}
body[data-studio-version="5"] #ed-root .editor:not(.ed-compact).ed-left-hidden>:is(.ed-panel.left,[data-ed-resize="left"]),
body[data-studio-version="5"] #ed-root .editor:not(.ed-compact).ed-right-hidden>:is(.ed-panel.right,[data-ed-resize="right"]) {display:none}
body[data-studio-version="5"] #ed-root #ed-more-actions>div {width:min(340px,calc(100vw - 32px));max-height:min(560px,calc(100dvh - 180px));overflow-y:auto;overscroll-behavior:contain}
body[data-studio-version="5"] #ed-root .ed-menu-section {display:flex;flex-wrap:wrap;gap:8px;width:100%}
body[data-studio-version="5"] #ed-root .ed-menu-section:not([hidden])+.ed-menu-section {padding-top:12px;border-top:1px solid #D2DDD4}
body[data-studio-version="5"] #ed-root .ed-menu-section h4 {width:100%;margin:0;font-size:13px;font-weight:650}
body[data-studio-version="5"] #ed-root .ed-menu-section p {width:100%;margin:4px 0 0;white-space:normal}
body[data-studio-version="5"] #ed-root :is(.ed-mobile-tools,.ed-mobile-feedback)[hidden] {display:none}
body[data-studio-version="5"] #ed-root .ed-toolbar {
  grid-column:1/-1;grid-row:1;background:#E4F1E8;padding:12px 16px;gap:8px;border-bottom:1px solid #BECEC2;
}
body[data-studio-version="5"] #ed-root .title-input {
  background:white;border:1px solid #577C6A;border-radius:10px;width:176px;
  font-size:15px;min-height:36px;padding:6px 10px;color:var(--v5-ink);
}
body[data-studio-version="5"] #ed-root .ed-guide {padding:0;gap:16px;font-size:12px;color:#455E51}
body[data-studio-version="5"] #ed-root .ed-guide small {color:#455E51}
body[data-studio-version="5"] #ed-root .ed-panel {padding:16px 12px;background:#FBFCFA;border-color:#D2DDD4;gap:12px}
body[data-studio-version="5"] #ed-root .ed-tabs {display:grid;grid-template-columns:1fr 1.8fr 1fr 1fr;padding:4px;background:#DCE6DC;border-radius:10px;gap:2px}
body[data-studio-version="5"] #ed-root .ed-tabs button {min-height:34px;border-radius:7px;font-size:13px;color:var(--v5-ink);box-shadow:none}
body[data-studio-version="5"] #ed-root .ed-tabs button.on {background:white;font-weight:650}
body[data-studio-version="5"] #ed-root .ed-search input {min-height:40px;background:white;border-color:#577C6A;font-size:14px}
body[data-studio-version="5"] #ed-root .ed-item {background:white;border-color:#CCD9D0;border-radius:10px;padding:8px;gap:8px;transition:background-color .14s,border-color .14s}
body[data-studio-version="5"] #ed-root .ed-item:hover {background:#EDF3E9;border-color:var(--v5-jade)}
body[data-studio-version="5"] #ed-root .ed-item img {width:44px;height:56px;background:#F0F3EE;border-radius:6px;object-fit:contain}
body[data-studio-version="5"] #ed-root .ed-item .t b {font-size:13px;font-weight:600}
body[data-studio-version="5"] #ed-root .ed-item .t span {font-size:12px;line-height:1.5}
body[data-studio-version="5"] #ed-root .ed-item .add-ic {width:26px;height:26px;background:var(--v5-jade)}
body[data-studio-version="5"] #ed-root .ed-group-title {margin-top:8px;font-size:13px;color:#4F6759}
body[data-studio-version="5"] #ed-root .stage-wrap {background:#DEE4DC;background-image:none}
body[data-studio-version="5"] #ed-root .stage {box-shadow:0 2px 12px #183E351C}
body[data-studio-version="5"] #ed-root .zoom-bar {background:var(--v5-ink);padding:6px;border-radius:10px;bottom:16px}
body[data-studio-version="5"] #ed-root .zoom-bar button {color:white;min-height:30px}
body[data-studio-version="5"] #ed-root .zoom-bar .zval {color:white}
body[data-studio-version="5"] #ed-root .prop-sec {border-color:#D2DDD4;padding-bottom:16px;margin-bottom:16px}
body[data-studio-version="5"] #ed-root .prop-sec h4 {font-size:14px;color:var(--v5-ink);font-weight:650}
body[data-studio-version="5"] #ed-root .delivery-tools>div {background:white;box-shadow:0 8px 28px #183E3524;border-color:#BECEC2}
/* Reuse the existing focused panes when the editor's own width is insufficient. */
body[data-studio-version="5"] #ed-root .editor.ed-compact {min-height:0;grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto minmax(0,1fr)}
body[data-studio-version="5"] #ed-root .editor.ed-compact>.ed-resizer {display:none}
body[data-studio-version="5"] #ed-root .editor.ed-compact>.ed-pane-switch {grid-column:1/-1;grid-row:2;display:flex;padding:8px 10px;background:#F1F4EE;gap:6px}
body[data-studio-version="5"] #ed-root .ed-pane-switch .btn {flex:1;justify-content:center}
body[data-studio-version="5"] #ed-root .ed-pane-switch .on {background:var(--v5-jade);color:white}
body[data-studio-version="5"] #ed-root .editor.ed-compact>:is(.ed-panel,.stage-wrap) {grid-column:1;grid-row:3;min-height:0}
body[data-studio-version="5"] #ed-root .editor.ed-compact>.ed-panel {display:none;max-height:none;overflow:auto}
body[data-studio-version="5"] #ed-root .editor.ed-compact>.stage-wrap {height:auto}
body[data-studio-version="5"] #ed-root .editor.ed-compact[data-pane="assets"]>.ed-panel.left,
body[data-studio-version="5"] #ed-root .editor.ed-compact[data-pane="props"]>.ed-panel.right {display:flex}
body[data-studio-version="5"] #ed-root .editor.ed-compact:not([data-pane="canvas"])>.stage-wrap {display:none}
@media(max-width:1200px) and (min-width:901px) {
  body[data-studio-version="5"] .shell {grid-template-columns:184px minmax(0,1fr)}
  body[data-studio-version="5"] .sidebar .s-brand {padding-inline:10px}
  body[data-studio-version="5"] .content {padding-inline:24px}
  body[data-studio-version="5"] .topbar {padding-inline:24px}
}
@media(max-width:900px) {
  body[data-studio-version="5"] .shell.nav-collapsed {grid-template-columns:72px minmax(0,1fr)}
  body[data-studio-version="5"] .nav-collapse-toggle {display:none}
  body[data-studio-version="5"] .shell {grid-template-columns:72px minmax(0,1fr)}
  body[data-studio-version="5"] .sidebar {padding:16px 6px 10px}
  body[data-studio-version="5"] .sidebar .sidebar-wordmark {width:46px;max-width:100%;margin:0 auto 16px}
  body[data-studio-version="5"] .sidebar .s-brand {display:none}
  body[data-studio-version="5"] .sidebar .nav-item {flex-direction:column;gap:3px;padding:8px 2px;min-height:60px;font-size:12px;justify-content:center}
  body[data-studio-version="5"] .sidebar .nav-label {display:block;font-size:10px;text-align:center}
  body[data-studio-version="5"] .sidebar .s-foot .nav-item {min-height:48px}
  body[data-studio-version="5"] .sidebar .cnt {position:absolute;top:4px;right:2px}
  body[data-studio-version="5"] .sidebar nav {overflow-y:auto;min-height:0}
  body[data-studio-version="5"] .topbar {min-height:72px;padding:12px 16px;gap:8px}
  body[data-studio-version="5"] .topbar h1 {font-size:22px}
  body[data-studio-version="5"] .content {padding:16px}
  body[data-studio-version="5"] .topbar .crumb {display:none}
  body[data-studio-version="5"] .topbar .u-role {font-size:11px}
  body[data-studio-version="5"] .login-page {grid-template-columns:1fr;grid-template-rows:auto 1fr}
  body[data-studio-version="5"] .login-hero {display:flex;padding:24px;background:#DDF4D0}
  body[data-studio-version="5"] .brand-v31-login-culture {display:grid;grid-template-columns:68px minmax(0,1fr);column-gap:16px;margin:0}
  body[data-studio-version="5"] .brand-v31-login-culture .brand-v31-logo {grid-row:1/3;width:68px;margin:4px 0 0}
  body[data-studio-version="5"] .brand-v31-login-culture h1 {font-size:26px;margin:0 0 8px}
  body[data-studio-version="5"] .brand-v31-login-culture>span {font-size:13px}
  body[data-studio-version="5"] :is(.v5-login-intro,.v5-login-features,.v5-login-art) {display:none}
  body[data-studio-version="5"] .login-panel {padding:24px}
  /* Phone focus mode keeps the approved canvas quiet; secondary commands use the same menu. */
  body[data-studio-version="5"] #ed-root .editor.ed-mobile {height:var(--ed-mobile-height,calc(100dvh - 64px));min-height:0;grid-template-rows:auto auto minmax(120px,1fr);overflow:auto}
  body[data-studio-version="5"] #ed-root .ed-mobile .ed-toolbar {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));padding:8px max(12px,env(safe-area-inset-right)) 8px max(12px,env(safe-area-inset-left));gap:8px;position:relative;align-items:center}
  body[data-studio-version="5"] #ed-root .ed-mobile .ed-toolbar>a {grid-row:1;grid-column:1;width:44px;min-width:44px}
  body[data-studio-version="5"] #ed-root .ed-mobile .title-input {grid-row:1;grid-column:1/-1;width:calc(100% - 52px);min-width:0;max-width:none;margin-left:52px;min-height:44px;font-size:16px}
  body[data-studio-version="5"] #ed-root .ed-mobile :is(.btn,summary,.grade-chip) {min-height:44px;min-width:44px;font-size:14px;touch-action:manipulation;white-space:normal}
  body[data-studio-version="5"] #ed-root .ed-mobile :is(button,summary):active {filter:brightness(.94)}
  body[data-studio-version="5"] #ed-root .ed-mobile #ed-save {grid-row:2;grid-column:1;justify-content:center;padding:8px 6px}
  body[data-studio-version="5"] #ed-root .ed-mobile #ed-png {grid-row:2;grid-column:2;justify-content:center;padding:8px 6px}
  body[data-studio-version="5"] #ed-root .ed-mobile #ed-more-actions {grid-row:2;grid-column:3;min-width:0}
  body[data-studio-version="5"] #ed-root .ed-mobile #ed-more-actions>summary {display:flex;justify-content:center;align-items:center;padding:8px 6px}
  body[data-studio-version="5"] #ed-root .ed-mobile .ed-toolbar>.spacer {display:none}
  body[data-studio-version="5"] #ed-root .ed-mobile-feedback {grid-column:1/-1;grid-row:3;display:flex;flex-wrap:wrap;gap:2px 12px;min-width:0;align-items:center}
  body[data-studio-version="5"] #ed-root .ed-mobile-feedback .save-status {font-size:12px;line-height:1.6;white-space:normal;overflow-wrap:anywhere}
  body[data-studio-version="5"] #ed-root .ed-mobile #ed-copy {grid-column:1/-1;grid-row:4;justify-content:center}
  body[data-studio-version="5"] #ed-root .ed-mobile #ed-more-actions>div {padding:16px;padding-bottom:max(16px,env(safe-area-inset-bottom));z-index:90}
  body[data-studio-version="5"] #ed-root .ed-mobile .ed-menu-section {gap:8px}
  body[data-studio-version="5"] #ed-root .ed-mobile .ed-menu-section :is(.btn,.grade-chip) {flex:1 1 auto;justify-content:center;white-space:normal}
  body[data-studio-version="5"] #ed-root .ed-mobile #ed-vis {min-height:44px;width:100%;font-size:16px!important}
  body[data-studio-version="5"] #ed-root .ed-mobile .ed-guide {gap:6px 12px;font-size:12px;line-height:1.6}
  body[data-studio-version="5"] #ed-root .ed-mobile .ed-guide small {margin-left:0;width:100%}
  body[data-studio-version="5"] #ed-root .ed-mobile>.ed-pane-switch {padding:8px 12px;gap:8px}
  body[data-studio-version="5"] #ed-root .ed-mobile>.ed-panel {padding:12px max(12px,env(safe-area-inset-right)) max(20px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));overscroll-behavior:contain;scroll-padding:16px}
  body[data-studio-version="5"] #ed-root .ed-mobile .ed-tabs {gap:4px;grid-template-columns:1fr 1.8fr 1fr 1fr}
  body[data-studio-version="5"] #ed-root .ed-mobile .ed-tabs button {min-height:44px;font-size:14px}
  body[data-studio-version="5"] #ed-root .ed-mobile :is(.ed-search input,.prop-row .input) {min-height:44px;font-size:16px}
  body[data-studio-version="5"] #ed-root .ed-mobile .ed-list {padding:0;overflow:visible}
  body[data-studio-version="5"] #ed-root .ed-mobile .ed-item .t b {font-size:14px}
  body[data-studio-version="5"] #ed-root .ed-mobile .ed-panel.right .prop-sec {padding:8px 0 16px}
  body[data-studio-version="5"] #ed-root .ed-mobile .prop-row {gap:8px;margin-bottom:12px;flex-wrap:wrap}
  body[data-studio-version="5"] #ed-root .ed-mobile .prop-row .lbl {width:60px;font-size:14px}
  body[data-studio-version="5"] #ed-root .ed-mobile .aspect-option {display:flex;align-items:center;gap:10px;min-height:44px;font-size:14px}
  body[data-studio-version="5"] #ed-root .ed-mobile input[type=range] {min-height:44px;touch-action:pan-y}
  body[data-studio-version="5"] #ed-root .ed-mobile .layer-row {gap:8px;padding:8px}
  body[data-studio-version="5"] #ed-root .ed-mobile .layer-row :is(.ic,.layer-pick) {min-height:44px;min-width:44px}
  body[data-studio-version="5"] #ed-root .ed-mobile .layer-row .nm {white-space:normal;font-size:14px;overflow-wrap:anywhere}
  body[data-studio-version="5"] #ed-root .ed-mobile .zoom-bar {position:sticky;bottom:0;left:0;transform:none;flex:none;margin:0 auto max(8px,env(safe-area-inset-bottom));max-width:calc(100% - 24px);gap:4px}
  body[data-studio-version="5"] #ed-root .ed-mobile .zoom-bar button {width:auto;min-width:44px;height:44px;min-height:44px;font-size:14px;padding:0 6px}
  body[data-studio-version="5"] #ed-root .ed-mobile>.stage-wrap {min-height:120px;display:flex;flex-direction:column}
  body[data-studio-version="5"] #ed-root .ed-mobile .stage-outer {flex:1;min-height:calc(100% - 64px);padding-bottom:8px}
  body[data-studio-version="5"] #ed-root .ed-mobile .stage {left:16px;top:16px}
  body[data-studio-version="5"] #ed-root .ed-mobile .stage-empty {inset:16px 20px 72px;padding-inline:24px;color:var(--v5-ink);font-size:16px;line-height:1.7}
  body[data-studio-version="5"] #ed-root .ed-mobile .handle-box {display:none} /* Position/size and layer buttons remain precise tap alternatives. */
  body[data-studio-version="5"] #ed-root .ed-mobile .ed-panel :is(button,summary,input,select) {scroll-margin-block:16px}
}
@media(max-width:480px) {
  body[data-studio-version="5"] .plans-search {grid-template-columns:minmax(0,1fr) auto}
  body[data-studio-version="5"] .plans-search input {grid-column:1/-1;margin-bottom:8px}
  body[data-studio-version="5"] .shell.nav-collapsed {grid-template-columns:60px minmax(0,1fr)}
  body[data-studio-version="5"] .shell {grid-template-columns:60px minmax(0,1fr)}
  body[data-studio-version="5"] .topbar {flex-wrap:wrap;min-height:92px;padding:10px 16px}
  body[data-studio-version="5"] .topbar .user-chip {margin-left:0;width:100%;max-width:100%;gap:8px;padding:0;background:transparent;border-radius:0}
  body[data-studio-version="5"] .topbar .u-role {color:#284F40}
  body[data-studio-version="5"] .user-chip .avatar {width:26px;height:26px;font-size:12px}
  body[data-studio-version="5"] .user-chip>div:last-child {display:flex;align-items:center;gap:8px;flex-wrap:wrap}
  body[data-studio-version="5"] .content {padding:16px}
  body[data-studio-version="5"] #ed-root .ed-mobile .ed-menu-section .btn {font-size:14px}
}
@media(max-width:900px) and (min-width:600px) and (max-height:500px) {
  body[data-studio-version="5"] #ed-root .ed-mobile .ed-toolbar {grid-template-columns:44px minmax(100px,1fr) repeat(3,auto)}
  body[data-studio-version="5"] #ed-root .ed-mobile .title-input {grid-column:2;width:100%;margin-left:0}
  body[data-studio-version="5"] #ed-root .ed-mobile #ed-save {grid-row:1;grid-column:3}
  body[data-studio-version="5"] #ed-root .ed-mobile #ed-png {grid-row:1;grid-column:4}
  body[data-studio-version="5"] #ed-root .ed-mobile #ed-more-actions {grid-row:1;grid-column:5}
  body[data-studio-version="5"] #ed-root .ed-mobile-feedback {grid-row:2}
}
@media(prefers-reduced-motion:reduce) {
  body[data-studio-version="5"] :is(.nav-item,.btn,.ed-item) {transition:none}
}
