body.document-studio { background: #10231d; }
body.document-studio>header{height:auto;flex-wrap:wrap}
.saved-template-chooser{display:flex;align-items:center;flex-wrap:wrap;gap:6px;width:100%;color:#f2f7f3;font-size:12px}
.saved-template-chooser select{min-width:0;max-width:100%;flex:1 1 240px;background:#203e32;color:#fff;border:1px solid #829b8c;min-height:40px}
.saved-template-chooser [role=status]{flex:1 1 200px;overflow-wrap:anywhere}
.saved-template-actions{display:flex;gap:6px;flex-wrap:wrap}
.saved-template-actions button{background:#203e32;color:#fff;border:1px solid #829b8c;padding:7px 10px;min-height:40px}
body.document-studio .app{height:calc(100dvh - var(--studio-header,110px))}
.studio-controls { display: flex; gap: 8px; align-items: center; }
.studio-controls button { min-height: 44px; }
.studio-selection-actions { display: none; }
#studioDismiss { display: none; }
body.document-studio #designerContext { max-height: calc(100dvh - 24px); overflow: auto; }
body.document-studio #designerContext button { min-height: 44px; }
.studio-field-picker { width: 100%; min-height: 44px; }
@media (max-width: 900px) {
  body.document-studio { overflow: hidden; color: #edf5ef; }
  body.document-studio > header { height: auto; min-height: 60px; padding: 8px; gap: 8px; flex-wrap: wrap; }
  body.document-studio header small { display: none; }
  body.document-studio header b { font-size: 16px; }
  body.document-studio header nav { flex-wrap: wrap; }
  body.document-studio .app { display: block; height: calc(100dvh - var(--studio-header, 110px)); }
  body.document-studio main { height: 100%; padding: 12px 8px 40px; overflow: auto; }
  body.document-studio .ruler { color: #bacfc4; font-size: 11px; }
  body.document-studio #pages { transform: none !important; width: 816px; zoom: var(--studio-scale, .4); }
  body.document-studio .page { margin-left: 0; color: #14221d; }
  body.document-studio .element { touch-action: pan-y; }
  body.document-studio .element.selected { touch-action: none; }
  body.document-studio .tools, body.document-studio .inspector { display: none; position: fixed; inset: auto 0 0; width: 100%; max-height: 65dvh; overflow: auto; z-index: 51; padding: 16px; border: 1px solid #617e70; border-radius: 16px 16px 0 0; background: #152e24; color: #edf5ef; }
  body.document-studio[data-studio-panel="tools"] .tools,
  body.document-studio[data-studio-panel="inspector"] .inspector { display: block; }
  body.document-studio[data-studio-panel] #studioDismiss { display: block; position: fixed; inset: 0; background: #0006; border: 0; z-index: 50; }
  body.document-studio aside button, body.document-studio aside input, body.document-studio aside textarea, body.document-studio aside select, body.document-studio .file { background: #203e32; color: #fff; border: 1px solid #6d897c; min-height: 44px; font-size: 16px; }
  body.document-studio .tokens button { font-size: 13px; }
  .studio-selection-actions:not([hidden]) { box-sizing:border-box;display:grid;grid-template-columns:1fr 1fr 1fr;gap:7px;position:fixed;left:8px;right:8px;bottom:8px;z-index:49;padding:9px;border:1px solid #829b8c;border-radius:14px;background:#152e24;color:#fff;box-shadow:0 6px 24px #0008; }
  .studio-selection-actions span { grid-column:1/-1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;font-weight:800; }
  .studio-selection-actions button { min-width:0;min-height:44px;padding:8px 6px;border:1px solid #829b8c;border-radius:9px;background:#203e32;color:#fff;font:800 13px/1.15 Arial,sans-serif; }
  .studio-selection-actions button[data-selection-action="delete"] { border-color:#ef9b9b;background:#5b2328; }
  .studio-selection-actions button:disabled { opacity:.5; }
}
@media print {
  .studio-controls, .studio-selection-actions, #studioDismiss, .studio-panel-close, #designerContext { display: none !important; }
  body.document-studio #pages { zoom: 1 !important; transform: none !important; }
}
