/* Oshi Hub UI renewal v0.13
   Direction: quiet utility, next-event first, with one configurable campaign slot. */

:root {
  --renew-paper: #f8f5ef;
  --renew-surface: #fffdf9;
  --renew-surface-muted: #f1ede6;
  --renew-ink: #171715;
  --renew-muted: #6e6a64;
  --renew-rule: #d8d2c9;
  --renew-rule-strong: #bdb6ac;
  --renew-rose: #df3564;
  --renew-rose-dark: #b91f4c;
  --renew-rose-soft: #fbe7ed;
  --renew-danger: #a52835;
  --renew-focus: #cf2557;
  --renew-page-width: 1200px;
  --renew-mobile-gutter: 20px;
  --renew-header-height: 64px;
  --renew-nav-height: 72px;
  --renew-control-height: 44px;
  --renew-radius: 3px;

  --bg: var(--renew-paper);
  --surface: var(--renew-paper);
  --surface-soft: var(--renew-surface-muted);
  --ink: var(--renew-ink);
  --muted: var(--renew-muted);
  --line: var(--renew-rule);
  --primary: var(--renew-rose-dark);
  --primary-soft: var(--renew-rose-soft);
  --oshi-gallery-white: var(--renew-paper);
  --oshi-pure-white: var(--renew-surface);
  --oshi-ui-ink: var(--renew-ink);
  --oshi-archive-black: var(--renew-ink);
  --oshi-rule: var(--renew-rule);
  --oshi-muted: var(--renew-muted);
  --oshi-signal-rose: var(--renew-rose);
  --oshi-signal-rose-hover: var(--renew-rose-dark);
  --oshi-signal-rose-ink: var(--renew-rose-dark);
  --oshi-signal-rose-soft: var(--renew-rose-soft);
  --shadow: none;
}

html {
  background: var(--renew-paper);
  scrollbar-gutter: stable;
  scroll-padding-top: calc(var(--renew-header-height) + 16px);
}

body {
  min-width: 0;
  background: var(--renew-paper);
  color: var(--renew-ink);
  font-family: Inter, "Noto Sans TC", "Noto Sans JP", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.55;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a,
summary,
label,
select {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--renew-focus);
  outline-offset: 3px;
}

button:disabled,
[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: .52;
}

.material-symbols-rounded {
  font-family: "Material Symbols Rounded";
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
}

.app-shell {
  min-height: 100dvh;
  padding-bottom: calc(var(--renew-nav-height) + max(10px, env(safe-area-inset-bottom)));
  background: var(--renew-paper);
}

.app-header {
  position: sticky;
  z-index: 30;
  top: 0;
  width: 100%;
  height: calc(var(--renew-header-height) + env(safe-area-inset-top));
  min-height: var(--renew-header-height);
  padding: env(safe-area-inset-top) var(--renew-mobile-gutter) 0;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--renew-rule);
  background: color-mix(in srgb, var(--renew-paper) 96%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.wordmark {
  width: 126px;
  height: 40px;
  flex: 0 1 126px;
  padding: 0;
  display: flex;
  align-items: center;
  border: 0;
  background: transparent;
}

.wordmark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: left center;
}

.home-group-picker,
#homeGroupFilter {
  min-width: 0;
  min-height: var(--renew-control-height);
  margin-left: auto;
  padding: 0 34px 0 12px;
  border: 1px solid var(--renew-rule-strong);
  border-radius: var(--renew-radius);
  color: var(--renew-ink);
  background-color: var(--renew-surface);
  font-size: 13px;
  font-weight: 700;
}

.app-header .header-group-picker {
  min-width: 0;
  min-height: var(--renew-control-height);
  margin-left: auto;
  padding: 0 8px;
  flex: 1 1 132px;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--renew-rule-strong);
  border-radius: var(--renew-radius);
  color: var(--renew-ink);
  background: var(--renew-surface);
}

.app-header .header-group-picker > .material-symbols-rounded {
  font-size: 18px;
}

.app-header .header-group-picker #homeGroupFilter {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  margin: 0;
  padding: 0;
  border: 0;
  outline: 0;
  color: var(--renew-ink);
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  -webkit-appearance: none;
  appearance: none;
}

.app-header .header-group-picker:focus-within {
  outline: 3px solid var(--renew-focus);
  outline-offset: 3px;
}

.desktop-search,
.mobile-search {
  min-height: var(--renew-control-height);
  border: 1px solid var(--renew-rule);
  border-radius: var(--renew-radius);
  background: var(--renew-surface);
}

.desktop-search {
  display: none;
}

.mobile-search {
  margin-bottom: 24px;
  padding: 0 13px;
}

.desktop-search input,
.mobile-search input {
  min-width: 0;
  background: transparent;
}

.header-actions {
  margin-left: auto;
  gap: 6px;
}

.header-add-button,
.header-login-button,
.header-search-button,
.mobile-header-search {
  min-width: var(--renew-control-height);
  min-height: var(--renew-control-height);
  padding: 0 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--renew-rule-strong);
  border-radius: var(--renew-radius);
  color: var(--renew-ink);
  background: var(--renew-surface);
  cursor: pointer;
}

.header-add-button {
  border-color: var(--renew-ink);
  color: var(--renew-surface);
  background: var(--renew-ink);
}

.header-actions .material-symbols-rounded {
  font-size: 21px;
}

main {
  width: 100%;
  max-width: none;
  margin: 0;
}

.screen {
  width: min(100%, calc(var(--renew-page-width) + (2 * var(--renew-mobile-gutter))));
  margin-inline: auto;
  padding: 24px var(--renew-mobile-gutter) 40px;
  overflow-x: clip;
}

#homeScreen {
  padding-top: 20px;
}

.screen.active {
  display: block;
}

.page-heading {
  margin: 0 0 28px;
  padding: 0 0 20px;
  border-bottom: 1px solid var(--renew-rule);
}

.page-heading h1,
.group-hero h1,
.member-hero h1 {
  margin: 0;
  color: var(--renew-ink);
  font: 800 clamp(30px, 8vw, 42px)/1.08 "Inter Tight", "Noto Sans TC", sans-serif;
  letter-spacing: -.035em;
}

.page-heading > p:last-child,
.group-hero p:last-child,
.member-hero p:last-child {
  max-width: 680px;
  margin: 8px 0 0;
  color: var(--renew-muted);
  font-size: 13px;
  line-height: 1.7;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--renew-rose-dark);
  font: 700 10px/1.1 Inter, "Noto Sans TC", sans-serif;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.home-section,
#homeNextSection,
#homeAgendaSection,
#homeUpdatesSection {
  margin-top: 24px;
}

#homeNextSection {
  margin-top: 0;
}

.section-heading {
  min-height: 44px;
  margin: 0 0 14px;
  padding: 0 0 12px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--renew-rule);
}

.section-heading h2,
.digest-heading h2,
.home-section-title {
  margin: 0;
  color: var(--renew-ink);
  font: 800 22px/1.15 "Inter Tight", "Noto Sans TC", sans-serif;
  letter-spacing: -.02em;
}

.text-button {
  min-height: var(--renew-control-height);
  padding: 0 2px;
  color: var(--renew-rose-dark);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.text-button:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.primary-button,
.secondary-button,
.wide-button,
.calendar-open-button,
.calendar-today-button,
.switch-group,
.back-button {
  min-height: var(--renew-control-height);
  border-radius: var(--renew-radius);
  box-shadow: none;
}

.primary-button,
.index-action {
  position: relative;
  padding: 0 18px;
  border: 1px solid var(--renew-ink);
  border-radius: var(--renew-radius);
  clip-path: none;
  color: var(--renew-surface);
  background: var(--renew-ink);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.secondary-button,
.wide-button,
.calendar-open-button,
.calendar-today-button,
.switch-group {
  border: 1px solid var(--renew-rule-strong);
  color: var(--renew-ink);
  background: var(--renew-surface);
}

.index-action::after,
.primary-button::after,
.follow-button::after {
  display: none;
}

/* Configurable campaign banner: one message, no carousel. */
#homePromoSlot {
  width: 100%;
  margin: 0 0 24px;
}

#homePromoSlot:empty,
#homePromoSlot[hidden] {
  display: none;
}

.campaign-banner,
.home-promo {
  position: relative;
  width: 100%;
  height: auto;
  min-height: 144px;
  max-height: none;
  display: grid;
  align-items: end;
  overflow: hidden;
  border: 1px solid #292827;
  border-radius: var(--renew-radius);
  color: #fff;
  background: #171715;
  isolation: isolate;
}

#homePromoMedia,
.campaign-banner-media,
.campaign-banner picture {
  position: absolute;
  z-index: -2;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

#homePromoMedia:is(img),
#homePromoMedia img,
.campaign-banner-media:is(img),
.campaign-banner-media img,
.campaign-banner picture img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: var(--promo-focal-point, center);
}

.campaign-banner::after,
.home-promo::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, rgba(14, 13, 13, .86) 0%, rgba(14, 13, 13, .52) 55%, rgba(14, 13, 13, .16) 100%);
  pointer-events: none;
}

.campaign-banner-content,
.campaign-banner-copy,
.home-promo-content {
  max-width: min(calc(100% - 60px), 620px);
  padding: 16px;
  display: grid;
  justify-items: start;
  gap: 7px;
}

#homePromoLabel {
  width: fit-content;
  margin: 0;
  padding: 3px 7px;
  border: 1px solid rgba(255, 255, 255, .72);
  color: #fff;
  background: rgba(17, 17, 15, .48);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
}

#homePromoCopy,
.campaign-banner h2,
.campaign-banner h3 {
  margin: 0;
  color: #fff;
  font: 800 clamp(18px, 5vw, 26px)/1.18 "Inter Tight", "Noto Sans TC", sans-serif;
  letter-spacing: -.02em;
  text-wrap: balance;
}

.home-promo-copy strong,
.home-promo-copy span {
  display: block;
}

.home-promo-copy span {
  margin-top: 5px;
  color: rgba(255, 255, 255, .82);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.5;
}

.campaign-banner-description {
  display: none;
}

#homePromoAction {
  min-height: var(--renew-control-height);
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  color: #fff;
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--renew-rose);
  text-underline-offset: 5px;
}

#homePromoDismiss {
  position: absolute;
  z-index: 2;
  top: 8px;
  right: 8px;
  width: var(--renew-control-height);
  height: var(--renew-control-height);
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: var(--renew-radius);
  color: #fff;
  background: rgba(17, 17, 15, .58);
  cursor: pointer;
}

/* Compact first-run state, replacing the previous giant hero. */
#homeOnboarding.onboarding-panel,
.onboarding-panel {
  margin-top: 0;
  padding: 26px 22px;
  border: 1px solid var(--renew-rule);
  border-left: 4px solid var(--renew-rose);
  border-radius: var(--renew-radius);
  clip-path: none;
  color: var(--renew-ink);
  background: var(--renew-surface);
}

.onboarding-panel > .material-symbols-rounded {
  width: 44px;
  height: 44px;
  margin-bottom: 16px;
  border-radius: var(--renew-radius);
  color: #fff;
  background: var(--renew-ink);
}

.onboarding-panel .eyebrow,
.onboarding-panel > p:not(.eyebrow) {
  color: var(--renew-muted);
}

.onboarding-panel h2 {
  font: 800 24px/1.15 "Inter Tight", "Noto Sans TC", sans-serif;
}

.onboarding-actions {
  gap: 8px;
}

/* Next event: the primary home task. */
.next-event-card {
  position: relative;
  min-width: 0;
  padding: 18px;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 14px;
  border: 1px solid var(--renew-rule-strong);
  border-radius: var(--renew-radius);
  background: var(--renew-surface);
}

.next-event-card::before {
  position: absolute;
  top: -1px;
  right: -1px;
  width: 54px;
  height: 4px;
  content: "";
  background: var(--renew-rose);
}

.next-event-countdown,
.event-countdown {
  min-width: 0;
  padding-right: 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-right: 1px solid var(--renew-rule);
}

.next-event-countdown span,
.event-countdown span {
  color: var(--renew-rose-dark);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
}

.next-event-countdown strong,
.event-countdown strong {
  margin-top: 7px;
  color: var(--renew-rose);
  font: 800 clamp(48px, 15vw, 72px)/.9 "Inter Tight", sans-serif;
  letter-spacing: -.055em;
}

.next-event-countdown b,
.event-countdown b {
  margin: -18px 0 4px auto;
  color: var(--renew-rose-dark);
  font-size: 15px;
}

.next-event-body,
.next-event-details {
  min-width: 0;
}

.next-event-group,
.event-group-label {
  margin: 0 0 8px;
  color: var(--renew-rose-dark);
  font-size: 12px;
  font-weight: 700;
}

.next-event-date {
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.next-event-date strong,
.next-event-card time strong {
  color: var(--renew-ink);
  font: 800 clamp(28px, 8vw, 44px)/1 "Inter Tight", "Noto Sans TC", sans-serif;
  letter-spacing: -.04em;
}

.next-event-date span,
.next-event-card time span {
  color: var(--renew-muted);
  font-size: 13px;
  font-weight: 600;
}

.next-event-title {
  margin: 10px 0 0;
  color: var(--renew-ink);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.45;
}

.next-event-meta {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.next-event-meta > span,
.next-event-meta > a,
.event-meta-line {
  min-height: 28px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--renew-muted);
  font-size: 12px;
  text-decoration: none;
}

.next-event-meta .material-symbols-rounded,
.event-meta-line .material-symbols-rounded {
  flex: 0 0 auto;
  color: var(--renew-ink);
  font-size: 20px;
}

.event-type-badge,
.agenda-badge,
.next-event-badge {
  width: fit-content;
  padding: 4px 7px;
  border: 1px solid var(--renew-rose);
  border-radius: var(--renew-radius);
  color: var(--renew-rose-dark);
  background: transparent;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.event-quick-actions,
.home-event-actions,
#homeEventActions {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.event-quick-actions > a,
.event-quick-actions > button,
.home-event-actions > a,
.home-event-actions > button,
#homeEventActions > a,
#homeEventActions > button {
  min-width: 0;
  min-height: 48px;
  padding: 6px 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--renew-rule-strong);
  border-radius: var(--renew-radius);
  color: var(--renew-ink);
  background: var(--renew-surface);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.event-quick-actions > :is(a, button):hover,
.home-event-actions > :is(a, button):hover,
#homeEventActions > :is(a, button):hover {
  border-color: var(--renew-ink);
  background: #fff;
}

.event-quick-actions .material-symbols-rounded,
.home-event-actions .material-symbols-rounded,
#homeEventActions .material-symbols-rounded {
  flex: 0 0 auto;
  font-size: 22px;
}

.event-quick-actions [aria-pressed="true"],
.home-event-actions [aria-pressed="true"],
#homeEventActions [aria-pressed="true"] {
  border-color: var(--renew-rose);
  color: var(--renew-rose-dark);
  background: var(--renew-rose-soft);
}

/* Current v0.11 event markup. */
.home-next-event {
  min-width: 0;
}

.next-event-card {
  width: 100%;
  min-height: 0;
  padding: 18px;
  grid-template-columns: 72px minmax(0, 1fr) 18px;
  gap: 14px;
  align-items: center;
  color: var(--renew-ink);
  text-align: left;
  cursor: pointer;
}

.next-event-card .next-event-date {
  min-width: 0;
  padding-right: 8px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  column-gap: 0;
  border-right: 1px solid var(--renew-rule);
}

.next-event-card .next-event-date small {
  grid-column: 1 / -1;
  color: var(--event-color, var(--renew-rose-dark));
  font-size: 12px;
  font-weight: 700;
}

.next-event-card .next-event-date b {
  grid-column: 1;
  margin-top: 4px;
  max-width: 100%;
  color: var(--event-color, var(--renew-rose));
  font: 800 48px/.94 "Inter Tight", sans-serif;
  letter-spacing: -.055em;
  overflow-wrap: anywhere;
  white-space: normal;
}

.next-event-card .next-event-date em {
  grid-column: 2;
  margin: 0;
  padding-bottom: 4px;
  align-self: end;
  color: var(--event-color, var(--renew-rose-dark));
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.25;
}

.next-event-card .next-event-date.is-today b {
  font-size: 24px;
  letter-spacing: -.02em;
  overflow-wrap: normal;
  white-space: nowrap;
}

.next-event-card .next-event-date.is-distant b {
  font-size: 28px;
  letter-spacing: -.03em;
  overflow-wrap: normal;
  white-space: nowrap;
}

.next-event-copy {
  min-width: 0;
  display: grid;
  gap: 7px;
}

.next-event-copy > span {
  color: var(--event-color, var(--renew-rose-dark));
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.next-event-copy > time {
  color: var(--renew-ink);
  font: 800 20px/1.2 "Inter Tight", "Noto Sans TC", sans-serif;
  letter-spacing: -.025em;
  overflow-wrap: anywhere;
  white-space: normal;
}

.next-event-copy > strong {
  display: -webkit-box;
  overflow: hidden;
  color: var(--renew-ink);
  font: 800 18px/1.35 "Inter Tight", "Noto Sans TC", sans-serif;
  letter-spacing: -.015em;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.next-event-copy > small {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 6px;
  color: var(--renew-muted);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
  white-space: normal;
}

.next-event-copy > small .material-symbols-rounded {
  flex: 0 0 auto;
  color: var(--renew-ink);
  font-size: 18px;
}

.next-event-arrow {
  color: var(--renew-muted);
  font-size: 18px;
}

#homeEventActions > .home-action-disabled {
  min-width: 0;
  min-height: 48px;
  padding: 6px 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--renew-rule);
  border-radius: var(--renew-radius);
  color: var(--renew-muted);
  background: var(--renew-surface-muted);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

#homeEventActions > :only-child {
  grid-column: 1 / -1;
}

/* Chronological agenda. */
.agenda-list,
#homeAgendaList {
  border-top: 1px solid var(--renew-rule);
}

.agenda-row {
  min-height: 88px;
  padding: 12px 0;
  display: grid;
  grid-template-columns: 62px 54px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 0;
  border-bottom: 1px solid var(--renew-rule);
  color: var(--renew-ink);
  background: transparent;
  text-decoration: none;
}

.home-agenda-list .agenda-row {
  width: 100%;
  grid-template-columns: 92px minmax(0, 1fr) 22px;
  gap: 14px;
  color: var(--renew-ink);
  text-align: left;
  cursor: pointer;
}

.home-agenda-list .agenda-row time {
  min-width: 0;
  padding-right: 12px;
  display: block;
  border-right: 1px solid var(--renew-rule);
}

.home-agenda-list .agenda-row time b,
.home-agenda-list .agenda-row time small,
.home-agenda-list .agenda-row > span small,
.home-agenda-list .agenda-row > span strong {
  display: block;
}

.home-agenda-list .agenda-row time b {
  color: var(--renew-ink);
  font: 800 15px/1.25 "Inter Tight", "Noto Sans TC", sans-serif;
}

.home-agenda-list .agenda-row time small {
  margin-top: 5px;
  color: var(--renew-muted);
  font-size: 12px;
}

.home-agenda-list .agenda-row > span {
  min-width: 0;
}

.home-agenda-list .agenda-row > span small {
  overflow: hidden;
  color: var(--agenda-color, var(--renew-rose-dark));
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-agenda-list .agenda-row > span strong {
  margin-top: 4px;
  display: -webkit-box;
  overflow: hidden;
  font-size: 15px;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.home-agenda-list .agenda-row > .material-symbols-rounded {
  color: var(--renew-muted);
  font-size: 20px;
}

.home-agenda-list .agenda-row.today {
  margin-inline: -10px;
  padding-inline: 10px;
  background: var(--renew-rose-soft);
}

.agenda-row.is-next,
.agenda-row:first-child.is-highlighted {
  margin-inline: -10px;
  padding-inline: 10px;
  background: var(--renew-rose-soft);
}

.agenda-date,
.agenda-time,
.agenda-copy {
  min-width: 0;
}

.agenda-date strong,
.agenda-date span,
.agenda-copy b,
.agenda-copy small {
  display: block;
}

.agenda-date strong {
  font: 800 19px/1.05 "Inter Tight", "Noto Sans TC", sans-serif;
  letter-spacing: -.02em;
}

.agenda-date span {
  margin-top: 4px;
  color: var(--renew-muted);
  font-size: 11px;
  font-weight: 600;
}

.agenda-time {
  padding-left: 12px;
  border-left: 1px solid var(--renew-rule);
  color: var(--renew-ink);
  font: 600 15px/1.2 Inter, sans-serif;
}

.agenda-copy b {
  overflow: hidden;
  font-size: 13px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agenda-copy small {
  margin-bottom: 3px;
  overflow: hidden;
  color: var(--renew-rose-dark);
  font-size: 10px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#homeTodayState,
.today-state {
  min-height: 0;
  margin: 0 0 12px;
  padding: 2px 0;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--renew-muted);
  font-size: 12px;
}

#homeTodayState .material-symbols-rounded,
.today-state .material-symbols-rounded {
  color: var(--renew-ink);
  font-size: 21px;
}

/* Official news is a source-first list, not chat cards. */
.official-news-list {
  border-top: 1px solid var(--renew-rule);
}

#homeUpdatesList {
  border-top: 0;
}

.official-news-row {
  min-height: 78px;
  padding: 12px 0;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 24px;
  gap: 13px;
  align-items: center;
  border-bottom: 1px solid var(--renew-rule);
  color: var(--renew-ink);
  text-decoration: none;
}

.official-news-source {
  width: 58px;
  min-height: 50px;
  padding: 5px;
  display: grid;
  place-items: center;
  border: 1px solid var(--renew-rule);
  border-radius: var(--renew-radius);
  color: var(--news-color, var(--renew-rose-dark));
  background: var(--renew-surface);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
}

.official-news-mark {
  width: 58px;
  min-height: 50px;
  padding: 5px;
  display: grid;
  place-items: center;
  border: 1px solid var(--renew-rule);
  border-radius: var(--renew-radius);
  color: var(--news-color, var(--renew-rose-dark));
  background: var(--renew-surface);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
}

.official-news-copy {
  min-width: 0;
}

.official-news-copy b {
  display: -webkit-box;
  overflow: hidden;
  color: var(--renew-ink);
  font-size: 15px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.official-news-copy strong {
  margin-top: 4px;
  display: -webkit-box;
  overflow: hidden;
  color: var(--renew-ink);
  font-size: 15px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.official-news-copy small {
  margin-top: 5px;
  display: block;
  overflow: hidden;
  color: var(--renew-muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.official-news-row > .material-symbols-rounded {
  color: var(--renew-muted);
  font-size: 20px;
}

.official-news-row:hover b,
.official-news-row:focus-visible b {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.official-news-row:hover strong,
.official-news-row:focus-visible strong {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.home-inline-empty {
  min-height: 116px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px dashed var(--renew-rule-strong);
  color: var(--renew-muted);
  background: transparent;
}

.home-inline-empty > .material-symbols-rounded {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid var(--renew-rule);
  color: var(--renew-ink);
  background: var(--renew-surface);
}

.home-inline-empty b {
  display: block;
  color: var(--renew-ink);
  font-size: 13px;
}

.home-inline-empty p {
  margin: 5px 0 0;
  font-size: 12px;
  line-height: 1.55;
}

.home-list-more {
  width: 100%;
  min-height: var(--renew-control-height);
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  border: 0;
  border-bottom: 1px solid var(--renew-rule);
  color: var(--renew-rose-dark);
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.empty-state,
.inline-empty,
.rail-empty {
  padding: 24px 16px;
  border: 1px dashed var(--renew-rule-strong);
  color: var(--renew-muted);
  background: transparent;
  font-size: 12px;
  line-height: 1.65;
  text-align: center;
}

/* Explore: low-noise directory with clear group identity. */
#groupDirectoryToolbar.directory-toolbar,
.directory-toolbar {
  margin: 0 0 20px;
  padding: 0 0 16px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  border-bottom: 1px solid var(--renew-rule);
}

.directory-filter-list {
  min-width: 0;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}

.directory-filter-list::-webkit-scrollbar {
  display: none;
}

.directory-filter-button,
.directory-clear-button {
  min-height: var(--renew-control-height);
  padding: 0 14px;
  flex: 0 0 auto;
  border: 1px solid var(--renew-rule-strong);
  border-radius: var(--renew-radius);
  color: var(--renew-ink);
  background: var(--renew-surface);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: color 140ms ease, border-color 140ms ease, background-color 140ms ease, transform 140ms ease;
}

.directory-filter-button {
  min-width: max-content;
  scroll-snap-align: start;
}

.directory-filter-button[aria-pressed="true"] {
  border-color: var(--renew-ink);
  color: var(--renew-surface);
  background: var(--renew-ink);
}

.directory-result-count {
  margin: 0;
  color: var(--renew-muted);
  font-size: 12px;
  line-height: 1.5;
}

.directory-empty-state {
  grid-column: 1 / -1;
  width: 100%;
  min-height: 160px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
}

.directory-empty-state p {
  margin: 0;
}

.directory-clear-button {
  justify-self: center;
}

.directory-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  border: 0;
}

.directory-section-heading {
  margin: 24px 0 0;
  padding: 18px 0 0;
  border-top: 1px solid var(--renew-rule);
}

.directory-rank-row,
.directory-card::after {
  display: none;
}

.directory-card {
  position: relative;
  min-height: 0;
  border: 1px solid var(--renew-rule);
  border-radius: var(--renew-radius);
  clip-path: none;
  background: var(--renew-surface);
}

.directory-main {
  min-height: 112px;
  padding: 17px;
}

.directory-card h2 {
  color: var(--renew-ink);
  font: 800 20px/1.2 "Inter Tight", "Noto Sans TC", sans-serif;
}

.directory-card p {
  color: var(--renew-muted);
  font-size: 11px;
}

.directory-card footer {
  margin-top: 14px;
  color: var(--renew-muted);
}

.status-badge {
  padding: 3px 7px;
  border: 1px solid var(--renew-rule);
  border-radius: var(--renew-radius);
  background: transparent;
}

.follow-button {
  position: relative;
  width: auto;
  min-height: var(--renew-control-height);
  margin: 0;
  padding: 0 14px;
  border: 0;
  border-top: 1px solid var(--renew-rule);
  border-radius: 0;
  color: var(--renew-rose-dark);
  background: transparent;
  font-size: 11px;
  font-weight: 800;
}

.follow-button.active {
  color: var(--renew-ink);
  background: var(--renew-rose-soft);
}

/* Calendar: keep density useful while removing the black control block. */
.calendar-page-heading {
  align-items: start;
}

.calendar-control-panel,
.concert-showcase,
.full-calendar-panel,
.calendar-agenda {
  border-radius: var(--renew-radius);
  clip-path: none;
}

.calendar-control-panel {
  margin-bottom: 26px;
  padding: 18px;
  border: 1px solid var(--renew-rule);
  color: var(--renew-ink);
  background: var(--renew-surface);
}

.calendar-control-heading h2 {
  color: var(--renew-ink);
}

.sync-toggle {
  color: var(--renew-ink);
  background: transparent;
}

.sync-toggle small {
  color: var(--renew-muted);
}

.calendar-group-filters {
  gap: 6px;
  background: transparent;
}

.calendar-group-toggle {
  min-height: 56px;
  border: 1px solid var(--renew-rule);
  color: var(--renew-muted);
  background: var(--renew-paper);
}

.calendar-group-toggle.active,
.calendar-group-toggle[aria-pressed="true"] {
  border-color: var(--renew-ink);
  color: var(--renew-ink);
  background: var(--renew-surface);
}

.calendar-group-toggle > i {
  border-color: var(--renew-rule-strong);
  background: #aaa49a;
}

.calendar-group-toggle.active > i,
.calendar-group-toggle[aria-pressed="true"] > i {
  border-color: var(--calendar-group, var(--renew-rose));
  background: var(--calendar-group, var(--renew-rose));
}

.calendar-performance-index {
  margin: 26px 0 0;
  padding: 0;
  border: 1px solid var(--renew-rule);
  background: var(--renew-surface);
}

.calendar-performance-index > summary {
  min-height: 48px;
  padding: 0 14px;
  border-bottom: 1px solid transparent;
  color: var(--renew-ink);
  font-size: 15px;
  font-weight: 800;
  line-height: 48px;
  list-style-position: inside;
  cursor: pointer;
  transition: color 140ms ease, border-color 140ms ease, background-color 140ms ease;
}

.calendar-performance-index > summary::marker,
.calendar-performance-index > summary::-webkit-details-marker {
  color: var(--renew-rose-dark);
}

.calendar-performance-index[open] > summary {
  border-bottom-color: var(--renew-rule);
}

.calendar-performance-index[open] {
  padding-bottom: 16px;
}

#concertShowcaseCount {
  float: right;
  color: var(--renew-muted);
  font-size: 12px;
  font-weight: 600;
}

.calendar-performance-index > .concert-card-grid {
  margin: 16px 16px 0;
  gap: 16px;
}

.concert-card-grid {
  gap: 10px;
}

.concert-card,
.live-upcoming-card {
  border: 1px solid var(--renew-rule);
  border-radius: var(--renew-radius);
  clip-path: none;
  background: var(--renew-surface);
}

.full-calendar-panel {
  border-color: var(--renew-rule);
  background: var(--renew-surface);
}

.full-calendar-day {
  min-height: 58px;
  color: var(--renew-ink);
  background: var(--renew-surface);
}

.full-calendar-day.outside {
  color: #aaa49a;
  background: var(--renew-surface-muted);
}

.full-calendar-day.selected {
  color: #fff;
  background: var(--renew-ink);
}

.full-calendar-day.today > span {
  border-color: var(--renew-rose);
}

.calendar-agenda-item {
  min-height: 76px;
}

/* Group and member pages: content first, group color as a small signal. */
.group-topbar {
  min-height: var(--renew-control-height);
  margin-bottom: 18px;
}

.back-button,
.switch-group {
  padding-inline: 9px;
}

.back-button {
  border: 0;
  background: transparent;
}

.group-hero {
  position: relative;
  margin: 0;
  padding: 34px 24px 28px;
  border: 1px solid var(--renew-rule);
  border-top: 5px solid var(--group, var(--renew-rose));
  border-radius: var(--renew-radius);
  clip-path: none;
  color: var(--renew-ink);
  background: var(--renew-surface);
  background-image: none;
}

.group-hero::after {
  display: none;
}

.group-hero .eyebrow {
  color: var(--group, var(--renew-rose-dark));
}

.subnav {
  margin: 0 0 26px;
  padding: 0;
  gap: 22px;
  border-bottom: 1px solid var(--renew-rule);
  background: transparent;
}

.subnav button {
  min-height: 50px;
  border-radius: 0;
  color: var(--renew-muted);
}

.subnav button.active {
  border-color: var(--group, var(--renew-rose));
  color: var(--renew-ink);
}

.group-section {
  margin-top: 34px;
}

.group-access-gate {
  margin: 34px auto;
  padding: 28px 22px;
  border: 1px solid var(--renew-rule);
  border-radius: var(--renew-radius);
  clip-path: none;
  background: var(--renew-surface);
}

.group-access-gate > .material-symbols-rounded {
  border-radius: var(--renew-radius);
  color: #fff;
  background: var(--renew-ink);
}

.member-grid,
.content-list,
.work-block,
.profile-group,
.member-card {
  border-radius: var(--renew-radius);
}

.member-grid {
  gap: 10px;
  border: 0;
}

.member-card {
  border: 1px solid var(--renew-rule);
  clip-path: none;
  background: var(--renew-surface);
}

.member-profile-panel {
  border: 1px solid var(--renew-rule);
  border-left: 5px solid var(--group, var(--renew-rose));
  border-radius: var(--renew-radius);
  clip-path: none;
  color: var(--renew-ink);
  background: var(--renew-surface);
}

.member-profile-facts span,
.member-profile-penlight-row > span {
  color: var(--renew-muted);
}

/* Profile: settings are calm forms, not a promotional dashboard. */
.my-view-switch,
.calendar-view-switch,
.view-switch {
  width: 100%;
  margin: 0 0 24px;
  padding: 0;
  display: flex;
  gap: 22px;
  overflow-x: auto;
  border: 0;
  border-bottom: 1px solid var(--renew-rule);
  border-radius: 0;
  background: transparent;
}

.view-switch button,
.view-switch button[data-view="groups"],
.view-switch button[data-view="oshi"] {
  min-width: max-content;
  min-height: 48px;
  padding: 0 2px;
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  color: var(--renew-muted);
  background: transparent;
  box-shadow: none;
}

.view-switch button.active,
.view-switch button[data-view="groups"].active,
.view-switch button[data-view="oshi"].active {
  border-color: var(--renew-rose);
  color: var(--renew-ink);
  background: transparent;
  box-shadow: none;
}

.member-account-card,
.plan-card,
.storage-card,
.profile-group {
  border: 1px solid var(--renew-rule);
  border-radius: var(--renew-radius);
  background: var(--renew-surface);
  box-shadow: none;
}

.member-account-identity,
.member-account-guest {
  border-left: 5px solid var(--renew-rose);
  color: var(--renew-ink);
  background: var(--renew-surface);
}

.member-account-identity p:last-child,
.member-account-guest p {
  color: var(--renew-muted);
}

.member-account-guest > .material-symbols-rounded,
.account-mini-avatar {
  border-radius: var(--renew-radius);
  color: #fff;
  background: var(--renew-ink);
}

.member-account-stats,
.member-account-stats div,
.member-account-actions {
  border-color: var(--renew-rule);
}

.profile-settings-panel {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--renew-rule-strong);
}

.profile-group summary {
  min-height: 64px;
}

.check-row {
  min-height: var(--renew-control-height);
}

.profile-home-note {
  border-left-color: var(--renew-rose);
  color: var(--renew-muted);
  background: var(--renew-rose-soft);
}

.my-group-grid,
.my-oshi-grid,
.official-link-grid {
  gap: 8px;
  background: transparent;
}

.my-group-card,
.my-oshi-card,
.official-link-grid a {
  border: 1px solid var(--renew-rule);
  border-radius: var(--renew-radius);
  background: var(--renew-surface);
}

/* Mobile primary navigation: exactly four clear destinations. */
.bottom-nav {
  position: fixed;
  z-index: 40;
  inset: auto 0 0;
  width: 100%;
  height: calc(var(--renew-nav-height) + env(safe-area-inset-bottom));
  padding: 5px 10px env(safe-area-inset-bottom);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--renew-rule);
  background: color-mix(in srgb, var(--renew-surface) 96%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.bottom-nav button {
  position: relative;
  min-width: 0;
  min-height: 56px;
  padding: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: 0;
  color: var(--renew-muted);
  background: transparent;
  cursor: pointer;
}

.bottom-nav .material-symbols-rounded {
  font-size: 25px;
}

.bottom-nav b {
  font-size: 11px;
  line-height: 1.2;
}

.bottom-nav button.active {
  color: var(--renew-rose-dark);
}

.bottom-nav button.active .material-symbols-rounded {
  font-variation-settings: "FILL" 1, "wght" 520, "GRAD" 0, "opsz" 24;
}

.bottom-nav button.active::after {
  position: absolute;
  right: 20%;
  bottom: 0;
  left: 20%;
  width: auto;
  height: 3px;
  content: "";
  background: var(--renew-rose);
}

.nav-live-badge {
  top: 3px;
  border-color: var(--renew-surface);
  color: #fff;
  background: var(--renew-rose-dark);
}

@media (max-width: 759px) {
  .app-header {
    background: var(--renew-paper);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .wordmark {
    width: 118px;
    flex-basis: 118px;
  }

  .app-header .header-group-picker {
    max-width: 132px;
  }

  .header-actions {
    margin-left: auto;
  }

  .header-actions b {
    display: none;
  }

  .header-add-button,
  .header-login-button,
  .header-search-button,
  .mobile-header-search {
    width: var(--renew-control-height);
    height: var(--renew-control-height);
    min-width: var(--renew-control-height);
    min-height: var(--renew-control-height);
    padding: 0;
    flex: 0 0 var(--renew-control-height);
  }

  #homePromoAction {
    margin-top: -1px;
  }

  .next-event-card .next-event-date b {
    font-size: 48px;
    white-space: normal;
  }

  .home-agenda-list .agenda-row time b {
    font-size: 13px;
    white-space: nowrap;
  }
}

/* Small-phone safeguard; 390px remains the authored mobile viewport. */
@media (max-width: 374px) {
  :root {
    --renew-mobile-gutter: 16px;
  }

  .wordmark {
    width: 112px;
    flex-basis: 112px;
  }

  .header-actions b {
    display: none;
  }

  .next-event-countdown,
  .event-countdown {
    padding-right: 12px;
  }

  .agenda-row {
    grid-template-columns: 54px 46px minmax(0, 1fr);
    gap: 8px;
  }

  .agenda-row > :last-child.agenda-badge {
    grid-column: 3;
    justify-self: start;
  }

  #homeEventActions > :is(a, button, .home-action-disabled) {
    min-height: 62px;
    flex-direction: column;
    gap: 3px;
    padding: 7px 4px;
    font-size: 12px;
  }

  #homeEventActions b {
    white-space: nowrap;
  }
}

@media (min-width: 520px) {
  .directory-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 760px) {
  :root {
    --renew-header-height: 72px;
  }

  html {
    scroll-padding-top: 144px;
  }

  .app-shell {
    padding-bottom: 0;
  }

  .app-header {
    height: calc(var(--renew-header-height) + env(safe-area-inset-top));
    padding-inline: max(28px, calc((100% - var(--renew-page-width)) / 2));
    gap: 18px;
  }

  .wordmark {
    width: 164px;
    height: 48px;
    flex-basis: 164px;
  }

  .desktop-search {
    width: min(34vw, 360px);
    margin-left: auto;
    padding-inline: 13px;
    display: flex;
  }

  .home-group-picker,
  #homeGroupFilter {
    margin-left: 0;
  }

  .app-header .header-group-picker {
    max-width: 210px;
    margin-left: 0;
    flex: 0 1 210px;
  }

  .bottom-nav {
    position: sticky;
    z-index: 25;
    top: calc(var(--renew-header-height) + env(safe-area-inset-top));
    bottom: auto;
    width: 100%;
    height: 54px;
    padding: 0 max(28px, calc((100% - var(--renew-page-width)) / 2));
    display: flex;
    justify-content: flex-start;
    gap: 28px;
    border-top: 0;
    border-bottom: 1px solid var(--renew-rule);
    background: color-mix(in srgb, var(--renew-paper) 97%, transparent);
  }

  .bottom-nav button {
    min-height: 53px;
    padding: 0 2px;
    flex-direction: row;
    gap: 7px;
  }

  .bottom-nav .material-symbols-rounded {
    font-size: 21px;
  }

  .bottom-nav button.active::after {
    right: 0;
    bottom: -1px;
    left: 0;
  }

  .screen {
    padding: 40px 20px 72px;
  }

  #homeScreen {
    padding-top: 24px;
  }

  .page-heading {
    margin-bottom: 34px;
    padding-bottom: 26px;
  }

  #homePromoSlot {
    margin-bottom: 24px;
  }

  .campaign-banner,
  .home-promo {
    height: auto;
    min-height: 176px;
    max-height: none;
    aspect-ratio: auto;
  }

  .campaign-banner-content,
  .campaign-banner-copy,
  .home-promo-content {
    max-width: min(calc(100% - 68px), 680px);
    padding: 24px;
  }

  .campaign-banner-description {
    max-width: 520px;
    margin: 0;
    display: block;
    color: rgba(255, 255, 255, .82);
    font-size: 13px;
  }

  .next-event-card {
    min-height: 190px;
    padding: 24px;
    grid-template-columns: 104px minmax(0, 1fr) 20px;
    gap: 24px;
  }

  .next-event-card .next-event-date {
    padding-right: 20px;
  }

  .next-event-card .next-event-date b {
    font-size: 56px;
  }

  .next-event-card .next-event-date.is-distant b {
    font-size: 40px;
  }

  .next-event-copy > time {
    font-size: 24px;
  }

  .next-event-copy > strong {
    max-width: 720px;
    font-size: 22px;
  }

  .next-event-copy > small {
    font-size: 12px;
  }

  .next-event-countdown,
  .event-countdown {
    padding-right: 20px;
  }

  .next-event-countdown strong,
  .event-countdown strong {
    font-size: 64px;
  }

  .event-quick-actions,
  .home-event-actions,
  #homeEventActions {
    margin-top: 14px;
  }

  .event-quick-actions > a,
  .event-quick-actions > button,
  .home-event-actions > a,
  .home-event-actions > button,
  #homeEventActions > a,
  #homeEventActions > button {
    min-height: 48px;
  }

  #homeAgendaSection,
  #homeUpdatesSection {
    margin-top: 32px;
  }

  #groupDirectoryToolbar.directory-toolbar,
  .directory-toolbar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
  }

  .directory-filter-list {
    flex-wrap: wrap;
    overflow: visible;
  }

  .directory-result-count {
    flex: 0 0 auto;
    text-align: right;
  }

  .agenda-row {
    grid-template-columns: 74px 72px minmax(0, 1fr) auto;
    min-height: 92px;
  }

  .home-agenda-list .agenda-row {
    grid-template-columns: 110px minmax(0, 1fr) 24px;
  }

  .official-news-row {
    min-height: 84px;
  }

  .calendar-group-filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .directory-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .member-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  #homeScreen.active {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(360px, .88fr);
    column-gap: 52px;
    align-items: start;
  }

  #homeScreen > .sr-only,
  #homePromoSlot,
  #homeOnboarding,
  #homeNextSection {
    grid-column: 1 / -1;
  }

  #homeAgendaSection {
    grid-column: 1;
  }

  #homeUpdatesSection {
    grid-column: 2;
  }

  .directory-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .calendar-group-filters {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .member-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 760px) and (max-width: 1119px) {
  .app-header {
    background: var(--renew-paper);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .app-shell {
    padding-bottom: calc(var(--renew-nav-height) + max(10px, env(safe-area-inset-bottom)));
  }

  .bottom-nav {
    position: fixed;
    z-index: 40;
    inset: auto 0 0;
    width: 100%;
    height: calc(var(--renew-nav-height) + env(safe-area-inset-bottom));
    padding: 5px 10px env(safe-area-inset-bottom);
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    border-top: 1px solid var(--renew-rule);
    border-bottom: 0;
    background: color-mix(in srgb, var(--renew-surface) 96%, transparent);
  }

  .bottom-nav button {
    min-height: 56px;
    padding: 4px;
    flex-direction: column;
    gap: 3px;
  }

  .bottom-nav .material-symbols-rounded {
    font-size: 25px;
  }

  .bottom-nav button.active::after {
    right: 20%;
    bottom: 0;
    left: 20%;
  }
}

@media (min-width: 1120px) {
  html {
    scroll-padding-top: var(--renew-header-height);
  }

  .app-header .wordmark {
    width: 150px;
    flex-basis: 150px;
  }

  .app-header .header-group-picker {
    max-width: 190px;
    flex-basis: 190px;
  }

  .app-header .bottom-nav {
    position: static;
    z-index: auto;
    inset: auto;
    width: auto;
    height: 100%;
    padding: 0;
    display: flex;
    flex: 0 0 auto;
    gap: 18px;
    border: 0;
    background: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .app-header .bottom-nav button {
    min-height: 70px;
    padding: 0 2px;
    flex: 0 0 auto;
    flex-direction: row;
    gap: 6px;
  }

  .app-header .bottom-nav button.active::after {
    right: 0;
    bottom: 0;
    left: 0;
  }

  .app-header .desktop-search {
    width: min(22vw, 280px);
    margin-left: auto;
  }

  .app-header .header-actions {
    margin-left: 0;
  }

  #homeNextSection {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    column-gap: 20px;
  }

  #homeNextSection > .section-heading {
    grid-column: 1 / -1;
  }

  #homeNextEvent {
    grid-column: 1;
  }

  #homeEventActions {
    grid-column: 2;
    margin-top: 0;
    grid-template-columns: 1fr;
    align-self: center;
    align-content: start;
  }

  #homeEventActions > :is(a, button),
  #homeEventActions > .home-action-disabled {
    min-height: 48px;
  }

  #homeEventActions > :only-child {
    grid-column: auto;
  }

  .next-event-card .next-event-date b {
    font-size: 56px;
  }

  .next-event-card .next-event-date.is-distant b {
    font-size: 40px;
  }

  .next-event-copy > time {
    font-size: 24px;
  }
}

/* Public group preview and interaction contract v0.11. */
.app-shell {
  display: flex;
  flex-direction: column;
}

main {
  width: 100%;
  min-height: 0;
  flex: 1 0 auto;
}

.app-footer {
  width: 100%;
  margin: 32px 0 0;
  padding-block: 24px;
  padding-inline: max(var(--renew-mobile-gutter), calc((100% - var(--renew-page-width)) / 2));
  color: var(--renew-muted);
  background: var(--renew-surface-muted);
  border-top: 1px solid var(--renew-rule);
}

.app-footer p {
  max-width: 780px;
  margin: 0;
  font-size: 12px;
  line-height: 1.65;
}

.app-footer strong {
  color: var(--renew-ink);
}

.app-footer nav {
  margin: 12px 0 10px;
  gap: 9px 18px;
}

.app-footer a {
  color: var(--renew-ink);
  font-size: 12px;
}

.app-footer small {
  color: var(--renew-muted);
  font-size: 11px;
  line-height: 1.6;
}

.group-public-preview {
  width: 100%;
  max-width: var(--renew-page-width);
  margin: 32px auto 0;
}

.group-preview-heading {
  max-width: 720px;
  padding: 0 0 24px;
  border-bottom: 1px solid var(--renew-rule);
}

.group-preview-heading h2 {
  margin: 0;
  color: var(--renew-ink);
  font: 800 clamp(25px, 5vw, 38px)/1.12 "Inter Tight", "Noto Sans TC", sans-serif;
  letter-spacing: -.03em;
}

.group-preview-heading > p:last-child {
  margin: 9px 0 0;
  color: var(--renew-muted);
  font-size: 13px;
  line-height: 1.7;
}

.group-preview-section {
  margin-top: 34px;
}

.group-preview-section > .section-heading > span {
  color: var(--renew-muted);
  font: 600 10px/1 Inter, sans-serif;
}

.group-preview-section > .live-upcoming-card {
  width: min(100%, 820px);
  min-width: 0;
  min-height: 132px;
  margin: 0;
}

.group-preview-members {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.group-preview-members > article {
  min-width: 0;
  min-height: 88px;
  padding: 12px 14px;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  border: 1px solid var(--renew-rule);
  border-radius: var(--renew-radius);
  color: var(--renew-ink);
  background: var(--renew-surface);
  cursor: default;
}

.group-preview-members .member-initial {
  width: 64px;
  height: 64px;
  min-width: 64px;
  padding: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--renew-rule);
  border-radius: var(--renew-radius);
  color: var(--group, var(--renew-ink));
  background: color-mix(in srgb, var(--group, var(--renew-rose)) 10%, var(--renew-paper));
  font: 800 17px/1 "Inter Tight", "Noto Sans TC", sans-serif;
}

.group-preview-members .member-initial img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center top;
}

.group-preview-members > article > span:last-child {
  min-width: 0;
}

.group-preview-members > article b,
.group-preview-members > article small {
  display: block;
}

.group-preview-members > article b {
  overflow: hidden;
  color: var(--renew-ink);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-preview-members > article small {
  margin-top: 5px;
  overflow: hidden;
  color: var(--renew-muted);
  font-size: 11px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-preview-cta {
  margin-top: 36px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
  border: 1px solid var(--renew-rule);
  border-left: 4px solid var(--renew-rose);
  border-radius: var(--renew-radius);
  background: var(--renew-surface);
}

.group-preview-cta > p {
  margin: 0;
  color: var(--renew-muted);
  font-size: 11px;
  line-height: 1.6;
}

.group-preview-cta > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.group-preview-cta :is(.primary-button, .secondary-button) {
  min-height: var(--renew-control-height);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Only actual controls signal interactivity. */
:where(
  .wordmark,
  .header-add-button,
  .header-login-button,
  .header-search-button,
  .mobile-header-search,
  .bottom-nav button,
  .directory-main,
  .follow-button,
  .view-switch button,
  .subnav button,
  .calendar-nav button,
  .calendar-today-button,
  .calendar-guide-button,
  .calendar-group-toggle,
  .full-calendar-header button,
  .full-calendar-day,
  .calendar-agenda-open,
  .calendar-open-button,
  .calendar-play-button,
  .sync-toggle,
  .primary-button,
  .secondary-button,
  .next-event-card,
  .home-agenda-list .agenda-row,
  #homePromoDismiss,
  .my-group-card,
  .my-oshi-card,
  .profile-group summary,
  .check-row,
  .danger-button,
  .directory-load-more
) {
  min-height: var(--renew-control-height);
}

:where(
  .wordmark,
  .header-add-button,
  .header-login-button,
  .header-search-button,
  .mobile-header-search,
  .bottom-nav button,
  .directory-main,
  .follow-button,
  .view-switch button,
  .subnav button,
  .calendar-nav button,
  .calendar-today-button,
  .calendar-guide-button,
  .calendar-group-toggle,
  .full-calendar-header button,
  .full-calendar-day,
  .calendar-agenda-open,
  .calendar-open-button,
  .calendar-play-button,
  .sync-toggle,
  .primary-button,
  .secondary-button,
  .next-event-card,
  .home-agenda-list .agenda-row,
  #homePromoDismiss,
  .my-group-card,
  .my-oshi-card,
  .profile-group summary,
  .check-row,
  .danger-button,
  .directory-load-more
):not(:disabled):not([aria-disabled="true"]) {
  cursor: pointer;
}

.wordmark {
  min-height: var(--renew-control-height);
}

.desktop-search:focus-within,
.mobile-search:focus-within,
.sync-toggle:focus-within {
  outline: 3px solid var(--renew-focus);
  outline-offset: 3px;
}

.desktop-search input:focus-visible,
.mobile-search input:focus-visible,
.sync-toggle input:focus-visible {
  outline: 0;
}

.directory-main,
.follow-button,
.view-switch button,
.subnav button,
.calendar-nav button,
.calendar-today-button,
.calendar-guide-button,
.calendar-group-toggle,
.full-calendar-header button,
.full-calendar-day,
.calendar-agenda-open,
.calendar-open-button,
.calendar-play-button,
.bottom-nav button,
.header-add-button,
.header-login-button,
.header-search-button,
.mobile-header-search {
  transition: color 140ms ease, border-color 140ms ease, background-color 140ms ease;
}

.primary-button,
.secondary-button,
.next-event-card,
.home-agenda-list .agenda-row,
#homePromoDismiss,
.my-group-card,
.my-oshi-card,
.profile-group summary,
.check-row,
.danger-button,
.directory-load-more {
  transition: color 140ms ease, border-color 140ms ease, background-color 140ms ease, transform 140ms ease;
}

@media (hover: hover) {
  .wordmark:not(:disabled):hover,
  .bottom-nav button:not(:disabled):not(.active):not([aria-current="page"]):hover,
  .view-switch button:not(:disabled):not(.active):not([aria-pressed="true"]):hover,
  .subnav button:not(:disabled):not(.active):not([aria-selected="true"]):hover,
  .calendar-nav button:not(:disabled):hover,
  .full-calendar-header button:not(:disabled):hover {
    color: var(--renew-ink);
    background: var(--renew-surface-muted);
  }

  .header-add-button:not(:disabled):hover,
  .header-login-button:not(:disabled):hover,
  .header-search-button:not(:disabled):hover,
  .mobile-header-search:not(:disabled):hover,
  .desktop-search:hover,
  .mobile-search:hover,
  .app-header .header-group-picker:hover {
    border-color: var(--renew-ink);
  }

  .header-add-button:not(:disabled):hover {
    border-color: #343330;
    background: #343330;
  }

  .directory-main:not(:disabled):hover {
    background: color-mix(in srgb, var(--card-color, var(--renew-rose)) 5%, var(--renew-surface));
  }

  .follow-button:not(:disabled):not(.active):not([aria-pressed="true"]):hover,
  .calendar-today-button:not(:disabled):hover,
  .calendar-guide-button:not(:disabled):hover,
  .calendar-open-button:not(:disabled):hover {
    border-color: var(--renew-ink);
    color: var(--renew-ink);
    background: #fff;
  }

  .calendar-group-toggle:not(:disabled):not(.active):not([aria-pressed="true"]):hover,
  .calendar-performance-index > summary:hover,
  .full-calendar-day:not(:disabled):not(.selected):hover,
  .calendar-agenda-open:not(:disabled):hover {
    border-color: var(--renew-rule-strong);
    background: var(--renew-surface-muted);
  }

  .calendar-play-button:not(:disabled):hover {
    filter: brightness(.92);
  }

  .primary-button:not(:disabled):not([aria-disabled="true"]):hover {
    background: #343330;
  }

  .danger-button:not(:disabled):not([aria-disabled="true"]):hover {
    border-color: #9b3037;
    color: #7b252b;
    background: #fff0f0;
  }

  .secondary-button:not(:disabled):not([aria-disabled="true"]):hover,
  .directory-filter-button:not(:disabled):not([aria-pressed="true"]):hover,
  .directory-clear-button:not(:disabled):hover,
  .next-event-card:not(:disabled):not([aria-disabled="true"]):hover,
  .home-agenda-list .agenda-row:not(:disabled):not([aria-disabled="true"]):hover,
  .my-group-card:not(:disabled):not([aria-disabled="true"]):hover,
  .my-oshi-card:not(:disabled):not([aria-disabled="true"]):hover,
  .profile-group summary:hover,
  .check-row:not(:has(input:disabled)):hover,
  .directory-load-more:not(:disabled):not([aria-disabled="true"]):hover {
    border-color: var(--renew-ink);
    background: var(--renew-surface-muted);
  }

  #homePromoDismiss:not(:disabled):not([aria-disabled="true"]):hover {
    border-color: rgba(255, 255, 255, .86);
    color: #fff;
    background: rgba(17, 17, 15, .82);
  }
}

:where(
  .wordmark,
  .header-login-button,
  .header-search-button,
  .mobile-header-search,
  .bottom-nav button,
  .directory-main,
  .follow-button,
  .view-switch button,
  .subnav button,
  .calendar-nav button,
  .calendar-today-button,
  .calendar-guide-button,
  .calendar-group-toggle,
  .full-calendar-header button,
  .full-calendar-day,
  .calendar-agenda-open,
  .calendar-open-button,
  .directory-load-more
):not(:disabled):not([aria-disabled="true"]):not(.active):not(.selected):not([aria-current="page"]):not([aria-pressed="true"]):active {
  background-color: var(--renew-surface-muted);
}

:where(
  .primary-button,
  .secondary-button,
  .directory-filter-button,
  .directory-clear-button,
  .next-event-card,
  .home-agenda-list .agenda-row,
  .my-group-card,
  .my-oshi-card,
  .danger-button,
  .directory-load-more
):not(:disabled):not([aria-disabled="true"]):active {
  transform: translateY(1px);
}

.header-add-button:not(:disabled):active,
.calendar-play-button:not(:disabled):active,
#homePromoDismiss:not(:disabled):active {
  filter: brightness(.84);
}

.check-row:has(input:disabled) {
  color: var(--renew-muted);
  cursor: not-allowed;
}

.bottom-nav button.active,
.bottom-nav button[aria-current="page"],
.view-switch button.active,
.view-switch button[aria-pressed="true"],
.subnav button.active,
.subnav button[aria-selected="true"] {
  color: var(--renew-rose-dark);
}

.follow-button.active,
.follow-button[aria-pressed="true"],
.calendar-group-toggle.active,
.calendar-group-toggle[aria-pressed="true"] {
  border-color: var(--renew-rose);
  color: var(--renew-ink);
  background: var(--renew-rose-soft);
}

:where(button, [role="button"]):disabled,
:where(button, [role="button"])[aria-disabled="true"],
.home-action-disabled {
  border-color: var(--renew-rule) !important;
  color: var(--renew-muted) !important;
  background: var(--renew-surface-muted) !important;
  box-shadow: none !important;
  filter: none !important;
  text-decoration: none !important;
  cursor: not-allowed !important;
}

:where(button, [role="button"]):disabled:hover,
:where(button, [role="button"])[aria-disabled="true"]:hover,
.home-action-disabled:hover {
  border-color: var(--renew-rule) !important;
  color: var(--renew-muted) !important;
  background: var(--renew-surface-muted) !important;
}

.group-preview-members > article,
.directory-card,
.home-inline-empty,
.official-news-row:not(a):not(button),
.live-status,
.status-badge {
  cursor: default;
}

.official-news-row:not(a):not(button):hover strong,
.official-news-row:not(a):not(button):focus strong {
  text-decoration: none;
}

@media (max-width: 519px) {
  .group-preview-cta > div > :is(button, a) {
    flex: 1 1 100%;
  }
}

@media (min-width: 620px) {
  .group-preview-members {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .group-preview-cta {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .group-preview-cta > p {
    max-width: 520px;
  }

  .group-preview-cta > div {
    flex: 0 0 auto;
    justify-content: flex-end;
  }
}

@media (min-width: 760px) {
  .app-header {
    padding-inline: max(var(--renew-mobile-gutter), calc((100% - var(--renew-page-width)) / 2));
  }
}

@media (min-width: 1024px) {
  .group-preview-members {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .group-preview-members > article {
    min-height: 152px;
    padding: 18px 14px;
    grid-template-columns: 1fr;
    justify-items: start;
    align-content: start;
    gap: 13px;
  }

  .group-preview-members .member-initial {
    width: 72px;
    height: 72px;
  }
}

@media (min-width: 1280px) {
  .screen {
    width: calc(var(--renew-page-width) + (2 * var(--renew-mobile-gutter)));
    max-width: 100%;
  }

  .group-public-preview,
  .group-preview-section,
  .group-preview-cta {
    min-width: 0;
  }
}

/* Review fixes: directory composition, calendar width and full-row empty states. */
.directory-main {
  width: 100%;
  min-width: 0;
  min-height: 104px;
  padding: 15px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 22px;
  grid-template-rows: auto;
  align-items: center;
  gap: 13px;
  border: 0;
  color: var(--renew-ink);
  background: transparent;
  text-align: left;
}

.directory-main > div {
  min-width: 0;
}

.directory-monogram {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  align-self: center;
  border: 1px solid color-mix(in srgb, var(--card-color, var(--renew-rose)) 32%, var(--renew-rule));
  border-radius: var(--renew-radius);
  color: var(--card-color, var(--renew-rose-dark));
  background: color-mix(in srgb, var(--card-color, var(--renew-rose)) 8%, var(--renew-surface));
  font: 800 14px/1 "Inter Tight", "Noto Sans TC", sans-serif;
  text-align: center;
}

.directory-arrow {
  width: 22px;
  align-self: center;
  justify-self: end;
  color: var(--renew-muted);
  font-size: 20px;
}

.directory-card footer {
  min-width: 0;
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
}

.directory-card footer > span {
  min-width: 0;
}

.screen.calendar-screen {
  width: min(100%, calc(var(--renew-page-width) + (2 * var(--renew-mobile-gutter))));
  max-width: none;
}

.calendar-group-filters > .calendar-empty,
.concert-card-grid > .calendar-empty,
.concert-card-grid > .empty-state,
#groupDirectory > .empty-state {
  grid-column: 1 / -1;
  width: 100%;
}

.directory-load-more {
  grid-column: 1 / -1;
  width: 100%;
  min-height: 52px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 1px solid var(--renew-rule-strong);
  border-radius: var(--renew-radius);
  color: var(--renew-ink);
  background: var(--renew-surface);
  font-size: 13px;
  font-weight: 700;
}

.directory-load-more span {
  color: var(--renew-muted);
  font-size: 11px;
  font-weight: 600;
}

.calendar-group-filters > .calendar-empty {
  border-color: var(--renew-rule-strong);
  color: var(--renew-muted);
  background: transparent;
}

@media (min-width: 1024px) {
  .directory-main {
    min-height: 96px;
    padding: 12px;
    grid-template-columns: 42px minmax(0, 1fr) 18px;
    gap: 10px;
  }

  .directory-monogram {
    width: 42px;
    height: 42px;
    font-size: 12px;
  }

  .directory-arrow {
    width: 18px;
    font-size: 18px;
  }

  .directory-card h2 {
    font-size: 18px;
  }

  .directory-card p {
    margin-top: 6px;
    display: -webkit-box;
    overflow: hidden;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .directory-card footer {
    margin-top: 8px;
    font-size: 11px;
  }
}

@media (min-width: 1120px) {
  #exploreScreen > .mobile-search {
    display: none;
  }
}

/* v0.13: editorial hierarchy, explicit actions and shared fluid page edges. */
.home-intro {
  grid-column: 1 / -1;
  min-width: 0;
  margin-bottom: 26px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--renew-rule-strong);
}

.home-intro-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 16px;
}

.home-intro h1 {
  margin: 0;
  font: 800 32px/1.2 "Inter Tight", "Noto Sans TC", sans-serif;
  letter-spacing: -.035em;
}

#homeDate {
  color: var(--renew-muted);
  font-size: 13px;
  font-weight: 500;
}

.home-context {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  color: var(--renew-muted);
  font-size: 12px;
  line-height: 1.6;
}

.home-context p {
  margin: 0;
}

#homeScopeNote {
  color: var(--renew-ink);
}

.home-source-note {
  margin: 0 0 12px;
  color: var(--renew-muted);
  font-size: 12px;
  line-height: 1.6;
}

.home-section > .section-heading {
  min-height: 58px;
  align-items: center;
}

.next-event-card {
  grid-template-columns: minmax(0, 1fr) 62px;
  gap: 16px;
  padding: 20px;
}

.next-event-card .next-event-date {
  grid-column: 2;
  grid-row: 1;
  align-self: start;
  padding: 0 0 0 8px;
  border-right: 0;
  border-left: 1px solid var(--renew-rule);
}

.next-event-card .next-event-date b {
  font-size: 32px;
  white-space: nowrap;
  overflow-wrap: normal;
}

.next-event-card .next-event-date small,
.next-event-card .next-event-date em {
  color: var(--renew-rose-dark);
  font-size: 11px;
}

.next-event-card .next-event-copy {
  grid-column: 1;
  grid-row: 1;
  gap: 9px;
}

.next-event-copy > strong {
  display: block;
  overflow: visible;
  -webkit-line-clamp: unset;
  font: 800 20px/1.35 "Inter Tight", "Noto Sans TC", sans-serif;
  letter-spacing: -.02em;
  overflow-wrap: anywhere;
}

.next-event-copy > time {
  margin-top: 4px;
  font: 600 15px/1.5 Inter, "Noto Sans TC", sans-serif;
  letter-spacing: 0;
}

.next-event-copy > small {
  font-size: 12px;
  line-height: 1.6;
}

.next-event-detail {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--renew-rule);
  font-size: 13px;
  font-weight: 700;
}

.next-event-detail .material-symbols-rounded {
  color: var(--renew-rose-dark);
  font-size: 20px;
}

#homeEventActions > a:first-child {
  color: var(--renew-surface);
  border-color: var(--renew-ink);
  background: var(--renew-ink);
}

#homeEventActions > a:first-child:hover {
  background: #383630;
}

.home-event-actions > :is(a, button, .home-action-disabled) {
  font-size: 12px;
}

.directory-filter-list {
  flex-wrap: wrap;
  overflow: visible;
}

.directory-filter-button {
  padding-inline: 12px;
}

.official-news-copy small {
  white-space: normal;
  overflow-wrap: anywhere;
}

@media (max-width: 759px) {
  #homeScreen {
    padding-top: 24px;
  }

  .home-intro h1 {
    font-size: 28px;
  }

  .home-intro {
    margin-bottom: 16px;
    padding-bottom: 16px;
  }

  .next-event-card .next-event-date.is-distant b { font-size: 24px; }
  .next-event-card .next-event-date.is-today b { font-size: 20px; }

  .directory-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 76px;
    align-items: center;
  }

  .directory-main {
    min-height: 112px;
    padding: 14px 10px 14px 14px;
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 12px;
  }

  .directory-monogram {
    width: 40px;
    height: 40px;
    font-size: 12px;
  }

  .directory-card h2 {
    font-size: 18px;
    line-height: 1.35;
    overflow-wrap: anywhere;
  }

  .directory-card footer {
    font-size: 11px;
  }

  .directory-card footer > span:last-child,
  .directory-arrow {
    display: none;
  }

  .directory-card .follow-button {
    width: 64px;
    min-height: 52px;
    margin: 0 12px 0 0;
    padding: 6px 4px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    border: 1px solid var(--renew-rule-strong);
    background: var(--renew-surface);
    font-size: 11px;
  }

  .directory-card .follow-button[aria-pressed="true"] {
    background: var(--renew-rose-soft);
  }
}

@media (max-width: 374px) {
  .next-event-card {
    grid-template-columns: minmax(0, 1fr) 54px;
    gap: 12px;
    padding: 16px;
  }

  .next-event-card .next-event-date b {
    font-size: 28px;
  }

  .next-event-card .next-event-date.is-distant b { font-size: 20px; }

  .next-event-copy > strong {
    font-size: 20px;
  }

  .directory-main {
    grid-template-columns: minmax(0, 1fr);
  }

  .directory-monogram {
    display: none;
  }
}

@media (min-width: 760px) {
  .home-intro {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 32px;
  }

  .home-context {
    flex-direction: column;
    align-items: end;
    margin: 0;
  }

  .next-event-card {
    grid-template-columns: minmax(0, 1fr) 88px;
    padding: 26px;
  }

  .next-event-card .next-event-date b {
    font-size: 56px;
  }

  .next-event-copy > strong {
    font-size: clamp(26px, 2.1vw, 34px);
    max-width: 26ch;
  }

  .next-event-copy > time {
    font-size: 17px;
  }

  .next-event-copy > small {
    font-size: 13px;
  }
}

@media (min-width: 1120px) {
  :root {
    --renew-page-width: min(1600px, calc(100vw - 96px));
  }

  #homeScreen.active {
    grid-template-columns: minmax(0, 1.22fr) minmax(360px, .78fr);
    grid-template-areas: "intro intro" "promo promo" "next updates" "agenda updates" "onboarding onboarding";
    column-gap: clamp(32px, 3.5vw, 64px);
  }

  .home-intro { grid-area: intro; }
  #homePromoSlot { grid-area: promo; }
  #homeNextSection { grid-area: next; display: block; }
  #homeAgendaSection { grid-area: agenda; margin-top: 32px; }
  #homeUpdatesSection { grid-area: updates; margin-top: 0; }
  #homeOnboarding { grid-area: onboarding; margin-top: 32px; }

  #homeEventActions {
    margin-top: 12px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .app-header .bottom-nav button {
    min-width: 64px;
    font-size: 14px;
  }

  .app-header { gap: 14px; }
  .app-header .bottom-nav { gap: 10px; }
  .app-header .header-group-picker { max-width: 176px; }
  .app-header .desktop-search { width: clamp(150px, 16vw, 260px); }
  .app-header .bottom-nav b { font-size: 13px; }
  .header-actions b { font-size: 12px; }
  .official-news-row { min-height: 100px; }
  .official-news-copy strong { -webkit-line-clamp: 3; line-height: 1.6; }
  .directory-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .directory-card h2 { font-size: 21px; }
}

@media (min-width: 1600px) {
  .directory-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.app-update-notice {
  position: fixed;
  z-index: 50;
  left: 50%;
  bottom: calc(86px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(500px, calc(100% - 32px));
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-left: 3px solid var(--oshi-signal-rose, #f16aa7);
  background: var(--oshi-archive-black, #111216);
  color: #fff;
  box-shadow: 0 12px 32px #11121633;
  font-size: 14px;
  line-height: 1.5;
}

.app-update-notice button {
  flex: none;
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  background: var(--oshi-signal-rose, #f16aa7);
  color: var(--oshi-archive-black, #111216);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

@media (min-width: 760px) {
  .app-update-notice { bottom: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (prefers-contrast: more) {
  :root {
    --renew-rule: #89837b;
    --renew-rule-strong: #56514b;
  }

  .campaign-banner::after,
  .home-promo::after {
    background: rgba(0, 0, 0, .72);
  }
}
