/* One opt-in layer for touch devices. Desktop styles remain unchanged. */
@media (max-width: 980px) and (hover: none) and (pointer: coarse) {
  body.mobile-portal {
    --mobile-header-space: calc(88px + env(safe-area-inset-top, 0px));
    box-sizing: border-box;
    min-width: 0;
    min-height: 100svh;
    margin: 0;
    padding-top: var(--mobile-header-space);
    -webkit-text-size-adjust: 100%;
  }
  .mobile-portal *, .mobile-portal *::before, .mobile-portal *::after { box-sizing: border-box; }
  .mobile-portal [hidden], .mobile-portal .hidden { display: none !important; }
  .mobile-portal :is(section, form, dialog, fieldset, article, label) { min-width: 0; }
  .mobile-portal :is(h1, h2, h3, p, b, small, legend, a) { overflow-wrap: anywhere; }
  .mobile-portal :is(section[id], div[id], form[id], input, select, textarea) { scroll-margin-top: calc(var(--mobile-header-space) + 16px); }
  .mobile-portal :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), select, textarea) {
    min-width: 0;
    max-width: 100%;
    min-height: 46px;
    font-size: 16px !important; /* Prevent focus zoom in iOS without disabling pinch zoom. */
    line-height: 1.4;
  }
  .mobile-portal :is(input[type="date"], input[type="time"], input[type="datetime-local"]) { width: 100%; min-inline-size: 0; }
  .mobile-portal input::-webkit-date-and-time-value { min-height: 1.4em; text-align: left; }
  .mobile-portal :is(button, .primary, .secondary, .portal-link, .primary-button, .secondary-button, summary) {
    min-height: 44px;
    max-width: 100%;
    white-space: normal;
    line-height: 1.35;
    touch-action: manipulation;
  }
  .mobile-portal :is(button, a, input, select, textarea, summary):focus-visible { outline: 3px solid #668cde; outline-offset: 3px; }
  .mobile-portal :is(.check-row, .weekend-toggle, .email-reception-toggle, .video-candidate-check) { min-height: 44px; }
  .mobile-portal :is(audio, video, canvas, iframe) { max-width: 100%; }

  /* Permanent floating header and a scrollable disclosure, not a modal. */
  .mobile-portal .portal-mobile-header {
    position: fixed;
    z-index: 100;
    top: max(8px, env(safe-area-inset-top, 0px));
    left: max(12px, env(safe-area-inset-left, 0px));
    right: max(12px, env(safe-area-inset-right, 0px));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 64px;
    margin: 0;
    padding: 9px 12px;
    border: 1px solid rgb(21 37 80 / 12%);
    border-radius: 16px;
    background: rgb(255 255 255 / 96%);
    color: #152550;
    box-shadow: 0 8px 28px rgb(21 37 80 / 12%);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
  }
  .mobile-portal .portal-mobile-brand { display: flex; align-items: center; min-width: 0; min-height: 44px; flex: 1; }
  .mobile-portal .portal-mobile-brand img { display: block; width: 172px; max-width: 100%; height: auto; mix-blend-mode: multiply; }
  .mobile-portal .portal-mobile-toggle {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: auto;
    min-width: 44px;
    min-height: 44px;
    margin: 0;
    padding: 10px;
    border: 1px solid #dce1ec;
    border-radius: 11px;
    background: #f6f7fb;
    color: #152550;
    font: 700 13px/1.2 Roboto, -apple-system, sans-serif;
    cursor: pointer;
  }
  .mobile-portal .portal-mobile-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
  .mobile-portal .portal-mobile-toggle[aria-expanded="true"] { background: #eaf0ff; border-color: #9ab0e4; }
  .mobile-portal .portal-mobile-login { display: inline-flex; align-items: center; justify-content: center; flex: none; min-height: 44px; padding: 10px 12px; border-radius: 11px; background: #ff451a; color: white; font-size: 13px; font-weight: 700; text-decoration: none; }
  .mobile-portal .portal-mobile-caption { flex: none; max-width: 100px; color: #455073; font-size: 12px; text-align: right; }
  .mobile-portal .portal-mobile-panel {
    position: fixed;
    z-index: 99;
    inset: var(--mobile-header-space) max(16px, env(safe-area-inset-right, 0px)) auto max(16px, env(safe-area-inset-left, 0px));
    display: none !important;
    width: auto;
    height: auto;
    max-height: calc(100vh - var(--mobile-header-space) - 24px - env(safe-area-inset-bottom, 0px));
    max-height: calc(100dvh - var(--mobile-header-space) - 24px - env(safe-area-inset-bottom, 0px));
    margin: 0;
    padding: 12px;
    overflow: auto;
    overscroll-behavior: contain;
    border: 1px solid #dce1ec;
    border-radius: 16px;
    background: #fff;
    color: #152550;
    box-shadow: 0 16px 40px rgb(21 37 80 / 17%);
  }
  .mobile-portal .portal-mobile-panel.portal-menu-open { display: flex !important; flex-direction: column; align-items: stretch; gap: 5px; }
  .mobile-portal .portal-mobile-panel > :is(.brand, .logo, .sidebar-note) { display: none; }
  .mobile-portal .portal-mobile-panel nav { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; margin: 0; overflow: visible; }
  .mobile-portal .portal-mobile-panel :is(nav a, nav button), .mobile-portal nav.portal-mobile-panel > a {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-width: 0;
    min-height: 46px;
    padding: 11px 12px;
    margin: 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #455073;
    font: 600 15px/1.35 Roboto, -apple-system, sans-serif;
    text-align: left;
    text-decoration: none;
    white-space: normal;
  }
  .mobile-portal .portal-mobile-panel :is(a.active, button.active, a[aria-current="page"]) { background: #fff0eb; color: #152550; }
  .mobile-portal .portal-mobile-panel :is(.session-user, .workspace-user) { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; padding: 14px 10px 2px; border-top: 1px solid #e3e6ee; }
  .mobile-portal .portal-mobile-panel .workspace-user > :is(span, b) { width: 100%; margin: 0; }
  .mobile-portal .process-journey.visible { display: block !important; margin-top: 14px; padding: 14px 6px 4px; }
  .mobile-portal .process-journey-header b { max-width: none; }
  .mobile-portal .journey-stage { min-height: 52px; }
  .mobile-portal .journey-stage-label { font-size: 13px; }
  .mobile-portal .journey-stage small { font-size: 11px; }

  /* Portal home, campaigns, candidates, configuration and process details. */
  .mobile-portal :is(.app-shell, .desktop-app) { display: block; min-height: auto; }
  .mobile-portal .app-shell > main, .mobile-portal :is(.dashboard, .workspace-view, .workflow) {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 16px max(16px, env(safe-area-inset-right, 0px)) calc(32px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  }
  .mobile-portal :is(.topbar, .dashboard-top, .view-header, .intro, .dashboard-intro, .card-title, .section-head, .section-heading, .call-invite-header, .phone-interview-header, .phone-script-heading, .tracking-heading) { flex-wrap: wrap; align-items: flex-start; gap: 14px; }
  .mobile-portal :is(.topbar, .dashboard-top) { margin-bottom: 24px; }
  .mobile-portal :is(.topbar > div, .dashboard-top > div, .view-actions, .settings-actions, .email-settings-actions, .user-toolbar) { display: flex; flex-wrap: wrap; gap: 10px; }
  .mobile-portal :is(.intro, .dashboard-intro, .view-header, .section-heading, .call-invite-header, .phone-interview-header, .phone-script-heading) { display: flex; flex-direction: column; }
  .mobile-portal :is(.intro h1, .dashboard-intro h1, .view-header h1, .hero h1) { font-size: clamp(28px, 7vw, 36px); line-height: 1.12; letter-spacing: -.8px; }
  .mobile-portal :is(.card h2, .library h2, .process-hero h2, .call-invite-header h2, .phone-interview-header h2) { font-size: 24px; line-height: 1.2; }
  .mobile-portal .dashboard-date { max-width: none; text-align: left; }
  .mobile-portal :is(.metrics, .attention-grid, .lower, .dashboard-lower, .settings-grid, .configuration-grid, .two-col, .form-grid, .fields, .email-reception-fields, .call-invite-layout, .phone-voice-panel, .video-config-grid, .whatsapp-template-result, .email-thread-editors) { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .mobile-portal .settings-grid > *, .mobile-portal .form-grid > * { grid-column: auto; grid-row: auto; }
  .mobile-portal :is(.section, .card, .library, .workspace-card, .dashboard-card, .agenda-campaign-card, .agenda-detail, .process-hero, .process-library, .recruitment-panel) { min-width: 0; padding: 18px; border-radius: 14px; }
  .mobile-portal :is(.hero, .library, .process-hero) { display: block; }
  .mobile-portal .hero aside { width: auto; margin-top: 20px; padding: 16px; }
  .mobile-portal :is(.role-list, .process-list, .dashboard-templates) { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .mobile-portal :is(.role-choice, .process-choice) { width: 100%; min-width: 0; }
  .mobile-portal .progress { display: flex; flex-wrap: wrap; row-gap: 10px; margin: 24px 0; font-size: 12px; }
  .mobile-portal .progress i { width: 12px; }
  .mobile-portal .pilot { margin-top: 32px; padding-top: 28px; }
  .mobile-portal :is(.report-grid, .process-kpis, .agenda-kpis, .tracking-kpis, .video-summary) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .mobile-portal .process-kpis { margin-top: 20px; text-align: left; }
  .mobile-portal :is(.campaign-head, .dashboard-process-header) { display: none; }
  .mobile-portal :is(.campaign-row, .dashboard-process-row) { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 18px 38px 18px 16px; }
  .mobile-portal .campaign-row .optional, .mobile-portal .dashboard-process-row .desktop-only { display: block; }
  .mobile-portal .campaign-row .meta::before { content: "Cliente: "; font-weight: 700; }
  .mobile-portal :is(.campaign-row .arrow, .dashboard-process-row .dashboard-arrow) { position: absolute; right: 16px; top: 20px; }
  .mobile-portal :is(.campaign-row b, .dashboard-process-name) { font-size: 15px; }
  .mobile-portal :is(.campaign-row small, .dashboard-process-name small, .dashboard-value) { font-size: 12px; }
  .mobile-portal :is(.view-row, .agenda-row) { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 18px; }
  .mobile-portal :is(.view-row button, .agenda-row button) { justify-self: stretch; padding: 10px 12px; border: 1px solid #dce1ec; border-radius: 10px; text-align: center; }
  .mobile-portal :is(.agenda-item, .queue-item) { flex-wrap: wrap; }
  .mobile-portal :is(.agenda-item > span, .queue-item > div) { flex: 1 1 180px; min-width: 0; }
  .mobile-portal :is(.agenda-item time, .queue-item time) { margin-left: 20px; }
  .mobile-portal :is(.agenda-campaign-heading, .agenda-detail-heading, .agenda-candidate, .candidate-top, .candidate-body, .dashboard-process-detail) { display: block; }
  .mobile-portal .agenda-candidate > span { display: flex; flex-wrap: wrap; margin-top: 12px; }
  .mobile-portal .agenda-candidate a { display: inline-flex; align-items: center; min-height: 44px; font-size: 13px; }
  .mobile-portal .agenda-campaign-open { float: none; width: 100%; }
  .mobile-portal .agenda-candidate-heading { align-items: flex-start; flex-direction: column; gap: 7px; }
  .mobile-portal .agenda-funnel { flex-wrap: wrap; overflow: visible; }
  .mobile-portal .agenda-funnel > span { flex: 1 1 120px; }

  /* Editing, screening, invitation scheduling and configuration actions. */
  .mobile-portal :is(.action-row, .bulk-import form, .email-reception-heading, .email-reception-actions, .call-invite-actions, .phone-interview-actions, .connection-panel, .source-approval-actions, .campaign-form-actions) { display: flex; flex-direction: column; align-items: stretch; gap: 14px; }
  .mobile-portal :is(.action-row, .call-invite-actions, .email-reception-actions, .campaign-form-actions) > :is(button, a) { width: 100%; }
  .mobile-portal :is(.invite-window-grid, .video-config-grid .invite-window-grid, .phone-voice-controls, .phone-question-meta, .source-policy-form, .salary-field) { grid-template-columns: minmax(0, 1fr); }
  .mobile-portal .phone-voice-instructions { grid-column: auto; }
  .mobile-portal .whatsapp-preview { position: static; max-width: 100%; }
  .mobile-portal .whatsapp-preview-body { min-height: 280px; }
  .mobile-portal :is(.whatsapp-bubble, .candidate-reply) { font-size: 13px; overflow-wrap: anywhere; }
  .mobile-portal :is(.settings-nav, .tracking-actions, .first-cut-actions, .first-cut-details-actions, .candidate-actions, .second-cut-decision, .recruitment-row > div) { display: flex; flex-wrap: wrap; gap: 10px; }
  .mobile-portal .settings-nav a { min-height: 44px; display: inline-flex; align-items: center; font-size: 13px; }
  .mobile-portal :is(.tracking-actions button, .candidate-actions button, .first-cut-actions button, .first-cut-details-actions button, .recruitment-row > div > button) { flex: 1 1 160px; width: auto; min-width: 0; padding: 12px; }
  .mobile-portal .first-cut-actions button { flex-basis: 100%; }
  .mobile-portal .first-cut-overview { padding: 14px; }
  .mobile-portal :is(.first-cut-overview-outcomes, .second-cut-summary) { grid-template-columns: minmax(0, 1fr); }
  .mobile-portal .first-cut-requirement-heading { flex-direction: column; align-items: flex-start; gap: 8px; }
  .mobile-portal .first-cut-requirement-row { grid-template-columns: 34px minmax(0, 1fr) auto; gap: 8px; padding: 14px 10px; }
  .mobile-portal .first-cut-requirement-row > strong { min-width: 40px; }
  .mobile-portal :is(.second-cut-candidate, .recruitment-row) { flex-direction: column; align-items: stretch; gap: 14px; }
  .mobile-portal .candidate-actions { max-width: none; justify-content: flex-start; margin-top: 14px; }
  .mobile-portal .candidate-top .stage { display: inline-block; margin-top: 12px; }
  .mobile-portal .candidate-selector { flex-basis: 44px; width: 44px; height: 44px; }
  .mobile-portal .candidate-name { padding-block: 8px; font-size: 16px; }
  .mobile-portal .video-candidate-toolbar { align-items: stretch; flex-direction: column; }
  .mobile-portal .video-candidate-toolbar > label { flex-wrap: wrap; }
  .mobile-portal .video-candidate-row { grid-template-columns: 44px minmax(0, 1fr); gap: 12px 8px; padding: 14px; }
  .mobile-portal :is(.video-mode-field, .video-schedule-field) { grid-column: 1 / -1; }
  .mobile-portal .video-schedule-field { grid-template-columns: minmax(0, 1fr); }
  .mobile-portal .video-candidate-identity em { width: fit-content; max-width: 100%; white-space: normal; }
  .mobile-portal .requirement.editor-item { grid-template-columns: 24px minmax(0, 1fr); gap: 10px; }
  .mobile-portal .requirement.editor-item .editor-grid { grid-column: 2; grid-template-columns: minmax(0, 1fr); padding: 0; }
  .mobile-portal .editor-grid .span-2 { grid-column: auto; }
  .mobile-portal .requirement.editor-item .icon-button { grid-column: 2; grid-row: auto; }
  .mobile-portal .question.editor-item { flex-wrap: wrap; }
  .mobile-portal .question-fields { min-width: 0; padding: 0; grid-template-columns: minmax(0, 1fr); }
  .mobile-portal .question-fields label:first-child { grid-column: auto; }
  .mobile-portal .phone-audio-row { grid-template-columns: minmax(0, 1fr); }
  .mobile-portal .phone-audio-row audio { grid-column: auto; grid-row: auto; width: 100%; }
  .mobile-portal :is(.first-cut-pagination, .candidate-list-pagination) { align-items: stretch; flex-direction: column; }
  .mobile-portal :is(.first-cut-pagination, .candidate-list-pagination) > div { width: 100%; }
  .mobile-portal :is(.first-cut-pagination, .candidate-list-pagination) button { flex: 1; }
  .mobile-portal .history p { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .mobile-portal .history time { text-align: left; }

  /* Simple tables become labeled cards, retaining all data and form controls. */
  .mobile-portal table.portal-mobile-table { display: block; width: 100%; min-width: 0 !important; border-collapse: separate; }
  .mobile-portal .portal-mobile-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .mobile-portal .portal-mobile-table tbody { display: block; width: 100%; }
  .mobile-portal .portal-mobile-table tbody tr { display: block; width: 100%; padding: 12px; border-bottom: 1px solid #dce1ec; }
  .mobile-portal .portal-mobile-table tbody td { display: block; width: 100%; min-width: 0; padding: 8px 0; border: 0; white-space: normal; font-size: 14px; overflow-wrap: anywhere; }
  .mobile-portal .portal-mobile-table td[data-mobile-label]::before { content: attr(data-mobile-label); display: block; margin-bottom: 5px; color: #455073; font-size: 11px; font-weight: 700; letter-spacing: .3px; }
  .mobile-portal .portal-mobile-table td[data-mobile-label=""]::before { display: none; }
  .mobile-portal .portal-mobile-table td small { font-size: 12px; }
  .mobile-portal :is(.tracking-table-wrap, .users-table-wrap, .scoring-table-wrap) { min-width: 0; max-width: 100%; }

  /* Dialogs stay above the header and within the dynamic iOS viewport. */
  .mobile-portal dialog {
    box-sizing: border-box;
    width: calc(100% - 24px);
    max-width: 620px;
    max-height: calc(100vh - 32px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    max-height: calc(100dvh - 32px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
    overscroll-behavior: contain;
    border-radius: 16px;
  }
  .mobile-portal :is(.recruitment-dialog, .user-dialog) { padding: 16px; }
  .mobile-portal .candidate-cv-header { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 12px; padding: 16px; }
  .mobile-portal .recruitment-dialog .candidate-cv-header { position: sticky; z-index: 1; top: -16px; margin: -16px -16px 16px; background: #fff; }
  .mobile-portal .candidate-cv-header h2 { flex: 1 1 170px; min-width: 0; font-size: 21px; }
  .mobile-portal .candidate-cv-header button { width: auto; flex: none; margin: 0; }
  .mobile-portal .candidate-cv-dialog:not(.recruitment-dialog) .candidate-cv-header { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; }
  .mobile-portal .candidate-cv-dialog:not(.recruitment-dialog) .candidate-cv-header > div:first-child { min-width: 0; }
  .mobile-portal .candidate-cv-dialog:not(.recruitment-dialog) .candidate-cv-header > div:first-child > .candidate-cv-download { display: none; }
  .mobile-portal .candidate-cv-dialog:not(.recruitment-dialog) .candidate-cv-toolbar { display: grid; grid-template-columns: repeat(2, auto); align-content: start; justify-content: end; gap: 8px; margin: 0; }
  .mobile-portal .candidate-cv-dialog:not(.recruitment-dialog) .candidate-cv-download-mobile { display: inline-flex; grid-column: 1 / -1; justify-self: end; margin: 0 0 2px; }
  .mobile-portal .candidate-cv-dialog:not(.recruitment-dialog) .candidate-cv-toolbar > span { grid-column: 1 / -1; grid-row: 3; justify-self: end; margin: 2px 0 0; }
  .mobile-portal .candidate-cv-text { padding: 16px; font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
  .mobile-portal .recruitment-dialog fieldset { padding: 12px; }
  .mobile-portal .recruitment-dialog legend { max-width: 100%; line-height: 1.45; }

  /* The older operational portal shares the same header and mobile ergonomics. */
  .mobile-legacy > :is(.app-topbar, .bottom-nav) { display: none !important; }
  body.mobile-legacy > main { width: 100% !important; min-width: 0; padding: 16px max(16px, env(safe-area-inset-right, 0px)) calc(32px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)) !important; }
  body.mobile-legacy > main > header .app-page-title-block { display: block !important; }
  body.mobile-legacy > main > header.app-page-header-empty { display: block !important; }
  body.mobile-legacy > main > header.app-page-header-compact { width: 100%; padding: 0 !important; margin-bottom: 20px !important; }
  .mobile-legacy :is(.wide-grid, .calendar-layout, .candidate-layout, .detail-grid, .video-layout, .form-grid, .participant-grid) { display: grid; grid-template-columns: minmax(0, 1fr) !important; gap: 16px; }
  .mobile-legacy :is(.grid, .score-summary-grid, .summary-grid) { grid-template-columns: minmax(0, 1fr); }
  .mobile-legacy .grid > :is(.field, label, .span-2, .span-3, .span-4, .span-6, .span-8, .span-12) { grid-column: 1 / -1; }
  .mobile-legacy :is(.toolbar, .actions, .header-actions, .top-actions, .scoring-toolbar) { display: flex !important; flex-wrap: wrap; gap: 10px; }
  .mobile-legacy .toolbar > :is(label, select, input) { flex: 1 1 180px; min-width: 0; }
  .mobile-legacy .toolbar > button { flex: 1 1 120px; }
  .mobile-legacy .calendar-head { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
  .mobile-legacy .calendar-head strong { grid-column: 1 / -1; grid-row: 1; padding-block: 6px; white-space: normal; }
  .mobile-legacy .calendar-head button { min-width: 0; padding-inline: 6px; }
  .mobile-legacy .calendar-select-row { grid-template-columns: minmax(0, 1fr); }
  .mobile-legacy :is(.modal, .modal-backdrop) { z-index: 200; padding: max(12px, env(safe-area-inset-top, 0px)) 12px max(12px, env(safe-area-inset-bottom, 0px)); }
  .mobile-legacy :is(.modal-card, .modal-panel) { width: 100%; max-height: calc(100dvh - 32px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)); overflow-y: auto; }

  /* First-party login and public booking: never show recruiter navigation. */
  .mobile-public .site-shell > .topbar { position: static; min-height: 0; margin: 0; padding: 0; border: 0; }
  .mobile-public .site-shell > .topbar > :not(.portal-mobile-panel) { display: none; }
  .mobile-public :is(.hero-inner, .access-form, .demo-layout, .demo-form-grid, .human-layout, .module-grid, .metrics-grid) { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .mobile-public .hero { min-height: 0; padding: 28px 16px; }
  .mobile-public .hero-inner { width: 100%; max-width: 100%; }
  .mobile-public .access-strip { width: 100%; min-width: 0; padding: 22px 16px; border-radius: 16px; }
  .mobile-public .access-form > * { min-width: 0; grid-column: 1; }
  .mobile-public .access-form .field { width: 100%; }
  .mobile-public .access-form :is(input, button.login-button) { width: 100%; min-height: 48px; }
  .mobile-public .password-field { min-width: 0; }
  .mobile-public .password-field input { padding-right: 52px; }
  .mobile-public .password-toggle { min-width: 44px; min-height: 44px; }
  .mobile-public .google-login { max-width: 100%; overflow: auto; }
  .mobile-public .login-status { white-space: normal; font-size: 14px; }
  .mobile-candidate { padding-inline: 16px; padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }
  body.mobile-candidate > main { width: 100% !important; max-width: 650px; padding: 22px 18px !important; margin: 0 auto; }
  .mobile-candidate main > .brand { display: none; }
  .mobile-candidate :is(.form-grid, .grid, .slots-grid) { grid-template-columns: minmax(0, 1fr); }
  .mobile-candidate :is(.slot, .consent) { min-height: 48px; padding-block: 12px; align-items: flex-start; line-height: 1.5; }
  .mobile-candidate .slot input, .mobile-candidate .consent input { flex: none; margin-top: 4px; }
  .mobile-candidate :is(button, .download) { min-height: 48px; width: 100%; }
}

@media (max-width: 399px) and (hover: none) and (pointer: coarse) {
  .mobile-portal .portal-mobile-toggle span { display: none; }
  .mobile-public .portal-mobile-brand img { width: 140px; }
  .mobile-portal :is(.card, .section, .process-hero, .workspace-card) { padding: 15px; }
  .mobile-portal .report-grid { grid-template-columns: minmax(0, 1fr); }
}
