h1, h2, .memory-detail h3, .guest-event-spotlight h3, .staple-view-caption h3, .activity-card h3, .empty-state h3 {
  font-family: var(--display-face);
  font-weight: 500;
  letter-spacing: -.035em;
}
h3, h4, h5, h6 { overflow-wrap: anywhere; }
::selection { background: var(--selected); color: var(--ink); }
input, select, textarea { color: var(--ink); border-color: var(--control-edge); background: var(--paper); caret-color: var(--teal); }
input::placeholder, textarea::placeholder { color: var(--muted); }
textarea { font-family: inherit; }
input:is([type="checkbox"], [type="radio"]) { accent-color: var(--teal); }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; box-shadow: 0 0 0 3px var(--paper); }

.site-masthead {
  background: var(--paper);
  color: var(--ink);
  border-block-end: 1px solid var(--separator);
}
.site-header, main, .site-footer { max-width: 1320px; }
.site-header { padding-block: 10px; min-height: 60px; }
.site-header .brand {
  gap: .25em;
  color: var(--ink);
  text-decoration: none;
  font: 700 clamp(1.35rem, 2.25vw, 1.875rem)/1 var(--display-face);
  letter-spacing: -.065em;
  white-space: nowrap;
}
.site-header .brand img { flex: none; width: 1.17em; height: auto; }
.site-header .header-button {
  border-color: var(--control-edge);
  background: none;
  color: var(--teal);
  min-height: 44px;
}
.site-header .header-button:hover:not(:disabled) { background: var(--reading); }
.site-header :is(.header-button, .brand):focus-visible { outline-color: var(--teal); box-shadow: none; }
.site-footer {
  border-block-start: 1px solid var(--separator);
  padding-block-start: 1rem;
  color: var(--muted);
}

.workspace-nav {
  background: var(--paper);
  gap: 4px 10px;
  margin-block-end: 1.25rem;
  padding-block: 5px;
  border-color: var(--separator);
}
.workspace-primary, .workspace-utilities { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.workspace-utilities { margin-inline-start: auto; }
.workspace-nav a {
  border-radius: 0;
  min-block-size: 44px;
  box-shadow: inset 0 -1px transparent;
  font-size: .92rem;
  font-weight: 560;
}
.workspace-nav a[aria-current="page"] {
  color: var(--persimmon-text);
  background: none;
  box-shadow: inset 0 -3px var(--persimmon);
}
.workspace-nav a[aria-current="page"]:focus-visible { outline-offset: 0; }
.inbox-count { background: var(--accent-soft); color: var(--persimmon); border: 0; }

.button { border-radius: var(--radius); font-weight: 580; }
.button.primary, .button.on-blue { background: var(--teal); border-color: var(--teal); color: var(--white); }
.button.primary:hover:not(:disabled), .button.on-blue:hover:not(:disabled) { background: var(--teal-hover); }
.button.secondary { border-color: var(--control-edge); color: var(--teal); }
.button.secondary:hover:not(:disabled) { background: var(--reading); }
.button:is(.primary, .secondary)[aria-pressed="true"] {
  color: var(--ink);
  background: var(--quiet-cyan);
  border-color: var(--teal);
}
.text-button { color: var(--teal); font-weight: 560; text-underline-offset: .24em; }
.status-tag, .guest-tag, .permission-tag {
  background: var(--reading);
  color: var(--ink);
  border-color: var(--border);
  border-radius: .375rem;
  font-weight: 560;
}
.notice, .offer-note, .schedule-summary { background: var(--reading); color: var(--ink); border-color: var(--border); }
.notice.success { background: var(--success-surface); color: var(--success); border-color: var(--success); }
.notice.error { background: var(--error-surface); color: var(--error); border-color: var(--error); }

.auth-layout { gap: 0; border: 0; background: var(--paper); }
.welcome-panel {
  justify-content: center;
  gap: .875rem;
  padding: clamp(1.75rem, 5vw, 4.75rem) clamp(1.375rem, 4vw, 4.375rem) clamp(1.625rem, 5vw, 4.75rem) 0;
  background: var(--paper);
  color: var(--ink);
}
.welcome-panel h1 {
  max-width: 15ch;
  font-size: clamp(2.625rem, 6vw, 4.75rem);
  font-weight: 460;
  line-height: 1;
  letter-spacing: -.04em;
  text-wrap: balance;
}
.welcome-panel > p { max-width: 38ch; margin: 0; font-size: 1.075rem; color: var(--muted); }
.welcome-actions { margin-block-start: .5rem; }
.welcome-panel .welcome-browse {
  justify-content: center;
  min-block-size: 48px;
  background: var(--teal);
  border: 1px solid var(--teal);
  color: var(--paper);
}
.welcome-panel .welcome-browse:hover { background: var(--teal-hover); color: var(--paper); }
.welcome-browse svg {
  width: 1.5rem;
  height: 1.5rem;
  padding: .2rem;
  border-radius: 50%;
  color: var(--persimmon);
  background: var(--paper);
}
.auth-panel {
  padding: clamp(1.25rem, 3.2vw, 3rem);
  border-inline-start: 1px solid var(--separator);
  background: var(--paper);
  color: var(--ink);
}
.auth-panel h2 { line-height: 1.12; font-size: clamp(1.625rem, 2.2vw, 2.125rem); }
.auth-panel .section-description { color: var(--muted); }
.invite-panel { background: var(--reading); border: 1px solid var(--border); }

#workspace-view :is(.plans-section, .staples-section, .inbox-section, .activity-section) {
  border: 0;
  border-block-start: 1px solid var(--border);
  padding-inline: 0;
  background: transparent;
}
#workspace-view .section-top { align-items: center; gap: .55rem 1rem; }
.section-top h2, .workspace-heading h1, .work-overview h1 { font-size: clamp(1.85rem, 4vw, 2.9rem); line-height: 1.05; }
.verified-discovery { background: var(--white); }
.verified-map-canvas {
  border-radius: .375rem;
  border-color: var(--border);
  background: #e6e4dc;
}
.verified-map-controls { margin-block: .75rem .35rem; }
.verified-map-controls .button { min-height: 44px; }
.verified-discovery-fields { margin-block-start: 1rem; }
#verified-map { background: var(--white); padding: clamp(.625rem, 1.5vw, 1rem); }
.guest-event-spotlight { color: var(--ink); background: var(--paper); border-color: var(--border); }
.guest-event-spotlight .text-button { color: var(--teal); }
.guest-event-spotlight .guest-event-time { color: var(--muted); }

#workspace-view :is(.together-detail, .inbox-target, #together-invitation, .activity-card, .staple-search) {
  background: var(--white);
  border-color: var(--separator);
}
#workspace-view .inbox-card { margin-block-start: 0; border-radius: var(--radius); }
#workspace-view .inbox-card.unread { background: var(--cream); border-color: var(--border); }
#workspace-view #inbox-list {
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  max-inline-size: 54rem;
}
#workspace-view #inbox-list .inbox-card {
  position: relative;
  border: 0;
  border-block-start: 1px solid var(--separator);
  border-radius: 0;
}
#workspace-view #inbox-list .inbox-card:not(.unread) { padding-inline-start: .875rem; }
#workspace-view #inbox-list .inbox-card.unread::before {
  content: "";
  position: absolute;
  inset-block-start: 1.3rem;
  inset-inline-start: .625rem;
  width: .4rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--persimmon);
}
#workspace-view #inbox-list .inbox-card.unread { padding-inline-start: 1.5rem; }
#inbox-list .inbox-card h3 { font-size: 1.25rem; line-height: 1.18; }
#inbox-list .inbox-card .inbox-notice-meta { font-size: .8125rem; }
#inbox-list .inbox-card > .button { margin-block-start: .875rem; }
.inbox-notice-meta, .booking-code, time { font-variant-numeric: tabular-nums; }
#together-invitation { padding: clamp(.875rem, 3vw, 1.5rem); border-radius: var(--radius); }
.together-invitation-sender { color: var(--muted); font-weight: 560; margin-block-end: .375rem; }
.together-invitation-event { font-family: var(--display-face); font-weight: 500; line-height: 1.1; font-size: clamp(1.5rem, 3vw, 2.25rem); }
.together-invitation-deadline { background: var(--reading); padding: .45rem .6rem; width: fit-content; }
.together-plan-row, .verified-event-row { border-color: var(--separator); }
#together-plans, #together > .together-detail { max-inline-size: 54rem; }
#together .together-detail { border-radius: var(--radius); }
#together .together-plan-row { padding-block: 1rem; }
#together .together-plan-row h3 { font-weight: 530; }

.staple-photo-mount { background: var(--ink); border-color: var(--ink); border-radius: 2px; }
.staple-photo-mark {
  padding: .4rem;
  background: var(--paper);
  border-radius: 0;
  border: 1px solid var(--ink);
  transform-origin: 72% 74%;
}
.staple-photo-settles { animation: staple-settles 260ms cubic-bezier(.2,.85,.3,1.1) both; }
@keyframes staple-settles {
  from { transform: translateY(-8px) rotate(-8deg); }
  to { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .staple-photo-settles { animation: none; }
}
.staple-view-caption { padding-block-start: .7rem; border-block-start: 1px solid var(--separator); }
.memory-audience { background: var(--reading); border-color: var(--border); }
.staple-access-summary { color: var(--ink); }
.staple-record .guest-tag { border: 0; padding-inline: 0; background: transparent; }
.shared-staples-preview { background: var(--white); border-color: var(--border); }

#workspace-view[data-current-area="work"] :is(.host-activities-panel, .host-playbook-panel, #staff-completion-panel, #practice-operations-review, #organizer-verification-review-panel) {
  padding-inline: clamp(.75rem, 2vw, 1.5rem);
  background: var(--white);
  border: 1px solid var(--separator);
}
.work-overview { border-block-end: 1px solid var(--border); }
.work-tools a { color: var(--ink); border-color: var(--separator); }
.work-tools a:hover { background: var(--reading); }
#activity-roster-panel, #staff-completion-roster { background: var(--white); border-radius: 0; border-color: var(--border); }
.host-round-counts { border-block: 1px solid var(--separator); padding-block: .45rem; gap: .65rem 1rem; }
.host-round-counts strong, .person-name { color: var(--ink); font-weight: 750; }
#workspace-view[data-current-area="work"] .people-list > li { padding-block: .5rem; }
.practice-work-item, .practice-visit-panel { border-color: var(--separator); background: var(--white); }
:is(#organizer-verification-panel, #organizer-verification-review-panel) .text-button[target="_blank"] {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

@media (max-width: 680px) {
  .site-masthead { position: sticky; inset-block-start: 0; z-index: 8; }
  .site-header { padding-block: .25rem; min-height: 56px; }
  .workspace-nav {
    display: flex;
    position: static;
    margin-block-end: .625rem;
    padding-block: 0;
    justify-content: end;
  }
  .workspace-utilities {
    justify-content: flex-end;
    gap: 2px;
  }
  .workspace-nav a { font-size: .8125rem; }
  .workspace-primary {
    position: fixed;
    z-index: 8;
    inset: auto 0 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: .25rem max(.5rem, env(safe-area-inset-right)) max(.25rem, env(safe-area-inset-bottom)) max(.5rem, env(safe-area-inset-left));
    gap: 2px;
    background: var(--paper);
    border-block-start: 1px solid var(--separator);
  }
  .workspace-primary a { flex-direction: column; gap: 3px; padding-block: 4px 7px; }
  .workspace-primary a::before {
    content: "";
    background: currentColor;
    width: 20px;
    height: 20px;
    mask: var(--destination-icon) center / contain no-repeat;
  }
  .workspace-primary [data-workspace-link="here"] {
    --destination-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4'%3E%3Cpath d='M20 10c0 5-8 11-8 11s-8-6-8-11a8 8 0 1 1 16 0Z'/%3E%3Ccircle cx='12' cy='10' r='2.5'/%3E%3C/svg%3E");
  }
  .workspace-primary [data-workspace-link="places"] {
    --destination-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M4 10v10h16V10M2 10l3-6h14l3 6h0a3.2 3.2 0 0 1-5 2.5 3.6 3.6 0 0 1-5 0 3.6 3.6 0 0 1-5 0A3.2 3.2 0 0 1 2 10Z M10 20v-5h4v5'/%3E%3C/svg%3E");
  }
  .workspace-primary [data-workspace-link="together"] {
    --destination-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='8' cy='8' r='3'/%3E%3Cpath d='M2 20v-2a6 6 0 0 1 12 0v2M16 11a3 3 0 1 0 0-6m5 15v-2a5 5 0 0 0-4-5'/%3E%3C/svg%3E");
  }
  .workspace-primary [data-workspace-link="staples"] { --destination-icon: url("/brand/city-staple.svg"); }
  .workspace-primary a:focus-visible { outline-offset: -3px; box-shadow: none; }
  html { scroll-padding-block-start: calc(var(--desktop-masthead-height, 56px) + 8px); }
  html:has(#workspace-view:not([hidden])) { scroll-padding-block-end: calc(66px + env(safe-area-inset-bottom)); }
  body:has(#workspace-view:not([hidden])) { padding-bottom: calc(66px + env(safe-area-inset-bottom)); }
}

@media (max-width: 760px) {
  .welcome-panel { padding: 1.75rem 0 1.625rem; }
  .welcome-panel h1 { max-width: 15ch; font-size: clamp(2.35rem, 10vw, 3.45rem); }
  .auth-panel { border-inline-start: 0; border-block-start: 1px solid var(--separator); padding: 1.375rem 0 1rem; }
}

@media (max-width: 360px) {
  .workspace-primary a { font-size: .75rem; }
  .workspace-nav a[data-workspace-link="inbox"] {
    gap: 2px 3px;
    flex-wrap: wrap;
    align-content: center;
    overflow-wrap: normal;
  }
  .workspace-nav .inbox-count { min-width: 1rem; padding-inline: .2rem; }
}
