#guest-header[hidden],#guest-nav[hidden],body.workspace-mode #guest-nav { display: none; }
body[data-guest-browsing]:not(.workspace-mode) .sidebar { display: none; }
body[data-guest-browsing]:not(.workspace-mode) > .shell { margin-inline-start: 0; width: 100%; }
body[data-guest-browsing]:not(.workspace-mode) > .shell > .topbar {
  display: flex;
  border-block-end: 1px solid var(--hair);
  background: var(--bg);
}
body[data-guest-browsing] > .shell > .topbar > :not(#guest-header) { display: none; }
#guest-header { display: flex; align-items: center; justify-content: space-between; width: 100%; }
#guest-header a {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: inherit;
}
body #guest-header a .tonmio-brand-icon { display: inline-block; width: 22px; height: 26px; background-color: var(--ink); }
body #guest-header a .tonmio-word-dark { display: inline-block; }
body #guest-header a .tonmio-word-light { display: none; }
body #guest-header button {
  min-height: 38px;
  padding-inline: 16px;
  border: 1px solid var(--hair);
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--ink);
  font-weight: 650;
}
body#root[data-guest-browsing]:not(.workspace-mode) #guest-nav {
  z-index: 20;
  position: fixed;
  inset: auto max(12px,env(safe-area-inset-right))
    calc(var(--mobile-nav-edge-gap,12px) + var(--app-visible-bottom-inset,0px)) max(12px,env(safe-area-inset-left));
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  width: auto;
  max-width: 520px;
  height: calc(var(--mobile-nav-row-height,54px) + 8px);
  margin-inline: auto;
  padding: 4px;
  border: 1px solid var(--hair);
  border-radius: var(--r-pill);
  background: rgb(255 255 255 / .94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}
body #guest-nav button {
  display: flex;
  flex-direction: column;
  gap: 3px;
  justify-content: center;
  align-items: center;
  min-width: 0;
  min-height: 0;
  padding: 4px;
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--text-secondary);
  font-size: .75rem;
  line-height: 1.12;
}
body #guest-nav button[aria-current="page"] {
  background: var(--surface-muted);
  color: var(--ink);
  font-weight: 700;
}
#guest-nav button svg { width: 20px; height: 20px; }
body:is(.tonmio-keyboard-open,.tonmio-onboarding-open) #guest-nav { visibility: hidden; }
body[data-guest-browsing] #main > .guest-search {
  width: min(100%, 850px);
  margin-inline: auto;
  grid-template-rows: none;
}
body[data-guest-browsing] #main > .guest-directory:not(:has(.discover-feed)) {
  display: grid;
  align-content: start;
  gap: var(--space-3);
  padding-inline: var(--page-gutter,28px);
}
.guest-legal { display: flex; gap: var(--space-3); justify-content: center; padding-block: var(--space-3); font-size: var(--type-meta); }
body #main .guest-legal a { color: var(--text-secondary); }
body #main .guest-directory .guest-tab-controls { margin: 0; }
body #main .guest-search > .guest-directory-tabs { margin: 0; }
body #main .guest-directory .discover-card-foot { justify-content: flex-end; }
body #main .guest-directory .discover-card-foot:has(.discover-card-terms) { justify-content: space-between; }
.guest-search .search-response { display: grid; gap: var(--space-2); }
body #main .guest-search .tonmio-directory-row {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: center;
  padding-inline-end: var(--space-2);
  border-radius: var(--r-inner);
  background: var(--surface);
  box-shadow: var(--shadow);
}
body #main .guest-search .tonmio-directory-row > .tonmio-compact-row {
  min-width: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
body #main .guest-search .discover-bookmark { position: static; }
body #main .guest-search .search-query { position: relative; }
body#root #main .search-round6 .guest-query { align-items: center; }
body #main .guest-directory [data-guest-more] { justify-self: center; }

body #dialog .guest-detail-actions { display: grid; gap: var(--space-2); margin-block: var(--space-3) 0; }
body #dialog .guest-detail-actions button { width: 100%; }
body #dialog .guest-detail-actions button.text-button { justify-content: center; }
body #dialog .guest-listing-heading { display: flex; align-items: center; gap: var(--space-2); }
body #dialog .guest-listing-heading :is(h2,p) { margin: 0; }
body #dialog .guest-listing-heading .tonmio-date-stub { flex: none; }
body #dialog .guest-profile-tabs button:last-child { display: inline-flex; align-items: center; justify-content: center; gap: 4px; }
body #dialog .guest-profile-tabs button:last-child svg { flex: none; }
body #dialog .guest-profile-sheet .tonmio-profile-panel[hidden] { display: none; }
body #dialog .guest-profile-sheet .tonmio-profile-panel { min-height: auto; }
body #dialog .guest-profile-sheet .tonmio-profile-panel > .tonmio-sample { margin-block: var(--space-3); }
.guest-locked { padding: var(--space-3); border: 1px dashed var(--hair); border-radius: var(--r-inner); }
.guest-locked p { display: flex; align-items: center; gap: var(--space-1); margin-block: 0 var(--space-2); color: var(--text-secondary); font-size: var(--type-meta); }
.guest-locked dl { display: grid; gap: var(--space-1); margin: 0; }
.guest-locked dl div { display: flex; justify-content: space-between; gap: var(--space-2); }
.guest-locked dd { margin: 0; }
.guest-locked dd span { display: inline-block; width: 5em; height: .8em; border-radius: var(--r-pill); background: var(--text-secondary); filter: blur(4px); opacity: .45; }

body #dialog:has([data-guest-gate-sheet]) { margin-block: auto 0; }
body #dialog:has([data-guest-gate-sheet]) .dialog-head { position: absolute; z-index: 1; inset: 8px 8px auto auto; padding: 0; border: 0; background: transparent; }
body #dialog:has([data-guest-gate-sheet]) .dialog-head #dialog-back { display: none; }
body #dialog [data-guest-gate-sheet] { max-width: 480px; margin-inline: auto; padding-block: 2px var(--space-2); text-align: center; }
.guest-grab { display: block; width: 34px; height: 4px; margin: 0 auto 14px; border-radius: var(--r-pill); background: var(--hair); }
.guest-gold-pin {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin: 0 auto var(--space-2);
  border-radius: 50%;
  background: var(--gold-soft);
}
.guest-gold-pin::before {
  content: '';
  width: 28px;
  height: 33px;
  background: var(--gold);
  mask: url("assets/tonmio-header-pin.svg") center / contain no-repeat;
}
body #dialog [data-guest-gate-sheet] :is(h2,p) { margin-block: 0 var(--space-2); }
body #dialog [data-guest-gate-sheet] p { color: var(--text-secondary); }
body #dialog [data-guest-gate-sheet] ul { display: grid; gap: var(--space-1); width: fit-content; margin: var(--space-3) auto; text-align: start; }
body #dialog [data-guest-gate-sheet] li::marker { color: var(--accent-ink); }

@media (min-width: 761px) {
  body[data-guest-browsing]:not(.workspace-mode) #main { padding-bottom: 96px; }
}
@media (max-width: 760px) {
  body[data-guest-browsing]:not(.workspace-mode) > .shell > .topbar { padding-inline: var(--page-gutter,28px); }
  body[data-guest-browsing]:not(.workspace-mode) #main > .guest-search { padding-block-start: var(--space-3); }
}
