/* MALGOris VideoStudio – iPhone/Android mobile layout, 2026-10-29.
   Isolated additive override: desktop and export logic unchanged. */
@media (max-width: 600px) {
  .projectbar {display:flex; flex-direction:column; align-items:stretch; gap:12px}
  .projectbar h1 {max-width:none; font-size:22px; line-height:1.22}
  .project-actions {display:flex; width:100%; gap:8px; flex-wrap:wrap}
  .project-actions .button {min-height:44px; font-size:13px}
  .editor {display:grid; grid-template-columns:minmax(0,1fr)}
  .preview-panel {grid-column:1; grid-row:1}
  .media-panel.panel {grid-column:1;grid-row:2;display:flex;flex-direction:column;gap:12px;min-width:0;padding:16px}
  .media-panel>.panel-heading {display:flex; margin:0}
  .media-panel .panel-heading h2, .library-section .panel-heading h2 {font-size:16px}
  .media-panel .counter {font-size:11px}
  .mode-switch {margin:0; width:100%; max-width:none}
  .mode-switch button {font-size:13px; min-height:44px; padding:10px}
  .dropzone {grid-column:auto;grid-row:auto;width:100%; min-height:148px; padding:18px 14px; border-radius:10px}
  .dropzone strong {font-size:14px}
  .dropzone>span:not(.upload-icon) {font-size:13px}
  .dropzone small {font-size:12px;line-height:1.5}
  .upload-icon {width:36px; height:36px}
  .source-entry, .ki-entry, .media-feedback, .media-list, .library-section, .privacy-note {grid-column:auto; grid-row:auto; min-width:0; width:100%}
  .source-entry .button, .ki-entry .button {min-height:44px;font-size:13px;max-width:100%;white-space:normal}
  .source-entry p, .ki-entry p, .media-feedback {font-size:12px;line-height:1.55;overflow-wrap:anywhere}
  .media-list {max-height:210px;margin:0}
  .media-item {padding:9px;gap:10px}
  .media-item img, .media-item .media-thumb {width:52px;height:42px}
  .media-item strong {font-size:12px;max-width:calc(100vw - 120px)}
  .media-item small {font-size:11px}
  .library-section {margin:0;padding:15px;background:#202635;border:1px solid #353f52;border-radius:11px}
  .library-section .panel-heading {display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}
  .library-section .button {min-height:44px;font-size:13px;padding:10px 12px;white-space:normal}
  .library-section .small, .library-section .palette-row label {font-size:12px;line-height:1.55}
  .library-section .palette-row {margin-top:14px}
  .library-section .palette-row select {width:100%;min-height:44px;padding:10px;font-size:14px}
  .privacy-note {margin:0;padding-top:3px;font-size:11px;line-height:1.55}
  .preview-caption {font-size:11px}
  .empty-preview p {font-size:12px;line-height:1.55}
  .empty-preview .button {font-size:13px;min-height:44px}
  .timeline-panel {grid-column:1;grid-row:3;min-width:0}
  .timeline-toolbar {gap:10px}
  .timeline-toolbar>div:first-child {flex-wrap:wrap}
  .timeline-tools {width:100%;justify-content:flex-start;margin-left:0}
  .timeline-scroll {max-width:100%;overflow-x:auto;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}
  .timeline-grid {min-width:560px}
  .timeline-help, .timeline-footer {font-size:11px;line-height:1.5}
  .timeline-help {padding:10px 12px}
  .inspector.panel {grid-column:1;grid-row:4;display:flex;flex-direction:column;gap:10px;min-width:0;padding:16px}
  .inspector>.panel-heading {margin:0}
  .inspector label {font-size:12px}
  .inspector select {font-size:14px;min-height:44px;width:100%}
  .inspector .aspect-options {width:100%;max-width:none}
  .inspector-selection {border-left:0;border-top:1px solid #353f52;padding:14px 0 0;margin:4px 0 0}
  .inspector-placeholder {font-size:12px}
  .inspector-foot {font-size:11px;line-height:1.5}
  .editor-message {font-size:12px}
}
@media (max-width: 360px) {
  .projectbar h1 {font-size:20px}
  .topbar {padding-inline:10px}
  .studio-name {font-size:11px}
  main {padding-inline:10px}
  .timeline-grid {min-width:540px}
}
