:root {
  color-scheme: dark;
  --ink: #f6fbff;
  --muted: #9eb4c3;
  --line: rgba(255, 255, 255, 0.14);
  --panel: rgba(9, 18, 30, 0.78);
  --panel-strong: rgba(12, 25, 40, 0.92);
  --cyan: #31e5ff;
  --green: #54f0a4;
  --amber: #ffd36a;
  --red: #ff6a7a;
  --hku-red: #9d2235;
  --hku-red-bright: #d72f49;
  --violet: #8f7dff;
  --shadow: 0 22px 80px rgba(0, 0, 0, 0.34);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 16% 8%, rgba(157, 34, 53, 0.38), transparent 30%),
    radial-gradient(circle at 86% 14%, rgba(49, 229, 255, 0.18), transparent 24%),
    linear-gradient(135deg, #15070c 0%, #071522 45%, #101018 100%);
  color: var(--ink);
}

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

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
}

.hero {
  position: relative;
  min-height: clamp(520px, 76vh, 760px);
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(17, 5, 10, 0.78), rgba(7, 15, 24, 0.2) 54%, rgba(3, 8, 14, 0.58)),
    url("assets/hku-sports-hero.png") center 48% / cover;
  transform: scale(1.02);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(4, 10, 18, 0.1), rgba(4, 10, 18, 0.9)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.055) 0 1px, transparent 1px 96px);
}

.topbar,
.hero-content,
.workspace,
.member-panel {
  width: min(1440px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0;
}

.brand-mark,
.week-pill,
.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  border: 1px solid var(--line);
  background: rgba(4, 13, 20, 0.54);
  backdrop-filter: blur(16px);
}

.brand-mark {
  gap: 10px;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 800;
}

.brand-orbit {
  width: 20px;
  height: 20px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--hku-red), var(--hku-red-bright));
  box-shadow: 0 0 24px rgba(215, 47, 73, 0.72), inset 0 0 16px rgba(255, 255, 255, 0.26);
}

.brand-logo {
  width: 148px;
  height: 40px;
  object-fit: contain;
}

.week-pill,
.status-badge {
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--green);
  font-weight: 800;
}

.admin-link,
.ghost-link {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(49, 229, 255, 0.36);
  border-radius: 8px;
  padding: 8px 12px;
  color: var(--ink);
  background: rgba(49, 229, 255, 0.1);
  text-decoration: none;
  font-weight: 800;
}

.hero-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
  gap: 32px;
  align-items: end;
  padding: clamp(80px, 14vh, 150px) 0 64px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 10px;
  color: #ffccd3;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  max-width: 780px;
  font-size: 88px;
  line-height: 0.92;
}

.subtitle {
  max-width: 640px;
  margin: 20px 0 0;
  color: #c7d8e2;
  font-size: 21px;
  line-height: 1.5;
}

.hku-signal {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(157, 34, 53, 0.36);
  backdrop-filter: blur(14px);
}

.hku-signal span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 46px;
  clip-path: polygon(50% 0, 100% 18%, 90% 76%, 50% 100%, 10% 76%, 0 18%);
  background: #ffffff;
  color: var(--hku-red);
  font-weight: 950;
}

.hku-signal img {
  width: 214px;
  max-width: min(56vw, 214px);
  height: auto;
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(58, 42, 22, 0.1);
}

.hku-signal strong {
  color: #fff;
  font-size: 14px;
}

.hero-stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.hero-stats div,
.panel {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
}

.hero-stats div {
  min-height: 110px;
  padding: 18px;
  border-radius: 8px;
}

.hero-stats strong {
  display: block;
  color: #ffffff;
  font-size: 42px;
  line-height: 1;
  text-shadow: 0 0 24px rgba(215, 47, 73, 0.55);
}

.hero-stats span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

.workspace {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr) 360px;
  gap: 18px;
  margin-top: -40px;
  position: relative;
  z-index: 3;
}

.panel {
  border-radius: 8px;
  padding: 18px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.panel-header h2 {
  font-size: 22px;
}

.group-board,
.activity-feed,
.member-matrix {
  display: grid;
  gap: 12px;
}

.group-card {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.045);
}

.group-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.group-top strong {
  font-size: 18px;
}

.score {
  color: var(--amber);
  font-size: 22px;
  font-weight: 900;
}

.meter {
  width: 100%;
  height: 8px;
  margin: 12px 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--green));
}

.mini-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mini-list span,
.member-chip {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  padding: 5px 8px;
  color: #dce8ef;
  background: rgba(255, 255, 255, 0.055);
  font-size: 12px;
  text-decoration: none;
}

.checkin-zone {
  display: grid;
  gap: 18px;
}

.form-title {
  align-items: start;
}

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

.identity-panel,
.claimed-identity {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  margin-bottom: 14px;
  padding: 14px;
  background:
    linear-gradient(135deg, rgba(157, 34, 53, 0.28), rgba(49, 229, 255, 0.08)),
    rgba(255, 255, 255, 0.045);
}

.identity-copy h3 {
  margin: 0;
  font-size: 20px;
}

.identity-copy p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.identity-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.identity-actions {
  margin-top: 14px;
}

.claimed-identity {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.claimed-identity strong,
.claimed-identity small {
  display: block;
}

.claimed-identity strong {
  font-size: 24px;
}

.claimed-identity small {
  margin-top: 4px;
  color: var(--muted);
}

[hidden] {
  display: none !important;
}

label span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 10px 12px;
  outline: none;
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
}

select option {
  color: #07101a;
}

textarea {
  resize: vertical;
}

.note-field {
  display: block;
  margin-top: 14px;
}

.member-profile-card {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.055);
}

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

.member-profile-card small {
  margin-top: 4px;
  color: var(--muted);
}

.bind-badge {
  flex: 0 0 auto;
  border: 1px solid rgba(255, 211, 106, 0.36);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--amber);
  background: rgba(255, 211, 106, 0.1);
  font-size: 12px;
  font-weight: 900;
}

.bind-badge.bound {
  border-color: rgba(84, 240, 164, 0.44);
  color: var(--green);
  background: rgba(84, 240, 164, 0.12);
}

.upload-grid {
  display: grid;
  grid-template-columns: minmax(210px, 0.8fr) minmax(240px, 1fr);
  gap: 14px;
  margin-top: 14px;
}

.upload-card {
  min-height: 220px;
  border: 1px dashed rgba(49, 229, 255, 0.48);
  border-radius: 8px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  text-align: center;
  background: rgba(49, 229, 255, 0.07);
}

.upload-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.upload-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin: 0 auto;
  border: 1px solid rgba(84, 240, 164, 0.6);
  border-radius: 50%;
  color: var(--green);
  font-size: 34px;
  line-height: 1;
}

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

.upload-card small {
  color: var(--muted);
}

.photo-preview {
  margin: 0;
  min-height: 220px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  position: relative;
}

.media-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.media-preview-grid:has(:only-child) {
  grid-template-columns: 1fr;
}

.media-preview-item {
  position: relative;
  min-width: 0;
}

.media-preview-grid img,
.media-preview-grid video {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.08);
}

.media-preview-item.loading::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 8px;
  background: rgba(5, 15, 22, 0.45);
}

.media-preview-item.loading span {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 1;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  padding: 6px 10px;
  color: #fff;
  background: rgba(0, 0, 0, 0.66);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.media-preview-grid:has(:only-child) img,
.media-preview-grid:has(:only-child) video {
  aspect-ratio: 4 / 3;
  max-height: 260px;
}

.photo-preview figcaption {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  color: #eaf7ff;
  background: rgba(0, 0, 0, 0.54);
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.share-result {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  border: 1px solid rgba(84, 240, 164, 0.36);
  border-radius: 8px;
  padding: 12px;
  background: rgba(84, 240, 164, 0.1);
}

.share-result div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.primary-action,
.ghost-action,
.icon-action,
.danger-action,
.row-danger {
  min-height: 44px;
  border-radius: 8px;
  border: 1px solid transparent;
  color: var(--ink);
  font-weight: 900;
}

.primary-action {
  flex: 1;
  background: linear-gradient(90deg, #14c9ff, #35e89d);
  color: #06131b;
}

.primary-action:disabled {
  cursor: wait;
  opacity: 0.68;
}

.ghost-action,
.icon-action {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
}

.danger-action,
.row-danger {
  background: rgba(255, 106, 122, 0.14);
  border-color: rgba(255, 106, 122, 0.35);
}

.ghost-action {
  padding: 0 14px;
}

.icon-action {
  width: 44px;
  font-size: 24px;
}

.week-track {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

.day-cell {
  min-height: 78px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 10px;
  background: rgba(255, 255, 255, 0.045);
}

.day-cell.active {
  border-color: rgba(84, 240, 164, 0.6);
  background: rgba(84, 240, 164, 0.11);
}

.day-cell strong {
  display: block;
  font-size: 14px;
}

.day-cell span {
  display: block;
  margin-top: 10px;
  color: var(--cyan);
  font-size: 24px;
  font-weight: 900;
}

.activity-header {
  align-items: start;
}

.activity-item {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 12px;
  align-items: start;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.05);
}

.moment-avatar {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--hku-red), var(--cyan));
  font-weight: 950;
}

.moment-head strong,
.activity-item strong {
  display: block;
}

.moment-head span,
.activity-item span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.moment-head a {
  color: #fff;
  text-decoration: none;
}

.moment-text {
  margin: 10px 0 8px;
  color: #edf7ff;
  line-height: 1.55;
}

.moment-meta,
.moment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.moment-meta span {
  border: 1px solid rgba(49, 229, 255, 0.24);
  border-radius: 999px;
  padding: 4px 8px;
  color: #c8f6ff;
  background: rgba(49, 229, 255, 0.08);
}

.moment-media-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 10px;
}

.moment-media-grid.single {
  grid-template-columns: 1fr;
}

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

.moment-media-grid img,
.moment-media-grid video {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.08);
}

.moment-media-grid.single img,
.moment-media-grid.single video {
  aspect-ratio: 4 / 3;
  max-height: 320px;
}

.moment-actions {
  margin-top: 10px;
}

.moment-actions a,
.text-action {
  border: 0;
  padding: 0;
  color: var(--cyan);
  background: transparent;
  font-weight: 900;
  text-decoration: none;
}

.comments-box {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  border-radius: 8px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.comment-row {
  display: flex;
  gap: 6px;
  align-items: baseline;
  color: #dce8ef;
  font-size: 13px;
}

.comment-row strong {
  color: #fff;
}

.comment-empty {
  color: var(--muted);
  font-size: 13px;
}

.comment-form {
  display: grid;
  grid-template-columns: 0.8fr 1fr auto;
  gap: 6px;
  margin-top: 8px;
}

.comment-form input,
.comment-form button {
  min-height: 36px;
}

.comment-form button {
  border: 1px solid rgba(84, 240, 164, 0.36);
  border-radius: 8px;
  padding: 0 10px;
  color: var(--green);
  background: rgba(84, 240, 164, 0.1);
  font-weight: 900;
}

.comment-identity-panel,
.comment-identity-gate {
  margin-top: 8px;
  border: 1px solid rgba(157, 34, 53, 0.18);
  border-radius: 8px;
  background: rgba(255, 248, 235, 0.72);
  color: #4c3128;
  font-weight: 800;
}

.comment-identity-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
}

.comment-identity-panel a {
  color: var(--hku-red);
  text-decoration: none;
  white-space: nowrap;
}

.member-panel {
  margin-top: 18px;
  margin-bottom: 28px;
}

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

.member-group h3 {
  margin: 0 0 10px;
}

.member-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.member-chip.done {
  border-color: rgba(84, 240, 164, 0.42);
  color: #eafff4;
  background: rgba(84, 240, 164, 0.13);
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 20;
  max-width: min(360px, calc(100% - 36px));
  padding: 12px 14px;
  border: 1px solid rgba(84, 240, 164, 0.4);
  border-radius: 8px;
  background: rgba(5, 18, 24, 0.94);
  box-shadow: var(--shadow);
  color: var(--ink);
  transform: translateY(18px);
  opacity: 0;
  pointer-events: none;
  transition: 180ms ease;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.admin-body {
  min-height: 100vh;
  padding-bottom: 36px;
}

.share-body {
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(12, 4, 8, 0.25), rgba(7, 14, 22, 0.94)),
    url("assets/hku-sports-hero.png") center / cover fixed;
}

.share-shell {
  width: min(760px, calc(100% - 28px));
  margin: 0 auto;
  padding: 22px 0 36px;
}

.share-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.share-card {
  display: grid;
  gap: 14px;
}

.share-card-head {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 14px;
  align-items: center;
}

.share-card h1 {
  margin: 0;
  font-size: 42px;
  line-height: 1.05;
}

.share-card p {
  margin: 6px 0 0;
  color: var(--muted);
}

.share-join-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  border: 1px solid rgba(157, 34, 53, 0.18);
  border-radius: 8px;
  padding: 14px;
  background: linear-gradient(135deg, rgba(255, 248, 235, 0.96), rgba(243, 234, 216, 0.88));
}

.share-join-card strong {
  display: block;
  color: #191612;
  font-size: 20px;
  line-height: 1.25;
}

.share-join-card p {
  margin-top: 6px;
  color: rgba(25, 22, 18, 0.62);
  line-height: 1.55;
}

.share-join-button {
  display: inline-grid;
  place-items: center;
  min-height: 46px;
  border-radius: 8px;
  padding: 0 18px;
  background: #9d2235;
  color: #fffaf0;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.share-loading {
  min-height: 220px;
  display: grid;
  place-items: center;
  color: var(--muted);
}

.detail-stats,
.member-info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.detail-stats div,
.member-info-grid div {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.055);
}

.detail-stats strong,
.member-info-grid strong {
  display: block;
  color: #fff;
  font-size: 20px;
}

.detail-stats span,
.member-info-grid span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.member-timeline {
  display: grid;
  gap: 12px;
}

.member-timeline-item {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.05);
}

.admin-shell {
  width: min(1440px, calc(100% - 32px));
  margin: 0 auto;
}

.admin-topbar {
  width: 100%;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.admin-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
  gap: 20px;
  align-items: end;
  margin-top: 12px;
}

.admin-hero h1 {
  font-size: 60px;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.admin-stats div {
  min-height: 96px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.055);
}

.admin-stats strong {
  display: block;
  color: var(--cyan);
  font-size: 34px;
}

.admin-stats span {
  color: var(--muted);
}

.admin-grid {
  display: grid;
  grid-template-columns: 390px minmax(0, 1fr);
  gap: 18px;
  margin-top: 18px;
}

.admin-members-panel {
  margin-top: 18px;
}

.table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.admin-table th,
.admin-table td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 12px 10px;
  text-align: left;
  vertical-align: middle;
}

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

.admin-table a {
  color: var(--cyan);
  font-weight: 800;
}

.row-danger {
  min-height: 34px;
  padding: 0 10px;
}

/* Editorial light theme inspired by changjiang47.com */
:root {
  color-scheme: light;
  --ink: #14120f;
  --muted: #766f63;
  --line: rgba(31, 27, 21, 0.13);
  --panel: rgba(255, 252, 245, 0.9);
  --panel-strong: rgba(255, 249, 237, 0.96);
  --cyan: #8a1f2d;
  --green: #9b6a2b;
  --amber: #b48a3c;
  --red: #9d2235;
  --hku-red: #9d2235;
  --hku-red-bright: #b73a45;
  --violet: #5b5145;
  --shadow: 0 18px 52px rgba(58, 42, 22, 0.12);
  font-family:
    "Times New Roman", "Songti SC", "Noto Serif CJK SC", "PingFang SC",
    "Microsoft YaHei", serif;
}

body {
  background:
    linear-gradient(180deg, rgba(255, 252, 245, 0.72), rgba(244, 236, 220, 0.9)),
    repeating-linear-gradient(90deg, rgba(99, 75, 38, 0.04) 0 1px, transparent 1px 96px),
    #f6efe1;
  color: var(--ink);
}

.hero {
  min-height: clamp(560px, 72vh, 760px);
}

.hero-media {
  background:
    linear-gradient(90deg, rgba(246, 239, 225, 0.95), rgba(246, 239, 225, 0.64) 48%, rgba(20, 18, 15, 0.28)),
    linear-gradient(180deg, rgba(157, 34, 53, 0.13), rgba(180, 138, 60, 0.1)),
    url("assets/hku-sports-hero.png") center 48% / cover;
  filter: saturate(0.82) contrast(0.95);
}

.hero-overlay {
  background:
    linear-gradient(180deg, rgba(255, 252, 245, 0), rgba(246, 239, 225, 0.92)),
    repeating-linear-gradient(90deg, rgba(31, 27, 21, 0.055) 0 1px, transparent 1px 110px);
}

.brand-mark,
.week-pill,
.status-badge,
.admin-link,
.ghost-link {
  background: rgba(255, 252, 245, 0.72);
  border-color: rgba(31, 27, 21, 0.16);
  color: #1d1913;
  box-shadow: 0 8px 22px rgba(58, 42, 22, 0.08);
}

.brand-mark,
.week-pill,
.status-badge,
.admin-link,
.ghost-link,
.primary-action,
.ghost-action,
.icon-action,
.danger-action,
.row-danger,
.bind-badge,
.member-chip,
.mini-list span,
.moment-meta span {
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

.brand-orbit {
  border-color: rgba(20, 18, 15, 0.16);
  background: linear-gradient(135deg, #9d2235, #b48a3c);
  box-shadow: inset 0 0 0 5px rgba(255, 252, 245, 0.75), 0 8px 24px rgba(157, 34, 53, 0.22);
}

.brand-logo {
  width: 154px;
  height: 42px;
  filter: drop-shadow(0 8px 14px rgba(58, 42, 22, 0.1));
}

.week-pill,
.status-badge {
  color: #8a1f2d;
}

.admin-link,
.ghost-link {
  background: rgba(157, 34, 53, 0.08);
}

.eyebrow,
.section-kicker {
  color: #8a1f2d;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 11px;
  font-weight: 900;
}

h1,
h2,
h3 {
  color: #14120f;
  font-weight: 900;
}

h1 {
  max-width: 820px;
  font-size: 96px;
  line-height: 0.9;
}

.subtitle {
  color: #4e463b;
  font-size: 20px;
}

.hku-signal {
  border-color: rgba(157, 34, 53, 0.24);
  background: rgba(255, 252, 245, 0.7);
  box-shadow: 0 12px 28px rgba(58, 42, 22, 0.12);
}

.hku-signal span {
  background: #9d2235;
  color: #fff8eb;
}

.hku-signal img {
  background: #fffaf0;
}

.hku-signal strong,
.hero-stats strong,
.detail-stats strong,
.member-info-grid strong,
.comment-row strong {
  color: #14120f;
  text-shadow: none;
}

.hero-stats div,
.panel,
.group-card,
.identity-panel,
.claimed-identity,
.member-profile-card,
.photo-preview,
.activity-item,
.comments-box,
.member-timeline-item,
.admin-stats div,
.detail-stats div,
.member-info-grid div {
  background: rgba(255, 252, 245, 0.86);
  border-color: rgba(31, 27, 21, 0.13);
  box-shadow: 0 14px 42px rgba(58, 42, 22, 0.1);
  backdrop-filter: blur(18px);
}

.panel,
.group-card,
.identity-panel,
.claimed-identity,
.member-profile-card,
.photo-preview,
.activity-item,
.member-timeline-item {
  border-radius: 8px;
}

.hero-stats span,
.identity-copy p,
.claimed-identity small,
label span,
.member-profile-card small,
.moment-head span,
.activity-item span,
.comment-empty,
.share-card p,
.share-loading,
.detail-stats span,
.member-info-grid span,
.admin-stats span,
.admin-table th {
  color: var(--muted);
}

.score,
.admin-stats strong,
.day-cell span {
  color: #8a1f2d;
}

.meter {
  background: rgba(31, 27, 21, 0.08);
}

.meter span {
  background: linear-gradient(90deg, #9d2235, #b48a3c);
}

.mini-list span,
.member-chip {
  border-color: rgba(31, 27, 21, 0.12);
  background: rgba(255, 249, 237, 0.9);
  color: #4b4237;
}

input,
select,
textarea {
  border-color: rgba(31, 27, 21, 0.16);
  background: rgba(255, 255, 255, 0.64);
  color: #14120f;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(157, 34, 53, 0.5);
  box-shadow: 0 0 0 3px rgba(157, 34, 53, 0.1);
}

select option {
  color: #14120f;
}

.bind-badge {
  border-color: rgba(180, 138, 60, 0.42);
  background: rgba(180, 138, 60, 0.12);
  color: #8a5b1f;
}

.bind-badge.bound,
.member-chip.done,
.day-cell.active,
.share-result,
.comment-form button {
  border-color: rgba(157, 34, 53, 0.28);
  background: rgba(157, 34, 53, 0.08);
  color: #8a1f2d;
}

.upload-card {
  border-color: rgba(157, 34, 53, 0.36);
  background:
    linear-gradient(180deg, rgba(255, 252, 245, 0.92), rgba(244, 236, 220, 0.72)),
    rgba(255, 255, 255, 0.5);
}

.upload-icon {
  border-color: rgba(180, 138, 60, 0.5);
  color: #9d2235;
  background: rgba(180, 138, 60, 0.12);
}

.media-preview-grid img,
.media-preview-grid video,
.moment-media-grid img,
.moment-media-grid video {
  background: rgba(31, 27, 21, 0.08);
}

.media-preview-item.loading::after {
  background: rgba(246, 239, 225, 0.62);
}

.media-preview-item.loading span,
.photo-preview figcaption {
  color: #fff8eb;
  background: rgba(20, 18, 15, 0.68);
}

.primary-action {
  background: #14120f;
  color: #fff8eb;
  box-shadow: 0 12px 26px rgba(20, 18, 15, 0.18);
}

.ghost-action,
.icon-action {
  background: rgba(255, 252, 245, 0.72);
  border-color: rgba(31, 27, 21, 0.16);
  color: #14120f;
}

.danger-action,
.row-danger {
  background: rgba(157, 34, 53, 0.1);
  border-color: rgba(157, 34, 53, 0.28);
  color: #8a1f2d;
}

.day-cell {
  background: rgba(255, 249, 237, 0.74);
  border-color: rgba(31, 27, 21, 0.12);
}

.moment-avatar {
  background: linear-gradient(135deg, #9d2235, #b48a3c);
  color: #fff8eb;
}

.moment-head a,
.moment-text,
.comment-row {
  color: #2d271f;
}

.moment-meta span {
  border-color: rgba(180, 138, 60, 0.28);
  background: rgba(180, 138, 60, 0.1);
  color: #81551d;
}

.moment-actions a,
.text-action,
.admin-table a {
  color: #8a1f2d;
}

.toast {
  border-color: rgba(157, 34, 53, 0.28);
  background: rgba(255, 252, 245, 0.96);
  color: #14120f;
}

.share-body {
  background:
    linear-gradient(180deg, rgba(255, 252, 245, 0.88), rgba(246, 239, 225, 0.96)),
    url("assets/hku-sports-hero.png") center / cover fixed;
}

.admin-table th,
.admin-table td {
  border-bottom-color: rgba(31, 27, 21, 0.1);
}

[v-cloak] {
  display: none !important;
}

.admin-body {
  --el-color-primary: #9d2235;
  --el-color-primary-light-3: #b94c5a;
  --el-color-primary-light-5: #d28a94;
  --el-color-primary-light-7: #ebccd1;
  --el-color-primary-light-9: #f8ecee;
  --el-color-primary-dark-2: #761827;
  --el-border-radius-base: 8px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 12%, rgba(180, 138, 60, 0.2), transparent 28%),
    linear-gradient(135deg, #fff8eb 0%, #f6efe1 48%, #e9ddc7 100%);
  color: #14120f;
}

.admin-login-shell {
  display: grid;
  grid-template-columns: minmax(340px, 0.95fr) minmax(360px, 480px);
  align-items: center;
  gap: 36px;
  width: min(100% - 48px, 1120px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 48px 0;
}

.admin-login-brand {
  display: grid;
  gap: 18px;
}

.admin-login-brand img {
  width: min(260px, 72vw);
  height: auto;
}

.admin-login-brand h1 {
  max-width: 620px;
  margin: 0;
  color: #14120f;
  font-family: var(--display-font);
  font-size: 76px;
  font-weight: 400;
  line-height: 0.95;
}

.admin-login-brand p:not(.section-kicker) {
  max-width: 560px;
  margin: 0;
  color: rgba(20, 18, 15, 0.72);
  font-size: 18px;
  line-height: 1.8;
}

.admin-login-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.admin-login-metrics span {
  min-width: 126px;
  border: 1px solid rgba(31, 27, 21, 0.14);
  border-radius: 8px;
  padding: 12px 14px;
  background: rgba(255, 252, 245, 0.72);
  color: rgba(20, 18, 15, 0.62);
}

.admin-login-metrics strong {
  display: block;
  color: #9d2235;
  font-size: 22px;
}

.admin-login-card.el-card,
.element-panel.el-card,
.element-stat-card.el-card {
  border: 1px solid rgba(31, 27, 21, 0.13);
  border-radius: 8px;
  background: rgba(255, 252, 245, 0.92);
  box-shadow: 0 22px 54px rgba(45, 39, 31, 0.11);
}

.admin-login-card .el-card__header,
.element-panel .el-card__header {
  border-color: rgba(31, 27, 21, 0.1);
}

.admin-login-head,
.element-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.element-card-head .el-input {
  width: min(100%, 260px);
}

.admin-login-head span,
.element-card-head span {
  color: #14120f;
  font-size: 18px;
  font-weight: 700;
}

.admin-login-button {
  width: 100%;
  margin-top: 8px;
}

.admin-login-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
  color: rgba(20, 18, 15, 0.55);
  font-size: 13px;
}

.element-admin-shell {
  display: grid;
  gap: 24px;
}

.element-admin-hero {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(360px, 1fr);
  align-items: end;
  gap: 22px;
}

.element-admin-hero h1 {
  margin: 6px 0 0;
  color: #14120f;
  font-family: var(--display-font);
  font-size: 58px;
  font-weight: 400;
  line-height: 0.96;
}

.element-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.element-stat-card .el-card__body {
  display: grid;
  gap: 8px;
  min-height: 116px;
  padding: 18px;
}

.element-stat-card span {
  color: rgba(20, 18, 15, 0.58);
  font-size: 13px;
}

.element-stat-card strong {
  color: #9d2235;
  font-size: 34px;
}

.element-admin-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.72fr) minmax(0, 1.28fr);
  gap: 24px;
}

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

.element-rank-item {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(120px, 1fr) auto;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid rgba(31, 27, 21, 0.1);
  padding-bottom: 14px;
}

.element-rank-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.element-rank-item strong,
.element-rank-item span {
  color: #14120f;
}

.element-rank-item small {
  display: block;
  margin-top: 4px;
  color: rgba(20, 18, 15, 0.52);
}

.admin-members-panel {
  overflow: hidden;
}

.admin-body .el-table,
.admin-body .el-table th.el-table__cell,
.admin-body .el-table tr,
.admin-body .el-table td.el-table__cell {
  background: transparent;
}

.admin-body .el-table {
  color: #2d271f;
}

.admin-body .el-table th.el-table__cell {
  color: rgba(20, 18, 15, 0.72);
}

.admin-body .el-card__body {
  color: #2d271f;
}

.app-body {
  --el-color-primary: #9d2235;
  --el-color-primary-light-3: #b94c5a;
  --el-color-primary-light-5: #d28a94;
  --el-color-primary-light-7: #ebccd1;
  --el-color-primary-light-9: #f8ecee;
  --el-color-primary-dark-2: #761827;
  --el-border-radius-base: 8px;
}

.element-front-shell .el-card {
  border: 0;
  border-radius: 8px;
  background: transparent;
}

.element-front-shell .el-card__header,
.element-front-shell .el-card__body {
  border: 0;
  padding: 0;
}

.element-checkin-card.panel,
.progress-panel.el-card,
.member-panel.el-card {
  background: rgba(255, 252, 245, 0.84);
}

.element-form-block {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.identity-gate {
  display: grid;
  gap: 18px;
  margin-top: 18px;
  border: 1px solid rgba(157, 34, 53, 0.16);
  border-radius: 8px;
  padding: 16px;
  background: rgba(255, 248, 235, 0.62);
}

.identity-gate .el-segmented {
  width: fit-content;
  max-width: 100%;
}

.identity-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

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

.checkin-locked {
  position: relative;
  opacity: 0.52;
  pointer-events: none;
  user-select: none;
}

.checkin-locked::after {
  content: "请先完成会员身份领取";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(157, 34, 53, 0.28);
  border-radius: 8px;
  background: rgba(255, 252, 245, 0.66);
  color: #8a1f2d;
  font-weight: 700;
}

.element-form-block .el-form-item {
  margin-bottom: 0;
}

.element-form-block .el-select,
.element-form-block .el-input-number {
  width: 100%;
}

.element-upload-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.82fr) minmax(260px, 1fr);
  gap: 16px;
  margin-top: 4px;
}

.element-upload .el-upload,
.element-upload .el-upload-dragger {
  width: 100%;
}

.element-upload .el-upload-dragger {
  display: grid;
  place-items: center;
  min-height: 240px;
  border-color: rgba(157, 34, 53, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 252, 245, 0.94), rgba(244, 236, 220, 0.78)),
    rgba(255, 255, 255, 0.5);
}

.element-upload .el-upload-dragger:hover {
  border-color: #9d2235;
}

.element-share-result {
  margin-top: 18px;
}

.share-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  margin-top: 10px;
}

.moment-actions {
  align-items: center;
}

.moment-actions .el-button {
  padding: 0;
}

.comment-form .el-input {
  min-width: 0;
}

.element-group-card .el-progress {
  width: 100%;
}

.element-front-shell .el-alert {
  border-radius: 8px;
}

.member-bio {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  border: 1px solid rgba(31, 27, 21, 0.1);
  border-radius: 8px;
  padding: 16px;
  background: rgba(255, 252, 245, 0.72);
}

.member-bio span {
  color: rgba(20, 18, 15, 0.52);
  font-size: 13px;
}

.member-bio p {
  margin: 0;
  color: #14120f;
  line-height: 1.75;
}

.member-info-grid strong {
  overflow-wrap: anywhere;
}

@media (max-width: 1180px) {
  .workspace {
    grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1fr);
  }

  .activity-panel {
    grid-column: 1 / -1;
  }

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

@media (max-width: 780px) {
  .topbar,
  .hero-content,
  .workspace,
  .member-panel {
    width: min(100% - 24px, 680px);
  }

  .topbar {
    align-items: flex-start;
    gap: 10px;
    flex-direction: column;
  }

  .hero {
    min-height: 680px;
  }

  .hero-content,
  .workspace,
  .form-grid,
  .identity-grid,
  .upload-grid,
  .member-matrix {
    grid-template-columns: 1fr;
  }

  .hero-content {
    padding-top: 70px;
  }

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

  .hero-stats div {
    min-height: 92px;
    padding: 12px;
  }

  .hero-stats strong {
    font-size: 30px;
  }

  .week-track {
    grid-template-columns: repeat(2, 1fr);
  }

  .form-actions {
    flex-direction: column;
  }

  .comment-form {
    grid-template-columns: 1fr;
  }

  .claimed-identity {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-shell {
    width: min(100% - 24px, 680px);
  }

  .admin-hero,
  .admin-grid,
  .detail-stats,
  .member-info-grid {
    grid-template-columns: 1fr;
  }

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

  .admin-actions {
    justify-content: flex-start;
  }

  .admin-login-shell,
  .element-admin-hero,
  .element-admin-grid {
    grid-template-columns: 1fr;
  }

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

  .element-upload-grid,
  .share-actions,
  .identity-grid.single-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .admin-stats,
  .element-stat-grid {
    grid-template-columns: 1fr;
  }

  .admin-login-shell {
    width: min(100% - 24px, 680px);
  }

  .admin-login-footer,
  .element-card-head,
  .element-rank-item {
    align-items: flex-start;
    flex-direction: column;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .brand-mark {
    width: 100%;
  }

  .brand-logo {
    width: 140px;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .week-track {
    grid-template-columns: 1fr;
  }
}

/* Componentized member-facing app */
.front-body {
  color-scheme: light;
  background:
    linear-gradient(180deg, rgba(20, 18, 15, 0.32), rgba(255, 252, 245, 0.94) 520px),
    #fffaf0;
  color: #191612;
}

.front-app {
  min-height: 100vh;
  padding-bottom: 42px;
}

.front-hero {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  color: #fffaf0;
}

.front-hero-media {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(53, 10, 19, 0.86), rgba(24, 17, 14, 0.44) 54%, rgba(6, 12, 22, 0.72)),
    url("assets/hku-sports-hero.png") center 48% / cover;
  transform: scale(1.02);
}

.front-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8, 10, 13, 0.04), rgba(8, 10, 13, 0.72)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.055) 0 1px, transparent 1px 96px);
}

.front-topbar,
.front-hero-content,
.front-workbench,
.front-members {
  position: relative;
  z-index: 1;
  width: min(1440px, calc(100% - 32px));
  margin: 0 auto;
}

.front-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0;
}

.front-brand,
.front-week,
.front-admin {
  border: 1px solid rgba(255, 248, 235, 0.24);
  background: rgba(32, 18, 17, 0.54);
  backdrop-filter: blur(14px);
}

.front-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  border-radius: 999px;
  padding: 7px 14px;
  font-weight: 800;
}

.front-brand img {
  width: 146px;
  height: 38px;
  object-fit: contain;
}

.front-week {
  color: #e3c27b;
  font-weight: 800;
}

.front-admin {
  color: #fffaf0;
  font-weight: 800;
}

.front-hero-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 430px);
  gap: 32px;
  align-items: end;
  padding: 118px 0 96px;
}

.front-hero-copy h1 {
  max-width: 780px;
  margin: 0;
  color: #fffaf0;
  font-size: 88px;
  line-height: 0.94;
  letter-spacing: 0;
}

.front-hero-copy p {
  max-width: 650px;
  margin: 18px 0 0;
  color: rgba(255, 248, 235, 0.84);
  font-size: 18px;
  line-height: 1.7;
}

.front-season-line {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  margin-top: 18px;
  border: 1px solid rgba(227, 194, 123, 0.32);
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(32, 18, 17, 0.38);
  color: #e3c27b;
  font-size: 13px;
  font-weight: 800;
}

.front-kicker {
  display: block;
  margin: 0 0 9px;
  color: #9d2235;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.front-hero .front-kicker {
  color: #e3c27b;
}

.front-stat-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.front-stat-strip div {
  display: grid;
  gap: 8px;
  min-height: 126px;
  border: 1px solid rgba(255, 248, 235, 0.2);
  border-radius: 8px;
  padding: 18px;
  background: rgba(29, 17, 15, 0.58);
  backdrop-filter: blur(14px);
}

.front-stat-strip strong {
  color: #fffaf0;
  font-size: 36px;
  line-height: 1;
}

.front-stat-strip span {
  color: rgba(255, 248, 235, 0.7);
  font-size: 13px;
}

.front-workbench {
  z-index: 2;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr) 420px;
  gap: 18px;
  align-items: start;
  margin-top: -56px;
}

.front-center {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.front-card {
  border: 1px solid rgba(25, 22, 18, 0.1);
  border-radius: 8px;
  padding: 20px;
  background: rgba(255, 252, 245, 0.94);
  box-shadow: 0 22px 70px rgba(53, 25, 10, 0.12);
  color: #191612;
}

.front-card h2,
.front-card h3 {
  margin: 0;
  color: #191612;
  letter-spacing: 0;
}

.front-card h2 {
  font-size: 24px;
}

.front-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.front-group-list,
.front-feed-list,
.front-form,
.front-identity-body {
  display: grid;
  gap: 14px;
}

.front-group-card {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(157, 34, 53, 0.12);
  border-radius: 8px;
  padding: 14px;
  background: #fff8eb;
}

.front-group-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.front-group-top span {
  color: #9d2235;
  font-size: 24px;
  font-weight: 900;
}

.front-mini-members {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.front-mini-members span,
.front-tags .el-tag,
.front-member-chip {
  border: 1px solid rgba(157, 34, 53, 0.16);
  border-radius: 999px;
  background: rgba(157, 34, 53, 0.06);
  color: #5d1b25;
  font-size: 12px;
  font-weight: 700;
}

.front-mini-members span {
  padding: 5px 9px;
}

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

.front-form-grid.two,
.front-form-grid.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.front-form .el-form-item {
  margin-bottom: 0;
}

.front-form .el-select,
.front-form .el-input-number {
  width: 100%;
}

.front-sport-picker {
  display: grid;
  gap: 12px;
}

.front-sport-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.front-sport-tags .el-radio-button {
  margin: 0;
}

.front-sport-tags .el-radio-button__inner {
  border: 1px solid rgba(157, 34, 53, 0.18);
  border-radius: 999px;
  background: #fff8eb;
  color: #5d1b25;
  font-weight: 800;
  box-shadow: none;
}

.front-sport-tags .el-radio-button:first-child .el-radio-button__inner,
.front-sport-tags .el-radio-button:last-child .el-radio-button__inner {
  border-radius: 999px;
}

.front-sport-tags .el-radio-button__original-radio:checked + .el-radio-button__inner {
  border-color: #9d2235;
  background: #9d2235;
  color: #fffaf0;
  box-shadow: none;
}

.front-sport-tags small {
  opacity: 0.72;
  font-size: 11px;
}

.front-new-tag {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.front-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 2px;
}

.front-claimed,
.front-profile-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid rgba(157, 34, 53, 0.14);
  border-radius: 8px;
  padding: 14px;
  background: #fff8eb;
}

.front-claimed strong,
.front-profile-chip strong {
  display: block;
  font-size: 22px;
}

.front-claimed small,
.front-profile-chip small {
  display: block;
  margin-top: 4px;
  color: rgba(25, 22, 18, 0.58);
}

.front-locked {
  position: relative;
  opacity: 0.56;
  pointer-events: none;
  user-select: none;
}

.front-locked::after {
  content: "请先完成会员身份领取";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(157, 34, 53, 0.28);
  border-radius: 8px;
  background: rgba(255, 252, 245, 0.72);
  color: #8a1f2d;
  font-weight: 800;
}

.front-upload-row {
  display: grid;
  grid-template-columns: minmax(230px, 0.86fr) minmax(280px, 1fr);
  gap: 16px;
}

.front-upload .el-upload,
.front-upload .el-upload-dragger {
  width: 100%;
}

.front-upload .el-upload-dragger {
  display: grid;
  place-items: center;
  min-height: 238px;
  border-color: rgba(157, 34, 53, 0.24);
  border-radius: 8px;
  background: linear-gradient(180deg, #fffaf0, #f3ead8);
}

.front-upload-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin: 0 auto 8px;
  border-radius: 50%;
  background: #9d2235;
  color: #fffaf0;
  font-size: 34px;
  line-height: 1;
}

.front-preview {
  display: grid;
  gap: 10px;
  margin: 0;
}

.front-preview-grid,
.front-media-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.front-preview-item,
.front-media-grid img,
.front-media-grid video {
  overflow: hidden;
  border-radius: 8px;
  background: #17110d;
}

.front-preview-item {
  position: relative;
  aspect-ratio: 1;
}

.front-preview-item img,
.front-preview-item video,
.front-media-grid img,
.front-media-grid video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.front-preview-item.loading::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 252, 245, 0.62);
}

.front-preview-item span {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  color: #9d2235;
  font-weight: 800;
}

.front-preview figcaption {
  color: rgba(25, 22, 18, 0.58);
  font-size: 13px;
}

.front-share {
  margin-top: 16px;
  border-radius: 8px;
}

.front-share-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  gap: 10px;
  margin-top: 10px;
}

.front-week-track {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.front-day {
  display: grid;
  gap: 4px;
  min-height: 92px;
  border: 1px solid rgba(25, 22, 18, 0.1);
  border-radius: 8px;
  padding: 12px;
  background: #fff8eb;
}

.front-day.active {
  border-color: rgba(157, 34, 53, 0.28);
  background: linear-gradient(180deg, rgba(157, 34, 53, 0.1), #fff8eb);
}

.front-day strong,
.front-day b {
  color: #9d2235;
}

.front-day span {
  color: rgba(25, 22, 18, 0.58);
  font-size: 12px;
}

.front-day b {
  align-self: end;
  font-size: 22px;
}

.front-icon-link {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(157, 34, 53, 0.18);
  border-radius: 50%;
  color: #9d2235;
  text-decoration: none;
  font-weight: 900;
}

.front-moment {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  border-bottom: 1px solid rgba(25, 22, 18, 0.08);
  padding-bottom: 16px;
}

.front-moment:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.front-avatar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #9d2235;
  color: #fffaf0;
  font-weight: 900;
}

.front-moment-body {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.front-moment-head {
  display: grid;
  gap: 2px;
}

.front-moment-head a {
  color: #191612;
  text-decoration: none;
}

.front-moment-head span {
  color: rgba(25, 22, 18, 0.54);
  font-size: 12px;
}

.front-moment p {
  margin: 0;
  line-height: 1.7;
}

.front-tags,
.front-moment-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.front-media-grid.single {
  grid-template-columns: 1fr;
}

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

.front-media-grid img,
.front-media-grid video {
  aspect-ratio: 1;
}

.front-media-grid.single img,
.front-media-grid.single video {
  max-height: 420px;
  aspect-ratio: 4 / 3;
}

.front-comments {
  display: grid;
  gap: 6px;
  border-radius: 8px;
  padding: 10px;
  background: rgba(157, 34, 53, 0.05);
}

.front-comments div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  font-size: 13px;
}

.front-comments em {
  color: rgba(25, 22, 18, 0.48);
  font-size: 13px;
  font-style: normal;
}

.front-comment-form {
  display: grid;
  grid-template-columns: 0.72fr 1fr auto;
  gap: 8px;
}

.comment-identity-gate {
  width: 100%;
  min-height: 38px;
  cursor: pointer;
  color: #9d2235;
}

.front-members {
  margin-top: 18px;
}

.front-member-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.front-member-group {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(25, 22, 18, 0.1);
  border-radius: 8px;
  padding: 14px;
  background: #fff8eb;
}

.front-member-group h3 {
  font-size: 17px;
}

.front-member-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.front-member-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  text-decoration: none;
}

.front-member-chip.done {
  border-color: rgba(28, 130, 82, 0.25);
  background: rgba(28, 130, 82, 0.08);
  color: #176643;
}

.front-card .el-button--primary {
  --el-button-bg-color: #9d2235;
  --el-button-border-color: #9d2235;
  --el-button-hover-bg-color: #7d1928;
  --el-button-hover-border-color: #7d1928;
}

.front-card .el-progress-bar__inner {
  background: linear-gradient(90deg, #9d2235, #c9a24c);
}

@media (max-width: 1180px) {
  .front-workbench {
    grid-template-columns: 300px minmax(0, 1fr);
  }

  .front-feed {
    grid-column: 1 / -1;
  }

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

@media (max-width: 820px) {
  .front-topbar,
  .front-hero-content,
  .front-workbench,
  .front-members {
    width: min(100% - 24px, 720px);
  }

  .front-topbar,
  .front-card-head,
  .front-claimed,
  .front-profile-chip {
    align-items: flex-start;
    flex-direction: column;
  }

  .front-hero {
    min-height: 650px;
  }

  .front-hero-content,
  .front-workbench,
  .front-form-grid,
  .front-form-grid.two,
  .front-form-grid.compact,
  .front-upload-row,
  .front-new-tag,
  .front-share-actions,
  .front-comment-form,
  .front-member-grid {
    grid-template-columns: 1fr;
  }

  .front-hero-content {
    padding-top: 80px;
  }

  .front-stat-strip,
  .front-week-track {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .front-group-board {
    order: 2;
  }

  .front-center {
    order: 1;
  }

  .front-feed {
    order: 3;
  }
}

@media (max-width: 520px) {
  .front-brand {
    width: 100%;
    justify-content: space-between;
  }

  .front-brand img {
    width: 132px;
  }

  .front-hero-copy h1 {
    font-size: 44px;
  }

  .front-stat-strip,
  .front-week-track,
  .front-preview-grid {
    grid-template-columns: 1fr;
  }

  .front-moment {
    grid-template-columns: 1fr;
  }
}

/* Member module pages */
.front-directory-teaser {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px) auto;
  gap: 18px;
  align-items: center;
  margin-top: 18px;
}

.front-directory-teaser p,
.member-page-hero p,
.member-side-card p {
  margin: 10px 0 0;
  color: rgba(25, 22, 18, 0.62);
  line-height: 1.75;
}

.front-directory-stats,
.member-filter-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.front-directory-stats div,
.member-filter-stats div {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(157, 34, 53, 0.12);
  border-radius: 8px;
  padding: 12px;
  background: #fff8eb;
}

.front-directory-stats strong,
.member-filter-stats strong {
  color: #9d2235;
  font-size: 24px;
}

.front-directory-stats span,
.member-filter-stats span {
  color: rgba(25, 22, 18, 0.54);
  font-size: 12px;
}

.front-directory-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid #9d2235;
  border-radius: 8px;
  padding: 10px 16px;
  background: #9d2235;
  color: #fffaf0;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.front-directory-button.ghost {
  background: transparent;
  color: #9d2235;
}

.front-empty-state {
  display: grid;
  gap: 10px;
  border: 1px dashed rgba(157, 34, 53, 0.24);
  border-radius: 8px;
  padding: 18px;
  background: #fff8eb;
}

.front-empty-state strong {
  font-size: 20px;
}

.front-empty-state p {
  margin: 0;
  color: rgba(25, 22, 18, 0.62);
  line-height: 1.65;
}

.member-page {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 46px;
}

.member-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.member-nav .front-brand {
  border-color: rgba(157, 34, 53, 0.16);
  background: #fff8eb;
  color: #191612;
  text-decoration: none;
}

.member-nav-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.member-nav-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  border: 1px solid rgba(157, 34, 53, 0.18);
  border-radius: 8px;
  padding: 8px 12px;
  background: rgba(255, 248, 235, 0.86);
  color: #5d1b25;
  font-weight: 800;
  text-decoration: none;
}

.member-page-hero {
  display: grid;
  gap: 4px;
  margin: 42px 0 20px;
}

.member-page-hero h1 {
  margin: 0;
  color: #191612;
  font-size: 60px;
  line-height: 0.96;
}

.member-page-grid,
.member-directory-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  align-items: start;
}

.member-directory-layout {
  grid-template-columns: 300px minmax(0, 1fr);
}

.member-page-card,
.member-side-card,
.member-filter,
.member-directory {
  border: 1px solid rgba(25, 22, 18, 0.1);
  border-radius: 8px;
  background: rgba(255, 252, 245, 0.96);
  box-shadow: 0 22px 70px rgba(53, 25, 10, 0.1);
}

.member-page-card .el-card__header,
.member-page-card .el-card__body {
  border-color: rgba(25, 22, 18, 0.08);
}

.member-side-card,
.member-filter {
  display: grid;
  gap: 14px;
}

.member-side-actions {
  display: grid;
  gap: 10px;
}

.member-filter .el-segmented {
  --el-segmented-item-selected-bg-color: #9d2235;
  --el-segmented-item-selected-color: #fffaf0;
}

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

.member-directory-groups {
  display: grid;
  gap: 18px;
}

.member-directory-group {
  display: grid;
  gap: 12px;
}

.member-directory-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.member-directory-group-head h3 {
  margin: 0;
  color: #191612;
}

.member-directory-group-head span {
  color: rgba(25, 22, 18, 0.52);
  font-weight: 700;
}

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

.member-card-link {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(157, 34, 53, 0.12);
  border-radius: 8px;
  padding: 12px;
  background: #fff8eb;
  color: #191612;
  text-decoration: none;
}

.member-card-link strong,
.member-card-link small,
.member-card-link span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-card-link small {
  margin-top: 3px;
  color: rgba(25, 22, 18, 0.54);
}

.member-card-link span {
  margin-top: 5px;
  color: rgba(25, 22, 18, 0.62);
  font-size: 13px;
}

.member-card-link b {
  color: #9d2235;
  font-size: 22px;
}

@media (max-width: 820px) {
  .front-directory-teaser,
  .member-page-grid,
  .member-directory-layout,
  .member-card-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .member-page {
    width: min(100% - 24px, 640px);
  }

  .member-nav {
    align-items: flex-start;
    flex-direction: column;
  }

  .member-nav .front-brand {
    width: 100%;
  }

  .member-card-link {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .member-card-link b {
    grid-column: 2;
    font-size: 18px;
  }
}

/* Member profile and single check-in moments */
.member-detail-shell {
  width: min(960px, calc(100% - 32px));
}

.member-profile-hero {
  overflow: hidden;
  border-radius: 8px;
  background: #fff8eb;
}

.member-cover {
  min-height: 180px;
  background:
    linear-gradient(90deg, rgba(157, 34, 53, 0.78), rgba(20, 18, 15, 0.1)),
    url("assets/hku-sports-hero.png") center / cover;
}

.member-profile-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 16px;
  align-items: end;
  padding: 0 20px 20px;
  margin-top: -42px;
}

.member-profile-avatar {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border: 4px solid #fffaf0;
  border-radius: 8px;
  background: #9d2235;
  color: #fffaf0;
  font-size: 42px;
  font-weight: 900;
}

.member-profile-row h1 {
  margin: 0;
  color: #191612;
  font-size: 50px;
  line-height: 1;
}

.member-profile-row p {
  margin: 8px 0 0;
  color: rgba(25, 22, 18, 0.62);
}

.member-timeline {
  margin-top: 22px;
}

.member-moment-card {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(25, 22, 18, 0.08);
  border-radius: 8px;
  padding: 16px;
  background: #fffaf0;
}

.member-moment-link {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 12px;
  color: #191612;
  text-decoration: none;
}

.member-moment-body {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.member-moment-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: rgba(25, 22, 18, 0.54);
  font-size: 13px;
}

.member-moment-footer b {
  color: #9d2235;
}

.member-empty-moments {
  border: 1px dashed rgba(157, 34, 53, 0.24);
  border-radius: 8px;
  padding: 22px;
  background: #fff8eb;
  color: rgba(25, 22, 18, 0.62);
}

.checkin-moment-detail {
  display: grid;
  gap: 18px;
}

.checkin-moment-author {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.checkin-moment-author .moment-avatar {
  color: #fffaf0;
  text-decoration: none;
}

.checkin-moment-author h1 {
  margin: 0;
  color: #191612;
  font-size: 42px;
}

.checkin-moment-author p {
  margin: 6px 0 0;
  color: rgba(25, 22, 18, 0.58);
}

.checkin-detail-text {
  font-size: 18px;
  line-height: 1.8;
}

.checkin-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.checkin-detail-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  border: 1px solid rgba(157, 34, 53, 0.18);
  border-radius: 8px;
  padding: 8px 12px;
  background: #fff8eb;
  color: #5d1b25;
  font-weight: 800;
  text-decoration: none;
}

.checkin-comments-section {
  display: grid;
  gap: 12px;
  border-top: 1px solid rgba(25, 22, 18, 0.08);
  padding-top: 18px;
}

@media (max-width: 560px) {
  .member-profile-row,
  .member-moment-link,
  .checkin-moment-author {
    grid-template-columns: 1fr;
  }

  .member-profile-row {
    align-items: start;
  }
}

/* Modern typography refresh */
:root {
  --ui-font:
    Inter, Manrope, "HarmonyOS Sans SC", "MiSans", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei",
    ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --display-font:
    Manrope, Inter, "HarmonyOS Sans SC", "MiSans", "PingFang SC",
    ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html,
body,
button,
input,
select,
textarea,
.el-button,
.el-input,
.el-select,
.el-form-item,
.el-table,
.el-tag,
.front-app,
.member-page,
.share-shell,
.admin-shell {
  font-family: var(--ui-font);
  font-synthesis-weight: none;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
.front-hero-copy h1,
.member-page-hero h1,
.member-profile-row h1,
.checkin-moment-author h1,
.share-card h1,
.admin-login-brand h1,
.element-admin-hero h1 {
  font-family: var(--display-font);
  font-weight: 900;
  letter-spacing: 0;
}

.front-hero-copy h1 {
  max-width: 860px;
  font-size: 96px;
  line-height: 0.9;
}

.front-hero-copy p {
  max-width: 690px;
  font-size: 19px;
  font-weight: 550;
}

.front-kicker,
.section-kicker,
.front-season-line,
.front-brand,
.front-week,
.front-admin,
.front-directory-button,
.member-nav-actions a,
.front-stat-strip span,
.front-card h2,
.front-card h3 {
  font-family: var(--ui-font);
}

.front-card h2,
.front-card h3,
.member-directory-group-head h3,
.share-card h2 {
  font-weight: 850;
}

.front-kicker,
.section-kicker {
  font-size: 11px;
  font-weight: 900;
}

.front-card,
.member-page-card,
.member-side-card,
.member-filter,
.member-directory,
.share-card {
  font-weight: 500;
}

.front-stat-strip strong,
.front-group-top span,
.detail-stats strong,
.member-card-link b,
.front-day b {
  font-family: var(--display-font);
  font-weight: 900;
}

.el-input__inner,
.el-textarea__inner,
.el-select__placeholder,
.el-radio-button__inner {
  font-family: var(--ui-font);
}

@media (max-width: 520px) {
  .front-hero-copy h1 {
    font-size: 48px;
    line-height: 0.96;
  }
}

/* Compact layout pass */
.front-app {
  padding-bottom: 28px;
}

.front-hero {
  min-height: 500px;
}

.front-topbar {
  padding: 16px 0;
}

.front-hero-content {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 390px);
  gap: 24px;
  padding: 92px 0 72px;
}

.front-hero-copy h1 {
  font-size: 88px;
}

.front-hero-copy p {
  margin-top: 14px;
}

.front-season-line {
  margin-top: 14px;
}

.front-stat-strip div {
  min-height: 108px;
  padding: 14px;
}

.front-stat-strip strong {
  font-size: 32px;
}

.front-workbench {
  gap: 14px;
  grid-template-columns: 292px minmax(0, 1fr) 392px;
  margin-top: -42px;
}

.front-center,
.front-group-list,
.front-feed-list,
.front-form,
.front-identity-body {
  gap: 12px;
}

.front-card {
  padding: 16px;
}

.front-card-head {
  margin-bottom: 14px;
}

.front-card h2 {
  font-size: 22px;
}

.front-group-card,
.front-claimed,
.front-profile-chip,
.front-member-group,
.member-moment-card {
  padding: 12px;
}

.front-upload-row {
  gap: 12px;
}

.front-upload .el-upload-dragger {
  min-height: 196px;
}

.front-upload-icon {
  width: 46px;
  height: 46px;
  font-size: 30px;
}

.front-week-track {
  gap: 6px;
}

.front-day {
  min-height: 76px;
  padding: 10px;
}

.front-moment {
  gap: 10px;
  padding-bottom: 12px;
}

.front-moment-body {
  gap: 8px;
}

.front-comments {
  padding: 8px;
}

.front-members,
.front-directory-teaser {
  margin-top: 14px;
}

.member-page {
  padding: 18px 0 34px;
}

.member-page-hero {
  margin: 30px 0 16px;
}

.member-page-grid,
.member-directory-layout {
  gap: 14px;
}

@media (max-width: 1180px) {
  .front-workbench {
    grid-template-columns: 280px minmax(0, 1fr);
  }
}

@media (max-width: 820px) {
  .front-hero {
    min-height: 560px;
  }

  .front-hero-content {
    padding-top: 64px;
    padding-bottom: 54px;
  }

  .front-workbench {
    gap: 12px;
    margin-top: -34px;
  }
}

@media (max-width: 520px) {
  .front-card {
    padding: 14px;
  }

  .front-hero-copy h1 {
    font-size: 42px;
  }
}

/* Mobile-first experience polish */
@media (max-width: 760px) {
  html {
    scroll-padding-top: 12px;
  }

  body {
    -webkit-tap-highlight-color: transparent;
  }

  input,
  textarea,
  select {
    font-size: 16px;
  }

  .front-body {
    background:
      linear-gradient(180deg, rgba(20, 18, 15, 0.28), rgba(255, 252, 245, 0.98) 410px),
      #fffaf0;
  }

  .front-app {
    padding-bottom: max(22px, env(safe-area-inset-bottom));
  }

  .front-topbar,
  .front-hero-content,
  .front-workbench,
  .front-members,
  .member-page-inner,
  .share-shell,
  .admin-shell {
    width: calc(100% - 24px);
  }

  .front-hero {
    min-height: auto;
    border-bottom-left-radius: 18px;
    border-bottom-right-radius: 18px;
  }

  .front-hero-media {
    background:
      linear-gradient(180deg, rgba(46, 10, 18, 0.86), rgba(28, 17, 15, 0.54) 58%, rgba(18, 13, 12, 0.82)),
      url("assets/hku-sports-hero.png") center top / cover;
  }

  .front-hero::after {
    background: linear-gradient(180deg, rgba(10, 10, 12, 0.06), rgba(10, 10, 12, 0.76));
  }

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

  .front-brand {
    min-height: 40px;
    width: auto;
    max-width: 100%;
    justify-content: flex-start;
    gap: 8px;
    padding: 6px 10px;
  }

  .front-brand img {
    width: 112px;
    height: 30px;
  }

  .front-brand span {
    overflow: hidden;
    max-width: 116px;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
  }

  .front-week {
    justify-self: end;
    min-height: 34px;
  }

  .front-admin {
    grid-column: 1 / -1;
    justify-self: start;
    min-height: 34px;
    padding: 0 10px;
  }

  .front-hero-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 46px 0 76px;
  }

  .front-hero-copy h1 {
    max-width: 8em;
    font-size: 40px;
    line-height: 1.02;
  }

  .front-hero-copy p {
    max-width: 22em;
    margin-top: 12px;
    font-size: 15px;
    line-height: 1.65;
  }

  .front-season-line {
    min-height: 30px;
    margin-top: 12px;
    border-radius: 8px;
    font-size: 12px;
  }

  .front-stat-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .front-stat-strip div {
    min-height: 74px;
    gap: 5px;
    padding: 10px;
  }

  .front-stat-strip strong {
    font-size: 25px;
  }

  .front-stat-strip span {
    font-size: 11px;
    line-height: 1.35;
  }

  .front-workbench {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: -44px;
  }

  .front-workbench > *,
  .front-center,
  .front-card,
  .front-form,
  .front-form-grid,
  .front-form-grid > *,
  .front-upload-row,
  .front-upload,
  .front-preview,
  .front-feed,
  .front-group-board {
    min-width: 0;
    width: 100%;
    max-width: 100%;
  }

  .front-card {
    box-sizing: border-box;
  }

  .front-center,
  .front-group-list,
  .front-feed-list,
  .front-form,
  .front-identity-body {
    gap: 10px;
  }

  .front-card,
  .share-card,
  .member-page-card,
  .member-side-card,
  .member-filter,
  .member-directory {
    border-radius: 8px;
    padding: 14px;
    box-shadow: 0 12px 34px rgba(53, 25, 10, 0.1);
  }

  .front-card-head {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
  }

  .front-card h2,
  .front-card h3 {
    font-size: 19px;
  }

  .front-kicker,
  .section-kicker {
    margin-bottom: 5px;
    font-size: 10px;
  }

  .front-identity-summary {
    order: 1;
  }

  .front-composer {
    order: 2;
  }

  .front-progress {
    order: 3;
  }

  .front-group-board {
    order: 4;
  }

  .front-feed {
    order: 5;
  }

  .front-empty-state p,
  .front-moment p,
  .checkin-detail-text,
  .share-card p {
    line-height: 1.62;
  }

  .front-claimed,
  .front-profile-chip,
  .front-group-card {
    padding: 11px;
  }

  .front-claimed strong,
  .front-profile-chip strong {
    font-size: 20px;
  }

  .front-form-grid,
  .front-form-grid.two,
  .front-form-grid.compact,
  .front-upload-row,
  .front-new-tag,
  .front-share-actions {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .front-actions,
  .checkin-detail-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .front-actions .el-button,
  .front-share-actions .el-button,
  .checkin-detail-actions a,
  .comment-form button,
  .comment-identity-gate {
    width: 100%;
    min-height: 44px;
  }

  .front-form .el-input__wrapper,
  .front-form .el-textarea__inner,
  .front-form .el-select__wrapper,
  .front-form .el-input-number,
  .front-form .el-input,
  .front-form .el-textarea,
  .front-form .el-select,
  .front-form .el-form-item,
  .front-form .el-form-item__content,
  .front-comment-form .el-input__wrapper,
  .comment-form input {
    min-height: 44px;
    border-radius: 8px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .front-sport-tags {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
  }

  .front-sport-tags .el-radio-button__inner {
    display: grid;
    place-items: center;
    min-height: 38px;
    width: 100%;
    padding: 7px 6px;
    white-space: normal;
    line-height: 1.2;
    text-align: center;
  }

  .front-upload .el-upload-dragger {
    min-height: 132px;
    padding: 16px 10px;
  }

  .front-upload .el-upload,
  .front-upload .el-upload-dragger,
  .front-upload .el-upload-list {
    width: 100%;
    max-width: 100%;
  }

  .front-upload-icon {
    width: 42px;
    height: 42px;
    font-size: 28px;
  }

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

  .front-preview figcaption {
    font-size: 12px;
  }

  .front-week-track {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
    scroll-snap-type: x proximity;
  }

  .front-day {
    min-width: 88px;
    min-height: 74px;
    scroll-snap-align: start;
  }

  .front-day b {
    font-size: 20px;
  }

  .front-moment {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 10px;
    padding-bottom: 14px;
  }

  .front-avatar {
    width: 38px;
    height: 38px;
    font-size: 14px;
  }

  .front-moment-body {
    gap: 8px;
  }

  .front-moment-actions {
    gap: 10px 14px;
  }

  .front-moment-actions .el-button,
  .front-moment-actions .el-link {
    min-height: 32px;
  }

  .front-media-grid,
  .moment-media-grid {
    gap: 4px;
  }

  .front-media-grid.single img,
  .front-media-grid.single video,
  .moment-media-grid.single img,
  .moment-media-grid.single video {
    max-height: none;
    aspect-ratio: 1 / 1;
  }

  .front-comments {
    padding: 8px;
  }

  .front-comments div {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .front-comment-form,
  .comment-form {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .comment-identity-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .comment-identity-panel a {
    display: grid;
    place-items: center;
    min-height: 42px;
    border-radius: 8px;
    background: rgba(157, 34, 53, 0.1);
  }

  .front-members,
  .front-directory-teaser {
    margin-top: 12px;
  }

  .front-member-grid,
  .front-directory-stats,
  .member-page-grid,
  .member-directory-layout,
  .member-profile-row,
  .member-moment-link,
  .checkin-moment-author {
    grid-template-columns: 1fr;
  }

  .front-directory-button,
  .member-nav-actions a,
  .admin-link,
  .ghost-action {
    min-height: 42px;
  }

  .share-result div {
    display: grid;
    grid-template-columns: 1fr;
  }

  .share-result .ghost-action,
  .share-result .admin-link {
    width: 100%;
  }

  .share-shell {
    padding: 14px 0 max(20px, env(safe-area-inset-bottom));
  }

  .share-card-head {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 10px;
  }

  .share-join-card {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .share-join-button {
    width: 100%;
    min-height: 48px;
  }

  .share-card h1,
  .checkin-moment-author h1,
  .member-page-hero h1,
  .member-profile-row h1 {
    font-size: 28px;
    line-height: 1.12;
  }

  .checkin-moment-detail,
  .checkin-comments-section {
    gap: 12px;
  }
}

@media (max-width: 390px) {
  .front-topbar,
  .front-hero-content,
  .front-workbench,
  .front-members,
  .member-page-inner,
  .share-shell,
  .admin-shell {
    width: calc(100% - 18px);
  }

  .front-hero-copy h1 {
    font-size: 36px;
  }

  .front-brand span {
    max-width: 92px;
  }

  .front-stat-strip div {
    padding: 8px;
  }

  .front-stat-strip strong {
    font-size: 22px;
  }

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