/*
 * Mistress BJQueen brand stylesheet for pages served outside the website (account and checkout).
 * Copied from mistressbjqueen-website: src/styles/tokens.css and the base, header, footer and form
 * sections of src/styles/site.css. Change the website first, then copy the change here.
 */
/*
 * Mistress BJQueen design system tokens (plum, the default theme).
 * Values come from the design system's tokens.json. Change them there first, then here.
 */
:root {
  color-scheme: dark;

  --plum-950: #130f17;
  --plum-900: #16131e;
  --plum-850: #18131e;
  --plum-800: #1b1720;
  --plum-700: #1e1928;
  --plum-600: #211b27;
  --plum-500: #262030;
  --plum-400: #2c2434;
  --plum-300: #3b3144;
  --plum-200: #a495ae;
  --plum-100: #cbbfd4;
  --plum-050: #f3edf7;

  --accent: #b06ad6;
  --accent-strong: #c180e5;
  --accent-rgb: 176, 106, 214;
  --accent-soft: rgba(176, 106, 214, 0.16);
  --accent-line: rgba(176, 106, 214, 0.12);
  --text-on-accent-solid: #130f17;

  --surface: #211b27;
  --surface-strong: #18131e;
  --surface-soft: #2c2434;
  --line: #3b3144;
  --text: #f3edf7;
  --muted: #cbbfd4;
  --muted-strong: #a495ae;
  --placeholder: #95869f;

  --danger: #f1b0c1;
  --danger-bg: #49202c;
  --success: #8bd48b;
  --success-bg: #1d3b2d;
  --info-ink: #b4c6f6;
  --info-bg: #1e2947;

  --tone-violet: 176, 106, 214;
  --tone-blue: 111, 152, 242;
  --tone-gold: 225, 170, 72;
  --tone-teal: 72, 186, 173;
  --tone-slate: 147, 160, 178;
  --tone-rose: 238, 142, 164;
  --tone-violet-ink: #f0def9;
  --tone-blue-ink: #dce6ff;
  --tone-gold-ink: #fff1ce;
  --tone-teal-ink: #d8fbf5;
  --tone-slate-ink: #eef1f6;
  --tone-rose-ink: #ffe4ea;

  --font-sans: 'Avenir Next', 'Segoe UI', sans-serif;

  --text-display: clamp(2.2rem, 5vw, 3.6rem);
  --text-hero: clamp(2rem, 4.4vw, 3rem);
  --text-title: clamp(1.2rem, 4vw, 1.85rem);
  --tracking-display: -0.05em;
  --tracking-hero: -0.03em;

  --radius-md: 11px;
  --radius-lg: 16px;
  --radius-2xl: 22px;
  --radius-3xl: 24px;
  --radius-4xl: 28px;
  --radius-pill: 999px;

  --tap-min: 44px;
  --tap-tall: 52px;
  --row-min: 62px;
  --width-site: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --measure: 34rem;

  --shadow-card: 0 20px 40px rgba(7, 4, 10, 0.34);
  --shadow-card-hover: 0 22px 44px rgba(7, 4, 10, 0.4);
  --shadow-group: 0 16px 34px rgba(7, 4, 10, 0.24);
  --shadow-cta: 0 12px 26px rgba(176, 106, 214, 0.26);
  --shadow-modal: 0 24px 60px rgba(0, 0, 0, 0.42);
  --focus-ring: 0 0 0 2px #18131e, 0 0 0 4px #c180e5;

  --ease: 160ms ease;

  /* Names the Mini App's guides.css and locktober.css use, mapped onto the design system. */
  --danger-rgb: 241, 176, 193;
  --success-rgb: 139, 212, 139;
  --text-on-accent: #ead8f7;
  --text-on-accent-rgb: 234, 216, 247;
  --accent-contrast: #130f17;
  --shell-panel-bg: var(--panel-bg);
  --shell-card-bg: var(--card-bg);
  /* Telegram safe areas do not exist on the website. */
  --tg-content-safe-area-inset-top: 0px;
  --tg-content-safe-area-inset-bottom: 0px;
  --tg-safe-area-inset-bottom: env(safe-area-inset-bottom, 0px);

  --canvas:
    radial-gradient(circle at top left, rgba(176, 106, 214, 0.12), transparent 38%),
    radial-gradient(circle at top right, rgba(193, 128, 229, 0.07), transparent 32%),
    linear-gradient(180deg, #16131e 0%, #1b1720 34%, #1e1928 56%, #262030 100%);
  --panel-bg:
    radial-gradient(circle at top left, rgba(176, 106, 214, 0.09), transparent 42%),
    linear-gradient(180deg, rgba(16, 13, 21, 0.99) 0%, rgba(24, 20, 32, 0.98) 32%, rgba(26, 22, 36, 0.97) 55%, rgba(32, 27, 42, 0.96) 100%);
  --card-bg: linear-gradient(180deg, rgba(16, 13, 21, 0.99) 0%, rgba(32, 27, 42, 0.96) 100%);
}

/* Site layout and components, built on the design system tokens. */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text);
  background: var(--plum-900);
  background-image: var(--canvas);
  background-attachment: fixed;
}

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

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

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

:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: 6px;
}

.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;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius-lg);
  background: var(--accent);
  color: var(--text-on-accent-solid);
  font-weight: 700;
}

.skip-link:focus {
  top: 12px;
}

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

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

.page {
  width: 100%;
  max-width: var(--width-site);
  margin: 0 auto;
  padding: 28px var(--gutter) 64px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  flex: 1;
}

.grid-auto {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--min, 220px)), 1fr));
  gap: 18px;
}

.grid-fit {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--min, 260px)), 1fr));
  gap: 18px;
}

/* ---------- Type ---------- */

.eyebrow {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--accent-strong);
}

.section-label {
  margin: 0;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--muted-strong);
}

.display {
  margin: 0;
  font-size: var(--text-display);
  line-height: 0.96;
  letter-spacing: var(--tracking-display);
  font-weight: 800;
}

.hero-title {
  margin: 0;
  font-size: var(--text-hero);
  line-height: 0.98;
  letter-spacing: var(--tracking-display);
  font-weight: 800;
}

.section-title {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: var(--tracking-hero);
}

.lead {
  margin: 0;
  max-width: var(--measure);
  color: var(--muted);
  font-size: 1.05rem;
}

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

.meta {
  color: var(--muted-strong);
  font-size: 0.86rem;
}

/* ---------- Surfaces ---------- */

.panel {
  border-radius: var(--radius-4xl);
  border: 1px solid var(--accent-line);
  background: var(--panel-bg);
  box-shadow: var(--shadow-card);
  padding: clamp(22px, 4vw, 44px);
}

.card {
  border-radius: var(--radius-3xl);
  border: 1px solid var(--line);
  background: var(--card-bg);
  box-shadow: var(--shadow-card);
  transition: transform var(--ease), border-color var(--ease), box-shadow var(--ease);
}

a.card {
  color: var(--text);
  text-decoration: none;
}

@media (hover: hover) and (pointer: fine) {
  a.card:hover {
    transform: translateY(-2px);
    border-color: rgba(var(--accent-rgb), 0.4);
    box-shadow: var(--shadow-card-hover);
  }
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--tap-tall);
  padding: 0 22px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: rgba(44, 36, 52, 0.88);
  color: var(--text);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--ease), background var(--ease), border-color var(--ease), box-shadow var(--ease);
}

.btn:hover {
  color: var(--text);
  border-color: rgba(var(--accent-rgb), 0.4);
}

.btn--primary {
  border-color: transparent;
  background: var(--accent);
  color: var(--text-on-accent-solid);
  box-shadow: var(--shadow-cta);
}

.btn--primary:hover {
  color: var(--text-on-accent-solid);
  background: var(--accent-strong);
}

.btn--small {
  min-height: var(--tap-min);
  padding: 0 16px;
  font-size: 0.92rem;
}

.btn:disabled {
  cursor: not-allowed;
  background: #4b3c58;
  color: #b8a8c4;
  box-shadow: none;
}

@media (hover: hover) and (pointer: fine) {
  .btn:not(:disabled):hover {
    transform: translateY(-1px);
  }
}

.btn:active {
  transform: translateY(0);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------- Badges and tiles ---------- */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(var(--accent-rgb), 0.5);
  background: rgba(24, 19, 30, 0.82);
  color: var(--tone-violet-ink);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.badge--early {
  border-color: rgba(180, 198, 246, 0.5);
  background: rgba(17, 28, 52, 0.84);
  color: #dbe8ff;
}

.badge--owned {
  border-color: rgba(139, 212, 139, 0.5);
  background: rgba(17, 38, 26, 0.84);
  color: var(--success);
}

.tile {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: var(--radius-md);
  background: rgba(var(--tone, var(--tone-violet)), 0.18);
  color: var(--tone-ink, var(--tone-violet-ink));
}

/* ---------- Site header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(19, 15, 23, 0.9);
  border-bottom: 1px solid var(--accent-line);
}

.site-header__inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 12px var(--gutter);
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  flex: 0 0 auto;
}

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

.brand__name {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.avatar {
  border-radius: var(--radius-pill);
  object-fit: cover;
  box-shadow: 0 0 0 2px var(--plum-900), 0 0 0 4px var(--accent);
}

.site-nav {
  display: flex;
  gap: 4px;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  color: var(--muted);
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 600;
  white-space: nowrap;
}

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

.site-nav a[aria-current='page'] {
  background: var(--accent-soft);
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), 0.4);
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.menu-button {
  display: none;
  width: var(--tap-min);
  height: var(--tap-min);
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(44, 36, 52, 0.88);
  color: var(--text);
  place-items: center;
  cursor: pointer;
}

@media (max-width: 960px) {
  .site-nav,
  .site-header__actions .hide-small {
    display: none;
  }

  .menu-button {
    display: grid;
  }
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(7, 10, 14, 0.72);
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 41;
  width: min(320px, 88vw);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--surface-strong);
  border-left: 1px solid var(--line);
  box-shadow: var(--shadow-modal);
  overflow-y: auto;
}

.drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  margin-bottom: 6px;
}

.drawer__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--tap-tall);
  padding: 0 14px;
  border-radius: 14px;
  background: rgba(44, 36, 52, 0.5);
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
}

.drawer__link[aria-current='page'] {
  background: var(--accent-soft);
}

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

.site-footer {
  border-top: 1px solid var(--accent-line);
  background: rgba(19, 15, 23, 0.9);
}

.site-footer__inner {
  max-width: var(--width-site);
  margin: 0 auto;
  padding: 40px var(--gutter) 28px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.site-footer__cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 28px;
}

.site-footer nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.site-footer nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.94rem;
  padding: 6px 0;
}

.site-footer nav a:hover {
  color: var(--text);
}

.site-footer__base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted-strong);
  font-size: 0.84rem;
}

/* ---------- Notices ---------- */

.notice {
  padding: 16px 18px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.001s !important;
    animation-duration: 0.001s !important;
  }
}

/* ---------- Shared bits ---------- */

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

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

.text-link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent-strong);
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  align-self: flex-start;
  min-height: var(--tap-min);
  display: inline-flex;
  align-items: center;
}

.text-link:disabled {
  color: var(--muted-strong);
  cursor: not-allowed;
}

.back-link {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  min-height: var(--tap-min);
  font-weight: 600;
  text-decoration: none;
}

.divider {
  height: 1px;
  background: var(--line);
}

.row-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: var(--tap-min);
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
}

.icon-button {
  display: grid;
  place-items: center;
  width: var(--tap-min);
  height: var(--tap-min);
  flex: 0 0 auto;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(44, 36, 52, 0.88);
  color: var(--text);
  cursor: pointer;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.chip[aria-pressed='true'] {
  border-color: rgba(var(--accent-rgb), 0.5);
  background: var(--accent-soft);
  color: var(--text);
}

.segmented {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: var(--surface-strong);
  align-self: flex-start;
}

.segmented__option {
  min-height: 38px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
}

.segmented__option[aria-pressed='true'] {
  background: var(--accent-soft);
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), 0.4);
}

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

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field__label {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--muted);
}

.input {
  min-height: var(--tap-tall);
  padding: 0 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface-strong);
  color: var(--text);
  font: inherit;
  font-size: 1rem;
}

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

.input[aria-invalid='true'] {
  border-color: var(--danger);
}

.input--code {
  font-size: 1.4rem;
  letter-spacing: 0.3em;
  text-align: center;
}

.form-error {
  margin: 0;
  padding: 10px 14px;
  border-radius: var(--radius-lg);
  background: var(--danger-bg);
  color: var(--danger);
  font-size: 0.92rem;
}

.spinner {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 2px solid rgba(243, 237, 247, 0.35);
  border-top-color: var(--text);
  animation: spin 0.8s linear infinite;
}

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

@media (prefers-reduced-motion: reduce) {
  .spinner {
    animation-duration: 2s !important;
  }
}

/* ---------- Pages outside the website ---------- */

/* The header's menu is opened by a small script that toggles `hidden`; the class rules above set display. */
.drawer[hidden],
.drawer-backdrop[hidden] {
  display: none;
}
