/* Мобильный слой. Исходный app.css front остаётся единственным основным. */
[hidden] { display: none !important; }
.panel-access { max-width: 480px; margin: 12vh auto; padding: 24px; }
.panel-access h1 { font-size: 25px; margin-bottom: 16px; }
.panel-access p { margin-bottom: 18px; color: var(--muted); }
.panel-access form { display: grid; gap: 12px; }
.panel-access input { width: 100%; padding: 14px; font: 16px system-ui; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 10px; }
.panel-preview-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--card); font-size: 12px; }
.panel-preview-bar button { margin-left: auto; }
#panel-live { min-height: 100dvh; }
#panel-document { width: min(960px, 96vw); height: 90dvh; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); }
#panel-document::backdrop { background: #0009; }
#panel-document header { display: flex; align-items: center; gap: 12px; min-height: 44px; }
#panel-document header button { margin-left: auto; }
#panel-document iframe { width: 100%; height: calc(100% - 110px); border: 0; background: var(--bg); }
#panel-document-download { margin: 6px 0; }
#panel-document-error { font-size: 12px; }
#panel-workspace { width: min(800px, 96vw); max-height: 92dvh; overflow-y: auto; padding: 16px; background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; }
#panel-workspace::backdrop { background: #0009; }
#panel-workspace header, #panel-workspace nav { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
#panel-workspace header h2 { flex: 1; }
#panel-workspace header { position: sticky; top: -16px; z-index: 1; background: var(--card); padding: 10px 0; border-bottom: 1px solid var(--line); }
#work-body form { display: grid; gap: 12px; }
#work-body label { display: grid; gap: 6px; }
#work-body input, #work-body textarea, #work-body select { width: 100%; padding: 10px; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; font: 16px/1.4 system-ui; }
#work-body textarea { min-height: 100px; resize: vertical; }
.work-card { border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin: 12px 0; overflow-wrap: anywhere; }
.work-text { white-space: pre-wrap; font: inherit; margin: 10px 0; }
#work-status { white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 760px) {
  html, body { height: auto; min-height: 100dvh; overflow-x: hidden; }
  #panel-live .shell { display: block; min-height: auto; width: 100%; overflow: visible; }
  #panel-live .nav { display: grid; grid-template-columns: minmax(0, 1fr) auto; position: sticky; top: 0; z-index: 20; width: 100%; height: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 8px; background: var(--bg); overflow: visible; }
  .brand { padding: 3px 8px; margin: 0; display: flex; justify-content: space-between; }
  .brand-sub { font-size: 11px; }
  #panel-live .navlist { grid-column: 1 / -1; grid-row: 2; min-width: 0; width: 100%; display: flex; gap: 6px; overflow-x: auto; padding: 8px 0; scroll-snap-type: x proximity; }
  .navlink { flex: 0 0 auto; min-height: 44px; min-width: 90px; padding: 10px; scroll-snap-align: start; }
  .navlink .key { display: none; }
  #panel-live .nav-foot { grid-column: 2; grid-row: 1; display: flex; gap: 8px; margin: 0; padding: 0; }
  .nav-foot button { min-height: 36px; }
  .content { min-width: 0; width: 100%; padding: 16px 10px; }
  .view, .panel, .card, .docs, .doc-wrap { min-width: 0; max-width: 100%; }
  .panel-title { font-size: 23px; overflow-wrap: anywhere; }
  .panel-head, .panel-actions, .panel-meta { flex-wrap: wrap; }
  .panel-actions { gap: 8px; }
  .btn { min-height: 40px; }
  input, textarea, select { font-size: 16px !important; max-width: 100%; }
  .table-wrap, .scroll { overflow-x: auto; max-width: 100%; overscroll-behavior-x: contain; }
  .grid, .cards { grid-template-columns: repeat(auto-fit, minmax(min(270px, 100%), 1fr)); }
  .doc-frame { min-height: 65dvh; }
  .foot { position: static; flex-wrap: wrap; padding: 12px; font-size: 11px; }
  .foot .hint { display: none; }
  .panel-preview-bar { padding-top: max(10px, env(safe-area-inset-top)); }
  .content { padding-bottom: max(16px, env(safe-area-inset-bottom)); }
}
