/* Touch phones (up to 760 px) and the iPhone app's frame (html.ios-app, phone.js), 09.11.2026.
   Desktop and narrow desktop windows stay as they were. */
.phone-more,
.phone-menu {
  display: none;
}

@media (max-width: 760px) and (pointer: coarse) {
  /* No floating buttons over the page: „Rückmeldung geben“ and „Frage stellen“ are in „Mehr“. In full-screen
     dialogs the feedback icon stays, there feedback.css keeps the left end of the button row free. */
  body > .feedback-launcher,
  body > .questions-launcher,
  .tour-window > .feedback-launcher,
  .tour-window > .questions-launcher {
    display: none !important;
  }
  body.feedback-ready .workspace-shell .main {
    padding-bottom: 24px;
  }

  /* Handbuch, App kennenlernen and Abmelden move into „Mehr“; the row keeps Felix, year and the account. */
  .workspace-shell .tools [data-page="manual"],
  .workspace-shell .tools [data-tour-open],
  .workspace-shell .tools .cloud-logout {
    display: none;
  }
  .workspace-shell .tools {
    position: relative;
  }
  .workspace-shell .tools .avatar {
    width: 44px;
    min-width: 44px;
    height: 44px;
  }
  .phone-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid #cbd8e1;
    border-radius: var(--radius-small, 6px);
    background: #fff;
    color: #263e52;
  }
  .phone-more[aria-expanded="true"] {
    background: #edf3f7;
  }
  .phone-more svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
  }
  .phone-more span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .phone-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 75;
    display: flex;
    flex-direction: column;
    min-width: 240px;
    padding: 6px;
    border: 1px solid #cbd8e1;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 12px 36px rgb(32 63 88 / 18%);
  }
  .phone-menu button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 44px;
    padding: 10px 14px;
    border: 0;
    border-radius: 8px;
    background: none;
    color: var(--ink);
    font-size: var(--font-small);
    text-align: left;
  }
  .phone-menu button:active,
  .phone-menu button:focus-visible {
    background: #edf3f7;
  }
  .phone-menu [data-phone-extra="logout"] {
    margin-top: 6px;
    border-top: 1px solid var(--line);
    border-radius: 0 0 8px 8px;
    color: #9a3b2c;
  }
  .phone-menu-count {
    min-width: 20px;
    padding: 1px 6px;
    border-radius: 999px;
    background: #b3412e;
    color: #fff;
    font-size: var(--font-caption);
    text-align: center;
  }

  /* The welcome card of the tour scrolls on small phones: the close button stays at the top, „Tour starten“
     at the bottom. The card then opens at its title, although „Tour starten“ gets the focus. */
  .tour-welcome .tour-close {
    position: sticky;
    top: 0;
    z-index: 1;
    float: right;
    margin: -12px -14px 0 0;
    background: #fff;
  }
  .tour-welcome .tour-start-actions {
    position: sticky;
    bottom: -18px;
    z-index: 1;
    flex-wrap: nowrap;
    margin: 16px -20px 12px;
    padding: 12px 20px 18px;
    border-top: 1px solid var(--line);
    background: #fff;
  }
  .tour-welcome .tour-start-actions .btn {
    flex: 1;
    min-width: 0;
    padding-inline: 10px;
  }

  /* Felix's head and info row keep their size: larger, they wrap and take the chat's room
     (tests/felix_chat_space_check.py, Rückmeldung 12.10.2026). The conversation and the input grow. */
  #felixPanel .felix-head,
  #felixPanel .felix-context {
    --text-scale: 1;
    --font-caption: 12px;
    --font-small: 14px;
    --font-body: 16px;
    --control-font: 14px;
  }

  /* Fields under 16 px make iOS zoom into the page when they get the focus. */
  input:not([type="checkbox"], [type="radio"], [type="range"]),
  select,
  textarea {
    font-size: max(16px, 1em) !important;
  }
}

/* Layout fixes from the UX walk on the iPhone (10.11.2026). */
@media (max-width: 760px) and (pointer: coarse) {
  /* One scrolling row for all sub-pages: „Weitere Abrechnungsfunktionen“ wrapped and hid two of them (phone.js opens it). */
  .workspace-tabs {
    gap: 20px;
  }
  .workspace-tabs :is(button, a) {
    min-height: 44px;
    padding: 11px 0 9px;
  }
  .workspace-tabs .workspace-special {
    position: static;
    display: block;
    flex-shrink: 0;
    align-self: stretch;
    width: auto;
    margin: 0;
    padding: 0;
    border: 0;
  }
  .workspace-tabs .workspace-special > div {
    position: static;
    display: flex;
    flex-wrap: nowrap;
    gap: 20px;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
  }
  .workspace-tabs .workspace-special > summary {
    display: none;
  }

  /* A touch never needs the ring around what the app focuses by itself. */
  .pagehead h1:focus,
  #mainContent:focus,
  .dialoghead button:focus-visible {
    outline: none;
  }

  /* „Abbrechen“ of the question form stays clear of the feedback icon, as in the other dialogs. */
  dialog:has(> .feedback-launcher) .question-buttons {
    padding-left: 52px;
  }
  .question-shot-fold > summary {
    min-height: 44px;
    padding: 11px 0;
    font-weight: 600;
  }

  /* Tables with more columns than a phone has room for: one block per row. */
  table.phone-cards,
  table.phone-cards tbody,
  table.phone-cards tr,
  table.phone-cards td {
    display: block;
  }
  table.phone-cards thead {
    display: none;
  }
  table.phone-cards tr {
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
  }
  table.phone-cards td {
    padding: 2px 0;
    border: 0;
  }
  table.phone-cards td[data-label] {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    text-align: right;
  }
  table.phone-cards {
    width: 100%;
    min-width: 0;
  }
  table.phone-cards td {
    width: auto !important;
    min-width: 0 !important;
  }
  table.phone-cards td[data-label] {
    flex-wrap: wrap;
  }
  table.phone-cards td[data-label] small {
    flex-basis: 100%;
    margin: 0;
  }
  table.phone-cards td.phone-long {
    display: block;
    text-align: left;
  }
  table.phone-cards td.phone-long::before {
    display: block;
    margin-bottom: 2px;
  }
  table.phone-cards td[data-label]::before {
    content: attr(data-label);
    color: var(--muted);
    font-weight: 400;
    text-align: left;
  }
  :is(.table-scroll, .comparison-scroll):has(> table.phone-cards),
  .table-scroll:has(> table.hecon-table) {
    overflow: visible;
  }

  /* Hecon: name and amount side by side, status and actions below, nothing behind the right edge. */
  table.hecon-table,
  table.hecon-table tbody {
    display: block;
    min-width: 0;
    width: 100%;
  }
  table.hecon-table thead {
    display: none;
  }
  table.hecon-table tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
  }
  table.hecon-table td {
    display: block;
    padding: 0;
    border: 0;
    min-width: 0;
  }
  table.hecon-table td:nth-child(n + 3) {
    grid-column: 1 / -1;
  }
  /* The next step on the left, the row's own „›“ beside it on the right (25.11.2026). */
  table.hecon-list td:nth-child(4) {
    grid-column: 1;
    align-self: center;
  }
  table.hecon-list td:nth-child(4) .hecon-actions {
    justify-content: flex-start;
  }
  table.hecon-list td:nth-child(5) {
    grid-column: 2;
    justify-self: end;
  }

  /* Yearly totals as label and value on one line, „noch unvollständig“ stays whole. */
  .rental-totals {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }
  .rental-totals > div {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: 2px 12px;
  }
  .rental-totals span {
    overflow-wrap: normal;
  }
  .rental-totals strong {
    margin: 0;
    font-size: calc(16px * var(--text-scale, 1));
    text-align: right;
    overflow-wrap: normal;
    white-space: nowrap;
  }
}

/* Long lists and the costs page on phones (10.11.2026): 49 documents took 26 screens, 77 meters 29. */
@media (max-width: 760px) and (pointer: coarse) {
  /* Documents: title, context, usage and actions; the upload details stay in the preview. */
  .document-table .document-file,
  .document-table .document-uploaded {
    display: none;
  }
  table.document-table tbody tr {
    padding: 10px 14px;
  }
  table.document-table td {
    padding: 2px 0;
  }
  table.document-table td:nth-child(2)::before {
    display: none;
  }
  table.document-table td:nth-child(2) {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px 8px;
    margin-left: 34px;
  }
  /* A row opens its document (UX review 10.11.2026): „Vorschau öffnen“ covers the row, so four links per document
     no longer take a third of its height. Rename, delete and the costs are in the document's own view. */
  table.document-table tbody tr:not(.phone-group-head) {
    position: relative;
    padding-right: 40px;
  }
  table.document-table tbody tr:not(.phone-group-head)::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 18px;
    width: 8px;
    height: 8px;
    border: solid #8a9ba8;
    border-width: 2px 2px 0 0;
    transform: translateY(-50%) rotate(45deg);
    pointer-events: none;
  }
  table.document-table tr:not(.phone-group-head) > td:last-child {
    position: static;
    margin: 0;
    padding: 0;
  }
  table.document-table
    tr:not(.phone-group-head)
    > td:last-child
    > :not([data-source]) {
    display: none;
  }
  table.document-table
    tr:not(.phone-group-head)
    > td:last-child
    > [data-source] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 0;
    opacity: 0;
  }
  .document-table .document-check {
    position: relative;
    z-index: 1;
  }
  .document-table .document-cell b {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .document-table .document-cell > div {
    min-width: 0;
  }
  table.document-table td:nth-child(2) .pill {
    padding: 1px 8px;
    font-size: var(--font-caption, 12px);
  }

  /* Meters: room and kind, number and reading, the factor beside them. */
  .meter-unit .meter-table tbody tr {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2px 12px;
    padding: 10px 14px;
  }
  .meter-unit .meter-table td::before {
    display: none;
  }
  .meter-unit .meter-table td:nth-child(2) {
    grid-column: 1;
    grid-row: 1;
  }
  .meter-unit .meter-table td[data-label="Art"] {
    grid-column: 2;
    grid-row: 1;
    text-align: right;
  }
  .meter-unit .meter-table td[data-label="Gerät"] {
    grid-column: 1;
    grid-row: 2;
  }
  .meter-unit .meter-table td[data-label="Letzter Stand"] {
    grid-column: 2;
    grid-row: 2 / span 2;
    text-align: right;
  }
  .meter-unit .meter-table td[data-label="Faktor"] {
    grid-column: 1;
    grid-row: 3;
    color: var(--muted);
    font-size: var(--font-caption, 12px);
  }
  .meter-unit .meter-table td[data-label="Faktor"]:has(.meter-factor)::before {
    content: "Faktor ";
    display: inline;
    margin: 0;
  }
  .meter-unit .meter-table td[data-label="Faktor"]:not(:has(.meter-factor)) {
    display: none;
  }
  .meter-unit .meter-table td.meter-status {
    grid-column: 1 / -1;
  }
  .meter-unit .meter-table .meter-note {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
  }
  .source-actions:has(#batchReadings) {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .source-actions:has(#batchReadings) .btn {
    justify-content: center;
    min-height: 44px;
    padding: 8px 10px;
    white-space: normal;
    text-align: center;
  }

  /* Costs: the positions start sooner; the desktop keeps the explanations. */
  .cost-scope .grid2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .cost-scope > p {
    display: none;
  }
  .cost-scope select {
    height: auto;
    min-height: 44px;
    padding-left: 10px;
    padding-right: 26px;
    background-position: right 6px center;
  }
  .cost-workspace-summary > div > small {
    display: none;
  }
  .annual-costs .annual-eyebrow,
  .annual-costs [data-annual-upload] {
    display: none;
  }
}

/* Folding by apartment and a one-line question box on the start page (10.11.2026). */
@media (max-width: 760px) and (pointer: coarse) {
  .meter-unit .panelhead {
    position: relative;
    padding-right: 56px;
  }
  .phone-fold {
    position: absolute;
    top: 8px;
    right: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    color: #496273;
  }
  .phone-fold svg,
  .phone-group-toggle svg {
    width: 20px;
    height: 20px;
    transition: transform 0.15s ease;
  }
  :is(.phone-fold, .phone-group-toggle)[aria-expanded="true"] svg {
    transform: rotate(180deg);
  }
  .meter-units:has(.meter-unit + .meter-unit)
    .meter-unit:not(.phone-open)
    > :not(.panelhead),
  .meter-units:has(.meter-unit + .meter-unit)
    .meter-unit:not(.phone-open)
    .meter-unit-tools {
    display: none;
  }
  table.document-table tbody.phone-group {
    display: block;
    border-top: 1px solid var(--line);
  }
  table.document-table tbody.phone-folded tr:not(.phone-group-head) {
    display: none;
  }
  table.document-table tr.phone-group-head {
    display: block;
    padding: 0;
    border: 0;
    background: #f6f9fb;
  }
  table.document-table tr.phone-group-head td {
    display: block;
    margin: 0;
    padding: 0;
  }
  .phone-group-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-height: 48px;
    padding: 6px 14px;
    color: #263e52;
    font-weight: 650;
    text-align: left;
  }
  .phone-group-count {
    margin-left: auto;
    padding: 1px 8px;
    border-radius: 999px;
    background: #e8eff4;
    color: #496273;
    font-size: var(--font-caption, 12px);
    font-weight: 500;
  }

  /* Start: one line with the count, the questions themselves are one tap away. */
  .questions-home .panelbody {
    display: none;
  }
  .questions-home .panelhead {
    padding-top: 10px;
    padding-bottom: 10px;
    border-bottom: 0;
  }
  .questions-home .panelhead h2 {
    font-size: var(--font-body, 16px);
  }
  .questions-home-count {
    display: inline;
  }
}

/* Width and touch targets: each nested card took up to 48 pt of a 402 pt screen (10.11.2026). */
@media (max-width: 760px) and (pointer: coarse) {
  .workspace-shell .content .panelbody,
  .workspace-shell .content .panel:not(.meter-unit) > .panelhead {
    padding-left: 14px;
    padding-right: 14px;
  }
  .workspace-shell .content .panelbody fieldset,
  .workspace-shell .content .rental-year,
  .workspace-shell .content .cp-section,
  .workspace-shell .content .annual-card,
  .workspace-shell .content .dossier-occupants {
    padding-left: 10px;
    padding-right: 10px;
  }
  .workspace-shell .content .year-step {
    padding-left: 10px;
    padding-right: 10px;
  }
  /* Not in Felix: its info row stays slim so the conversation keeps the room. */
  .workspace-shell .content details > summary,
  dialog details > summary {
    box-sizing: border-box;
    min-height: 44px;
    padding-top: 11px;
    padding-bottom: 11px;
  }
}

/* The iPhone app has its own tab bar (Start, Dokumente, Abrechnung, Mehr) with all areas and the functions above. */
html.ios-app .workspace-shell .sidebar,
html.ios-app .mobile-navigation,
html.ios-app .phone-more,
html.ios-app .phone-menu,
html.ios-app body > .feedback-launcher,
html.ios-app body > .questions-launcher,
html.ios-app dialog > .feedback-launcher,
html.ios-app dialog > .questions-launcher {
  display: none !important;
}
/* „Rückmeldung geben“ is in the app's „Mehr“, also while a dialog is open: no reserved corner in the button row. */
html.ios-app
  dialog:has(> .feedback-launcher)
  :is(.formactions, .question-buttons) {
  padding-left: 0;
}
html.ios-app body.feedback-ready .workspace-shell .main {
  padding-bottom: 24px;
}

/* Less before the content (UX review 10.11.2026). On „Dokumente“ 77 % of the screen height passed before the first
   document, on „Wohnungen & Mieter“ 62 %. */
@media (max-width: 760px) and (pointer: coarse) {
  /* A running job is one line, not a card above every page and dialog. Errors keep their full text. */
  .cloud-notice.working {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    padding: 0 4px 0 12px;
  }
  .cloud-notice.working > span {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    font-size: var(--font-caption, 12px);
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .cloud-notice.working > .linkbtn {
    flex-shrink: 0;
    min-height: 44px;
    padding: 0 8px;
  }

  /* The field says what it searches; its label stays for screen readers. */
  .document-filters > .field {
    gap: 0;
    font-size: 0;
    line-height: 0;
  }
  .content > .collection-tabs {
    margin-bottom: 12px;
  }
  .document-filter-area {
    margin: 12px 0 8px;
  }
  .document-filter-area .document-mobile-filter {
    margin-bottom: 4px;
  }

  /* Sign-in: the form on the first screen. The picture and the claim took half of it; on an iPhone SE the
     password field and „Anmelden“ lay below the edge. */
  .login-place {
    min-height: 0;
    padding: 14px 20px;
  }
  .login-place .place-drawing,
  .login-place h1 + p {
    display: none;
  }
  .login-place h1 {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .login-page .login-card {
    margin: 14px auto;
  }
  #documentResults .panelhead,
  .workspace-shell .content .panel > .panelhead:has(+ .table-scroll) {
    min-height: 0;
    padding-top: 10px;
    padding-bottom: 10px;
  }
  #documentResults .panelhead h2,
  .workspace-shell .content .panel > .panelhead:has(+ .table-scroll) h2 {
    font-size: var(--font-body, 16px);
  }
  #documentResults .selection-bar {
    min-height: 44px;
    padding-top: 6px;
    padding-bottom: 6px;
  }

  /* Tenancies as rows: unit and name, size, period, what is open. A tap opens „Details“; the tenant file and the
     changes of rent and advance are there. Before, one tenancy took 350 to 530 pt. */
  table.responsive-data:has(td[data-label="Wohnung / Mieter"]) tbody tr {
    position: relative;
    display: block;
    padding: 10px 40px 10px 14px;
  }
  table.responsive-data:has(td[data-label="Wohnung / Mieter"]) tbody tr::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 18px;
    width: 8px;
    height: 8px;
    border: solid #8a9ba8;
    border-width: 2px 2px 0 0;
    transform: translateY(-50%) rotate(45deg);
    pointer-events: none;
  }
  table.responsive-data:has(td[data-label="Wohnung / Mieter"]) td {
    display: block;
    width: auto;
    margin: 0;
    padding: 0;
    border: 0;
    color: var(--muted);
    font-size: var(--font-small, 14px);
    line-height: 1.45;
  }
  table.responsive-data:has(td[data-label="Wohnung / Mieter"]) td::before {
    display: none;
  }
  td[data-label="Wohnung / Mieter"] > br {
    display: none;
  }
  td[data-label="Wohnung / Mieter"] > .tenancy-unit {
    display: inline;
    min-height: 0;
    padding: 0;
    color: var(--ink);
    font-size: var(--font-body, 16px);
    font-weight: 650;
    text-decoration: none;
    pointer-events: none;
  }
  td[data-label="Wohnung / Mieter"] > .tenancy-unit::after {
    content: "·";
    margin: 0 0.3em;
    font-weight: 400;
  }
  td[data-label="Wohnung / Mieter"] > b {
    color: var(--ink);
    font-size: var(--font-body, 16px);
    font-weight: 600;
  }
  td[data-label="Wohnung / Mieter"] > small,
  td[data-label="Wohnung / Mieter"] ~ td small {
    display: inline;
    margin: 0;
    font-size: inherit;
  }
  td[data-label="Wohnung / Mieter"] > small {
    display: block;
  }
  td[data-label="Wohnung / Mieter"] ~ td small + small::before,
  td[data-label="Wohnung / Mieter"]
    ~ td[data-label="Mietzeitraum"]
    small::before {
    content: " · ";
  }
  td[data-label="Wohnung / Mieter"]
    ~ td[data-label="Öffnen"]
    > :not([data-tenant]) {
    display: none;
  }
  td[data-label="Wohnung / Mieter"]
    ~ td[data-label="Öffnen"]
    > [data-tenant] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 0;
    opacity: 0;
  }

  /* The document first, then what to do with it (it was a screen further down). The title keeps its words whole. */
  .detail-panel .source-inspector {
    display: flex;
    flex-direction: column;
  }
  .detail-panel .source-inspector > .source-reader {
    order: -1;
    margin-top: 0;
    margin-bottom: 14px;
  }
  .detail-panel .dialoghead h2 {
    font-size: calc(18px * var(--text-scale, 1));
    overflow-wrap: break-word;
    word-break: normal;
  }
  .detail-panel .detail-tools .questions-ask > span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .detail-panel .detail-tools .questions-ask {
    min-width: 44px;
    justify-content: center;
    padding-inline: 0;
  }

  /* „Dokument hinzufügen“ with files already there, as after a scan in the app (UX review 10.11.2026): they stood at
     65 % of the height, below a second title, „Quelle“ and a drop zone. Now the files come first, larger, and the
     way to add more follows them. */
  #documentIntake .intake-context,
  #documentIntake:has(.file-picker-item) > fieldset.segmented,
  #documentIntake
    .file-picker:has(.file-picker-item)
    .file-picker-zone
    :is(svg, small) {
    display: none;
  }
  #documentIntake .file-picker:has(.file-picker-item) {
    display: flex;
    flex-direction: column;
  }
  #documentIntake .file-picker:has(.file-picker-item) .file-picker-zone {
    order: 2;
    display: block;
    min-height: 0;
    margin-top: 4px;
    padding: 0;
    border: 0;
    background: none;
    text-align: left;
  }
  #documentIntake .file-picker:has(.file-picker-item) .file-picker-zone p {
    margin: 0;
  }
  #documentIntake .file-picker-thumb {
    flex: 0 0 56px;
    width: 56px;
    height: 56px;
  }
  #documentIntake .file-picker-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  /* Where the document goes, in one line, while it simply goes to the archive (phone.js). Any other use, a required
     field or an error shows the fields. */
  .phone-intake-summary {
    display: none;
  }
  #documentIntake.phone-brief #intakeDetails > :not(.phone-intake-summary) {
    display: none;
  }
  #documentIntake.phone-brief #intakeDetails {
    margin-top: 10px;
    padding-top: 6px;
    padding-bottom: 6px;
  }
  #documentIntake.phone-brief .phone-intake-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 44px;
    color: var(--text);
    font-size: var(--font-small, 14px);
  }
  .phone-intake-summary .linkbtn {
    flex-shrink: 0;
    min-height: 44px;
  }

  /* A fading right end says that the row of sub-pages goes on („Abrechnung“ showed three of five and „Stror“). */
  .workspace-tabs.phone-more-right {
    -webkit-mask-image: linear-gradient(
      to right,
      #000 calc(100% - 40px),
      transparent
    );
    mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent);
  }
  /* The year keeps its digits whole at the largest text sizes: the fixed height cut them off. */
  .workspace-shell .tools select.year {
    height: auto;
    min-height: 44px;
    padding-top: 4px;
    padding-bottom: 4px;
    line-height: 1.25;
  }
  /* 44 pt to tick a document and to close the questions (they were 32 and 30 pt). */
  .document-table .document-check {
    display: inline-flex;
    align-items: flex-start;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    margin: -8px 0 -8px -12px;
    padding: 8px 0 0;
  }
  .question-dialog .question-close {
    min-width: 44px;
    min-height: 44px;
  }

  /* A tap on the app's tab bar that a dialog with input holds back: the dialog answers with a short nudge. */
  .phone-nudge {
    animation: phone-nudge 0.32s ease;
  }
  @keyframes phone-nudge {
    25% {
      transform: translateX(-6px);
    }
    75% {
      transform: translateX(6px);
    }
  }
  @media (prefers-reduced-motion: reduce) {
    .phone-nudge {
      animation: none;
    }
  }
}

/* The iPhone app starts a page with its content: the tab bar and the row of sub-pages name the place, and the bar's
   „Hinzufügen“ is the page's „Dokument hinzufügen“. The heading stays for screen readers and for the focus. */
html.ios-app .workspace-shell .pagehead {
  display: block;
  margin: 0;
}
html.ios-app .pagehead > div:first-child {
  display: contents;
}
html.ios-app .pagehead > div:first-child > p.subtle,
html.ios-app .pagehead .page-actions > [data-action="upload"],
html.ios-app .pagehead .page-actions:not(:has(> :not([data-action="upload"]))) {
  display: none;
}
html.ios-app .workspace-shell .pagehead h1 {
  margin: 0 0 12px;
  font-size: calc(20px * var(--text-scale, 1));
  letter-spacing: 0;
}
html.ios-app:is([data-phone-view="home"], [data-phone-view="documents"])
  .workspace-shell
  .pagehead
  h1,
html.ios-app .main:has(> .workspace-tabs) .pagehead h1 {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
html.ios-app .pagehead .page-actions,
html.ios-app .pagehead > :is(.source-actions, .formactions) {
  margin: 0 0 14px;
}
html.ios-app .property-context > .field {
  gap: 0;
  font-size: 0;
  line-height: 0;
}
html.ios-app .workspace-shell .content {
  padding-top: 12px;
}
/* Creating a tenancy and the tenant change are rare on the phone: they follow the list instead of preceding it. */
html.ios-app[data-phone-view="tenants"] .workspace-shell .content {
  display: flex;
  flex-direction: column;
}
html.ios-app[data-phone-view="tenants"] .workspace-shell .content > .pagehead {
  order: 9;
  margin-top: 16px;
}

/* The iPhone app's start page (UX review, 10.11.2026): Felix one tap or one word away, what was added last, and no
   cards that hold one number each (they are the pages behind the tab bar). „Frag Felix …“ is the first row of the page
   and scrolls with it: Michael did not like it standing over the page at the bottom all the time (10.11.2026). */
.phone-ask {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  padding: 4px 4px 4px 16px;
  border: 1px solid #b9c9d4;
  border-radius: 999px;
  background: #fff;
}
.phone-ask-field {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  color: var(--muted);
  font-size: var(--font-body, 16px);
  text-align: left;
}
.phone-ask-mic {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
}
.phone-ask-mic svg {
  width: 22px;
  height: 22px;
}
html.ios-app[data-phone-view="home"] .home-metrics,
html.ios-app[data-phone-view="home"] .home-annual > p.subtle {
  display: none;
}
html.ios-app[data-phone-view="home"] .home-annual > h2 {
  margin: 4px 0 10px;
  font-size: calc(18px * var(--text-scale, 1));
}
html.ios-app[data-phone-view="home"] .content > .panel > .panelhead {
  min-height: 0;
  padding-top: 10px;
  padding-bottom: 6px;
  border-bottom: 0;
}
html.ios-app[data-phone-view="home"] .content > .panel > .panelhead h2 {
  font-size: var(--font-body, 16px);
}
.phone-recent ul {
  margin: 0;
  padding: 0 0 4px;
  list-style: none;
}
.phone-recent li + li {
  border-top: 1px solid var(--line);
}
.phone-recent button {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  padding: 8px 14px;
  color: var(--ink);
  text-align: left;
}
.phone-recent b {
  min-width: 0;
  overflow: hidden;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.phone-recent small {
  flex: none;
  color: var(--muted);
}
