:root {
  --bg: #0a0a09;
  --text: #ece6da;
  --muted: #8b857a;
  --line: rgba(236, 230, 218, 0.12);
  --glass: rgba(236, 230, 218, 0.025);

  --red: #e0573a;
  --green: #4fc6a0;
  --yellow: #d9b54a;
  --blue: #5aa9d6;
  --grey: #a8a297;

  --radius: 4px;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
}

html {
  scroll-behavior: smooth;
}

[hidden] {
  display: none !important;
}

body {
  background: var(--bg);
  color: var(--text);
  font: 300 1rem/1.7 var(--sans);
  overflow-x: hidden;
  min-height: 100vh;
}

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

.small-caps {
  font: 400 0.72rem var(--sans);
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

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

.grain {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Glass ---------- */

.glass,
.card {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 22px 6vw;
  background: rgba(10, 10, 9, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.logo {
  font: 500 1.6rem var(--serif);
  letter-spacing: 0.04em;
}

.nav-tag {
  color: var(--muted);
}

.nav-links {
  grid-column: 3;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-link {
  position: relative;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  white-space: nowrap;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: color 0.3s;
}

.nav-link:hover {
  color: var(--muted);
}

main {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 6vw;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  isolation: isolate;
  padding: 96px 6vw 120px;
  text-align: center;
  overflow: hidden;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 400;
}

h1 {
  margin-top: 28px;
  font-size: clamp(3rem, 8vw, 5.6rem);
  line-height: 1;
  letter-spacing: -0.01em;
}

h1 em {
  color: var(--muted);
}

.rule {
  width: 48px;
  margin: 44px auto;
  border: 0;
  border-top: 1px solid var(--text);
  opacity: 0.4;
}

.lede {
  max-width: 520px;
  margin: 0 auto;
  font-size: 1.05rem;
  color: var(--muted);
}

.lede strong {
  color: var(--text);
  font-weight: 400;
}

.hero-video {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.workplace-finder {
  max-width: 560px;
  margin: 52px auto 0;
  text-align: left;
}

.workplace-finder > .small-caps {
  margin-bottom: 14px;
  text-align: center;
}

.workplace-finder .form {
  max-width: none;
  margin: 0;
  background: var(--glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.workplace-finder .results {
  margin-top: 0;
  background: var(--glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.workplace-finder .results:empty {
  display: none;
}

.workplace-finder .result {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-top: 0;
}

.house-figures {
  display: flex;
  justify-content: center;
  gap: 72px;
  margin-top: 48px;
}

.house-figures span {
  display: block;
  font: 400 clamp(2.6rem, 5vw, 3.6rem)/1 var(--serif);
  color: var(--text);
}

.house-figures em {
  display: block;
  margin-top: 10px;
  font: 400 0.72rem/1 var(--sans);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-style: normal;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  margin-top: 52px;
}

.hero-actions a.small-caps {
  padding-bottom: 3px;
  border-bottom: 1px solid var(--line);
}

.button {
  display: inline-block;
  padding: 16px 34px;
  border: 1px solid var(--text);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font: 400 0.72rem var(--sans);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.3s, color 0.3s;
}

.button:hover {
  background: var(--text);
  color: var(--bg);
}

.button:disabled {
  opacity: 0.5;
  cursor: wait;
}

/* ---------- Feed ---------- */

.feed {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 40px 0 140px;
  perspective: 1600px;
}

.feed-label {
  margin-bottom: 18px;
}

.card {
  --accent: var(--grey);
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
  width: 82%;
  padding: 26px 32px 26px 56px;
  color: var(--muted);
  transform: rotateX(10deg) rotateZ(-2deg);
  transition: transform 0.5s ease, border-color 0.4s;
  opacity: 0;
  animation: rise 0.9s ease forwards;
}

.card:nth-child(2) { margin-left: 0;   animation-delay: 0.05s; }
.card:nth-child(3) { margin-left: 4.5%; animation-delay: 0.15s; }
.card:nth-child(4) { margin-left: 9%;  animation-delay: 0.25s; }
.card:nth-child(5) { margin-left: 13.5%; animation-delay: 0.35s; }
.card:nth-child(6) { margin-left: 18%; animation-delay: 0.45s; }

.card:hover {
  transform: none;
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
}

.card::before {
  content: "";
  position: absolute;
  left: 28px;
  top: 24px;
  bottom: 24px;
  width: 2px;
  background: var(--accent);
}

.card strong {
  color: var(--text);
  font-weight: 400;
}

.price {
  flex-shrink: 0;
  font: italic 400 1.25rem var(--serif);
  color: var(--accent);
}

.accent-red    { --accent: var(--red); }
.accent-green  { --accent: var(--green); }
.accent-yellow { --accent: var(--yellow); }
.accent-blue   { --accent: var(--blue); }
.accent-grey   { --accent: var(--grey); }

@keyframes rise {
  from { opacity: 0; translate: 0 24px; }
  to   { opacity: 1; translate: 0 0; }
}

/* ---------- How it works ---------- */

.how {
  padding: 100px 0 140px;
  border-top: 1px solid var(--line);
  text-align: center;
}

h2 {
  margin: 18px 0 64px;
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  line-height: 1.1;
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.step {
  padding: 44px 32px;
}

.step + .step {
  border-left: 1px solid var(--line);
}

.step-number {
  font: italic 400 1.2rem var(--serif);
  color: var(--muted);
}

.step h3 {
  margin: 10px 0 14px;
  font-size: 1.7rem;
}

.step p {
  color: var(--muted);
  font-size: 0.95rem;
}

/* ---------- Membership ---------- */

.house-detail {
  padding-top: 0;
  border-top: 0;
}

.membership {
  padding: 80px 56px;
  margin-bottom: 140px;
  text-align: center;
}

.membership h2 {
  margin-bottom: 16px;
}

.membership .button {
  margin-top: 40px;
}

.form {
  display: flex;
  max-width: 640px;
  margin: 48px auto 0;
  border: 1px solid var(--line);
}

.form input,
.form textarea,
.form select {
  flex: 1 1 200px;
  min-width: 0;
  padding: 18px 20px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  font: 300 0.95rem var(--sans);
  outline: none;
  transition: background 0.3s;
}

.form textarea {
  resize: vertical;
}

/* Browsers paint autofilled fields pale blue; an inset fill is the only way to override it. */
.form input:-webkit-autofill {
  -webkit-text-fill-color: var(--text);
  -webkit-box-shadow: 0 0 0 1000px var(--bg) inset;
  caret-color: var(--text);
}

.form input::placeholder,
.form textarea::placeholder {
  color: #5f5a52;
}

.form input:focus,
.form textarea:focus,
.form select:focus {
  background-color: rgba(236, 230, 218, 0.04);
}

.form select {
  appearance: none;
  cursor: pointer;
  padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23a39e93' stroke-width='1.2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
}

.form select:invalid {
  color: #5f5a52;
}

.form .button {
  border: 0;
}

.status {
  --accent: var(--grey);
  max-width: 640px;
  margin: 20px auto 0;
  padding: 14px 18px;
  text-align: left;
  border-left: 2px solid var(--accent);
  background: rgba(236, 230, 218, 0.03);
  font-size: 0.95rem;
}

.status.success { --accent: var(--green); }
.status.error   { --accent: var(--red); }

/* ---------- Footer ---------- */

.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 32px 6vw;
  border-top: 1px solid var(--line);
}

.footer-links {
  display: flex;
  gap: 28px;
}

/* ---------- House rules ---------- */

.house-rules {
  max-width: 680px;
  padding-top: 96px;
  padding-bottom: 140px;
}

.house-rules .lede {
  margin: 0;
}

.house-rules-date {
  margin: 28px 0 8px;
}

.house-rules section {
  padding: 48px 0 8px;
  border-top: 1px solid var(--line);
  margin-top: 40px;
}

.house-rules h2 {
  margin: 0 0 18px;
  font-size: clamp(2rem, 4vw, 2.6rem);
}

.house-rules h3 {
  margin: 28px 0 8px;
  font-size: 1.45rem;
}

.house-rules p,
.house-rules li {
  color: var(--muted);
  font-size: 0.95rem;
}

.house-rules section p + p,
.house-rules section ul + p {
  margin-top: 16px;
}

.house-rules strong {
  color: var(--text);
  font-weight: 400;
}

.house-rules a {
  color: var(--text);
  border-bottom: 1px solid var(--line);
}

.house-rules ul {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.house-rules li {
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.house-rules li:last-child {
  border-bottom: 1px solid var(--line);
}

.auth-legal {
  margin-top: 28px;
  font-size: 0.85rem;
}

.auth-legal a {
  color: var(--text);
  border-bottom: 1px solid var(--line);
}

/* ---------- Sign in ---------- */

main.narrow {
  max-width: 760px;
  padding-left: 24px;
  padding-right: 24px;
}

.auth {
  margin: 120px 0 140px;
  padding: 56px 48px;
  text-align: center;
}

.tabs {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--line);
}

.tab {
  padding: 0 0 16px;
  margin-bottom: -1px;
  border: 0;
  border-bottom: 1px solid transparent;
  background: none;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.3s, border-color 0.3s;
}

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

.auth h2 {
  margin-bottom: 12px;
  text-wrap: balance;
}

#auth-subtitle {
  text-wrap: pretty;
}

.auth .form .button {
  text-wrap: balance;
}

.form-stacked {
  flex-direction: column;
  margin-top: 36px;
}

.form-stacked input,
.form-stacked textarea,
.form-stacked select {
  flex: none;
  border-right: 0;
  border-bottom: 1px solid var(--line);
}

/* ---------- Profile ---------- */

.profile-head {
  padding: 120px 0 56px;
}

.profile-title {
  margin: 18px 0 16px;
  font-size: clamp(2.6rem, 6vw, 4rem);
  line-height: 1.05;
}

.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.balance,
.community {
  padding: 40px;
}

.balance-amount {
  margin-top: 16px;
  font: 400 clamp(4rem, 9vw, 5.6rem)/1 var(--serif);
  color: var(--text);
}

.balance-amount em {
  font-size: 0.4em;
  color: var(--muted);
}

.rule-left {
  margin: 28px 0;
}

.community h2 {
  margin: 16px 0 10px;
}

.collection {
  margin-top: 100px;
}

.collection-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  padding-bottom: 24px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--line);
}

.collection-head h2 {
  margin: 14px 0 0;
}

.profile {
  padding-bottom: 120px;
}

.close-account {
  text-align: center;
}

.account-actions {
  display: flex;
  justify-content: center;
  gap: 36px;
}

.onboarding-leave {
  margin-top: 72px;
  text-align: center;
}

.close-toggle {
  padding: 0 0 3px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: none;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.3s, border-color 0.3s;
}

.close-toggle:hover {
  color: var(--text);
  border-color: var(--text);
}

.close-panel {
  max-width: 560px;
  margin: 32px auto 0;
  padding: 40px;
  text-align: left;
}

.close-panel h3 {
  margin-bottom: 10px;
  font-size: 1.6rem;
}

.close-panel .form {
  margin-top: 28px;
}

.close-account + .status {
  margin-top: 20px;
}

.button.danger {
  color: var(--red);
  border-color: color-mix(in srgb, var(--red) 45%, transparent);
}

.button.danger:hover {
  background: none;
  color: var(--red);
  border-color: var(--red);
}

.profile .hero-actions {
  margin: 56px 0 100px;
}

/* ---------- Shared page title ---------- */

.page-title {
  margin: 18px 0 16px;
  font-size: clamp(2.6rem, 6vw, 4rem);
}

.page-title em {
  color: var(--muted);
}

.nav-link.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  height: 1px;
  background: var(--text);
}

/* ---------- Onboarding ---------- */

.onboarding {
  max-width: 760px;
  padding-top: 96px;
  padding-bottom: 140px;
}

.onboarding .lede {
  margin: 0;
}

.onboarding .steps {
  margin-top: 56px;
}

.onboarding .hero-actions {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 16px 24px;
}

.button-secondary {
  border-color: var(--line);
  color: var(--muted);
}

.button-secondary:hover {
  background: transparent;
  border-color: var(--text);
  color: var(--text);
}

#step-initiation .form,
#step-initiation .initiation-note {
  max-width: 640px;
}

#step-initiation .form {
  margin-top: 40px;
}

.initiation-note,
.initiation-back {
  margin-top: 28px;
}

.cloakroom {
  grid-column: 1 / -1;
  max-width: 640px;
}

.cloakroom .lede {
  margin: 0 0 18px;
}

.invite {
  max-width: 640px;
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.invite .form {
  margin: 22px 0 0;
  max-width: none;
}

.invite-fields {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.invite-more {
  margin-top: 16px;
}

.invite-status {
  max-width: none;
  margin: 18px 0 0;
}

.invitation {
  max-width: 640px;
  margin: 0 auto;
  padding: 120px 6vw 140px;
  text-align: center;
}

.invitation .lede em,
.onboarding .lede em {
  font-style: italic;
  color: var(--text);
}

.invitation-note {
  margin-top: 22px;
  font-size: 0.95rem;
}

#step-name .page-title {
  line-height: 1.08;
}

#step-name .page-title em {
  color: var(--text);
}

.reroll {
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font: 400 0.72rem var(--sans);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  cursor: pointer;
}

.reroll:hover {
  color: var(--text);
}

.reroll:disabled {
  opacity: 0.5;
  cursor: wait;
}

.finder {
  margin-top: 48px;
}

.finder #keep-current {
  margin-top: 32px;
}

.finder .form {
  max-width: none;
  margin: 0;
}

.finder .form input {
  border-right: 0;
}

.results {
  list-style: none;
  padding: 0;
  margin-top: 8px;
}

.result {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 20px 4px;
  border-bottom: 1px solid var(--line);
}

.result-name {
  display: block;
  font: 400 1.4rem var(--serif);
  margin-bottom: 2px;
}

.button-small {
  flex-shrink: 0;
  padding: 10px 20px;
}

.onboarding .status {
  max-width: none;
  margin-top: 24px;
}

/* ---------- Market ---------- */

.market {
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  column-gap: clamp(36px, 4vw, 56px);
  row-gap: 40px;
  align-items: start;
  max-width: 1320px;
  padding: 96px clamp(24px, 6vw, 72px) 140px;
}

/* The market grid belongs to the secrets page. Credits keeps a full-width header and pack row. */
#credits-page {
  display: block;
  max-width: 1200px;
  padding-top: 0;
  padding-left: clamp(24px, 6vw, 72px);
  padding-right: clamp(24px, 6vw, 72px);
}

#credits-page .market-head {
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
  padding: 96px 0 48px;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--line);
}

#credits-page .market-balance {
  flex: 0 1 320px;
  width: auto;
  min-width: 260px;
}

#credits-page .market-balance-note {
  max-width: 260px;
  margin-left: auto;
}

.market-head {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 40px;
  grid-column: 1;
}

.market .page-title {
  font-size: clamp(2.2rem, 3.4vw, 3.2rem);
  line-height: 1.05;
}

.market-balance {
  padding: 28px 28px 32px;
  text-align: left;
}

.market-balance-amount {
  margin-top: 8px;
  font: 400 clamp(3.6rem, 5vw, 4.8rem)/0.95 var(--serif);
  color: var(--text);
}

.market-balance-amount em {
  font-size: 0.32em;
  color: var(--muted);
}

.market-balance-note {
  margin: 14px 0 0;
  font-size: 0.85rem;
  line-height: 1.5;
}

.market-board {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
}

.market .tabs {
  justify-content: flex-start;
  flex-wrap: wrap;
  margin: 0 0 28px;
}

#panel-sell {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.sold-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  margin-bottom: 18px;
}

.list-secret {
  padding: 28px 28px 32px;
}

.list-secret h2 {
  margin: 0 0 12px;
  font-size: 2.2rem;
}

.list-secret > .muted {
  max-width: 520px;
}

.list-secret .form {
  max-width: none;
  margin: 28px 0 0;
}

.listings {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.listings .card {
  width: 100%;
  margin-left: 0;
  align-items: stretch;
  flex-direction: column;
  transform: none;
}

.listing-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  width: 100%;
}

.listing-body {
  flex: 1;
  min-width: 0;
}

.listing-meta {
  margin-top: 10px;
}

.purchases {
  white-space: nowrap;
}

.listing-action {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

.button.short {
  padding: 0;
  border-color: transparent;
  background: none;
  color: var(--muted);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  opacity: 1;
}

.button.short:hover {
  background: none;
  color: var(--text);
}

.balance-link {
  display: inline-block;
  margin-top: 16px;
  padding-bottom: 3px;
  border-bottom: 1px solid var(--line);
  transition: border-color 0.3s;
}

.balance-link:hover {
  border-color: var(--text);
}

/* ---------- Credit packs ---------- */

.packs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.pack {
  display: flex;
  flex-direction: column;
  padding: 32px 24px;
}

.pack.featured {
  border-color: rgba(236, 230, 218, 0.4);
}

.pack h3 {
  margin: 12px 0 24px;
  font-size: 1.6rem;
  line-height: 1.2;
}

.pack-credits {
  font: 400 3.2rem/1 var(--serif);
  font-variant-numeric: lining-nums;
  color: var(--text);
}

.pack .rule-left {
  margin: 24px 0 20px;
}

.pack-price {
  font: italic 400 1.5rem var(--serif);
  color: var(--text);
}

.pack-saving {
  margin-bottom: 28px;
  font-size: 0.85rem;
}

.pack .button {
  margin-top: auto;
  width: 100%;
}

.packs-note {
  max-width: 560px;
  margin-top: 48px;
}

.button.confirm {
  background: var(--text);
  color: var(--bg);
}

.revealed {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.listing-body > .revealed:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.revealed-text {
  margin-top: 6px;
  font: italic 400 1.35rem/1.4 var(--serif);
  color: var(--text);
}

.speaking-as {
  margin-top: 12px;
}

.speaking-as strong {
  color: var(--text);
  font-weight: 400;
}

.remarks {
  width: 100%;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.remarks-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}

.remarks-as {
  font: italic 400 1.15rem/1 var(--serif);
  color: var(--muted);
}

.remarks-as strong {
  color: var(--text);
  font-weight: 400;
}

.remarks-empty {
  margin-top: 10px;
  font-size: 0.9rem;
}

.remark-list {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.remark-list:empty {
  display: none;
}

.remark-name {
  font: italic 400 1.25rem/1.3 var(--serif);
  color: var(--text);
}

.remark-you {
  margin-left: 12px;
  color: var(--muted);
  vertical-align: 2px;
}

.remark-body {
  margin-top: 2px;
  overflow-wrap: break-word;
}

.remark-time {
  margin-top: 2px;
  font-size: 0.8rem;
  color: var(--muted);
}

.remark-form {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 14px;
  border-bottom: 1px solid var(--line);
}

.remark-form input {
  flex: 1;
  min-width: 0;
  padding: 8px 0 10px;
  border: 0;
  background: transparent;
  color: var(--text);
  font: 300 0.95rem var(--sans);
  outline: none;
}

.remark-form input::placeholder {
  color: #5f5a52;
}

.remark-send {
  flex-shrink: 0;
  padding: 8px 0 10px;
  border: 0;
  background: none;
  color: var(--text);
  cursor: pointer;
  transition: color 0.3s;
}

.remark-send:hover {
  color: var(--muted);
}

.remark-send:disabled {
  opacity: 0.5;
  cursor: wait;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 20;
  width: min(560px, calc(100% - 32px));
  margin: 0;
  transform: translateX(-50%);
  background: rgba(10, 10, 9, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
}

/* ---------- Unlocking ---------- */
/* The overlay fades in, the words follow, and a few pieces fall behind them. */

.ceremony {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  overflow: auto;
  background: var(--bg);
}

.ceremony:focus {
  outline: none;
}

.listing:focus {
  outline: none;
}

body:has(#ceremony:not([hidden])) {
  overflow: hidden;
}

.ceremony-stage {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(520px, 100%);
  padding: 32px 24px 40px;
}

.confetti {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.confetti-piece {
  position: absolute;
  top: -12px;
  width: 6px;
  height: 9px;
  background: var(--yellow);
  animation: confetti-fall 1.1s ease-in forwards;
}

.confetti-piece.dark {
  width: 5px;
  height: 8px;
  background: color-mix(in srgb, var(--text) 22%, var(--bg));
}

.ceremony-kicker,
.ceremony-secret,
.ceremony-price,
.ceremony-close {
  opacity: 0;
}

.ceremony.is-open .ceremony-kicker,
.ceremony.is-open .ceremony-secret,
.ceremony.is-open .ceremony-price,
.ceremony.is-open .ceremony-close {
  animation: ceremony-ink 0.55s ease both;
}

.ceremony.is-open .ceremony-secret { animation-delay: 0.08s; }
.ceremony.is-open .ceremony-price { animation-delay: 0.16s; }
.ceremony.is-open .ceremony-close { animation-delay: 0.24s; }

.ceremony-kicker {
  color: var(--muted);
}

.ceremony-secret {
  max-width: 28rem;
  margin: 28px 0 0;
  text-align: center;
  font: italic 400 clamp(1.45rem, 3vw, 1.85rem)/1.35 var(--serif);
  color: var(--text);
}

.ceremony-price {
  min-height: 1.5em;
  margin-top: 22px;
  font: italic 400 1.35rem var(--serif);
  color: var(--accent);
}

.ceremony-close {
  margin-top: 28px;
}

@keyframes ceremony-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.ceremony.is-open {
  animation: ceremony-in 0.35s ease;
}

@keyframes ceremony-ink {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes confetti-fall {
  to {
    transform: translateY(72vh) translateX(var(--drift, 0px)) rotate(var(--spin, 120deg));
    opacity: 0;
  }
}

/* ---------- Journal ---------- */

.journal,
.desk {
  max-width: 720px;
  padding-top: 96px;
  padding-bottom: 140px;
}

.journal .lede,
.desk .lede {
  margin: 0;
  max-width: 40rem;
}

.journal-crumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 0;
  margin: 0 0 36px;
  padding: 0;
  list-style: none;
}

.journal-crumbs li,
.journal-crumbs a {
  color: var(--muted);
  font: 400 0.72rem var(--sans);
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.journal-crumbs [aria-current="page"] {
  color: var(--text);
  font: 300 0.95rem/1.5 var(--sans);
  letter-spacing: 0;
  text-transform: none;
}

.journal-crumbs .crumb-here {
  color: var(--text);
  font: 400 0.72rem var(--sans);
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.journal-crumbs li + li::before {
  content: "·";
  margin: 0 12px;
  color: var(--muted);
  font: 400 0.72rem var(--sans);
  letter-spacing: 0;
  text-transform: none;
}

.journal-crumbs a {
  border-bottom: 1px solid var(--line);
}

.journal-list {
  margin: 64px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.journal-entry {
  display: block;
  padding: 32px 0;
  border-bottom: 1px solid var(--line);
}

.journal-entry h2 {
  margin: 10px 0 8px;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  line-height: 1.15;
  transition: color 0.3s;
}

.journal-entry p {
  color: var(--muted);
  font-size: 0.95rem;
}

.journal-entry:hover h2 {
  color: var(--muted);
}

.journal-empty {
  margin-top: 48px;
}

.journal-meta {
  margin: 28px 0 44px;
}

.journal .status {
  max-width: none;
  margin: 0 0 32px;
}

.journal-body h2 {
  margin: 52px 0 14px;
  font-size: clamp(2rem, 4vw, 2.6rem);
  line-height: 1.15;
}

.journal-body h3 {
  margin: 32px 0 8px;
  font-size: 1.45rem;
}

.journal-body p,
.journal-body li {
  color: var(--muted);
  font-size: 1rem;
}

.journal-body p + p,
.journal-body ul + p,
.journal-body p + ul,
.journal-body blockquote + p,
.journal-body p + blockquote {
  margin-top: 18px;
}

.journal-body strong {
  color: var(--text);
  font-weight: 400;
}

.journal-body a {
  color: var(--text);
  border-bottom: 1px solid var(--line);
}

.journal-body ul {
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.journal-body li {
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.journal-body li:last-child {
  border-bottom: 1px solid var(--line);
}

.journal-body blockquote {
  margin: 32px 0;
  padding-left: 20px;
  border-left: 2px solid var(--line);
}

.journal-body blockquote p {
  margin: 0;
  color: var(--text);
  font: italic 400 1.45rem/1.45 var(--serif);
}

.journal-body .rule {
  margin: 36px 0;
}

.journal-more {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-top: 72px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.journal-more a {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.journal-more .next {
  text-align: right;
}

.journal-more strong {
  font: 400 1.45rem/1.2 var(--serif);
  font-weight: 400;
  color: var(--text);
}

.journal-pager {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-top: 28px;
}

.journal-pager a {
  border-bottom: 1px solid var(--line);
}

.journal-return {
  margin-top: 36px;
}

.record-contents {
  margin-top: 36px;
}

.record-page {
  margin-top: 8px;
}

.record-call h3 {
  font-family: var(--sans);
  font-size: 1.05rem;
  letter-spacing: 0;
}

.record-method {
  margin-right: 10px;
  color: var(--muted);
  font: 400 0.72rem var(--sans);
  letter-spacing: 0.18em;
}

.record-schema {
  margin: 16px 0 8px;
  padding: 16px 18px;
  overflow: auto;
  border: 1px solid var(--line);
  color: var(--muted);
  font: 400 0.82rem/1.55 ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: pre-wrap;
}

.record-functions {
  margin: 8px 0 28px;
}

.record-functions div {
  display: grid;
  grid-template-columns: minmax(9rem, 14rem) 1fr;
  gap: 6px 22px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.record-functions dt,
.record-functions dd {
  margin: 0;
}

.record-functions dt {
  color: var(--text);
  font: 400 0.88rem/1.45 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.record-functions dd {
  color: var(--muted);
}

/* ---------- Desk ---------- */

.desk h2 {
  margin: 56px 0 22px;
  font-size: clamp(2rem, 4vw, 2.6rem);
  line-height: 1.1;
}

.desk-form {
  margin-top: 8px;
}

.desk-form[hidden] {
  display: none;
}

.desk-field {
  max-width: none;
  margin: 18px 0 0;
}

.desk-form .desk-field input,
.desk-form .desk-field textarea {
  border: 0;
  width: 100%;
}

.desk-form textarea[name="body"] {
  min-height: 320px;
}

.desk-field .small-caps {
  padding: 14px 20px 0;
}

.field-hint,
.field-foot {
  padding: 0 20px 14px;
  color: var(--muted);
  font-size: 0.85rem;
}

.field-foot {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
}

.field-foot .field-hint {
  padding: 0;
}

.field-count {
  flex-shrink: 0;
  font: 400 0.72rem var(--sans);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.field-count.out {
  color: var(--red);
}

.desk-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 28px;
  margin-top: 28px;
}

.desk .status {
  max-width: none;
  margin-left: 0;
}

.desk-index {
  margin-top: 28px;
}

.desk-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}

.desk-row h3 {
  font-size: 1.7rem;
  line-height: 1.15;
}

.desk-row-actions {
  display: flex;
  flex-shrink: 0;
  gap: 22px;
}

.desk-closed {
  margin-top: 28px;
}

/* ---------- Small screens ---------- */

@media (max-width: 1100px) {
  .nav { grid-template-columns: 1fr auto; }
  .nav-links { grid-column: auto; }
  .nav-tag { display: none; }
  .packs { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 960px) {
  .market {
    grid-template-columns: 1fr;
    row-gap: 48px;
    padding-top: 72px;
  }

  .market-head,
  .market-board {
    grid-column: auto;
    grid-row: auto;
  }
}

@media (max-width: 760px) {
  .nav { grid-template-columns: auto minmax(0, 1fr); }
  .nav-tag { display: none; }
  .hero { padding: 64px 6vw 80px; }
  .card { width: 100%; margin-left: 0 !important; transform: none; padding-left: 48px; }
  .card::before { left: 22px; }
  .step + .step { border-left: 0; border-top: 1px solid var(--line); }
  .membership { padding: 56px 24px; }
  .house-figures { gap: 40px; }
  .form { flex-direction: column; }
  .form input,
  .form textarea,
  .form select { border-right: 0; border-bottom: 1px solid var(--line); }
  .market .tabs { gap: 20px; }
  .list-secret { padding: 28px; }
  .footer { flex-direction: column; align-items: flex-start; gap: 12px; }
  .house-rules,
  .journal,
  .desk { padding-top: 56px; }
  .journal-more { grid-template-columns: 1fr; }
  .journal-more .next { text-align: left; }
  .desk-row { flex-direction: column; align-items: flex-start; }
  .auth { margin: 64px 0 96px; padding: 40px 24px; }
  .profile-head { padding-top: 72px; }
  .profile-grid { grid-template-columns: 1fr; }
  .balance, .community { padding: 28px; }
  .nav-links { flex-wrap: wrap; justify-content: flex-end; gap: 14px 18px; }
  .onboarding { padding-top: 56px; }
  .record-functions div { grid-template-columns: 1fr; gap: 4px; }
  .market { padding-top: 56px; }
  #credits-page .market-head {
    flex-direction: column;
    align-items: stretch;
    padding-top: 56px;
  }
  #credits-page .market-balance {
    width: 100%;
    min-width: 0;
    max-width: none;
  }
  #credits-page .market-balance-note { margin-left: 0; }
  .listings .card { flex-direction: column; }
  .listing-top { flex-direction: column; }
  .collection-head,
  .sold-head { flex-direction: column; align-items: flex-start; }
  .packs { grid-template-columns: 1fr; }
  .listing-action { flex-direction: row; align-items: center; width: 100%; justify-content: space-between; }
  .remarks-head { flex-direction: column; align-items: flex-start; gap: 4px; }
  .ceremony-stage { padding: 24px 16px 32px; }
  .ceremony-close { padding: 14px 18px; }
}

@media (max-height: 700px) {
  .ceremony-stage { padding: 16px 16px 20px; }
  .ceremony-secret { font-size: 1.3rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before { animation: none !important; transition: none !important; }
  .card { opacity: 1; }

  .confetti { display: none; }
  .ceremony-kicker,
  .ceremony-secret,
  .ceremony-price,
  .ceremony-close { opacity: 1; }
}
