

html:not([data-device]) .only-touch,
html:not([data-device]) .label-short,
html:not([data-device]) .conn-line,
html:not([data-device="phone"]) .only-phone { display: none; }
[data-device="phone"] .not-phone,
[data-device] .not-touch { display: none; }

[data-device] body { -webkit-tap-highlight-color: transparent; }
[data-device] .shell { height: 100vh; height: 100dvh; }


[data-device] .sidebar { width: 96px; flex: 0 0 96px; transition: none; }
[data-device] .sidebar .sidebar-head,
[data-device] .sidebar .conn-box,
[data-device] .sidebar .sidebar-foot,
[data-device] .nav-group,
[data-device="phone"] .nav-item[data-nav-more] { display: none; }
[data-device="tablet"] .nav-item[data-page="more"] { display: none; }

[data-device="phone"] .nav-parent { display: none; }
[data-device="phone"] .nav-sub:not([hidden]),
[data-device="phone"] .nav-sub.is-closed:not([hidden]) { display: contents; }
[data-device="tablet"] .nav-parent .nav-caret { display: none; }
[data-device="tablet"] .nav-sub,
[data-device="tablet"] .nav-sub.is-closed { display: none; margin: 0; padding: 0; border: 0; }
[data-device="tablet"] .nav.is-sub > .nav-item:not(.nav-back) { display: none; }
[data-device="tablet"] .nav.is-sub > .nav-back { display: flex; }
[data-device="tablet"] .nav.is-sub > .nav-sub:not([hidden]) { display: contents; }
[data-device="tablet"] .nav-back { margin-bottom: 10px; }
[data-device="tablet"] .nav.is-sub .nav-item { animation: rail-in-right 0.16s ease-out; }
[data-device="tablet"] .nav.was-sub:not(.is-sub) > .nav-item { animation: rail-in-left 0.16s ease-out; }
@keyframes rail-in-right { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes rail-in-left { from { transform: translateX(-24px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  [data-device="tablet"] .nav .nav-item { animation: none !important; }
}
[data-device] .nav-sub .nav-item { width: 76px; padding: 6px 2px; font-size: var(--text-2xs); color: var(--nav-item-fg); }
[data-device] .nav-sub .nav-item svg { width: 22px; height: 22px; flex: none; opacity: 1; }
[data-device="tablet"] .nav { overflow-y: auto; scrollbar-width: none; }
[data-device="tablet"] .nav::-webkit-scrollbar { display: none; }

[data-device] .nav {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 8px 10px;
}
[data-device] .nav-item {
  position: relative; flex: none;
  flex-direction: column; justify-content: center; gap: 5px;
  width: 76px; min-height: var(--touch-h); margin: 0; padding: 6px 2px;
  font-size: var(--text-2xs); line-height: 1.2; text-align: center;
}
[data-device] .nav-item svg { width: 22px; height: 22px; flex: none; }
[data-device] .nav-item .label {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}
[data-device] .nav-item .label-short { display: block; }

[data-device="tablet"] .sidebar .sidebar-foot.rail-foot {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 10px 6px 12px; text-align: center;
}
[data-device="tablet"] .rail-foot .ver-row { flex-direction: column; align-items: center; gap: 4px; }
[data-device="tablet"] .rail-foot .ver { font-size: 9px; line-height: 1.3; white-space: pre-line; }
[data-device="tablet"] .rail-foot .date { font-size: 8px; line-height: 1.3; }
[data-device="tablet"] .rail-foot .legal { font-size: 7px; line-height: 1.3; }
[data-device] .nav-item .pill-count {
  position: absolute; top: 2px; left: calc(50% + 6px);
  padding: 0 6px; line-height: 17px; font-family: var(--font-mono); font-size: 10px;
}

@media (orientation: portrait) {
  [data-device="phone"] .shell { flex-direction: column; }
  [data-device="phone"] .sidebar { order: 2; width: auto; flex: none; }
  [data-device="phone"] .main { order: 1; flex: 1; min-height: 0; }
  [data-device="phone"] .nav {
    flex: none; flex-direction: row; align-items: stretch; gap: 4px; overflow: visible;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
  }
  [data-device="phone"] .nav-item { flex: 1 1 auto; width: auto; min-width: 0; }
}


[data-device] .topbar {
  min-height: var(--touch-h); padding: 6px 8px 6px 16px; gap: var(--touch-gap);
}
[data-device] .topbar h1 {
  font-size: var(--text-base);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
[data-device] .topbar .sub { display: none; }
[data-device] .topbar-title {
  flex: 1; min-width: 0; min-height: var(--touch-h-sm);
  display: flex; flex-direction: column; justify-content: center; gap: 2px;
  cursor: pointer;
}
[data-device] .topbar-tools { gap: var(--touch-gap); flex: none; }

.conn-line {
  display: inline-flex; align-items: center; gap: 6px; max-width: 100%; min-width: 0;
  font-size: var(--text-xs); color: var(--text-muted); white-space: nowrap;
}
.conn-line .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); flex: none; }
.conn-line .conn-line-text { overflow: hidden; text-overflow: ellipsis; }
.conn-line.is-off { color: var(--warning); }
.conn-line.is-off .dot { background: var(--warning); }

[data-device="tablet"] .topbar-title {
  flex-direction: row; align-items: center; justify-content: flex-start; gap: 14px;
}
[data-device="tablet"] .conn-line {
  height: 32px; padding: 0 12px; border-radius: var(--radius-pill);
  background: var(--success-soft); color: var(--success); font-weight: var(--fw-semibold);
}
[data-device="tablet"] .conn-line .dot { background: currentColor; }
[data-device="tablet"] .conn-line.is-off { background: var(--warning-soft); color: var(--warning); }
@media (orientation: landscape) {
  [data-device="phone"] .topbar { min-height: 52px; padding: 4px 12px 4px 18px; }
  [data-device="phone"] .topbar-title {
    flex-direction: row; align-items: center; justify-content: flex-start; gap: 14px;
  }
  [data-device="phone"] .conn-line {
    height: 32px; padding: 0 12px; border-radius: var(--radius-pill);
    background: var(--success-soft); color: var(--success); font-weight: var(--fw-semibold);
  }
  [data-device="phone"] .conn-line .dot { background: currentColor; }
  [data-device="phone"] .conn-line.is-off { background: var(--warning-soft); color: var(--warning); }
}


[data-device] .btn { height: var(--touch-h-sm); padding: 0 16px; gap: 8px; font-size: var(--text-sm); }
[data-device] .btn svg { width: 20px; height: 20px; }
[data-device] .btn.is-busy::before { width: 16px; height: 16px; }
[data-device] .btn-split > .btn-split-toggle { width: var(--touch-h-sm); padding: 0; }
[data-device] .btn-split > .btn-split-toggle svg { width: 20px; height: 20px; }

[data-device] .icon-btn { width: var(--touch-h-sm); height: var(--touch-h-sm); flex: none; }
[data-device] .user-btn { height: var(--touch-h-sm); }
[data-device] .lang-btn { height: var(--touch-h-sm); padding: 0 10px; gap: 6px; }
[data-device] .lang-btn .flag { width: 24px; height: 17px; }
[data-device] .lang-btn .lang-caret { width: 18px; height: 18px; }
[data-device] .user-pop-item { min-height: var(--touch-h-sm); }
[data-device="phone"] .user-name { display: none; }
[data-device] .icon-btn svg,
[data-device] .row-actions .icon-btn svg { width: 22px; height: 22px; }
[data-device] .row-actions { gap: var(--touch-gap); }

[data-device] .input { height: var(--touch-h); padding: 0 14px; font-size: var(--text-sm); }
[data-device] .search { max-width: none; }
[data-device] .search .input { height: var(--touch-h-sm); padding-left: 42px; }
[data-device] .search svg { left: 12px; width: 20px; height: 20px; }

[data-device] .bs-trigger { height: var(--touch-h); padding: 0 14px; font-size: var(--text-sm); }
[data-device] .bs-menu { font-size: var(--text-sm); }
[data-device] .bs-opt { min-height: var(--touch-h-sm); padding: 0 16px; }
[data-device] .bs-opt.is-off { min-height: 0; padding: 12px 16px 6px; }

[data-device] .seg { height: var(--touch-h-sm); }
[data-device] .seg button { padding: 0 16px; font-size: var(--text-sm); }
[data-device] .page-tab { padding: 0 16px; height: var(--touch-h-sm); }

[data-device] .switch { width: 48px; height: 28px; }
[data-device] .switch::after { width: 22px; height: 22px; }
[data-device] .switch[aria-checked="true"]::after { left: 23px; }
[data-device] .switch::before { content: ""; position: absolute; inset: -14px -4px; }

[data-device] .chk { width: 24px; height: 24px; border-width: 2px; }
[data-device] .chk svg { width: 16px; height: 16px; }
[data-device] .chk[aria-checked="mixed"]::after { width: 12px; height: 2px; }


[data-device] .hint,
[data-device] .kpi .k-note,
[data-device] .err-text { font-size: var(--text-xs); }
[data-device] .badge { padding: 4px 10px; gap: 6px; font-size: var(--text-xs); }
[data-device] .badge .dot { width: 6px; height: 6px; }
[data-device] .badge svg { width: 14px; height: 14px; }
[data-device] tbody td { font-size: var(--text-sm); }
[data-device] .c-id,
[data-device] .c-num { font-size: var(--text-xs); }
[data-device] .modal-head,
[data-device] .drawer-head { min-height: var(--touch-h); font-size: var(--text-base); }
[data-device] .modal-body,
[data-device] .drawer-body { font-size: var(--text-sm); }
[data-device] .modal-foot,
[data-device] .drawer-foot { gap: var(--touch-gap); }
[data-device] .set-key { font-size: var(--text-sm); }
[data-device] .set-row { height: auto; min-height: var(--touch-h); }
[data-device] .set-row .input,
[data-device] .set-row .bs-trigger { height: var(--touch-h-sm); }
[data-device] .rowline:has(> .btn) .input,
[data-device] .rowline:has(> .btn) .bs-trigger { height: var(--touch-h-sm); }
[data-device="tablet"] .input,
[data-device="tablet"] .bs-trigger { height: var(--touch-h-sm); }


[data-device] .content { padding: 16px; }
[data-device] .card { min-width: 0; }
[data-device] .page { flex: 1 0 auto; min-height: 0; }
[data-device="phone"] .card-head { flex-wrap: wrap; row-gap: 8px; }
[data-device="phone"] .card-title { flex: 1 0 auto; }
[data-device="phone"] .card-head.split-actions { row-gap: 0; }
[data-device="phone"] .card-head.split-actions > .card-title { flex: 0 0 auto; }
[data-device="phone"] .card-head.split-actions > .hint { flex: 1 1 0; min-width: 0; text-align: right; }
[data-device="phone"] .card-head.split-actions::after { content: ""; flex-basis: 100%; order: 1; }
[data-device="phone"] .card-head.split-actions > .btn {
  order: 2; flex: 1 1 calc(50% - 5px); min-width: 0; margin-top: 8px; justify-content: center;
}
@media (orientation: portrait) {
  [data-device="phone"] .grid-2,
  [data-device="phone"] .grid-3 { grid-template-columns: 1fr; }
  [data-device="phone"] .grid-4 { grid-template-columns: 1fr 1fr; }
}
@media (orientation: landscape) {
  [data-device="phone"] .grid-3 { grid-template-columns: 1fr 1fr; }
}
[data-device="tablet"] .lane-scale,
[data-device="tablet"] .lane { grid-template-columns: 170px minmax(0, 1fr) 200px; }

[data-device] .rowline { flex-wrap: wrap; }
[data-device] .rowline > .hint { white-space: normal !important; }

[data-device="phone"] .set-row { flex-wrap: wrap; gap: 8px 12px; padding: 8px 0; }
[data-device="phone"] .set-row > .set-key { flex: 1 1 0; min-width: 0; }
[data-device="phone"] .set-row > .seg button { flex: 1; }
[data-device="phone"] .set-row > .input,
[data-device="phone"] .set-row > .bs-trigger,
[data-device="phone"] .set-row > div:not(.set-key) { width: 100% !important; }

[data-device] .list-rows { display: flex; flex-direction: column; }
[data-device] .list-row {
  display: flex; align-items: stretch;
  border-bottom: 1px solid var(--border-subtle); background: var(--surface-card);
  content-visibility: auto; contain-intrinsic-size: auto 76px;
}
[data-device] .list-row:last-child { border-bottom: 0; }
[data-device] .lr-main {
  flex: 1; min-width: 0; min-height: var(--touch-h-sm);
  display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px;
  text-align: left;
}
[data-device] .lr-main[data-row-open],
[data-device] .lr-main[data-row-pick] { cursor: pointer; }
[data-device] .lr-main[data-row-open]:active,
[data-device] .lr-main[data-row-pick]:active { background: var(--surface-sunken); }
[data-device] .lr-ctl { flex: none; display: flex; align-items: center; gap: 4px; padding: 0 12px 0 0; }
[data-device] .list-row.is-off .lr-main { opacity: 0.6; }
[data-device] .lr-lead {
  width: 40px; height: 40px; flex: none; border-radius: var(--radius-sm);
  display: grid; place-items: center;
  background: var(--surface-sunken); color: var(--text-muted);
  font-family: var(--font-mono); font-size: var(--text-sm); font-weight: var(--fw-semibold);
}
[data-device] .lr-lead svg { width: 22px; height: 22px; }
[data-device] .lr-lead.is-brand  { background: var(--surface-brand-soft); color: var(--text-brand); }
[data-device] .lr-lead.m-wasser  { background: var(--obis-wasser-soft);  color: var(--obis-wasser); }
[data-device] .lr-lead.m-waerme  { background: var(--obis-waerme-soft);  color: var(--obis-waerme); }
[data-device] .lr-lead.m-strom   { background: var(--obis-strom-soft);   color: var(--obis-strom); }
[data-device] .lr-lead.m-gas     { background: var(--obis-gas-soft);     color: var(--obis-gas); }
[data-device] .lr-lead.m-other   { background: var(--obis-universal-soft); color: var(--obis-universal); }
[data-device] .lr-lead.is-pick { background: none; }
[data-device] .lr-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
[data-device] .lr-title,
[data-device] .lr-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
[data-device] .lr-title {
  font-size: var(--text-sm); font-weight: var(--fw-semibold); color: var(--text-strong);
}
[data-device] .lr-sub { font-size: var(--text-xs); color: var(--text-muted); }
[data-device] .lr-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 3px;
  font-size: var(--text-xs); color: var(--text-muted);
}
[data-device] .lr-mono { font-family: var(--font-mono); }
[data-device] .lr-title.lr-mono { font-weight: var(--fw-medium); }
[data-device] .lr-side { flex: none; align-self: center; display: flex; align-items: center; gap: 8px; }
[data-device] .lr-chev { flex: none; align-self: center; width: 20px; height: 20px; color: var(--text-subtle); }
[data-device] .list-rows .state-empty { padding: 32px 16px; }

[data-device] .lr-table .lr-title { white-space: normal; overflow-wrap: anywhere; }
[data-device] .lr-fields {
  display: grid; grid-template-columns: auto minmax(0, 1fr);
  gap: 5px 12px; align-items: baseline; margin-top: 6px;
}
[data-device="tablet"] .lr-fields {
  grid-template-columns: max-content minmax(0, 220px) max-content minmax(0, 1fr);
}
[data-device="tablet"] .lr-fields > .lr-k:nth-child(4n+3) { padding-left: 16px; }
[data-device] .lr-k {
  font-size: var(--text-2xs); font-weight: var(--fw-semibold); color: var(--text-subtle);
  text-transform: uppercase; letter-spacing: 0.04em; white-space: nowrap;
}
[data-device] .lr-v {
  min-width: 0; font-size: var(--text-xs); color: var(--text-body); overflow-wrap: anywhere;
}
[data-device] .lr-v.hint { color: var(--text-body); font-size: var(--text-xs); }
[data-device] .lr-v.c-id { font-family: var(--font-mono); }
[data-device] .lr-table .lr-ctl { gap: var(--touch-gap); padding: 12px 12px 12px 0; align-items: center; }
[data-device] .lr-table .lr-ctl .row-actions { gap: var(--touch-gap); }
[data-device="phone"] .list-row.lr-table { flex-wrap: wrap; }
[data-device="phone"] .lr-table .lr-ctl {
  width: 100%; justify-content: flex-end; flex-wrap: wrap; padding: 0 14px 12px;
}

[data-device] .list-tools {
  display: flex; flex-wrap: wrap; gap: var(--touch-gap); padding: 10px 14px;
  border-bottom: 1px solid var(--border-subtle);
}
[data-device] .list-tools .btn { flex: 1 1 0; justify-content: center; min-width: 0; }


[data-device] .overlay.is-sheet { align-items: flex-end; justify-content: stretch; padding: 0; }
[data-device] .sheet {
  width: 100%; max-height: calc(100% - 40px);
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface-card); border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: var(--shadow-lg);
  animation: sheet-up var(--duration-base) var(--ease-standard) both;
}
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes sheet-left { from { transform: translateX(100%); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { [data-device] .sheet { animation: none; } }
[data-device] .sheet-grab {
  flex: none; width: 36px; height: 4px; margin: 8px auto 0;
  border-radius: var(--radius-pill); background: var(--border-default);
}
[data-device] .sheet-head {
  flex: none; display: flex; align-items: center; gap: 8px;
  padding: 4px 6px 8px 16px; border-bottom: 1px solid var(--border-subtle);
}
[data-device] .sheet-titles { flex: 1; min-width: 0; }
[data-device] .sheet-title {
  font-family: var(--font-display); font-size: var(--text-base); font-weight: var(--fw-semibold);
  color: var(--text-strong); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
[data-device] .sheet-sub {
  margin-top: 2px; font-size: var(--text-xs); color: var(--text-muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
[data-device] .sheet-body {
  flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 14px;
}
@media (orientation: landscape) {
  [data-device="phone"] .overlay.is-sheet { align-items: stretch; justify-content: flex-end; }
  [data-device="phone"] .sheet {
    width: min(440px, 60%); max-height: none; height: 100%;
    border-radius: var(--radius-lg) 0 0 var(--radius-lg); animation-name: sheet-left;
  }
  [data-device="phone"] .sheet-grab { display: none; }
  [data-device="phone"] .sheet-head { padding-top: 8px; }
}
[data-device="tablet"] .overlay.is-sheet { align-items: center; justify-content: center; padding: 20px; }
[data-device="tablet"] .sheet { max-width: 560px; max-height: 100%; border-radius: var(--radius-lg); animation: none; }
[data-device="tablet"] .sheet-grab { display: none; }
[data-device="tablet"] .sheet-head { padding-top: 8px; }

[data-device] .facts { display: flex; flex-direction: column; }
[data-device] .fact { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border-subtle); }
[data-device] .fact:first-child { padding-top: 0; }
[data-device] .fact:last-child { border-bottom: 0; padding-bottom: 0; }
[data-device] .fact-k { width: 38%; flex: none; padding-top: 2px; font-size: var(--text-xs); color: var(--text-muted); }
[data-device] .fact-v {
  flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  font-size: var(--text-sm); color: var(--text-body); overflow-wrap: anywhere;
}
[data-device] .fact-v small { font-size: var(--text-xs); color: var(--text-muted); line-height: 1.5; }
[data-device] .fact-v .switch { margin: 2px 0; }

[data-device] .sheet-acts {
  display: flex; flex-direction: column; margin: 0 -16px -16px;
  border-top: 1px solid var(--border-subtle);
}
[data-device] .sheet-act {
  display: flex; align-items: center; gap: 14px; width: 100%;
  min-height: var(--touch-h); padding: 8px 16px;
  border: 0; border-bottom: 1px solid var(--border-subtle); background: none; text-align: left;
  font-size: var(--text-sm); font-weight: var(--fw-medium); color: var(--text-body);
}
[data-device] .sheet-act:last-child { border-bottom: 0; }
[data-device] .sheet-act:active:not(:disabled) { background: var(--surface-sunken); }
[data-device] .sheet-act:disabled { opacity: 0.5; cursor: not-allowed; }
[data-device] .sheet-act > span:not(.ai) { flex: 1; min-width: 0; }
[data-device] .sheet-act small {
  display: block; margin-top: 2px; font-size: var(--text-xs); color: var(--text-muted);
  font-weight: var(--fw-regular); line-height: 1.45;
}
[data-device] .sheet-act .ai {
  width: 40px; height: 40px; flex: none; display: grid; place-items: center;
  border-radius: var(--radius-sm); background: var(--surface-sunken); color: var(--text-muted);
}
[data-device] .sheet-act .ai svg { width: 22px; height: 22px; }
[data-device] .sheet-act .ai.is-brand { background: var(--surface-brand-soft); color: var(--text-brand); }
[data-device] .sheet-act .ai.is-ok    { background: var(--success-soft); color: var(--success); }
[data-device] .sheet-act .ai.is-warn  { background: var(--warning-soft); color: var(--warning); }
[data-device] .sheet-act .ai.is-dgr   { background: var(--danger-soft); color: var(--danger); }
[data-device] .sheet-act.is-dgr { color: var(--danger); }
[data-device] .sheet-gap { height: 10px; background: var(--surface-page); border-bottom: 1px solid var(--border-subtle); }
[data-device] .sheet-opt {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: var(--touch-h-sm);
  padding: 0 16px; border: 0; border-bottom: 1px solid var(--border-subtle); background: none;
  text-align: left; font-size: var(--text-sm); color: var(--text-body);
}
[data-device] .sheet-opt:last-child { border-bottom: 0; }
[data-device] .sheet-opt > span { flex: 1; }
[data-device] .sheet-opt svg { width: 18px; height: 18px; }
[data-device] .sheet-opt.is-sel {
  background: var(--surface-brand-soft); color: var(--text-brand); font-weight: var(--fw-semibold);
}
[data-device] .sheet-opts { display: flex; flex-direction: column; margin: 0 -16px; border-top: 1px solid var(--border-subtle); border-bottom: 1px solid var(--border-subtle); }
[data-device] .bs-sheet .sheet-body { padding: 0; gap: 0; }
[data-device] .bs-sheet .sheet-opts { margin: 0; border: 0; }
[data-device] .sheet-opt-sep {
  padding: 14px 16px 6px; border-bottom: 1px solid var(--border-subtle);
  background: var(--surface-page); font-size: var(--text-xs); font-weight: var(--fw-semibold);
  color: var(--text-muted);
}
[data-device] .sheet-find { flex: none; padding: 10px 16px; border-bottom: 1px solid var(--border-subtle); }
[data-device] .sheet-find .input { width: 100%; }

[data-device] .table-wrap { overflow-x: auto; }

[data-device="phone"] .overlay { padding: 12px; }

[data-device="phone"] .overlay.ov-dialog { padding: 16px; }
[data-device="phone"] .ov-dialog .modal { max-width: 340px; }
@media (orientation: landscape) {
  [data-device="phone"] .ov-dialog .modal { max-width: 440px; }
}

[data-device="phone"] .overlay.ov-sheet { align-items: flex-end; justify-content: stretch; padding: 0; }
[data-device="phone"] .ov-sheet .modal {
  width: 100%; max-width: none !important; max-height: calc(100% - 40px);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  animation: sheet-up var(--duration-base) var(--ease-standard) both;
}
[data-device="phone"] .ov-sheet .modal::before {
  content: ""; display: block; flex: none; width: 36px; height: 4px; margin: 8px auto 0;
  border-radius: var(--radius-pill); background: var(--border-default);
}
@media (orientation: landscape) {
  [data-device="phone"] .overlay.ov-sheet { align-items: stretch; justify-content: flex-end; }
  [data-device="phone"] .ov-sheet .modal {
    width: min(440px, 60%); height: 100%; max-height: none;
    border-radius: var(--radius-lg) 0 0 var(--radius-lg); animation-name: sheet-left;
  }
  [data-device="phone"] .ov-sheet .modal::before { display: none; }
}

[data-device="phone"] .overlay.ov-full { padding: 0; align-items: stretch; justify-content: stretch; }
[data-device="phone"] .ov-full .modal,
[data-device="phone"] .ov-full .drawer {
  width: 100%; max-width: none !important; height: 100%; max-height: none !important;
  border: 0; border-radius: 0; box-shadow: none; animation: none;
}
[data-device="phone"] .ov-full .modal-body,
[data-device="phone"] .ov-full .drawer-body { flex: 1; }
[data-device="phone"] .ov-full .modal-head,
[data-device="phone"] .ov-full .drawer-head { padding-left: 4px; }
[data-device="phone"] .ov-full .modal-head:not(:has(.full-back)),
[data-device="phone"] .ov-full .drawer-head:not(:has(.full-back)) { padding-left: 16px; }
@media (orientation: landscape) {
  [data-device="phone"] .ov-full .modal,
  [data-device="phone"] .ov-full .drawer { position: relative; }
  [data-device="phone"] .ov-full .modal-foot,
  [data-device="phone"] .ov-full .drawer-foot {
    position: absolute; top: 0; right: 0; min-height: var(--touch-h);
    padding: 6px 12px; background: none; border: 0; flex-wrap: nowrap;
  }
  [data-device="phone"] .ov-full .modal-foot > :not(.btn-primary),
  [data-device="phone"] .ov-full .drawer-foot > :not(.btn-primary) { display: none; }
  [data-device="phone"] .ov-full .modal-foot > .btn-primary,
  [data-device="phone"] .ov-full .drawer-foot > .btn-primary { flex: none; }
  [data-device="phone"] .ov-full .modal-head:has(~ .modal-foot .btn-primary),
  [data-device="phone"] .ov-full .drawer-head:has(~ .drawer-foot .btn-primary) { padding-right: 180px; }
}

[data-device="phone"] .overlay .modal-foot,
[data-device="phone"] .overlay .drawer-foot { flex-wrap: wrap; }
[data-device="phone"] .overlay .modal-foot > .btn,
[data-device="phone"] .overlay .drawer-foot > .btn { flex: 1 1 0; justify-content: center; min-width: 0; }
[data-device="phone"] .overlay .modal-foot > .hint,
[data-device="phone"] .overlay .drawer-foot > .hint { flex: 1 0 100%; }
[data-device="phone"] .overlay .modal-foot > .hint:empty,
[data-device="phone"] .overlay .drawer-foot > .hint:empty,
[data-device="phone"] .overlay .modal-foot > div:empty { display: none; }

[data-device] .dropzone {
  display: grid; grid-template-columns: auto 1fr; column-gap: 14px; align-items: center;
  min-height: 76px; padding: 14px 16px; text-align: left; border-radius: var(--radius-lg);
}
[data-device] .dropzone .dz-ic { grid-row: span 2; width: 26px; height: 26px; margin: 0; }
[data-device] .dropzone .dz-t { font-size: var(--text-sm); }
[data-device] .dropzone .dz-h { font-size: var(--text-xs); }

[data-device] .hb-fuss-hinweis { display: none; }
[data-device="phone"] #ov-handbuch { padding: 0; }
[data-device="phone"] .hb-modal { max-width: none; max-height: none; }

[data-device] .collapse-btn { display: none; }

[data-device="phone"] .log-tools { margin-left: 0; width: 100%; }
[data-device="phone"] .log-tools .log-search { max-width: none; flex: 1 1 100%; }
[data-device="phone"] .log-tools .bs-trigger { flex: 1 1 40%; width: auto !important; min-width: 0; }
[data-device="phone"] .message-row { grid-template-columns: var(--message-time-width, 8ch) 5ch minmax(0, 1fr); }
[data-device="phone"] .message-row .message-source { display: none; }
[data-device] .btn.btn-square { width: var(--touch-h-sm); }
