/* Mobile Navigation und Listen; die breite Desktopansicht bleibt unverändert. */
.mobile-admin-menu { display: none; }
.mobile-record-list, .mobile-household-people { display: none; }
.burger-icon { display: inline-flex; flex-direction: column; gap: 4px; flex: 0 0 22px; width: 22px; }
.burger-icon i { display: block; width: 22px; height: 2px; background: currentColor; border-radius: 2px; }

@media screen and (max-width: 960px) {
    .sidebar { padding: 16px 18px; overflow: visible; }
    .sidebar .brand { padding-right: 0; }
    .sidebar .desktop-admin-navigation, .context-nav { display: none; }
    .mobile-admin-menu { display: block; margin-top: 16px; }
    .navigation-toggle { display: flex; align-items: center; gap: 14px; min-height: 52px; padding: 10px 14px; border: 1px solid var(--border); border-radius: 8px; color: var(--sidebar-text); cursor: pointer; }
    .navigation-toggle::-webkit-details-marker { display: none; }
    .navigation-toggle::marker { content: ''; }
    .navigation-toggle small { display: block; font-size: 12px; font-weight: 400; margin-top: 3px; opacity: .8; }
    .mobile-admin-menu nav { flex-direction: column; overflow: visible; margin-top: 12px; gap: 5px; }
    .mobile-admin-menu nav a { white-space: normal; min-height: 44px; padding: 12px 16px; }
    .mobile-navigation-group { border-bottom: 1px solid var(--border); }
    .mobile-navigation-group > summary { padding: 14px 16px; min-height: 48px; cursor: pointer; color: var(--sidebar-text); }
    .mobile-navigation-group > summary.active { color: var(--primary); font-weight: 650; }
    .mobile-navigation-group[open] > summary { margin-bottom: 0; }
    .mobile-navigation-group > a { margin: 3px 0 3px 16px; }
    .sidebar .sidebar-bottom { position: static; flex-direction: column; align-items: stretch; gap: 14px; margin-top: 16px; padding: 16px 14px 0; border-top: 1px solid var(--border); }
    .sidebar .sidebar-bottom .account-link { display: block; }
    .sidebar .sidebar-bottom small { display: block; }
    .mobile-admin-menu:not([open]) ~ .sidebar-bottom { display: none; }
    .sidebar-bottom button { min-height: 44px; }
    .navigation-toggle:focus-visible, .mobile-navigation-group > summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
    .guest-navigation[data-collapsible] .guest-menu-toggle { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: calc(100% - 34px); margin: 0 17px 18px; padding: 14px 16px; min-height: 52px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--primary); text-align: left; font-size: 14px; }
    .guest-navigation[data-collapsible] .guest-menu-toggle[aria-expanded="true"] { margin-bottom: 8px; }
    .guest-navigation.is-collapsed .guest-menu { display: none; }
    .guest-navigation .guest-menu { flex-direction: column; gap: 7px; padding: 0 17px; margin-bottom: 20px; }
    .guest-navigation .guest-menu a { min-height: 44px; padding: 13px 16px; border-radius: 7px; white-space: normal; }
    .admin-shell, .admin-main, .guest-main, .card, .stack, .form-grid > *, .dashboard-grid > *, .editor-grid > * { min-width: 0; }
    .card { overflow-wrap: anywhere; }
    .topbar { gap: 16px; padding: 12px 18px; }
    .topbar > span:first-child { min-width: 0; overflow-wrap: anywhere; }
    .topbar > span:last-child { flex-shrink: 0; gap: 10px; }
}

@media screen and (max-width: 960px) {
    .table-wrap { overflow: visible; }
    table { width: 100%; table-layout: fixed; }
    th, td { min-width: 0; max-width: none; white-space: normal; overflow-wrap: anywhere; }
    table[data-responsive-table] { display: block; position: relative; width: 100%; min-width: 0; table-layout: auto; }
    table[data-responsive-table] thead { display: table-header-group; position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
    table[data-responsive-table] tbody, table[data-responsive-table] tfoot { display: block; width: 100%; }
    table[data-responsive-table] tbody > tr, table[data-responsive-table] tfoot > tr { display: block; width: 100%; padding: 16px 0; border-bottom: 1px solid var(--border); }
    table[data-responsive-table] tr:last-child { border-bottom: 0; }
    table[data-responsive-table] td, table[data-responsive-table] tbody th { display: block; width: 100%; max-width: none; min-width: 0; padding: 7px 0; border: 0; white-space: normal; text-align: left; }
    table[data-responsive-table] td:first-child, table[data-responsive-table] tbody th:first-child { width: 100%; min-width: 0; max-width: none; }
    table[data-responsive-table] td[data-label]::before { display: block; content: attr(data-label); margin-bottom: 4px; color: var(--muted); font-size: 11px; letter-spacing: .03em; font-weight: 600; }
    table[data-responsive-table] td[colspan]::before { display: none; }
    table[data-responsive-table] tbody th { color: var(--primary); font-weight: 650; font-size: 15px; text-transform: none; letter-spacing: 0; }
    table[data-responsive-table] .actions, table[data-responsive-table] .inline { flex-wrap: wrap; }
    table[data-responsive-table] .badge { white-space: normal; }
    .supplier-comparison { min-width: 0; }
    .button { white-space: normal; max-width: 100%; min-height: 44px; overflow-wrap: anywhere; }
    .actions, .section-heading, .split, .footer { flex-wrap: wrap; gap: 12px; }
    .section-heading > *, .split > *, .actions > *, .filter-bar > *, .guest-edit summary > * { min-width: 0; }
    main :where(div, section, aside, form, label, fieldset, details) { min-width: 0; }
    .field input, .field select, .field textarea, .copy-row input { max-width: 100%; font-size: 16px; }
    .filter-bar .field, .scope-picker .field { min-width: 0; flex-basis: 100%; }
    .pager { flex-wrap: wrap; gap: 8px 16px; }
    .pager a, .guest-header .link-button { display: inline-flex; align-items: center; min-height: 44px; }
    .recipient-list, .person-selection { grid-template-columns: minmax(0, 1fr); max-height: none; overflow: visible; }
    .person-pool, .seat-person-pool { max-height: none; overflow: visible; }
    .pool-tabs button, .seating-assignment-form button { min-height: 44px; }
    .recipient-list > label, .person-selection > label { min-height: 44px; overflow-wrap: anywhere; }
    .recipient-list > label > *, .person-chip > *, .household-group > * { min-width: 0; }
    .guest-edit summary { flex-wrap: wrap; }
    .guest-edit summary .muted { margin-left: 0; }
    .seat-slot-grid, .seat-board { grid-template-columns: minmax(0, 1fr); }
    .rich-content pre, pre { white-space: pre-wrap; overflow-wrap: anywhere; }
    .rich-content img, .card img, .card iframe { max-width: 100%; }
    .footer nav { display: flex; flex-wrap: wrap; gap: 12px; }
    .guest-header { gap: 12px; }
    .guest-header > form { flex-shrink: 0; }
}

@media screen and (max-width: 960px) {
    .mobile-record-list { display: grid; gap: 10px; }
    .mobile-record-item, .mobile-record, .mobile-household-person { min-width: 0; }
    .mobile-record, .mobile-household-person { border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
    .mobile-record > summary, .mobile-household-person > summary { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 14px; cursor: pointer; list-style: none; overflow-wrap: anywhere; }
    .mobile-record > summary::-webkit-details-marker, .mobile-household-person > summary::-webkit-details-marker { display: none; }
    .mobile-record > summary::marker, .mobile-household-person > summary::marker { content: ''; }
    .mobile-record-heading { display: grid; flex: 1; min-width: 0; gap: 5px; }
    .mobile-record-heading > strong { color: var(--primary); font-size: calc(15px * var(--font-scale, 1)); font-weight: 650; line-height: 1.4; }
    .mobile-record-subtitle { color: var(--muted); font-size: calc(12px * var(--font-scale, 1)); line-height: 1.5; }
    .mobile-record-badges { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 2px; }
    .mobile-record-badges .badge { max-width: 100%; font-size: calc(11px * var(--font-scale, 1)); line-height: 1.5; white-space: normal; text-transform: none; letter-spacing: 0; }
    .mobile-record-toggle { display: flex; flex-shrink: 0; align-items: center; gap: 9px; color: var(--muted); font-size: calc(11px * var(--font-scale, 1)); }
    .mobile-record-chevron { display: block; width: 8px; height: 8px; flex: 0 0 8px; margin: 0 3px 4px 0; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; color: var(--muted); transform: rotate(45deg); }
    .mobile-record-less { display: none; }
    .mobile-record[open] > summary .mobile-record-more { display: none; }
    .mobile-record[open] > summary .mobile-record-less { display: inline; }
    .mobile-record[open] > summary .mobile-record-chevron, .mobile-household-person[open] > summary > .mobile-record-chevron { transform: rotate(225deg); margin-bottom: 0; }
    .mobile-record[open] > summary { border-bottom: 1px solid var(--border); background: var(--surface-alt); border-radius: 8px 8px 0 0; }
    .mobile-record > summary:focus-visible, .mobile-household-person > summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
    .mobile-record-body { padding: 8px 14px 14px; font-size: calc(13px * var(--font-scale, 1)); overflow-wrap: anywhere; }
    .mobile-record-field { padding: 9px 0; }
    .mobile-record-field + .mobile-record-field { border-top: 1px solid var(--border); }
    .mobile-record-label { display: block; margin-bottom: 4px; color: var(--muted); font-size: calc(11px * var(--font-scale, 1)); font-weight: 600; }
    .mobile-record-value { min-width: 0; line-height: 1.6; }
    .mobile-record-value a, .mobile-household-person-body .actions a { display: inline-flex; align-items: center; min-height: 44px; max-width: 100%; }
    .mobile-record-value a.block { display: flex; }
    .mobile-record-value .badge { white-space: normal; }
    .mobile-household-people { display: grid; gap: 8px; margin-top: 8px; }
    .household-person-names { display: none; }
    .mobile-household-person { background: var(--surface-alt); }
    .mobile-household-person > summary { min-height: 52px; padding: 11px 12px; }
    .mobile-household-person .mobile-record-heading > strong { font-size: calc(13px * var(--font-scale, 1)); }
    .mobile-household-person-body { border-top: 1px solid var(--border); padding: 8px 12px; }
    .mobile-household-person-body dl { margin: 4px 0 8px; }
    .mobile-household-person-body dt { color: var(--muted); font-size: calc(11px * var(--font-scale, 1)); }
    .mobile-household-person-body dd { margin: 2px 0 10px; overflow-wrap: anywhere; }
    .invitation-overview[data-mobile-fold-active], .invitation-overview[data-mobile-fold-active]:first-child, .invitation-overview[data-mobile-fold-active]:last-of-type { padding: 0; border: 0; margin-bottom: 10px; }
    .invitation-overview[data-mobile-fold-active] .mobile-record-body { padding-top: 16px; }
}
