/* Premium layer — X-tight feed + pixel display type, StoneForge palette */

h1, h2, h3,
.page__title,
.feed-header h1,
.auth-card h1,
.rank-card__num,
.wl-title,
.tweet__title {
  font-family: var(--display) !important;
}

.shell {
  background:
    radial-gradient(ellipse 70% 45% at 50% -10%, rgba(212, 85, 26, 0.14), transparent 55%),
    radial-gradient(ellipse 50% 40% at 100% 0%, rgba(36, 21, 14, 0.04), transparent 50%),
    linear-gradient(180deg, #f4e6d8 0%, var(--paper) 40%, #ead7c6 100%);
  min-height: 100vh;
}

/* Home claim sheet */
.claim-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(36, 21, 14, 0.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: claimIn 0.28s ease;
}

.claim-overlay[hidden] {
  display: none !important;
}

@keyframes claimIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

body.claim-open {
  overflow: hidden !important;
}

.claim-card {
  width: min(420px, 100%);
  padding: 28px 24px 22px;
  border-radius: 22px;
  border: 1px solid rgba(36, 21, 14, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 248, 243, 0.96));
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.8) inset,
    0 28px 64px rgba(36, 21, 14, 0.28);
  animation: claimCard 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes claimCard {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.claim-card__kicker {
  margin: 0;
  color: var(--accent-deep) !important;
}

.claim-card h2 {
  margin: 8px 0 0;
  font-size: 28px;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.claim-card__lead {
  margin: 8px 0 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--muted);
}

.claim-card__share {
  margin-top: 16px;
}

.claim-skip {
  display: block;
  width: 100%;
  margin-top: 14px;
  border: 0;
  background: transparent;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  padding: 10px;
}

.claim-skip:hover {
  color: var(--ink);
}

.claim-card input[readonly] {
  opacity: 0.75;
  cursor: default;
}

.home-nav a {
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.topbar {
  background: rgba(244, 230, 216, 0.72) !important;
  border-bottom: 1px solid rgba(36, 21, 14, 0.08) !important;
  backdrop-filter: blur(20px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(160%) !important;
}

.topbar__inner {
  width: min(1080px, calc(100% - 32px)) !important;
  padding: 12px 0 !important;
}

.nav a {
  font-size: 13px !important;
  font-weight: 600 !important;
  letter-spacing: -0.02em !important;
}

.nav a[aria-current="page"] {
  background: rgba(255, 255, 255, 0.7) !important;
  box-shadow: 0 1px 2px rgba(36, 21, 14, 0.06), inset 0 0 0 1px rgba(36, 21, 14, 0.06) !important;
}

/* Cards — Linear-ish */
.card-block,
.feature,
.post,
.stat,
.orion-card,
.position-card,
.reply {
  border: 1px solid rgba(36, 21, 14, 0.1) !important;
  background: rgba(255, 252, 248, 0.78) !important;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.65) inset,
    0 1px 2px rgba(36, 21, 14, 0.04),
    0 12px 32px rgba(36, 21, 14, 0.06) !important;
  border-radius: 18px !important;
}

.card-block {
  padding: 28px !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-block:hover {
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.7) inset,
    0 2px 4px rgba(36, 21, 14, 0.05),
    0 20px 48px rgba(36, 21, 14, 0.09) !important;
}

.field input,
.field textarea,
.field select,
.waitlist__input,
.home__input {
  border: 1px solid rgba(36, 21, 14, 0.12) !important;
  background: rgba(255, 255, 255, 0.72) !important;
  border-radius: 12px !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
}

.field input:focus,
.field textarea:focus,
.field select:focus,
.waitlist__input:focus {
  border-color: rgba(184, 67, 18, 0.55) !important;
  box-shadow: 0 0 0 4px rgba(212, 85, 26, 0.14) !important;
}

.btn,
.waitlist__btn,
.home__btn {
  border-radius: 12px !important;
  font-weight: 700 !important;
  letter-spacing: -0.02em !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12) inset, 0 8px 20px rgba(184, 67, 18, 0.22);
}

/* ─── Auth / Spot ─── */
.auth-shell {
  min-height: calc(100vh - 120px);
  display: grid;
  place-items: center;
  padding: 32px 16px 64px;
}

.auth-card {
  width: min(420px, 100%);
  padding: 32px 28px 28px;
  border-radius: 22px;
  border: 1px solid rgba(36, 21, 14, 0.1);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(255, 252, 248, 0.85)),
    rgba(255, 252, 248, 0.8);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.75) inset,
    0 24px 60px rgba(36, 21, 14, 0.1);
}

.auth-card__mark {
  width: 160px;
  height: auto;
  display: block;
  margin: 0 auto 18px;
  image-rendering: pixelated;
}

.auth-card h1 {
  margin: 0;
  text-align: center;
  font-family: var(--display);
  font-size: 28px;
  letter-spacing: -0.02em;
}

.auth-card__lead {
  margin: 8px 0 0;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.45;
}

.auth-toggle {
  width: 100% !important;
  margin: 22px 0 18px !important;
  justify-content: stretch;
}

.auth-toggle button {
  flex: 1;
}

.spot-grid {
  width: min(480px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  padding: 28px 16px 64px;
}

.spot-grid:has(.position-card.is-visible) {
  width: min(920px, 100%);
  grid-template-columns: 1.05fr 0.95fr;
}

.spot-grid:has(.position-card.is-visible) .auth-card {
  grid-column: auto;
  width: 100%;
  margin: 0;
}

.spot-grid:has(.position-card.is-visible) #position-empty {
  display: none !important;
}

@media (max-width: 820px) {
  .spot-grid,
  .spot-grid:has(.position-card.is-visible) {
    grid-template-columns: 1fr;
    width: min(480px, 100%);
  }
}

.rank-card {
  padding: 28px;
  border-radius: 22px;
  border: 1px solid rgba(36, 21, 14, 0.1);
  background:
    radial-gradient(ellipse 80% 60% at 20% 0%, rgba(212, 85, 26, 0.16), transparent 55%),
    rgba(255, 252, 248, 0.85);
  box-shadow: 0 16px 40px rgba(36, 21, 14, 0.08);
}

.rank-card__num {
  font-family: var(--display);
  font-size: clamp(56px, 8vw, 72px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
  margin: 10px 0 0;
  background: linear-gradient(135deg, var(--ink), var(--accent-deep));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ─── Forum — Twitter-style feed ─── */
.feed-shell {
  width: min(640px, calc(100% - 24px));
  margin: 0 auto;
  padding: 20px 0 80px;
}

.feed-header {
  margin-bottom: 16px;
}

.feed-header h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(32px, 5vw, 42px);
  letter-spacing: -0.02em;
}

.feed-header p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
}

.compose {
  padding: 18px 18px 14px;
  border-radius: 20px;
  border: 1px solid rgba(36, 21, 14, 0.1);
  background: rgba(255, 252, 248, 0.88);
  box-shadow: 0 12px 36px rgba(36, 21, 14, 0.07);
  margin-bottom: 14px;
}

.compose__top {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  flex: none;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.02em;
  color: #fff8f3;
  background: linear-gradient(145deg, #d4551a, #8f320c);
  box-shadow: 0 4px 12px rgba(184, 67, 18, 0.28);
}

.avatar--sm { width: 34px; height: 34px; font-size: 12px; }
.avatar--admin {
  background: linear-gradient(145deg, #24150e, #b84312);
}

.compose__fields {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 8px;
}

.compose__fields input,
.compose__fields textarea,
.compose__fields select {
  width: 100%;
  border: 0;
  background: transparent;
  font-family: var(--sans);
  color: var(--ink);
  outline: none;
  resize: none;
}

.compose__fields input {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  padding: 4px 0;
}

.compose__fields textarea {
  font-size: 15px;
  line-height: 1.45;
  min-height: 72px;
  padding: 0;
}

.compose__fields select {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  width: auto;
  padding: 0;
}

.compose__bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding-top: 12px;
  border-top: 1px solid rgba(36, 21, 14, 0.08);
}

.compose__hint {
  font-size: 12px;
  color: var(--muted);
}

.compose__hint a {
  color: var(--accent-deep);
  font-weight: 600;
  text-decoration: none;
}

.feed-list {
  display: grid;
  gap: 0;
  border: 1px solid rgba(36, 21, 14, 0.1);
  border-radius: 20px;
  overflow: hidden;
  background: rgba(255, 252, 248, 0.88);
  box-shadow: 0 12px 36px rgba(36, 21, 14, 0.06);
}

.feed-list:has(.feed-empty) {
  border-style: dashed;
  background: rgba(255, 255, 255, 0.35);
  box-shadow: none;
}

.tweet {
  padding: 16px 16px 12px;
  border-radius: 0;
  border: 0;
  border-bottom: 1px solid rgba(36, 21, 14, 0.08);
  background: transparent;
  box-shadow: none;
  transition: background 0.15s ease;
}

.tweet:last-child {
  border-bottom: 0;
}

.tweet:hover {
  background: rgba(212, 85, 26, 0.04);
  transform: none;
  box-shadow: none;
  border-color: rgba(36, 21, 14, 0.08);
}

.tweet__row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.tweet__body { flex: 1; min-width: 0; }

.tweet__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 8px;
  margin-bottom: 4px;
}

.tweet__name {
  font-weight: 700;
  font-size: 14.5px;
  letter-spacing: -0.02em;
  color: var(--ink);
}

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

.tweet__chip {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-deep);
  background: rgba(212, 85, 26, 0.12);
  padding: 3px 7px;
  border-radius: 999px;
  font-weight: 500;
}

.tweet__title {
  margin: 2px 0 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.tweet__text {
  margin: 6px 0 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-soft);
  white-space: pre-wrap;
}

.tweet__actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding-top: 4px;
}

.action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.action:hover:not(:disabled) {
  background: rgba(212, 85, 26, 0.1);
  color: var(--accent-deep);
}

.action:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.action.is-up.is-active {
  color: #1a7f37;
  background: rgba(26, 127, 55, 0.1);
}

.action.is-down.is-active {
  color: #c0392b;
  background: rgba(192, 57, 43, 0.1);
}

.action svg {
  width: 18px;
  height: 18px;
  display: block;
}

.tweet__score {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.thread {
  margin-top: 12px;
  margin-left: 8px;
  padding-left: 14px;
  border-left: 2px solid rgba(184, 67, 18, 0.25);
  display: grid;
  gap: 8px;
}

.thread-reply {
  padding: 12px 12px 10px;
  border-radius: 14px;
  border: 1px solid rgba(36, 21, 14, 0.08);
  background: rgba(255, 255, 255, 0.45);
}

.thread-reply--admin {
  border-color: rgba(184, 67, 18, 0.4);
  background: linear-gradient(135deg, rgba(212, 85, 26, 0.14), rgba(255, 248, 243, 0.85));
  box-shadow: 0 0 0 1px rgba(212, 85, 26, 0.08);
}

.thread-reply__top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.admin-pill {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff8f3;
  background: var(--accent-deep);
  padding: 3px 7px;
  border-radius: 999px;
  font-weight: 500;
}

.admin-compose {
  margin-top: 12px;
  padding: 12px;
  border-radius: 14px;
  border: 1px dashed rgba(184, 67, 18, 0.4);
  background: rgba(212, 85, 26, 0.06);
}

.admin-compose textarea {
  width: 100%;
  min-height: 64px;
  border: 1px solid rgba(36, 21, 14, 0.1);
  border-radius: 10px;
  padding: 10px 12px;
  font-family: var(--sans);
  font-size: 14px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
  resize: vertical;
  outline: none;
}

.admin-live-banner {
  border-radius: 14px !important;
  margin-bottom: 14px !important;
}

.feed-empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--muted);
  border-radius: 18px;
  border: 1px dashed rgba(36, 21, 14, 0.15);
  background: rgba(255, 255, 255, 0.35);
}

#backend-mode {
  opacity: 0.75;
}

.session-bar {
  width: min(920px, calc(100% - 32px)) !important;
  margin: 16px auto 0 !important;
  border: 1px solid rgba(36, 21, 14, 0.1) !important;
  border-radius: 14px !important;
  padding: 12px 16px !important;
  background: rgba(255, 252, 248, 0.8) !important;
  box-shadow: 0 8px 24px rgba(36, 21, 14, 0.05) !important;
  backdrop-filter: blur(12px);
}

.admin-live-banner {
  border: 1px solid rgba(184, 67, 18, 0.28) !important;
  background: rgba(212, 85, 26, 0.1) !important;
  color: var(--ink);
  font-size: 14px;
  padding: 12px 16px;
}

.position-card.rank-card {
  display: none;
}

.position-card.rank-card.is-visible {
  display: block;
}

.page-hero .page__title {
  letter-spacing: -0.035em;
}

.orion-card {
  border-radius: 20px !important;
  overflow: hidden;
}

.stat {
  border-radius: 16px !important;
}

.feature {
  border-radius: 16px !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature:hover {
  transform: translateY(-2px);
}

.status-line {
  font-size: 13px;
  margin-top: 8px;
}

.compose .status-line:empty {
  display: none;
}

@media (max-width: 720px) {
  .topbar__inner {
    width: calc(100% - 20px) !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 8px !important;
    padding-top: calc(8px + env(safe-area-inset-top)) !important;
    padding-bottom: 8px !important;
  }

  .nav a {
    font-size: 12px !important;
    padding: 7px 8px !important;
  }

  .feed-shell {
    width: calc(100% - 16px);
    padding-top: 12px;
    padding-bottom: calc(48px + env(safe-area-inset-bottom));
  }

  .feed-header h1,
  .auth-card h1,
  .claim-card h2 {
    font-size: 26px;
  }

  .compose,
  .tweet,
  .auth-card,
  .card-block,
  .rank-card {
    padding: 16px 14px !important;
  }

  .compose__top,
  .tweet__row {
    gap: 8px;
  }

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

  .compose__fields input,
  .compose__fields textarea,
  .field input,
  .field textarea,
  .waitlist__input {
    font-size: 16px !important;
  }

  .compose__bar {
    flex-wrap: wrap;
  }

  .compose__bar .btn,
  .auth-card .btn,
  .claim-card .btn {
    width: 100%;
  }

  .tweet__actions {
    flex-wrap: wrap;
    gap: 2px;
  }

  .tweet__score {
    margin-left: 0;
  }

  .thread {
    margin-left: 0;
    padding-left: 10px;
  }

  .claim-overlay {
    padding: 12px;
    align-items: end;
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
  }

  .claim-card {
    max-height: min(92dvh, 100%);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    padding: 20px 16px 14px;
    border-radius: 18px;
  }

  .session-bar {
    width: calc(100% - 20px) !important;
  }

  .spot-grid,
  .spot-grid:has(.position-card.is-visible) {
    width: 100%;
    padding: 16px 12px calc(40px + env(safe-area-inset-bottom));
  }

  .auth-card__mark {
    width: 130px;
  }

  .rank-card__num {
    font-size: 52px;
  }

  .waitlist__share {
    width: 100%;
  }
}
