/* Artdigg — pushed screens (Menu, Appearance) and grouped list rows.
   Mobile: full-screen, slides in from the right like a native screen.
   Desktop (>= 1024px): fills the content area next to the rail, header stays. */

/* ---------- Screen container ---------- */

.screen {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  background: var(--color-bg);
  overflow: hidden;
}
.screen.is-covered { visibility: hidden; }
.screen.is-stashed { visibility: hidden; pointer-events: none; animation: none !important; }   /* a page kept for Back (app.js) */
.screen.is-entering { animation: screen-in .24s cubic-bezier(.2, .8, .2, 1) both; }
.screen.is-leaving  { animation: screen-out .2s ease-in both; pointer-events: none; z-index: 41; }

@keyframes screen-in  { from { transform: translateX(100%); } to { transform: none; } }
@keyframes screen-out { from { transform: none; } to { transform: translateX(100%); } }
/* Menu comes from the left — it's opened from the ∷ button on the left of the header */
.screen[data-screen="menu"].is-entering { animation-name: menu-in; }
.screen[data-screen="menu"].is-leaving { animation-name: menu-out; }
@keyframes menu-in  { from { transform: translateX(-100%); } to { transform: none; } }
@keyframes menu-out { from { transform: none; } to { transform: translateX(-100%); } }

body.has-screen { overflow: hidden; }

.screen-bar {
  flex: none;
  display: grid;
  grid-template-columns: var(--tap) 1fr var(--tap);
  align-items: center;
  gap: 8px;
  min-height: calc(var(--header-h) + env(safe-area-inset-top, 0px));
  padding-top: env(safe-area-inset-top, 0px);
  padding-left: max(8px, env(safe-area-inset-left, 0px));
  padding-right: max(8px, env(safe-area-inset-right, 0px));
  background: var(--color-surface);
  box-shadow: var(--shadow-bar);
  position: relative;
  z-index: 1;
}
.screen-bar__nav svg { width: 24px; height: 24px; }
.screen-bar__title {
  margin: 0;
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  line-height: 20px;
  outline: none;
}

.screen-body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.screen-inner {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 20px max(16px, env(safe-area-inset-right, 0px)) calc(32px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
}

/* ---------- Profile card ---------- */

.profile-card {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--color-surface);
  text-align: left;
  color: var(--color-ink);
  text-decoration: none;
}
.profile-card__avatar { width: 56px; height: 56px; font-size: 18px; }
.profile-card__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.profile-card__name { font-size: 18px; font-weight: 700; line-height: 22px; }
.profile-card__sub { font-size: 14px; line-height: 18px; color: var(--color-ink-muted); }

/* ---------- Grouped lists ---------- */

.group-block { display: flex; flex-direction: column; gap: 8px; }
.group-title {
  margin: 0 4px;
  font-size: 13px;
  font-weight: 700;
  line-height: 16px;
  color: var(--color-ink-muted);
}
.group {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 52px;
  padding: 8px 16px;
  text-align: left;
  text-decoration: none;
  color: var(--color-ink);
  font-size: 16px;
  line-height: 20px;
}
.row + .row::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 50px;
  border-top: var(--hairline) solid var(--color-line);
}
.row__icon { width: 20px; height: 20px; flex: none; }
.row__label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row__value { font-size: 15px; color: var(--color-ink-muted); }
.row__chev { width: 18px; height: 18px; flex: none; color: var(--color-ink-muted); }
.row--danger { color: var(--color-danger); }

/* Profile switcher rows */
.row--context { min-height: 64px; }
.row--context + .row::before,
.row--add::before { left: 70px; }
.row__avatar { width: 40px; height: 40px; font-size: 14px; }
.row__avatar--add {
  display: grid;
  place-items: center;
  border-radius: var(--radius-full);
  background: var(--color-field);
  flex: none;
}
.row__avatar--add svg { width: 16px; height: 16px; }
.row__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.row__sub { font-size: 13px; line-height: 16px; color: var(--color-ink-muted); }
.row--context[aria-checked="true"] .row__label { font-weight: 700; }
/* "Main" tag on the fan profile — the base account, like Instagram's primary */
.row__main { display: inline-block; margin-left: 8px; padding: 1.5px 8px; border-radius: 99px; background: var(--color-accent-soft); color: var(--color-accent-text); font-size: 11px; font-weight: 700; line-height: 16px; vertical-align: 1.5px; }

/* Radio indicator */
.radio {
  width: 24px;
  height: 24px;
  flex: none;
  border-radius: var(--radius-full);
  box-shadow: inset 0 0 0 1.5px var(--color-toggle-off);
  display: grid;
  place-items: center;
  color: var(--color-on-accent);
}
.radio svg { width: 12px; height: 12px; opacity: 0; }
[aria-checked="true"] > .radio,
[aria-checked="true"] .radio { background: var(--color-accent); box-shadow: none; }
[aria-checked="true"] .radio svg { opacity: 1; }

.screen-footer,
.screen-note {
  margin: 0 4px;
  font-size: 13px;
  line-height: 18px;
  color: var(--color-ink-muted);
}
.screen-footer { text-align: center; }

/* ---------- Appearance ---------- */

.theme-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.theme-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 8px 14px;
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-ink);
  box-shadow: inset 0 0 0 var(--hairline) var(--color-line);
  transition: box-shadow .15s ease;
}
.theme-option[aria-checked="true"] { box-shadow: inset 0 0 0 1.5px var(--color-accent); }
.theme-option__label { margin-top: 8px; font-size: 15px; font-weight: 700; line-height: 18px; }
.theme-option__sub { font-size: 12px; line-height: 16px; color: var(--color-ink-muted); }
.theme-option .radio { margin-top: 8px; }

/* Mini phone previews — fixed colors on purpose: they show each theme */
.theme-preview {
  position: relative;
  width: 100%;
  max-width: 88px;
  aspect-ratio: 9 / 16;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 0 0 var(--hairline) var(--color-line-strong);
  --p-bg: #F5F5F7; --p-surface: #FFFFFF; --p-ink: #17171C; --p-line: #E6E6EB;
  background: var(--p-bg);
}
.theme-preview--dark { --p-bg: #0F0F12; --p-surface: #18181C; --p-ink: #F2F2F5; --p-line: #2A2A31; }
.theme-preview--system { background: linear-gradient(135deg, #F5F5F7 50%, #0F0F12 50%); }
.theme-preview > span { position: absolute; left: 10%; right: 10%; border-radius: 3px; }
.tp-bar  { top: 0 !important; left: 0 !important; right: 0 !important; height: 14%; border-radius: 0 !important; background: var(--p-surface); }
.tp-line { top: 22%; height: 5%; background: var(--p-ink); opacity: .7; right: 35% !important; }
.tp-line--short { top: 31%; right: 55% !important; opacity: .35; }
.tp-card { top: 42%; height: 30%; background: var(--p-surface); box-shadow: 0 0 0 1px var(--p-line); }
.tp-nav {
  bottom: 0; left: 0 !important; right: 0 !important; height: 12%; border-radius: 0 !important;
  background: var(--p-surface);
  display: flex; align-items: center; justify-content: space-around;
}
.tp-nav i { width: 14%; height: 30%; border-radius: 2px; background: var(--p-ink); opacity: .5; }
.tp-nav i:first-child { background: #8B5CFF; opacity: 1; }
.theme-preview--system .tp-bar,
.theme-preview--system .tp-card,
.theme-preview--system .tp-nav { background: rgba(255, 255, 255, 0.85); }
.theme-preview--system .tp-line { background: #17171C; }

/* Compact rows (desktop drop-up) */
.row--compact { min-height: 44px; padding: 6px 16px; font-size: 15px; }
.row--compact.row--context { min-height: 52px; }
.row--compact .row__avatar { width: 36px; height: 36px; font-size: 13px; }
.row--compact .radio { width: 20px; height: 20px; }
.row--compact .radio svg { width: 10px; height: 10px; }

/* ---------- Search ---------- */

.screen-bar--custom { grid-template-columns: var(--tap) 1fr 4px; }

.search-field {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  height: 40px;
  padding: 0 4px 0 12px;
  border-radius: var(--radius-md);
  background: var(--color-field);
  color: var(--color-ink);
  transition: box-shadow .15s ease;
}
.search-field:focus-within { background: var(--color-surface); box-shadow: inset 0 0 0 var(--hairline) var(--color-line-strong), 0 1px 3px rgba(0, 0, 0, 0.06); }
.search-field__icon { width: 18px; height: 18px; flex: none; color: var(--color-ink-muted); }
.search-field input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: var(--fs-field);
  -webkit-appearance: none;
  appearance: none;
}
.search-field input::placeholder { color: var(--color-ink-muted); opacity: 1; }
.search-field input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search-field__clear {
  width: 32px;
  height: 32px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  color: var(--color-ink-muted);
}
.search-field__clear svg { width: 18px; height: 18px; }
.search-field__clear[hidden] { display: none; }

@media (min-width: 1024px) {
  .screen-bar--custom .search-field { width: 100%; max-width: 568px; justify-self: center; }
}

.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  margin: 0 calc(-1 * max(16px, env(safe-area-inset-right, 0px)));
  padding: 0 max(16px, env(safe-area-inset-right, 0px));
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  height: 36px;
  padding: 0 14px;
  border-radius: var(--radius-full);
  background: var(--color-field);
  color: var(--color-ink-2);
  font-size: 14px;
  white-space: nowrap;
  transition: background-color .15s ease, color .15s ease;
}
.chip[aria-pressed="true"] {
  background: var(--color-ink);
  color: var(--color-surface);
  font-weight: 700;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 48px 16px;
  text-align: center;
}
.empty-state__icon { width: 36px; height: 36px; color: var(--color-ink-muted); margin-bottom: 8px; }
.empty-state__title { margin: 0; font-size: 17px; font-weight: 700; line-height: 22px; }
.empty-state__text { margin: 0; font-size: 14px; line-height: 20px; color: var(--color-ink-muted); }
/* Desktop page titles — Tasks, Crew, Offers, Calendar share one scale */
@media (min-width: 1024px) {
  .tk-head h1, .ob__title, .calv__title, .page-title { font-size: 28px; line-height: 34px; font-weight: 900; letter-spacing: -.02em; }
}
/* Desktop: an empty page takes the Search-landing shape — one hero in the upper middle, nothing dangling in a corner */
@keyframes em-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (min-width: 1024px) {
  .empty-state--hero { gap: 10px; max-width: 680px; margin: 0 auto; padding: clamp(40px, 13vh, 150px) 24px clamp(32px, 8vh, 96px); animation: em-up .45s cubic-bezier(.2, .8, .2, 1) both; }
  .empty-state--hero .empty-state__icon { box-sizing: border-box; width: 76px; height: 76px; padding: 14px; margin-bottom: 16px; border-radius: 50%; background: var(--color-field); color: var(--color-ink); }
  .empty-state--hero .empty-state__title { max-width: 20ch; font-size: clamp(28px, 3vw, 40px); font-weight: 900; line-height: 1.08; letter-spacing: -.02em; text-wrap: balance; }
  .empty-state--hero .empty-state__text { max-width: 48ch; font-size: 17px; line-height: 25px; text-wrap: pretty; }
  .empty-state--hero .pf-btn, .empty-state--hero .em-acts { margin-top: 20px; }
  .empty-state--hero .pf-btn { height: 48px; padding: 0 26px; border-radius: 14px; font-size: 16px; }
  .empty-state--hero .em-acts { display: flex; gap: 10px; }
  .empty-state--hero .em-acts .pf-btn { margin-top: 0; }
}

/* ---------- All settings: master (left) / detail (right) ---------- */

.screen--wide .screen-inner { max-width: var(--page-w); }
@media (min-width: 1024px) { .screen--wide .screen-inner { padding-left: var(--page-pad); padding-right: var(--page-pad); padding-top: 28px; } }

.settings-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.settings-nav { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.settings-pane { display: flex; flex-direction: column; gap: 12px; min-width: 0; }

.settings-pane__head { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.settings-pane__title { margin: 0; font-size: 24px; font-weight: 700; line-height: 30px; outline: none; }
.settings-pane__sub { margin: 0; font-size: 14px; line-height: 20px; color: var(--color-ink-muted); max-width: 520px; }
.settings-pane .group-title { margin-top: 8px; }

/* Selected section in the left list */
.settings-nav__item[aria-current="page"] {
  background: var(--nav-bg-active);
  color: var(--nav-text-active);
  font-weight: 700;
}
.settings-nav__item[aria-current="page"] .row__icon { color: var(--nav-icon-active); }
.settings-nav .row__value { max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Profile pane */
.settings-profile { display: flex; align-items: center; gap: 16px; padding: 20px; }
.settings-profile__avatar { width: 72px; height: 72px; font-size: 24px; }
.settings-profile > div { flex: 1; min-width: 0; }
.settings-profile__name { margin: 0; font-size: 20px; font-weight: 700; line-height: 26px; }
.settings-profile__meta { margin: 2px 0 0; font-size: 14px; line-height: 20px; color: var(--color-ink-muted); }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: none;
  height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  text-decoration: none !important;
  font-family: inherit;
  transition: background-color .15s ease, box-shadow .2s ease;
  background: var(--color-field);
  color: var(--color-ink);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}
.btn-secondary:hover { background: var(--color-hover, var(--color-field)); box-shadow: 0 0 0 1px var(--color-line-strong); }
.btn-secondary:disabled { opacity: .45; box-shadow: none; }

/* Appearance inside the pane: keep cards a comfortable size */
.settings-pane .theme-options { max-width: 560px; }

/* Phones/tablets (22 Oct): Settings is a list; every section opens as its own page (title in the bar, from the top) */
@media (max-width: 1023px) {
  .settings-layout.is-list .settings-pane,
  .settings-layout.is-detail .settings-nav { display: none; }
  .settings-layout.is-detail .settings-pane__title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .settings-layout.is-detail .settings-pane__head:not(:has(.settings-pane__sub)) { display: contents; }
  .settings-nav__item[aria-current="page"] { background: none; color: inherit; font-weight: inherit; }
  .settings-nav__item[aria-current="page"] .row__icon { color: inherit; }
  .settings-pane.is-in { animation: set-in .26s cubic-bezier(.2,.7,.2,1); }
  .settings-nav.is-back { animation: set-back .26s cubic-bezier(.2,.7,.2,1); }
}
@keyframes set-in { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes set-back { from { opacity: 0; transform: translateX(-20px); } to { opacity: 1; transform: none; } }

@media (min-width: 1024px) {
  .settings-layout { grid-template-columns: 340px minmax(0, 1fr); gap: 40px; }
  .settings-nav {
    position: sticky;
    top: 0;
    max-height: calc(100vh - var(--header-h) - 64px);
    overflow-y: auto;
    scrollbar-width: thin;
    padding-right: 4px;
  }
  .settings-pane { padding-top: 4px; }
}

/* ---------- Hover (pointer devices) ---------- */

@media (hover: hover) {
  .row:hover, .profile-card:hover { background: var(--color-hover); }
  .row--danger:hover { background: var(--color-hover); }
  .chip:not([aria-pressed="true"]):hover { color: var(--color-ink); background: var(--color-line-strong); }
  .theme-option:hover { box-shadow: inset 0 0 0 var(--hairline) var(--color-line-strong); }
  .theme-option[aria-checked="true"]:hover { box-shadow: inset 0 0 0 1.5px var(--color-accent); }
}
.row:active, .profile-card:active, .theme-option:active { opacity: .6; }

/* ---------- Desktop: screens live in the content area ---------- */

@media (min-width: 1024px) {
  .screen {
    inset: calc(var(--header-h) + env(safe-area-inset-top, 0px)) 0 0 var(--rail-w);
    z-index: 15;
  }
  .screen.is-entering { animation-name: screen-fade-in; animation-duration: .16s; }
  .screen.is-leaving  { animation-name: screen-fade-out; animation-duration: .12s; }
  .screen-bar {
    min-height: 72px;
    padding-top: 0;
    padding-left: 24px;
    padding-right: 24px;          /* the corner avatar overlays the empty right slot */
    box-shadow: none;
    border-bottom: var(--hairline) solid var(--color-line);
  }
  .screen-inner { padding-top: 32px; }

  /* Full page (All settings): covers the sidebar and the app header */
  .screen--full { inset: 0; z-index: 50; }
  .screen--full .screen-bar {
    min-height: 64px;
    padding-top: env(safe-area-inset-top, 0px);
    padding-left: 24px;
    padding-right: 24px;
    border-bottom: 0;
    box-shadow: var(--shadow-bar);
  }
  body.has-screen { overflow: auto; }
}

@keyframes screen-fade-in  { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes screen-fade-out { from { opacity: 1; } to { opacity: 0; } }

/* ---------- Root screens (Search): a destination, not a pushed page ---------- */

.screen--root .screen-bar { grid-template-columns: minmax(0, 1fr); padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.screen--root.is-entering { animation-name: screen-fade-in; animation-duration: .16s; }
.screen--root.is-leaving  { animation-name: screen-fade-out; animation-duration: .12s; }
.screen--root .screen-inner { padding-bottom: calc(var(--tabbar-h) + 32px + env(safe-area-inset-bottom, 0px)); }
body.has-root-screen .app-nav { z-index: 45; }      /* tab bar stays on top of Search */

@media (min-width: 1024px) {
  .screen--root .screen-bar { padding-left: 24px; padding-right: 24px; }
  .screen--root .screen-inner { padding-bottom: 32px; }
}

/* ---------- Language ---------- */

.row--lang { min-height: 60px; }
.row--lang + .row::before { left: 16px; }
.row--lang .row__label { font-weight: 400; }
.row--lang[aria-checked="true"] .row__label { font-weight: 700; }

/* ---------- Text button ---------- */

.link-btn {
  height: 32px;
  padding: 0 4px;
  border-radius: var(--radius-sm);
  color: var(--color-ink-muted);
  font-size: 14px;
  font-weight: 400;
  transition: color .15s ease, background-color .15s ease;
  white-space: nowrap;
}
.link-btn[hidden] { display: none; }

/* ---------- Notifications ---------- */

.avatar--person { background: var(--color-field); color: var(--color-ink-2); font-weight: 700; }

.notif {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  padding: 12px 16px;
  text-align: left;
  text-decoration: none;
  color: var(--color-ink);
  transition: background-color .15s ease;
}
.notif-group .notif + .notif::before {
  content: ""; position: absolute; top: 0; right: 0; left: 72px;
  border-top: var(--hairline) solid var(--color-line);
}
.notif__avatar { position: relative; flex: none; width: 44px; height: 44px; }
.notif__avatar .avatar { width: 44px; height: 44px; font-size: 15px; }
.notif__badge {
  position: absolute; right: -3px; bottom: -3px;
  width: 20px; height: 20px;
  display: grid; place-items: center;
  border-radius: var(--radius-full);
  background: var(--color-surface);
  color: var(--color-ink-muted);
  box-shadow: 0 0 0 var(--hairline) var(--color-line-strong), 0 1px 2px rgba(0, 0, 0, 0.06);
}
.notif__badge svg { width: 10px; height: 10px; }
.notif__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.notif__text { font-size: 14px; line-height: 19px; color: var(--color-ink-2); }
.notif__text b { color: var(--color-ink); font-weight: 700; }
.notif--clamp .notif__text { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.notif__time { font-size: 12px; line-height: 16px; color: var(--color-ink-muted); }
.notif.is-unread .notif__text { color: var(--color-ink); }
.notif__dot {
  flex: none; align-self: center;
  width: 8px; height: 8px;
  border-radius: var(--radius-full);
  background: var(--color-badge);
  visibility: hidden;
}
.notif.is-unread .notif__dot { visibility: visible; }

.notif-toolbar { display: flex; align-items: center; gap: 12px; }
.notif-toolbar .chips { flex: 1; margin-right: 0; }

@media (hover: hover) {
  .notif:hover { background: var(--color-hover); }
  .link-btn:hover { background: var(--nav-bg-hover); color: var(--color-ink); }
  .settings-nav__item[aria-current="page"]:hover { background: var(--nav-bg-active); }
}
.notif:active { opacity: .6; }

/* Back to the fan profile (only while acting as a project) */
.row--back-fan .row__label { font-weight: 700; }
.row--back-fan .row__avatar { box-shadow: 0 0 0 2px var(--color-surface), 0 0 0 3px var(--color-line-strong); }
.popover [data-list="back"] { padding-top: 4px; }

/* A fan's own profile behaves like a tab on phones: the tab bar stays on top, no Back, it fades in */
@media (max-width: 1023px) {
  body.has-tab-screen .app-nav { z-index: 46; }
  .screen.is-tabbed .screen-bar__nav { visibility: hidden; pointer-events: none; }
  .screen.is-tabbed .screen-body { padding-bottom: calc(var(--tabbar-h) + 20px + env(safe-area-inset-bottom, 0px)); }
  .screen.is-tabbed.is-tab-in { animation: screen-fade-in .2s ease both; }
  .screen.is-tabbed.is-leaving { animation: screen-fade-out .12s ease both; }
}
/* …and no top bar: the cover starts at the top, ⋯ floats on it */
@media (max-width: 1023px) {
  .screen.is-tabbed .screen-bar { position: absolute; z-index: 3; top: 0; left: 0; right: 0; min-height: 0; padding: calc(env(safe-area-inset-top, 0px) + 10px) 12px 0; background: transparent; box-shadow: none; border: 0; pointer-events: none; }
  .screen.is-tabbed .screen-bar__title, .screen.is-tabbed .screen-bar__nav { display: none; }
  .screen.is-tabbed .screen-bar .pf-bar-more { grid-column: 3; pointer-events: auto; width: 38px; height: 38px; border-radius: 50%; background: rgba(16, 16, 20, 0.45); color: #FFFFFF; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
  .screen.is-tabbed .screen-body { padding-top: env(safe-area-inset-top, 0px); }
}

/* ---------- Empty states: next step + suggestions (never a dead end) ---------- */
.em-acts { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 16px; }
.em-btn { display: inline-flex; width: auto; padding: 0 20px; text-decoration: none; }
.em-sug { max-width: 560px; margin: 4px auto 24px; padding: 0 16px; }
.em-sug h3 { margin: 0 0 8px; font-size: 13px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: var(--color-ink-muted); }
.em-list { display: flex; flex-direction: column; border-radius: 16px; background: var(--color-surface); box-shadow: 0 0 0 var(--hairline) var(--color-line); overflow: hidden; }
.em-row { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 14px; color: var(--color-ink); text-decoration: none; }
.em-row + .em-row::before { content: ''; position: absolute; top: 0; left: 70px; right: 0; border-top: var(--hairline) solid var(--color-line); }
.em-av { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; overflow: hidden; background: var(--color-field); font-size: 14px; font-weight: 700; color: var(--color-ink-2); }
.em-av--sq { border-radius: 10px; }
.em-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.em-row__txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.em-row__txt b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.em-row__txt small { font-size: 13px; color: var(--color-ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-transform: capitalize; }
.em-row__chev { flex: none; width: 16px; height: 16px; color: var(--color-ink-muted); }
.em-row:active { background: var(--color-hover); }
@media (hover: hover) { .em-row:hover { background: var(--color-hover); } }
.feed-end { padding: 28px 0 8px; }
.em-av { position: relative; }
.em-av img { position: absolute; inset: 0; }
.sx__sug { padding-top: 8px; }
.sx__sug .em-sug { margin-bottom: 20px; }
.sx__results .em-sug { padding: 0; }

/* Leaving Search (or the profile tab) for another tab: it fades out *under* the tab bar, never over it */
@media (max-width: 1023px) {
  .screen--root.is-leaving, .screen.is-tabbed.is-leaving { z-index: 19; }
}

/* A pushed page scrolls up and down only. overflow-y:auto silently made it scroll sideways too, so on iOS
   a sideways tab swipe dragged (and bounced) the whole page. */
.screen-body { overflow-x: hidden; overscroll-behavior-x: none; touch-action: pan-y pinch-zoom; }

/* ---------- Desktop pushed pages, 22 Oct: no bar ----------
   The title is a page title (28/900) lined up with the content (app.js measures --bar-l / --bar-r);
   Back is a round button in the margin to its left. Nothing separates the title from the page. */
@media (min-width: 1024px) {
  .screen:not(.screen--root) > .screen-bar {
    min-height: 0; padding: 28px var(--bar-r, 24px) 0 calc(var(--bar-l, 76px) - 54px);
    background: none; border-bottom: 0; box-shadow: none; gap: 14px; }
  .screen:not(.screen--root) > .screen-bar:not(.screen-bar--custom) { grid-template-columns: 40px minmax(0, 1fr); }
  .screen:not(.screen--root) > .screen-bar .screen-bar__title { text-align: left; font-size: 28px; line-height: 34px; font-weight: 900; letter-spacing: -.02em;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .screen:not(.screen--root) > .screen-bar .screen-bar__spacer { display: none; }
  .screen:not(.screen--root) > .screen-bar .screen-bar__nav { width: 40px; height: 40px; border-radius: 50%; background: var(--color-field); color: var(--color-ink); }
  .screen:not(.screen--root) > .screen-bar .screen-bar__nav svg { width: 20px; height: 20px; }
  .screen:not(.screen--root) > .screen-bar .screen-bar__nav:hover { background: var(--color-hover); box-shadow: inset 0 0 0 var(--hairline) var(--color-line-strong); }
  .screen:not(.screen--root) .screen-inner { padding-top: 20px; }
}

/* ---------- App icon (30 Oct, owner) — one row of tiles like iOS alternate icons; scrolls sideways on narrow phones ---------- */
.appicons { margin-top: 28px; }
.appicons .group-title { margin-bottom: 10px; }
.appicons__row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; max-width: 440px; margin: 0 0 10px; padding: 4px 2px 6px; }
.appicon { min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 0; background: none; color: var(--color-ink); font: inherit; }
.appicon img { width: 100%; max-width: 64px; height: auto; aspect-ratio: 1; border-radius: 23%; box-shadow: 0 0 0 var(--hairline) var(--color-line-strong), 0 4px 14px rgba(0, 0, 0, .12); transition: box-shadow .15s ease, transform .15s ease; }
.appicon span { font-size: 12px; line-height: 16px; color: var(--color-ink-muted); text-align: center; max-width: 100%; overflow-wrap: anywhere; }
.appicon[aria-checked="true"] img { box-shadow: 0 0 0 2px var(--color-surface, #fff), 0 0 0 4px var(--color-accent), 0 0 18px color-mix(in srgb, var(--color-accent) 35%, transparent); }
.appicon[aria-checked="true"] span { color: var(--color-ink); font-weight: 700; }
.appicon:active img { transform: scale(.96); }
@media (hover: hover) { .appicon:hover img { transform: translateY(-1px); } }
