/* Compact phone filters: keep the offer feed visible and move controls into a small bottom sheet. */
.filter-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.filter-section-heading button,
.filter-sheet-close {
  border: 0;
  background: transparent;
  color: var(--ebag-teal-dark);
  cursor: pointer;
  font-weight: 800;
}

.filter-sheet-close {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
}

@media (max-width: 760px) {
  #offers-view.active {
    animation: none;
    transform: none;
  }

  body:has(#offer-filter-menu[open]) {
    overflow: hidden;
  }

  #offers-view .page-heading {
    margin-bottom: 2px;
  }

  .offer-feed-toolbar {
    top: 58px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 40px;
    gap: 6px;
    padding: 5px 0 7px;
    background: var(--cream);
  }

  .offer-date-filter,
  .offer-filter-menu > summary {
    min-height: 40px;
    border-radius: 11px;
    box-shadow: none;
  }

  .offer-date-filter {
    min-width: 0;
    padding: 0 10px;
  }

  .offer-date-filter svg {
    width: 15px;
  }

  .offer-date-filter select {
    min-width: 0;
    overflow: hidden;
    font-size: 14px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .offer-filter-menu {
    width: 40px;
  }

  .offer-filter-menu > summary {
    position: relative;
    width: 40px;
    justify-content: center;
    padding: 0;
  }

  .offer-filter-menu > summary > span:not(.filter-count) {
    display: none;
  }

  .offer-filter-menu > summary svg {
    width: 18px;
  }

  .filter-count {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 17px;
    height: 17px;
    border: 2px solid var(--cream);
    background: var(--ebag-teal);
    font-size: 8px;
  }

  .offer-filter-menu[open]::before {
    position: fixed;
    z-index: 100;
    inset: 0;
    background: rgba(5, 25, 28, 0.48);
    content: "";
  }

  .offer-filter-sheet {
    position: fixed;
    z-index: 101;
    top: auto;
    right: 10px;
    bottom: calc(76px + env(safe-area-inset-bottom));
    left: 10px;
    width: auto;
    max-height: calc(100dvh - 150px);
    gap: 8px;
    padding: 12px;
    overflow-y: auto;
    overscroll-behavior: contain;
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: 0 18px 55px rgba(5, 25, 28, 0.28);
  }

  .filter-sheet-heading {
    position: static;
    min-height: 32px;
    margin: 0;
    padding: 0;
  }

  .filter-sheet-heading strong {
    font-size: 15px;
  }

  .region-checks {
    grid-template-columns: 1fr 1fr;
    gap: 5px;
  }

  .region-checks span,
  .money-only-toggle > span {
    min-height: 36px;
    padding: 5px 8px;
    border-radius: 9px;
    font-size: 10px;
  }

  .offer-filter-sheet .field {
    gap: 3px;
  }

  .offer-filter-sheet .field > span {
    font-size: 9px;
  }

  .offer-filter-sheet .field select {
    height: 40px;
    min-height: 40px;
    padding: 0 9px;
    font-size: 14px;
  }

  .apply-offer-filters {
    position: static;
    min-height: 42px;
    margin-top: 2px;
    box-shadow: none;
  }

  .viber-feed-panel .all-offers-summary {
    padding-top: 3px;
    font-size: 10px;
  }
}
@media (max-width: 760px) {
  .topbar #notifications-button,
  .topbar #language-toggle,
  .topbar #theme-toggle {
    display: none;
  }

  .mobile-actions-menu {
    position: relative;
    display: block;
  }

  .mobile-actions-menu > summary {
    display: inline-grid;
    list-style: none;
  }

  .mobile-actions-menu > summary::-webkit-details-marker {
    display: none;
  }

  .mobile-actions-menu[open] > summary {
    border-color: var(--ebag-teal);
    background: var(--ebag-teal-soft);
    color: var(--ebag-teal-dark);
  }

  .mobile-menu-notification {
    top: 4px;
    right: 5px;
    border-color: var(--paper);
  }

  .mobile-actions-popover {
    position: absolute;
    z-index: 80;
    top: calc(100% + 9px);
    right: 0;
    display: grid;
    width: min(278px, calc(100vw - 20px));
    gap: 3px;
    padding: 8px;
    border: 1px solid var(--line);
    background: var(--paper);
    border-radius: 15px;
    box-shadow: 0 18px 45px rgba(8, 25, 39, 0.22);
  }

  .mobile-actions-popover > button {
    display: grid;
    width: 100%;
    min-height: 50px;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    padding: 7px 9px;
    border: 0;
    background: transparent;
    color: var(--navy);
    border-radius: 10px;
    cursor: pointer;
    text-align: left;
  }

  .mobile-actions-popover > button:hover {
    background: var(--cream);
  }

  .mobile-actions-popover strong,
  .mobile-actions-popover small {
    display: block;
  }

  .mobile-actions-popover strong {
    font-size: 12px;
  }

  .mobile-actions-popover small {
    margin-top: 1px;
    color: var(--muted);
    font-size: 9px;
  }

  .mobile-action-icon {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    background: var(--cream);
    color: var(--ebag-teal-dark);
    border-radius: 9px;
  }

  .mobile-action-icon svg {
    width: 17px;
  }

  .mobile-notification-count {
    display: grid;
    min-width: 22px;
    height: 22px;
    place-items: center;
    padding: 0 6px;
    background: var(--burgundy);
    color: #fff;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 900;
  }

  .mobile-notification-count[hidden] {
    display: none;
  }

  .mobile-actions-popover > .mobile-profile-action {
    margin-top: 3px;
    background: var(--ebag-teal);
    color: #fff;
  }

  .mobile-actions-popover > .mobile-profile-action:hover {
    background: var(--ebag-teal-dark);
  }

  .mobile-profile-action small {
    color: rgba(255, 255, 255, 0.78);
  }

  .mobile-actions-popover > .mobile-logout-action {
    margin-top: 3px;
    border-top: 1px solid var(--line);
    border-radius: 0 0 10px 10px;
    color: var(--burgundy);
  }

  .mobile-logout-action .mobile-action-icon {
    background: var(--burgundy-soft);
    color: var(--burgundy);
  }

  .topbar-profile-avatar {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    background: #fff;
    color: var(--ebag-teal-dark);
    border-radius: 9px;
    font-size: 10px;
    font-weight: 900;
  }

  .profile-settings-content {
    gap: 13px;
  }

  .profile-connection-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .profile-connection-actions {
    grid-column: 1 / -1;
    width: 100%;
  }

  .profile-connection-refresh {
    width: 100%;
  }

  .favorite-shift-grid {
    max-height: 27dvh;
  }

  .account-danger-zone {
    align-items: stretch;
    flex-direction: column;
  }
}
/*
 * Phone-only driver product.
 *
 * The driver experience deliberately has one layout now. Wider screens show
 * the same phone application centered instead of expanding into a desktop
 * dashboard. This keeps every decision, modal, and schedule preview readable
 * at the size colleagues will actually use.
 */
body {
  background: #173f42;
}

#app-shell.app-shell:not([hidden]) {
  position: relative;
  width: min(100%, 480px);
  min-height: 100dvh;
  margin-inline: auto;
  padding-bottom: calc(82px + env(safe-area-inset-bottom));
  overflow-x: clip;
  background: var(--cream);
  box-shadow: 0 0 52px rgba(4, 27, 30, 0.34);
}

#app-shell .workspace {
  min-height: 100dvh;
  margin-left: 0;
}

#app-shell .topbar {
  min-height: 64px;
  gap: 8px;
  padding: 8px 14px;
}

#app-shell .topbar-title,
#app-shell .topbar-actions {
  min-width: 0;
  gap: 8px;
}

#app-shell .topbar-title .eyebrow,
#app-shell .search-button,
#app-shell #notifications-button,
#app-shell #language-toggle,
#app-shell #theme-toggle,
#app-shell .mobile-menu {
  display: none;
}

#app-shell .mobile-home-brand,
#app-shell .mobile-actions-menu {
  display: flex;
}

#app-shell .mobile-home-brand {
  gap: 9px;
}

#app-shell .mobile-home-brand img {
  width: 38px;
  height: 38px;
  border-radius: 11px;
}

#app-shell .mobile-home-brand strong {
  font-size: 20px;
}

#app-shell .topbar .icon-button,
#app-shell .topbar-actions .primary-button,
#app-shell .mobile-actions-menu > summary {
  width: 46px;
  min-width: 46px;
  height: 46px;
  min-height: 46px;
  padding: 0;
  border-radius: 13px;
}

#app-shell .topbar-actions .primary-button span {
  display: none;
}

#app-shell main {
  padding: 20px 14px calc(34px + env(safe-area-inset-bottom));
}

#app-shell .view {
  width: 100%;
  max-width: none;
}

#app-shell .view.active {
  animation: none;
}

#app-shell .page-heading {
  align-items: stretch;
  flex-direction: column;
  gap: 13px;
  margin-bottom: 18px;
}

#app-shell .page-heading .kicker {
  margin-bottom: 6px;
  font-size: 11px;
}

#app-shell .page-heading h1,
#app-shell .compact-heading h1,
#app-shell #calendar-view > .page-heading h1 {
  margin-bottom: 6px;
  font-size: 30px;
  line-height: 1.12;
}

#app-shell .heading-copy {
  font-size: 15px;
  line-height: 1.5;
}

#app-shell #calendar-view > .page-heading .heading-copy {
  display: none;
}

#app-shell .month-controls {
  width: 100%;
  min-height: 52px;
  justify-content: space-between;
  padding: 3px;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 14px;
}

#app-shell .month-controls .icon-button {
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 11px;
}

#app-shell .month-label {
  min-height: 46px;
  flex: 1;
  font-size: 17px;
}

#app-shell .calendar-layout {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

#app-shell .activity-rail {
  display: contents;
}

#app-shell .pending-section {
  order: 2;
}

#app-shell .calendar-card {
  order: 1;
  width: 100%;
  border-radius: 16px;
}

#app-shell .rail-section,
#app-shell .content-card {
  padding: 16px;
  border-radius: 16px;
}

#app-shell .calendar-toolbar {
  min-height: 52px;
  align-items: center;
  flex-direction: row;
  padding: 13px 14px;
}

#app-shell .calendar-toolbar h2,
#app-shell .rail-heading h2,
#app-shell .content-card h2 {
  margin: 0;
  font-size: 18px;
}

#app-shell .calendar-toolbar p,
#app-shell .calendar-toolbar .legend {
  display: none;
}

#app-shell .weekdays span {
  padding: 9px 1px;
  font-size: 10px;
  letter-spacing: 0.04em;
}

#app-shell .calendar-day {
  min-height: 72px;
  padding: 5px 4px;
}

#app-shell .date-number {
  width: 27px;
  height: 27px;
  font-size: 12px;
}

#app-shell .day-shift {
  min-height: 27px;
  justify-content: center;
  margin-top: 5px;
  padding: 4px 2px;
  font-size: 10px;
}

#app-shell .day-shift span,
#app-shell .offer-indicator span,
#app-shell .request-indicator span {
  display: none;
}

#app-shell .offer-indicator,
#app-shell .request-indicator {
  margin-top: 4px;
  font-size: 0;
}

#app-shell .date-locked {
  right: 4px;
  bottom: 4px;
  max-width: 15px;
  font-size: 0;
}

#app-shell .pending-section {
  padding: 17px;
}

#app-shell .rail-heading {
  gap: 10px;
}

#app-shell .rail-heading > div {
  min-width: 0;
  gap: 8px;
}

#app-shell .rail-heading .text-button {
  min-height: 42px;
  flex: 0 0 auto;
  padding-inline: 8px;
  font-size: 13px;
}

#app-shell .attention-card {
  margin-top: 16px;
  padding-top: 16px;
}

#app-shell .attention-top {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
}

#app-shell .attention-top .avatar {
  width: 42px;
  height: 42px;
}

#app-shell .attention-top strong {
  font-size: 16px;
  line-height: 1.35;
}

#app-shell .attention-top span:not(.status-badge) {
  margin-top: 5px;
  font-size: 13px;
  line-height: 1.4;
}

#app-shell .attention-top .status-badge {
  grid-column: 2;
}

#app-shell .status-badge {
  min-height: 25px;
  padding: 5px 9px;
  font-size: 10px !important;
}

#app-shell .offer-request-meta {
  gap: 7px;
}

#app-shell .offer-request-meta span {
  min-height: 36px;
  padding-inline: 11px;
  font-size: 13px;
}

#app-shell .decision-buttons {
  grid-template-columns: 1fr 1.25fr;
  gap: 10px;
  margin-top: 16px;
}

#app-shell .decision-buttons button,
#app-shell .primary-button,
#app-shell .secondary-button {
  min-height: 50px;
  font-size: 15px;
  border-radius: 12px;
}

#app-shell .handshake-list {
  gap: 14px;
}

#app-shell .offer-request-card {
  gap: 16px;
  padding: 16px;
  border-radius: 16px;
}

#app-shell .offer-request-head {
  gap: 11px;
}

#app-shell .offer-request-head .avatar {
  width: 42px;
  height: 42px;
}

#app-shell .offer-request-head small {
  margin-bottom: 4px;
  font-size: 12px;
}

#app-shell .offer-request-head strong {
  font-size: 16px;
}

#app-shell .offer-request-sentence {
  font-size: 21px;
  line-height: 1.38;
}

#app-shell .offer-request-note {
  font-size: 14px;
  line-height: 1.45;
}

/* The schedule-change preview is deliberately large and vertical. */
#app-shell .trade-schedule-preview > summary {
  min-height: 56px;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 13px;
}

#app-shell .trade-schedule-preview > summary > span {
  flex-wrap: wrap;
  gap: 7px;
}

#app-shell .trade-schedule-preview > summary b {
  font-size: 15px;
}

#app-shell .trade-schedule-preview > summary small {
  padding: 5px 8px;
  font-size: 12px;
}

#app-shell .trade-preview-panel {
  gap: 13px;
  margin-top: 8px;
  padding: 13px;
  border-radius: 14px;
}

#app-shell .trade-preview-heading strong {
  font-size: 17px;
  line-height: 1.3;
}

#app-shell .trade-preview-heading span {
  margin-top: 5px;
  font-size: 13px;
  line-height: 1.4;
}

#app-shell .trade-preview-days {
  gap: 5px;
}

#app-shell .trade-preview-day,
#app-shell .trade-preview-day.focus {
  min-height: 78px;
  gap: 2px;
  padding: 8px 2px;
  border-radius: 10px;
}

#app-shell .trade-preview-day > small {
  font-size: 10px;
}

#app-shell .trade-preview-day > b {
  font-size: 18px;
}

#app-shell .trade-preview-day > strong {
  font-size: 11px;
}

#app-shell .trade-impact-comparison,
#app-shell .trade-impact-comparison.single {
  grid-template-columns: 1fr;
  gap: 10px;
}

#app-shell .trade-impact-column {
  gap: 9px;
  padding: 13px;
  border-width: 2px;
  border-radius: 13px;
}

#app-shell .trade-impact-column header {
  grid-template-columns: 1fr auto;
  gap: 3px 8px;
}

#app-shell .trade-impact-column header span {
  font-size: 12px;
}

#app-shell .trade-impact-column header strong {
  font-size: 22px;
}

#app-shell .trade-impact-column header small {
  font-size: 12px;
}

#app-shell .trade-impact-stack {
  gap: 7px;
}

#app-shell .trade-impact-block,
#app-shell .trade-preview-off {
  min-height: 48px;
  border-radius: 10px;
  font-size: 14px;
}

#app-shell .offer-feed-toolbar {
  top: 64px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 46px;
  gap: 8px;
  padding: 7px 0 9px;
  background: var(--cream);
}

#app-shell .offer-date-filter,
#app-shell .offer-filter-menu > summary {
  min-height: 46px;
  border-radius: 13px;
  box-shadow: none;
}

#app-shell .offer-date-filter {
  min-width: 0;
  padding-inline: 11px;
}

#app-shell .offer-date-filter select {
  min-width: 0;
  font-size: 16px;
  font-weight: 800;
}

#app-shell .offer-filter-menu,
#app-shell .offer-filter-menu > summary {
  width: 46px;
}

#app-shell .offer-filter-menu > summary {
  position: relative;
  justify-content: center;
  padding: 0;
}

#app-shell .offer-filter-menu > summary > span:not(.filter-count) {
  display: none;
}

#app-shell .takeable-offers-toggle {
  margin-bottom: 10px;
}

#app-shell .takeable-offers-toggle > span {
  min-height: 42px;
  padding: 7px 10px 7px 12px;
  font-size: 12px;
  box-shadow: none;
}

#app-shell .viber-feed-panel .all-offers-list,
#app-shell .personalized-offers-list {
  gap: 9px;
}

#app-shell .viber-feed-panel .all-offer-card,
#app-shell .personalized-offers-list .all-offer-card {
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 9px;
  padding: 0;
}

#app-shell .offer-chat-bubble,
#app-shell .personalized-offer-card .offer-chat-bubble {
  padding: 12px 13px;
  border-radius: 15px;
}

#app-shell .offer-chat-sentence {
  font-size: 15px;
  line-height: 1.45;
}

#app-shell .offer-chat-tags {
  gap: 6px;
}

#app-shell .offer-chat-tags span {
  min-height: 25px;
  padding-inline: 8px;
  font-size: 10px;
}

#app-shell .offer-chat-footer {
  align-items: stretch;
  flex-direction: column;
  gap: 8px;
}

#app-shell .offer-chat-actions {
  display: grid;
  width: 100%;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 8px;
}

#app-shell .offer-chat-footer button {
  min-height: 46px;
  font-size: 13px;
  border-radius: 11px;
}

#app-shell .personalized-offers {
  margin-bottom: 12px;
  border-radius: 16px;
}

#app-shell .personalized-offers > summary {
  min-height: 66px;
  padding: 11px 12px;
}

#app-shell .personalized-offers-title strong {
  font-size: 15px;
}

#app-shell .personalized-offers-title small {
  font-size: 11px;
  line-height: 1.35;
}

#app-shell .regular-offers-heading {
  font-size: 16px;
}

#app-shell .listing-row,
#app-shell .schedule-row {
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 11px;
  padding: 15px;
  border-radius: 14px;
}

#app-shell .listing-row .row-detail,
#app-shell .listing-row .row-actions {
  grid-column: 1 / -1;
  grid-row: auto;
}

#app-shell .row-main strong,
#app-shell .row-detail strong {
  font-size: 16px;
}

#app-shell .row-main span,
#app-shell .row-detail span {
  font-size: 13px;
  line-height: 1.4;
}

/* Permanent bottom navigation for the phone product. */
#app-shell .sidebar,
#app-shell .sidebar.open {
  position: fixed;
  z-index: 45;
  inset: auto auto 0 50%;
  display: flex;
  width: min(100%, 480px);
  height: calc(76px + env(safe-area-inset-bottom));
  padding: 7px 8px calc(7px + env(safe-area-inset-bottom));
  flex-direction: row;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  transform: translateX(-50%);
  box-shadow: 0 -10px 28px rgba(5, 47, 50, 0.2);
}

#app-shell .sidebar > :not(.nav-list),
#app-shell .sidebar.open > :not(.nav-list) {
  display: none;
}

#app-shell .sidebar .nav-list,
#app-shell .sidebar.open .nav-list {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
}

#app-shell .sidebar .nav-item,
#app-shell .sidebar.open .nav-item {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 62px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 5px 2px;
  border-radius: 12px;
  text-align: center;
}

#app-shell .sidebar .nav-item > svg,
#app-shell .sidebar.open .nav-item > svg {
  width: 23px;
  height: 23px;
}

#app-shell .sidebar .nav-item > span:not(.nav-count),
#app-shell .sidebar.open .nav-item > span:not(.nav-count) {
  max-width: 100%;
  overflow: hidden;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.05;
  text-align: center;
  text-overflow: ellipsis;
  white-space: normal;
}

#app-shell .sidebar .nav-count,
#app-shell .sidebar.open .nav-count {
  position: absolute;
  top: 3px;
  right: 10%;
  min-width: 19px;
  height: 19px;
  padding-inline: 5px;
  border: 2px solid var(--ebag-teal-dark);
  font-size: 9px;
}

#app-shell .sidebar .nav-item[data-nav="offers"] { order: 1; }
#app-shell .sidebar .nav-item[data-nav="listings"] { order: 2; }
#app-shell .sidebar .nav-item[data-nav="calendar"] { order: 3; }
#app-shell .sidebar .nav-item[data-nav="handshakes"] { order: 4; }
#app-shell .sidebar .nav-item[data-nav="contact"] { order: 5; }

#app-shell .sidebar .nav-item[data-nav="calendar"] {
  min-height: 70px;
  margin-top: -12px;
  border: 1px solid color-mix(in srgb, var(--ebag-teal) 40%, var(--line));
  background: var(--paper);
  color: var(--ebag-teal-dark);
  border-radius: 18px 18px 12px 12px;
  box-shadow: 0 9px 22px rgba(8, 69, 77, 0.22);
}

#app-shell .sidebar .nav-item[data-nav="calendar"] > svg {
  width: 43px;
  height: 43px;
  margin-top: -8px;
  padding: 9px;
  border: 3px solid var(--paper);
  background: linear-gradient(145deg, var(--ebag-teal), var(--ebag-teal-dark));
  color: #fff;
  border-radius: 14px;
  box-shadow: 0 7px 16px rgba(8, 156, 157, 0.3);
}

/* All driver dialogs are full-width phone bottom sheets, even on a laptop. */
.modal,
.modal-wide,
.search-modal {
  inset: auto 50% 0 auto;
  width: min(100%, 480px);
  max-width: 480px;
  max-height: 94dvh;
  margin: 0;
  border-width: 1px 0 0;
  border-radius: 24px 24px 0 0;
  transform: translateX(50%);
}

.modal-header {
  position: sticky;
  top: 0;
  z-index: 4;
  padding: 18px 16px 15px;
  background: var(--paper);
}

.modal-header .kicker {
  margin-bottom: 6px;
  font-size: 11px;
}

.modal-header h2 {
  font-size: 24px;
  line-height: 1.18;
}

.modal-header .icon-button {
  width: 46px;
  height: 46px;
  border-radius: 13px;
}

.day-scroll-cue {
  bottom: max(8px, env(safe-area-inset-bottom));
  min-height: 42px;
  margin-bottom: max(8px, env(safe-area-inset-bottom));
  padding: 8px 15px;
}

.day-action-stage {
  min-height: 94dvh;
}

.day-offers-panel {
  padding: 20px 16px max(30px, env(safe-area-inset-bottom));
}

.day-offers-heading h3 {
  font-size: 20px;
}

.day-offers-meta {
  margin: 13px 0 9px;
  font-size: 10px;
}

.day-offers-list .offer-chat-bubble,
.offer-results .result-chat-card .offer-chat-bubble {
  padding: 14px 13px 13px;
  border-radius: 15px;
}

.schedule-check,
.segmented-control,
.listing-mode-note,
.inline-validation,
.confirmation-note,
.success-banner,
.payment-action {
  margin-right: 16px;
  margin-left: 16px;
}

.schedule-check strong,
.confirmation-note strong,
.success-banner strong,
.payment-action strong {
  font-size: 15px;
}

.schedule-check span,
.confirmation-note p,
.success-banner p,
.payment-action p {
  font-size: 13px;
  line-height: 1.45;
}

.action-choice-grid,
.give-mode-grid,
.form-grid,
.filter-bar {
  grid-template-columns: 1fr;
  gap: 11px;
  padding-right: 16px;
  padding-left: 16px;
}

.action-choice,
.give-mode-choice {
  min-height: 88px;
  padding: 16px;
  border-radius: 14px;
}

.action-choice strong,
.give-mode-choice strong {
  font-size: 17px;
}

.action-choice small,
.give-mode-choice small {
  font-size: 13px;
  line-height: 1.45;
}

.give-mode-summary,
.exchange-composer {
  margin-right: 16px;
  margin-left: 16px;
}

.search-block-content,
.profile-settings-content,
.results-meta,
.offer-results {
  padding-right: 16px;
  padding-left: 16px;
}

.field {
  gap: 7px;
}

.field > span {
  font-size: 13px;
}

.field input,
.field select {
  min-height: 52px;
  font-size: 16px;
  border-radius: 12px;
}

.field textarea,
.search-input-wrap input {
  font-size: 16px;
  line-height: 1.45;
}

.modal-actions {
  position: sticky;
  z-index: 4;
  bottom: 0;
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 10px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: var(--paper);
}

.modal-actions > * {
  width: 100%;
  min-height: 54px;
  font-size: 15px;
  border-radius: 12px;
}

.offer-filter-sheet {
  position: fixed;
  z-index: 101;
  inset: auto max(10px, calc((100vw - 480px) / 2 + 10px)) calc(84px + env(safe-area-inset-bottom));
  width: auto;
  max-height: calc(100dvh - 170px);
  gap: 11px;
  padding: 15px;
  overflow-y: auto;
  border-radius: 19px;
}

.offer-filter-sheet .field select {
  min-height: 48px;
  font-size: 16px;
}

.region-checks span,
.money-only-toggle > span {
  min-height: 46px;
  padding: 8px 10px;
  font-size: 12px;
}

/* The onboarding and login screens follow the same comfortable phone scale. */
.auth-shell {
  padding: 16px 14px 32px;
}

.auth-topbar {
  max-width: 480px;
  margin-bottom: 34px;
}

.auth-layout {
  max-width: 480px;
}

.auth-card {
  padding: 28px 19px;
  border-radius: 24px;
}

.google-only-heading h2 {
  font-size: 28px;
}

.google-only-heading p,
.auth-heading p {
  font-size: 14px;
  line-height: 1.5;
}

.google-login-button {
  min-height: 66px;
}

.google-login-button strong {
  font-size: 17px;
}

.google-login-button small,
.google-login-explainer p {
  font-size: 12px;
}

.onboarding-step-title h3 {
  font-size: 19px;
}

.onboarding-step-title p,
.google-roster-copy small,
.onboarding-preferences small {
  font-size: 13px;
  line-height: 1.45;
}

.onboarding-progress strong {
  font-size: 13px;
}

.onboarding-progress small {
  font-size: 10px;
}

/* Compact, balanced phone feed for All offers. */
#app-shell #offers-view .page-heading {
  margin-bottom: 12px;
}

#app-shell #offers-view .page-heading .kicker,
#app-shell #offers-view .page-heading .heading-copy {
  display: none;
}

#app-shell #offers-view .page-heading h1 {
  margin: 0;
  font-size: 28px;
}

#app-shell .personalized-offers {
  margin: 0 0 12px;
  overflow: visible;
  border: 0;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}

#app-shell .personalized-offers > summary {
  min-height: 56px;
  padding: 9px 11px;
  border: 1px solid color-mix(in srgb, var(--ebag-teal) 38%, var(--line));
  background: color-mix(in srgb, var(--ebag-teal-soft) 54%, var(--paper));
  border-radius: 14px;
}

#app-shell .personalized-offers-title {
  gap: 9px;
}

#app-shell .personalized-offers-icon {
  width: 36px;
  height: 36px;
  flex-basis: 36px;
  border-radius: 11px;
}

#app-shell .personalized-offers-title strong {
  font-size: 15px;
  line-height: 1.2;
}

#app-shell .personalized-offers-title small {
  max-width: 245px;
  overflow: hidden;
  font-size: 11px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#app-shell .personalized-offers-meta b {
  min-width: 25px;
  height: 25px;
  font-size: 11px;
}

#app-shell .personalized-offers-list {
  gap: 9px;
  padding: 9px 0 0;
}

#app-shell .offer-feed-toolbar {
  margin-top: 2px;
  padding-top: 6px;
}

#app-shell .takeable-offers-toggle {
  display: block;
  width: 100%;
  margin: 2px 0 13px;
}

#app-shell .takeable-offers-toggle > span {
  display: flex;
  width: 100%;
  justify-content: flex-start;
  border-radius: 12px;
}

#app-shell .takeable-offers-toggle b {
  flex: 1;
  font-size: 12px;
}

#app-shell .regular-offers-heading {
  padding: 2px 1px 0;
  font-size: 16px;
}

#app-shell .viber-feed-panel .all-offers-summary {
  padding: 3px 1px 10px;
  font-size: 12px;
}

#app-shell .viber-feed-panel .all-offers-list,
#app-shell .personalized-offers-list {
  display: grid;
  gap: 10px;
}

#app-shell .viber-feed-panel .all-offer-card,
#app-shell .personalized-offers-list .all-offer-card,
#app-shell .offer-results .all-offer-card {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
}

#app-shell .offer-chat-bubble,
#app-shell .personalized-offer-card .offer-chat-bubble {
  width: 100%;
  padding: 13px 13px 12px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--ebag-teal);
  background: var(--paper);
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(24, 42, 48, 0.07);
}

#app-shell .offer-seek .offer-chat-bubble {
  border-left-color: var(--burgundy);
}

#app-shell .offer-swap .offer-chat-bubble {
  border-left-color: var(--orange);
}

#app-shell .offer-paid .offer-chat-bubble {
  border-left-color: var(--green);
}

#app-shell .offer-chat-person {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

#app-shell .offer-chat-person .avatar {
  width: 38px;
  height: 38px;
  font-size: 12px;
}

#app-shell .offer-chat-person > span {
  display: grid;
  min-width: 0;
  gap: 2px;
}

#app-shell .offer-chat-person strong,
#app-shell .offer-chat-person small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#app-shell .offer-chat-person strong {
  color: var(--navy);
  font-size: 15px;
}

#app-shell .offer-chat-person small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

#app-shell .offer-chat-sentence {
  margin-top: 11px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 550;
  line-height: 1.48;
}

#app-shell .offer-sentence-action,
#app-shell .offer-sentence-shift,
#app-shell .offer-sentence-date {
  font-size: 17px;
  line-height: 1.3;
}

#app-shell .offer-money-badge {
  min-height: 25px;
  padding-inline: 8px;
  font-size: 12px;
}

#app-shell .personal-match-reasons {
  gap: 5px;
  margin-top: 9px;
}

#app-shell .personal-match-reasons span {
  min-height: 25px;
  padding-inline: 8px;
  font-size: 10px;
}

#app-shell .offer-chat-footer {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  margin-top: 11px;
  padding-top: 10px;
}

#app-shell .offer-chat-tags {
  min-width: 0;
}

#app-shell .offer-chat-tags span {
  min-height: 25px;
  padding: 4px 8px;
  font-size: 10px;
}

#app-shell .offer-chat-actions {
  display: grid;
  width: 100%;
  min-width: 0;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 7px;
  margin: 0;
}

#app-shell .offer-chat-footer button,
#app-shell .offer-chat-footer .viber-offer-button,
#app-shell .offer-chat-footer .handshake-request-button {
  min-width: 0;
  min-height: 44px;
  margin: 0;
  padding: 0 10px;
  border-radius: 11px;
  font-size: 12px;
  line-height: 1.2;
}

#app-shell .offer-chat-footer .viber-offer-button {
  width: 44px;
  padding: 0;
}

#app-shell .offer-chat-footer .viber-offer-button span {
  display: none;
}

#app-shell .offer-chat-footer .viber-offer-button svg {
  width: 20px;
  height: 20px;
}

#app-shell .offer-chat-footer .handshake-request-button {
  width: 100%;
}

#app-shell .offer-not-takeable {
  opacity: 0.62;
}

#app-shell .offer-chat-sentence {
  margin-top: 0;
  font-size: 16px;
  line-height: 1.42;
}

#app-shell .offer-sentence-shift {
  padding: 1px 5px;
  background: color-mix(in srgb, var(--ebag-teal-soft) 70%, var(--paper));
  border-radius: 6px;
  font-size: 21px;
}

#app-shell .offer-sentence-date {
  font-size: 16px;
}

#app-shell .offer-sentence-action {
  font-size: 14px;
}

#app-shell .offer-card-person {
  margin-top: 6px;
}

#app-shell .offer-card-person .avatar {
  width: 20px;
  height: 20px;
  font-size: 7px;
}

#app-shell .offer-card-person small {
  color: var(--muted);
  font-size: 10px;
}

#app-shell .offer-money-badge {
  min-height: 28px;
  padding-inline: 9px;
  font-size: 13px;
}

#app-shell .offer-paid .offer-chat-bubble {
  background: linear-gradient(145deg, var(--paper) 0 74%, color-mix(in srgb, var(--green-soft) 48%, var(--paper)) 100%);
}

#app-shell .offer-roster-context {
  margin-top: 10px;
}

#app-shell .offer-roster-context > summary {
  min-height: 38px;
}

/* Keep the five core actions comfortable on compact 320-360px phones. */
@media (max-width: 360px) {
  #app-shell.app-shell:not([hidden]) {
    padding-bottom: calc(74px + env(safe-area-inset-bottom));
  }

  #app-shell .topbar {
    min-height: 60px;
    padding: 7px 12px;
  }

  #app-shell .mobile-home-brand {
    gap: 8px;
  }

  #app-shell .mobile-home-brand img {
    width: 36px;
    height: 36px;
  }

  #app-shell .mobile-home-brand strong {
    font-size: 19px;
  }

  #app-shell .topbar .icon-button,
  #app-shell .topbar-actions .primary-button,
  #app-shell .mobile-actions-menu > summary {
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
  }

  #app-shell main {
    padding: 16px 12px calc(26px + env(safe-area-inset-bottom));
  }

  #app-shell .page-heading {
    gap: 10px;
    margin-bottom: 14px;
  }

  #app-shell .page-heading h1,
  #app-shell .compact-heading h1,
  #app-shell #calendar-view > .page-heading h1,
  #app-shell #offers-view .page-heading h1 {
    font-size: 27px;
  }

  #app-shell .heading-copy {
    font-size: 14px;
  }

  #app-shell .month-controls {
    min-height: 50px;
  }

  #app-shell .calendar-toolbar {
    min-height: 48px;
    padding: 11px 12px;
  }

  #app-shell .calendar-day {
    min-height: 68px;
    padding-inline: 3px;
  }

  #app-shell .sidebar,
  #app-shell .sidebar.open {
    height: calc(70px + env(safe-area-inset-bottom));
    padding: 6px 4px calc(5px + env(safe-area-inset-bottom));
  }

  #app-shell .sidebar .nav-list,
  #app-shell .sidebar.open .nav-list {
    gap: 1px;
  }

  #app-shell .sidebar .nav-item,
  #app-shell .sidebar.open .nav-item {
    min-height: 58px;
    gap: 3px;
    padding-inline: 1px;
  }

  #app-shell .sidebar .nav-item > svg,
  #app-shell .sidebar.open .nav-item > svg {
    width: 21px;
    height: 21px;
  }

  #app-shell .sidebar .nav-item > span:not(.nav-count),
  #app-shell .sidebar.open .nav-item > span:not(.nav-count) {
    font-size: 9px;
  }

  #app-shell .sidebar .nav-item[data-nav="calendar"] {
    min-height: 66px;
    margin-top: -10px;
    border-radius: 16px 16px 11px 11px;
  }

  #app-shell .sidebar .nav-item[data-nav="calendar"] > svg {
    width: 39px;
    height: 39px;
    margin-top: -7px;
    padding: 8px;
  }

  .modal-header {
    padding: 15px 14px 13px;
  }

  .modal-header h2 {
    font-size: 22px;
  }

  .action-choice-grid,
  .give-mode-grid,
  .form-grid,
  .filter-bar,
  .search-block-content,
  .profile-settings-content,
  .results-meta,
  .offer-results {
    padding-right: 14px;
    padding-left: 14px;
  }

  .modal-actions {
    gap: 8px;
    padding-right: 14px;
    padding-left: 14px;
  }
}
