/* ============================================================================
   ИНСОМНИЯ — participant profile v2
   Visual language: cold black, wide display typography, white hairlines,
   cool violet/blue radiance, crosshair details, sharp geometry.
   Functionality is unchanged; this stylesheet owns the palette so the
   original working script can be reused without logic edits.
   ========================================================================== */

:root {
  --bg: #0b0d10;
  --bg-deep: #080a0d;
  --bg-card: #0a0c0f;
  --bg-hover: #0e1117;
  --white: #f5f6f8;
  --muted: rgba(245, 246, 248, 0.58);
  --dim: rgba(245, 246, 248, 0.38);
  --faint: rgba(245, 246, 248, 0.2);
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.24);
  --accent: #7c8dff;
  --accent-rgb: 124, 141, 255;
  --accent-2: #b2bbff;
  --font-display: 'Jost', 'Helvetica Neue', Arial, sans-serif;
  --font-body: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  --shell: 1580px;
  --gutter: clamp(20px, 4.2vw, 64px);
  --header-h: 82px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

body[data-role="participant"] {
  --accent: #a6b0ff;
  --accent-rgb: 166, 176, 255;
  --accent-2: #d3d8ff;
}

body[data-role="paid_participant"] {
  --accent: #7c8dff;
  --accent-rgb: 124, 141, 255;
  --accent-2: #b2bbff;
}

body[data-role="master"] {
  --accent: #b79aff;
  --accent-rgb: 183, 154, 255;
  --accent-2: #d9c8ff;
}

body[data-role="admin"] {
  --accent: #e7e9f5;
  --accent-rgb: 231, 233, 245;
  --accent-2: #b4bcff;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
  background: var(--bg);
  color-scheme: dark;
}

body {
  position: relative;
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(1100px 720px at 78% -8%, rgba(74, 78, 154, 0.09), transparent 64%),
    var(--bg);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 300;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body.modal-open {
  overflow: hidden;
}

::selection {
  background: var(--accent);
  color: var(--bg);
}

h1,
h2,
h3,
p,
ul,
figure {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  padding: 0;
  border: 0;
  color: inherit;
  background: none;
  font: inherit;
  cursor: pointer;
}

img,
svg {
  display: block;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 1px solid rgba(255, 255, 255, 0.85);
  outline-offset: 4px;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 300;
  padding: 10px 14px;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  color: var(--white);
  font-family: var(--font-display);
  font-size: 8px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transform: translateY(-170%);
  transition: transform 0.25s var(--ease);
}

.skip-link:focus {
  transform: translateY(0);
}

.icon {
  width: 16px;
  height: 16px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

/* ---------------------------------------------------------------------------
   Local API boot / dev login
   ------------------------------------------------------------------------- */

.boot-screen {
  position: fixed;
  inset: 0;
  z-index: 250;
  display: grid;
  overflow: auto;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(900px 580px at 70% -10%, rgba(var(--accent-rgb), 0.12), transparent 65%),
    #0b0d10;
}

.boot-screen[hidden] {
  display: none !important;
}

.boot-panel {
  position: relative;
  width: min(560px, 100%);
  max-height: calc(100dvh - 32px);
  overflow: auto;
  padding: clamp(24px, 4.5vw, 36px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: #0b0d10;
  box-shadow: 0 36px 90px rgba(0, 0, 0, 0.6);
}

.boot-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 15%;
  width: 46%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb), 0.75), transparent);
}

.boot-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.boot-kicker {
  color: var(--dim);
  font-family: var(--font-display);
  font-size: 6.5px;
  font-weight: 300;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.boot-cross {
  color: rgba(255, 255, 255, 0.35);
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 200;
  line-height: 1;
}

.boot-title {
  margin-top: 26px;
  color: #fff;
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 200;
  letter-spacing: 0.12em;
  line-height: 1.05;
  text-transform: uppercase;
}

.boot-copy {
  max-width: 440px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.dev-accounts {
  display: flex;
  flex-direction: column;
  margin-top: 26px;
  border-top: 1px solid var(--line);
}

.dev-account {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  color: #fff;
  text-align: left;
  transition: background-color 0.2s ease, padding-left 0.3s var(--ease);
}

.dev-account:hover {
  padding-left: 8px;
  background: rgba(255, 255, 255, 0.025);
}

.dev-account:disabled {
  cursor: wait;
  opacity: 0.45;
}

.dev-account__copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dev-account__name {
  color: rgba(255, 255, 255, 0.9);
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.dev-account__meta {
  color: var(--dim);
  font-family: var(--font-display);
  font-size: 6.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.dev-account__arrow {
  width: 13px;
  height: 13px;
  flex: none;
  color: var(--accent);
}

.boot-retry {
  margin-top: 22px;
}

.boot-foot {
  margin-top: 24px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-family: var(--font-display);
  font-size: 6.5px;
  letter-spacing: 0.1em;
  line-height: 1.5;
  text-transform: uppercase;
}

.role-menu__foot {
  border-top: 1px solid var(--line);
}

.dev-logout {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  color: var(--dim);
  font-family: var(--font-display);
  font-size: 7px;
  letter-spacing: 0.12em;
  text-align: left;
  text-transform: uppercase;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.dev-logout:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
}

@media (max-width: 560px) {
  .boot-screen {
    padding: 14px;
  }

  .boot-panel {
    padding: 22px 18px;
  }

  .boot-title {
    font-size: 28px;
  }
}

/* ---------------------------------------------------------------------------
   Atmosphere
   ------------------------------------------------------------------------- */

.page-media {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  width: 100%;
  height: 790px;
  overflow: hidden;
  pointer-events: none;
}

.page-media::before {
  content: "";
  position: absolute;
  inset: -4%;
  background: url("assets/images/hero-bg.jpg") center 38% / cover no-repeat;
  filter: grayscale(0.2) saturate(0.7) brightness(0.55) contrast(1.05);
  opacity: 0.32;
}

.page-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(11, 13, 16, 0.95) 0%, rgba(11, 13, 16, 0.7) 45%, rgba(11, 13, 16, 0.95) 100%),
    linear-gradient(180deg, rgba(11, 13, 16, 0.24) 0%, rgba(11, 13, 16, 0.6) 54%, var(--bg) 96%);
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  opacity: 0.035;
  mix-blend-mode: soft-light;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.6'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

.crosshair {
  position: absolute;
  display: block;
  width: 17px;
  height: 17px;
  opacity: 0.34;
  pointer-events: none;
}

.crosshair::before,
.crosshair::after {
  content: "";
  position: absolute;
  background: rgba(255, 255, 255, 0.8);
}

.crosshair::before {
  top: 0;
  left: 50%;
  width: 1px;
  height: 100%;
}

.crosshair::after {
  top: 50%;
  left: 0;
  width: 100%;
  height: 1px;
}

.page-rail {
  position: fixed;
  top: 50%;
  left: 18px;
  z-index: 1;
  display: none;
  color: rgba(255, 255, 255, 0.2);
  font-family: var(--font-display);
  font-size: 6px;
  font-weight: 300;
  letter-spacing: 0.28em;
  line-height: 1.6;
  text-transform: uppercase;
  writing-mode: vertical-rl;
  transform: translateY(-50%);
  pointer-events: none;
}

/* ---------------------------------------------------------------------------
   Header
   ------------------------------------------------------------------------- */

.site-header {
  position: relative;
  z-index: 20;
  height: var(--header-h);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, rgba(11, 13, 16, 0.46), rgba(11, 13, 16, 0));
}

.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  width: 100%;
  max-width: var(--shell);
  height: 100%;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.brand {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 37px;
  height: 37px;
  flex: none;
  color: rgba(255, 255, 255, 0.66);
  transition: color 0.25s ease;
}

.brand:hover .brand-mark {
  color: rgba(255, 255, 255, 0.95);
}

.brand-mark svg {
  width: 100%;
  height: 100%;
}

.brand-word {
  color: rgba(255, 255, 255, 0.94);
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 0.36em;
  line-height: 1;
  white-space: nowrap;
}

.brand-line {
  width: clamp(42px, 7.2vw, 112px);
  height: 1px;
  margin-left: 8px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.24), transparent);
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(18px, 2vw, 30px);
}

.site-nav a {
  position: relative;
  padding: 9px 0;
  color: rgba(255, 255, 255, 0.5);
  font-family: var(--font-display);
  font-size: 8px;
  font-weight: 300;
  letter-spacing: 0.17em;
  line-height: 1;
  text-transform: uppercase;
  transition: color 0.25s ease;
}

.site-nav a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 2px;
  left: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.82);
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 0.35s var(--ease);
}

.site-nav a:hover {
  color: #fff;
}

.site-nav a:hover::after {
  transform: scaleX(1);
  transform-origin: left center;
}

.header-tools {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 16px;
}

.profile-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.13);
  color: rgba(255, 255, 255, 0.66);
  transition:
    color 0.25s ease,
    border-color 0.25s ease,
    background-color 0.25s ease;
}

.profile-icon svg {
  width: 18px;
  height: 18px;
}

.profile-icon:hover,
.profile-icon[aria-current="page"] {
  border-color: rgba(var(--accent-rgb), 0.55);
  background: rgba(var(--accent-rgb), 0.045);
  color: #fff;
}

.header-divider {
  width: 1px;
  height: 24px;
  background: rgba(255, 255, 255, 0.13);
}

.buy-ticket {
  display: inline-flex;
  min-width: 132px;
  height: 38px;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(11, 13, 16, 0.14);
  color: rgba(255, 255, 255, 0.9);
  font-family: var(--font-display);
  font-size: 7.5px;
  font-weight: 300;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition:
    border-color 0.25s ease,
    background-color 0.25s ease,
    color 0.25s ease;
}

.buy-ticket:hover {
  border-color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.045);
  color: #fff;
}

.ticket-plus {
  color: rgba(255, 255, 255, 0.7);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 200;
  line-height: 1;
  transform: translateY(-1px);
}

/* ---------------------------------------------------------------------------
   Page intro
   ------------------------------------------------------------------------- */

.page-shell {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.intro {
  position: relative;
  z-index: 8;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  align-items: end;
  gap: 48px;
  padding: clamp(56px, 7.8vw, 102px) 0 clamp(42px, 5vw, 58px);
}

.intro-copy {
  min-width: 0;
}

.eyebrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 11px;
  color: var(--dim);
  font-family: var(--font-display);
  font-size: 7px;
  font-weight: 300;
  letter-spacing: 0.19em;
  line-height: 1.4;
  text-transform: uppercase;
}

.eyebrow-index {
  color: rgba(255, 255, 255, 0.74);
}

.eyebrow-rule {
  width: 44px;
  height: 1px;
  background: rgba(255, 255, 255, 0.2);
}

.eyebrow-slash {
  color: rgba(255, 255, 255, 0.2);
}

.title-row {
  display: flex;
  align-items: flex-end;
  gap: 32px;
  margin-top: 22px;
}

.page-title {
  color: #fff;
  font-family: var(--font-display);
  font-size: clamp(52px, 7.6vw, 108px);
  font-weight: 200;
  letter-spacing: 0.16em;
  line-height: 0.86;
  text-transform: uppercase;
  text-wrap: balance;
}

.title-rule {
  width: auto;
  min-width: 40px;
  height: 1px;
  flex: 1;
  margin-bottom: 14px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.32), transparent);
}

.intro-lead {
  max-width: 440px;
  margin-top: 25px;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 300;
  letter-spacing: 0.01em;
  line-height: 1.75;
}

.intro-crosshair {
  top: 29px;
  right: 2px;
  opacity: 0.22;
}

/* ---------------------------------------------------------------------------
   Demo role switch
   ------------------------------------------------------------------------- */

.role-switch {
  position: relative;
  z-index: 30;
  width: 100%;
  align-self: end;
}

.role-switch-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
  color: var(--dim);
  font-family: var(--font-display);
  font-size: 6.5px;
  font-weight: 300;
  letter-spacing: 0.16em;
  line-height: 1.4;
  text-transform: uppercase;
}

.demo-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.64);
}

.demo-square {
  width: 4px;
  height: 4px;
  flex: none;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(var(--accent-rgb), 0.55);
}

.role-switch-caption {
  color: rgba(255, 255, 255, 0.28);
  text-align: right;
}

.role-trigger {
  display: flex;
  width: 100%;
  min-height: 63px;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  background: rgba(11, 13, 16, 0.52);
  color: #fff;
  text-align: left;
  transition:
    border-color 0.25s ease,
    background-color 0.25s ease;
}

.role-trigger:hover {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.025);
}

.role-trigger[aria-expanded="true"] {
  border-color: rgba(var(--accent-rgb), 0.64);
  background: rgba(11, 13, 16, 0.9);
}

.role-trigger-line {
  width: 2px;
  align-self: stretch;
  flex: none;
  background: var(--accent);
  box-shadow: 0 0 9px rgba(var(--accent-rgb), 0.35);
}

.role-trigger-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 5px;
}

.role-trigger-label {
  overflow: hidden;
  color: #fff;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 0.12em;
  line-height: 1.2;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.role-trigger-code {
  color: var(--dim);
  font-family: var(--font-display);
  font-size: 6.5px;
  letter-spacing: 0.16em;
  line-height: 1.2;
  text-transform: uppercase;
}

.role-chevron {
  width: 14px;
  height: 14px;
  color: var(--muted);
  transition: transform 0.3s var(--ease);
}

.role-trigger[aria-expanded="true"] .role-chevron {
  transform: rotate(180deg);
}

.role-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  z-index: 70;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: #0b0d10;
  box-shadow: 0 28px 65px rgba(0, 0, 0, 0.6);
}

.role-menu:not([hidden]) {
  animation: v2-menu-in 0.22s var(--ease) both;
}

.role-option {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: transparent;
  color: #fff;
  text-align: left;
  transition: background-color 0.2s ease;
}

.role-option:last-child {
  border-bottom: 0;
}

.role-option:hover,
.role-option:focus-visible {
  background: rgba(255, 255, 255, 0.045);
  outline: none;
}

.role-option[aria-selected="true"] {
  background: rgba(var(--accent-rgb), 0.065);
  box-shadow: inset 2px 0 0 var(--accent);
}

.role-option__swatch {
  display: none;
}

.role-option__copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 3px;
}

.role-option__label {
  color: rgba(255, 255, 255, 0.9);
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 300;
  letter-spacing: 0.09em;
  line-height: 1.25;
  text-transform: uppercase;
}

.role-option__code {
  color: var(--dim);
  font-family: var(--font-display);
  font-size: 6.5px;
  letter-spacing: 0.13em;
  line-height: 1.3;
  text-transform: uppercase;
}

.role-option__check {
  width: 14px;
  height: 14px;
  flex: none;
  color: var(--accent);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.role-option[aria-selected="true"] .role-option__check {
  opacity: 1;
}

/* ---------------------------------------------------------------------------
   Profile block
   ------------------------------------------------------------------------- */

.profile-card {
  position: relative;
  z-index: 3;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  animation: v2-rise 0.85s var(--ease) 0.08s both;
}

.profile-card.is-updating {
  animation: v2-swap 0.45s var(--ease) both;
}

.profile-crosshair {
  top: -8px;
  right: 0;
  opacity: 0.28;
}

.profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.7fr);
}

.identity {
  display: flex;
  min-width: 0;
  align-items: stretch;
  gap: clamp(24px, 3.2vw, 38px);
  padding: clamp(30px, 3.4vw, 42px) clamp(30px, 4vw, 52px) clamp(26px, 3vw, 36px) 0;
}

.avatar-block {
  display: flex;
  flex: none;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding-top: 4px;
}

.avatar-wrap {
  position: relative;
  width: clamp(108px, 9.4vw, 136px);
  height: clamp(108px, 9.4vw, 136px);
}

.avatar-orbit {
  position: absolute;
  inset: -12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
}

.avatar-orbit::before,
.avatar-orbit::after {
  content: "";
  position: absolute;
  background: rgba(255, 255, 255, 0.3);
}

.avatar-orbit::before {
  top: -4px;
  left: 50%;
  width: 1px;
  height: 8px;
}

.avatar-orbit::after {
  top: 50%;
  left: -4px;
  width: 8px;
  height: 1px;
}

.avatar {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 24%, rgba(var(--accent-rgb), 0.15), #090b0e 68%);
}

.avatar-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  color: var(--accent);
  opacity: 0.86;
}

.avatar-initials {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.94);
  font-family: var(--font-display);
  font-size: clamp(32px, 3.3vw, 42px);
  font-weight: 200;
  letter-spacing: 0.08em;
  line-height: 1;
  text-shadow: 0 8px 26px rgba(0, 0, 0, 0.5);
}

.level-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--dim);
  font-family: var(--font-display);
  font-size: 6.5px;
  font-weight: 300;
  letter-spacing: 0.18em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.level-chip b {
  color: rgba(255, 255, 255, 0.86);
  font-weight: 300;
}

.identity-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  padding-top: 2px;
}

.status-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.status-badge {
  display: inline-flex;
  min-height: 27px;
  align-items: center;
  gap: 8px;
  padding: 5px 9px;
  border: 1px solid rgba(var(--accent-rgb), 0.45);
  background: rgba(var(--accent-rgb), 0.035);
  color: rgba(255, 255, 255, 0.92);
  font-family: var(--font-display);
  font-size: 7px;
  font-weight: 300;
  letter-spacing: 0.18em;
  line-height: 1.2;
  text-transform: uppercase;
}

.status-mark {
  width: 4px;
  height: 4px;
  flex: none;
  background: var(--accent);
  box-shadow: 0 0 7px rgba(var(--accent-rgb), 0.6);
}

.status-micro {
  color: var(--dim);
  font-family: var(--font-display);
  font-size: 6.5px;
  letter-spacing: 0.12em;
  line-height: 1.3;
  text-transform: uppercase;
}

.profile-name {
  margin-top: 20px;
  color: #fff;
  font-family: var(--font-display);
  font-size: clamp(38px, 4.2vw, 58px);
  font-weight: 200;
  letter-spacing: 0.13em;
  line-height: 0.98;
  text-transform: uppercase;
  text-wrap: balance;
}

.profile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-top: 15px;
  color: rgba(255, 255, 255, 0.5);
  font-family: var(--font-display);
  font-size: 7.5px;
  font-weight: 300;
  letter-spacing: 0.12em;
  line-height: 1.5;
  text-transform: uppercase;
}

.profile-meta span {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.profile-meta span + span::before {
  content: "/";
  margin: 0 10px;
  color: rgba(255, 255, 255, 0.18);
}

.profile-bio {
  max-width: 440px;
  margin-top: 18px;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 300;
  line-height: 1.7;
}

.profile-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  margin-top: 26px;
}

.button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: rgba(255, 255, 255, 0.92);
  font-family: var(--font-display);
  font-size: 7.5px;
  font-weight: 300;
  letter-spacing: 0.16em;
  line-height: 1.2;
  text-transform: uppercase;
  transition:
    border-color 0.25s ease,
    background-color 0.25s ease,
    color 0.25s ease;
}

.button:hover {
  border-color: rgba(255, 255, 255, 0.68);
  background: rgba(255, 255, 255, 0.035);
  color: #fff;
}

.button .icon {
  width: 14px;
  height: 14px;
}

.button--solid {
  border-color: rgba(255, 255, 255, 0.7);
  background: transparent;
  color: #fff;
}

.button--solid:hover {
  background: #fff;
  color: var(--bg);
}

.text-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 7.5px;
  font-weight: 300;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: color 0.25s ease;
}

.text-link::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.5);
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 0.35s var(--ease);
}

.text-link:hover {
  color: #fff;
}

.text-link:hover::after {
  transform: scaleX(1);
  transform-origin: left center;
}

.text-link .icon {
  width: 13px;
  height: 13px;
}

.profile-signals {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: auto;
  padding-top: 28px;
  color: rgba(255, 255, 255, 0.44);
  font-family: var(--font-display);
  font-size: 7px;
  font-weight: 300;
  letter-spacing: 0.12em;
  line-height: 1.4;
  text-transform: uppercase;
}

.profile-signals span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.profile-signals .icon {
  width: 11px;
  height: 11px;
  color: var(--accent);
  opacity: 0.7;
}

/* ---------------------------------------------------------------------------
   Role panel + pass
   ------------------------------------------------------------------------- */

.role-panel {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: clamp(30px, 3.4vw, 42px) 0 clamp(26px, 3vw, 36px) clamp(30px, 3.4vw, 46px);
  border-left: 1px solid var(--line);
}

.role-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  color: rgba(255, 255, 255, 0.46);
  font-family: var(--font-display);
  font-size: 7px;
  font-weight: 300;
  letter-spacing: 0.17em;
  line-height: 1.3;
  text-transform: uppercase;
}

.panel-index {
  color: rgba(255, 255, 255, 0.26);
}

.role-name {
  margin-top: 20px;
  color: #fff;
  font-family: var(--font-display);
  font-size: clamp(20px, 1.85vw, 27px);
  font-weight: 300;
  letter-spacing: 0.075em;
  line-height: 1.15;
  text-transform: uppercase;
  text-wrap: balance;
}

.role-desc {
  min-height: 62px;
  margin-top: 12px;
  color: rgba(245, 246, 248, 0.6);
  font-family: var(--font-body);
  font-size: 11.5px;
  font-weight: 300;
  line-height: 1.7;
}

.perks {
  display: flex;
  flex-direction: column;
  margin-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.perk {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.72);
  font-family: var(--font-display);
  font-size: 8.5px;
  font-weight: 300;
  letter-spacing: 0.08em;
  line-height: 1.45;
  text-transform: uppercase;
}

.perk .icon {
  display: none;
}

.perk::before {
  content: "+";
  flex: none;
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 300;
  line-height: 1.2;
}

.pass {
  margin-top: auto;
  padding-top: 24px;
}

.pass-box {
  display: flex;
  overflow: hidden;
  border: 1px solid var(--line);
  border-left: 1px solid rgba(var(--accent-rgb), 0.62);
  background: rgba(255, 255, 255, 0.016);
}

.pass-box[data-state="missing"] {
  border-left-color: var(--line);
}

.pass-main {
  min-width: 0;
  flex: 1;
  padding: 11px 13px;
}

.pass-label {
  display: block;
  color: rgba(255, 255, 255, 0.5);
  font-family: var(--font-display);
  font-size: 6.5px;
  font-weight: 300;
  letter-spacing: 0.16em;
  line-height: 1.3;
  text-transform: uppercase;
}

.pass-value {
  display: block;
  overflow: hidden;
  margin-top: 6px;
  color: #fff;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.08em;
  line-height: 1.25;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.pass-box[data-state="missing"] .pass-value {
  color: var(--muted);
}

.pass-meta {
  display: block;
  overflow: hidden;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.5);
  font-family: var(--font-body);
  font-size: 8.5px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pass-stub {
  position: relative;
  display: flex;
  width: 38px;
  flex: none;
  align-items: center;
  justify-content: center;
  border-left: 1px dashed rgba(var(--accent-rgb), 0.3);
}

.pass-box[data-state="missing"] .pass-stub {
  border-left-color: rgba(255, 255, 255, 0.1);
}

.barcode {
  display: block;
  width: 11px;
  height: 26px;
  opacity: 0.55;
  background: repeating-linear-gradient(
    90deg,
    var(--accent) 0 1px,
    transparent 1px 3px,
    rgba(255, 255, 255, 0.34) 3px 4px,
    transparent 4px 6px
  );
}

.pass-box[data-state="missing"] .barcode {
  opacity: 0.18;
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.5) 0 1px, transparent 1px 4px);
}

.pass-action {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 7px;
  font-weight: 300;
  letter-spacing: 0.13em;
  line-height: 1.3;
  text-transform: uppercase;
  transition: opacity 0.2s ease;
}

.pass-action:hover {
  opacity: 0.7;
}

.pass-action .icon {
  width: 12px;
  height: 12px;
}

/* ---------------------------------------------------------------------------
   Stats strip
   ------------------------------------------------------------------------- */

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}

.stat {
  min-width: 0;
  padding: 19px clamp(16px, 2vw, 26px) 20px;
}

.stat:first-child {
  padding-left: 0;
}

.stat:last-child {
  padding-right: 0;
}

.stat + .stat {
  border-left: 1px solid var(--line);
}

.stat-label {
  display: block;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.46);
  font-family: var(--font-display);
  font-size: 7px;
  font-weight: 300;
  letter-spacing: 0.17em;
  line-height: 1.3;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.stat-value {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin-top: 10px;
  color: #fff;
  font-family: var(--font-display);
  font-size: clamp(26px, 2.35vw, 34px);
  font-weight: 300;
  letter-spacing: 0.01em;
  line-height: 1;
}

.stat-value b {
  font-weight: 300;
}

.stat-unit,
.stat-total {
  color: var(--dim);
  font-family: var(--font-display);
  font-size: 7.5px;
  font-weight: 300;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.stat-note {
  display: block;
  overflow: hidden;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.4);
  font-family: var(--font-display);
  font-size: 7.5px;
  font-weight: 300;
  letter-spacing: 0.04em;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.xp-track {
  height: 2px;
  margin-top: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
}

.xp-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  box-shadow: 0 0 8px rgba(var(--accent-rgb), 0.3);
  transition: width 0.5s var(--ease);
}

.mini-meter {
  display: flex;
  gap: 2px;
  margin-top: 12px;
}

.mini-meter i {
  display: block;
  height: 2px;
  flex: 1;
  background: rgba(255, 255, 255, 0.1);
  transition: background-color 0.25s ease;
}

.mini-meter i.is-unlocked {
  background: var(--accent);
}

.mini-meter i.is-progress {
  background: rgba(var(--accent-rgb), 0.36);
}

/* ---------------------------------------------------------------------------
   Achievements header
   ------------------------------------------------------------------------- */

.achievements {
  position: relative;
  margin-top: clamp(62px, 7.5vw, 96px);
  scroll-margin-top: 24px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 48px;
}

.section-copy {
  max-width: 640px;
}

.section-title {
  margin-top: 20px;
  color: #fff;
  font-family: var(--font-display);
  font-size: clamp(38px, 4.4vw, 58px);
  font-weight: 200;
  letter-spacing: 0.18em;
  line-height: 1;
  text-transform: uppercase;
}

.section-lead {
  max-width: 480px;
  margin-top: 16px;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 300;
  line-height: 1.72;
}

.collection-meter {
  display: flex;
  flex: none;
  align-items: center;
  gap: 18px;
  padding-bottom: 4px;
}

.meter-ring {
  --p: 50;
  position: relative;
  display: grid;
  width: 78px;
  height: 78px;
  flex: none;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--accent) calc(var(--p) * 1%), rgba(255, 255, 255, 0.1) 0);
}

.meter-ring::before {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--bg);
}

.meter-ring span {
  position: relative;
  color: #fff;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 0.08em;
}

.meter-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.meter-label {
  color: var(--dim);
  font-family: var(--font-display);
  font-size: 6.5px;
  font-weight: 300;
  letter-spacing: 0.18em;
  line-height: 1.3;
  text-transform: uppercase;
}

.meter-value {
  color: #fff;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 300;
  letter-spacing: 0.06em;
  line-height: 1.2;
  text-transform: uppercase;
}

.meter-note {
  color: var(--dim);
  font-family: var(--font-display);
  font-size: 7px;
  font-weight: 300;
  letter-spacing: 0.05em;
  line-height: 1.4;
}

/* ---------------------------------------------------------------------------
   Filters
   ------------------------------------------------------------------------- */

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 30px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}

.filter {
  position: relative;
  margin-right: 22px;
  padding: 6px 0;
  border: 0;
  background: none;
  color: rgba(255, 255, 255, 0.44);
  font-family: var(--font-display);
  font-size: 8.5px;
  font-weight: 300;
  letter-spacing: 0.12em;
  line-height: 1.2;
  text-transform: uppercase;
  transition: color 0.2s ease;
}

.filter:last-child {
  margin-right: 0;
}

.filter span {
  margin-left: 6px;
  color: rgba(255, 255, 255, 0.24);
  font-size: 6.5px;
  letter-spacing: 0.04em;
  transition: color 0.2s ease;
}

.filter:hover {
  color: #fff;
}

.filter[aria-pressed="true"] {
  color: #fff;
}

.filter[aria-pressed="true"]::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 1px;
  background: #fff;
  box-shadow: 0 0 8px rgba(var(--accent-rgb), 0.35);
}

.filter[aria-pressed="true"] span {
  color: rgba(var(--accent-rgb), 0.9);
}

.legend {
  display: flex;
  flex: none;
  align-items: center;
  gap: 16px;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--dim);
  font-family: var(--font-display);
  font-size: 6.5px;
  font-weight: 300;
  letter-spacing: 0.1em;
  line-height: 1.3;
  text-transform: uppercase;
}

.legend-mark {
  width: 4px;
  height: 4px;
  flex: none;
  background: rgba(255, 255, 255, 0.18);
}

.legend-mark-open {
  background: var(--accent);
}

.legend-mark-progress {
  background: rgba(var(--accent-rgb), 0.4);
}

.legend-mark-locked {
  background: rgba(255, 255, 255, 0.18);
}

/* ---------------------------------------------------------------------------
   Achievement grid
   ------------------------------------------------------------------------- */

.achievements-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--line);
}

.achievement-card {
  position: relative;
  display: flex;
  min-height: 304px;
  flex-direction: column;
  align-items: flex-start;
  overflow: hidden;
  padding: 22px;
  border: 0;
  border-radius: 0;
  background: var(--bg-card);
  color: #fff;
  text-align: left;
  transition: background-color 0.25s ease;
  animation: v2-card-in 0.52s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 34ms + 80ms);
}

.achievement-card[data-rarity="common"] {
  --tone: 154, 167, 199;
}

.achievement-card[data-rarity="rare"] {
  --tone: 124, 141, 255;
}

.achievement-card[data-rarity="epic"] {
  --tone: 183, 154, 255;
}

.achievement-card[data-rarity="legendary"] {
  --tone: 237, 240, 255;
}

.achievement-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 85% at 16% 0%, rgba(var(--tone), 0.075), transparent 58%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.achievement-card[data-state="unlocked"]::before {
  opacity: 1;
}

.achievement-card[data-state="unlocked"] {
  background:
    radial-gradient(105% 82% at 16% 0%, rgba(var(--tone), 0.12), transparent 61%),
    var(--bg-card);
  box-shadow:
    inset 0 0 0 1px rgba(var(--tone), 0.13),
    inset 0 1px 0 rgba(var(--tone), 0.74);
}

.achievement-card[data-state="in_progress"] {
  background:
    radial-gradient(105% 82% at 16% 0%, rgba(var(--tone), 0.075), transparent 61%),
    var(--bg-card);
  box-shadow:
    inset 0 0 0 1px rgba(var(--tone), 0.1),
    inset 0 1px 0 rgba(var(--tone), 0.4);
}

.achievement-card[data-state="locked"] {
  background: #090b0e;
}

.achievement-card:hover {
  background-color: var(--bg-hover);
}

.achievement-card:hover::before {
  opacity: 1;
}

.achievement-card:focus-visible {
  z-index: 2;
  outline: 1px solid rgba(255, 255, 255, 0.85);
  outline-offset: -1px;
}

.achievement-card__top {
  position: relative;
  z-index: 1;
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.achievement-card__cat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.46);
  font-family: var(--font-display);
  font-size: 7.5px;
  font-weight: 300;
  letter-spacing: 0.15em;
  line-height: 1.4;
  text-transform: uppercase;
}

.achievement-card__cat::before {
  content: "";
  width: 4px;
  height: 4px;
  flex: none;
  background: rgba(var(--tone), 0.66);
}

.achievement-card__points {
  color: rgba(255, 255, 255, 0.42);
  font-family: var(--font-display);
  font-size: 7.5px;
  font-weight: 300;
  letter-spacing: 0.08em;
  line-height: 1.3;
  text-transform: uppercase;
  white-space: nowrap;
}

.achievement-card[data-state="unlocked"] .achievement-card__points {
  color: rgba(var(--tone), 0.92);
}

/* Circular badge: thin ring, no glass, no pill pip */
.badge-medallion {
  --p: 0;
  position: relative;
  display: grid;
  width: 82px;
  height: 82px;
  flex: none;
  place-items: center;
  margin: 27px 0 19px;
  border-radius: 50%;
}

.badge-medallion__progress {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(
    rgb(var(--tone)) calc(var(--p) * 1%),
    rgba(255, 255, 255, 0.09) 0
  );
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1px));
}

.badge-medallion__disc {
  position: absolute;
  inset: 4px;
  display: grid;
  overflow: hidden;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  background: #0b0d10;
}

.badge-medallion__disc::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 50%;
}

.badge-medallion__icon {
  position: relative;
  z-index: 1;
  width: 30px;
  height: 30px;
  color: rgba(255, 255, 255, 0.72);
}

.badge-medallion__pip {
  display: none;
}

.achievement-card[data-state="unlocked"] .badge-medallion {
  filter: drop-shadow(0 0 18px rgba(var(--tone), 0.16));
}

.achievement-card[data-state="unlocked"] .badge-medallion__disc {
  border-color: rgba(var(--tone), 0.62);
  background:
    radial-gradient(circle at 38% 30%, rgba(var(--tone), 0.24), #0b0d10 70%);
}

.achievement-card[data-state="unlocked"] .badge-medallion__icon {
  color: rgb(var(--tone));
  filter: drop-shadow(0 0 10px rgba(var(--tone), 0.64));
}

.achievement-card[data-state="in_progress"] .badge-medallion__disc {
  border-color: rgba(var(--tone), 0.32);
}

.achievement-card[data-state="in_progress"] .badge-medallion__icon {
  color: rgba(255, 255, 255, 0.88);
}

.achievement-card[data-state="locked"] .badge-medallion__progress {
  background: rgba(255, 255, 255, 0.06);
}

.achievement-card[data-state="locked"] .badge-medallion__disc {
  border-color: rgba(255, 255, 255, 0.08);
  background: #090b0e;
  filter: grayscale(1);
}

.achievement-card[data-state="locked"] .badge-medallion__icon {
  color: rgba(255, 255, 255, 0.28);
}

.achievement-card[data-state="locked"] .achievement-card__top,
.achievement-card[data-state="locked"] .badge-medallion,
.achievement-card[data-state="locked"] .achievement-card__title,
.achievement-card[data-state="locked"] .achievement-card__desc,
.achievement-card[data-state="locked"] .achievement-card__footer {
  opacity: 0.54;
  transition: opacity 0.25s ease;
}

.achievement-card[data-state="locked"]:hover .achievement-card__top,
.achievement-card[data-state="locked"]:hover .badge-medallion,
.achievement-card[data-state="locked"]:hover .achievement-card__title,
.achievement-card[data-state="locked"]:hover .achievement-card__desc,
.achievement-card[data-state="locked"]:hover .achievement-card__footer {
  opacity: 0.78;
}

.achievement-card__title {
  position: relative;
  z-index: 1;
  display: block;
  color: #fff;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 300;
  letter-spacing: 0.085em;
  line-height: 1.4;
  text-transform: uppercase;
}

.achievement-card[data-state="locked"] .achievement-card__title {
  color: rgba(255, 255, 255, 0.72);
}

.achievement-card__desc {
  position: relative;
  z-index: 1;
  display: -webkit-box;
  overflow: hidden;
  margin-top: 8px;
  color: rgba(245, 246, 248, 0.62);
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 300;
  line-height: 1.7;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.achievement-card[data-state="locked"] .achievement-card__desc {
  color: var(--dim);
}

.achievement-card__footer {
  position: relative;
  z-index: 1;
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.4);
  font-family: var(--font-display);
  font-size: 7px;
  font-weight: 300;
  letter-spacing: 0.1em;
  line-height: 1.4;
  text-transform: uppercase;
}

.achievement-card__state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.achievement-card__state .icon {
  width: 10px;
  height: 10px;
}

.achievement-card[data-state="unlocked"] .achievement-card__state {
  color: rgba(var(--tone), 0.92);
}

.achievement-card[data-state="in_progress"] .achievement-card__state {
  color: rgba(255, 255, 255, 0.82);
}

.achievement-card__date {
  color: var(--dim);
}

.achievement-card__count {
  color: rgba(var(--tone), 0.92);
}

.achievement-card[data-state="locked"] .achievement-card__state,
.achievement-card[data-state="locked"] .achievement-card__date {
  color: rgba(255, 255, 255, 0.34);
}

/* ---------------------------------------------------------------------------
   Empty state
   ------------------------------------------------------------------------- */

.empty-state {
  margin-top: 20px;
  padding: 64px 24px;
  border: 1px solid var(--line);
  text-align: center;
}

.empty-index {
  display: block;
  color: var(--dim);
  font-family: var(--font-display);
  font-size: 7px;
  font-weight: 300;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.empty-title {
  margin-top: 16px;
  color: #fff;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 200;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.empty-text {
  margin-top: 8px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.no-script {
  margin-top: 20px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

/* ---------------------------------------------------------------------------
   Achievement dialog
   ------------------------------------------------------------------------- */

.achievement-dialog {
  --tone: var(--accent-rgb);
  position: fixed;
  inset: 0;
  width: min(620px, calc(100vw - 32px));
  max-width: 620px;
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0;
  background:
    radial-gradient(84% 58% at 82% -12%, rgba(var(--accent-rgb), 0.12), transparent 62%),
    #0b0d10;
  color: var(--white);
  box-shadow: 0 38px 100px rgba(0, 0, 0, 0.78);
  scrollbar-width: thin;
  scrollbar-color: #343b4c transparent;
}

.achievement-dialog[open] {
  animation: v2-dialog-in 0.28s var(--ease) both;
}

.achievement-dialog::backdrop {
  background: rgba(3, 4, 7, 0.82);
  animation: v2-fade-in 0.25s ease both;
}

.dialog-panel {
  position: relative;
  overflow: hidden;
  padding: clamp(25px, 4.4vw, 38px);
}

.dialog-panel::before {
  content: "";
  position: absolute;
  top: -170px;
  right: -150px;
  width: 420px;
  height: 340px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(var(--accent-rgb), 0.14), transparent 70%);
  pointer-events: none;
}

.dialog-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 3;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--line);
  color: var(--muted);
  background: transparent;
  transition:
    border-color 0.2s ease,
    color 0.2s ease,
    background-color 0.2s ease;
}

.dialog-close:hover {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.035);
  color: #fff;
}

.dialog-close .icon {
  width: 14px;
  height: 14px;
}

.dialog-hero {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  padding-right: 30px;
}

.dialog-badge {
  flex: none;
  padding-top: 2px;
}

.badge-medallion--lg {
  width: 100px;
  height: 100px;
  margin: 0;
}

.badge-medallion--lg .badge-medallion__disc {
  inset: 5px;
}

.badge-medallion--lg .badge-medallion__icon {
  width: 38px;
  height: 38px;
}

.badge-medallion--lg .badge-medallion__disc::before {
  inset: 9px;
}

.dialog-heading {
  min-width: 0;
  padding-top: 4px;
}

.dialog-kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--dim);
  font-family: var(--font-display);
  font-size: 7px;
  font-weight: 300;
  letter-spacing: 0.17em;
  line-height: 1.4;
  text-transform: uppercase;
}

.dialog-kicker__accent {
  color: var(--accent);
}

.dialog-title {
  margin-top: 12px;
  color: #fff;
  font-family: var(--font-display);
  font-size: clamp(30px, 4vw, 42px);
  font-weight: 200;
  letter-spacing: 0.1em;
  line-height: 1;
  text-transform: uppercase;
  text-wrap: balance;
}

.dialog-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  margin-top: 15px;
}

.chip {
  color: var(--dim);
  font-family: var(--font-display);
  font-size: 6.5px;
  font-weight: 300;
  letter-spacing: 0.14em;
  line-height: 1.4;
  text-transform: uppercase;
}

.chip + .chip::before {
  content: "/";
  margin: 0 10px;
  color: rgba(255, 255, 255, 0.2);
}

.chip--accent {
  color: var(--accent);
}

.dialog-description {
  margin-top: 22px;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 300;
  line-height: 1.72;
}

.dialog-divider {
  height: 1px;
  margin: 23px 0;
  background: var(--line);
}

.dialog-section {
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.dialog-label {
  display: block;
  color: var(--dim);
  font-family: var(--font-display);
  font-size: 6.5px;
  font-weight: 300;
  letter-spacing: 0.16em;
  line-height: 1.4;
  text-transform: uppercase;
}

.dialog-condition {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.9);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.04em;
  line-height: 1.5;
}

.dialog-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 15px;
}

.progress-track {
  height: 2px;
  flex: 1;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
}

.progress-track span {
  display: block;
  height: 100%;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(var(--accent-rgb), 0.36);
}

.dialog-progress__value {
  flex: none;
  color: rgba(var(--accent-rgb), 0.9);
  font-family: var(--font-display);
  font-size: 8px;
  font-weight: 300;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.dialog-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 20px;
}

.dialog-stat {
  min-width: 0;
  padding: 12px 16px;
  border-left: 1px solid var(--line);
}

.dialog-stat:first-child {
  padding-left: 0;
  border-left: 0;
}

.dialog-stat strong {
  display: block;
  overflow: hidden;
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.86);
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 300;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.dialog-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.dialog-date {
  color: var(--dim);
  font-family: var(--font-display);
  font-size: 7px;
  font-weight: 300;
  letter-spacing: 0.06em;
  line-height: 1.45;
  text-transform: uppercase;
}

.dialog-date strong {
  display: block;
  margin-bottom: 4px;
  color: var(--accent);
  font-size: 6.5px;
  font-weight: 300;
  letter-spacing: 0.14em;
}

.achievement-dialog[data-state="locked"] .dialog-badge .badge-medallion__disc {
  border-color: rgba(255, 255, 255, 0.1);
  background: #090b0e;
  filter: grayscale(1);
  opacity: 0.6;
}

.achievement-dialog[data-state="locked"] .dialog-badge .badge-medallion__progress {
  background: rgba(255, 255, 255, 0.06);
}

.achievement-dialog[data-state="locked"] .dialog-badge .badge-medallion__icon {
  color: rgba(255, 255, 255, 0.3);
  filter: none;
}

/* ---------------------------------------------------------------------------
   Footer
   ------------------------------------------------------------------------- */

.site-footer {
  position: relative;
  z-index: 2;
  margin-top: clamp(62px, 7.5vw, 96px);
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: flex;
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding: 22px var(--gutter);
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--dim);
  font-family: var(--font-display);
  font-size: 6.5px;
  font-weight: 300;
  letter-spacing: 0.14em;
  line-height: 1.5;
  text-transform: uppercase;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.58);
  letter-spacing: 0.18em;
}

.footer-brand span {
  color: var(--dim);
  letter-spacing: 0.1em;
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px 18px;
}

.footer-demo {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: rgba(var(--accent-rgb), 0.66);
}

.footer-demo i {
  width: 4px;
  height: 4px;
  background: var(--accent);
}

.footer-top {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  transition: color 0.2s ease;
}

.footer-top:hover {
  color: #fff;
}

.footer-top .icon {
  width: 12px;
  height: 12px;
}

/* ---------------------------------------------------------------------------
   Toast
   ------------------------------------------------------------------------- */

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  z-index: 150;
  display: flex;
  max-width: calc(100vw - 32px);
  min-height: 38px;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0;
  background: #0b0d10;
  color: rgba(255, 255, 255, 0.9);
  font-family: var(--font-display);
  font-size: 7.5px;
  font-weight: 300;
  letter-spacing: 0.12em;
  line-height: 1.4;
  text-transform: uppercase;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition:
    opacity 0.25s ease,
    transform 0.3s var(--ease);
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast-mark {
  width: 4px;
  height: 4px;
  flex: none;
  background: var(--accent);
}

/* ---------------------------------------------------------------------------
   Animation
   ------------------------------------------------------------------------- */

@keyframes v2-rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes v2-card-in {
  from {
    opacity: 0;
    transform: translateY(9px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes v2-swap {
  0% {
    opacity: 0.58;
    transform: translateY(2px);
  }
  100% {
    opacity: 1;
    transform: none;
  }
}

@keyframes v2-menu-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes v2-dialog-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes v2-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ---------------------------------------------------------------------------
   Responsive
   ------------------------------------------------------------------------- */

@media (min-width: 1560px) {
  .page-rail {
    display: block;
  }
}

@media (max-width: 1280px) {
  .intro {
    grid-template-columns: minmax(0, 1fr) 318px;
    gap: 38px;
  }

  .page-title {
    font-size: clamp(52px, 7.4vw, 100px);
  }

  .profile-grid {
    grid-template-columns: minmax(0, 1.48fr) minmax(292px, 0.7fr);
  }
}

@media (max-width: 1160px) {
  .site-nav {
    display: none;
  }

  .header-inner {
    grid-template-columns: 1fr auto;
  }

  .intro {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
    padding-top: clamp(48px, 7vw, 78px);
  }

  .role-switch {
    width: min(100%, 380px);
  }

  .profile-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .identity {
    padding-right: 0;
  }

  .role-panel {
    margin-top: 28px;
    padding: 28px 0 32px;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .role-desc {
    min-height: 0;
    max-width: 560px;
  }

  .perks {
    max-width: 560px;
  }

  .pass {
    width: min(100%, 420px);
    margin-top: 22px;
    padding-top: 0;
  }

  .achievements-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .brand-line {
    display: none;
  }

  .page-title {
    font-size: clamp(48px, 7.6vw, 82px);
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 24px;
  }

  .collection-meter {
    align-self: flex-start;
  }

  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stat {
    padding: 17px 20px;
  }

  .stat:first-child {
    padding-left: 20px;
  }

  .stat:last-child {
    padding-right: 20px;
  }

  .stat:nth-child(3) {
    border-left: 0;
  }

  .stat:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }

  .legend {
    display: none;
  }

  .achievements-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  :root {
    --header-h: 70px;
  }

  .header-inner {
    gap: 14px;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
  }

  .brand-word {
    font-size: 9px;
    letter-spacing: 0.3em;
  }

  .header-tools {
    gap: 10px;
  }

  .profile-icon {
    width: 31px;
    height: 31px;
  }

  .header-divider {
    display: none;
  }

  .buy-ticket {
    min-width: 112px;
    height: 34px;
    padding: 0 10px;
    font-size: 6.5px;
    letter-spacing: 0.12em;
  }

  .ticket-plus {
    font-size: 13px;
  }

  .page-media {
    height: 620px;
  }

  .page-media::before {
    opacity: 0.24;
  }

  .intro {
    padding-top: 42px;
    padding-bottom: 32px;
  }

  .title-row {
    margin-top: 17px;
  }

  .page-title {
    font-size: clamp(42px, 10vw, 62px);
    letter-spacing: 0.1em;
  }

  .title-rule {
    display: none;
  }

  .intro-lead {
    margin-top: 18px;
    font-size: 11.5px;
  }

  .role-switch {
    width: 100%;
  }

  .role-switch-caption {
    display: none;
  }

  .identity {
    gap: 20px;
    padding: 26px 0 24px;
  }

  .avatar-wrap {
    width: 96px;
    height: 96px;
  }

  .avatar-orbit {
    inset: -9px;
  }

  .avatar-initials {
    font-size: 31px;
  }

  .level-chip {
    font-size: 6px;
    letter-spacing: 0.14em;
  }

  .profile-name {
    margin-top: 15px;
    font-size: clamp(29px, 8.2vw, 38px);
    letter-spacing: 0.1em;
  }

  .profile-meta {
    margin-top: 11px;
    font-size: 6.5px;
  }

  .profile-bio {
    margin-top: 13px;
    font-size: 11.5px;
  }

  .profile-actions {
    gap: 14px;
    margin-top: 18px;
  }

  .profile-signals {
    padding-top: 18px;
    font-size: 6px;
  }

  .role-panel {
    margin-top: 22px;
    padding-top: 22px;
  }

  .role-name {
    margin-top: 15px;
    font-size: 21px;
  }

  .role-desc {
    font-size: 10.5px;
  }

  .pass {
    margin-top: 18px;
  }

  .stat {
    padding: 15px 16px;
  }

  .stat:first-child {
    padding-left: 16px;
  }

  .stat:last-child {
    padding-right: 16px;
  }

  .stat-note {
    white-space: normal;
  }

  .achievements {
    margin-top: 54px;
  }

  .section-title {
    font-size: 38px;
    letter-spacing: 0.14em;
  }

  .section-lead {
    font-size: 11px;
  }

  .collection-meter {
    gap: 13px;
  }

  .meter-ring {
    width: 66px;
    height: 66px;
  }

  .meter-value {
    font-size: 17px;
  }

  .toolbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    padding: 10px 0;
  }

  .filters {
    flex-wrap: nowrap;
    width: calc(100vw - (var(--gutter) * 2));
    margin-right: calc(var(--gutter) * -1);
    padding-right: calc(var(--gutter) + 18px);
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 34px), transparent 100%);
    mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 34px), transparent 100%);
  }

  .filters::-webkit-scrollbar {
    display: none;
  }

  .filter {
    flex: none;
    padding: 6px 0;
  }

  .achievements-grid {
    margin-top: 16px;
  }

  .achievement-card {
    min-height: 270px;
    padding: 18px;
  }

  .badge-medallion {
    width: 70px;
    height: 70px;
    margin: 19px 0 15px;
  }

  .badge-medallion__icon {
    width: 26px;
    height: 26px;
  }

  .achievement-card__title {
    font-size: 12.5px;
  }

  .achievement-card__desc {
    font-size: 10px;
  }

  .dialog-panel {
    padding: 23px 19px;
  }

  .dialog-hero {
    gap: 16px;
    padding-right: 20px;
  }

  .badge-medallion--lg {
    width: 80px;
    height: 80px;
  }

  .badge-medallion--lg .badge-medallion__icon {
    width: 31px;
    height: 31px;
  }

  .dialog-title {
    font-size: 30px;
  }

  .dialog-description {
    margin-top: 17px;
    font-size: 11.5px;
  }

  .dialog-stats {
    gap: 0;
  }

  .dialog-stat {
    padding: 10px 10px;
  }

  .dialog-stat:first-child {
    padding-left: 0;
  }

  .dialog-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .dialog-footer .button {
    width: 100%;
  }

  .footer-inner {
    flex-wrap: wrap;
    row-gap: 10px;
    padding-top: 18px;
    padding-bottom: 18px;
  }

  .footer-brand span {
    display: none;
  }

  .footer-top {
    margin-left: auto;
  }
}

@media (max-width: 560px) {
  .page-title {
    font-size: clamp(39px, 11.8vw, 56px);
    letter-spacing: 0.08em;
  }

  .intro-crosshair {
    display: none;
  }

  .status-line {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .status-micro {
    display: none;
  }

  .profile-name {
    font-size: clamp(27px, 8.8vw, 34px);
  }

  .profile-meta span:last-child {
    display: none;
  }

  .profile-actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .profile-actions .button {
    width: 100%;
  }

  .profile-signals {
    gap: 6px 12px;
  }

  .profile-signals span:last-child {
    display: none;
  }

  .perks {
    margin-top: 14px;
  }

  .achievements-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .achievement-card {
    min-height: 0;
    padding: 18px;
  }

  .achievement-card__desc {
    -webkit-line-clamp: 3;
  }

  .achievement-card__footer {
    padding-top: 13px;
  }

  .dialog-panel {
    padding: 22px 17px;
  }

  .dialog-chips {
    margin-top: 12px;
  }

  .dialog-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dialog-stat:nth-child(3) {
    grid-column: 1 / -1;
    padding-top: 10px;
    padding-left: 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-top {
    margin-left: 0;
  }

  .toast {
    bottom: 16px;
    width: max-content;
  }
}

@media (max-width: 380px) {
  .brand-word {
    font-size: 8px;
    letter-spacing: 0.24em;
  }

  .buy-ticket {
    min-width: 98px;
    padding: 0 8px;
  }

  .avatar-wrap {
    width: 82px;
    height: 82px;
  }

  .avatar-block {
    gap: 12px;
  }

  .profile-name {
    font-size: 26px;
  }

  .stats {
    grid-template-columns: minmax(0, 1fr);
  }

  .stat,
  .stat:first-child,
  .stat:last-child {
    padding: 15px 0;
  }

  .stat + .stat {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .stat:nth-child(3) {
    border-left: 0;
  }

  .dialog-hero {
    flex-direction: column;
    gap: 15px;
  }

  .dialog-badge {
    padding-top: 0;
  }

  .dialog-stats {
    grid-template-columns: minmax(0, 1fr);
  }

  .dialog-stat {
    padding: 10px 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .dialog-stat:nth-child(3) {
    display: block;
    grid-column: auto;
    border-top: 1px solid var(--line);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================================
   ИНСОМНИЯ — profile v3
   Ticket-shaped identity, stage application panel, achievements without
   counters. Base tokens/components are bundled at the top of this file.
   ========================================================================== */

.v3-profile-layout {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  gap: 20px;
  align-items: start;
}

/* ---------------------------------------------------------------------------
   Profile ticket
   ------------------------------------------------------------------------- */

.ticket {
  position: relative;
  display: flex;
  min-height: 292px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.17);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.035), transparent 38%),
    #0a0c0f;
  isolation: isolate;
  animation: v2-rise 0.8s var(--ease) 0.08s both;
}

.ticket::before {
  content: "";
  position: absolute;
  top: 0;
  left: 8%;
  width: 42%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb), 0.75), transparent);
}

.ticket.is-updating {
  animation: v2-swap 0.4s var(--ease) both;
}

.ticket-main {
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: center;
  gap: clamp(24px, 3.4vw, 40px);
  padding: clamp(24px, 3.5vw, 42px);
}

.ticket-avatar {
  flex: none;
}

.ticket-avatar .avatar-wrap {
  width: clamp(104px, 9vw, 132px);
  height: clamp(104px, 9vw, 132px);
}

.ticket-avatar .avatar-orbit {
  inset: -10px;
}

.ticket-avatar .avatar-initials {
  font-size: clamp(26px, 3.1vw, 38px);
}

.ticket-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
}

.ticket-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 8.5px;
  font-weight: 300;
  letter-spacing: 0.18em;
  line-height: 1.3;
  text-transform: uppercase;
}

.ticket-status::before {
  content: "";
  width: 5px;
  height: 5px;
  flex: none;
  background: currentColor;
  box-shadow: 0 0 8px rgba(var(--accent-rgb), 0.5);
}

.ticket[data-status="unpaid"] .ticket-status {
  color: var(--muted);
}

.ticket[data-status="unpaid"] .ticket-status::before {
  box-shadow: none;
}

.ticket[data-status="master"] .ticket-status,
.ticket[data-status="admin"] .ticket-status {
  color: var(--accent);
}

.ticket-name {
  max-width: 100%;
  margin-top: 14px;
  color: #fff;
  font-family: var(--font-display);
  font-size: clamp(36px, 4.2vw, 58px);
  font-weight: 200;
  letter-spacing: 0.11em;
  line-height: 0.98;
  text-transform: uppercase;
  text-wrap: balance;
}

.ticket-id-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
}

.ticket-id-label {
  color: var(--dim);
  font-family: var(--font-display);
  font-size: 6.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.ticket-id-copy {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 0 3px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.78);
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 0.13em;
  line-height: 1.2;
  text-transform: uppercase;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.ticket-id-copy:hover {
  border-color: rgba(var(--accent-rgb), 0.7);
  color: #fff;
}

.ticket-id-copy .icon {
  width: 12px;
  height: 12px;
  color: var(--accent);
}

.ticket-stub {
  position: relative;
  display: flex;
  width: 206px;
  flex: none;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  padding: 28px 22px;
  border-left: 1px dashed rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.018);
}

.ticket-stub::before,
.ticket-stub::after {
  content: "";
  position: absolute;
  left: -8px;
  z-index: 2;
  width: 15px;
  height: 15px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--bg);
}

.ticket-stub::before {
  top: -8px;
}

.ticket-stub::after {
  bottom: -8px;
}

.ticket-stub-kicker {
  color: var(--dim);
  font-family: var(--font-display);
  font-size: 6.5px;
  letter-spacing: 0.17em;
  line-height: 1.4;
  text-transform: uppercase;
}

.ticket-days {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 5px;
}

.ticket-days b {
  color: #fff;
  font-family: var(--font-display);
  font-size: clamp(42px, 4.2vw, 56px);
  font-weight: 200;
  letter-spacing: 0.01em;
  line-height: 0.86;
}

.ticket-days span {
  color: var(--dim);
  font-family: var(--font-display);
  font-size: 7px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ticket-stub-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 20px;
  color: rgba(255, 255, 255, 0.42);
  font-family: var(--font-display);
  font-size: 6.5px;
  letter-spacing: 0.13em;
  line-height: 1.4;
  text-transform: uppercase;
}

.ticket-barcode {
  width: 100%;
  height: 24px;
  margin-top: 18px;
  opacity: 0.5;
  background: repeating-linear-gradient(
    90deg,
    var(--accent) 0 1px,
    transparent 1px 4px,
    rgba(255, 255, 255, 0.45) 4px 5px,
    transparent 5px 8px
  );
}

/* ---------------------------------------------------------------------------
   Stage application panel
   ------------------------------------------------------------------------- */

.application-panel {
  display: flex;
  min-height: 292px;
  flex-direction: column;
  padding: 24px;
  border: 1px solid var(--line);
  background: rgba(10, 12, 15, 0.76);
}

.application-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
  color: var(--dim);
  font-family: var(--font-display);
  font-size: 7px;
  font-weight: 300;
  letter-spacing: 0.16em;
  line-height: 1.4;
  text-transform: uppercase;
}

.application-index {
  color: rgba(255, 255, 255, 0.26);
}

.application-content {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.application-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.application-add {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 14px;
  padding: 17px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: #fff;
  text-align: left;
  transition: background-color 0.2s ease, padding-left 0.3s var(--ease);
}

.application-add:hover {
  padding-left: 6px;
  background: rgba(255, 255, 255, 0.025);
}

.application-add__plus {
  display: grid;
  width: 34px;
  height: 34px;
  flex: none;
  place-items: center;
  border: 1px solid var(--line-strong);
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 200;
  line-height: 1;
}

.application-add__copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 4px;
}

.application-add__copy strong {
  color: #fff;
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 300;
  letter-spacing: 0.13em;
  line-height: 1.3;
  text-transform: uppercase;
}

.application-add__copy span {
  color: var(--dim);
  font-family: var(--font-body);
  font-size: 8.5px;
  line-height: 1.4;
}

.application-add > .icon {
  width: 13px;
  height: 13px;
  flex: none;
  color: var(--muted);
}

.application-card {
  display: flex;
  flex-direction: column;
  padding: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.018);
}

.application-add--more {
  margin-top: 0;
}

.application-card__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.application-card__label {
  color: var(--dim);
  font-family: var(--font-display);
  font-size: 6.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.application-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 6.5px;
  font-weight: 300;
  letter-spacing: 0.13em;
  line-height: 1.3;
  text-transform: uppercase;
}

.application-status::before {
  content: "";
  width: 4px;
  height: 4px;
  flex: none;
  background: currentColor;
}

.application-status[data-status="review"] {
  color: #b7c8ff;
}

.application-status[data-status="approved"] {
  color: #dce2ff;
}

.application-status[data-status="rejected"],
.application-status[data-status="withdrawn"] {
  color: var(--muted);
}

.application-card__title {
  display: inline-block;
  max-width: 220px;
  margin-top: 14px;
  overflow: hidden;
  color: #fff;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 200;
  letter-spacing: 0.1em;
  line-height: 1.1;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.application-card__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-top: 14px;
  color: rgba(255, 255, 255, 0.58);
  font-family: var(--font-display);
  font-size: 7.5px;
  letter-spacing: 0.09em;
  line-height: 1.4;
  text-transform: uppercase;
}

.application-card__facts span + span::before {
  content: "/";
  margin-right: 12px;
  color: rgba(255, 255, 255, 0.2);
}

.application-card__meta {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  color: var(--dim);
  font-family: var(--font-body);
  font-size: 8.5px;
  line-height: 1.5;
}

.application-card__comment {
  margin-top: 12px;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 9.5px;
  line-height: 1.55;
}

/* ---------------------------------------------------------------------------
   Unpaid state: visible, but visibly unavailable
   ------------------------------------------------------------------------- */

.access-note {
  margin: 0 0 13px;
  padding: 9px 11px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-left: 1px solid rgba(var(--accent-rgb), 0.45);
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 8.5px;
  line-height: 1.55;
}

.achievements-lock {
  margin: 16px 0 0;
}

body[data-access="unpaid"] .application-content {
  opacity: 0.38;
  filter: grayscale(1);
  pointer-events: none;
}

body[data-access="unpaid"] .application-add {
  cursor: default;
}

body[data-access="unpaid"] .application-add:hover {
  padding-left: 0;
  background: transparent;
}

.application-add:disabled {
  cursor: default;
}

.application-add:disabled:hover {
  padding-left: 0;
  background: transparent;
}

/* ---------------------------------------------------------------------------
   Application form dialog
   ------------------------------------------------------------------------- */

.application-dialog {
  position: fixed;
  inset: 0;
  width: min(720px, calc(100vw - 32px));
  max-width: 720px;
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background:
    radial-gradient(80% 50% at 86% -10%, rgba(var(--accent-rgb), 0.12), transparent 62%),
    #0b0d10;
  color: var(--white);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.8);
  scrollbar-width: thin;
  scrollbar-color: #343b4c transparent;
}

.application-dialog[open] {
  animation: v2-dialog-in 0.28s var(--ease) both;
}

.application-dialog::backdrop {
  background: rgba(3, 4, 7, 0.84);
  animation: v2-fade-in 0.24s ease both;
}

.application-dialog__panel {
  position: relative;
  padding: clamp(25px, 4.4vw, 38px);
}

.application-form-title {
  margin-top: 20px;
  color: #fff;
  font-family: var(--font-display);
  font-size: clamp(30px, 4.2vw, 42px);
  font-weight: 200;
  letter-spacing: 0.11em;
  line-height: 1;
  text-transform: uppercase;
}

.application-form-lead {
  max-width: 480px;
  margin-top: 13px;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 11.5px;
  line-height: 1.65;
}

.application-form {
  margin-top: 26px;
}

.application-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px 16px;
}

.field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 7px;
}

.field--wide {
  grid-column: 1 / -1;
}

.field > span {
  color: var(--dim);
  font-family: var(--font-display);
  font-size: 7px;
  letter-spacing: 0.11em;
  line-height: 1.3;
  text-transform: uppercase;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 40px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 0;
  outline: none;
  background: rgba(255, 255, 255, 0.025);
  color: #fff;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 300;
  line-height: 1.4;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.field select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(255, 255, 255, 0.5) 50%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.5) 50%, transparent 50%);
  background-position:
    calc(100% - 15px) 17px,
    calc(100% - 11px) 17px;
  background-repeat: no-repeat;
  background-size: 4px 4px, 4px 4px;
}

.field textarea {
  min-height: 92px;
  resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder {
  color: rgba(255, 255, 255, 0.25);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: rgba(var(--accent-rgb), 0.65);
  background: rgba(255, 255, 255, 0.04);
}

.field-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 9.5px;
  line-height: 1.5;
}

.field-checkbox input {
  width: 14px;
  height: 14px;
  flex: none;
  margin-top: 1px;
  accent-color: var(--accent);
}

.application-form-error {
  margin-top: 15px;
  padding: 9px 11px;
  border: 1px solid rgba(255, 140, 165, 0.3);
  color: #ffb3c1;
  font-size: 10px;
  line-height: 1.5;
}

.application-form-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.application-dialog .dialog-close {
  z-index: 4;
}

.dialog-close__mark {
  display: block;
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 200;
  line-height: 1;
  transform: translateY(-1px);
}

/* ---------------------------------------------------------------------------
   Achievements: no collection counter, no legend
   ------------------------------------------------------------------------- */

.achievements {
  margin-top: clamp(46px, 5.2vw, 66px);
}

.achievements .section-head {
  align-items: flex-start;
}

.achievements .section-title {
  margin-top: 16px;
}

/* ---------------------------------------------------------------------------
   Minimal badge collection
   ------------------------------------------------------------------------- */

.badge-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  align-items: start;
  gap: clamp(25px, 3.2vw, 38px) 12px;
  margin-top: 34px;
}

.achievement-badge {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 4px 6px 8px;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  text-align: center;
}

.achievement-badge__token {
  display: grid;
  width: 96px;
  height: 96px;
  place-items: center;
  transition: transform 0.3s var(--ease), opacity 0.3s ease;
}

.achievement-badge .badge-medallion {
  width: 96px;
  height: 96px;
  margin: 0;
}

.achievement-badge .badge-medallion__disc {
  inset: 5px;
}

.achievement-badge .badge-medallion__icon {
  width: 34px;
  height: 34px;
}

.achievement-badge__title {
  display: flex;
  min-height: 2.7em;
  max-width: 132px;
  align-items: flex-start;
  justify-content: center;
  color: rgba(255, 255, 255, 0.68);
  font-family: 'Manrope', sans-serif;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1.35;
  text-align: center;
  text-transform: uppercase;
  transition: color 0.25s ease;
}

.achievement-badge:hover .achievement-badge__token {
  transform: translateY(-3px);
}

.achievement-badge:hover .achievement-badge__title {
  color: #fff;
}

.achievement-badge:focus-visible {
  outline: 1px solid rgba(var(--accent-rgb), 0.8);
  outline-offset: 5px;
}

.achievement-badge[data-state="unlocked"] .badge-medallion {
  filter: drop-shadow(0 0 22px rgba(var(--tone), 0.2));
}

.achievement-badge[data-state="unlocked"] .badge-medallion__disc {
  border-color: rgba(var(--tone), 0.64);
  background:
    radial-gradient(circle at 38% 28%, rgba(var(--tone), 0.24), #0b0d10 70%);
}

.achievement-badge[data-state="unlocked"] .badge-medallion__icon {
  color: rgb(var(--tone));
  filter: drop-shadow(0 0 10px rgba(var(--tone), 0.64));
}

.achievement-badge[data-state="unlocked"] .achievement-badge__title {
  color: rgba(255, 255, 255, 0.94);
}

.achievement-badge[data-state="in_progress"] .badge-medallion__disc {
  border-color: rgba(var(--tone), 0.36);
}

.achievement-badge[data-state="in_progress"] .badge-medallion__icon {
  color: rgba(255, 255, 255, 0.9);
}

.achievement-badge[data-state="in_progress"] .achievement-badge__title {
  color: rgba(255, 255, 255, 0.78);
}

.achievement-badge[data-state="locked"] .achievement-badge__token,
.achievement-badge[data-state="access_locked"] .achievement-badge__token {
  opacity: 0.7;
}

.achievement-badge[data-state="locked"] .badge-medallion__progress,
.achievement-badge[data-state="access_locked"] .badge-medallion__progress {
  background: rgba(255, 255, 255, 0.06);
}

.achievement-badge[data-state="locked"] .badge-medallion__disc,
.achievement-badge[data-state="access_locked"] .badge-medallion__disc {
  border-color: rgba(255, 255, 255, 0.08);
  background: #090b0e;
  filter: grayscale(1);
}

.achievement-badge[data-state="locked"] .badge-medallion__icon,
.achievement-badge[data-state="access_locked"] .badge-medallion__icon {
  color: rgba(255, 255, 255, 0.3);
}

.achievement-badge[data-state="locked"] .achievement-badge__title,
.achievement-badge[data-state="access_locked"] .achievement-badge__title {
  color: rgba(255, 255, 255, 0.34);
}

.achievement-badge[data-state="locked"]:hover .achievement-badge__title,
.achievement-badge[data-state="access_locked"]:hover .achievement-badge__title {
  color: var(--muted);
}

/* ---------------------------------------------------------------------------
   Badge detail modal
   ------------------------------------------------------------------------- */

.achievement-dialog {
  width: min(560px, calc(100vw - 32px));
  max-width: 560px;
}

.badge-modal__hero {
  display: flex;
  align-items: center;
  gap: 26px;
  padding: 4px 32px 24px 0;
  border-bottom: 1px solid var(--line);
}

.badge-modal__medallion {
  display: block;
  width: 100px;
  height: 100px;
  flex: none;
}

.badge-modal__heading {
  min-width: 0;
}

.badge-modal__kicker {
  color: var(--dim);
  font-family: var(--font-display);
  font-size: 7px;
  font-weight: 300;
  letter-spacing: 0.16em;
  line-height: 1.4;
  text-transform: uppercase;
}

.badge-modal__title {
  margin-top: 11px;
  color: #fff;
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 200;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.badge-modal__status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 14px;
  color: rgba(255, 255, 255, 0.62);
  font-family: var(--font-display);
  font-size: 7px;
  font-weight: 300;
  letter-spacing: 0.14em;
  line-height: 1.4;
  text-transform: uppercase;
}

.badge-modal__status::before {
  content: "";
  width: 4px;
  height: 4px;
  flex: none;
  background: currentColor;
}

.badge-modal__status[data-state="unlocked"] {
  color: rgb(var(--tone));
}

.badge-modal__status[data-state="in_progress"] {
  color: #c4cfff;
}

.badge-modal__status[data-state="locked"],
.badge-modal__status[data-state="access_locked"] {
  color: var(--muted);
}

.badge-modal__description {
  margin-top: 24px;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 12.5px;
  line-height: 1.75;
}

.badge-modal__unlock {
  margin-top: 24px;
  padding-top: 19px;
  border-top: 1px solid var(--line);
}

.badge-modal__label {
  display: block;
  color: var(--dim);
  font-family: var(--font-display);
  font-size: 7px;
  letter-spacing: 0.15em;
  line-height: 1.4;
  text-transform: uppercase;
}

.badge-modal__unlock p {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.78);
  font-family: var(--font-body);
  font-size: 11px;
  line-height: 1.65;
}

.badge-modal__progress {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 19px;
}

.badge-modal__progress .progress-track {
  flex: 1;
}

.badge-modal__progress > span {
  flex: none;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.badge-modal__paywall {
  margin-top: 22px;
  padding: 11px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-left: 1px solid rgba(var(--accent-rgb), 0.48);
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 9px;
  line-height: 1.6;
}

.badge-modal__footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.achievement-dialog[data-state="unlocked"] .badge-medallion__disc {
  border-color: rgba(var(--tone), 0.62);
  background:
    radial-gradient(circle at 38% 28%, rgba(var(--tone), 0.24), #0b0d10 70%);
}

.achievement-dialog[data-state="unlocked"] .badge-medallion__icon {
  color: rgb(var(--tone));
  filter: drop-shadow(0 0 10px rgba(var(--tone), 0.64));
}

.achievement-dialog[data-state="in_progress"] .badge-medallion__disc {
  border-color: rgba(var(--tone), 0.36);
}

.achievement-dialog[data-state="locked"] .badge-medallion,
.achievement-dialog[data-state="access_locked"] .badge-medallion {
  filter: grayscale(1);
  opacity: 0.6;
}

.achievement-dialog[data-state="locked"] .badge-medallion__icon,
.achievement-dialog[data-state="access_locked"] .badge-medallion__icon {
  color: rgba(255, 255, 255, 0.34);
}

/* ---------------------------------------------------------------------------
   Responsive
   ------------------------------------------------------------------------- */

@media (max-width: 1120px) {
  .v3-profile-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .badge-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .application-panel {
    min-height: 0;
  }

  .application-add {
    max-width: 420px;
  }

  .application-card {
    max-width: 560px;
  }
}

@media (max-width: 760px) {
  .badge-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 26px 8px;
    margin-top: 27px;
  }

  .achievement-badge__token,
  .achievement-badge .badge-medallion {
    width: 84px;
    height: 84px;
  }

  .achievement-badge .badge-medallion__icon {
    width: 30px;
    height: 30px;
  }

  .achievement-badge__title {
    max-width: 104px;
    font-size: 8px;
  }

  .badge-modal__hero {
    align-items: flex-start;
    flex-direction: column;
    gap: 20px;
    padding-right: 30px;
  }

  .ticket {
    flex-direction: column;
    min-height: 0;
  }

  .ticket-main {
    padding: 22px 20px;
    gap: 20px;
  }

  .ticket-avatar .avatar-wrap {
    width: 88px;
    height: 88px;
  }

  .ticket-name {
    font-size: clamp(29px, 8.4vw, 40px);
    letter-spacing: 0.09em;
  }

  .ticket-id-row {
    margin-top: 16px;
  }

  .ticket-stub {
    width: 100%;
    min-height: 76px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 15px 20px;
    border-top: 1px dashed rgba(255, 255, 255, 0.2);
    border-left: 0;
  }

  .ticket-stub::before,
  .ticket-stub::after {
    top: -8px;
    bottom: auto;
  }

  .ticket-stub::before {
    left: -8px;
  }

  .ticket-stub::after {
    right: -8px;
    left: auto;
  }

  .ticket-days {
    margin-top: 0;
  }

  .ticket-days b {
    font-size: 38px;
  }

  .ticket-stub-meta {
    margin-top: 0;
  }

  .ticket-barcode {
    display: none;
  }

  .application-panel {
    padding: 19px;
  }

  .application-form-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .field--wide {
    grid-column: auto;
  }

  .application-dialog__panel {
    padding: 23px 19px;
  }

  .application-form-foot {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .application-form-foot .button {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .badge-grid {
    gap: 24px 5px;
  }

  .achievement-badge {
    gap: 11px;
  }

  .achievement-badge__title {
    font-size: 7.5px;
    letter-spacing: 0.06em;
  }

  .ticket-main {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }

  .ticket-status {
    font-size: 7px;
  }

  .ticket-name {
    margin-top: 10px;
    font-size: 30px;
  }

  .ticket-stub {
    flex-wrap: wrap;
  }

  .ticket-stub-meta {
    width: 100%;
    flex-direction: row;
    gap: 12px;
  }

  .application-add {
    max-width: none;
  }

  .achievements .section-head {
    gap: 0;
  }
}

/* ============================================================================
   Header sync with the landing + readability pass
   ========================================================================== */

:root {
  --header-h: clamp(4.5rem, 7vw, 6rem);
}

.site-header {
  height: var(--header-h);
  border-bottom: 0;
  background: linear-gradient(to bottom, rgba(11, 13, 16, 0.85), transparent);
}

.site-header::after {
  content: "";
  position: absolute;
  right: clamp(1.25rem, 3.5vw, 4.1rem);
  bottom: 0;
  left: clamp(1.25rem, 4.1vw, 4.4rem);
  height: 1px;
  opacity: 0.32;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04) 46%, rgba(255, 255, 255, 0.12));
  pointer-events: none;
}

.header-inner {
  max-width: 1920px;
  gap: 1.25rem;
  padding-left: clamp(1.25rem, 4.1vw, 4.4rem);
  padding-right: clamp(1.25rem, 3.5vw, 4.1rem);
}

.brand-group {
  display: flex;
  min-width: 0;
  align-items: center;
}

.brand {
  gap: clamp(0.8rem, 2.1vw, 2.2rem);
  white-space: nowrap;
}

.brand-mark {
  position: relative;
  display: grid;
  width: clamp(2.75rem, 3.8vw, 4rem);
  height: clamp(2.75rem, 3.8vw, 4rem);
  flex: none;
  place-items: center;
  overflow: hidden;
  color: rgba(242, 245, 248, 0.86);
}

.brand-mark__img,
.brand-mark__fallback {
  display: block;
  width: 100%;
  height: 100%;
}

.brand-mark__img {
  position: absolute;
  top: -35.2%;
  left: -47.8%;
  width: 194%;
  height: 194%;
  max-width: none;
  object-fit: cover;
  filter: drop-shadow(0 0 14px rgba(154, 144, 255, 0.16));
}

.brand-mark__fallback {
  object-fit: contain;
  transition: transform 800ms var(--ease);
}

.brand:hover .brand-mark__fallback {
  transform: rotate(-12deg);
}

.brand-word {
  color: rgba(255, 255, 255, 0.94);
  font-family: var(--font-body);
  font-size: clamp(0.69rem, 0.84vw, 0.86rem);
  font-weight: 300;
  letter-spacing: 0.38em;
  line-height: 1;
  transform: translateX(0.06em);
}

.brand-rule {
  display: none;
  width: clamp(3rem, 9.2vw, 9.6rem);
  height: 1px;
  margin-left: clamp(1rem, 3.2vw, 3.8rem);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0));
}

@media (min-width: 1024px) {
  .brand-rule {
    display: block;
  }
}

@media (max-width: 760px) {
  :root {
    --header-h: 4.7rem;
  }

  .brand-mark {
    width: 44px;
    height: 44px;
  }

  .brand-word {
    font-size: 0.69rem;
    letter-spacing: 0.38em;
  }
}

/* Fluid badge collection */
.badge-grid {
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 18px 8px;
  margin-top: 30px;
}

/* Application card + application modal readability */
.application-panel__head {
  font-size: 8.5px;
}

.application-add__copy strong {
  font-size: 10.5px;
}

.application-add__copy span {
  font-size: 9.5px;
}

.application-card {
  padding: 16px;
}

.application-card__label {
  font-size: 8px;
}

.application-status {
  font-size: 8px;
}

.application-card__title {
  font-size: 22px;
}

.application-card__facts {
  font-size: 9px;
}

.application-card__meta {
  font-size: 9.5px;
}

.access-note {
  padding: 11px 13px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 10.5px;
  line-height: 1.55;
}

.application-form-lead {
  font-size: 12.5px;
}

.field > span {
  font-size: 8.5px;
}

.field input,
.field select,
.field textarea {
  font-size: 12px;
}

.field-checkbox {
  font-size: 10.5px;
}

.application-form-error {
  font-size: 11px;
}

.badge-modal__kicker {
  font-size: 8px;
}

.badge-modal__status {
  font-size: 8px;
}

.badge-modal__description {
  font-size: 13.5px;
}

.badge-modal__label {
  font-size: 8px;
}

.badge-modal__unlock p {
  font-size: 12px;
}

.badge-modal__progress > span {
  font-size: 10px;
}

.badge-modal__paywall {
  font-size: 10.5px;
}

/* ============================================================================
   Requested layout/typography pass
   ========================================================================== */

.title-row .page-title {
  color: #f2f3f5;
  font-family: 'Jost', sans-serif;
  font-size: clamp(1.5rem, 4.8vw, 4rem);
  font-weight: 400;
  letter-spacing: 0.3em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  text-wrap: nowrap;
}

.profile-dashboard {
  position: relative;
  z-index: 3;
}

.profile-rail {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 14px;
}

.status-summary {
  padding: 18px 20px;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(var(--accent-rgb), 0.07), rgba(255, 255, 255, 0.012));
}

.status-summary__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--dim);
  font-family: var(--font-display);
  font-size: 8px;
  letter-spacing: 0.16em;
  line-height: 1.4;
  text-transform: uppercase;
}

.status-summary__value {
  display: block;
  margin-top: 12px;
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 300;
  letter-spacing: 0.1em;
  line-height: 1.1;
  text-transform: uppercase;
}

.status-summary__meta {
  margin-top: 6px;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 10.5px;
  line-height: 1.5;
}

.ticket-status {
  gap: 9px;
  padding: 7px 11px;
  border: 1px solid rgba(var(--accent-rgb), 0.45);
  background: rgba(var(--accent-rgb), 0.08);
  font-size: 10px;
  letter-spacing: 0.15em;
}

.ticket[data-status="unpaid"] .ticket-status {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.025);
}

.ticket[data-status="unpaid"] .ticket-status::before {
  box-shadow: none;
}

.avatar.has-logo .avatar-art,
.avatar.has-logo .avatar-initials {
  opacity: 0;
}

.avatar-logo {
  position: absolute;
  top: -35.2%;
  left: -47.8%;
  z-index: 2;
  width: 194%;
  height: 194%;
  max-width: none;
  border-radius: 50%;
  object-fit: cover;
  pointer-events: none;
  filter: drop-shadow(0 0 22px rgba(var(--accent-rgb), 0.18));
}

.ticket-stub-kicker {
  font-size: 8px;
}

.ticket-stub-meta {
  gap: 6px;
  font-size: 9.5px;
}

.ticket-days span {
  font-size: 8.5px;
}

.site-nav a {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.17em;
  line-height: 1;
}

.profile-icon {
  width: 38px;
  height: 38px;
}

.buy-ticket {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.15em;
}

.buy-ticket .ticket-plus {
  font-size: 17px;
}

.role-trigger-label {
  font-size: 11px;
}

.role-trigger-code {
  font-size: 8px;
}

.role-switch-caption,
.demo-label {
  font-size: 8px;
}

.application-panel {
  min-height: 0;
}

.application-list {
  max-height: 230px;
  overflow-y: auto;
  padding-right: 6px;
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--accent-rgb), 0.38) transparent;
}

.application-list::-webkit-scrollbar {
  width: 5px;
}

.application-list::-webkit-scrollbar-track {
  background: transparent;
}

.application-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.34);
}

.application-list::-webkit-scrollbar-thumb:hover {
  background: rgba(var(--accent-rgb), 0.58);
}

.profile-dashboard .achievements {
  margin-top: clamp(42px, 5vw, 60px);
}

@media (max-width: 760px) {
  .title-row .page-title {
    font-size: clamp(1.5rem, 7.2vw, 2.5rem);
    letter-spacing: 0.2em;
  }

  .status-summary {
    padding: 15px 16px;
  }

  .status-summary__value {
    font-size: 17px;
  }

  .application-list {
    max-height: 210px;
  }
}

/* ============================================================================
   Countdown + QR, unpaid card and compact application column
   ========================================================================== */

.avatar {
  border: 0;
}

.avatar-orbit {
  border-color: rgba(var(--accent-rgb), 0.34);
}

.avatar-orbit::before,
.avatar-orbit::after {
  display: none;
}

.v3-profile-layout {
  grid-template-columns: minmax(0, 1fr) 350px;
}

.countdown-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 17px 18px;
  border: 1px solid rgba(255, 255, 255, 0.17);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012)),
    #090b0e;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.3);
}

.countdown-card__copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.countdown-card__label {
  color: var(--dim);
  font-family: var(--font-display);
  font-size: 8px;
  letter-spacing: 0.18em;
  line-height: 1.3;
  text-transform: uppercase;
}

.countdown-card .ticket-days {
  margin-top: 9px;
}

.countdown-card .ticket-days b {
  font-size: clamp(32px, 2.8vw, 40px);
}

.countdown-card .ticket-days span {
  font-size: 8.5px;
}

.countdown-card__date {
  margin-top: 8px;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 9.5px;
  line-height: 1.45;
}

.ticket-qr {
  display: flex;
  width: 92px;
  height: 105px;
  flex: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 7px;
  border: 1px solid rgba(var(--accent-rgb), 0.42);
  background: #0b0d10;
}

.ticket-qr svg {
  width: 78px;
  height: 78px;
}

.ticket-qr > span {
  color: var(--dim);
  font-family: var(--font-display);
  font-size: 6px;
  letter-spacing: 0.14em;
  line-height: 1;
  text-transform: uppercase;
}

.application-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 200px;
  gap: 12px;
  align-items: stretch;
}

body[data-access="active"] .application-row,
body.is-paid .application-row {
  grid-template-columns: minmax(0, 1fr);
}

body.is-paid .unpaid-panel {
  display: none;
}

.unpaid-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 17px 16px;
  border: 1px solid rgba(var(--accent-rgb), 0.3);
  background:
    linear-gradient(160deg, rgba(var(--accent-rgb), 0.08), rgba(255, 255, 255, 0.012));
}

.unpaid-panel__label {
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 7.5px;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.unpaid-panel strong {
  color: #fff;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 300;
  letter-spacing: 0.06em;
  line-height: 1.15;
  text-transform: uppercase;
}

.unpaid-panel p {
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 10px;
  line-height: 1.55;
}

.unpaid-panel a {
  margin-top: auto;
  padding-bottom: 2px;
  border-bottom: 1px solid rgba(var(--accent-rgb), 0.55);
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

@media (max-width: 1120px) {
  .v3-profile-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  .application-row {
    grid-template-columns: minmax(0, 1fr) 170px;
  }

  .unpaid-panel {
    padding: 14px;
  }

  .unpaid-panel strong {
    font-size: 15px;
  }

  .ticket-qr {
    width: 82px;
    height: 94px;
  }

  .ticket-qr svg {
    width: 68px;
    height: 68px;
  }
}

@media (max-width: 560px) {
  .application-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .unpaid-panel {
    min-height: 150px;
  }
}

.badge-grid {
  gap: 24px 14px;
}

@media (max-width: 760px) {
  .badge-grid {
    gap: 22px 10px;
  }
}

/* Ticket stub restored, with generated QR in the freed bottom space */
.ticket-stub {
  justify-content: flex-start;
}

.ticket-stub__info {
  display: flex;
  flex-direction: column;
}

.ticket-stub .ticket-qr {
  width: 88px;
  height: 88px;
  margin-top: auto;
  padding: 5px;
  border: 1px solid rgba(var(--accent-rgb), 0.4);
  background: #f2f3f5;
}

.ticket-stub .ticket-qr svg {
  width: 100%;
  height: 100%;
}

/* Keep the application panel bounded by the profile ticket height */
.application-panel {
  height: 292px;
  max-height: 292px;
  overflow: hidden;
}

.application-content {
  min-height: 0;
  flex: 1;
  overflow: hidden;
}

.application-list {
  min-height: 0;
  flex: 1;
  max-height: none;
  overflow-y: auto;
}

.application-add {
  flex: none;
}

@media (max-width: 1120px) {
  .application-panel {
    height: auto;
    max-height: none;
  }
}

/* ============================================================================
   PocketBase auth, account badge and ticket-code fallback
   ========================================================================== */

body[data-role="moderator"] {
  --accent: #b7c8ff;
  --accent-rgb: 183, 200, 255;
  --accent-2: #dce4ff;
}

.auth-panel {
  width: min(500px, 100%);
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 26px;
  border-bottom: 1px solid var(--line);
}

.auth-tab {
  position: relative;
  padding: 12px 8px;
  color: var(--dim);
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.15em;
  line-height: 1.3;
  text-align: center;
  text-transform: uppercase;
  transition: color 0.2s ease;
}

.auth-tab:hover,
.auth-tab.is-active {
  color: #fff;
}

.auth-tab.is-active::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 1px;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.5);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 22px;
}

.auth-form .field input {
  min-height: 44px;
  background: rgba(255, 255, 255, 0.03);
  font-size: 12px;
}

.auth-form .field input:-webkit-autofill,
.auth-form .field input:-webkit-autofill:hover,
.auth-form .field input:-webkit-autofill:focus {
  -webkit-text-fill-color: #fff;
  box-shadow: 0 0 0 40px #11141a inset;
}

.auth-submit {
  width: 100%;
  margin-top: 4px;
}

.auth-submit:disabled {
  cursor: wait;
  opacity: 0.6;
}

.auth-error {
  margin: 0;
  padding: 9px 11px;
  border: 1px solid rgba(255, 140, 165, 0.3);
  color: #ffb3c1;
  font-family: var(--font-body);
  font-size: 10.5px;
  line-height: 1.5;
}

.boot-foot {
  margin-top: 22px;
  color: var(--dim);
  font-family: var(--font-body);
  font-size: 9px;
  line-height: 1.55;
}

.account-badge {
  display: flex;
  align-items: center;
  gap: 11px;
  padding-right: 3px;
}

.account-badge__role {
  max-width: 180px;
  overflow: hidden;
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.13em;
  line-height: 1.2;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.account-logout {
  padding: 4px 0 3px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.24);
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 8px;
  letter-spacing: 0.12em;
  line-height: 1.2;
  text-transform: uppercase;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.account-logout:hover {
  border-color: rgba(var(--accent-rgb), 0.7);
  color: #fff;
}

.ticket-qr > .ticket-qr__code {
  max-width: 78px;
  color: #0b0d10;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1.25;
  text-align: center;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.ticket-qr > .ticket-qr__empty {
  max-width: 72px;
  color: rgba(11, 13, 16, 0.55);
  font-family: var(--font-display);
  font-size: 7px;
  letter-spacing: 0.1em;
  line-height: 1.4;
  text-align: center;
  text-transform: uppercase;
}

@media (max-width: 760px) {
  .account-badge {
    gap: 8px;
  }

  .account-badge__role {
    display: none;
  }

  .auth-panel {
    padding: 24px 20px;
  }
}

/* The dev role switcher was removed from the intro, so let the title span it. */
.intro {
  grid-template-columns: minmax(0, 1fr);
}

/* ============================================================================
   Centered ticket stub, QR ticket and paid-user header CTA
   ========================================================================== */

.buy-ticket.is-hidden {
  display: none !important;
}

.ticket-stub {
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 24px 18px;
  text-align: center;
}

.ticket-stub__info {
  width: 100%;
  align-items: center;
}

.ticket-stub-meta {
  align-items: center;
}

.ticket-stub .ticket-qr {
  display: flex;
  width: 116px;
  height: 116px;
  margin-top: 0;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 8px;
  border: 0;
  border-radius: 6px;
  background: #ffffff;
}

.ticket-stub .ticket-qr svg {
  display: block;
  width: 100%;
  height: 100%;
}

.ticket-qr > .ticket-qr__code {
  max-width: 100%;
  color: #0b0d10;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1.25;
  text-align: center;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.ticket-qr > .ticket-qr__locked {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  max-width: 84px;
  color: rgba(11, 13, 16, 0.48);
  font-family: var(--font-display);
  font-size: 7.5px;
  letter-spacing: 0.1em;
  line-height: 1.35;
  text-align: center;
  text-transform: uppercase;
}

.ticket-qr__lock-icon {
  width: 26px;
  height: 26px;
  color: rgba(11, 13, 16, 0.38);
}

@media (max-width: 760px) {
  .ticket-stub {
    gap: 22px;
    padding: 18px 20px;
  }
}

/* ============================================================================
   Inline nickname editor and header divider cleanup
   ========================================================================== */

.header-divider[hidden] {
  display: none !important;
}

.ticket-name-row {
  display: flex;
  max-width: 100%;
  min-width: 0;
  align-items: flex-start;
  gap: 10px;
}

.ticket-name-row .ticket-name {
  min-width: 0;
  flex: 1;
  overflow-wrap: anywhere;
}

.ticket-name-edit {
  display: grid;
  width: 32px;
  height: 32px;
  flex: none;
  margin-top: 20px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--muted);
  opacity: 0.58;
  transition:
    opacity 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    background-color 0.2s ease;
}

.ticket-name-edit:hover,
.ticket-name-edit:focus-visible {
  border-color: rgba(var(--accent-rgb), 0.55);
  background: rgba(var(--accent-rgb), 0.06);
  color: #fff;
  opacity: 1;
}

.ticket-name-edit .icon {
  width: 14px;
  height: 14px;
}

.ticket-name-editor {
  display: flex;
  width: min(100%, 520px);
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.ticket-name-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  outline: none;
  background: rgba(255, 255, 255, 0.035);
  color: #fff;
  font-family: var(--font-display);
  font-size: clamp(25px, 3.2vw, 38px);
  font-weight: 200;
  letter-spacing: 0.08em;
  line-height: 1.1;
  text-transform: uppercase;
}

.ticket-name-input:focus {
  border-color: rgba(var(--accent-rgb), 0.7);
  background: rgba(255, 255, 255, 0.05);
}

.ticket-name-editor__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.ticket-name-save,
.ticket-name-cancel {
  padding: 7px 10px;
  font-family: var(--font-display);
  font-size: 8px;
  font-weight: 400;
  letter-spacing: 0.13em;
  line-height: 1.2;
  text-transform: uppercase;
}

.ticket-name-save {
  border: 1px solid rgba(var(--accent-rgb), 0.62);
  background: rgba(var(--accent-rgb), 0.1);
  color: #fff;
}

.ticket-name-save:hover {
  background: rgba(var(--accent-rgb), 0.18);
}

.ticket-name-save:disabled,
.ticket-name-cancel:disabled {
  cursor: wait;
  opacity: 0.55;
}

.ticket-name-cancel {
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
  color: var(--muted);
}

.ticket-name-cancel:hover {
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
}

.ticket-name-error {
  flex-basis: 100%;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid rgba(255, 140, 165, 0.3);
  color: #ffb3c1;
  font-family: var(--font-body);
  font-size: 10px;
  line-height: 1.5;
}

@media (max-width: 560px) {
  .ticket-name-edit {
    width: 29px;
    height: 29px;
    margin-top: 15px;
  }

  .ticket-name-input {
    font-size: 25px;
  }

  .ticket-name-save,
  .ticket-name-cancel {
    padding: 8px 9px;
  }
}

/* ============================================================================
   Legible technical labels + left-aligned countdown column
   ========================================================================== */

.eyebrow {
  font-size: 8.5px;
  letter-spacing: 0.22em;
}

.ticket-status {
  font-size: 11.5px;
  letter-spacing: 0.16em;
}

.ticket-stub-kicker {
  font-size: 9.5px;
  letter-spacing: 0.18em;
}

.ticket-id-label {
  font-size: 7.5px;
  letter-spacing: 0.2em;
}

.status-summary__head {
  font-size: 9.5px;
  letter-spacing: 0.17em;
}

.application-panel__head {
  font-size: 10px;
  letter-spacing: 0.17em;
}

.application-index {
  font-size: 10px;
}

.application-card__label {
  font-size: 9.5px;
  letter-spacing: 0.17em;
}

.application-status {
  font-size: 9.5px;
  letter-spacing: 0.14em;
}

.badge-modal__kicker,
.badge-modal__label {
  font-size: 9.5px;
  letter-spacing: 0.18em;
}

.badge-modal__status {
  font-size: 9.5px;
  letter-spacing: 0.15em;
}

.account-badge__role {
  font-size: 10px;
  letter-spacing: 0.14em;
}

.ticket-stub {
  text-align: left;
}

.ticket-stub__info {
  width: 116px;
  align-items: flex-start;
  text-align: left;
}

.ticket-stub .ticket-days {
  justify-content: flex-start;
}

.ticket-stub-meta {
  align-items: flex-start;
  text-align: left;
}

/* Native select dropdowns on Windows must not render white-on-white. */
.field select {
  color-scheme: dark;
}

.field select option,
.field select optgroup {
  background-color: #0b0d10;
  color: #f5f6f8;
}

.field select option:checked {
  background-color: #29304a;
  color: #ffffff;
}

/* ============================================================================
   Application review / revision workflow
   ========================================================================== */

.application-status[data-status="submitted"] {
  color: #b7c8ff;
}

.application-status[data-status="needs_revision"] {
  color: #ffd08a;
}

.application-status[data-status="approved"] {
  color: #dce2ff;
}

.application-status[data-status="rejected"] {
  color: var(--muted);
}

.application-status-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-top: 18px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
}

.application-status-panel__note {
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 10px;
  line-height: 1.45;
}

.application-revision-banner {
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 208, 138, 0.4);
  border-left: 2px solid #ffd08a;
  background: rgba(255, 208, 138, 0.06);
}

.application-revision-banner strong {
  display: block;
  color: #ffd08a;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.14em;
  line-height: 1.4;
  text-transform: uppercase;
}

.application-revision-banner p {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.78);
  font-family: var(--font-body);
  font-size: 11px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.application-card__open {
  align-self: flex-start;
  margin-top: 14px;
  padding: 7px 9px 6px;
  border: 1px solid rgba(var(--accent-rgb), 0.45);
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 7.5px;
  letter-spacing: 0.13em;
  line-height: 1.2;
  text-transform: uppercase;
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.application-card__open:hover {
  border-color: rgba(var(--accent-rgb), 0.8);
  background: rgba(var(--accent-rgb), 0.08);
  color: #fff;
}

.application-form.is-readonly .field input,
.application-form.is-readonly .field select,
.application-form.is-readonly .field textarea,
.application-form.is-readonly .field-checkbox input {
  cursor: not-allowed;
  opacity: 0.62;
}

.application-form.is-readonly .field select {
  background-image: none;
}

/* Ticket width: previous step (stub width shifted from the ticket into apps). */
@media (min-width: 1280px) {
  .v3-profile-layout {
    grid-template-columns: minmax(0, 1fr) calc(350px + 206px);
  }
}

@media (min-width: 1121px) and (max-width: 1279px) {
  .v3-profile-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Horizontal application row: action button lives on the right surface. */
.application-panel {
  height: auto;
  max-height: none;
  overflow: visible;
}

.application-content {
  min-height: 0;
  overflow: visible;
}

.application-list {
  min-height: 0;
  max-height: none;
  flex: initial;
  overflow: visible;
}

.application-card {
  display: flex;
  width: 100%;
  max-width: none;
  flex-direction: row;
  align-items: center;
  gap: 18px;
  padding: 16px 18px;
}

.application-card__main {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
}

.application-card__title {
  max-width: 100%;
  margin-top: 8px;
  font-size: clamp(18px, 1.8vw, 24px);
}

.application-card__facts {
  margin-top: 8px;
}

.application-card__meta {
  margin-top: 8px;
  padding-top: 0;
  border-top: 0;
}

.application-card__side {
  display: flex;
  min-width: 150px;
  flex: none;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
}

.application-card__open {
  display: inline-flex;
  margin-top: 0;
  align-self: flex-end;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .application-card {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 14px;
  }

  .application-card__side {
    width: 100%;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

/* Desktop: cap the applications panel to the ticket height and scroll the list. */
@media (min-width: 1280px) {
  .application-panel {
    height: var(--application-panel-height, 292px);
    max-height: var(--application-panel-height, 292px);
    overflow: hidden;
  }

  .application-content {
    min-height: 0;
    overflow: hidden;
  }

  .application-list {
    min-height: 0;
    flex: 1;
    max-height: none;
    overflow-y: auto;
    padding-right: 6px;
  }
}

/* Right-aligned application meta column */
.application-card__side {
  min-width: 220px;
  align-items: flex-end;
  gap: 10px;
  text-align: right;
}

.application-card__side .application-card__meta {
  max-width: 220px;
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
  text-align: right;
}

.application-card__side .application-card__label {
  color: rgba(255, 255, 255, 0.82);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  line-height: 1.2;
}

.application-card__open {
  min-width: 112px;
  justify-content: center;
  padding: 11px 15px 10px;
  font-size: 9px;
  letter-spacing: 0.12em;
}

@media (max-width: 760px) {
  .application-card__side {
    min-width: 0;
    flex-wrap: wrap;
    gap: 10px 16px;
    text-align: left;
  }

  .application-card__side .application-card__label {
    flex-basis: 100%;
  }

  .application-card__side .application-card__meta {
    max-width: none;
    flex-basis: 100%;
    text-align: left;
  }
}

/* Card header on top, button + note stacked on the right. */
.application-card {
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}

.application-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.application-card__head .application-card__label {
  color: rgba(255, 255, 255, 0.82);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  line-height: 1.2;
}

.application-card__body {
  display: flex;
  align-items: flex-start;
  gap: 18px;
}

.application-card__side {
  min-width: 220px;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 10px;
  text-align: right;
}

.application-card__side .application-card__meta {
  max-width: 220px;
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
  text-align: right;
}

@media (max-width: 760px) {
  .application-card__head {
    flex-wrap: wrap;
  }

  .application-card__body {
    flex-direction: column;
    gap: 12px;
  }

  .application-card__side {
    width: 100%;
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }

  .application-card__side .application-card__meta {
    max-width: none;
    text-align: left;
  }
}


