:root {
  --sticky-header-height: 71px;
  --bg: #f7f8fa;
  --surface: #ffffff;
  --surface-2: #eef2f5;
  --text: #14171a;
  --muted: #667085;
  --line: #d9e1e8;
  --primary: #d92332;
  --primary-dark: #9f1722;
  --accent: #0f766e;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

/* Member badges, digital card, and Drive gallery */
.member-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.member-achievement-badge {
  --badge-color: var(--primary);
  position: relative;
  display: inline-flex;
  min-height: 25px;
  align-items: center;
  gap: 5px;
  border: 1px solid color-mix(in srgb, var(--badge-color) 30%, var(--line));
  border-radius: 7px;
  background: color-mix(in srgb, var(--badge-color) 12%, var(--surface));
  box-shadow: inset 3px 0 0 var(--badge-color);
  color: var(--text);
  padding: 4px 8px;
  font-size: 9px;
  font-weight: 900;
}

.member-achievement-badge::after {
  position: absolute;
  z-index: 30;
  left: 50%;
  bottom: calc(100% + 8px);
  width: max-content;
  max-width: 220px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--text);
  color: var(--surface);
  content: attr(data-tooltip);
  opacity: 0;
  padding: 8px 10px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.45;
  pointer-events: none;
  text-align: left;
  transform: translate(-50%, 4px);
  transition: opacity 140ms ease, transform 140ms ease;
  white-space: normal;
}

.member-achievement-badge:hover::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.member-achievement-badge svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: var(--badge-color);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.badge-catalog {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 10px;
}

.badge-catalog-card {
  --badge-color: var(--primary);
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 82px;
  border: 1px solid color-mix(in srgb, var(--badge-color) 24%, var(--line));
  border-radius: 8px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--badge-color) 9%, var(--surface)), var(--surface) 58%);
  padding: 12px;
}

.badge-catalog-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--badge-color) 35%, transparent);
  border-radius: 50%;
  background: color-mix(in srgb, var(--badge-color) 15%, var(--surface));
  color: var(--badge-color);
  box-shadow: 0 7px 18px color-mix(in srgb, var(--badge-color) 18%, transparent);
}

.badge-catalog-icon svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.badge-catalog-card strong,
.badge-catalog-card p {
  margin: 0;
}

.badge-catalog-card strong {
  color: var(--text);
  font-size: 13px;
}

.badge-catalog-card p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.member-profile-actions {
  display: flex;
  gap: 8px;
  margin: 0 20px 18px;
}

.member-profile-actions button {
  min-height: 38px;
  border: 0;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  padding: 0 13px;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

.member-profile-actions button.is-secondary {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
}

.digital-member-card {
  position: relative;
  overflow: hidden;
  margin: 0 20px 18px;
  border: 1px solid rgba(250, 204, 21, 0.32);
  border-radius: 8px;
  background: #064e2b;
  color: #fff;
  padding: 18px;
}

.digital-member-card::after {
  position: absolute;
  right: -42px;
  bottom: -62px;
  width: 170px;
  height: 170px;
  border: 24px solid rgba(250, 204, 21, 0.12);
  border-radius: 50%;
  content: "";
}

.digital-card-brand,
.digital-card-main,
.digital-card-footer {
  position: relative;
  z-index: 1;
}

.digital-card-brand,
.digital-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.digital-card-brand {
  color: #facc15;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.digital-card-brand img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
}

.digital-card-main {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 76px;
  align-items: center;
  gap: 14px;
  margin: 20px 0;
}

.digital-card-photo,
.digital-card-avatar {
  width: 72px;
  height: 72px;
  border: 2px solid rgba(255, 255, 255, 0.75);
  border-radius: 50%;
  object-fit: cover;
}

.digital-card-avatar {
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.14);
  font-size: 22px;
  font-weight: 900;
}

.digital-card-identity strong,
.digital-card-identity span,
.digital-card-identity small {
  display: block;
}

.digital-card-identity strong {
  font-size: 19px;
  line-height: 1.15;
}

.digital-card-identity span {
  margin-top: 5px;
  color: #fde047;
  font-size: 11px;
  font-weight: 800;
}

.digital-card-identity small {
  margin-top: 7px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 9px;
}

.digital-card-qr {
  display: block;
  width: 76px;
  height: 76px;
  border-radius: 6px;
  background: #fff;
  padding: 5px;
  object-fit: contain;
}

.digital-card-qr.is-error {
  opacity: 0.65;
}

.digital-card-footer {
  color: rgba(255, 255, 255, 0.68);
  font-size: 9px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
}

.gallery-album,
.gallery-photo {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 0;
  text-align: left;
  cursor: pointer;
}

.gallery-album img,
.gallery-photo img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.gallery-album-copy {
  display: block;
  padding: 11px;
}

.gallery-album-copy strong,
.gallery-album-copy small {
  display: block;
}

.gallery-album-copy strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gallery-album-copy small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
}

.gallery-back {
  grid-column: 1 / -1;
  justify-self: start;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 0 12px;
  font-weight: 800;
  cursor: pointer;
}

.gallery-photo {
  position: relative;
}

.gallery-photo span {
  position: absolute;
  right: 7px;
  bottom: 7px;
  max-width: calc(100% - 14px);
  overflow: hidden;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.68);
  color: #fff;
  padding: 5px 7px;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .digital-card-main {
    grid-template-columns: 58px minmax(0, 1fr) 64px;
    gap: 10px;
  }

  .digital-card-photo,
  .digital-card-avatar {
    width: 58px;
    height: 58px;
  }

  .digital-card-qr {
    width: 64px;
    height: 64px;
  }

  .digital-card-identity strong {
    font-size: 15px;
  }

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

  .badge-catalog {
    grid-template-columns: 1fr;
  }
}

body.dark-mode {
  --bg: #0f1115;
  --surface: #171a21;
  --surface-2: #222734;
  --text: #f4f6fb;
  --muted: #a6adbb;
  --line: #2d3442;
  --primary: #ef4444;
  --primary-dark: #f87171;
  --accent: #2dd4bf;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.3);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(210px, 260px) minmax(240px, 720px) minmax(88px, 1fr);
  gap: 18px;
  align-items: center;
  padding: 14px 22px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(14px);
}

.header-actions {
  display: flex;
  grid-column: 3;
  align-items: center;
  justify-self: end;
  gap: 8px;
}

.notification-wrap,
.settings-wrap {
  position: relative;
}

.notification-button,
.settings-button {
  position: relative;
}

.notification-button svg,
.settings-button svg,
.settings-item-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.notification-badge {
  position: absolute;
  top: -4px;
  right: -3px;
  display: grid;
  min-width: 18px;
  height: 18px;
  place-items: center;
  border: 2px solid var(--surface);
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  padding: 0 4px;
  font-size: 9px;
  font-weight: 900;
}

.settings-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 40;
  width: min(360px, calc(100vw - 24px));
  max-height: calc(100dvh - 92px);
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.22);
}

.notification-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 40;
  width: min(380px, calc(100vw - 24px));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.22);
}

.notification-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.notification-heading small,
.notification-heading strong {
  display: block;
}

.notification-heading small,
.notification-event small,
.notification-empty,
.push-status {
  color: var(--muted);
  font-size: 11px;
}

.notification-heading strong {
  margin-top: 3px;
  font-size: 14px;
}

.notification-heading button {
  border: 0;
  background: transparent;
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.notification-list {
  max-height: 340px;
  overflow-y: auto;
}

.notification-event {
  display: grid;
  width: 100%;
  gap: 4px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  padding: 13px 16px;
  text-align: left;
  cursor: pointer;
}

.notification-event:hover,
.notification-event.is-unread {
  background: color-mix(in srgb, var(--primary) 7%, var(--surface));
}

.notification-event > span {
  color: var(--primary);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.notification-event strong {
  font-size: 13px;
}

.notification-empty {
  padding: 22px 16px;
  text-align: center;
}

.enable-push-button {
  width: calc(100% - 28px);
  min-height: 40px;
  margin: 14px 14px 6px;
  border: 0;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.push-status {
  display: block;
  padding: 0 14px 14px;
  text-align: center;
}

.settings-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 17px;
  border-bottom: 1px solid var(--line);
}

.settings-heading small,
.settings-heading strong,
.settings-item-copy strong,
.settings-item-copy small,
.settings-link strong,
.settings-link small {
  display: block;
}

.settings-heading small,
.settings-item-copy small,
.settings-link small {
  color: var(--muted);
  font-size: 11px;
}

.settings-heading strong {
  margin-top: 3px;
  font-size: 15px;
}

.settings-heading > span {
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--primary);
  padding: 6px 9px;
  font-size: 11px;
  font-weight: 900;
}

.settings-item,
.settings-link {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 68px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  padding: 10px 14px;
  text-align: left;
  text-decoration: none;
}

.settings-link {
  width: 100%;
  cursor: pointer;
}

.settings-link:hover {
  background: var(--surface-2);
}

.settings-item-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--primary);
}

.settings-item-copy strong,
.settings-link strong {
  margin-bottom: 4px;
  font-size: 13px;
}

.settings-item-copy small {
  display: flex;
  align-items: center;
  gap: 6px;
}

.settings-action {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  padding: 0 10px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.settings-install {
  font: inherit;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}

.brand-logo {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border-radius: 999px;
  object-fit: cover;
}

.brand strong,
.brand small {
  display: block;
  white-space: nowrap;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.search {
  display: grid;
  grid-template-columns: 1fr 34px;
  align-items: center;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  overflow: hidden;
}

.search input {
  width: 100%;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  padding: 0 16px;
  background: transparent;
}

.search button,
.icon-button {
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.icon-button {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-size: 20px;
}

.sync-button {
  display: inline-flex;
  width: auto;
  gap: 8px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 900;
  transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}

.sync-button:hover {
  border-color: color-mix(in srgb, var(--primary) 35%, var(--line));
  color: var(--primary-dark);
}

.sync-button:hover .sync-icon {
  transform: rotate(35deg);
}

.sync-icon {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  transition: transform 0.2s ease;
}

.sync-icon svg,
.nav-item svg,
.bottom-nav-item svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.theme-switch {
  display: grid;
  place-items: center;
  width: 64px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  cursor: pointer;
  padding: 0;
}

.theme-switch-track {
  position: relative;
  display: block;
  width: 48px;
  height: 26px;
  border-radius: 999px;
  background: var(--surface-2);
  transition: background 0.2s ease;
}

.theme-switch-track::before,
.theme-switch-track::after {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.data-saver-switch .theme-switch-track::before,
.data-saver-switch .theme-switch-track::after {
  content: none;
}

.data-saver-switch .theme-switch-track {
  background: color-mix(in srgb, var(--muted) 22%, var(--surface-2));
}

.data-saver-switch.is-on .theme-switch-track {
  background: #16a34a;
}

.theme-switch-track::before {
  content: "☀";
  left: 8px;
  color: #f59e0b;
}

.theme-switch-track::after {
  content: "☾";
  right: 7px;
  color: #cbd5e1;
  font-size: 12px;
}

.theme-switch-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.25);
  transition: transform 0.2s ease, background 0.2s ease;
}

.theme-switch.is-on .theme-switch-track {
  background: #263244;
}

.theme-switch.is-on .theme-switch-knob {
  transform: translateX(22px);
  background: #111827;
}

.shell {
  display: grid;
  grid-template-columns: 238px minmax(0, 1fr);
  min-height: calc(100vh - 71px);
}

.sidebar {
  position: sticky;
  top: 71px;
  align-self: start;
  height: calc(100vh - 71px);
  padding: 20px 14px;
  border-right: 1px solid var(--line);
  background: var(--surface);
}

.nav-item {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  margin-bottom: 6px;
  padding: 0 13px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.nav-item span,
.bottom-nav-item span {
  display: grid;
  place-items: center;
  font-weight: 900;
}

.nav-item span {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
}

.nav-item span svg {
  width: 17px;
  height: 17px;
}

.nav-item.is-active {
  background: color-mix(in srgb, var(--primary) 12%, var(--surface));
  color: var(--primary-dark);
  font-weight: 700;
}

.nav-item.is-active span {
  background: var(--primary);
  color: #fff;
}

.drive-status {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 22px;
  padding: 13px;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.sync-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  border-radius: 999px;
  background: #f59e0b;
}

.sync-dot.is-live {
  background: var(--accent);
}

.sync-dot.is-error {
  background: var(--primary);
}

.content {
  min-width: 0;
  padding: 24px;
  padding-bottom: 92px;
}

.app-page {
  display: none;
}

.app-page.is-active {
  display: block;
}

.maintenance-view {
  min-height: min(620px, calc(100vh - 150px));
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
  padding: 40px 20px;
}

.maintenance-public-icon {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  border: 1px solid color-mix(in srgb, #f59e0b 40%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, #f59e0b 12%, var(--surface));
  color: #f59e0b;
}

.maintenance-public-icon svg {
  width: 36px;
  height: 36px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.maintenance-view .eyebrow {
  margin: 18px 0 7px;
}

.maintenance-view h1 {
  margin: 0;
  font-size: clamp(24px, 4vw, 38px);
}

.maintenance-view > p:not(.eyebrow) {
  max-width: 560px;
  margin: 12px 0 20px;
  color: var(--muted);
  line-height: 1.65;
}

.maintenance-view button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  font-weight: 800;
  padding: 0 17px;
}

.home-hero {
  min-height: 0;
  margin-top: 18px;
  padding: 20px 24px;
  border-radius: 8px;
  background: linear-gradient(120deg, #d92332 0%, #0f766e 100%);
  color: #fff;
}

.home-banner-slider {
  position: relative;
  width: min(100%, 980px);
  margin: 18px auto 0;
}

.home-hero h1 {
  max-width: 720px;
  margin: 0;
  font-size: 28px;
  line-height: 1.15;
}

.home-hero p:not(.badge) {
  max-width: 900px;
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  line-height: 1.5;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.primary-link,
.secondary-link,
.admin-login-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 999px;
  padding: 0 16px;
  font-weight: 800;
  text-decoration: none;
}

.primary-link {
  border: 0;
  background: #fff;
  color: #9f1722;
  cursor: pointer;
}

.secondary-link {
  border: 1px solid rgba(255, 255, 255, 0.42);
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.home-event-banner {
  position: relative;
  display: grid;
  width: 100%;
  height: clamp(260px, 30vw, 340px);
  overflow: hidden;
  margin-top: 0;
  border: 0;
  border-radius: 8px;
  background: #111827;
  color: #fff;
  cursor: pointer;
  padding: 0;
  text-align: left;
}

.home-event-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(5, 9, 16, 0.88), rgba(5, 9, 16, 0.18));
}

.home-event-banner img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.24s ease;
}

.home-event-banner img.is-changing {
  opacity: 0.35;
}

.home-event-banner-copy {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: end;
  max-width: 620px;
  min-height: 100%;
  gap: 7px;
  padding: 24px;
}

.home-event-banner-copy small {
  color: #fda4af;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.home-event-banner-copy strong {
  font-size: clamp(22px, 4vw, 38px);
  line-height: 1.1;
}

.home-event-banner-copy span {
  color: rgba(255, 255, 255, 0.74);
  font-size: 13px;
}

.banner-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: grid;
  width: 40px;
  height: 48px;
  place-items: center;
  transform: translateY(-50%);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.48);
  color: #fff;
  font-size: 28px;
  cursor: pointer;
}

.banner-arrow.is-previous {
  left: 14px;
}

.banner-arrow.is-next {
  right: 14px;
}

.banner-dots {
  position: absolute;
  right: 0;
  bottom: 18px;
  left: 0;
  z-index: 3;
  display: flex;
  justify-content: center;
  gap: 7px;
  pointer-events: none;
}

.banner-dots button {
  width: 8px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  padding: 0;
  pointer-events: auto;
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.banner-dots button.is-active {
  width: 24px;
  background: #fff;
}

.home-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.home-announcements,
.finance-extra-section {
  margin-top: 24px;
}

.announcement-list {
  display: grid;
  gap: 10px;
}

.announcement-card {
  border: 1px solid var(--line);
  border-left: 4px solid #0f766e;
  border-radius: 8px;
  background: var(--surface);
  padding: 15px 16px;
}

.announcement-card.is-penting {
  border-left-color: #eab308;
}

.announcement-card.is-mendesak {
  border-left-color: #ef4444;
}

.announcement-card span,
.announcement-card strong {
  display: block;
}

.announcement-card span {
  color: var(--primary);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.announcement-card strong {
  margin-top: 6px;
  font-size: 15px;
}

.announcement-card p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.dues-period-filter {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.dues-period-filter input {
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 0 10px;
}

.dues-summary,
.community-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.community-stats {
  grid-template-columns: repeat(4, 1fr);
}

.dues-summary div,
.community-stats div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 14px;
}

.dues-summary span,
.dues-summary strong,
.community-stats span,
.community-stats strong {
  display: block;
}

.dues-summary span,
.community-stats span {
  color: var(--muted);
  font-size: 10px;
}

.dues-summary strong,
.community-stats strong {
  margin-top: 7px;
  font-size: 18px;
}

.dues-list {
  display: grid;
  gap: 7px;
  margin-top: 12px;
}

.public-dues-filter {
  display: inline-grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3px;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 3px;
}

.public-dues-filter button {
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  padding: 0 12px;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.public-dues-filter button.is-active {
  background: var(--accent);
  color: #fff;
}

.dues-public-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 11px 13px;
}

.dues-public-row strong,
.dues-public-row small {
  display: block;
}

.dues-public-row small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.dues-public-row > span {
  border-radius: 999px;
  padding: 6px 9px;
  font-size: 10px;
  font-weight: 900;
}

.dues-public-row > span.is-paid {
  background: rgba(34, 197, 94, 0.14);
  color: #22c55e;
}

.dues-public-row > span.is-unpaid {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}

.stats-chart {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 16px;
}

.stats-chart h3 {
  margin: 0 0 16px;
  font-size: 13px;
}

.stats-bars {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  align-items: end;
  gap: 8px;
  height: 180px;
}

.stats-bars div {
  display: grid;
  grid-template-rows: 20px minmax(0, 1fr) 18px;
  align-items: end;
  height: 100%;
  text-align: center;
}

.stats-bars strong,
.stats-bars small {
  font-size: 9px;
}

.stats-bars small {
  color: var(--muted);
}

.stats-bars span {
  display: block;
  width: min(34px, 70%);
  min-height: 6px;
  margin: 0 auto;
  border-radius: 5px 5px 0 0;
  background: var(--primary);
}

.home-summary-card,
.event-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
}

.home-summary-card {
  min-height: 142px;
  padding: 18px;
  cursor: pointer;
}

.home-summary-card strong,
.home-summary-card small {
  display: block;
}

.home-summary-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.home-summary-heading > span:first-child {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.home-summary-icon {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  border: 1px solid color-mix(in srgb, #3b82f6 32%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, #3b82f6 12%, var(--surface));
  color: #3b82f6;
}

.home-summary-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.home-summary-icon.is-trophy {
  border-color: color-mix(in srgb, #eab308 38%, var(--line));
  background: color-mix(in srgb, #eab308 14%, var(--surface));
  color: #ca8a04;
}

.home-summary-icon.is-wallet {
  border-color: color-mix(in srgb, #22c55e 35%, var(--line));
  background: color-mix(in srgb, #22c55e 12%, var(--surface));
  color: #16a34a;
}

.home-summary-card strong {
  display: block;
  margin-top: 14px;
  font-size: clamp(25px, 4vw, 38px);
  line-height: 1.05;
}

.home-summary-card small {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.home-summary-card.is-champion {
  background: color-mix(in srgb, #eab308 10%, var(--surface));
  border-color: color-mix(in srgb, #eab308 35%, var(--line));
}

.home-summary-card.is-champion strong {
  color: #ca8a04;
}

.home-summary-card.is-balance strong {
  color: #16a34a;
}

.media-content-tabs {
  position: sticky;
  top: var(--sticky-header-height);
  z-index: 9;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  margin: 0 0 18px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 96%, transparent);
  backdrop-filter: blur(14px);
  padding: 10px 0;
}

.media-content-tab {
  min-height: 38px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-weight: 800;
  padding: 0 14px;
}

.media-content-tab.is-active {
  border-color: transparent;
  background: color-mix(in srgb, var(--primary) 14%, var(--surface));
  color: var(--primary-dark);
}

.media-filter-bar {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  margin: 14px 0 18px;
}

.filter-chip {
  min-height: 38px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-weight: 800;
  padding: 0 14px;
}

.filter-chip.is-active {
  border-color: transparent;
  background: color-mix(in srgb, var(--primary) 14%, var(--surface));
  color: var(--primary-dark);
}

.event-list {
  display: grid;
  gap: 16px;
}

.event-group {
  display: grid;
  gap: 16px;
}

.event-group-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.event-group-heading p,
.event-group-heading h3 {
  margin: 0;
}

.event-group-heading h3 {
  font-size: 20px;
}

.event-group-heading span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.event-empty-card {
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 82%, var(--bg));
  color: var(--muted);
  padding: 18px;
}

.event-card {
  width: min(100%, 820px);
  overflow: hidden;
  justify-self: start;
  box-shadow: var(--shadow);
}

.event-card-body {
  padding: 18px;
}

.event-card h3 {
  margin: 12px 0 14px;
  font-size: clamp(20px, 3vw, 30px);
  line-height: 1.1;
}

.event-card-visual {
  position: relative;
  min-height: 190px;
  background-color: #20242c;
  background-position: center;
  background-size: cover;
}

.event-card-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(4, 9, 17, 0.58);
}

.event-card-visual-copy {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 190px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: end;
  padding: 18px;
}

.event-card-visual h3 {
  max-width: 680px;
  margin: 10px 0 0;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.event-card-visual .event-status {
  background: rgba(255, 255, 255, 0.92);
  color: #20242c;
}

.event-card-visual .event-status.is-present {
  color: #15803d;
}

.event-card-visual .event-status.is-absent {
  color: #b91c1c;
}

.event-card p {
  margin: 0;
  color: var(--muted);
}

.event-details {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 10px 12px;
  margin: 0 0 16px;
}

.event-details dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.event-details dd {
  min-width: 0;
  margin: 0;
  color: var(--text);
  font-weight: 700;
}

.event-map-link {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  max-width: 100%;
  border-radius: 999px;
  background: color-mix(in srgb, var(--primary) 12%, var(--surface));
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
  padding: 0 12px;
  text-decoration: none;
}

.event-status {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 14%, var(--surface));
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  padding: 0 10px;
}

.event-status.is-present {
  background: rgba(22, 163, 74, 0.12);
  color: #15803d;
}

.event-status.is-absent {
  background: rgba(220, 38, 38, 0.12);
  color: #b91c1c;
}

.event-status.is-closed {
  background: var(--surface-2);
  color: var(--muted);
}

.event-actions {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.event-rsvp-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.event-utility-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.event-rsvp {
  min-height: 48px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
  font-weight: 900;
  padding: 0 16px;
}

.event-rsvp:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.event-closed-note {
  flex-basis: 100%;
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.event-rsvp.is-present {
  border-color: rgba(22, 163, 74, 0.38);
  background: rgba(22, 163, 74, 0.14);
  color: #16a34a;
}

.event-rsvp.is-absent {
  border-color: rgba(220, 38, 38, 0.38);
  background: rgba(220, 38, 38, 0.13);
  color: #dc2626;
}

.event-utility {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  padding: 0 12px;
}

.event-utility svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.event-utility:hover {
  border-color: color-mix(in srgb, var(--primary) 40%, var(--line));
  color: var(--primary-dark);
}

body.data-saver .home-event-poster,
body.data-saver .gallery-photo img,
body.data-saver .gallery-album img,
body.data-saver .thumb img {
  image-rendering: auto;
}

.event-responses {
  margin-top: 16px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.event-responses > strong {
  display: block;
  margin-bottom: 9px;
  color: var(--text);
  font-size: 13px;
}

.event-responses ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.event-responses li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 34px;
  border-radius: 8px;
  background: var(--surface-2);
  padding: 7px 10px;
  color: var(--text);
  font-size: 13px;
}

.event-responses li.is-empty {
  justify-content: flex-start;
  color: var(--muted);
}

.event-responses b {
  flex: 0 0 auto;
  font-size: 12px;
}

.event-responses b.is-present {
  color: #15803d;
}

.event-responses b.is-absent {
  color: #b91c1c;
}

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

.event-history ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.event-history-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 86%, var(--bg));
  padding: 12px 14px;
}

.event-history-item strong,
.event-history-item span {
  display: block;
}

.event-history-item strong {
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-history-item div span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.event-history-status {
  flex: 0 0 auto;
  border-radius: 999px;
  background: color-mix(in srgb, var(--muted) 12%, transparent);
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  padding: 7px 10px;
  text-align: center;
}

.finance-fixed-panel {
  position: sticky;
  top: 82px;
  z-index: 9;
  margin: -6px 0 16px;
  padding: 10px 0 12px;
  background: color-mix(in srgb, var(--bg) 96%, transparent);
  backdrop-filter: blur(14px);
}

.finance-lock {
  max-width: 520px;
  margin: 40px auto;
  text-align: center;
}

.finance-lock-icon {
  display: grid;
  width: 68px;
  height: 68px;
  margin: 0 auto;
  place-items: center;
  border: 1px solid color-mix(in srgb, #22c55e 35%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, #22c55e 12%, var(--surface));
  color: #22c55e;
}

.finance-lock-icon svg {
  width: 32px;
  height: 32px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.finance-lock .eyebrow {
  margin: 16px 0 6px;
}

.finance-lock h2,
.finance-lock p {
  margin: 0;
}

.finance-lock p:not(.eyebrow) {
  margin-top: 9px;
  color: var(--muted);
}

.finance-lock form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  max-width: 390px;
  margin: 20px auto 10px;
}

.finance-lock input,
.finance-lock button,
.finance-heading-actions button {
  min-height: 43px;
  border-radius: 8px;
}

.finance-lock input {
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-size: 18px;
  letter-spacing: 5px;
  text-align: center;
}

.finance-lock button {
  border: 0;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  font-weight: 800;
  padding: 0 16px;
}

.finance-lock small {
  color: var(--muted);
}

.finance-protected-content.is-locked {
  max-height: 420px;
  overflow: hidden;
  filter: blur(10px);
  opacity: 0.38;
  pointer-events: none;
  user-select: none;
}

.finance-heading-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.finance-heading-actions button {
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
  cursor: pointer;
  font-weight: 800;
  padding: 0 12px;
}

.finance-fixed-panel .section-heading {
  margin-bottom: 10px;
}

.finance-fixed-panel .notice {
  margin-bottom: 12px;
}

.finance-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.finance-summary div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 13px 14px;
}

.finance-summary span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 6px;
}

.finance-summary strong {
  display: block;
  font-size: 18px;
  line-height: 1.15;
  word-break: break-word;
}

.finance-balance-card {
  grid-column: 1 / -1;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--primary) 92%, #111827), color-mix(in srgb, var(--primary) 58%, #0f172a)) !important;
  border-color: transparent !important;
  color: #fff;
  padding: 20px 18px !important;
  box-shadow: var(--shadow);
}

.finance-balance-card span {
  color: rgba(255, 255, 255, 0.76);
}

.finance-balance-card strong {
  color: #fff;
  font-size: clamp(30px, 5vw, 46px);
}

.finance-flow-card.is-income strong {
  color: #15803d;
}

.finance-flow-card.is-expense strong {
  color: #b91c1c;
}

.finance-table-wrap {
  overflow-x: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.finance-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.finance-table th,
.finance-table td {
  border-bottom: 1px solid var(--line);
  padding: 9px 10px;
  text-align: left;
  vertical-align: top;
  word-break: break-word;
}

.finance-table th {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}

.finance-table td {
  font-size: 12px;
  line-height: 1.35;
}

.finance-table th:nth-child(1),
.finance-table td:nth-child(1) {
  width: 20%;
}

.finance-table th:nth-child(2),
.finance-table td:nth-child(2) {
  width: 36%;
}

.finance-table th:nth-child(3),
.finance-table td:nth-child(3) {
  width: 20%;
}

.finance-table th:nth-child(4),
.finance-table td:nth-child(4) {
  width: 24%;
}

.finance-category-row td {
  background: color-mix(in srgb, var(--primary) 9%, var(--surface));
  border-bottom-color: color-mix(in srgb, var(--primary) 18%, var(--line));
  padding-top: 11px;
  padding-bottom: 11px;
}

.finance-category-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.finance-category-heading strong {
  color: var(--text);
  font-size: 12px;
}

.finance-category-heading span {
  color: var(--muted);
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 800;
}

.finance-type {
  font-weight: 800;
}

.finance-type.is-credit {
  color: #15803d;
}

.finance-type.is-debit {
  color: #b91c1c;
}

.finance-type.is-unpaid {
  color: #b45309;
}

.tutorial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.tutorial-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
}

.tutorial-card h3 {
  margin: 0;
  padding: 14px 14px 10px;
  font-size: 16px;
  line-height: 1.35;
}

.tutorial-video {
  display: block;
  width: 100%;
  max-height: 72vh;
  aspect-ratio: 9 / 16;
  background: #000;
  object-fit: contain;
}

.instagram-embed-wrap {
  display: flex;
  justify-content: center;
  min-height: 340px;
  padding: 0 8px 12px;
}

.tutorial-link {
  display: none;
}

.hall-highlights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.hall-highlight {
  position: relative;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 18px;
}

.hall-highlight-icon {
  display: grid !important;
  width: 42px;
  height: 42px;
  margin-bottom: 14px;
  place-items: center;
  border-radius: 8px;
  background: color-mix(in srgb, var(--primary) 12%, var(--surface-2));
  color: var(--primary);
}

.hall-highlight-icon svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.hall-highlight.is-gold .hall-highlight-icon {
  background: color-mix(in srgb, #eab308 18%, var(--surface));
  color: #ca8a04;
}

.hall-highlight.is-streak .hall-highlight-icon {
  background: color-mix(in srgb, #ef4444 14%, var(--surface));
  color: #ef4444;
}

.hall-highlight.is-monthly .hall-highlight-icon {
  background: color-mix(in srgb, #0f766e 15%, var(--surface));
  color: #0f766e;
}

.hall-highlight.is-gold {
  background: color-mix(in srgb, #eab308 10%, var(--surface));
  border-color: color-mix(in srgb, #eab308 36%, var(--line));
}

.hall-highlight span,
.hall-highlight strong,
.hall-highlight small {
  display: block;
}

.hall-highlight span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.hall-highlight strong {
  overflow: hidden;
  margin-top: 10px;
  font-size: 23px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hall-highlight small {
  margin-top: 8px;
  color: var(--muted);
}

.hall-section {
  margin-top: 28px;
}

.hall-ranking {
  display: grid;
  gap: 8px;
}

.hall-ranking-toggle {
  display: block;
  min-height: 42px;
  margin: 12px auto 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 0 18px;
  font-weight: 800;
}

.hall-ranking-toggle:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.hall-ranking-item {
  display: grid;
  grid-template-columns: 42px 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 12px 14px;
}

.hall-ranking-item.is-rank-1 {
  border-color: color-mix(in srgb, #eab308 44%, var(--line));
  background: color-mix(in srgb, #eab308 8%, var(--surface));
}

.hall-rank {
  color: var(--muted);
  font-size: 14px;
}

.hall-rank.has-trophy {
  display: grid;
  justify-items: center;
  gap: 2px;
  font-size: 10px;
}

.hall-rank.has-trophy svg {
  width: 25px;
  height: 25px;
  fill: color-mix(in srgb, currentColor 20%, transparent);
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.hall-ranking-item.is-rank-1 .hall-rank {
  color: #eab308;
}

.hall-ranking-item.is-rank-2 .hall-rank {
  color: #a8b0bb;
}

.hall-ranking-item.is-rank-3 .hall-rank {
  color: #cd7f32;
}

.hall-avatar,
.founder-avatar {
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: color-mix(in srgb, var(--primary) 15%, var(--surface-2));
  color: var(--primary-dark);
  font-weight: 900;
}

.hall-avatar {
  width: 42px;
  height: 42px;
  font-size: 12px;
}

.hall-ranking-item h3,
.hall-ranking-item p {
  margin: 0;
}

.hall-ranking-item h3 {
  font-size: 14px;
}

.hall-ranking-item p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.hall-total {
  text-align: right;
}

.hall-total strong,
.hall-total span {
  display: block;
}

.hall-total strong {
  font-size: 20px;
}

.hall-total span {
  color: var(--muted);
  font-size: 10px;
}

.founder-grid {
  display: grid;
  gap: 20px;
}

.founder-group-title {
  margin: 0 0 10px;
  color: var(--primary);
  font-size: 14px;
}

.founder-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.founder-card {
  position: relative;
  display: grid;
  justify-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 16px;
  text-align: center;
}

.founder-order {
  position: absolute;
  top: 10px;
  left: 10px;
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}

.founder-card img,
.founder-avatar {
  width: 72px;
  height: 72px;
  margin-bottom: 12px;
}

.founder-card img {
  border-radius: 999px;
  object-fit: cover;
}

.founder-card strong {
  font-size: 14px;
}

.founder-card > span:last-child {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
}

.member-directory {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}

.member-directory-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 11px;
  text-align: left;
  cursor: pointer;
}

.member-directory-card:hover {
  border-color: color-mix(in srgb, var(--primary) 45%, var(--line));
}

.member-directory-card img,
.member-directory-avatar {
  width: 48px;
  height: 48px;
  border-radius: 999px;
}

.member-directory-card img {
  object-fit: cover;
}

.member-directory-avatar,
.member-profile-avatar {
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--primary) 15%, var(--surface-2));
  color: var(--primary);
  font-weight: 900;
}

.member-directory-card strong,
.member-directory-card small {
  display: block;
}

.member-directory-card strong {
  font-size: 13px;
}

.member-directory-card small {
  overflow: hidden;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-profile-dialog {
  width: min(620px, calc(100% - 24px));
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 0;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

.member-profile-dialog::backdrop {
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(4px);
}

.event-calendar-dialog {
  width: min(430px, calc(100% - 24px));
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 24px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.4);
}

.event-calendar-dialog::backdrop {
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(4px);
}

.calendar-dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--text);
  font-size: 22px;
  cursor: pointer;
}

.calendar-dialog-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  margin-bottom: 16px;
  border-radius: 8px;
  background: rgba(217, 35, 50, 0.14);
  color: var(--accent);
}

.calendar-dialog-icon svg,
.event-calendar-options svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.event-calendar-dialog h2 {
  margin: 4px 42px 6px 0;
  font-size: 22px;
}

.event-calendar-meta {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.event-calendar-options {
  display: grid;
  gap: 10px;
}

.event-calendar-options button {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 62px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  padding: 10px 14px;
  text-align: left;
  cursor: pointer;
}

.event-calendar-options button.is-secondary {
  border-color: var(--line);
  background: var(--surface-soft);
  color: var(--text);
}

.event-calendar-options span {
  display: grid;
  gap: 2px;
}

.event-calendar-options strong {
  font-size: 14px;
}

.event-calendar-options small {
  color: currentColor;
  font-size: 11px;
  opacity: 0.76;
}

.event-calendar-status {
  min-height: 18px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.profile-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.38);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
}

.member-profile-header {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  min-height: 190px;
  background: linear-gradient(120deg, #d92332, #0f766e);
  color: #fff;
  padding: 32px;
}

.member-profile-header img,
.member-profile-avatar {
  width: 96px;
  height: 96px;
  border: 3px solid rgba(255, 255, 255, 0.7);
  border-radius: 999px;
}

.member-profile-header img {
  object-fit: cover;
}

.member-profile-header small,
.member-profile-header h2,
.member-profile-header p {
  margin: 0;
}

.member-profile-header h2 {
  margin-top: 6px;
  font-size: 27px;
}

.member-profile-header p {
  margin-top: 6px;
}

.member-profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--line);
}

.member-profile-stats div {
  padding: 16px;
  text-align: center;
}

.member-profile-stats div + div {
  border-left: 1px solid var(--line);
}

.member-profile-stats strong,
.member-profile-stats span {
  display: block;
}

.member-profile-stats strong {
  font-size: 22px;
}

.member-profile-stats span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

.member-profile-body {
  display: grid;
  gap: 20px;
  padding: 24px;
}

.member-profile-body h3 {
  margin: 0 0 9px;
  font-size: 14px;
}

.member-profile-body p,
.member-profile-body ul {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.member-profile-body ul {
  display: grid;
  gap: 5px;
  padding-left: 18px;
}

.member-account-dialog {
  width: min(520px, calc(100% - 24px));
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 0;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

.member-account-dialog::backdrop {
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(4px);
}

.account-dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text);
  font-size: 20px;
  cursor: pointer;
}

.member-account-view {
  padding: 26px;
}

.member-account-heading,
.member-editor-identity {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
  padding-right: 35px;
}

.member-account-heading img,
.member-editor-identity img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
}

.member-account-heading small,
.member-account-heading h2,
.member-account-heading p,
.member-editor-identity small,
.member-editor-identity h2,
.member-editor-identity p {
  margin: 0;
}

.member-account-heading small,
.member-editor-identity small {
  color: var(--primary);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.member-account-heading h2,
.member-editor-identity h2 {
  margin-top: 4px;
  font-size: 20px;
}

.member-account-heading p,
.member-editor-identity p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.member-account-form {
  display: grid;
  gap: 14px;
}

.member-auth-guide {
  border-left: 3px solid var(--primary);
  border-radius: 6px;
  background: color-mix(in srgb, var(--primary) 8%, var(--surface));
  padding: 11px 12px;
}

.member-auth-guide strong,
.member-auth-guide span {
  display: block;
}

.member-auth-guide strong {
  font-size: 11px;
}

.member-auth-guide span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.member-account-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.member-account-form label > small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
  line-height: 1.45;
}

.member-password-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
}

.member-password-field input {
  border: 0;
  background: transparent;
}

.member-password-field button {
  border: 0;
  background: transparent;
  color: var(--primary-dark);
  padding: 0 12px;
  font-size: 10px;
  font-weight: 900;
  cursor: pointer;
}

.member-account-form input,
.member-account-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  padding: 11px 12px;
  font: inherit;
  resize: vertical;
}

.member-account-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.member-account-actions button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}

.member-account-actions button.is-secondary {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
}

.member-account-actions button:disabled,
.member-auth-links button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.member-account-actions button.is-loading::after {
  content: "...";
}

.member-auth-links {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.member-text-button {
  justify-self: start;
  border: 0;
  background: transparent;
  color: var(--primary-dark);
  padding: 0;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.member-account-message {
  min-height: 18px;
  margin: 0;
  border-radius: 7px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.member-account-message:not(:empty) {
  border: 1px solid var(--line);
  background: var(--surface-2);
  padding: 10px 11px;
}

.member-account-message.is-error {
  color: #ef4444;
}

.member-account-message.is-success {
  border-color: rgba(34, 197, 94, 0.3);
  background: rgba(34, 197, 94, 0.1);
  color: #16a34a;
}

.member-photo-cropper {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  padding: 12px;
}

.member-crop-stage {
  overflow: hidden;
  width: 100%;
  height: min(360px, 55vh);
  border-radius: 7px;
  background: #090b0f;
}

.member-crop-stage img {
  display: block;
  max-width: 100%;
}

.member-photo-cropper p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.member-crop-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.member-crop-actions button {
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

.member-crop-actions button.is-secondary {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
}

.member-crop-actions button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: none;
  grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  backdrop-filter: blur(14px);
}

.bottom-nav-item {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  min-height: 62px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.bottom-nav-item.is-active {
  color: var(--primary-dark);
}

.bottom-nav-item span {
  width: 28px;
  height: 24px;
  border-radius: 999px;
  background: transparent;
  font-size: 13px;
  line-height: 1;
}

.bottom-nav-item.is-active span {
  background: color-mix(in srgb, var(--primary) 14%, var(--surface));
  color: var(--primary-dark);
}

.watch {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(260px, 0.8fr);
  gap: 24px;
  align-items: start;
  scroll-margin-top: 90px;
}

.player-column {
  min-width: 0;
}

.player-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  background: #111827;
  box-shadow: var(--shadow);
}

.player-wrap.is-portrait {
  width: min(100%, 420px);
  max-height: 72dvh;
  margin-inline: auto;
  aspect-ratio: 9 / 16;
}

.player-wrap.is-square {
  width: min(100%, 620px);
  margin-inline: auto;
  aspect-ratio: 1 / 1;
}

.player-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 10px 2px 0;
  color: var(--muted);
  font-size: 13px;
}

.media-pill,
.drive-link {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border-radius: 999px;
  padding: 0 11px;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.media-pill {
  background: color-mix(in srgb, var(--primary) 12%, var(--surface));
  color: var(--primary-dark);
}

.media-folder {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drive-link {
  margin-left: auto;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  white-space: nowrap;
}

.native-video,
.player-wrap iframe,
.photo-preview,
.empty-player {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.native-video {
  display: block;
  object-fit: contain;
  background: #000;
}

.photo-preview {
  display: block;
  object-fit: contain;
  background: #0f172a;
}

.player-controls {
  display: grid;
  grid-template-columns: auto minmax(80px, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  min-height: 48px;
  padding: 10px 2px 0;
}

.control-button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  padding: 0 12px;
}

.control-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.progress-range {
  width: 100%;
  accent-color: var(--primary);
}

.time-label {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.empty-player {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 28px;
  color: #fff;
  text-align: center;
}

.empty-player strong {
  font-size: clamp(24px, 4vw, 48px);
}

.empty-player span {
  max-width: 520px;
  color: rgba(255, 255, 255, 0.72);
}

.empty-player.is-hidden,
.is-hidden {
  display: none !important;
}

.video-meta {
  padding-top: 4px;
}

.badge,
.eyebrow {
  margin: 0 0 9px;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.video-meta h1 {
  margin: 0;
  font-size: clamp(24px, 3.3vw, 42px);
  line-height: 1.1;
}

.video-meta p:last-child {
  color: var(--muted);
  line-height: 1.6;
}

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

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.section-heading h2 {
  margin: 0;
  font-size: 22px;
}

.count {
  margin: 0;
  color: var(--muted);
  white-space: nowrap;
}

.notice,
.state {
  margin-bottom: 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  line-height: 1.55;
}

.notice strong {
  color: var(--text);
}

.notice code {
  color: var(--primary-dark);
  font-weight: 700;
}

.state-error {
  border-color: #fecdd3;
  background: #fff1f2;
  color: var(--primary-dark);
}

.folder-heading {
  grid-column: 1 / -1;
  margin: 6px 0 -4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.playlist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}

.video-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.folder-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: inherit;
  text-align: left;
  cursor: pointer;
  padding: 10px;
}

.thumb.is-folder::after {
  content: "FOLDER";
  background: rgba(217, 35, 50, 0.88);
}

.playlist-back {
  grid-column: 1 / -1;
  justify-self: start;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  padding: 0 14px;
}

.video-card.is-active .card-title {
  color: var(--primary-dark);
}

.thumb {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  background: #1f2937;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.thumb::after {
  content: "PLAY";
  position: absolute;
  left: 12px;
  bottom: 10px;
  display: grid;
  min-width: 42px;
  height: 34px;
  padding: 0 10px;
  place-items: center;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

.thumb.is-photo::after {
  content: "IMG";
  background: rgba(15, 118, 110, 0.88);
}

.card-title {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-meta {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (max-width: 900px) {
  :root {
    --sticky-header-height: 122px;
  }

  .topbar {
    grid-template-columns: 1fr auto;
  }

  .header-actions {
    grid-column: 2;
  }

  .search {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .shell,
  .watch {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }

  .bottom-nav {
    display: grid;
  }

  .nav-item {
    width: auto;
    flex: 0 0 auto;
    margin-bottom: 0;
  }

  .drive-status {
    min-width: 220px;
    margin-top: 0;
  }

  .content {
    padding: 16px;
  }
}

@media (max-width: 540px) {
  :root {
    --sticky-header-height: 118px;
  }

  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 12px;
    gap: 10px;
  }

  .brand strong {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .notification-menu {
    position: fixed;
    top: 72px;
    right: 12px;
    left: 12px;
    width: auto;
  }

  .member-profile-header {
    grid-template-columns: 72px minmax(0, 1fr);
    min-height: 160px;
    padding: 24px 18px;
  }

  .member-profile-header img,
  .member-profile-avatar {
    width: 72px;
    height: 72px;
  }

  .member-profile-header h2 {
    font-size: 20px;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
  }

  .playlist-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .content {
    padding: 0;
    padding-bottom: 82px;
  }

  .home-hero {
    min-height: 0;
    margin: 12px;
    border-radius: 8px;
    padding: 16px;
  }

  .home-hero h1 {
    font-size: 23px;
  }

  .home-hero p:not(.badge) {
    font-size: 12px;
  }

  .home-event-banner {
    height: 220px;
    min-height: 0;
    margin: 0;
    width: 100%;
  }

  .home-banner-slider {
    margin: 12px;
    width: calc(100% - 24px);
  }

  .home-event-banner-copy {
    min-height: 100%;
    padding: 16px;
  }

  .banner-arrow {
    width: 34px;
    height: 42px;
  }

  .home-summary-grid {
    grid-template-columns: 1fr;
  }

  .hall-highlights {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    padding: 0 12px;
  }

  .hall-highlight {
    min-height: 148px;
    padding: 10px 7px;
    text-align: center;
  }

  .hall-highlight-icon {
    width: 32px;
    height: 32px;
    margin: 0 auto 9px;
  }

  .hall-highlight-icon svg {
    width: 18px;
    height: 18px;
  }

  .hall-highlight span {
    min-height: 27px;
    font-size: 8px;
    line-height: 1.35;
  }

  .hall-highlight strong {
    display: -webkit-box;
    min-height: 30px;
    overflow: hidden;
    margin-top: 7px;
    font-size: 12px;
    line-height: 1.25;
    text-overflow: clip;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .hall-highlight small {
    margin-top: 5px;
    font-size: 9px;
    line-height: 1.3;
  }

  .dues-summary,
  .community-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .finance-extra-section,
  .home-announcements {
    margin: 20px 12px 0;
  }

  .home-summary-grid {
    padding: 0 12px;
  }

  .finance-fixed-panel {
    top: 0;
    margin: 0 -12px 10px;
    padding: 10px 12px 12px;
  }

  .finance-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .finance-summary div {
    padding: 10px;
  }

  .finance-balance-card {
    padding: 14px 12px !important;
  }

  .finance-balance-card strong {
    font-size: clamp(25px, 8vw, 34px);
  }

  .finance-summary strong {
    font-size: 15px;
  }

  .finance-table th,
  .finance-table td {
    padding: 7px 6px;
  }

  .finance-table th {
    font-size: 9px;
  }

  .finance-table td {
    font-size: 10.5px;
  }

  .finance-type {
    font-size: 10px;
  }

  .finance-table th:nth-child(1),
  .finance-table td:nth-child(1) {
    width: 19%;
  }

  .finance-table th:nth-child(2),
  .finance-table td:nth-child(2) {
    width: 35%;
  }

  .finance-table th:nth-child(3),
  .finance-table td:nth-child(3) {
    width: 20%;
  }

  .finance-table th:nth-child(4),
  .finance-table td:nth-child(4) {
    width: 26%;
  }

  .home-summary-grid {
    margin-top: 12px;
  }

  .media-content-tabs {
    margin: 0;
    padding: 9px 12px;
  }

  #hallPage {
    padding: 14px 12px 0;
  }

  .hall-ranking-item {
    grid-template-columns: 30px 38px minmax(0, 1fr) auto;
    gap: 8px;
    padding: 10px;
  }

  .hall-avatar {
    width: 38px;
    height: 38px;
  }

  .media-filter-bar {
    padding: 0 12px;
  }

  #eventPage,
  #financePage {
    padding: 14px 12px 0;
  }

  .event-card {
    width: 100%;
  }

  .event-card-body {
    padding: 16px;
  }

  .event-card-visual,
  .event-card-visual-copy {
    min-height: 150px;
  }

  .event-card-visual-copy {
    padding: 16px;
  }

  .event-group-heading {
    align-items: start;
    flex-direction: column;
    gap: 6px;
  }

  .event-history-item {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .event-history-status {
    justify-self: start;
  }

  .event-details {
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 9px;
  }

  .watch {
    position: sticky;
    top: calc(var(--sticky-header-height) + 57px);
    z-index: 8;
    gap: 10px;
    padding: 10px 12px 12px;
    border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--bg) 98%, transparent);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
    scroll-margin-top: 128px;
  }

  .player-wrap {
    border-radius: 8px;
    box-shadow: none;
  }

  .player-wrap.is-portrait {
    width: min(36vw, 140px);
    max-height: 250px;
  }

  #fullscreenButton {
    width: 32px;
    min-width: 32px;
    padding: 0;
  }

  #fullscreenButton svg {
    width: 16px;
    height: 16px;
  }

  .player-controls {
    grid-template-columns: auto minmax(54px, 1fr) auto auto;
    gap: 8px;
    min-height: 40px;
    padding: 8px 0 0;
  }

  .control-button {
    min-height: 30px;
    padding: 0 10px;
    font-size: 11px;
  }

  #fullscreenButton {
    display: inline-flex;
  }

  .time-label {
    font-size: 11px;
  }

  .player-toolbar {
    min-height: 38px;
    padding: 7px 0 0;
    gap: 7px;
    font-size: 11px;
  }

  .media-pill,
  .drive-link {
    min-height: 28px;
    padding: 0 9px;
    font-size: 10px;
  }

  .video-meta {
    padding-top: 0;
  }

  .badge {
    margin-bottom: 5px;
    font-size: 10px;
  }

  .video-meta h1 {
    display: -webkit-box;
    overflow: hidden;
    font-size: 16px;
    line-height: 1.25;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .video-meta p:last-child {
    display: none;
  }

  .playlist-section {
    margin-top: 0;
    padding: 16px 12px 24px;
  }

  .video-card,
  .folder-card {
    grid-template-columns: 132px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    padding: 7px;
    background: var(--surface);
  }

  .video-card.is-active {
    background: #fff6f7;
    outline: 1px solid #fecdd3;
  }

  .thumb {
    grid-row: 1 / span 2;
    border-radius: 6px;
  }

  .thumb::after {
    left: 7px;
    bottom: 7px;
    min-width: 34px;
    height: 24px;
    padding: 0 7px;
    font-size: 9px;
  }

  .card-title {
    grid-column: 2;
    font-size: 13px;
    line-height: 1.3;
  }

  .card-meta {
    grid-column: 2;
    margin-top: 4px;
    font-size: 11px;
    line-height: 1.35;
  }
}
