:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-soft: #eef4f2;
  --text: #1b2428;
  --muted: #66757d;
  --line: #dbe2e5;
  --primary: #0f8f70;
  --primary-dark: #0a6d56;
  --accent: #ffb13b;
  --danger: #d94a38;
  --info: #3178c6;
  --shadow: 0 10px 28px rgba(24, 38, 45, 0.08);
}

/* Social feed */
.home-social-page {
  max-width: 1220px;
}

.home-social-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 22px;
  align-items: end;
  margin-bottom: 18px;
  padding: 26px 0 8px;
}

.home-social-hero h1 {
  margin: 0;
  max-width: 820px;
  font-size: clamp(42px, 6.6vw, 82px);
  line-height: 0.94;
}

.home-social-hero p {
  max-width: 660px;
  color: var(--muted);
}

.home-hero-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.home-feed-section {
  margin-top: 14px;
}

.compact-head {
  margin-bottom: 14px;
}

.mini-tabs {
  margin: 0;
  padding: 0;
}

.home-feed-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.home-feed-card {
  background: #fff;
  border: 1px solid rgba(17, 19, 23, 0.1);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: stretch;
}

.home-feed-media {
  flex: 0 0 50%;
  display: block;
  background: #eef2f3;
  overflow: hidden;
  border-radius: 8px 0 0 8px;
  position: relative;
}

.home-feed-media img,
.home-feed-media video,
.home-feed-fallback {
  width: 100%;
  height: 100%;
  aspect-ratio: unset;
}

.home-feed-media img,
.home-feed-media video {
  display: block;
  object-fit: cover;
}

.home-feed-media video {
  background: #111317;
}

.guest-media-lock {
  position: relative;
  overflow: hidden;
}

.guest-media-lock img,
.guest-media-lock video {
  filter: blur(4px) saturate(0.88);
  transform: scale(1.025);
}

.guest-media-lock::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,0.18), rgba(17,19,23,0.18));
  backdrop-filter: blur(1.5px);
}

.home-feed-fallback {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: linear-gradient(135deg, #eef5f2, #f9fbf7);
  color: #111317;
  font-size: 13px;
}

.home-feed-fallback strong {
  font-size: 22px;
}

.home-feed-fallback span {
  color: var(--muted);
  font-weight: 850;
}

.home-feed-body {
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  padding: 14px;
}

.home-author-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.small-avatar {
  width: 42px;
  height: 42px;
  font-size: 15px;
}

.home-author-name {
  color: #111317;
  font-weight: 900;
}

.home-author-row p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.home-feed-card h3 {
  margin: 8px 0 8px;
  font-size: 14px;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-feed-stats {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.home-feed-stats span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #f3f5f6;
  font-size: 12px;
  font-weight: 850;
}

.home-cta-band {
  margin-top: 26px;
  padding: 26px;
  border-radius: 8px;
  background: #111317;
  color: #fff;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
}

.home-cta-band h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
}

.home-cta-band p {
  color: rgba(255,255,255,0.72);
  margin: 8px 0 0;
}

.home-support-section {
  margin-top: 26px;
}

.social-feed-page {
  max-width: 1220px;
}

.social-feed-hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  margin-bottom: 18px;
}

.social-feed-hero h1 {
  margin: 0;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 0.95;
}

.social-feed-hero p {
  max-width: 680px;
  color: var(--muted);
}

.social-feed-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.feed-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin: 18px 0;
  padding-bottom: 4px;
}

.feed-tabs a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(17, 19, 23, 0.1);
  background: #fff;
  color: #111317;
  font-weight: 850;
  white-space: nowrap;
}

.feed-tabs a.active {
  background: #111317;
  color: #fff;
}

.social-search {
  margin-bottom: 22px;
}

.bottom-search-panel {
  margin-top: 28px;
  margin-bottom: 0;
}

.social-search-row {
  grid-template-columns: 150px minmax(190px, 1fr) 170px 140px auto;
}

.challenge-bottom-search {
  grid-template-columns: 180px 180px minmax(220px, 1fr) auto auto;
}

.social-feed-layout {
  display: grid;
  grid-template-columns: minmax(0, 720px) minmax(260px, 1fr);
  gap: 24px;
  align-items: start;
}

.feed-stream {
  display: grid;
  gap: 22px;
}

.social-post {
  background: #fff;
  border: 1px solid rgba(17, 19, 23, 0.1);
  border-radius: 8px;
  overflow: hidden;
}

.social-post-head {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 44px;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
}

.post-author a {
  color: #111317;
  font-weight: 900;
}

.post-author > div {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  flex-wrap: wrap;
}

.level-type-mark {
  display: inline-flex;
  align-items: baseline;
  gap: 1px;
  color: #111317;
  font-size: 19px;
  font-weight: 950;
  line-height: 1;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}

.level-type-mark span {
  color: #8a929a;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.post-author p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.mini-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  margin-left: 4px;
  border-radius: 999px;
  background: #f0f2f3;
  color: #343c44;
  font-size: 12px;
  font-weight: 850;
}

.mini-badge.premium {
  background: #c9ff19;
  color: #111317;
}

.mini-badge.mutual {
  background: #111317;
  color: #fff;
}

.icon-more {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0;
  background: transparent;
  color: #111317;
  font-weight: 900;
  cursor: pointer;
}

.post-media {
  display: block;
  background: #edf1f2;
}

.post-media img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.post-media video {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: #111317;
}

.post-media-fallback {
  aspect-ratio: 4 / 5;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  color: #435159;
  background: linear-gradient(135deg, #eef5f2, #f7f9f7);
}

.post-media-fallback strong {
  font-size: 28px;
}

.post-media-fallback span {
  color: var(--muted);
  font-weight: 750;
}

.post-body {
  padding: 16px;
}

.post-stats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.post-stats strong,
.post-stats span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  background: #f4f6f7;
  font-weight: 850;
}

.post-stats strong {
  background: #111317;
  color: #fff;
}

.post-title {
  margin: 14px 0 0;
  color: #3e4850;
  font-weight: 850;
}

.post-caption {
  margin: 10px 0 0;
}

.post-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.post-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px 0;
}

.post-actions form,
.post-action-left {
  margin: 0;
}

.post-action-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.post-icon-action {
  min-width: 32px;
  min-height: 34px;
  border: 0;
  background: transparent;
  color: #111317;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-weight: 900;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
}

.feed-icon {
  width: 27px;
  height: 27px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.feed-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.heart-icon-shape svg {
  width: 26px;
  height: 26px;
}

.post-icon-action b {
  color: #111317;
  font-size: 14px;
}

.save-icon-action .feed-icon {
  width: 28px;
  height: 28px;
}

.post-icon-action:hover {
  opacity: 0.7;
}

.post-action-button {
  min-height: 48px;
  border: 0;
  background: #fff;
  color: #111317;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-weight: 900;
  cursor: pointer;
  text-decoration: none;
}

.like-action {
  color: #111317;
}

.heart-icon {
  font-size: 26px;
  line-height: 1;
}

.like-action.is-empty .heart-icon,
.heart-icon.is-empty {
  color: #111317;
}

.like-action.is-liked,
.like-action.is-liked .heart-icon,
.heart-icon.is-liked {
  color: #e11d48;
}

.like-action:hover .heart-icon {
  transform: scale(1.12);
}

.like-action.is-liked .feed-icon {
  color: #e11d48;
}

.post-like-summary {
  min-height: 22px;
  padding: 2px 16px 14px;
  color: #111317;
  font-size: 14px;
  font-weight: 850;
}

.post-like-summary:empty {
  display: none;
}

.feed-menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(17, 19, 23, 0.62);
  display: grid;
  place-items: center;
  padding: 24px;
}

.feed-menu-backdrop[hidden] {
  display: none;
}

/* ── Feed card: horizontal compact layout ── */
.feed-card {
  display: flex;
  align-items: stretch;
}

.post-thumb {
  flex: 0 0 50%;
  background: #edf1f2;
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: 8px 0 0 8px;
}

.feed-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.feed-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.post-thumb img,
.post-thumb video,
.feed-card .post-thumb img,
.feed-card .post-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.post-thumb .post-media-fallback {
  width: 100%;
  height: 100%;
  aspect-ratio: unset;
  flex-direction: column;
  font-size: 13px;
}

.post-thumb .post-media-fallback span {
  display: none;
}

.thumb-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 30px;
  height: 30px;
  background: rgba(0, 0, 0, 0.55);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 11px;
  pointer-events: none;
}

.carousel-button {
  position: absolute;
  bottom: 14px;
  z-index: 3;
  transform: none;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: rgba(17, 19, 23, 0.10);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 23px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(8px);
  box-shadow: none;
  opacity: 0.28;
  transition: opacity 160ms ease, background 160ms ease, transform 160ms ease;
}

.carousel-button:hover {
  opacity: 0.62;
  background: rgba(17, 19, 23, 0.20);
  transform: translateY(-1px);
}

.carousel-button.prev {
  left: 10px;
}

.carousel-button.next {
  right: 10px;
}

.carousel-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 20px;
  z-index: 3;
  display: flex;
  justify-content: center;
  gap: 5px;
}

.carousel-dots span {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255,255,255,0.55);
}

.carousel-dots span.active {
  width: 16px;
  background: #fff;
}

.slide-role-label {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 3;
  min-height: 21px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(17, 19, 23, 0.18);
  color: rgba(255,255,255,0.88);
  font-size: 11px;
  font-weight: 780;
  backdrop-filter: blur(6px);
  opacity: 0.72;
}

.feed-slide.proof-slide img,
.feed-slide.proof-slide video {
  object-fit: contain;
  background: #f7f8f9;
}

.feed-slide.media-pending img,
.feed-slide.media-pending video {
  filter: blur(2px) saturate(0.82);
  transform: scale(1.015);
}

.media-processing-panel {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 6;
  transform: translate(-50%, -50%);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 148px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(17, 19, 23, 0.58);
  color: #fff;
  text-align: center;
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 36px rgba(0,0,0,0.18);
}

.media-processing-panel strong {
  font-size: 13px;
  line-height: 1.1;
}

.media-processing-panel em {
  font-style: normal;
  font-size: 11px;
  color: rgba(255,255,255,0.72);
}

.media-progress-percent {
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
}

.media-progress-track {
  width: 92px;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,0.22);
}

.media-progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #b7ff12;
  transition: width 220ms ease;
}

.media-processing-spinner {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.26);
  border-top-color: #b7ff12;
  animation: pulseup-spin 820ms linear infinite;
}

.feed-slide.media-failed .media-processing-spinner {
  display: none;
}

.feed-slide.media-failed .media-processing-panel {
  background: rgba(168, 56, 40, 0.72);
}

@keyframes pulseup-spin {
  to { transform: rotate(360deg); }
}

.post-content {
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.feed-card .social-post-head {
  grid-template-columns: minmax(0, 1fr) 36px;
  gap: 8px;
  padding: 12px 14px 6px;
  align-items: start;
}

.feed-card .avatar {
  display: none;
}

/* 닉네임 + 레벨 한 줄 묶음 */
.feed-card .post-nick-row {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-width: 0;
  flex-shrink: 0;
}

.feed-card .post-author > div {
  gap: 5px;
  row-gap: 4px;
}

/* 닉네임 강조 */
.feed-card .post-author a {
  font-size: 15px;
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}

/* 레벨 뱃지 크기 축소 */
.feed-card .level-type-mark {
  font-size: 14px;
  font-weight: 850;
  flex-shrink: 0;
}

.feed-card .level-type-mark > span {
  font-size: 8px;
}

/* 뱃지 소형화 */
.feed-card .mini-badge {
  font-size: 11px;
  min-height: 18px;
  padding: 0 6px;
  margin-left: 0;
}

.feed-card .post-author p {
  font-size: 12px;
  margin-top: 4px;
}

.feed-card .post-body {
  padding: 6px 14px 4px;
  flex: 1;
}

.feed-card .post-title {
  display: block;
  color: #111317;
  font-weight: 850;
  font-size: 15px;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin: 0 0 8px;
}

.feed-card .post-title:hover {
  text-decoration: underline;
}

.feed-card .post-stats {
  gap: 6px;
}

.feed-card .post-stats strong,
.feed-card .post-stats span {
  min-height: 26px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 700;
}

.feed-card .post-actions {
  padding: 6px 14px 10px;
  gap: 4px;
}

.feed-card .post-action-left {
  gap: 6px;
}

.feed-card .post-icon-action {
  min-width: 28px;
  gap: 4px;
}

.feed-card .post-like-summary {
  padding: 0 14px 10px;
  font-size: 13px;
  min-height: 0;
}

.stacked-upload-fields {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}

.upload-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.small-button {
  min-height: 38px;
  padding: 0 14px;
}

.icon-button.upload-remove {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  color: #111317;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.feed-context-menu {
  width: min(400px, calc(100vw - 48px));
  border-radius: 22px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 24px 60px rgba(0,0,0,0.28);
}

.feed-context-menu a,
.feed-context-menu button {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-bottom: 1px solid rgba(17, 19, 23, 0.12);
  background: #fff;
  color: #111317;
  display: flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  font-weight: 760;
  text-decoration: none;
  cursor: pointer;
}

.feed-context-menu form {
  margin: 0;
}

.feed-context-menu .danger {
  color: #e11d48;
  font-weight: 900;
}

.feed-context-menu > :last-child,
.feed-context-menu form:last-child button {
  border-bottom: 0;
}

.share-toast {
  position: fixed;
  left: 50%;
  bottom: calc(86px + env(safe-area-inset-bottom));
  z-index: 1200;
  transform: translateX(-50%) translateY(10px);
  min-width: 180px;
  max-width: calc(100vw - 40px);
  padding: 12px 16px;
  border-radius: 999px;
  background: #111317;
  color: #fff;
  text-align: center;
  font-size: 14px;
  font-weight: 850;
  opacity: 0;
  transition: opacity 0.18s ease, transform 0.18s ease;
  box-shadow: 0 14px 36px rgba(17, 19, 23, 0.28);
}

.share-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

body.modal-open {
  overflow: hidden;
}

.comment-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(10, 12, 16, 0.58);
  backdrop-filter: blur(3px);
}

.comment-modal-backdrop[hidden] {
  display: none;
}

.comment-modal-sheet {
  width: min(420px, calc(100vw - 32px));
  height: min(88vh, 760px);
  overflow: hidden;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(39, 42, 51, 0.88), rgba(48, 52, 60, 0.72));
  color: #fff;
  box-shadow: 0 30px 90px rgba(0,0,0,0.42);
  display: grid;
  grid-template-rows: 58px minmax(0, 1fr) 70px;
}

.comment-modal-head {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  padding: 0 14px;
}

.comment-modal-head h2 {
  margin: 0;
  text-align: center;
  font-size: 16px;
  font-weight: 900;
}

.comment-modal-close {
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  color: rgba(255,255,255,0.92);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.comment-modal-list {
  overflow-y: auto;
  padding: 10px 18px 16px;
}

.comment-modal-item {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 28px;
  gap: 10px;
  padding: 10px 0 14px;
}

.comment-modal-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.78);
  color: #3a414a;
  font-size: 13px;
  font-weight: 900;
}

.comment-modal-avatar.self {
  width: 30px;
  height: 30px;
  background: rgba(255,255,255,0.7);
}

.comment-modal-body p {
  margin: 0 0 3px;
  line-height: 1.25;
}

.comment-modal-body b {
  font-size: 14px;
  font-weight: 900;
}

.comment-modal-body p span {
  color: rgba(255,255,255,0.55);
  font-size: 12px;
  font-weight: 800;
}

.comment-modal-text {
  color: rgba(255,255,255,0.94);
  font-size: 14px;
  line-height: 1.32;
  word-break: break-word;
}

.comment-modal-meta {
  display: flex;
  gap: 12px;
  margin-top: 8px;
  color: rgba(255,255,255,0.48);
  font-size: 12px;
  font-weight: 800;
}

.comment-modal-heart {
  align-self: center;
  border: 0;
  background: transparent;
  color: rgba(255,255,255,0.48);
  font-size: 24px;
  cursor: default;
}

.comment-modal-empty {
  padding: 40px 10px;
  text-align: center;
  color: rgba(255,255,255,0.62);
  font-size: 14px;
}

.comment-modal-form {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 12px 16px 16px;
  background: linear-gradient(180deg, rgba(47, 51, 60, 0.4), rgba(31, 34, 40, 0.72));
}

.comment-modal-form input[name="content"] {
  width: 100%;
  min-height: 40px;
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 999px;
  background: rgba(10, 12, 16, 0.18);
  color: #fff;
  padding: 0 14px;
  font-size: 14px;
}

.comment-modal-form input[name="content"]::placeholder {
  color: rgba(255,255,255,0.66);
}

.comment-modal-form input[name="content"]:focus {
  outline: 0;
  border-color: rgba(255,255,255,0.45);
  background: rgba(10, 12, 16, 0.28);
}

.comment-modal-form button[type="submit"] {
  min-height: 36px;
  border: 0;
  background: transparent;
  color: rgba(255,255,255,0.9);
  font-weight: 900;
  cursor: pointer;
}

@media (max-width: 640px) {
  .comment-modal-backdrop {
    align-items: end;
    padding: 12px;
  }

  .comment-modal-sheet {
    width: 100%;
    height: min(86vh, 720px);
    border-radius: 22px;
  }
}

.inline-heart {
  display: inline-block;
  margin-right: 2px;
  font-size: 21px;
  vertical-align: -1px;
}

.post-action-button:disabled,
.muted-action {
  color: #77808a;
  cursor: default;
}

.feed-side-panel {
  display: grid;
  gap: 16px;
  position: sticky;
  top: 90px;
}

.empty-feed {
  min-height: 260px;
}

.feed-detail-page {
  max-width: 1180px;
}

.feed-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 640px) minmax(300px, 1fr);
  gap: 24px;
  align-items: start;
}

.detail-post .post-media img,
.detail-post .post-media video,
.detail-post .post-media-fallback {
  aspect-ratio: 4 / 5;
}

.review-media {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: contain;
  background: #111317;
}

.feed-comments-panel {
  display: grid;
  gap: 16px;
  position: sticky;
  top: 90px;
}

.comment-form {
  display: grid;
  gap: 10px;
}

.comment-form textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  font: inherit;
}

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

.comment-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(17, 19, 23, 0.1);
  border-radius: 8px;
  background: #fff;
}

.comment-item p {
  margin: 0 0 6px;
}

.comment-item p span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.comment-item form {
  margin-top: 8px;
}

.comment-item button {
  border: 0;
  background: transparent;
  color: #77808a;
  font-weight: 850;
  cursor: pointer;
  padding: 0;
}

.notification-page {
  max-width: 920px;
}

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

.notification-item {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  gap: 12px;
  padding: 18px;
  border: 1px solid rgba(17, 19, 23, 0.1);
  border-radius: 8px;
  background: #fff;
}

.notification-item.unread {
  border-color: rgba(158, 219, 58, 0.8);
  box-shadow: inset 4px 0 0 #b9ff13;
}

.notification-dot {
  width: 10px;
  height: 10px;
  margin-top: 7px;
  border-radius: 999px;
  background: #d9dee4;
}

.notification-item.unread .notification-dot {
  background: #e11d48;
}

.notification-item p {
  margin: 0 0 6px;
}

.notification-item p span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.notification-item a {
  display: inline-flex;
  margin-top: 10px;
  color: #111317;
  font-weight: 900;
}

@media (max-width: 980px) {
  .home-social-hero {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .home-hero-actions {
    justify-content: flex-start;
  }

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

  .home-cta-band {
    display: grid;
  }

  .social-feed-hero,
  .social-feed-layout,
  .feed-detail-layout {
    display: block;
  }

  .social-feed-actions {
    justify-content: flex-start;
    margin-top: 14px;
  }

  .social-search-row {
    grid-template-columns: 1fr 1fr;
  }

  .social-search-row .button {
    grid-column: span 2;
  }

  .feed-side-panel,
  .feed-comments-panel {
    position: static;
    margin-top: 22px;
  }
}

@media (max-width: 640px) {
  .home-social-page {
    padding-left: 14px;
    padding-right: 14px;
  }

  .home-social-hero {
    padding-top: 18px;
  }

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

  .home-hero-actions .button {
    flex: 1 1 100%;
  }

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

  .home-feed-card {
    margin-left: -2px;
    margin-right: -2px;
  }

  .home-cta-band {
    padding: 20px;
  }

  .social-feed-page {
    padding-left: 14px;
    padding-right: 14px;
  }

  .social-feed-hero h1 {
    font-size: 42px;
  }

  .social-search-row {
    grid-template-columns: 1fr;
  }

  .social-search-row .button {
    grid-column: auto;
  }

  .social-post-head {
    grid-template-columns: 46px minmax(0, 1fr) 38px;
    padding: 12px;
  }

  .avatar {
    width: 46px;
    height: 46px;
  }

  .post-body {
    padding: 14px;
  }

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

* {
  box-sizing: border-box;
}

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

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.header-inner {
  max-width: 1180px;
  height: 68px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 26px;
}

.logo {
  font-weight: 800;
  font-size: 21px;
  letter-spacing: 0;
  color: var(--primary-dark);
  white-space: nowrap;
}

.logo span {
  color: var(--accent);
}


.nav {
  display: flex;
  gap: 18px;
  align-items: center;
  flex: 1;
  color: #334249;
  font-size: 15px;
}

.nav a.active {
  color: var(--primary-dark);
  font-weight: 700;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-notification-link {
  position: relative;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(17, 19, 23, 0.1);
  border-radius: 999px;
  background: #fff;
  color: #e11d48;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  text-decoration: none;
}

.notification-bell {
  font-size: 24px;
  line-height: 1;
}

.notification-count {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: #b9ff13;
  color: #111317;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 950;
  box-shadow: 0 0 0 2px #fff;
}

.page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 24px 80px;
}

.hero {
  min-height: 360px;
  border-radius: 0;
  background:
    linear-gradient(90deg, rgba(11, 37, 42, 0.88), rgba(11, 37, 42, 0.42)),
    url("https://images.unsplash.com/photo-1552674605-db6ffd4facb5?auto=format&fit=crop&w=1600&q=80") center/cover;
  color: #fff;
  padding: 52px;
  display: grid;
  align-content: center;
}

.hero h1 {
  max-width: 640px;
  margin: 0 0 16px;
  font-size: 48px;
  line-height: 1.08;
  letter-spacing: 0;
}

.hero p {
  max-width: 560px;
  margin: 0 0 28px;
  color: rgba(255,255,255,0.86);
  font-size: 18px;
}

.section {
  margin-top: 34px;
}

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

.section h2,
.page-title h1 {
  margin: 0;
  font-size: 28px;
  letter-spacing: 0;
}

.page-title {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin-bottom: 22px;
}

.page-title p,
.section-head p {
  margin: 5px 0 0;
  color: var(--muted);
}

.grid {
  display: grid;
  gap: 16px;
}

.grid > * {
  min-width: 0;
}

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

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

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

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.card-body {
  padding: 20px;
}

.challenge-card {
  overflow: hidden;
}

.challenge-media {
  height: 150px;
  background: linear-gradient(135deg, #0f8f70, #2d6f9f);
  color: #fff;
  padding: 18px;
  display: flex;
  align-items: end;
  font-weight: 800;
}

.challenge-media.trail {
  background: linear-gradient(135deg, #295b3c, #c1822b);
}

.challenge-media.tri {
  background: linear-gradient(135deg, #2367a8, #0f8f70);
}

.challenge-media.swim {
  background: linear-gradient(135deg, #2577a8, #54c2d3);
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: #35524a;
  font-size: 13px;
  font-weight: 650;
}

.badge.warn {
  background: #fff3da;
  color: #80510f;
}

.badge.info {
  background: #e8f1fb;
  color: #225a91;
}

.badge.danger {
  background: #ffe8e4;
  color: #a33828;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: var(--primary);
  color: #fff;
  font-weight: 750;
  cursor: pointer;
}

.button.secondary {
  background: #fff;
  color: var(--text);
  border-color: var(--line);
}

.button.accent {
  background: var(--accent);
  color: #2b1b00;
}

.button.block {
  width: 100%;
}

.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.layout-with-aside {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 20px;
}

.aside {
  align-self: start;
  padding: 18px;
}

.form {
  display: grid;
  gap: 14px;
}

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

.field {
  min-width: 0;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 10px 12px;
  color: var(--text);
  font: inherit;
}

.field input[type="date"] {
  display: block;
  -webkit-appearance: none;
  appearance: none;
}

.field textarea {
  min-height: 120px;
  resize: vertical;
}

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

.progress {
  height: 12px;
  border-radius: 999px;
  background: #e6ecef;
  overflow: hidden;
}

.progress span {
  display: block;
  height: 100%;
  background: var(--primary);
}

.stat {
  display: grid;
  gap: 6px;
}

.stat strong {
  font-size: 30px;
  line-height: 1;
}

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

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

.day {
  aspect-ratio: 1;
  border-radius: 6px;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  background: #fff;
  color: var(--muted);
  font-size: 13px;
}

.day.done {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.day.pending {
  background: #fff3da;
  color: #80510f;
  border-color: #f0ca83;
}

.table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--line);
}

.table th,
.table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.table th {
  background: #f1f5f6;
  color: #405159;
  font-size: 13px;
}

.feed-card img {
  width: 100%;
  height: 210px;
  object-fit: cover;
}

.search-panel {
  padding: 18px;
  margin-bottom: 18px;
}

.search-row {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.friend-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
}

.avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface-soft);
  color: var(--primary-dark);
  font-weight: 850;
}

.message-bubble {
  border-left: 4px solid var(--primary);
  background: #f7fbfa;
  padding: 12px 14px;
  border-radius: 6px;
}

.tabs {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--line);
  margin: 18px 0;
  overflow-x: auto;
}

.tabs a {
  padding: 12px 10px;
  color: var(--muted);
  white-space: nowrap;
}

.tabs a.active {
  color: var(--primary-dark);
  border-bottom: 3px solid var(--primary);
  font-weight: 800;
}

.detail-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 22px;
  align-items: start;
}

.sticky-panel {
  position: sticky;
  top: 88px;
  padding: 20px;
}

.mobile-bottom-nav {
  display: none;
}

.admin-shell {
  max-width: none;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 0;
  padding: 0;
}

.admin-sidebar {
  min-height: calc(100vh - 68px);
  background: #15252b;
  color: #dbe7ea;
  padding: 18px;
}

.admin-sidebar a {
  display: block;
  padding: 11px 12px;
  border-radius: 6px;
  color: #dbe7ea;
}

.admin-sidebar a.active,
.admin-sidebar a:hover {
  background: rgba(255,255,255,0.11);
}

.admin-content {
  padding: 28px;
}

@media (max-width: 1023px) {
  .grid-4,
  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-shell,
  .layout-with-aside {
    grid-template-columns: 1fr;
  }

  .sticky-panel {
    position: static;
  }
}

@media (max-width: 767px) {
  body {
    padding-bottom: 66px;
  }

  .header-inner {
    height: 58px;
    padding: 0 16px;
  }

  .nav,
  .header-actions .hide-mobile {
    display: none;
  }

  .page {
    padding: 18px 14px 82px;
  }

  .hero {
    min-height: 310px;
    padding: 28px 20px;
  }

  .hero h1 {
    font-size: 34px;
  }

  .hero p {
    font-size: 16px;
  }

  .section h2,
  .page-title h1 {
    font-size: 23px;
  }

  .section-head,
  .page-title {
    align-items: start;
    flex-direction: column;
  }

  .grid-4,
  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }

  .filters {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
  }

  .search-row,
  .friend-row {
    grid-template-columns: 1fr;
  }

  .filters .badge {
    white-space: nowrap;
  }

  .table {
    display: block;
    overflow-x: auto;
  }

  .challenge-media {
    height: 120px;
  }

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

  .admin-sidebar {
    min-height: auto;
    display: flex;
    gap: 6px;
    overflow-x: auto;
  }

  .admin-sidebar a {
    white-space: nowrap;
  }

  .admin-content {
    padding: 18px 14px 82px;
  }

  .mobile-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    width: calc(100% - 24px);
    max-width: 520px;
    margin: 0 auto 10px;
    border: 0;
    border-radius: 999px;
    background: #101216;
    color: #fff;
    padding: 8px;
    box-shadow: 0 18px 40px rgba(17, 19, 23, 0.28);
  }

  .mobile-bottom-nav a {
    min-height: 46px;
    display: grid;
    place-items: center;
    font-size: 12px;
    color: rgba(255,255,255,0.72);
    font-weight: 820;
  }

  .mobile-bottom-nav a.primary {
    min-height: 60px;
    margin-top: -28px;
    border-radius: 999px;
    background: #9edb3a;
    color: #101216;
    font-weight: 900;
    box-shadow: 0 16px 30px rgba(158, 219, 58, 0.36);
  }
}

/* PulseUp A-system: minimal premium responsive layer */
:root {
  --bg: #f5f5f7;
  --surface: #ffffff;
  --surface-soft: #f1f4f2;
  --text: #111317;
  --muted: #626b75;
  --line: rgba(17, 19, 23, 0.11);
  --primary: #111317;
  --primary-dark: #111317;
  --accent: #c9ff23;
  --danger: #d94a38;
  --info: #0a84ff;
  --shadow: 0 18px 54px rgba(13, 19, 28, 0.08);
  --container: 1240px;
}

body {
  background:
    radial-gradient(circle at 50% -10%, rgba(255,255,255,0.98), rgba(245,245,247,0) 34%),
    var(--bg);
  color: var(--text);
  font-feature-settings: "tnum";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::selection {
  background: var(--accent);
  color: #111317;
}

.app-header {
  border-bottom: 1px solid rgba(17, 19, 23, 0.08);
  background: rgba(245, 245, 247, 0.82);
  backdrop-filter: blur(22px);
  transition: box-shadow 180ms ease, background 180ms ease;
}

.app-header.is-scrolled {
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 32px rgba(13, 19, 28, 0.08);
}

.header-inner {
  max-width: var(--container);
  height: 72px;
  gap: 30px;
}

.logo {
  color: var(--text);
  font-size: 23px;
  letter-spacing: 0;
}

.logo span {
  color: #74b800;
}

.nav {
  gap: 22px;
  color: #3f4750;
  font-size: 14px;
  font-weight: 700;
}

.nav a {
  position: relative;
  transition: color 160ms ease;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 2px;
  border-radius: 999px;
  background: var(--text);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 180ms ease;
}

.nav a:hover,
.nav a.active {
  color: var(--text);
}

.nav a:hover::after,
.nav a.active::after {
  transform: scaleX(1);
}

.page {
  max-width: var(--container);
  padding: 38px 24px 96px;
}

.hero {
  position: relative;
  min-height: clamp(560px, 72vh, 760px);
  overflow: hidden;
  border: 1px solid rgba(17, 19, 23, 0.08);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.94), rgba(255,255,255,0.74)),
    url("https://images.unsplash.com/photo-1517836357463-d25dfeac3438?auto=format&fit=crop&w=1800&q=82") center bottom/cover;
  color: var(--text);
  padding: clamp(42px, 7vw, 92px);
  place-items: center;
  text-align: center;
}

.hero::before {
  content: "PulseUp";
  position: absolute;
  left: 50%;
  bottom: clamp(20px, 4vw, 46px);
  transform: translateX(-50%);
  color: rgba(17, 19, 23, 0.045);
  font-size: clamp(92px, 18vw, 260px);
  line-height: 0.8;
  font-weight: 900;
  pointer-events: none;
  white-space: nowrap;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero h1 {
  max-width: 980px;
  margin: 0 0 20px;
  color: var(--text);
  font-size: clamp(48px, 7vw, 96px);
  line-height: 0.96;
  font-weight: 900;
  letter-spacing: 0;
  word-break: keep-all;
  overflow-wrap: normal;
}

.hero p {
  max-width: 700px;
  margin: 0 auto 30px;
  color: #454d56;
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.45;
}

.section {
  margin-top: 52px;
}

.section-head,
.page-title {
  margin-bottom: 22px;
}

.section h2,
.page-title h1 {
  font-size: clamp(32px, 4.2vw, 58px);
  line-height: 1.02;
  font-weight: 880;
  letter-spacing: 0;
}

.page-title p,
.section-head p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 16px;
}

.grid {
  gap: 18px;
}

.card {
  border-color: rgba(17, 19, 23, 0.1);
  border-radius: 8px;
  box-shadow: none;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

a.card:hover,
.challenge-card:hover,
.feed-card:hover,
.card.interactive:hover {
  transform: translateY(-4px);
  border-color: rgba(17, 19, 23, 0.2);
  box-shadow: 0 22px 58px rgba(13, 19, 28, 0.12);
}

.card-body {
  padding: clamp(20px, 2.2vw, 28px);
}

.card-body h2,
.card-body h3 {
  margin-top: 0;
  line-height: 1.16;
  letter-spacing: 0;
}

.card-body p {
  color: var(--muted);
}

.challenge-card {
  overflow: hidden;
  background: #fff;
}

.challenge-media {
  position: relative;
  min-height: 188px;
  height: auto;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.05), rgba(0,0,0,0.58)),
    url("https://images.unsplash.com/photo-1552674605-db6ffd4facb5?auto=format&fit=crop&w=900&q=82") center/cover;
  font-size: 22px;
  letter-spacing: 0;
}

.challenge-media.trail {
  background:
    linear-gradient(180deg, rgba(0,0,0,0.04), rgba(0,0,0,0.58)),
    url("https://images.unsplash.com/photo-1500530855697-b586d89ba3ee?auto=format&fit=crop&w=900&q=82") center/cover;
}

.challenge-media.tri {
  background:
    linear-gradient(180deg, rgba(0,0,0,0.04), rgba(0,0,0,0.58)),
    url("https://images.unsplash.com/photo-1534787238916-9ba6764efd4f?auto=format&fit=crop&w=900&q=82") center/cover;
}

.challenge-media.swim {
  background:
    linear-gradient(180deg, rgba(0,0,0,0.04), rgba(0,0,0,0.58)),
    url("https://images.unsplash.com/photo-1530549387789-4c1017266635?auto=format&fit=crop&w=900&q=82") center/cover;
}

.badge {
  min-height: 30px;
  border: 1px solid rgba(17, 19, 23, 0.08);
  background: #f4f5f6;
  color: #313840;
  font-size: 12px;
  font-weight: 800;
}

.badge.warn {
  background: #f7ffd8;
  color: #3a4c00;
}

.badge.info {
  background: #e8f2ff;
  color: #064f9f;
}

.badge.danger {
  background: #fff0ed;
  color: #a33828;
}

.button {
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  background: var(--text);
  color: #fff;
  font-weight: 820;
  letter-spacing: 0;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(17, 19, 23, 0.18);
}

.button.secondary {
  background: #fff;
  color: var(--text);
  border-color: rgba(17, 19, 23, 0.12);
}

.button.accent {
  background: var(--accent);
  color: #111317;
}

.button.block {
  width: 100%;
}

.stat {
  min-height: 136px;
}

.stat strong {
  font-size: clamp(34px, 4vw, 54px);
  letter-spacing: 0;
}

.stat small,
.kpi-meta {
  color: var(--muted);
  font-weight: 760;
}

.layout-with-aside {
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 24px;
}

.aside,
.sticky-panel {
  background: rgba(255,255,255,0.86);
  backdrop-filter: blur(16px);
}

.field label {
  color: #48515a;
  font-size: 12px;
  letter-spacing: 0;
}

.field input,
.field select,
.field textarea {
  min-height: 48px;
  border-radius: 8px;
  border-color: rgba(17, 19, 23, 0.14);
  background: #fff;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 0;
  border-color: #111317;
  box-shadow: 0 0 0 4px rgba(17, 19, 23, 0.08);
}

.select-pair select {
  min-width: 0;
}

.table {
  border-color: rgba(17, 19, 23, 0.1);
  border-radius: 8px;
  overflow: hidden;
}

.table th {
  background: #f7f8f9;
  color: #3c444d;
  font-weight: 820;
}

.table th,
.table td {
  padding: 14px 16px;
}

.feed-card {
  overflow: hidden;
}

.feed-card img {
  height: 240px;
}

.progress {
  height: 10px;
  background: #e6e9eb;
}

.progress span {
  background: #111317;
}

.dashboard-note {
  color: var(--muted);
  margin: 10px 0 0;
  font-size: 13px;
}

.tabs a.active {
  color: var(--text);
  border-bottom-color: var(--text);
}

.detail-shell {
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
}

.admin-shell {
  background: #f5f5f7;
}

.admin-sidebar {
  background: #111317;
  color: #f5f5f7;
}

.admin-sidebar a {
  border-radius: 8px;
}

.admin-sidebar a.active,
.admin-sidebar a:hover {
  background: rgba(201, 255, 35, 0.16);
  color: #fff;
}

.reveal-on-scroll {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 520ms ease, transform 520ms ease;
}

.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (min-width: 1440px) {
  :root {
    --container: 1360px;
  }

  .page {
    padding-top: 48px;
  }

  .hero {
    min-height: 780px;
  }

  .grid-3 {
    gap: 22px;
  }

  .grid-4 {
    gap: 18px;
  }
}

@media (max-width: 1023px) {
  .header-inner {
    height: 64px;
  }

  .page {
    padding: 26px 18px 92px;
  }

  .hero {
    min-height: 560px;
    padding: 42px 26px;
  }

  .layout-with-aside,
  .detail-shell {
    grid-template-columns: 1fr;
  }

  .aside {
    position: static;
  }
}

@media (max-width: 767px) {
  body {
    padding-bottom: 74px;
  }

  .app-header {
    background: rgba(255,255,255,0.92);
  }

  .header-inner {
    height: 58px;
    padding: 0 16px;
  }

  .logo {
    font-size: 21px;
  }

  .header-actions .button:not(.hide-mobile) {
    min-height: 36px;
    padding: 0 13px;
    font-size: 13px;
  }

  .page {
    padding: 18px 14px 92px;
  }

  .hero {
    min-height: calc(100vh - 120px);
    padding: 34px 18px;
    align-content: center;
  }

  .hero::before {
    bottom: 18px;
    font-size: 88px;
  }

  .hero h1 {
    font-size: clamp(36px, 12vw, 50px);
    line-height: 1.02;
  }

  .hero p {
    font-size: 16px;
  }

  .section {
    margin-top: 34px;
  }

  .section h2,
  .page-title h1 {
    font-size: clamp(30px, 10vw, 42px);
  }

  .page-title,
  .section-head {
    gap: 14px;
  }

  .card-body {
    padding: 18px;
  }

  .challenge-media {
    min-height: 156px;
  }

  .feed-card img {
    height: 210px;
  }

  .button {
    min-height: 44px;
  }

  .table th,
  .table td {
    padding: 12px 14px;
    white-space: nowrap;
  }

  .mobile-bottom-nav {
    width: calc(100% - 24px);
    max-width: 520px;
    margin: 0 auto max(10px, env(safe-area-inset-bottom));
    border: 0;
    border-radius: 999px;
    background: #101216;
    color: #fff;
    padding: 8px;
    box-shadow: 0 18px 40px rgba(17, 19, 23, 0.28);
    backdrop-filter: none;
  }

  .mobile-bottom-nav a {
    position: relative;
    min-height: 46px;
    border-radius: 999px;
    color: rgba(255,255,255,0.72);
    font-size: 11px;
    font-weight: 820;
    display: grid;
    place-items: center;
    gap: 0;
  }

  .mobile-bottom-nav a::before {
    content: none;
  }

  .mobile-bottom-nav a.primary {
    min-height: 60px;
    margin-top: -28px;
    border-radius: 999px;
    background: #9edb3a;
    color: #101216;
    box-shadow: 0 16px 30px rgba(158, 219, 58, 0.36);
    transform: none;
  }

  .mobile-bottom-nav a.primary::before {
    content: none;
  }

  .mobile-bottom-nav a span {
    line-height: 1;
  }
}
