/* ==========================================================================
   Midnitemall Design System
   Shell: Quiet Luxury  |  Studio: Dark Femme
   ========================================================================== */

/* --- Design Tokens -------------------------------------------------------- */

:root {
  /* Quiet Luxury (Feed, You, Contests) */
  --shell-bg: #F7F5F2;
  --shell-bg-elevated: #FFFFFF;
  --shell-bg-muted: #EDE9E3;
  --shell-accent: #B8A88A;
  --shell-accent-hover: #A69578;
  --shell-accent-muted: rgba(184, 168, 138, 0.18);
  --shell-text: #1A1814;
  --shell-text-secondary: #5C574F;
  --shell-text-muted: #8A847A;
  --shell-border: rgba(26, 24, 20, 0.08);
  --shell-border-strong: rgba(26, 24, 20, 0.14);
  --shell-shadow: 0 2px 12px rgba(26, 24, 20, 0.06);
  --shell-shadow-lg: 0 8px 32px rgba(26, 24, 20, 0.1);

  /* Dark Femme (Studio) */
  --studio-bg: #0F0E12;
  --studio-bg-elevated: #1A1820;
  --studio-bg-muted: #25222C;
  --studio-accent: #7B5EA7;
  --studio-accent-hover: #9170C0;
  --studio-accent-muted: rgba(123, 94, 167, 0.22);
  --studio-accent-glow: rgba(123, 94, 167, 0.45);
  --studio-text: #F5F3F0;
  --studio-text-secondary: #B8B4AE;
  --studio-text-muted: #7A7670;
  --studio-border: rgba(245, 243, 240, 0.08);
  --studio-border-strong: rgba(245, 243, 240, 0.16);
  --studio-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);

  /* Shared */
  --font-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  --font-serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;
  --nav-height: 64px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --max-width: 640px;
  --max-width-wide: 960px;

  /* Active skin defaults (shell) */
  --bg: var(--shell-bg);
  --bg-elevated: var(--shell-bg-elevated);
  --bg-muted: var(--shell-bg-muted);
  --accent: var(--shell-accent);
  --accent-hover: var(--shell-accent-hover);
  --accent-muted: var(--shell-accent-muted);
  --text: var(--shell-text);
  --text-secondary: var(--shell-text-secondary);
  --text-muted: var(--shell-text-muted);
  --border: var(--shell-border);
  --border-strong: var(--shell-border-strong);
  --shadow: var(--shell-shadow);
  --shadow-lg: var(--shell-shadow-lg);
}

/* --- Skin Switch ---------------------------------------------------------- */

.skin-studio {
  --bg: var(--studio-bg);
  --bg-elevated: var(--studio-bg-elevated);
  --bg-muted: var(--studio-bg-muted);
  --accent: var(--studio-accent);
  --accent-hover: var(--studio-accent-hover);
  --accent-muted: var(--studio-accent-muted);
  --text: var(--studio-text);
  --text-secondary: var(--studio-text-secondary);
  --text-muted: var(--studio-text-muted);
  --border: var(--studio-border);
  --border-strong: var(--studio-border-strong);
  --shadow: var(--studio-shadow);
  --shadow-lg: var(--studio-shadow);
}

/* --- Reset & Base --------------------------------------------------------- */

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  min-height: 100dvh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition:
    background-color 0.45s ease,
    color 0.35s ease;
}

body.skin-studio {
  transition:
    background-color 0.5s cubic-bezier(0.4, 0, 0.2, 1),
    color 0.4s ease;
}

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

/* Studio CTAs — force readable labels on purple buttons */
.skin-studio .btn--primary,
.skin-studio .btn--vault,
.skin-studio a.btn--primary.btn--vault {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff;
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.25;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.skin-studio .studio-grok-generate,
.skin-studio .btn--vault {
  min-height: 3rem;
}

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

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent-hover);
}

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

button {
  cursor: pointer;
  border: none;
  background: none;
}

/* --- Layout --------------------------------------------------------------- */

.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition:
    background-color 0.45s ease,
    border-color 0.35s ease;
}

.skin-studio .app-header {
  background: rgba(15, 14, 18, 0.92);
}

.app-header__inner {
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.app-logo__mark {
  flex-shrink: 0;
}

.app-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text);
}

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

.app-header__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.app-main {
  flex: 1;
  max-width: var(--max-width-wide);
  width: 100%;
  margin: 0 auto;
  padding: 20px 16px calc(var(--nav-height) + var(--safe-bottom) + 24px);
}

.app-main--narrow {
  max-width: var(--max-width);
}

/* --- Bottom Navigation ---------------------------------------------------- */

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: calc(var(--nav-height) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.04);
  transition:
    background-color 0.45s ease,
    border-color 0.35s ease,
    box-shadow 0.35s ease;
}

.skin-studio .bottom-nav {
  background: var(--studio-bg-elevated);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.3);
}

.bottom-nav__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  height: var(--nav-height);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 24px;
}

.bottom-nav__link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 16px;
  color: var(--text-muted);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color var(--transition-fast);
}

.bottom-nav__link:hover,
.bottom-nav__link.is-active {
  color: var(--accent);
}

.bottom-nav__link--center {
  position: relative;
  margin-top: -20px;
}

.bottom-nav__studio-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  background: var(--studio-bg-elevated);
  color: var(--studio-accent);
  font-size: 1.25rem;
  box-shadow:
    0 0 0 2px rgba(123, 94, 167, 0.28),
    0 0 18px rgba(123, 94, 167, 0.32),
    0 4px 20px rgba(15, 14, 18, 0.18);
  transition:
    transform var(--transition-fast),
    background var(--transition-fast),
    box-shadow var(--transition-base),
    color var(--transition-fast);
}

.skin-studio .bottom-nav__studio-btn {
  background: var(--studio-accent);
  color: var(--studio-text);
  box-shadow:
    0 0 0 3px rgba(123, 94, 167, 0.45),
    0 0 24px rgba(123, 94, 167, 0.5),
    0 4px 28px rgba(0, 0, 0, 0.35);
}

.bottom-nav__studio-btn:hover {
  transform: scale(1.06);
  box-shadow:
    0 0 0 3px rgba(123, 94, 167, 0.4),
    0 0 22px rgba(123, 94, 167, 0.42),
    0 6px 24px rgba(15, 14, 18, 0.22);
}

.skin-studio .bottom-nav__studio-btn:hover {
  background: var(--studio-accent-hover);
}

.bottom-nav__link.is-active .bottom-nav__studio-btn {
  box-shadow:
    0 0 0 3px rgba(123, 94, 167, 0.55),
    0 0 28px rgba(123, 94, 167, 0.55),
    0 0 48px rgba(123, 94, 167, 0.22),
    var(--shadow-lg);
}

.bottom-nav__icon {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* --- Typography ----------------------------------------------------------- */

.page-title {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin-bottom: 4px;
}

.page-subtitle {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.section-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}

/* --- Buttons -------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: var(--radius-md);
  transition: background var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}

.btn:active {
  transform: scale(0.98);
}

.btn--primary {
  background: var(--accent);
  color: var(--shell-bg);
}

.skin-studio .btn--primary {
  color: #ffffff;
}

.btn--primary:hover {
  background: var(--accent-hover);
}

.btn--secondary {
  background: var(--accent-muted);
  color: var(--accent);
}

.btn--ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-strong);
}

.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn--full {
  width: 100%;
}

.btn--sm {
  padding: 8px 16px;
  font-size: 0.8125rem;
}

/* --- Forms ---------------------------------------------------------------- */

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.form-input,
.form-select {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  font-size: 1rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.skin-studio .form-input,
.skin-studio .form-select {
  background: var(--studio-bg-muted);
}

.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-muted);
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-error {
  background: rgba(220, 53, 69, 0.1);
  border: 1px solid rgba(220, 53, 69, 0.25);
  color: #c0392b;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  margin-bottom: 16px;
}

.skin-studio .form-error {
  color: #ff6b6b;
}

/* --- Contest Pill --------------------------------------------------------- */

.contest-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 17px 11px 13px;
  background: var(--bg-elevated);
  border: none;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow);
  margin-bottom: 24px;
  transition: transform var(--transition-fast), box-shadow var(--transition-base);
  width: 100%;
  max-width: 100%;
  isolation: isolate;
}

.contest-pill::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: linear-gradient(
    135deg,
    var(--shell-accent) 0%,
    var(--studio-accent) 45%,
    rgba(184, 168, 138, 0.6) 100%
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.85;
  transition: opacity var(--transition-fast);
}

.contest-pill:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.contest-pill:hover::before {
  opacity: 1;
}

.contest-pill__thumb {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--accent-muted);
}

.contest-pill__badge {
  flex-shrink: 0;
  padding: 4px 10px;
  background: var(--accent);
  color: var(--shell-bg);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: var(--radius-full);
}

.contest-pill__content {
  flex: 1;
  min-width: 0;
}

.contest-pill__title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.contest-pill__meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.contest-pill__arrow {
  flex-shrink: 0;
  color: var(--accent);
}

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

.feed-editorial {
  margin-bottom: 8px;
}

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

.feed-header__eyebrow {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--shell-accent);
  margin-bottom: 8px;
}

.feed-header__title {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 5vw, 2.25rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--shell-text);
  margin-bottom: 8px;
}

.feed-header__title em {
  font-style: italic;
  color: var(--shell-accent);
}

.feed-header__subtitle {
  font-size: 0.9375rem;
  color: var(--shell-text-secondary);
  max-width: 28rem;
  line-height: 1.55;
}

.lane-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  padding-bottom: 4px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.lane-chips::-webkit-scrollbar {
  display: none;
}

.lane-chip {
  flex-shrink: 0;
  padding: 8px 16px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--shell-text-secondary);
  background: var(--shell-bg-elevated);
  border: 1px solid var(--shell-border);
  border-radius: var(--radius-full);
  transition:
    background var(--transition-fast),
    border-color var(--transition-fast),
    color var(--transition-fast),
    box-shadow var(--transition-fast),
    transform var(--transition-fast);
}

.lane-chip:hover {
  border-color: var(--shell-border-strong);
  color: var(--shell-text);
}

.lane-chip.is-active {
  background: var(--shell-text);
  border-color: var(--shell-text);
  color: var(--shell-bg);
  box-shadow: var(--shell-shadow);
}

.feed-empty {
  text-align: center;
  margin-top: 32px;
  font-size: 0.9375rem;
  color: var(--shell-text-secondary);
}

.feed-empty a {
  font-weight: 600;
}

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

.night-market {
  margin-bottom: 8px;
}

.night-market-aisles {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.night-market-aisle__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding: 0 2px;
}

.night-market-aisle__title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.2;
  color: var(--shell-text);
}

.night-market-aisle__subtitle {
  margin-top: 4px;
  font-size: 0.8125rem;
  color: var(--shell-text-muted);
}

.night-market-aisle__count {
  flex-shrink: 0;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--shell-text-secondary);
  background: var(--shell-bg-elevated);
  border: 1px solid var(--shell-border);
  border-radius: var(--radius-full);
}

.night-market-aisle__track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 2px 12px;
  margin: 0 -2px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.night-market-aisle__track::-webkit-scrollbar {
  display: none;
}

.night-market-aisle__track:focus-visible {
  outline: 2px solid rgba(184, 168, 138, 0.55);
  outline-offset: 2px;
  border-radius: var(--radius-md);
}

.night-market-aisle__item {
  flex: 0 0 min(42vw, 168px);
  scroll-snap-align: start;
}

@media (min-width: 480px) {
  .night-market-aisle__item {
    flex-basis: 180px;
  }
}

.night-market-aisle__empty {
  font-size: 0.875rem;
  color: var(--shell-text-muted);
  padding: 16px 2px 4px;
}

.night-market-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--shell-bg-elevated);
  border: 1px solid var(--shell-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  box-shadow:
    0 1px 3px rgba(26, 24, 20, 0.04),
    0 4px 16px rgba(26, 24, 20, 0.05);
  transition:
    transform 0.24s cubic-bezier(0.34, 1.2, 0.64, 1),
    box-shadow 0.24s ease,
    border-color var(--transition-fast);
}

.night-market-card:hover {
  transform: translateY(-3px);
  border-color: rgba(184, 168, 138, 0.35);
  box-shadow:
    0 4px 12px rgba(26, 24, 20, 0.06),
    0 10px 28px rgba(26, 24, 20, 0.09);
}

.night-market-card:focus-visible {
  outline: 2px solid rgba(184, 168, 138, 0.65);
  outline-offset: 2px;
}

.night-market-card.is-highlighted {
  border-color: var(--shell-accent);
  box-shadow:
    0 0 0 1px rgba(184, 168, 138, 0.35),
    0 8px 24px rgba(184, 168, 138, 0.18);
}

.night-market-card__media {
  position: relative;
  aspect-ratio: 1;
  background: var(--shell-bg-muted);
}

.night-market-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.night-market-card__badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 4px 8px;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: var(--radius-full);
}

.night-market-card__badge--contest {
  background: var(--shell-text);
  color: var(--shell-bg);
}

.night-market-card__badge--studio {
  background: rgba(255, 255, 255, 0.92);
  color: var(--shell-text-secondary);
  border: 1px solid var(--shell-border);
}

.night-market-card__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 10px 12px;
}

.night-market-card__title {
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--shell-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.night-market-card__author {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.6875rem;
  color: var(--shell-text-muted);
}

.night-market-card__author span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.night-market-card__trust {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--shell-accent);
}

.night-market-card__trust-sep {
  opacity: 0.7;
}

.night-market-card__stat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.6875rem;
  color: var(--shell-text-muted);
}

/* --- Half-sheet (Night Market detail) ------------------------------------- */

body.sheet-open {
  overflow: hidden;
}

.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 210;
  background: rgba(26, 24, 20, 0.45);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: sheetFadeIn 0.22s ease;
}

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

.sheet {
  width: 100%;
  max-width: var(--max-width);
  max-height: 58vh;
  max-height: 58dvh;
  background: var(--shell-bg-elevated);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.28s ease;
  box-shadow: 0 -8px 32px rgba(26, 24, 20, 0.12);
}

.sheet__chrome {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px 6px;
  flex-shrink: 0;
}

.sheet__handle {
  width: 36px;
  height: 4px;
  border-radius: var(--radius-full);
  background: var(--shell-border-strong);
}

.sheet__close {
  position: absolute;
  top: 8px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--shell-bg-muted);
  color: var(--shell-text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  line-height: 1;
}

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

.sheet__hero {
  flex-shrink: 0;
  height: 168px;
  background: var(--shell-bg-muted);
}

.sheet__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sheet__body {
  padding: 16px 20px calc(20px + var(--safe-bottom));
  overflow-y: auto;
}

.sheet__title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  line-height: 1.2;
  margin-bottom: 4px;
}

.sheet__author {
  font-size: 0.8125rem;
  color: var(--shell-text-secondary);
  margin-bottom: 10px;
}

.sheet__author-link {
  color: inherit;
  font-weight: 600;
}

.sheet__author-link:hover {
  color: var(--shell-accent);
}

.sheet__trust {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--shell-accent);
}

.sheet__params {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.sheet__param {
  padding: 5px 10px;
  background: var(--shell-accent-muted);
  color: var(--shell-accent);
  font-size: 0.6875rem;
  font-weight: 500;
  border-radius: var(--radius-full);
}

.sheet__prompt {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-left: 3px solid var(--shell-accent);
  background: var(--shell-accent-muted);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.sheet__prompt-label {
  margin: 0 0 4px;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--shell-text-muted);
}

.sheet__prompt-text {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--shell-text-secondary);
  font-style: italic;
}

.sheet__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sheet__cta-secondary {
  font-size: 0.875rem;
}

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

.feed-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (min-width: 480px) {
  .feed-grid {
    gap: 16px;
  }
}

.feed-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow:
    0 1px 3px rgba(26, 24, 20, 0.04),
    0 4px 16px rgba(26, 24, 20, 0.06);
  transition:
    transform 0.28s cubic-bezier(0.34, 1.2, 0.64, 1),
    box-shadow 0.28s ease,
    border-color var(--transition-fast);
}

.feed-card:hover {
  transform: translateY(-4px);
  border-color: rgba(184, 168, 138, 0.35);
  box-shadow:
    0 4px 12px rgba(26, 24, 20, 0.06),
    0 12px 32px rgba(26, 24, 20, 0.1);
}

.feed-card__open {
  cursor: pointer;
  display: block;
}

.feed-card__open:focus-visible {
  outline: 2px solid rgba(184, 168, 138, 0.65);
  outline-offset: -2px;
}

.feed-card[role="button"]:focus-visible {
  outline: 2px solid rgba(184, 168, 138, 0.65);
  outline-offset: 2px;
}

.feed-card--unavailable {
  opacity: 0.72;
  cursor: default;
}

.feed-card--unavailable .feed-card__placeholder {
  font-size: 1.25rem;
}

.feed-card__unavailable-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.feed-card__image {
  aspect-ratio: 1;
  background: var(--bg-muted);
  position: relative;
  overflow: hidden;
}

.feed-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.feed-card__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, var(--bg-muted) 0%, var(--bg) 100%);
  color: var(--accent);
  font-size: 2rem;
}

.feed-card__lane-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 5px 10px;
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: var(--radius-full);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.feed-card__lane-tag--contest {
  background: rgba(184, 168, 138, 0.92);
  color: var(--shell-bg);
}

.feed-card__lane-tag--studio {
  background: rgba(15, 14, 18, 0.72);
  color: var(--studio-accent);
  border: 1px solid rgba(123, 94, 167, 0.35);
}

.feed-card__body {
  padding: 14px 14px 12px;
}

.feed-card__title {
  font-family: var(--font-serif);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 4px;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.feed-card__caption {
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--text-secondary);
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.feed-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.6875rem;
  color: var(--text-muted);
  padding: 0 14px 12px;
}

.feed-card__author {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.feed-card__author-link {
  color: inherit;
  text-decoration: none;
  position: relative;
  z-index: 2;
}

.modal__author-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.modal__author-link:hover {
  text-decoration: underline;
}

.feed-card__author-link:hover .feed-card__author-name {
  text-decoration: underline;
}

.feed-card__author-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-avatar {
  border-radius: var(--radius-full);
  object-fit: cover;
  flex-shrink: 0;
  display: block;
  border: 1.5px solid var(--border);
  background: var(--bg-elevated);
}

.user-avatar--sm {
  width: 28px;
  height: 28px;
}

.user-avatar--md {
  width: 32px;
  height: 32px;
}

.user-avatar--xs {
  width: 24px;
  height: 24px;
}

.user-avatar--lg {
  width: 72px;
  height: 72px;
  border-width: 2px;
  border-color: var(--accent-muted);
}

.user-avatar-fallback {
  border-radius: var(--radius-full);
  background: var(--accent-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: var(--accent);
  flex-shrink: 0;
  border: 1.5px solid var(--border);
}

.user-avatar-fallback--sm {
  width: 28px;
  height: 28px;
  font-size: 0.625rem;
}

.user-avatar-fallback--md {
  width: 32px;
  height: 32px;
  font-size: 0.6875rem;
}

.user-avatar-fallback--xs {
  width: 24px;
  height: 24px;
  font-size: 0.5625rem;
}

.user-avatar-fallback--lg {
  width: 72px;
  height: 72px;
  font-size: 1.5rem;
  font-family: var(--font-serif);
  border-width: 2px;
}

.user-avatar-monogram {
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-family: var(--font-serif);
  flex-shrink: 0;
  border: 1.5px solid var(--border);
}

.user-avatar-monogram--sm {
  width: 28px;
  height: 28px;
  font-size: 0.625rem;
}

.user-avatar-monogram--md {
  width: 32px;
  height: 32px;
  font-size: 0.6875rem;
}

.user-avatar-monogram--xs {
  width: 24px;
  height: 24px;
  font-size: 0.5625rem;
}

.user-avatar-monogram--lg {
  width: 72px;
  height: 72px;
  font-size: 1.75rem;
  border-width: 2px;
  box-shadow: 0 2px 8px rgba(26, 24, 20, 0.08);
}

.avatar-upload-panel {
  margin: 0 0 24px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
}

.avatar-upload-panel__note {
  margin-bottom: 8px;
}

.avatar-upload-panel__rules {
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--text-muted);
  margin: 0 0 12px;
}

.avatar-upload-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.avatar-upload-panel__status {
  margin: 10px 0 0;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.header-user-chip {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
}

.profile-avatar-wrap {
  flex-shrink: 0;
  line-height: 0;
}

.feed-card__actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.feed-card__like {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  border-radius: var(--radius-full);
  color: var(--text-muted);
  background: transparent;
  transition:
    color var(--transition-fast),
    background var(--transition-fast),
    transform var(--transition-fast);
}

.feed-card__like svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  flex-shrink: 0;
}

.feed-card__like:hover {
  color: #c45c6a;
  background: rgba(196, 92, 106, 0.1);
  transform: scale(1.04);
}

.feed-card__like.is-liked,
.feed-card__like.is-liked:hover {
  color: #c45c6a;
}

.feed-card__like.is-liked svg {
  fill: currentColor;
  stroke: currentColor;
}

.feed-card__like-count {
  font-size: 0.6875rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  min-width: 1ch;
}

.feed-card__like--guest {
  cursor: pointer;
  text-decoration: none;
}

.feed-card__save {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-full);
  color: var(--text-muted);
  background: transparent;
  flex-shrink: 0;
  transition:
    color var(--transition-fast),
    background var(--transition-fast),
    transform var(--transition-fast);
}

.feed-card__save svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linejoin: round;
}

.feed-card__save:hover {
  color: var(--accent);
  background: var(--accent-muted);
  transform: scale(1.08);
}

.feed-card__save.is-saved {
  color: var(--accent);
}

.feed-card__save.is-saved svg {
  fill: currentColor;
  stroke: currentColor;
}

.feed-card__save--guest {
  cursor: pointer;
  text-decoration: none;
}

.feed-card__vote-count {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.6875rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text-secondary);
  background: var(--accent-muted);
  pointer-events: none;
}

.feed-card__vote-count svg {
  opacity: 0.85;
}

.modal__social-row {
  display: flex;
  gap: 8px;
  flex: 1 1 100%;
}

.modal__like-btn,
.modal__save-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.modal__like-btn.is-liked {
  color: #c45c6a;
}

.modal__like-btn.is-liked svg {
  fill: currentColor;
}

.modal__save-btn.is-saved {
  color: var(--accent);
}

.modal__save-btn.is-saved svg {
  fill: currentColor;
}

.modal__like-count {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.modal__footnote {
  margin: 0;
  font-size: 0.6875rem;
  color: var(--shell-text-muted, #8a8494);
  text-align: center;
  flex: 1 1 100%;
}

.feed-load-more {
  margin-top: 24px;
  text-align: center;
}

/* --- Instagram-style feed posts ------------------------------------------- */

.feed-post-list {
  display: flex;
  flex-direction: column;
  gap: 28px;
  max-width: 470px;
  margin: 0 auto;
  width: 100%;
}

.feed-post {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow:
    0 1px 3px rgba(26, 24, 20, 0.04),
    0 4px 16px rgba(26, 24, 20, 0.06);
}

.feed-post.is-highlighted {
  border-color: rgba(184, 168, 138, 0.65);
  box-shadow:
    0 0 0 2px rgba(184, 168, 138, 0.35),
    0 8px 24px rgba(26, 24, 20, 0.12);
}

.feed-post__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  min-height: 52px;
}

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

.feed-post__author:hover .feed-post__author-name {
  text-decoration: underline;
}

.feed-post__author-name {
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.feed-post__media {
  position: relative;
  display: block;
  aspect-ratio: 1;
  background: var(--bg-muted);
  overflow: hidden;
  cursor: pointer;
  color: inherit;
  text-decoration: none;
}

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

.feed-post__media:focus-visible {
  outline: 2px solid rgba(184, 168, 138, 0.65);
  outline-offset: -2px;
}

.feed-post__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px 4px;
}

.feed-post__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  transition:
    color var(--transition-fast),
    background var(--transition-fast),
    transform var(--transition-fast);
}

.feed-post__action svg {
  flex-shrink: 0;
}

.feed-post__action--like svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
}

.feed-post__action--like:hover {
  color: #c45c6a;
  background: rgba(196, 92, 106, 0.1);
  transform: scale(1.04);
}

.feed-post__action--like.is-liked,
.feed-post__action--like.is-liked:hover {
  color: #c45c6a;
}

.feed-post__action--like.is-liked svg {
  fill: currentColor;
  stroke: currentColor;
}

.feed-post__action--comment svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.feed-post__action--comment:hover {
  color: var(--accent);
  background: var(--accent-muted);
}

.feed-post__action--save svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linejoin: round;
}

.feed-post__action--save:hover {
  color: var(--accent);
  background: var(--accent-muted);
  transform: scale(1.04);
}

.feed-post__action--save.is-saved {
  color: var(--accent);
}

.feed-post__action--save.is-saved svg {
  fill: currentColor;
  stroke: currentColor;
}

.feed-post__vote {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--accent-muted);
}

.feed-post__likes {
  margin: 0;
  padding: 0 14px 4px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
}

.feed-post__caption {
  margin: 0;
  padding: 4px 14px 6px;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--text);
}

.feed-post__caption strong {
  font-weight: 600;
  margin-right: 6px;
}

.feed-post__comments-preview {
  padding: 0 14px 6px;
  cursor: pointer;
}

.feed-post__comments-preview:focus-visible {
  outline: 2px solid rgba(184, 168, 138, 0.65);
  outline-offset: 2px;
}

.feed-post__comments-preview p {
  margin: 0 0 4px;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--text-secondary);
}

.feed-post__comments-preview strong {
  font-weight: 600;
  color: var(--text);
  margin-right: 6px;
}

.feed-post__view-comments {
  display: block;
  margin-top: 2px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.feed-post__comment-form {
  display: flex;
  align-items: center;
  padding: 8px 14px 12px;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}

.feed-post__comment-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 0.8125rem;
  color: var(--text);
  outline: none;
}

.feed-post__comment-input::placeholder {
  color: var(--text-muted);
}

.feed-post__time {
  display: block;
  padding: 0 14px 12px;
  font-size: 0.625rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.htmx-indicator {
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
  opacity: 1;
}

.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-strong);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

/* --- Modal ---------------------------------------------------------------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(26, 24, 20, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}

@media (min-width: 480px) {
  .modal-backdrop {
    align-items: center;
    padding: 20px;
  }
}

.modal {
  background: var(--shell-bg-elevated);
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  max-height: 90dvh;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.3s ease;
}

@media (min-width: 480px) {
  .modal {
    border-radius: var(--radius-xl);
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal__header {
  position: relative;
  aspect-ratio: 1;
  background: var(--shell-bg-muted);
}

.modal__header img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.9);
  color: var(--shell-text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: var(--shell-shadow);
  transition: transform var(--transition-fast);
}

.modal__close:hover {
  transform: scale(1.05);
}

.modal__body {
  padding: 20px;
  overflow-y: auto;
}

.modal__title {
  font-family: var(--font-serif);
  font-size: 1.375rem;
  margin-bottom: 4px;
}

.modal__author {
  font-size: 0.875rem;
  color: var(--shell-text-secondary);
  margin-bottom: 16px;
}

.modal__stats {
  display: flex;
  gap: 20px;
  padding: 16px 0;
  border-top: 1px solid var(--shell-border);
  border-bottom: 1px solid var(--shell-border);
  margin-bottom: 16px;
}

.modal__stat {
  text-align: center;
}

.modal__stat-value {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--shell-text);
}

.modal__stat-label {
  font-size: 0.6875rem;
  color: var(--shell-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.modal__params {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.modal__param {
  padding: 6px 12px;
  background: var(--shell-accent-muted);
  color: var(--shell-accent);
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: var(--radius-full);
}

.modal__actions {
  display: flex;
  gap: 12px;
}

/* --- Studio --------------------------------------------------------------- */

.studio-layout {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.studio-canvas-wrap {
  position: relative;
  aspect-ratio: 1;
  background: var(--studio-bg-muted);
  border: 1px solid var(--studio-border-strong);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(123, 94, 167, 0.12),
    0 0 40px rgba(123, 94, 167, 0.18),
    0 8px 32px rgba(0, 0, 0, 0.35);
}

.studio-canvas-glow {
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
  box-shadow:
    inset 0 0 60px rgba(123, 94, 167, 0.12),
    inset 0 -20px 40px rgba(123, 94, 167, 0.08);
  z-index: 1;
}

#studio-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.studio-canvas-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--studio-text-muted);
  pointer-events: none;
}

.studio-canvas-placeholder__icon img,
.studio-canvas-placeholder__icon {
  width: 48px;
  height: 48px;
  border: 2px dashed var(--studio-border-strong);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--studio-accent);
}

.studio-canvas-placeholder__text {
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
}

.studio-controls {
  background: var(--studio-bg-elevated);
  border: 1px solid var(--studio-border);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.studio-controls__title {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--studio-text-muted);
  margin-bottom: 20px;
}

.control-group {
  margin-bottom: 24px;
}

.control-group:last-child {
  margin-bottom: 0;
}

.control-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--studio-text-secondary);
  margin-bottom: 10px;
}

.control-value {
  color: var(--studio-accent);
  font-weight: 600;
}

.control-range {
  width: 100%;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--studio-bg-muted);
  border-radius: var(--radius-full);
  outline: none;
}

.control-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--studio-accent);
  cursor: pointer;
  box-shadow: 0 2px 8px var(--studio-accent-glow);
}

.control-range::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border: none;
  border-radius: 50%;
  background: var(--studio-accent);
  cursor: pointer;
  box-shadow: 0 2px 8px var(--studio-accent-glow);
}

.metal-picker {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.metal-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 8px;
  border: 1px solid var(--studio-border);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.metal-option:hover {
  border-color: var(--studio-border-strong);
}

.metal-option.is-selected {
  border-color: var(--studio-accent);
  background: var(--studio-accent-muted);
}

.metal-option__swatch {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  border: 2px solid rgba(255, 255, 255, 0.1);
}

.metal-option__swatch--gold { background: linear-gradient(135deg, #D4AF37, #F5E6A3); }
.metal-option__swatch--silver { background: linear-gradient(135deg, #C0C0C0, #F0F0F0); }
.metal-option__swatch--rose,
.metal-option__swatch--rose_gold { background: linear-gradient(135deg, #B76E79, #E8B4B8); }
.metal-option__swatch--black,
.metal-option__swatch--black_rhodium { background: linear-gradient(135deg, #2A2A2A, #4A4A4A); }
.metal-option__swatch--platinum { background: linear-gradient(135deg, #C8C6C2, #F2F1ED); }

.metal-option__label {
  font-size: 0.6875rem;
  color: var(--studio-text-muted);
  text-transform: capitalize;
}

.metal-option.is-selected .metal-option__label {
  color: var(--studio-text);
}

.control-range-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 0.6875rem;
  color: var(--studio-text-muted);
}

.head-preset-picker {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.head-preset {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 6px;
  border: 1px solid var(--studio-border);
  border-radius: var(--radius-md);
  transition:
    border-color var(--transition-fast),
    background var(--transition-fast),
    box-shadow var(--transition-fast);
}

.head-preset:hover {
  border-color: var(--studio-border-strong);
}

.head-preset.is-selected {
  border-color: var(--studio-accent);
  background: var(--studio-accent-muted);
  box-shadow: 0 0 16px rgba(123, 94, 167, 0.2);
}

.head-preset__icon {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: var(--studio-bg-muted);
  border: 1px solid var(--studio-border-strong);
  position: relative;
}

.head-preset__icon::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--studio-accent);
}

.head-preset__icon--solitaire_classic::after {
  width: 10px;
  height: 10px;
}

.head-preset__icon--solitaire_modern::after {
  width: 8px;
  height: 12px;
  border-radius: 2px;
}

.head-preset__icon--halo_round::after {
  width: 10px;
  height: 10px;
  box-shadow: 0 0 0 3px rgba(123, 94, 167, 0.45);
}

.head-preset__icon--halo_cushion::after {
  width: 11px;
  height: 9px;
  border-radius: 3px;
  box-shadow: 0 0 0 2px rgba(123, 94, 167, 0.4);
}

.head-preset__icon--three_stone::after {
  width: 6px;
  height: 6px;
  box-shadow: -9px 0 0 var(--studio-accent), 9px 0 0 var(--studio-accent);
}

.head-preset__icon--bezel::after {
  width: 12px;
  height: 12px;
  background: transparent;
  border: 2px solid var(--studio-accent);
}

.head-preset__icon--vintage::after {
  width: 10px;
  height: 10px;
  clip-path: polygon(50% 0%, 65% 35%, 100% 50%, 65% 65%, 50% 100%, 35% 65%, 0% 50%, 35% 35%);
}

.head-preset__icon--minimal::after {
  width: 6px;
  height: 6px;
  opacity: 0.7;
}

.head-preset__label {
  font-size: 0.625rem;
  color: var(--studio-text-muted);
  text-align: center;
  line-height: 1.2;
}

.head-preset.is-selected .head-preset__label {
  color: var(--studio-text);
}

.btn--vault {
  background: linear-gradient(135deg, var(--studio-accent) 0%, #6348a0 100%);
  box-shadow:
    0 0 0 1px rgba(123, 94, 167, 0.3),
    0 4px 20px rgba(123, 94, 167, 0.35);
}

.btn--vault:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--studio-accent-hover) 0%, #7558b5 100%);
  box-shadow:
    0 0 0 1px rgba(123, 94, 167, 0.4),
    0 6px 24px rgba(123, 94, 167, 0.45);
}

.btn--vault:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.studio-contest-opt {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.8125rem;
  color: var(--studio-text-secondary);
  cursor: pointer;
  padding: 12px 14px;
  background: var(--studio-accent-muted);
  border: 1px solid rgba(123, 94, 167, 0.35);
  border-radius: var(--radius-md);
}

.studio-contest-opt input {
  margin-top: 2px;
  accent-color: var(--studio-accent);
}

.studio-contest-opt span {
  line-height: 1.4;
}

.studio-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}

/* --- Toast ---------------------------------------------------------------- */

.toast-host {
  position: fixed;
  bottom: calc(var(--nav-height) + var(--safe-bottom) + 16px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 300;
  width: min(92vw, 380px);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 0.3s ease,
    transform 0.3s cubic-bezier(0.34, 1.2, 0.64, 1);
}

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

.toast--error {
  border-color: rgba(220, 53, 69, 0.35);
}

.toast__icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
}

.toast--error .toast__icon {
  background: rgba(220, 53, 69, 0.15);
  color: #c0392b;
}

.toast__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.toast__message {
  font-size: 0.875rem;
  line-height: 1.4;
  margin: 0;
}

.toast__link {
  font-size: 0.8125rem;
  font-weight: 600;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  pointer-events: auto;
}

.toast:has(.toast__link) {
  pointer-events: auto;
}

/* Feed / shell (light) */
.toast-host--feed .toast {
  background: var(--shell-bg-elevated);
  border: 1px solid var(--shell-border-strong);
  box-shadow: var(--shell-shadow-lg);
}

.toast-host--feed .toast__icon {
  background: var(--shell-accent-muted);
  color: var(--shell-accent-hover);
}

.toast-host--feed .toast__message {
  color: var(--shell-text);
}

.toast-host--feed .toast--error {
  box-shadow: var(--shell-shadow-lg);
}

.toast-host--feed .toast--error .toast__icon {
  color: #c0392b;
}

/* Studio (dark) — local host or global host on .skin-studio */
.skin-studio .toast-host .toast,
.studio-page .toast-host .toast {
  background: var(--studio-bg-elevated);
  border: 1px solid var(--studio-border-strong);
  box-shadow:
    0 0 24px rgba(123, 94, 167, 0.2),
    0 8px 32px rgba(0, 0, 0, 0.45);
}

.skin-studio .toast-host .toast__icon,
.studio-page .toast-host .toast__icon {
  background: var(--studio-accent-muted);
  color: var(--studio-accent);
}

.skin-studio .toast-host .toast__message,
.studio-page .toast-host .toast__message {
  color: var(--studio-text);
}

.skin-studio .toast-host .toast--error,
.studio-page .toast-host .toast--error {
  border-color: rgba(220, 53, 69, 0.4);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
}

.skin-studio .toast-host .toast--error .toast__icon,
.studio-page .toast-host .toast--error .toast__icon {
  color: #ff6b6b;
}

/* --- Contests Page -------------------------------------------------------- */

.contest-hero {
  text-align: center;
  padding: 32px 20px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  margin-bottom: 24px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.contest-hero__image {
  width: calc(100% + 40px);
  height: 180px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  margin: -32px -20px 20px;
  box-shadow: var(--shadow);
}

.contest-hero__number {
  display: inline-block;
  padding: 6px 14px;
  background: var(--accent-muted);
  color: var(--accent);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: var(--radius-full);
  margin-bottom: 16px;
}

.contest-hero__title {
  font-family: var(--font-serif);
  font-size: 2rem;
  margin-bottom: 8px;
}

.contest-hero__desc {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  max-width: 360px;
  margin: 0 auto 20px;
}

.contest-hero__prize {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--accent);
}

.contest-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.contest-stat {
  text-align: center;
  padding: 16px 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.contest-stat__value {
  font-size: 1.25rem;
  font-weight: 600;
}

.contest-stat__label {
  font-size: 0.6875rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 4px;
}

.contest-rules {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 24px;
}

.contest-rules h3 {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.contest-rules ul {
  list-style: none;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.contest-rules li {
  padding: 8px 0;
  padding-left: 20px;
  position: relative;
  border-bottom: 1px solid var(--border);
}

.contest-rules li:last-child {
  border-bottom: none;
}

.contest-rules li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 14px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.contest-entries__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

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

.profile-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.profile-avatar-wrap .user-avatar,
.profile-avatar-wrap .user-avatar-fallback--lg {
  box-shadow: 0 2px 8px rgba(26, 24, 20, 0.08);
}

.profile-info h1 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 400;
  margin-bottom: 2px;
}

.profile-handle {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.profile-board-note {
  margin-top: 4px;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.profile-stats {
  display: flex;
  gap: 24px;
  margin-bottom: 24px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.profile-stat__value {
  font-size: 1.125rem;
  font-weight: 600;
}

.profile-stat__label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.profile-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  background: var(--bg-muted);
  padding: 4px;
  border-radius: var(--radius-md);
}

.profile-tab {
  flex: 1;
  padding: 10px 16px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  text-align: center;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.profile-tab.is-active,
.profile-tab:hover {
  background: var(--bg-elevated);
  color: var(--text);
  box-shadow: var(--shadow);
}

.profile-empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
}

.profile-empty__icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
  opacity: 0.5;
}

/* --- Auth Pages ----------------------------------------------------------- */

.auth-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: var(--shell-bg);
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--shell-bg-elevated);
  border: 1px solid var(--shell-border);
  border-radius: var(--radius-xl);
  padding: 40px 32px;
  box-shadow: var(--shell-shadow-lg);
}

.auth-logo {
  text-align: center;
  margin-bottom: 32px;
}

.auth-logo h1 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--shell-text);
}

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

.auth-logo p {
  margin-top: 8px;
  font-size: 0.875rem;
  color: var(--shell-text-muted);
}

.auth-form {
  display: flex;
  flex-direction: column;
}

.auth-footer {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--shell-border);
  text-align: center;
  font-size: 0.875rem;
  color: var(--shell-text-muted);
}

.auth-footer a {
  color: var(--shell-accent);
  font-weight: 500;
}

.auth-demo-hint {
  margin-top: 24px;
  padding: 14px 16px;
  background: var(--bg-elevated);
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.auth-demo-hint__label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 6px;
  color: var(--text-secondary);
}

.auth-demo-hint p + p {
  margin-top: 4px;
}

.dev-hint {
  font-size: 0.8125rem;
  opacity: 0.8;
  margin-top: -16px;
}

.vote-status {
  text-align: center;
  padding: 20px 16px;
  margin-bottom: 24px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.vote-status__title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.vote-status__subtitle {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.vote-signin-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 16px;
  margin-bottom: 20px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.vote-signin-prompt__text {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-primary);
  text-align: center;
}

.vote-own-entry-note {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
  padding: 12px 14px;
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--accent);
}

/* --- Utilities ------------------------------------------------------------ */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-center { text-align: center; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }

/* --- Desktop Enhancements ------------------------------------------------- */

@media (min-width: 768px) {
  .app-main {
    padding-left: 24px;
    padding-right: 24px;
  }

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

  .studio-layout {
    flex-direction: row;
    align-items: flex-start;
  }

  .studio-canvas-wrap {
    flex: 1;
    aspect-ratio: auto;
    min-height: 480px;
  }

  .studio-controls {
    width: 320px;
    flex-shrink: 0;
  }
}

@media (min-width: 1024px) {
  .feed-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* --- Polish: guest banner, demo login, studio product shot ------------- */

.feed-guest-banner {
  margin: 0 0 16px;
  padding: 12px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-align: center;
}

.feed-guest-banner a {
  color: var(--shell-accent);
  font-weight: 600;
}

.demo-account-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 10px 0;
}

.demo-account-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.demo-account-card:hover,
.demo-account-card.is-selected {
  border-color: var(--shell-accent);
  box-shadow: 0 0 0 1px rgba(184, 168, 138, 0.25);
}

.demo-account-card__role {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--shell-accent);
}

.demo-account-card__user {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
}

.demo-account-card__desc {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.auth-demo-hint__foot {
  margin-top: 8px;
  font-size: 0.75rem;
}

.vote-status__hint {
  margin-top: 10px;
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.vote-status__hint a {
  color: var(--shell-accent);
}

.studio-preview-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.studio-preview-label {
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--studio-text-muted, rgba(255, 255, 255, 0.45));
  margin: 0 0 8px 4px;
}

.studio-product-shot {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #f7f5f2;
  border: 1px solid var(--studio-border-strong, rgba(255, 255, 255, 0.12));
}

.studio-product-shot__img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
}

.studio-product-shot__loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  color: var(--text-muted);
  background: rgba(247, 245, 242, 0.85);
}

/* --- Studio Grok (describe → generate → save) ----------------------------- */

.studio-grok-layout {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.studio-grok-prompt {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.studio-grok-prompt__label {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--studio-text);
}

.studio-grok-textarea {
  width: 100%;
  min-height: 132px;
  padding: 16px 18px;
  font-family: inherit;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--studio-text);
  background: var(--studio-bg-muted);
  border: 1px solid var(--studio-border-strong);
  border-radius: var(--radius-lg);
  resize: vertical;
  outline: none;
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast);
}

.studio-grok-textarea::placeholder {
  color: var(--studio-text-muted);
}

.studio-grok-textarea:focus {
  border-color: var(--studio-accent);
  box-shadow: 0 0 0 3px var(--studio-accent-muted);
}

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

.studio-style-chip {
  padding: 8px 14px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--studio-text-secondary);
  background: var(--studio-bg-elevated);
  border: 1px solid var(--studio-border);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition:
    border-color var(--transition-fast),
    background var(--transition-fast),
    color var(--transition-fast),
    box-shadow var(--transition-fast);
}

.studio-style-chip:hover {
  border-color: var(--studio-border-strong);
  color: var(--studio-text);
}

.studio-style-chip.is-active {
  background: var(--studio-accent-muted);
  border-color: var(--studio-accent);
  color: var(--studio-text);
  box-shadow: 0 0 16px rgba(123, 94, 167, 0.2);
}

.studio-grok-signin-hint {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--studio-text-muted);
}

.studio-grok-signin-hint a {
  color: var(--studio-accent);
  font-weight: 600;
}

.studio-grok-generate {
  margin-top: 4px;
}

.studio-grok-preview__frame {
  position: relative;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #f7f5f2;
  border: 1px solid var(--studio-border-strong);
  border-radius: var(--radius-lg);
  box-shadow:
    0 0 0 1px rgba(123, 94, 167, 0.1),
    0 8px 32px rgba(0, 0, 0, 0.35);
}

.studio-grok-preview__frame.is-loading {
  background: var(--studio-bg-muted);
}

.studio-grok-preview__img {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.studio-grok-preview__frame.has-image .studio-grok-preview__img {
  display: block;
}

.studio-grok-preview__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 32px 24px;
  text-align: center;
  color: var(--studio-text-muted);
  font-size: 0.875rem;
}

.studio-grok-preview__loading {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 32px 24px;
  text-align: center;
}

.studio-grok-preview__frame.is-loading .studio-grok-preview__loading {
  display: flex !important;
}

.studio-grok-preview__frame.is-loading .studio-grok-preview__empty {
  display: none !important;
}

.studio-grok-preview__frame.has-image .studio-grok-preview__empty {
  display: none;
}

.studio-grok-preview__frame.has-error .studio-grok-preview__empty {
  display: none;
}

.studio-grok-preview__error {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 3;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 28px 24px;
  text-align: center;
  background: rgba(15, 14, 18, 0.92);
  color: var(--studio-text);
}

.studio-grok-preview__frame.has-error .studio-grok-preview__error,
.studio-grok-preview__error:not([hidden]) {
  display: flex;
}

.studio-grok-preview__error-msg {
  margin: 0;
  max-width: 18rem;
  font-size: 0.875rem;
  line-height: 1.45;
  color: #ff8a8a;
}

.studio-grok-preview__retry {
  border-color: rgba(255, 138, 138, 0.35);
  color: var(--studio-text);
}

.studio-grok-preview__retry:hover {
  border-color: #ff8a8a;
  color: #ff8a8a;
}

.studio-grok-generate:disabled,
.studio-grok-generate.is-disabled,
.btn--vault:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.studio-grok-generate--signin {
  text-align: center;
  text-decoration: none;
}

.studio-fallback-banner {
  padding: 12px 16px;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--studio-text-secondary);
  background: rgba(123, 94, 167, 0.14);
  border: 1px solid rgba(123, 94, 167, 0.35);
  border-radius: var(--radius-md);
}

.studio-fallback-banner[hidden] {
  display: none !important;
}

.studio-grok-preview__placeholder-icon {
  opacity: 0.45;
}

.studio-grok-preview__loading {
  position: absolute;
  inset: 0;
  background: rgba(15, 14, 18, 0.85);
  color: var(--studio-text);
  z-index: 2;
}

.studio-grok-preview__status {
  margin: 0;
  max-width: 16rem;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--studio-text);
}

.studio-grok-preview__spinner {
  width: 44px;
  height: 44px;
  border: 3px solid rgba(123, 94, 167, 0.25);
  border-top-color: var(--studio-accent);
  border-right-color: var(--studio-accent-hover);
  border-radius: 50%;
  animation: studio-grok-spin 0.75s linear infinite;
  box-shadow: 0 0 24px rgba(123, 94, 167, 0.45);
}

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

.studio-grok-refine {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.studio-grok-refine__input {
  flex: 1;
  min-width: 0;
}

.studio-grok-refine__btn {
  flex-shrink: 0;
  align-self: stretch;
}

.studio-grok-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.studio-optional-specs {
  background: var(--studio-bg-elevated);
  border: 1px solid var(--studio-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.studio-optional-specs__summary {
  padding: 16px 20px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--studio-text-secondary);
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.studio-optional-specs__summary::-webkit-details-marker {
  display: none;
}

.studio-optional-specs__summary::after {
  content: '+';
  float: right;
  color: var(--studio-accent);
  font-size: 1.125rem;
  line-height: 1;
}

.studio-optional-specs[open] .studio-optional-specs__summary::after {
  content: '−';
}

.studio-optional-specs__body {
  padding: 0 20px 20px;
  border-top: 1px solid var(--studio-border);
}

.studio-optional-specs__hint {
  margin: 16px 0 20px;
  font-size: 0.8125rem;
  color: var(--studio-text-muted);
  line-height: 1.45;
}

@media (min-width: 768px) {
  .studio-grok-layout {
    gap: 24px;
  }

  .studio-grok-preview__frame {
    max-height: min(72vh, 640px);
    margin-inline: auto;
    width: min(100%, 560px);
  }

  .studio-grok-prompt,
  .studio-grok-refine,
  .studio-grok-actions {
    max-width: 560px;
    margin-inline: auto;
    width: 100%;
  }
}

/* --- Grok-first Studio ---------------------------------------------------- */

.grok-studio {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
}

.grok-studio__hero {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--shell-bg);
  border: 1px solid rgba(184, 168, 138, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.65),
    0 8px 32px rgba(0, 0, 0, 0.28);
}

.grok-studio__hero-frame {
  position: absolute;
  inset: 12px;
  border-radius: calc(var(--radius-lg) - 8px);
  border: 1px solid rgba(184, 168, 138, 0.18);
  pointer-events: none;
  z-index: 2;
}

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

.grok-studio__hero-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px;
  text-align: center;
  color: var(--shell-text-muted);
  background: linear-gradient(165deg, #faf8f5 0%, var(--shell-bg) 55%, #f0ebe4 100%);
}

.grok-studio__hero-placeholder-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--shell-accent);
  background: var(--shell-accent-muted);
  border: 1px dashed rgba(184, 168, 138, 0.45);
}

.grok-studio__hero-placeholder-text {
  font-size: 0.8125rem;
  line-height: 1.45;
  max-width: 16rem;
  color: var(--shell-text-secondary);
}

.grok-studio__shimmer {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(
    105deg,
    transparent 0%,
    transparent 40%,
    rgba(255, 255, 255, 0.55) 50%,
    transparent 60%,
    transparent 100%
  );
  background-size: 220% 100%;
  animation: grok-shimmer 1.6s ease-in-out infinite;
}

.grok-studio__hero.is-generating .grok-studio__hero-img,
.grok-studio__hero.is-generating .grok-studio__hero-placeholder {
  filter: blur(1px) saturate(0.92);
}

.grok-studio__hero.is-generating::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(247, 245, 242, 0.35);
}

@keyframes grok-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.grok-studio__prompt {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.grok-studio__prompt-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--studio-text-muted);
}

.grok-studio__prompt-input {
  width: 100%;
  min-height: 96px;
  padding: 14px 16px;
  resize: vertical;
  background: var(--studio-bg-muted);
  border: 1px solid var(--studio-border-strong);
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--studio-text);
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast);
}

.grok-studio__prompt-input::placeholder {
  color: var(--studio-text-muted);
}

.grok-studio__prompt-input:focus {
  outline: none;
  border-color: var(--studio-accent);
  box-shadow: 0 0 0 3px var(--studio-accent-muted);
}

.grok-studio__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.grok-studio__chip {
  flex-shrink: 0;
  padding: 8px 14px;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--studio-text-secondary);
  background: var(--studio-bg-muted);
  border: 1px solid var(--studio-border);
  border-radius: var(--radius-full);
  transition:
    border-color var(--transition-fast),
    background var(--transition-fast),
    color var(--transition-fast),
    box-shadow var(--transition-fast);
}

.grok-studio__chip:hover {
  border-color: var(--studio-border-strong);
  color: var(--studio-text);
}

.grok-studio__chip.is-selected,
.grok-studio__chip[aria-pressed="true"] {
  background: var(--studio-accent-muted);
  border-color: rgba(123, 94, 167, 0.55);
  color: var(--studio-text);
  box-shadow: 0 0 14px rgba(123, 94, 167, 0.18);
}

.grok-studio__specs {
  border: 1px solid var(--studio-border);
  border-radius: var(--radius-md);
  background: var(--studio-bg-elevated);
  overflow: hidden;
}

.grok-studio__specs-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--studio-text-secondary);
  cursor: pointer;
  list-style: none;
  transition: color var(--transition-fast), background var(--transition-fast);
}

.grok-studio__specs-toggle::-webkit-details-marker {
  display: none;
}

.grok-studio__specs-toggle::after {
  content: '+';
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  font-size: 1rem;
  line-height: 1;
  color: var(--studio-accent);
  background: var(--studio-accent-muted);
  transition: transform var(--transition-fast);
}

.grok-studio__specs[open] .grok-studio__specs-toggle::after {
  content: '−';
}

.grok-studio__specs-toggle:hover {
  color: var(--studio-text);
  background: rgba(123, 94, 167, 0.06);
}

.grok-studio__specs-panel {
  padding: 0 16px 16px;
  border-top: 1px solid var(--studio-border);
}

.grok-studio__specs-panel .control-group:last-child {
  margin-bottom: 0;
}

.grok-studio__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.grok-studio__btn-generate,
.grok-studio__btn-refine {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 20px;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: var(--radius-md);
  transition:
    background var(--transition-fast),
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    transform var(--transition-fast),
    opacity var(--transition-fast);
}

.grok-studio__btn-generate {
  background: linear-gradient(135deg, var(--studio-accent) 0%, #6348a0 100%);
  color: var(--studio-text);
  box-shadow:
    0 0 0 1px rgba(123, 94, 167, 0.3),
    0 4px 20px rgba(123, 94, 167, 0.35);
}

.grok-studio__btn-generate:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--studio-accent-hover) 0%, #7558b5 100%);
  box-shadow:
    0 0 0 1px rgba(123, 94, 167, 0.4),
    0 6px 24px rgba(123, 94, 167, 0.45);
}

.grok-studio__btn-refine {
  background: transparent;
  color: var(--studio-text-secondary);
  border: 1px solid var(--studio-border-strong);
}

.grok-studio__btn-refine:hover:not(:disabled) {
  border-color: var(--studio-accent);
  color: var(--studio-accent);
  background: var(--studio-accent-muted);
}

.grok-studio__btn-generate:disabled,
.grok-studio__btn-refine:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.grok-studio__btn-generate:active:not(:disabled),
.grok-studio__btn-refine:active:not(:disabled) {
  transform: scale(0.98);
}

.grok-studio__status {
  font-size: 0.75rem;
  color: var(--studio-text-muted);
  text-align: center;
  min-height: 1.125rem;
}

.grok-studio__status.is-busy {
  color: var(--studio-accent);
}

/* Produce CTA — design detail modal */
.produce-cta {
  margin-top: 20px;
  padding: 18px;
  background: linear-gradient(165deg, var(--shell-bg) 0%, var(--shell-bg-muted) 100%);
  border: 1px solid var(--shell-border-strong);
  border-radius: var(--radius-md);
}

.produce-cta__eyebrow {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--shell-accent);
  margin-bottom: 6px;
}

.produce-cta__title {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--shell-text);
  margin-bottom: 6px;
}

.produce-cta__copy {
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--shell-text-secondary);
  margin-bottom: 14px;
}

.produce-cta__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.produce-cta__tag {
  padding: 5px 10px;
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--shell-accent);
  background: var(--shell-accent-muted);
  border-radius: var(--radius-full);
}

.produce-cta__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.produce-cta .btn--produce {
  background: var(--shell-text);
  color: var(--shell-bg);
}

.produce-cta .btn--produce:hover {
  background: #2e2a24;
}

@media (min-width: 480px) {
  .grok-studio__actions--split {
    flex-direction: row;
  }

  .grok-studio__actions--split .grok-studio__btn-generate,
  .grok-studio__actions--split .grok-studio__btn-refine {
    flex: 1;
  }
}

/* --- Platform admin dashboard --------------------------------------------- */

body.admin-page {
  --shell-bg: #0f0e12;
  --shell-bg-elevated: #1a1820;
  --shell-text: #f5f3ef;
  --shell-text-secondary: #a8a3b0;
  --shell-text-muted: #6e6878;
  --shell-border: rgba(255, 255, 255, 0.08);
  --shell-border-strong: rgba(255, 255, 255, 0.14);
  --bg: #0f0e12;
  --bg-elevated: #1a1820;
  --text: #f5f3ef;
  --text-secondary: #a8a3b0;
  --text-muted: #6e6878;
  --border: rgba(255, 255, 255, 0.08);
}

.admin-dash {
  max-width: 720px;
  margin: 0 auto;
}

.admin-dash__hero {
  margin-bottom: 24px;
}

.admin-dash__stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 32px;
}

@media (min-width: 520px) {
  .admin-dash__stats {
    grid-template-columns: repeat(4, 1fr);
  }
}

.admin-stat {
  padding: 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-align: center;
}

.admin-stat--alert .admin-stat__value {
  color: #e8a87c;
}

.admin-stat__value {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 500;
  line-height: 1;
  margin-bottom: 6px;
}

.admin-stat__label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.admin-panel {
  margin-bottom: 32px;
  padding: 20px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.admin-panel .section-label {
  margin-bottom: 4px;
}

.admin-message-log {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
  max-height: 420px;
  overflow-y: auto;
}

.admin-message {
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.admin-message__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

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

.admin-message__body {
  margin: 0 0 8px;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--text-secondary);
}

.avatar-mod-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.avatar-mod-card {
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-align: center;
}

.avatar-mod-card img {
  width: 96px;
  height: 96px;
  border-radius: var(--radius-full);
  object-fit: cover;
  margin: 0 auto 8px;
  display: block;
}

.avatar-mod-card .username {
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.avatar-mod-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.avatar-mod-empty {
  font-size: 0.875rem;
  color: var(--text-muted);
  grid-column: 1 / -1;
}

.admin-nav-link {
  color: #e8a87c !important;
}

/* --- Profile board grid (Instagram-style) --------------------------------- */

.profile-board-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
}

.profile-board-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 24px 0;
}

.profile-board-cell {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1;
  padding: 0;
  border: none;
  background: var(--bg-muted);
  overflow: hidden;
  cursor: pointer;
}

.profile-board-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.2s ease;
}

.profile-board-cell:hover img {
  transform: scale(1.03);
}

.profile-board-cell.is-highlighted {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  z-index: 1;
}

.profile-board-cell--unavailable {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: default;
}

.profile-board-cell__placeholder {
  font-size: 1.5rem;
  color: var(--text-muted);
}

.profile-board-cell__remove {
  font-size: 0.6875rem;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  cursor: pointer;
}

/* --- Design lightbox ------------------------------------------------------ */

.design-lightbox-backdrop {
  align-items: center;
  justify-content: center;
  padding: 12px;
}

.design-lightbox {
  position: relative;
  width: min(100%, 560px);
  max-height: 92vh;
  max-height: 92dvh;
  display: flex;
  flex-direction: column;
  background: #0f0e12;
  border-radius: var(--radius-lg);
  overflow: hidden;
  animation: slideUp 0.28s ease;
}

.design-lightbox__close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: var(--radius-full);
  background: rgba(15, 14, 18, 0.72);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.design-lightbox__stage {
  flex: 1 1 auto;
  min-height: 0;
  background: #0f0e12;
  display: flex;
  align-items: center;
  justify-content: center;
}

.design-lightbox__image {
  width: 100%;
  max-height: min(72vh, 720px);
  object-fit: contain;
  display: block;
}

.design-lightbox__meta {
  padding: 14px 16px 16px;
  color: #f5f3ef;
}

.design-lightbox__title {
  margin: 0 0 4px;
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 500;
}

.design-lightbox__author {
  margin: 0 0 12px;
  font-size: 0.8125rem;
  color: #a8a3b0;
}

.design-lightbox__social {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 12px 0 16px;
    flex-wrap: wrap;
}

.design-lightbox__social .feed-post__action {
    margin: 0;
}

.design-lightbox__like-count {
    font-size: 0.875rem;
    color: var(--text-muted, #6b6560);
}

.design-lightbox__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* --- Comment thread modal ------------------------------------------------- */

.comment-thread-backdrop {
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}

@media (min-width: 480px) {
  .comment-thread-backdrop {
    align-items: center;
    padding: 20px;
  }
}

.comment-thread {
  width: 100%;
  max-width: 480px;
  max-height: 85vh;
  max-height: 85dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg-elevated);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  overflow: hidden;
  animation: slideUp 0.28s ease;
}

@media (min-width: 480px) {
  .comment-thread {
    border-radius: var(--radius-xl);
    max-height: 80vh;
  }
}

.comment-thread__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.comment-thread__title {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
}

.comment-thread__close {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: var(--radius-full);
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
}

.comment-thread__post-preview {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.comment-thread__thumb {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-muted);
}

.comment-thread__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.comment-thread__post-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.comment-thread__post-meta strong {
  color: var(--text);
}

.comment-thread__list {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 180px;
}

.comment-thread__item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.comment-thread__line {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.45;
}

.comment-thread__line strong {
  margin-right: 6px;
}

.comment-thread__time {
  display: block;
  margin-top: 4px;
  font-size: 0.625rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.comment-thread__empty,
.comment-thread__guest {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-align: center;
}

.comment-thread__form {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
}

.comment-thread__input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 10px 14px;
  font-size: 0.8125rem;
  background: var(--bg);
  color: var(--text);
}

.comment-thread__input:focus {
  outline: 2px solid rgba(184, 168, 138, 0.45);
  outline-offset: 0;
}

/* --- Midnite Member & invite boards ------------------------------------- */

.member-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 3px 8px;
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--shell-bg);
  background: linear-gradient(135deg, #b8a88a 0%, #8a7a62 100%);
  border-radius: var(--radius-full);
  vertical-align: middle;
}

.membership-nav-cta {
  color: var(--accent) !important;
}

.membership-page {
  max-width: 520px;
  margin: 0 auto;
}

.membership-hero {
  text-align: center;
  margin-bottom: 32px;
}

.membership-hero__eyebrow {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.membership-hero__lead {
  max-width: 28rem;
  margin: 0 auto 24px;
}

.membership-pricing {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

.membership-price-card {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  text-align: left;
}

.membership-price-card--founding {
  border-color: rgba(184, 168, 138, 0.45);
  box-shadow: 0 0 0 1px rgba(184, 168, 138, 0.2);
}

.membership-price-card__label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.membership-price-card__amount {
  display: block;
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 500;
  margin-bottom: 6px;
}

.membership-price-card__amount span {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  color: var(--text-muted);
}

.membership-price-card__note {
  display: block;
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

.membership-feature-list {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
}

.membership-feature-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
}

.membership-feature-list li::before {
  content: "✓ ";
  color: var(--accent);
  font-weight: 700;
}

.membership-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
  margin-top: 12px;
}

.membership-table th,
.membership-table td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--border);
  text-align: center;
}

.membership-table th:first-child,
.membership-table td:first-child {
  text-align: left;
}

.membership-table__soon {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-style: italic;
}

.membership-badge--active {
  display: inline-block;
  margin-bottom: 16px;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  background: var(--accent-muted);
  color: var(--accent);
  font-size: 0.8125rem;
  font-weight: 600;
}

.invite-boards-panel {
  padding: 4px 0;
}

.invite-board-create {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.invite-board-create .form-input {
  flex: 1;
}

.invite-board-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.invite-board-list__item {
  border-bottom: 1px solid var(--border);
}

.invite-board-list__link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 4px;
  color: inherit;
  text-decoration: none;
}

.invite-board-list__link:hover strong {
  text-decoration: underline;
}

.invite-board-list__link span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.membership-upsell {
  padding: 20px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  text-align: center;
}

.invite-board-page {
  max-width: 640px;
  margin: 0 auto;
}

.invite-board-header {
  margin-bottom: 20px;
}

.invite-board-header__meta {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 12px;
}

.invite-board-share__row {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.invite-board-share .form-input {
  flex: 1;
  font-size: 0.75rem;
}

.design-lightbox__board-save {
  flex: 1 1 100%;
  margin-bottom: 8px;
}

.design-lightbox__board-row {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.design-lightbox__board-row .form-input {
  flex: 1;
}

/* --- Night Market (horizontal aisles + half-sheet) ------------------------ */

.night-market {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding-bottom: calc(var(--nav-height) + var(--safe-bottom) + 12px);
}

.night-market__aisle {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.night-market__track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  padding: 4px 16px 10px;
  margin: 0 -16px;
}

.night-market__track::-webkit-scrollbar {
  display: none;
}

.night-market__track:focus-visible {
  outline: 2px solid rgba(184, 168, 138, 0.55);
  outline-offset: 2px;
  border-radius: var(--radius-md);
}

.night-market__card {
  flex: 0 0 auto;
  width: 160px;
  aspect-ratio: 3 / 4;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: flex;
  flex-direction: column;
  background: var(--shell-bg-elevated);
  border: 1px solid var(--shell-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shell-shadow);
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast),
    border-color var(--transition-fast);
}

.night-market__card:hover {
  transform: translateY(-2px);
  border-color: rgba(184, 168, 138, 0.35);
  box-shadow: var(--shell-shadow-lg);
}

.night-market__card:focus-visible {
  outline: 2px solid rgba(184, 168, 138, 0.65);
  outline-offset: 2px;
}

@media (min-width: 640px) {
  .night-market__track {
    gap: 14px;
    padding-inline: 20px;
    margin-inline: -20px;
  }

  .night-market__card {
    width: 200px;
  }
}

.night-market__card-media {
  flex: 1 1 auto;
  min-height: 0;
  background: var(--shell-bg-muted);
  position: relative;
  overflow: hidden;
}

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

.night-market__card-body {
  flex: 0 0 auto;
  padding: 10px 12px 12px;
}

.night-market__card-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.night-market__trust {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin-top: 8px;
  font-size: 0.6875rem;
  line-height: 1.35;
  color: var(--shell-text-muted);
}

.night-market__trust-sizes {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  background: var(--shell-accent-muted);
  color: var(--shell-text-secondary);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.night-market__trust-price {
  font-weight: 600;
  color: var(--shell-text-secondary);
}

.night-market-sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(26, 24, 20, 0);
  backdrop-filter: blur(0);
  -webkit-backdrop-filter: blur(0);
  pointer-events: none;
  transition:
    background-color 0.28s ease,
    backdrop-filter 0.28s ease,
    -webkit-backdrop-filter 0.28s ease;
}

.night-market-sheet-backdrop.is-open {
  background: rgba(26, 24, 20, 0.48);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  pointer-events: auto;
}

.night-market-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 201;
  width: 100%;
  max-height: 55vh;
  max-height: 55dvh;
  display: flex;
  flex-direction: column;
  background: var(--shell-bg-elevated);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  box-shadow: 0 -8px 32px rgba(26, 24, 20, 0.14);
  overflow: hidden;
  transform: translateY(100%);
  transition: transform 0.28s ease;
}

.night-market-sheet.is-open {
  transform: translateY(0);
}

.night-market-sheet-backdrop .night-market-sheet {
  position: relative;
  left: auto;
  right: auto;
  bottom: auto;
  z-index: auto;
  width: 100%;
}

.night-market-sheet__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--shell-border);
}

.night-market-sheet__title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.0625rem;
  font-weight: 500;
}

.night-market-sheet__close {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: var(--radius-full);
  background: var(--shell-bg-muted);
  color: var(--shell-text-secondary);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.night-market-sheet__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 16px;
  -webkit-overflow-scrolling: touch;
}

body.night-market-sheet-open {
  overflow: hidden;
}

/* ==========================================================================
   The Circle — Patron Salon skin
   ========================================================================== */

body.skin-circle {
  --shell-bg: #FAF3EF;
  --shell-bg-elevated: #FFFBF8;
  --shell-bg-muted: #F5E6E8;
  --shell-accent: #C96B7A;
  --shell-accent-hover: #A85565;
  --shell-accent-muted: rgba(201, 107, 122, 0.16);
  --shell-text: #3D2C2E;
  --shell-text-secondary: #6B4F54;
  --shell-text-muted: #9A7B80;
  --shell-border: rgba(61, 44, 46, 0.09);
  --shell-border-strong: rgba(61, 44, 46, 0.16);
  --shell-shadow: 0 2px 14px rgba(61, 44, 46, 0.07);
  --shell-shadow-lg: 0 10px 36px rgba(61, 44, 46, 0.1);
  background:
    linear-gradient(160deg, #F5E6E8 0%, var(--shell-bg) 42%, #F0E8E4 100%);
}

body.skin-circle .app-header {
  background: rgba(250, 243, 239, 0.92);
  border-bottom-color: var(--shell-border);
}

body.skin-circle .app-logo span {
  color: var(--shell-accent);
}

body.skin-circle .contest-pill::before {
  background: linear-gradient(135deg, #C96B7A 0%, #E8B4B8 50%, #D4848A 100%);
}

body.skin-circle .contest-pill__badge {
  background: var(--shell-accent);
  color: #FFFBF8;
}

body.skin-circle .bottom-nav__studio-btn {
  background: linear-gradient(145deg, #3D2C2E 0%, #5C3D42 100%);
  box-shadow: 0 0 0 3px rgba(201, 107, 122, 0.28), 0 4px 16px rgba(61, 44, 46, 0.2);
}

body.skin-circle .bottom-nav__link.is-active {
  color: var(--shell-accent);
}

body.skin-circle .night-market-card__badge--contest {
  background: var(--shell-text);
  color: #FFFBF8;
}

body.skin-circle .night-market-card__badge--studio {
  background: rgba(255, 251, 248, 0.92);
  color: var(--shell-text-secondary);
  border: 1px solid rgba(201, 107, 122, 0.35);
}

body.skin-circle .sheet-backdrop {
  background: rgba(61, 44, 46, 0.5);
}

body.skin-circle .sheet__prompt {
  border-left-color: var(--shell-accent);
  background: var(--shell-accent-muted);
}

/* Agent 6 circle global — auth, forms, profile, buttons */

body.skin-circle {
  --bg: var(--shell-bg);
  --bg-elevated: var(--shell-bg-elevated);
  --bg-muted: var(--shell-bg-muted);
  --accent: var(--shell-accent);
  --accent-hover: var(--shell-accent-hover);
  --accent-muted: var(--shell-accent-muted);
  --text: var(--shell-text);
  --text-secondary: var(--shell-text-secondary);
  --text-muted: var(--shell-text-muted);
  --border: var(--shell-border);
  --border-strong: var(--shell-border-strong);
  --shadow: var(--shell-shadow);
  --shadow-lg: var(--shell-shadow-lg);
}

body.skin-circle .form-input,
body.skin-circle .form-select {
  background: var(--shell-bg-elevated);
  border-color: var(--shell-border-strong);
  color: var(--shell-text);
}

body.skin-circle .form-input:focus,
body.skin-circle .form-select:focus {
  border-color: var(--shell-accent);
  box-shadow: 0 0 0 3px var(--shell-accent-muted);
}

body.skin-circle .form-input::placeholder {
  color: var(--shell-text-muted);
}

body.skin-circle .form-label {
  color: var(--shell-text-secondary);
}

body.skin-circle .auth-page {
  background: transparent;
}

body.skin-circle .auth-card {
  background: var(--shell-bg-elevated);
  border-color: var(--shell-border);
  box-shadow: var(--shell-shadow-lg);
}

body.skin-circle .auth-logo h1 {
  color: var(--shell-text);
}

body.skin-circle .auth-logo h1 span {
  color: var(--shell-accent);
}

body.skin-circle .auth-demo-hint {
  background: var(--shell-bg-muted);
  border-color: var(--shell-border-strong);
  color: var(--shell-text-muted);
}

body.skin-circle .auth-demo-hint__label {
  color: var(--shell-text-secondary);
}

body.skin-circle .btn--primary {
  background: var(--shell-accent);
  color: #FFFBF8;
}

body.skin-circle .btn--primary:hover {
  background: var(--shell-accent-hover);
}

body.skin-circle .btn--ghost {
  border-color: var(--shell-border-strong);
  color: var(--shell-text-secondary);
}

body.skin-circle .btn--ghost:hover {
  border-color: var(--shell-accent);
  color: var(--shell-accent);
}

body.skin-circle .profile-handle,
body.skin-circle .profile-stat__label,
body.skin-circle .profile-empty {
  color: var(--shell-text-muted);
}

body.skin-circle .profile-board-note {
  color: var(--shell-text-secondary);
}

body.skin-circle .profile-stats {
  border-color: var(--shell-border);
}

body.skin-circle .profile-tabs {
  background: var(--shell-bg-muted);
}

body.skin-circle .profile-tab.is-active,
body.skin-circle .profile-tab:hover {
  background: var(--shell-bg-elevated);
  color: var(--shell-text);
  box-shadow: var(--shell-shadow);
}

body.skin-circle .page-title {
  color: var(--shell-text);
}

body.skin-circle .page-subtitle {
  color: var(--shell-text-muted);
}

/* --- Circle salon layout --- */

.circle-salon__hero {
  padding: 0 0 8px;
}

.circle-salon__hero-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.circle-salon__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-serif);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: none;
  color: var(--shell-text-secondary);
  margin: 0 0 6px;
}

.circle-salon__key {
  font-size: 0.75rem;
  filter: sepia(0.35) saturate(1.4);
}

.circle-salon__lock {
  font-size: 1.125rem;
  line-height: 1;
  opacity: 0.85;
}

.circle-salon__title {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 6vw, 2.25rem);
  font-weight: 500;
  color: #B86B7A;
  margin: 0 0 10px;
  letter-spacing: 0.02em;
  position: relative;
  display: inline-block;
}

.circle-salon__title::after {
  content: "";
  display: block;
  width: 100%;
  height: 6px;
  margin-top: 4px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 6' preserveAspectRatio='none'%3E%3Cpath d='M0 3 Q15 0 30 3 T60 3 T90 3 T120 3' fill='none' stroke='%23C96B7A' stroke-width='1' opacity='0.55'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}

.circle-salon__subtitle {
  font-size: 0.9375rem;
  color: var(--shell-text-muted);
  margin: 0 0 20px;
  max-width: 28rem;
  line-height: 1.5;
}

.circle-salon__tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  padding: 4px;
  background: var(--shell-bg-muted);
  border-radius: var(--radius-full);
  border: 1px solid var(--shell-border);
}

.circle-salon__tab {
  flex: 1;
  min-height: 40px;
  border: none;
  border-radius: var(--radius-full);
  background: transparent;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--shell-text-muted);
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.circle-salon__tab.is-active {
  background: var(--shell-bg-elevated);
  color: var(--shell-accent);
  box-shadow: var(--shell-shadow);
}

.circle-salon__tab:focus-visible {
  outline: 2px solid var(--shell-accent);
  outline-offset: 2px;
}

.circle-guest-banner {
  border-color: rgba(201, 107, 122, 0.25);
  background: var(--shell-bg-elevated);
}

.circle-hall__header .feed-header__title {
  font-size: clamp(1.35rem, 4.5vw, 1.75rem);
}

/* Knock to enter (guests / non-patrons) */

.circle-knock {
  padding: 8px 0 24px;
}

.circle-knock__card {
  text-align: center;
  padding: 28px 22px 24px;
  background:
    radial-gradient(ellipse 90% 60% at 50% 100%, rgba(245, 230, 232, 0.65) 0%, transparent 70%),
    linear-gradient(165deg, #E8C4CB 0%, #D9A8B2 45%, #C98B98 100%);
  border: 1px solid rgba(255, 251, 248, 0.35);
  border-radius: var(--radius-xl);
  box-shadow: var(--shell-shadow-lg);
  color: #FFFBF8;
}

.circle-knock__bell {
  display: block;
  font-size: 1.25rem;
  margin-bottom: 8px;
  filter: sepia(0.4) saturate(1.5);
}

.circle-knock__title {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 500;
  margin: 0 0 4px;
  color: #FFFBF8;
}

.circle-knock__subtitle {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-style: italic;
  margin: 0 0 12px;
  color: rgba(255, 251, 248, 0.92);
}

.circle-knock__lead {
  font-size: 0.875rem;
  color: rgba(255, 251, 248, 0.88);
  line-height: 1.55;
  margin: 0 0 18px;
  max-width: 22rem;
  margin-left: auto;
  margin-right: auto;
}

.circle-knock__cta {
  background: #FFFBF8;
  color: var(--shell-text);
  border: none;
  gap: 8px;
  font-weight: 600;
}

.circle-knock__cta:hover {
  background: #F5E6E8;
  color: var(--shell-text);
}

.circle-knock__signin {
  margin: 14px 0 0;
  font-size: 0.875rem;
  color: rgba(255, 251, 248, 0.85);
}

.circle-knock__signin a {
  color: #FFFBF8;
  font-weight: 600;
}

.circle-knock__hall-hint {
  margin-top: 16px;
  text-align: center;
  font-size: 0.875rem;
  color: var(--shell-text-muted);
}

.circle-knock__hall-link {
  border: none;
  background: none;
  padding: 0;
  font: inherit;
  font-weight: 600;
  color: var(--shell-accent);
  text-decoration: underline;
  cursor: pointer;
}

/* Patron board collage */

.circle-salon-panel__label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--shell-accent);
  margin: 0 0 6px;
}

.circle-salon-panel__copy {
  font-size: 0.9375rem;
  color: var(--shell-text-secondary);
  margin: 0 0 12px;
  line-height: 1.5;
}

/* Polaroid collage */

.circle-teaser {
  position: relative;
  margin-bottom: 8px;
}

.circle-polaroids {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px 14px;
  margin: 0 0 12px;
}

.circle-polaroids--boards {
  margin-top: 16px;
}

@media (min-width: 480px) {
  .circle-polaroids--boards {
    grid-template-columns: repeat(3, 1fr);
  }
}

.circle-polaroid {
  margin: 0;
  text-align: center;
}

.circle-polaroid--link {
  text-decoration: none;
  color: inherit;
  transition: transform var(--transition-fast);
}

.circle-polaroid--link:hover {
  transform: translateY(-4px) rotate(-0.5deg);
}

.circle-polaroid__frame {
  position: relative;
  background: #FFFBF8;
  padding: 8px 8px 20px;
  border-radius: 2px;
  box-shadow:
    0 1px 2px rgba(61, 44, 46, 0.06),
    0 6px 18px rgba(61, 44, 46, 0.1);
  transform: rotate(var(--polaroid-tilt, 0deg));
}

.circle-polaroid:nth-child(1) .circle-polaroid__frame { --polaroid-tilt: -1.5deg; }
.circle-polaroid:nth-child(2) .circle-polaroid__frame { --polaroid-tilt: 1.2deg; }
.circle-polaroid:nth-child(3) .circle-polaroid__frame { --polaroid-tilt: 0.8deg; }
.circle-polaroid:nth-child(4) .circle-polaroid__frame { --polaroid-tilt: -0.6deg; }

.circle-polaroid__frame img,
.circle-polaroid__frame .design-image {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 1px;
  background: var(--shell-bg-muted);
}

.circle-polaroid__frame--teaser img {
  filter: saturate(1.05);
}

.circle-polaroid__pin {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #F5E0A8 0%, #C9A227 55%, #8B6914 100%);
  box-shadow: 0 1px 3px rgba(61, 44, 46, 0.25);
  z-index: 2;
}

.circle-polaroid__note {
  position: absolute;
  top: 14px;
  right: -4px;
  max-width: 72%;
  padding: 5px 8px;
  font-size: 0.625rem;
  font-weight: 600;
  line-height: 1.3;
  color: #6B3D48;
  background: #F8D4DC;
  border-radius: 2px;
  box-shadow: 0 2px 6px rgba(61, 44, 46, 0.12);
  transform: rotate(4deg);
  z-index: 3;
}

.circle-polaroid__placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  font-size: 0.75rem;
  color: var(--shell-text-muted);
  font-style: italic;
  background: var(--shell-bg-muted);
}

.circle-polaroid__label {
  margin: 10px 0 0;
  font-family: var(--font-serif);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--shell-text);
  line-height: 1.25;
}

.circle-polaroid__meta {
  margin: 2px 0 0;
  font-size: 0.6875rem;
  color: var(--shell-text-muted);
}

/* Salon whispers */

.circle-whispers {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: -8px 0 20px;
  position: relative;
  z-index: 4;
}

.circle-whisper {
  max-width: 88%;
  padding: 10px 14px;
  background: rgba(255, 251, 248, 0.94);
  border: 1px solid rgba(201, 107, 122, 0.18);
  border-radius: 16px 16px 16px 4px;
  box-shadow: var(--shell-shadow);
}

.circle-whisper:nth-child(even) {
  align-self: flex-end;
  border-radius: 16px 16px 4px 16px;
}

.circle-whisper__text {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--shell-text-secondary);
}

.circle-whisper__author,
.circle-whisper__hearts {
  margin: 4px 0 0;
  font-size: 0.75rem;
  color: var(--shell-accent);
}

.circle-whisper__hearts {
  letter-spacing: 0.12em;
}

/* Circle bottom nav — four tabs */

body.skin-circle .circle-bottom-nav {
  background: rgba(250, 243, 239, 0.96);
  border-top-color: var(--shell-border);
}

.circle-bottom-nav .bottom-nav__inner {
  grid-template-columns: repeat(4, 1fr);
  padding: 0 8px;
}

.circle-bottom-nav__inner {
  grid-template-columns: repeat(4, 1fr) !important;
  padding: 0 8px !important;
}

.circle-bottom-nav .bottom-nav__link {
  padding: 8px 6px;
  font-size: 0.625rem;
}

/* Centered storyboard header */
.circle-app-header {
  text-align: center;
  border-bottom: none;
  background: transparent;
}

.circle-app-header__inner {
  flex-direction: column;
  align-items: center;
  padding: 12px 16px 4px !important;
}

.circle-brand-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  position: relative;
}

.circle-brand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: inherit;
}

.circle-brand__name {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.circle-brand__key {
  font-size: 0.85rem;
  filter: sepia(0.35) saturate(1.4);
}

.circle-app-header .circle-salon__lock {
  position: absolute;
  right: 0;
}

.circle-salon__hero {
  text-align: center;
}

.circle-salon__title {
  display: inline-block;
}

.circle-salon__subtitle {
  margin-left: auto;
  margin-right: auto;
}

/* The Hall — larger salon cards */
body.skin-circle .circle-hall-card .night-market-card__media {
  aspect-ratio: 4 / 5;
}

body.skin-circle .circle-hall-aisles .night-market-aisle__item {
  flex: 0 0 min(56vw, 200px);
}

/* Board page — full polaroid pieces */
.circle-polaroids--board-page {
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 480px) {
  .circle-polaroids--board-page {
    grid-template-columns: repeat(2, 1fr);
  }
}

.circle-polaroid--piece {
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  text-align: center;
  width: 100%;
}

.circle-polaroid--piece .circle-polaroid__frame img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.circle-boards-empty-inline {
  grid-column: 1 / -1;
  text-align: center;
  padding: 24px;
  color: var(--shell-text-muted);
}

.circle-knock--membership {
  padding: 0 0 20px;
}

.circle-knock--membership .circle-knock__card {
  margin-bottom: 0;
}

.circle-membership__hero {
  text-align: center;
}

.circle-membership__hall-hint {
  text-align: center;
  margin-top: 20px;
}

.circle-membership__hall-hint a {
  color: var(--shell-accent);
  font-weight: 600;
}

.circle-knock__hall-hint a {
  color: var(--shell-accent);
  font-weight: 600;
  text-decoration: underline;
}

.circle-boards-empty {
  padding: 28px 20px;
  text-align: center;
  background: var(--shell-bg-elevated);
  border-radius: var(--radius-lg);
  border: 1px solid var(--shell-border);
}

.circle-boards-empty p {
  margin: 0 0 14px;
  color: var(--shell-text-secondary);
  font-size: 0.9375rem;
  line-height: 1.5;
}

/* ==========================================================================
   Night Market skin (storyboard 08 + Agent 4 studio)
   ========================================================================== */

body.skin-night-market {
  --shell-bg: #F8F4ED;
  --shell-bg-elevated: #FFFBF8;
  --shell-bg-muted: #EDE7DC;
  --shell-accent: #B8A88A;
  --shell-accent-hover: #A69578;
  --shell-accent-muted: rgba(184, 168, 138, 0.2);
  --shell-text: #2A2220;
  --shell-text-secondary: #5C534C;
  --shell-text-muted: #8A8076;
  --shell-border: rgba(42, 34, 32, 0.09);
  --shell-border-strong: rgba(42, 34, 32, 0.16);
  --shell-shadow: 0 2px 14px rgba(42, 34, 32, 0.07);
  --shell-shadow-lg: 0 10px 36px rgba(42, 34, 32, 0.1);
  --nm-maroon: #6B2D3E;
  --nm-gold: #C4A574;
  background:
    radial-gradient(ellipse 100% 60% at 50% -10%, rgba(237, 231, 220, 0.9) 0%, transparent 55%),
    var(--shell-bg);
  color: var(--shell-text);
}

body.skin-night-market .app-header {
  background: rgba(248, 244, 237, 0.94);
  border-bottom-color: var(--shell-border);
}

body.skin-night-market .app-logo span,
body.skin-night-market .nm-logo__moon {
  color: var(--nm-gold);
}

body.skin-night-market .bottom-nav {
  background: rgba(248, 244, 237, 0.96);
  border-top-color: var(--shell-border);
}

body.skin-night-market .bottom-nav__link.is-active {
  color: var(--nm-maroon);
}

body.skin-night-market .bottom-nav__studio-btn {
  background: linear-gradient(145deg, #5A3548 0%, #3D2430 100%);
  box-shadow: 0 0 0 3px rgba(184, 168, 138, 0.35), 0 4px 20px rgba(42, 34, 32, 0.18);
}

.nm-bottom-nav__inner {
  grid-template-columns: repeat(4, 1fr) !important;
  padding: 0 8px !important;
}

.nm-bottom-nav .bottom-nav__link {
  padding: 8px 6px;
  font-size: 0.625rem;
}

/* Celestial decorations */
.nm-celestial {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  color: var(--nm-gold);
}

.nm-celestial__moon {
  position: absolute;
  top: 8%;
  right: -2%;
  width: 140px;
  height: 140px;
  opacity: 0.2;
}

.nm-celestial__star {
  position: absolute;
  opacity: 0.28;
}

.nm-celestial__star--1 { top: 14%; right: 18%; width: 16px; height: 16px; }
.nm-celestial__star--2 { bottom: 28%; left: 8%; width: 12px; height: 12px; opacity: 0.2; }

/* Header */
.nm-header__inner {
  align-items: flex-start !important;
  padding-bottom: 10px !important;
}

.nm-logo {
  text-decoration: none;
  color: inherit;
}

.nm-logo__text {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.nm-eyebrow {
  margin: 6px 0 0;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--shell-text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
}

.nm-page-title {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 5vw, 1.85rem);
  font-weight: 500;
  line-height: 1.15;
  margin: 4px 0 0;
  color: var(--shell-text);
}

.nm-page-title__rule {
  display: block;
  width: 48px;
  height: 1px;
  margin-top: 8px;
  background: linear-gradient(90deg, var(--nm-gold), transparent);
}

.nm-section-eyebrow {
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--shell-text-muted);
  margin: 0 0 4px;
}

.nm-guest-banner {
  border-color: rgba(184, 168, 138, 0.3);
  background: var(--shell-bg-elevated);
}

.nm-contest-pill::before {
  background: linear-gradient(135deg, var(--nm-maroon) 0%, #8B4A58 100%);
}

.nm-contest-pill .contest-pill__badge {
  background: var(--nm-maroon);
}

/* Larger aisle cards — full jewelry images */
body.skin-night-market .night-market-aisle__title {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  color: var(--shell-text);
  position: relative;
  display: inline-block;
}

body.skin-night-market .night-market-aisle__title::after {
  content: "";
  display: block;
  width: 100%;
  height: 1px;
  margin-top: 6px;
  background: linear-gradient(90deg, var(--nm-gold), transparent);
  opacity: 0.65;
}

body.skin-night-market .night-market-aisle__item {
  flex: 0 0 min(56vw, 200px);
}

@media (min-width: 480px) {
  body.skin-night-market .night-market-aisle__item {
    flex-basis: 220px;
  }
}

body.skin-night-market .night-market-card__media {
  aspect-ratio: 4 / 5;
}

body.skin-night-market .night-market-card__image {
  object-fit: cover;
}

body.skin-night-market .night-market-card__badge--contest {
  background: var(--shell-text);
  color: var(--shell-bg-elevated);
}

body.skin-night-market .night-market-card__trust {
  color: var(--nm-gold);
}

/* Featured drop card */
.nm-featured-drop {
  margin-top: 8px;
}

.nm-featured-drop__card {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 0;
  background: var(--shell-bg-elevated);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--shell-border);
  box-shadow: var(--shell-shadow-lg);
  cursor: pointer;
  text-align: left;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nm-featured-drop__card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(42, 34, 32, 0.12);
}

.nm-featured-drop__media {
  position: relative;
  background: #1A1814;
  min-height: 200px;
}

.nm-featured-drop__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  min-height: 200px;
}

.nm-featured-drop__body {
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nm-featured-drop__tag {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--nm-gold);
}

.nm-featured-drop__title {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 500;
  margin: 0;
}

.nm-featured-drop__byline,
.nm-featured-drop__trust {
  font-size: 0.75rem;
  color: var(--shell-text-muted);
  margin: 0;
}

.nm-featured-drop__actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
  padding-top: 8px;
}

.nm-btn {
  flex: 1;
  text-align: center;
  padding: 10px 8px;
  border-radius: var(--radius-md);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.nm-btn--remix {
  background: linear-gradient(180deg, #EDE7DC 0%, #D9CDB8 100%);
  color: var(--shell-text);
  border: 1px solid rgba(184, 168, 138, 0.4);
}

.nm-btn--vote {
  background: var(--nm-maroon);
  color: #FFFBF8;
}

/* Full-bleed board grid */
.nm-board-full {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 8px;
}

.nm-board-full__card {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: var(--shell-bg-elevated);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-align: left;
  cursor: pointer;
  color: inherit;
  box-shadow: var(--shell-shadow);
  border: 1px solid var(--shell-border);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nm-board-full__card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shell-shadow-lg);
}

.nm-board-full__media {
  width: 100%;
  aspect-ratio: 4 / 5;
  background: #1A1814;
  overflow: hidden;
}

.nm-board-full__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.nm-board-full__meta {
  padding: 14px 16px 16px;
}

.nm-board-full__title {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 500;
  margin: 0 0 4px;
}

.nm-board-full__author {
  font-size: 0.8125rem;
  color: var(--shell-text-muted);
  margin: 0;
}

.nm-board-full__empty {
  text-align: center;
  padding: 32px 16px;
  color: var(--shell-text-muted);
}

/* Studio page — dark hero in cream shell */
body.skin-night-market--studio .app-main {
  padding-top: 0;
}

.nm-studio-hero {
  position: relative;
  margin: 0 -16px 24px;
  padding: 20px 16px 24px;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(123, 94, 167, 0.18) 0%, transparent 70%),
    linear-gradient(165deg, #1A1520 0%, #141118 45%, #0F0D12 100%);
  border-bottom: 1px solid rgba(245, 243, 240, 0.08);
  overflow: hidden;
}

.nm-studio-hero__glow {
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 70px;
  background: radial-gradient(ellipse, rgba(123, 94, 167, 0.4) 0%, transparent 70%);
  filter: blur(18px);
  pointer-events: none;
}

.nm-studio-hero__label {
  position: relative;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(245, 243, 240, 0.55);
  margin-bottom: 8px;
}

.nm-studio-hero__title {
  position: relative;
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 500;
  font-style: italic;
  color: #F5F3F0;
  margin: 0 0 16px;
}

.nm-studio-grok {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.nm-studio-textarea {
  background: rgba(30, 26, 36, 0.9) !important;
  border-color: rgba(245, 243, 240, 0.12) !important;
  color: #F5F3F0 !important;
  border-radius: var(--radius-md) !important;
}

.nm-studio-textarea::placeholder {
  color: rgba(245, 243, 240, 0.38);
}

.nm-studio-chips .studio-style-chip {
  background: rgba(30, 26, 36, 0.7);
  border-color: rgba(245, 243, 240, 0.12);
  color: rgba(245, 243, 240, 0.75);
}

.nm-studio-chips .studio-style-chip.is-active {
  border-color: var(--nm-gold);
  color: #F5F3F0;
}

.nm-studio-generate {
  background: linear-gradient(180deg, #E8DFC8 0%, var(--nm-gold) 100%) !important;
  color: var(--shell-text) !important;
  font-weight: 700 !important;
  border: none !important;
}

.nm-studio-preview__frame {
  border-radius: var(--radius-lg);
  border: 1px solid rgba(245, 243, 240, 0.1);
  background: rgba(20, 17, 24, 0.85);
  min-height: 220px;
}

.nm-studio-preview .studio-grok-preview__img {
  object-fit: contain;
  max-height: 280px;
}

.nm-studio-refine,
.nm-studio-actions {
  color: #F5F3F0;
}

.nm-studio-floor {
  position: relative;
  z-index: 1;
  margin-bottom: 16px;
}

.nm-invite-board {
  position: relative;
  z-index: 1;
}

.nm-board-preview {
  display: block;
  padding: 14px 16px;
  margin-bottom: 10px;
  background: var(--shell-bg-elevated);
  border-radius: var(--radius-md);
  border: 1px solid var(--shell-border);
  text-decoration: none;
  color: inherit;
}

.nm-board-preview__title {
  font-family: var(--font-serif);
  font-size: 1rem;
  margin: 0 0 4px;
}

.nm-board-preview__count {
  font-size: 0.75rem;
  color: var(--shell-text-muted);
  margin: 0;
}

/* ==========================================================================
   Agent 5 circle checkout
   ========================================================================== */

/* Studio — circle brand header on dark atelier skin */
body.skin-studio .studio-circle-header {
  background: rgba(15, 14, 18, 0.92);
  border-bottom-color: var(--studio-border);
}

body.skin-studio .studio-circle-header__inner {
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 16px 10px !important;
}

body.skin-studio .studio-circle-header__brand-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  position: relative;
}

body.skin-studio .studio-circle-header__brand-row .btn--ghost {
  position: absolute;
  right: 0;
}

body.skin-studio .studio-circle-header__title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 500;
  font-style: italic;
  color: var(--studio-text);
  letter-spacing: 0.02em;
}

body.skin-studio .studio-circle-header__actions {
  display: flex;
  justify-content: center;
  width: 100%;
}

body.skin-studio .circle-bottom-nav {
  background: rgba(22, 20, 26, 0.96);
  border-top-color: var(--studio-border);
}

body.skin-studio .circle-bottom-nav .bottom-nav__link.is-active {
  color: var(--studio-accent);
}

body.skin-studio .circle-bottom-nav .bottom-nav__link {
  color: var(--studio-text-muted);
}

/* Get ring — Circle checkout */
.circle-get-ring {
  max-width: 480px;
  margin: 0 auto;
}

.circle-get-ring__hero {
  display: grid;
  gap: 16px;
  margin-bottom: 24px;
}

.circle-get-ring__preview {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--shell-bg-muted);
  aspect-ratio: 4 / 5;
  border: 1px solid var(--shell-border);
  box-shadow: var(--shell-shadow);
}

.circle-get-ring__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.circle-get-ring__eyebrow {
  margin-bottom: 4px;
}

.circle-get-ring__title {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 5vw, 1.85rem);
  font-weight: 500;
  margin: 4px 0 6px;
  color: var(--shell-text);
}

.circle-get-ring__byline a {
  color: var(--shell-accent);
}

.circle-get-ring__banner {
  padding: 14px 16px;
  margin-bottom: 20px;
  border-radius: var(--radius-md);
  background: var(--shell-accent-muted);
  border: 1px solid rgba(201, 107, 122, 0.28);
  color: var(--shell-text-secondary);
  font-size: 0.9375rem;
  text-align: center;
}

.circle-get-ring__section {
  margin-bottom: 24px;
}

.circle-get-ring__section-hint {
  margin: 4px 0 14px;
}

.circle-get-ring__specs {
  display: grid;
  gap: 14px;
}

.circle-get-ring__products {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.circle-get-ring__product {
  display: block;
  cursor: pointer;
}

.circle-get-ring__product input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.circle-get-ring__product-body {
  display: grid;
  gap: 4px;
  padding: 16px;
  border: 1px solid var(--shell-border-strong);
  border-radius: var(--radius-md);
  background: var(--shell-bg-elevated);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.circle-get-ring__product input:checked + .circle-get-ring__product-body {
  border-color: var(--shell-accent);
  box-shadow: 0 0 0 1px var(--shell-accent);
}

.circle-get-ring__product-body .get-ring__product-name {
  font-weight: 600;
  color: var(--shell-text);
}

.circle-get-ring__product-body .get-ring__product-desc {
  font-size: 0.875rem;
  color: var(--shell-text-muted);
}

.circle-get-ring__product-body .get-ring__product-price {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--shell-accent-hover);
}

.circle-get-ring__rush {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  font-size: 0.9375rem;
  color: var(--shell-text-secondary);
}

.circle-get-ring__rush input {
  accent-color: var(--shell-accent);
}

.circle-get-ring__summary {
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: var(--shell-bg-elevated);
  border: 1px solid var(--shell-border);
  margin-bottom: 16px;
  box-shadow: var(--shell-shadow);
}

.circle-get-ring__summary-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 1.125rem;
  color: var(--shell-text);
}

.circle-get-ring__summary-row strong {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--shell-accent-hover);
}

.circle-get-ring__checkout-hint {
  margin: 8px 0 0;
}

.circle-get-ring__footnote {
  margin-bottom: 12px;
}

.circle-get-ring__submit {
  margin-top: 4px;
}

body.skin-circle .circle-get-ring .form-input,
body.skin-circle .circle-get-ring .form-select {
  background: var(--shell-bg-elevated);
  border-color: var(--shell-border-strong);
  color: var(--shell-text);
}

body.skin-circle .circle-get-ring .form-label {
  color: var(--shell-text-secondary);
}

/* Order status — Circle tracking */
.circle-order-status {
  max-width: 480px;
  margin: 0 auto;
}

.circle-order-status__header {
  margin-bottom: 20px;
}

.circle-order-status__title {
  font-family: var(--font-serif);
  font-size: clamp(1.35rem, 4.5vw, 1.65rem);
  font-weight: 500;
  margin: 4px 0 8px;
  color: var(--shell-text);
  word-break: break-all;
}

.circle-order-status__specs {
  margin: 0;
}

.circle-order-status__card {
  text-align: center;
  padding: 28px 20px;
  border-radius: var(--radius-lg);
  background: var(--shell-bg-elevated);
  border: 1px solid var(--shell-border);
  margin-bottom: 16px;
  box-shadow: var(--shell-shadow);
}

.circle-order-status__icon {
  font-size: 2.5rem;
  margin-bottom: 8px;
}

.circle-order-status__label {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--shell-text);
}

.circle-order-status__detail {
  margin: 0;
}

.circle-order-status__progress {
  height: 8px;
  background: var(--shell-bg-muted);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 20px;
}

.circle-order-status__progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--shell-accent) 0%, #E8B4B8 100%);
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}

.circle-order-status__access {
  margin-bottom: 20px;
}

.circle-order-status__code {
  font-family: ui-monospace, monospace;
  font-size: 1.25rem;
  letter-spacing: 0.08em;
  padding: 14px;
  border-radius: var(--radius-md);
  background: var(--shell-accent-muted);
  border: 1px solid rgba(201, 107, 122, 0.22);
  text-align: center;
  margin: 8px 0;
  color: var(--shell-text);
}

.circle-order-status__download {
  margin-top: 20px;
}

.circle-order-status__refresh {
  margin-top: 12px;
}

/* ==========================================================================
   Agent 3 circle contests
   ========================================================================== */

body.skin-circle .circle-contests-page,
body.skin-circle .circle-contest-detail {
  padding-bottom: 8px;
}

body.skin-circle .circle-contests-page__hero {
  text-align: center;
  margin-bottom: 24px;
}

body.skin-circle .circle-contests-page__demo-hint {
  margin: 12px auto 0;
  max-width: 22rem;
  font-size: 0.8125rem;
  color: var(--shell-text-muted);
  line-height: 1.5;
}

body.skin-circle .circle-contests-page__list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

body.skin-circle .circle-contest-card {
  background: var(--shell-bg-elevated);
  border: 1px solid var(--shell-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shell-shadow);
  overflow: hidden;
}

body.skin-circle .circle-contest-card__media {
  margin: 0;
}

body.skin-circle .circle-contest-card__image {
  display: block;
  width: 100%;
  height: 168px;
  object-fit: cover;
}

body.skin-circle .circle-contest-card__body {
  padding: 20px 18px 22px;
}

body.skin-circle .circle-contest-card__meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

body.skin-circle .circle-contest-card__number {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--shell-accent);
}

body.skin-circle .circle-contest-card__title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--shell-text);
  margin: 0 0 8px;
  line-height: 1.2;
}

body.skin-circle .circle-contest-card__desc {
  font-size: 0.9375rem;
  color: var(--shell-text-secondary);
  line-height: 1.5;
  margin: 0 0 12px;
}

body.skin-circle .circle-contest-card__prize {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--shell-accent);
  margin: 0 0 14px;
}

body.skin-circle .circle-contest-card__stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 0 0 16px;
}

body.skin-circle .circle-contest-card__stats div {
  text-align: center;
  padding: 10px 8px;
  background: var(--shell-bg-muted);
  border-radius: var(--radius-md);
  border: 1px solid var(--shell-border);
}

body.skin-circle .circle-contest-card__stats dt {
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--shell-text-muted);
  margin: 0 0 2px;
}

body.skin-circle .circle-contest-card__stats dd {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--shell-text);
}

body.skin-circle .circle-contest-card__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

body.skin-circle .circle-contests-page__empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--shell-text-muted);
  font-size: 0.9375rem;
  background: var(--shell-bg-elevated);
  border: 1px dashed var(--shell-border-strong);
  border-radius: var(--radius-lg);
}

/* Contest detail */

body.skin-circle .circle-contest-detail__hero {
  text-align: center;
  padding: 0 0 8px;
  margin-bottom: 20px;
}

body.skin-circle .circle-contest-detail__media {
  margin: -4px -4px 16px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--shell-border);
  box-shadow: var(--shell-shadow);
}

body.skin-circle .circle-contest-detail__image {
  display: block;
  width: 100%;
  height: 180px;
  object-fit: cover;
}

body.skin-circle .circle-contest-detail__number {
  display: inline-block;
  padding: 5px 12px;
  margin-bottom: 10px;
  background: var(--shell-accent-muted);
  color: var(--shell-accent);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: var(--radius-full);
}

body.skin-circle .circle-contest-detail__title {
  display: inline-block;
  margin-bottom: 10px;
}

body.skin-circle .circle-contest-detail__desc {
  font-size: 0.9375rem;
  color: var(--shell-text-secondary);
  max-width: 24rem;
  margin: 0 auto 12px;
  line-height: 1.55;
}

body.skin-circle .circle-contest-detail__prize {
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--shell-accent);
  margin: 0 0 12px;
}

body.skin-circle .circle-contest-detail__phase {
  display: inline-block;
}

body.skin-circle .circle-contest-detail__stats {
  margin-bottom: 20px;
}

body.skin-circle .circle-contest-detail__stat {
  background: var(--shell-bg-elevated);
  border-color: var(--shell-border);
}

body.skin-circle .circle-contest-detail__stat .contest-stat__value {
  color: var(--shell-text);
}

body.skin-circle .circle-contest-detail__stat .contest-stat__label {
  color: var(--shell-text-muted);
}

body.skin-circle .circle-contest-detail__status {
  background: var(--shell-bg-elevated);
  border-color: var(--shell-border);
  box-shadow: var(--shell-shadow);
}

body.skin-circle .vote-status--voted.circle-contest-detail__status {
  border-color: rgba(201, 107, 122, 0.28);
  background: linear-gradient(165deg, rgba(255, 251, 248, 0.98) 0%, rgba(245, 230, 232, 0.55) 100%);
}

body.skin-circle .circle-contest-detail__section-head {
  margin-bottom: 14px;
}

body.skin-circle .circle-contest-detail__section-copy {
  margin: 4px 0 0;
  font-size: 0.875rem;
  color: var(--shell-text-muted);
  line-height: 1.45;
}

body.skin-circle .circle-contest-detail__signin {
  background: var(--shell-bg-elevated);
  border-color: var(--shell-border);
}

body.skin-circle .circle-contest-detail__own-note {
  background: var(--shell-bg-elevated);
  border-left-color: var(--shell-accent);
  color: var(--shell-text-secondary);
}

body.skin-circle .circle-contest-detail__grid {
  gap: 14px;
}

body.skin-circle .circle-contest-detail__entry {
  background: var(--shell-bg-elevated);
  border: 1px solid var(--shell-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shell-shadow);
  overflow: hidden;
}

body.skin-circle .circle-contest-detail__entry .feed-card__title {
  font-family: var(--font-serif);
  font-size: 1rem;
  color: var(--shell-text);
}

body.skin-circle .circle-contest-detail__entry .feed-card__author-link {
  color: var(--shell-accent);
}

body.skin-circle .circle-contest-detail__entry .feed-card__vote-count {
  color: var(--shell-text-muted);
}

body.skin-circle .circle-contest-detail__cta {
  text-align: center;
  margin: 8px 0 24px;
}

body.skin-circle .circle-contest-detail__leaderboard-list {
  list-style: none;
  padding: 16px;
  margin: 0;
  background: var(--shell-bg-elevated);
  border: 1px solid var(--shell-border);
  border-radius: var(--radius-lg);
}

body.skin-circle .circle-contest-detail__leaderboard-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--shell-border);
  font-size: 0.875rem;
  color: var(--shell-text-secondary);
}

body.skin-circle .circle-contest-detail__leaderboard-list li::before {
  display: none;
}

body.skin-circle .circle-contest-detail__leaderboard-list li:last-child {
  border-bottom: none;
}

body.skin-circle .circle-contest-detail__rank {
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--shell-accent);
  background: var(--shell-accent-muted);
  border-radius: var(--radius-full);
}

body.skin-circle .circle-contest-detail__leaderboard-body strong {
  color: var(--shell-text);
}

body.skin-circle .circle-contest-detail__leaderboard-empty {
  justify-content: center;
  font-style: italic;
  color: var(--shell-text-muted);
}

body.skin-circle .circle-contest-pill {
  text-decoration: none;
  color: inherit;
}

body.skin-circle .circle-contest-pill:hover {
  color: inherit;
}

@media (min-width: 640px) {
  body.skin-circle .circle-contest-detail__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  body.skin-circle .circle-contest-detail__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Agent 4 circle auth */

body.skin-circle .circle-auth-main {
  display: flex;
  flex-direction: column;
  min-height: calc(100dvh - var(--app-header-height, 56px));
}

body.skin-circle .circle-auth-page {
  flex: 1;
  min-height: auto;
  padding: 20px 16px 32px;
  background: transparent;
}

body.skin-circle .circle-auth-card {
  max-width: 420px;
  background:
    radial-gradient(ellipse 100% 80% at 50% 0%, rgba(255, 251, 248, 0.95) 0%, transparent 55%),
    linear-gradient(165deg, #FFFBF8 0%, #F8ECEF 100%);
  border: 1px solid rgba(201, 107, 122, 0.18);
  box-shadow: var(--shell-shadow-lg);
}

body.skin-circle .circle-auth-knock {
  text-align: center;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--shell-border);
}

body.skin-circle .circle-auth-knock__bell {
  display: block;
  font-size: 1.5rem;
  margin-bottom: 10px;
  filter: sepia(0.25) saturate(1.3);
}

body.skin-circle .circle-auth-knock__title {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 5vw, 1.875rem);
  font-weight: 500;
  color: #B86B7A;
  margin: 0 0 6px;
  letter-spacing: 0.03em;
}

body.skin-circle .circle-auth-knock__subtitle {
  margin: 0;
  font-size: 0.875rem;
  color: var(--shell-text-muted);
  letter-spacing: 0.04em;
}

body.skin-circle .circle-auth-card .form-input {
  background: rgba(255, 251, 248, 0.9);
  border-color: rgba(201, 107, 122, 0.22);
}

body.skin-circle .circle-auth-card .form-input:focus {
  border-color: var(--shell-accent);
  box-shadow: 0 0 0 3px var(--shell-accent-muted);
}

body.skin-circle .circle-auth-demo {
  background: rgba(245, 230, 232, 0.45);
  border-color: rgba(201, 107, 122, 0.28);
}

body.skin-circle .circle-auth-demo .demo-account-card {
  background: rgba(255, 251, 248, 0.92);
  border-color: rgba(201, 107, 122, 0.2);
}

body.skin-circle .circle-auth-demo .demo-account-card:hover,
body.skin-circle .circle-auth-demo .demo-account-card.is-selected {
  border-color: var(--shell-accent);
  background: rgba(255, 251, 248, 1);
  box-shadow: 0 0 0 2px var(--shell-accent-muted);
}

body.skin-circle .circle-auth-demo .demo-account-card__role {
  color: var(--shell-accent);
}

body.skin-circle .circle-auth-card .auth-footer {
  border-top-color: rgba(201, 107, 122, 0.16);
}

body.skin-circle .circle-auth-card .auth-footer a {
  color: var(--shell-accent);
}

/* Agent 2 circle profile */

body.skin-circle .circle-profile-page {
  max-width: 640px;
  margin: 0 auto;
  padding-bottom: 8px;
}

body.skin-circle .circle-profile__hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  margin-bottom: 20px;
}

body.skin-circle .circle-profile__avatar .user-avatar,
body.skin-circle .circle-profile__avatar .user-avatar-fallback--lg {
  width: 88px;
  height: 88px;
  box-shadow: var(--shell-shadow-lg);
  border: 3px solid rgba(255, 251, 248, 0.95);
}

body.skin-circle .circle-profile__identity {
  width: 100%;
}

body.skin-circle .circle-profile__identity .circle-salon__title {
  margin-bottom: 8px;
}

body.skin-circle .circle-profile__handle {
  margin: 0 0 10px;
  font-size: 0.9375rem;
  color: var(--shell-text-secondary);
}

body.skin-circle .circle-profile__patron-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 3px 10px;
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #FFFBF8;
  background: linear-gradient(135deg, #C96B7A 0%, #A85565 100%);
  border-radius: var(--radius-full);
  vertical-align: middle;
}

body.skin-circle .circle-profile__actions {
  margin: 0 0 8px;
}

body.skin-circle .circle-profile__note,
body.skin-circle .circle-profile__bio {
  margin: 0 0 8px;
  font-size: 0.875rem;
  color: var(--shell-text-muted);
  line-height: 1.5;
}

body.skin-circle .circle-profile__bio {
  color: var(--shell-text-secondary);
  max-width: 28rem;
  margin-left: auto;
  margin-right: auto;
}

body.skin-circle .circle-profile__stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
  padding: 14px 12px;
  background: var(--shell-bg-elevated);
  border: 1px solid var(--shell-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shell-shadow);
}

body.skin-circle .circle-profile__stat {
  text-align: center;
}

body.skin-circle .circle-profile__stat-value {
  font-family: var(--font-serif);
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--shell-accent);
  line-height: 1.1;
}

body.skin-circle .circle-profile__stat-label {
  margin-top: 4px;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--shell-text-muted);
}

body.skin-circle .circle-profile__section-label {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 500;
  color: var(--shell-text);
  margin: 0 0 8px;
}

body.skin-circle .circle-profile__avatar-upload {
  margin-bottom: 20px;
  padding: 18px 16px;
  background: var(--shell-bg-elevated);
  border: 1px solid var(--shell-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shell-shadow);
}

body.skin-circle .circle-profile__upload-rules {
  margin: 0 0 14px;
  font-size: 0.8125rem;
  color: var(--shell-text-muted);
  line-height: 1.55;
}

body.skin-circle .circle-profile__upload-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

body.skin-circle .circle-profile__upload-status {
  margin: 12px 0 0;
  font-size: 0.8125rem;
  color: var(--shell-accent);
}

body.skin-circle .circle-profile__guest-note {
  text-align: center;
  margin: 0 0 16px;
  font-size: 0.875rem;
  color: var(--shell-text-muted);
}

body.skin-circle .circle-profile__guest-note a {
  color: var(--shell-accent);
}

body.skin-circle .circle-profile__panels {
  margin-top: 4px;
}

body.skin-circle .circle-profile__tabs {
  margin-bottom: 18px;
}

body.skin-circle .circle-profile__tab-panel {
  margin-top: 4px;
}

body.skin-circle .circle-profile__tab-panel .circle-polaroids--board-page {
  margin-top: 0;
}

body.skin-circle .circle-polaroid.is-highlighted .circle-polaroid__frame {
  outline: 3px solid var(--shell-accent);
  outline-offset: 3px;
  box-shadow: 0 8px 28px rgba(201, 107, 122, 0.28);
}

body.skin-circle .circle-profile__saved-grid {
  gap: 10px;
}

body.skin-circle .circle-profile__saved-grid .profile-board-cell {
  border-radius: var(--radius-md);
  border: 1px solid var(--shell-border);
  box-shadow: var(--shell-shadow);
  overflow: hidden;
}

body.skin-circle .circle-profile__saved-grid .profile-board-cell.is-highlighted {
  outline: 3px solid var(--shell-accent);
  outline-offset: 2px;
}

body.skin-circle .circle-profile__empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 28px 16px;
  font-size: 0.875rem;
  color: var(--shell-text-muted);
  line-height: 1.55;
  list-style: none;
}

body.skin-circle .circle-profile__empty a {
  color: var(--shell-accent);
}

body.skin-circle .circle-profile__invite-boards {
  padding-top: 4px;
}

body.skin-circle .circle-profile__invite-create {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

body.skin-circle .circle-profile__invite-create .form-input {
  flex: 1;
  background: rgba(255, 251, 248, 0.92);
  border-color: rgba(201, 107, 122, 0.2);
}

body.skin-circle .circle-profile__invite-list {
  list-style: none;
  padding: 0;
  margin: 0;
  background: var(--shell-bg-elevated);
  border: 1px solid var(--shell-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shell-shadow);
}

body.skin-circle .circle-profile__invite-item {
  border-bottom: 1px solid var(--shell-border);
}

body.skin-circle .circle-profile__invite-item:last-child {
  border-bottom: none;
}

body.skin-circle .circle-profile__invite-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  color: inherit;
  text-decoration: none;
  transition: background var(--transition-fast);
}

body.skin-circle .circle-profile__invite-link:hover {
  background: var(--shell-accent-muted);
}

body.skin-circle .circle-profile__invite-link strong {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 500;
  color: var(--shell-text);
}

body.skin-circle .circle-profile__invite-link span {
  flex-shrink: 0;
  font-size: 0.75rem;
  color: var(--shell-text-muted);
}

body.skin-circle .circle-profile__patron-upsell {
  padding: 24px 18px;
  text-align: center;
  background:
    radial-gradient(ellipse 90% 70% at 50% 100%, rgba(245, 230, 232, 0.5) 0%, transparent 70%),
    var(--shell-bg-elevated);
  border: 1px dashed rgba(201, 107, 122, 0.35);
  border-radius: var(--radius-lg);
}

body.skin-circle .circle-invite-board .invite-board-header__meta {
  justify-content: center;
}

body.skin-circle .circle-invite-board .circle-polaroids--board-page {
  margin-top: 8px;
}

@media (min-width: 480px) {
  body.skin-circle .circle-profile__hero {
    flex-direction: row;
    text-align: left;
    align-items: flex-start;
  }

  body.skin-circle .circle-profile__identity .circle-salon__title {
    display: block;
  }

  body.skin-circle .circle-profile__bio {
    margin-left: 0;
    margin-right: 0;
  }
}

/* salon concierge */

.salon-concierge {
  display: none;
}

body.skin-circle .salon-concierge {
  display: block;
  position: fixed;
  right: 16px;
  bottom: calc(var(--nav-height) + var(--safe-bottom) + 12px);
  z-index: 150;
  font-family: var(--font-sans);
}

.salon-concierge__toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px 10px 12px;
  border: 1px solid rgba(201, 107, 122, 0.35);
  border-radius: var(--radius-full);
  background:
    linear-gradient(145deg, #FFFBF8 0%, #F5E6E8 100%);
  color: var(--shell-text);
  box-shadow: var(--shell-shadow-lg);
  cursor: pointer;
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast),
    border-color var(--transition-fast);
}

.salon-concierge__toggle:hover,
.salon-concierge.is-open .salon-concierge__toggle {
  border-color: rgba(168, 85, 101, 0.55);
  box-shadow: 0 12px 32px rgba(61, 44, 46, 0.14);
}

.salon-concierge__toggle-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #C96B7A 0%, #A85565 100%);
  color: #FFFBF8;
  font-size: 0.85rem;
}

.salon-concierge__toggle-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #5C3D42;
}

.salon-concierge__panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  width: min(92vw, 340px);
  max-height: min(62vh, 480px);
  display: flex;
  flex-direction: column;
  background: var(--shell-bg-elevated);
  border: 1px solid rgba(201, 107, 122, 0.28);
  border-radius: var(--radius-lg);
  box-shadow: var(--shell-shadow-lg);
  overflow: hidden;
}

.salon-concierge__panel[hidden] {
  display: none !important;
}

.salon-concierge__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px 12px;
  background:
    radial-gradient(ellipse 120% 80% at 100% 0%, rgba(245, 230, 232, 0.7) 0%, transparent 55%),
    #FFFBF8;
  border-bottom: 1px solid var(--shell-border);
}

.salon-concierge__eyebrow {
  margin: 0;
  font-size: 0.625rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--shell-text-muted);
}

.salon-concierge__title {
  margin: 2px 0 0;
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 500;
  color: #5C3D42;
}

.salon-concierge__close {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: var(--radius-full);
  background: rgba(201, 107, 122, 0.12);
  color: #5C3D42;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.salon-concierge__close:hover {
  background: rgba(201, 107, 122, 0.22);
}

.salon-concierge__messages {
  flex: 1;
  min-height: 180px;
  max-height: 320px;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--shell-bg);
}

.salon-concierge__msg {
  max-width: 92%;
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 0.875rem;
  line-height: 1.45;
}

.salon-concierge__msg p {
  margin: 0;
}

.salon-concierge__msg--host {
  align-self: flex-start;
  background: #F5E6E8;
  color: var(--shell-text);
  border: 1px solid rgba(201, 107, 122, 0.18);
}

.salon-concierge__msg--guest {
  align-self: flex-end;
  background: linear-gradient(135deg, #C96B7A 0%, #A85565 100%);
  color: #FFFBF8;
}

.salon-concierge__form {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--shell-border);
  background: var(--shell-bg-elevated);
}

.salon-concierge__input {
  flex: 1;
  min-width: 0;
  margin: 0;
}

.salon-concierge__send {
  flex-shrink: 0;
  background: linear-gradient(135deg, #C96B7A 0%, #A85565 100%);
  border-color: transparent;
}

.salon-concierge.is-sending .salon-concierge__send {
  opacity: 0.7;
}

@media (min-width: 480px) {
  body.skin-circle .salon-concierge {
    right: max(16px, calc((100vw - var(--max-width)) / 2 + 16px));
  }
}

/* studio quota */

.studio-quota-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
  padding: 12px 16px;
  border-radius: var(--radius-lg);
  background: var(--studio-bg-elevated);
  border: 1px solid var(--studio-border-strong);
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--studio-text-secondary);
}

.studio-quota-bar__text {
  margin: 0;
  font-weight: 600;
  color: var(--studio-text);
  letter-spacing: 0.02em;
}

.studio-quota-bar__upsell {
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--studio-accent);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color var(--transition-fast);
}

.studio-quota-bar__upsell:hover {
  color: var(--studio-accent-hover);
  text-decoration: underline;
}

.studio-quota-bar--low {
  border-color: rgba(201, 167, 94, 0.45);
  background: linear-gradient(
    135deg,
    rgba(201, 167, 94, 0.12) 0%,
    var(--studio-bg-elevated) 100%
  );
}

.studio-quota-bar--low .studio-quota-bar__text {
  color: #E8D4A8;
}

.studio-quota-bar--blocked {
  border-color: rgba(201, 107, 122, 0.5);
  background: linear-gradient(
    135deg,
    rgba(201, 107, 122, 0.14) 0%,
    var(--studio-bg-elevated) 100%
  );
}

.studio-quota-bar--blocked .studio-quota-bar__text {
  color: #F0C4CB;
}

.studio-quota-bar__refine-hint {
  margin: 0;
  padding: 10px 14px;
  font-size: 0.8125rem;
  color: var(--studio-text-muted);
  background: var(--studio-bg-muted);
  border: 1px solid var(--studio-border);
  border-radius: var(--radius-md);
  text-align: center;
}

.studio-quota-bar__refine-hint a {
  color: var(--studio-accent);
  font-weight: 600;
}

/* --- Site footer & legal pages -------------------------------------------- */

.site-footer {
  margin-top: auto;
  padding: 1.25rem 1rem calc(1rem + var(--safe-bottom));
  text-align: center;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.site-footer__trust {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem 0.5rem;
  font-size: 0.6875rem;
  color: var(--text-muted);
  margin-bottom: 0.65rem;
}

.site-footer__lock {
  font-size: 0.75rem;
}

.site-footer__sep {
  opacity: 0.5;
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 1rem;
  margin-bottom: 0.5rem;
}

.site-footer__links a {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-decoration: none;
}

.site-footer__links a:hover {
  color: var(--text);
  text-decoration: underline;
}

.site-footer__copy {
  margin: 0;
  font-size: 0.6875rem;
  color: var(--text-muted);
}

.legal-doc {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem 1rem 2rem;
}

.legal-doc__header {
  margin-bottom: 1.5rem;
}

.legal-doc__eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.legal-doc__updated {
  margin: 0.5rem 0 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.legal-doc__section {
  margin-bottom: 1.25rem;
}

.legal-doc__section h2 {
  margin: 0 0 0.5rem;
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--text);
}

.legal-doc__section p {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.legal-doc__section a {
  color: var(--accent-hover);
}

.legal-doc__back {
  margin: 1.5rem 0 0;
  font-size: 0.8125rem;
}

.legal-doc__back a {
  color: var(--text-secondary);
}

.membership-legal-hint {
  margin: 1rem 0 0;
  max-width: 28rem;
  font-size: 0.6875rem;
  line-height: 1.5;
  color: var(--text-muted);
  text-align: center;
}

.membership-legal-hint a {
  color: var(--text-secondary);
  text-decoration: underline;
}

body.skin-circle .app-shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

body.skin-circle .app-main {
  flex: 1;
}