/* Passport navigation: generous touch targets, one quiet group for the three tools. */
.topbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: "brand tools account";
  align-items: center;
  column-gap: 24px;
  row-gap: 10px;
  width: min(100%, 1040px);
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + 14px) 24px 12px;
}
.topbar .brand { grid-area: brand; min-width: 0; min-height: 44px; justify-self: start; }
.topbar .brand img { width: 119px; height: auto; }
.topbar .account-button {
  grid-area: account;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 88px;
  margin: 0;
  padding: 10px 17px;
  border: 1px solid rgba(255, 248, 239, .25);
  border-radius: 999px;
  background: rgba(255, 248, 239, .04);
  color: var(--cc-on-desk);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
}
.topbar .topbar-end {
  grid-area: tools;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 6px;
  justify-self: end;
  width: min(100%, 370px);
  padding: 5px;
  border: 1px solid rgba(255, 248, 239, .13);
  border-radius: 18px;
  background: rgba(255, 248, 239, .055);
}
.topbar .header-action {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
  height: auto;
  min-height: 46px;
  margin: 0;
  padding: 7px 6px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--cc-on-desk);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  transition: background-color .18s, transform .18s;
}
.topbar .header-action svg { flex: none; width: 21px; height: 21px; stroke-width: 1.7; }
.topbar .my-qr-button { background: rgba(255, 248, 239, .11); }
.topbar .my-qr-button span { font-size: 13px; font-weight: 500; }
.topbar .counter-seal { display: block; width: 24px; height: 24px; flex: none; }
.topbar .counter-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.topbar .counter b { color: var(--cc-on-desk); font-size: 14px; font-weight: 700; }
.topbar .counter-total { color: rgba(255, 248, 239, .7); font-size: 12px; font-variant-numeric: tabular-nums; }
.topbar .counter-copy small { color: rgba(255, 248, 239, .7); font-size: 10px; line-height: 1.1; }
.topbar .header-action:active, .topbar .account-button:active { transform: scale(.97); background: rgba(255, 248, 239, .18); }
.topbar button:focus-visible { outline: 2px solid #fff8ef; outline-offset: 3px; }
@media (hover: hover) {
  .topbar .header-action:hover, .topbar .account-button:hover { background: rgba(255, 248, 239, .15); }
}
@media (max-width: 680px) {
  .topbar {
    grid-template-columns: minmax(0, 1fr) 130px 64px;
    grid-template-areas: "brand tools account";
    column-gap: 6px;
    row-gap: 0;
    max-width: none;
    padding: calc(env(safe-area-inset-top) + 5px) max(10px, env(safe-area-inset-right)) 5px max(10px, env(safe-area-inset-left));
  }
  .topbar .brand img { width: clamp(72px, 22vw, 92px); max-width: 100%; }
  .topbar .topbar-end {
    grid-template-columns: 46px 40px 40px;
    gap: 2px;
    width: 130px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }
  .topbar .header-action {
    min-height: 44px;
    padding: 0;
    gap: 0;
    border-radius: 10px;
  }
  .topbar .header-action svg { width: 20px; height: 20px; }
  .topbar .counter-seal,
  .topbar .counter-copy small,
  .topbar .map-btn > span,
  .topbar .my-qr-button > span { display: none; }
  .topbar .counter-copy { display: block; }
  .topbar .counter b { font-size: 13px; }
  .topbar .counter-total { font-size: 11px; }
  .topbar .my-qr-button { background: transparent; }
  .topbar .account-button {
    min-width: 0;
    width: 64px;
    min-height: 44px;
    padding: 0 5px;
    font-size: 11px;
    background: transparent;
    border-color: rgba(255, 248, 239, .18);
  }
}
@media (max-height: 560px) and (min-width: 681px) {
  .topbar { padding-top: calc(env(safe-area-inset-top) + 4px); padding-bottom: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  .topbar .header-action { transition: none; }
}
