
/* u-werte-mobile.css — Schicht-Editor & Rechner für Touch (≤900px) */

@media (max-width: 900px) {

  .uw-workbench {
    overflow: visible !important;
    border-radius: 12px;
  }

  .uw-toolbar {
    padding: 10px 12px;
  }
  .uw-toolbar__title { font-size: .92rem; }
  .uw-toolbar__status {
    width: 100%;
    justify-content: center;
    font-size: .78rem;
  }

  .uw-config-bar {
    padding: 10px 12px;
  }

  .card.tool,
  .uw-workbench.card.tool {
    padding: 0 !important;
    overflow: visible !important;
  }

  .tool {
    overflow: visible !important;
    gap: 0;
  }

  #orientation,
  .uw-select {
    width: 100%;
    min-height: 48px;
    font-size: 16px;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid color-mix(in srgb, var(--fg) 18%, transparent);
    background: var(--bg);
    color: var(--fg);
    box-sizing: border-box;
  }

  .layer-list-head { display: none !important; }

  .layer-list {
    gap: 12px;
    padding: 10px 12px;
  }

  /* ── Schicht-Karte (Mobile) ── */
  .uw-workbench .layer-card {
    display: block;
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    border: 1px solid color-mix(in srgb, var(--fg) 14%, transparent);
    background: var(--bg) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .05);
    box-sizing: border-box;
  }

  .layer-card__head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
  }

  .layer-swatch {
    width: 14px;
    height: 14px;
    border-radius: 4px;
    background: var(--layer-color, #ccc);
    flex-shrink: 0;
  }

  .uw-workbench .layer-card__idx {
    display: block !important;
    flex: 1;
    font-weight: 700;
    font-size: .92rem;
    color: var(--brand-600);
  }
  .uw-workbench .layer-card__idx::before {
    content: 'Schicht ';
  }

  .layer-del {
    min-height: 44px !important;
    min-width: 44px !important;
    width: auto !important;
    height: auto !important;
    padding: 0 14px !important;
    font-size: .85rem !important;
    border-radius: 10px !important;
    background: color-mix(in srgb, #b00020 8%, var(--bg)) !important;
    border: 1px solid color-mix(in srgb, #b00020 25%, transparent) !important;
    color: #b00020 !important;
    flex-shrink: 0;
  }

  .layer-card__body {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .layer-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    width: 100%;
  }

  .layer-label {
    display: block !important;
    font-size: .78rem;
    font-weight: 700;
    color: var(--muted);
    letter-spacing: .02em;
    text-transform: uppercase;
  }

  .layer-card select,
  .layer-card input {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    min-height: 48px;
    padding: 12px 14px !important;
    font-size: 16px !important;
    line-height: 1.3;
    border-radius: 10px;
    border: 1px solid color-mix(in srgb, var(--fg) 20%, transparent);
    background: var(--bg);
    color: var(--fg);
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
  }

  .layer-card input.layer-d,
  .layer-card input.layer-lam {
    text-align: left;
    font-variant-numeric: tabular-nums;
  }

  .layer-fields-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .uw-panel__foot.tool-actions,
  .tool-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .tool-actions .toggle,
  .tool-actions .uw-btn,
  .uw-btn {
    width: 100%;
    min-height: 48px;
    margin-left: 0 !important;
    text-align: center;
    justify-content: center;
    box-sizing: border-box;
    font-size: .9rem !important;
  }

  .uw-readout__value {
    font-size: 2.5rem;
  }

  .heat-bar-row {
    flex-wrap: wrap !important;
    gap: 6px !important;
  }

  .heat-bar-label {
    min-width: 0 !important;
    max-width: none !important;
    flex: 1 1 100%;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: unset !important;
  }

  .heat-bar-track {
    flex: 1 1 100%;
    min-width: 0 !important;
  }

  .heat-bar-pct {
    flex: 0 0 auto;
    min-width: 48px !important;
    width: auto !important;
  }

  .kpi { grid-template-columns: 1fr !important; }
}

@media (max-width: 420px) {
  .layer-fields-split {
    grid-template-columns: 1fr;
  }
}
