:root {
  --bg: #07090d;
  --bg-soft: #0a0d13;
  --panel: #0e131b;
  --panel-2: #121925;
  --panel-3: #182131;
  --line: rgba(255, 255, 255, 0.075);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #e9eef7;
  --muted: #8d99ac;
  --muted-2: #626f84;
  --accent: #ff7a00;
  --accent-2: #ffa42e;
  --accent-soft: rgba(255, 122, 0, 0.12);
  --accent-line: rgba(255, 122, 0, 0.32);
  --green: #3ddc97;
  --red: #ff5566;
  --blue: #5b8cff;
  --radius: 18px;
  --radius-sm: 11px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
  --sidebar: 238px;
  --tier: #4b69ff;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background:
    radial-gradient(1100px 600px at 78% -12%, rgba(255, 122, 0, 0.09), transparent 55%),
    radial-gradient(800px 500px at 12% 8%, rgba(91, 140, 255, 0.055), transparent 60%),
    linear-gradient(180deg, #07090d 0%, #080b11 55%, #07090d 100%);
  color: var(--text);
  font-family: "Inter", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, black, transparent 75%);
  z-index: 0;
}

::selection {
  background: rgba(255, 122, 0, 0.35);
  color: #fff;
}

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

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

button {
  cursor: pointer;
}

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

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

.mono {
  font-family: "SF Mono", "JetBrains Mono", ui-monospace, Menlo, monospace;
}

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

.small {
  font-size: 12px;
}

.nowrap {
  white-space: nowrap;
}

.text-green {
  color: var(--green);
}

.text-red {
  color: var(--red);
}

.spacer {
  flex: 1;
}

.hidden {
  display: none !important;
}

.app-root {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

.icon {
  display: inline-flex;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.icon svg {
  width: 100%;
  height: 100%;
}

/* ---------- boot ---------- */
.boot {
  min-height: 100vh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 18px;
  text-align: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--accent-2), #ff5c00);
  color: #140a02;
  font-size: 14px;
  font-weight: 950;
  letter-spacing: -0.04em;
  box-shadow: 0 8px 24px rgba(255, 122, 0, 0.28);
}

.brand-word {
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.28em;
}

.brand--boot .brand-mark {
  width: 48px;
  height: 48px;
  font-size: 17px;
}

/* ---------- spinner / skeleton ---------- */
.spinner {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}

.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 70px 20px;
}

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

.skeleton {
  background: linear-gradient(100deg, var(--panel) 20%, var(--panel-2) 40%, var(--panel) 60%);
  background-size: 220% 100%;
  animation: shimmer 1.4s linear infinite;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.skeleton-card {
  height: 286px;
}

.skeleton-line {
  height: 10px;
  width: 60%;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  margin: 22px;
}

@keyframes shimmer {
  to {
    background-position: -220% 0;
  }
}

/* ---------- shell ---------- */
.shell {
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 22px 16px 18px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(12, 16, 23, 0.92), rgba(8, 11, 16, 0.82));
  backdrop-filter: blur(18px);
  z-index: 20;
}

.sidebar-top {
  padding: 0 8px 18px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 12px;
}

.sidebar-top .brand {
  margin-bottom: 8px;
}

.sidebar-tag {
  font-size: 10px;
  color: var(--muted-2);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding-left: 2px;
}

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

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 42px;
  padding: 0 12px;
  border-radius: 11px;
  color: var(--muted);
  font-weight: 600;
  font-size: 13px;
  border: 1px solid transparent;
  transition: color 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.nav-link .icon {
  width: 19px;
  height: 19px;
  opacity: 0.85;
}

.nav-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.035);
}

.nav-link.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(255, 122, 0, 0.14), rgba(255, 122, 0, 0.02));
  border-color: rgba(255, 122, 0, 0.18);
  box-shadow: inset 2px 0 0 var(--accent);
}

.nav-link.active .icon {
  color: var(--accent-2);
  opacity: 1;
}

.sidebar-foot {
  margin-top: auto;
  padding: 14px 10px 0;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
}

.fair-badge {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 11px;
  color: var(--muted);
}

.fair-badge .pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(61, 220, 151, 0.12);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  50% {
    box-shadow: 0 0 0 7px rgba(61, 220, 151, 0.04);
  }
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  text-align: left;
  width: 100%;
}

.sidebar-user:hover {
  border-color: var(--line-strong);
}

.sidebar-user-meta {
  min-width: 0;
  flex: 1;
}

.sidebar-user-name {
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-balance {
  font-size: 11px;
  color: var(--accent-2);
}

.shell-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 15;
  display: flex;
  align-items: center;
  gap: 16px;
  height: 70px;
  padding: 0 30px;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 9, 13, 0.78);
  backdrop-filter: blur(18px);
}

.topbar-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.topbar-title b {
  color: var(--text);
}

.topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.balance-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 38px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.025);
  font-weight: 800;
  font-size: 13px;
}

.balance-chip .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px rgba(61, 220, 151, 0.6);
}

.profile-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 4px 10px 4px 4px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.025);
  min-height: 38px;
}

.profile-chip:hover {
  border-color: var(--line-strong);
}

.avatar {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: linear-gradient(135deg, rgba(255, 162, 46, 0.95), rgba(255, 92, 0, 0.9));
  color: #1b0d02;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.profile-name {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 700;
}

.content {
  width: 100%;
  max-width: 1480px;
  margin: 0 auto;
  padding: 30px 30px 70px;
}

.mobile-nav {
  display: none;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
  transition: transform 0.14s ease, background 0.14s ease, border-color 0.14s ease, opacity 0.14s ease;
}

.btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.075);
  border-color: rgba(255, 255, 255, 0.22);
}

.btn:active:not(:disabled) {
  transform: translateY(1px);
}

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

.btn-primary {
  background: linear-gradient(135deg, var(--accent-2), #ff6a00);
  border-color: rgba(255, 160, 60, 0.55);
  color: #1b0d02;
  box-shadow: 0 8px 26px rgba(255, 122, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #ffb04a, #ff7a00);
  border-color: rgba(255, 180, 90, 0.7);
}

.btn-ghost {
  background: transparent;
}

.btn-soft {
  background: var(--accent-soft);
  border-color: var(--accent-line);
  color: var(--accent-2);
}

.btn-danger {
  background: rgba(255, 85, 102, 0.12);
  border-color: rgba(255, 85, 102, 0.28);
  color: #ff8d99;
}

.btn-danger:hover:not(:disabled) {
  background: rgba(255, 85, 102, 0.2);
}

.btn-sm {
  height: 32px;
  padding: 0 11px;
  font-size: 12px;
  border-radius: 8px;
}

.btn-lg {
  height: 48px;
  padding: 0 24px;
  font-size: 14px;
  border-radius: 12px;
}

.btn-block {
  width: 100%;
}

.btn .icon {
  width: 16px;
  height: 16px;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
}

.icon-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--line);
}

.icon-btn svg {
  width: 17px;
  height: 17px;
}

/* ---------- fields ---------- */
.field {
  display: grid;
  gap: 7px;
}

.label {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.input,
.select,
.textarea {
  width: 100%;
  height: 42px;
  padding: 0 13px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: rgba(5, 8, 12, 0.72);
  color: var(--text);
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.textarea {
  height: auto;
  min-height: 96px;
  padding: 11px 13px;
  resize: vertical;
  line-height: 1.45;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--accent-line);
  box-shadow: 0 0 0 3px rgba(255, 122, 0, 0.1);
}

.input::placeholder,
.textarea::placeholder {
  color: var(--muted-2);
}

.select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 17px) 18px, calc(100% - 12px) 18px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 32px;
}

.search-box {
  position: relative;
  min-width: 220px;
}

.search-box .icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 17px;
  height: 17px;
  color: var(--muted-2);
  pointer-events: none;
}

.search-box .input {
  padding-left: 38px;
}

.hint {
  font-size: 11px;
  color: var(--muted-2);
  line-height: 1.45;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* ---------- page ---------- */
.page-head {
  display: flex;
  gap: 22px;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 24px;
}

.eyebrow {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 8px;
}

.page-title {
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 900;
}

.page-subtitle {
  margin-top: 8px;
  color: var(--muted);
  max-width: 680px;
  font-size: 13px;
}

.page-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.toolbar-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 12px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  transition: all 0.15s ease;
}

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

.chip.active {
  color: #1b0d02;
  background: linear-gradient(135deg, var(--accent-2), #ff6a00);
  border-color: transparent;
  box-shadow: 0 6px 18px rgba(255, 122, 0, 0.2);
}

.chip-count {
  opacity: 0.65;
  font-weight: 600;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.badge-green {
  color: var(--green);
  border-color: rgba(61, 220, 151, 0.22);
  background: rgba(61, 220, 151, 0.08);
}

.badge-orange {
  color: var(--accent-2);
  border-color: rgba(255, 122, 0, 0.24);
  background: rgba(255, 122, 0, 0.08);
}

.pill {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
  font-size: 11px;
  color: var(--muted);
}

/* ---------- tiers ---------- */
.tier-mil {
  --tier: #4b69ff;
}
.tier-res {
  --tier: #8847ff;
}
.tier-cls {
  --tier: #d32ce6;
}
.tier-cov {
  --tier: #eb4b4b;
}
.tier-rare {
  --tier: #ffd700;
}

.tier-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--tier) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--tier) 28%, transparent);
  color: color-mix(in srgb, var(--tier) 82%, white);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.tier-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--tier);
  box-shadow: 0 0 8px color-mix(in srgb, var(--tier) 70%, transparent);
}

/* ---------- stats ---------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}

.stat-card {
  position: relative;
  padding: 16px 17px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012));
  overflow: hidden;
}

.stat-card::after {
  content: "";
  position: absolute;
  right: -30px;
  top: -50px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 122, 0, 0.09), transparent 65%);
}

.stat-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stat-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
}

.stat-icon {
  color: var(--muted-2);
  width: 17px;
  height: 17px;
}

.stat-value {
  margin-top: 9px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.stat-note {
  margin-top: 4px;
  font-size: 11px;
  color: var(--muted-2);
}

/* ---------- thumbnails ---------- */
.thumb {
  display: grid;
  place-items: center;
  overflow: hidden;
  min-width: 0;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.4));
}

.thumb.is-broken img {
  opacity: 0.3;
}

/* ---------- case grid ---------- */
.case-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(222px, 1fr));
  gap: 13px;
}

.case-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 284px;
  padding: 13px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background:
    radial-gradient(120% 80% at 50% -10%, color-mix(in srgb, var(--tier, #4b69ff) 10%, transparent), transparent 62%),
    linear-gradient(170deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01));
  overflow: hidden;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  cursor: pointer;
}

.case-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--tier, #4b69ff) 34%, var(--line));
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.case-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.case-art {
  position: relative;
  height: 138px;
  margin: 4px -4px 6px;
  display: grid;
  place-items: center;
}

.case-art::before {
  content: "";
  position: absolute;
  inset: 14% 12%;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--tier, #4b69ff) 16%, transparent), transparent 68%);
  filter: blur(8px);
}

.case-art .thumb {
  position: relative;
  width: 92%;
  height: 100%;
}

.case-art .thumb img {
  transition: transform 0.25s ease;
}

.case-card:hover .case-art .thumb img {
  transform: scale(1.05) rotate(-1deg);
}

.case-name {
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.01em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 33px;
}

.case-sub {
  margin-top: 4px;
  font-size: 11px;
  color: var(--muted-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.case-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.case-price {
  font-size: 17px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.case-price span {
  font-size: 10px;
  color: var(--muted-2);
  font-weight: 700;
  display: block;
  letter-spacing: 0.05em;
}

.case-open {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 10px;
  border-radius: 8px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  color: var(--accent-2);
  font-size: 11px;
  font-weight: 800;
}

.case-card:hover .case-open {
  background: var(--accent);
  color: #1b0d02;
  border-color: transparent;
}

.case-top {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 10px;
  color: var(--muted-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.case-top b {
  color: var(--muted);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- live strip ---------- */
.live-strip {
  margin-bottom: 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.018);
  padding: 12px 14px;
  overflow: hidden;
}

.live-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 9px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.live-head .pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 4px rgba(255, 85, 102, 0.1);
}

.live-list {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.live-list::-webkit-scrollbar {
  display: none;
}

.live-item {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  height: 40px;
  padding: 0 10px 0 5px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.18);
}

.live-item .thumb {
  width: 34px;
  height: 28px;
}

.live-item-name {
  font-size: 11px;
  font-weight: 700;
  max-width: 160px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.live-player {
  font-size: 10px;
  color: var(--muted-2);
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.live-value {
  font-size: 11px;
  font-weight: 800;
  color: var(--accent-2);
  white-space: nowrap;
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  gap: 30px;
  padding: 26px 28px;
  margin-bottom: 22px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background:
    radial-gradient(90% 140% at 90% -20%, rgba(255, 122, 0, 0.16), transparent 55%),
    linear-gradient(120deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: linear-gradient(90deg, transparent 30%, black);
  opacity: 0.5;
  pointer-events: none;
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 650px;
}

.hero-title {
  font-size: clamp(28px, 3.6vw, 46px);
  line-height: 1.02;
  font-weight: 950;
  letter-spacing: -0.045em;
}

.hero-title em {
  font-style: normal;
  color: var(--accent-2);
}

.hero-sub {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  max-width: 560px;
}

.hero-stats {
  display: flex;
  gap: 22px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.hero-stat b {
  display: block;
  font-size: 16px;
  font-weight: 900;
}

.hero-stat span {
  font-size: 10px;
  color: var(--muted-2);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
}

.hero-mark {
  position: relative;
  z-index: 1;
  margin-left: auto;
  width: 132px;
  height: 132px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 28px;
  border: 1px solid rgba(255, 122, 0, 0.25);
  background: radial-gradient(circle at 30% 20%, rgba(255, 162, 46, 0.24), rgba(255, 92, 0, 0.03) 65%);
  color: var(--accent-2);
  font-size: 38px;
  font-weight: 950;
  letter-spacing: -0.08em;
  transform: rotate(4deg);
  box-shadow: 0 20px 60px rgba(255, 122, 0, 0.12);
}

/* ---------- panels ---------- */
.panel {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.012));
  overflow: hidden;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
}

.panel-title {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.panel-sub {
  font-size: 11px;
  color: var(--muted-2);
  margin-top: 2px;
}

.panel-body {
  padding: 18px;
}

.panel-body--flush {
  padding: 0;
}

/* ---------- case detail ---------- */
.case-hero {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  padding: 24px;
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--tier, #4b69ff) 20%, var(--line));
  background:
    radial-gradient(70% 100% at 14% 40%, color-mix(in srgb, var(--tier, #4b69ff) 14%, transparent), transparent 64%),
    linear-gradient(150deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.008));
  margin-bottom: 18px;
  overflow: hidden;
}

.case-hero-art {
  position: relative;
  height: 200px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 14px;
}

.case-hero-art::before {
  content: "";
  position: absolute;
  inset: 10%;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--tier, #4b69ff) 20%, transparent), transparent 68%);
  filter: blur(14px);
}

.case-hero-art .thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.case-hero-art .thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: scale(1.08) rotate(-2deg);
}

.case-title {
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 900;
}

.case-tags {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.case-facts {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.case-fact b {
  display: block;
  font-size: 17px;
  font-weight: 900;
}

.case-fact span {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  color: var(--muted-2);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
}

.case-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 16px;
  align-items: start;
}

.open-panel {
  padding: 20px;
}

.open-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.open-title {
  font-size: 16px;
  font-weight: 900;
  letter-spacing: -0.01em;
}

.open-price {
  text-align: right;
}

.open-price b {
  display: block;
  font-size: 20px;
  letter-spacing: -0.03em;
}

.open-price span {
  font-size: 10px;
  color: var(--muted-2);
}

.reel-window {
  position: relative;
  height: 170px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background:
    radial-gradient(120% 130% at 50% -30%, rgba(255, 122, 0, 0.08), transparent 55%),
    #080b10;
  overflow: hidden;
  margin-bottom: 14px;
}

.reel-window::before,
.reel-window::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 80px;
  z-index: 3;
  pointer-events: none;
}

.reel-window::before {
  left: 0;
  background: linear-gradient(90deg, #080b10, transparent);
}

.reel-window::after {
  right: 0;
  background: linear-gradient(270deg, #080b10, transparent);
}

.reel-marker {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  transform: translateX(-1px);
  background: linear-gradient(180deg, transparent, var(--accent), transparent);
  box-shadow: 0 0 22px rgba(255, 122, 0, 0.55);
  z-index: 4;
  pointer-events: none;
}

.reel-marker::before,
.reel-marker::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
}

.reel-marker::before {
  top: 0;
  border-top-color: var(--accent);
}

.reel-marker::after {
  bottom: 0;
  border-bottom-color: var(--accent);
}

.reel-track {
  display: flex;
  gap: 10px;
  padding: 12px;
  height: 100%;
  will-change: transform;
  transition: transform 3.3s cubic-bezier(0.12, 0.66, 0.16, 1);
}

.reel-tile {
  flex: 0 0 122px;
  height: 144px;
  border-radius: 10px;
  border: 1px solid var(--line);
  border-top: 2px solid color-mix(in srgb, var(--tier, #4b69ff) 60%, transparent);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.008));
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  overflow: hidden;
}

.reel-tile .thumb {
  height: 78px;
}

.reel-tile-name {
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  height: 24px;
  overflow: hidden;
  color: var(--muted);
}

.reel-tile-price {
  margin-top: auto;
  font-size: 11px;
  font-weight: 800;
}

.reel-idle {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  gap: 5px;
  z-index: 2;
  color: var(--muted-2);
  background: radial-gradient(circle at center, rgba(255, 122, 0, 0.035), transparent 60%);
}

.reel-idle b {
  color: var(--muted);
  font-size: 12px;
}

.reel-idle span {
  font-size: 11px;
}

.open-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.count-picker {
  display: inline-flex;
  padding: 3px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.2);
  gap: 2px;
}

.count-btn {
  height: 30px;
  min-width: 34px;
  padding: 0 8px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

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

.count-btn.active {
  background: var(--accent);
  color: #1b0d02;
}

.open-controls .btn-primary {
  margin-left: auto;
  min-width: 170px;
}

.commit-box {
  margin-top: 14px;
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px dashed var(--line-strong);
  background: rgba(0, 0, 0, 0.16);
  display: grid;
  gap: 6px;
}

.commit-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.commit-label {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-2);
  flex: 0 0 auto;
  width: 66px;
}

.hash {
  font-family: "SF Mono", ui-monospace, Menlo, monospace;
  font-size: 10.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1;
}

.commit-row .icon-btn {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
}

.commit-row .icon-btn svg {
  width: 13px;
  height: 13px;
}

.side-stack {
  display: grid;
  gap: 16px;
}

.fair-note {
  display: flex;
  gap: 10px;
  padding: 12px;
  border-radius: 10px;
  background: rgba(61, 220, 151, 0.05);
  border: 1px solid rgba(61, 220, 151, 0.14);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.fair-note .icon {
  color: var(--green);
  width: 16px;
  height: 16px;
  margin-top: 1px;
}

/* ---------- item table ---------- */
.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.item-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.item-table th {
  text-align: left;
  padding: 10px 16px;
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted-2);
  border-bottom: 1px solid var(--line);
  font-weight: 800;
  white-space: nowrap;
}

.item-table th:last-child,
.item-table td:last-child {
  text-align: right;
}

.item-table td {
  padding: 9px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
  vertical-align: middle;
}

.item-table tr:last-child td {
  border-bottom: 0;
}

.item-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.item-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 220px;
}

.item-info .thumb {
  width: 46px;
  height: 34px;
  flex: 0 0 auto;
}

.item-name {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
}

.item-sub {
  font-size: 10px;
  color: var(--muted-2);
  margin-top: 2px;
}

.item-price {
  font-weight: 800;
  white-space: nowrap;
}

.chance {
  color: var(--muted);
  white-space: nowrap;
}

.one-in {
  color: var(--muted-2);
  white-space: nowrap;
  font-size: 11px;
}

/* ---------- tabs ---------- */
.tabs {
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.2);
}

.tab {
  height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.tab.active {
  background: rgba(255, 255, 255, 0.09);
  color: var(--text);
}

/* ---------- inventory ---------- */
.inventory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(176px, 1fr));
  gap: 11px;
}

.inv-card {
  position: relative;
  padding: 10px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.008));
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease, background 0.15s ease;
  border-top: 2px solid color-mix(in srgb, var(--tier, #4b69ff) 55%, transparent);
}

.inv-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
}

.inv-card.selected {
  border-color: var(--accent);
  background: linear-gradient(170deg, rgba(255, 122, 0, 0.1), rgba(255, 122, 0, 0.02));
  box-shadow: 0 0 0 1px rgba(255, 122, 0, 0.25);
}

.inv-art {
  height: 106px;
  display: grid;
  place-items: center;
  margin-bottom: 8px;
}

.inv-art .thumb {
  width: 100%;
  height: 100%;
}

.inv-name {
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  min-height: 28px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.inv-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 8px;
}

.inv-price {
  font-size: 12px;
  font-weight: 900;
  color: var(--accent-2);
}

.inv-case {
  font-size: 9px;
  color: var(--muted-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inv-check {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 1px solid var(--line-strong);
  background: rgba(0, 0, 0, 0.45);
  display: grid;
  place-items: center;
  color: transparent;
  z-index: 2;
}

.inv-card.selected .inv-check {
  background: var(--accent);
  border-color: var(--accent);
  color: #1b0d02;
}

.inv-check svg {
  width: 12px;
  height: 12px;
}

.bulk-bar {
  position: sticky;
  bottom: 14px;
  z-index: 12;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding: 10px 12px;
  border-radius: 13px;
  border: 1px solid var(--accent-line);
  background: rgba(16, 20, 27, 0.94);
  backdrop-filter: blur(16px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.4);
}

.bulk-info {
  font-size: 12px;
  font-weight: 700;
}

.bulk-info span {
  color: var(--accent-2);
}

.bulk-bar .btn {
  margin-left: auto;
}

.filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.filters .select,
.filters .input {
  height: 36px;
  font-size: 12px;
}

.filters .search-box {
  min-width: 200px;
}

/* ---------- history ---------- */
.history-list {
  display: grid;
  gap: 10px;
}

.history-card {
  padding: 14px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
}

.history-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.history-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  flex: 0 0 auto;
}

.history-icon svg {
  width: 15px;
  height: 15px;
}

.history-title {
  font-size: 13px;
  font-weight: 800;
}

.history-meta {
  font-size: 10.5px;
  color: var(--muted-2);
  margin-top: 2px;
}

.history-total {
  margin-left: auto;
  text-align: right;
  font-weight: 900;
  font-size: 14px;
}

.history-total span {
  display: block;
  font-size: 9.5px;
  color: var(--muted-2);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.history-items {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 11px;
}

.history-thumb {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 8px 0 3px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.2);
  font-size: 10px;
  color: var(--muted);
  max-width: 210px;
}

.history-thumb .thumb {
  width: 34px;
  height: 26px;
}

.history-thumb b {
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.history-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 11px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.load-more {
  display: flex;
  justify-content: center;
  padding: 18px 0 4px;
}

/* ---------- data table ---------- */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.data-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #0d1219;
  padding: 10px 13px;
  text-align: left;
  font-size: 9.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted-2);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.data-table th:last-child,
.data-table td:last-child {
  text-align: right;
}

.data-table td {
  padding: 10px 13px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: middle;
}

.data-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.data-table tr:last-child td {
  border-bottom: 0;
}

.sort-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
}

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

.case-cell {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 190px;
}

.case-cell .thumb {
  width: 42px;
  height: 34px;
}

.case-cell-name {
  font-weight: 700;
  font-size: 12px;
}

.case-cell-sub {
  font-size: 10px;
  color: var(--muted-2);
}

.meter {
  width: 88px;
  height: 4px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.meter-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--accent), #ffbe5c);
}

.meter-fill.green {
  background: linear-gradient(90deg, #1fae74, var(--green));
}

/* ---------- calculator ---------- */
.calculator {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 12px;
  align-items: end;
}

.calc-result {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.18);
}

.calc-result b {
  font-size: 15px;
  letter-spacing: -0.02em;
}

.calc-result-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
  font-size: 12px;
}

.calc-result-row:last-of-type {
  border-bottom: 0;
}

.calc-result > .audit-item {
  margin-top: 9px;
}

.analytics-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 16px;
  margin-top: 18px;
  align-items: start;
}

/* ---------- composer ---------- */
.composer-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(340px, 0.85fr);
  gap: 16px;
  align-items: start;
}

.builder {
  display: grid;
  gap: 14px;
}

.builder-row {
  display: grid;
  grid-template-columns: 1fr 130px 150px;
  gap: 10px;
}

.pool-box {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.pool-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.pool-head .input {
  height: 34px;
  font-size: 12px;
}

.pool-head .select {
  height: 34px;
  width: 130px;
  font-size: 11px;
}

.pool-list {
  max-height: 370px;
  overflow-y: auto;
}

.pool-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 11px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.pool-item:last-child {
  border-bottom: 0;
}

.pool-item:hover {
  background: rgba(255, 255, 255, 0.025);
}

.pool-item .thumb {
  width: 48px;
  height: 34px;
  flex: 0 0 auto;
}

.pool-item-main {
  min-width: 0;
  flex: 1;
}

.pool-item-name {
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pool-item-sub {
  font-size: 10px;
  color: var(--muted-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pool-item-price {
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.pool-item .btn {
  height: 27px;
  padding: 0 8px;
  font-size: 11px;
}

.selected-list {
  display: grid;
  gap: 6px;
}

.selected-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.02);
}

.selected-row .thumb {
  width: 42px;
  height: 30px;
  flex: 0 0 auto;
}

.selected-main {
  min-width: 0;
  flex: 1;
}

.selected-name {
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.selected-price {
  font-size: 10px;
  color: var(--muted-2);
}

.tier-select {
  height: 28px;
  padding: 0 6px;
  font-size: 10px;
  border-radius: 7px;
  width: 130px;
  background-color: rgba(0, 0, 0, 0.3);
  background-position: calc(100% - 12px) 11px, calc(100% - 7px) 11px;
}

.selected-row .icon-btn {
  width: 27px;
  height: 27px;
}

.selected-row .icon-btn svg {
  width: 13px;
  height: 13px;
}

.preview-panel {
  position: sticky;
  top: 86px;
  display: grid;
  gap: 14px;
}

.preview-hero {
  padding: 15px;
  border-radius: 13px;
  border: 1px solid var(--accent-line);
  background: radial-gradient(100% 120% at 50% -20%, rgba(255, 122, 0, 0.15), transparent 60%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
}

.preview-label {
  font-size: 9px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted-2);
  font-weight: 800;
}

.preview-price {
  margin-top: 4px;
  font-size: 34px;
  font-weight: 950;
  letter-spacing: -0.045em;
  color: var(--accent-2);
}

.preview-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.preview-stat {
  padding: 8px 9px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--line);
}

.preview-stat span {
  display: block;
  font-size: 9px;
  color: var(--muted-2);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 700;
}

.preview-stat b {
  display: block;
  margin-top: 2px;
  font-size: 13px;
}

.audit {
  display: grid;
  gap: 6px;
}

.audit-item {
  display: flex;
  gap: 7px;
  padding: 8px 9px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  font-size: 10.5px;
  line-height: 1.45;
  color: var(--muted);
}

.audit-item.warn {
  border-color: rgba(255, 170, 60, 0.22);
  background: rgba(255, 170, 60, 0.055);
  color: #e7c58d;
}

.audit-item.info {
  border-color: rgba(91, 140, 255, 0.2);
  background: rgba(91, 140, 255, 0.05);
  color: #a8bdf0;
}

.custom-list {
  display: grid;
  gap: 7px;
}

.custom-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.02);
}

.custom-item .thumb {
  width: 40px;
  height: 30px;
}

.custom-item-main {
  flex: 1;
  min-width: 0;
}

.custom-item-name {
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.custom-item-sub {
  font-size: 10px;
  color: var(--muted-2);
}

/* ---------- fair page ---------- */
.fair-hero {
  display: flex;
  gap: 24px;
  align-items: center;
  padding: 24px;
  margin-bottom: 18px;
  border-radius: 18px;
  border: 1px solid rgba(61, 220, 151, 0.18);
  background: radial-gradient(90% 130% at 85% -20%, rgba(61, 220, 151, 0.12), transparent 60%),
    linear-gradient(150deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01));
}

.fair-hero .fair-icon {
  width: 74px;
  height: 74px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  background: rgba(61, 220, 151, 0.09);
  border: 1px solid rgba(61, 220, 151, 0.2);
  color: var(--green);
  flex: 0 0 auto;
}

.fair-hero .fair-icon svg {
  width: 34px;
  height: 34px;
}

.fair-hero h2 {
  font-size: 22px;
  letter-spacing: -0.02em;
  font-weight: 900;
}

.fair-hero p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  max-width: 680px;
}

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

.step {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.02);
}

.step-num {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent-2);
  font-size: 10px;
  font-weight: 900;
  margin-bottom: 7px;
}

.step b,
.step-title {
  font-size: 11.5px;
  display: block;
}

.step span,
.step-text {
  display: block;
  margin-top: 3px;
  font-size: 10.5px;
  color: var(--muted-2);
  line-height: 1.4;
}

.fair-grid {
  display: grid;
  grid-template-columns: 370px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.seed-box {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.2);
}

.seed-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
}

.seed-row:last-child {
  border-bottom: 0;
}

.seed-label {
  width: 84px;
  flex: 0 0 auto;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted-2);
  font-weight: 800;
}

.seed-value {
  flex: 1;
  min-width: 0;
  font-family: "SF Mono", ui-monospace, Menlo, monospace;
  font-size: 10.5px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.verify-results {
  display: grid;
  gap: 8px;
}

.draw-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.draw-row .thumb {
  width: 46px;
  height: 34px;
}

.draw-main {
  flex: 1;
  min-width: 0;
}

.draw-name {
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.draw-meta {
  font-size: 10px;
  color: var(--muted-2);
}

.draw-ticket {
  font-family: "SF Mono", ui-monospace, Menlo, monospace;
  font-size: 10px;
  color: var(--accent-2);
  white-space: nowrap;
}

/* ---------- login ---------- */
.login {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow: hidden;
}

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

.login-bg::before {
  content: "";
  position: absolute;
  width: 720px;
  height: 720px;
  top: -280px;
  right: -160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 122, 0, 0.2), transparent 65%);
  filter: blur(20px);
}

.login-bg::after {
  content: "";
  position: absolute;
  width: 620px;
  height: 620px;
  bottom: -320px;
  left: -180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(91, 140, 255, 0.12), transparent 65%);
  filter: blur(30px);
}

.login-case {
  position: absolute;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.01));
  backdrop-filter: blur(8px);
  transform: rotate(-8deg);
  opacity: 0.6;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

.login-case--a {
  width: 190px;
  height: 240px;
  left: 7%;
  top: 16%;
}

.login-case--b {
  width: 150px;
  height: 190px;
  right: 8%;
  bottom: 14%;
  transform: rotate(9deg);
  opacity: 0.45;
}

.login-case--c {
  width: 110px;
  height: 140px;
  right: 16%;
  top: 12%;
  transform: rotate(16deg);
  opacity: 0.3;
}

.login-card {
  position: relative;
  z-index: 2;
  width: min(440px, 100%);
  padding: 30px;
  border-radius: 22px;
  border: 1px solid var(--line-strong);
  background: linear-gradient(165deg, rgba(18, 24, 34, 0.92), rgba(9, 12, 17, 0.94));
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(24px);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 26px;
}

.login-brand .brand-mark {
  width: 42px;
  height: 42px;
}

.login-brand-text b {
  display: block;
  font-size: 15px;
  letter-spacing: 0.03em;
  font-weight: 950;
}

.login-brand-text span {
  display: block;
  font-size: 9px;
  letter-spacing: 0.24em;
  color: var(--muted-2);
  font-weight: 700;
  margin-top: 2px;
}

.login-title {
  font-size: 27px;
  letter-spacing: -0.035em;
  font-weight: 950;
  line-height: 1.1;
}

.login-sub {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
}

.login-form {
  margin-top: 22px;
  display: grid;
  gap: 12px;
}

.token-field {
  position: relative;
}

.token-field .input {
  height: 48px;
  padding-right: 46px;
  font-family: "SF Mono", ui-monospace, Menlo, monospace;
  font-size: 13px;
  letter-spacing: 0.04em;
}

.token-field .icon-btn {
  position: absolute;
  right: 7px;
  top: 7px;
  height: 34px;
  width: 34px;
}

.login-btn {
  height: 48px;
  border-radius: 12px;
  font-size: 14px;
}

.login-error {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 9px;
  border: 1px solid rgba(255, 85, 102, 0.26);
  background: rgba(255, 85, 102, 0.08);
  color: #ff9aa4;
  font-size: 11.5px;
  line-height: 1.45;
}

.login-error b {
  display: block;
  color: #ffc2c8;
}

.login-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 14px;
  font-size: 10.5px;
  color: var(--muted-2);
  line-height: 1.5;
}

.login-note .icon {
  width: 14px;
  height: 14px;
  margin-top: 1px;
}

.login-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 10px;
  color: var(--muted-2);
}

.login-foot .fair-badge {
  font-size: 10px;
}

.lockout {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 170, 60, 0.25);
  background: rgba(255, 170, 60, 0.07);
  color: #e9c285;
  font-size: 11.5px;
}

.lockout b {
  font-family: "SF Mono", ui-monospace, Menlo, monospace;
  font-size: 14px;
  color: #ffd28f;
}

/* ---------- modal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(3, 5, 8, 0.68);
  backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity 0.18s ease;
}

.modal-overlay.is-open {
  opacity: 1;
}

.modal {
  width: min(480px, 100%);
  max-height: min(86vh, 900px);
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  border: 1px solid var(--line-strong);
  background: linear-gradient(165deg, #121924, #0a0e14);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.6);
  transform: translateY(10px) scale(0.985);
  transition: transform 0.2s ease;
  overflow: hidden;
}

.modal-overlay.is-open .modal {
  transform: none;
}

.modal--lg {
  width: min(760px, 100%);
}

.modal--sm {
  width: min(380px, 100%);
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--line);
}

.modal-title {
  font-size: 17px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.modal-subtitle {
  margin-top: 4px;
  font-size: 11px;
  color: var(--muted-2);
}

.modal-body {
  padding: 18px 20px;
  overflow-y: auto;
  min-height: 0;
}

.modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 13px 20px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}

.modal-text {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.modal-open {
  overflow: hidden;
}

/* ---------- result ---------- */
.result-hero {
  text-align: center;
  padding: 6px 0 16px;
}

.result-hero .thumb {
  width: 190px;
  height: 120px;
  margin: 0 auto;
}

.result-case {
  font-size: 10px;
  color: var(--muted-2);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 800;
  margin-bottom: 6px;
}

.result-name {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.result-price {
  margin-top: 4px;
  font-size: 22px;
  font-weight: 950;
  color: var(--accent-2);
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 8px;
}

.result-tile {
  padding: 8px;
  border-radius: 9px;
  border: 1px solid var(--line);
  border-top: 2px solid color-mix(in srgb, var(--tier, #4b69ff) 60%, transparent);
  background: rgba(255, 255, 255, 0.025);
}

.result-tile .thumb {
  height: 68px;
}

.result-tile-name {
  font-size: 10px;
  font-weight: 700;
  height: 24px;
  overflow: hidden;
  line-height: 1.2;
  margin-top: 5px;
  color: var(--muted);
}

.result-tile-price {
  font-size: 11px;
  font-weight: 800;
  margin-top: 3px;
}

.result-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 13px;
  padding: 10px 12px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.2);
  font-size: 12px;
}

.result-summary b {
  font-size: 16px;
  color: var(--accent-2);
}

/* ---------- profile ---------- */
.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.profile-stat {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.02);
}

.profile-stat span {
  display: block;
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-2);
  font-weight: 800;
}

.profile-stat b {
  display: block;
  margin-top: 3px;
  font-size: 14px;
}

.profile-seed {
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.2);
}

/* ---------- toast ---------- */
.toasts {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 200;
  display: grid;
  gap: 8px;
  max-width: min(380px, calc(100vw - 36px));
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 11px 12px;
  border-radius: 11px;
  border: 1px solid var(--line-strong);
  background: rgba(16, 21, 29, 0.96);
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.4);
  font-size: 12px;
  line-height: 1.45;
  animation: toast-in 0.22s ease;
}

.toast--out {
  animation: toast-out 0.22s ease forwards;
}

.toast-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 5px;
  flex: 0 0 auto;
}

.toast--success .toast-dot {
  background: var(--green);
}

.toast--error .toast-dot {
  background: var(--red);
}

.toast-text {
  flex: 1;
  color: var(--text);
}

.toast-close {
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted-2);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.toast-close svg {
  width: 13px;
  height: 13px;
}

.toast-close:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateY(6px);
  }
}

/* ---------- empty ---------- */
.empty {
  display: grid;
  place-items: center;
  text-align: center;
  padding: 54px 20px;
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.012);
}

.empty-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted-2);
  margin-bottom: 12px;
}

.empty-icon .icon {
  width: 21px;
  height: 21px;
}

.empty h3 {
  font-size: 14px;
  font-weight: 800;
}

.empty p {
  margin-top: 5px;
  font-size: 12px;
  max-width: 360px;
}

.empty .btn {
  margin-top: 14px;
}

/* ---------- misc ---------- */
.divider {
  height: 1px;
  background: var(--line);
  margin: 14px 0;
}

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

.stack {
  display: grid;
  gap: 8px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.noscript {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  background: var(--bg);
  color: var(--text);
  padding: 30px;
  text-align: center;
}

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .case-layout {
    grid-template-columns: minmax(0, 1fr) 340px;
  }
  .analytics-grid {
    grid-template-columns: 1fr;
  }
  .composer-layout {
    grid-template-columns: 1fr;
  }
  .preview-panel {
    position: static;
  }
  .fair-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1020px) {
  :root {
    --sidebar: 74px;
  }
  .sidebar {
    padding: 18px 10px;
    align-items: center;
  }
  .sidebar-top {
    padding: 0 0 14px;
    width: 100%;
    display: grid;
    justify-items: center;
  }
  .sidebar-top .brand-word,
  .sidebar-tag,
  .nav-label,
  .sidebar-user-meta {
    display: none;
  }
  .nav-link {
    justify-content: center;
    width: 44px;
    padding: 0;
  }
  .sidebar-user {
    width: 44px;
    justify-content: center;
    padding: 7px;
  }
  .sidebar-foot {
    width: 100%;
    justify-items: center;
  }
  .fair-badge span:not(.pulse) {
    display: none;
  }
  .content {
    padding: 26px 24px 70px;
  }
  .topbar {
    padding: 0 24px;
  }
  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .shell {
    grid-template-columns: 1fr;
  }
  .sidebar {
    display: none;
  }
  .shell-main {
    padding-bottom: 66px;
  }
  .topbar {
    height: 60px;
    padding: 0 16px;
  }
  .topbar-title {
    display: none;
  }
  .profile-name {
    display: none;
  }
  .content {
    padding: 20px 16px 80px;
  }
  .mobile-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    display: flex;
    justify-content: space-around;
    gap: 2px;
    padding: 7px 8px calc(7px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: rgba(8, 11, 16, 0.94);
    backdrop-filter: blur(18px);
  }
  .mobile-nav .nav-link {
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    width: auto;
    min-width: 40px;
    height: 46px;
    padding: 0 4px;
    font-size: 8px;
    border-radius: 9px;
  }
  .mobile-nav .nav-link .icon {
    width: 18px;
    height: 18px;
  }
  .mobile-nav .nav-link.active {
    box-shadow: none;
    background: rgba(255, 122, 0, 0.1);
  }
  .page-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }
  .page-title {
    font-size: 27px;
  }
  .case-hero {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 18px;
  }
  .case-hero-art {
    height: 150px;
  }
  .case-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .case-layout > * {
    min-width: 0;
  }
  .side-stack {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero {
    padding: 20px;
  }
  .hero-mark {
    display: none;
  }
  .steps {
    grid-template-columns: 1fr 1fr;
  }
  .builder-row {
    grid-template-columns: 1fr;
  }
  .open-controls .btn-primary {
    margin-left: 0;
    width: 100%;
  }
  .open-controls {
    display: grid;
    grid-template-columns: auto 1fr;
  }
  .open-controls .count-picker {
    grid-row: 1;
  }
  .open-controls .btn-primary {
    grid-column: 1 / -1;
  }
  .bulk-bar {
    bottom: 74px;
  }
  .toasts {
    bottom: 78px;
  }
  .login-case--a,
  .login-case--c {
    display: none;
  }
  .login-case--b {
    right: -40px;
    opacity: 0.25;
  }
}

@media (max-width: 640px) {
  .case-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }
  .case-card {
    min-height: 250px;
    padding: 10px;
  }
  .case-art {
    height: 112px;
  }
  .case-name {
    font-size: 12px;
  }
  .case-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 7px;
  }
  .case-open {
    width: 100%;
    justify-content: center;
  }
  .inventory-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .stat-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .stat-value {
    font-size: 18px;
  }
  .stat-card {
    padding: 12px;
  }
  .field-row {
    grid-template-columns: 1fr;
  }
  .calculator {
    grid-template-columns: 1fr;
  }
  .modal {
    max-height: 92vh;
  }
  .modal-head,
  .modal-body,
  .modal-actions {
    padding-left: 14px;
    padding-right: 14px;
  }
  .login-card {
    padding: 22px;
    border-radius: 18px;
  }
  .login-title {
    font-size: 23px;
  }
  .topbar-right {
    gap: 6px;
  }
  .balance-chip {
    padding: 0 9px;
    font-size: 12px;
  }
  .profile-chip {
    padding-right: 4px;
  }
  .history-total {
    margin-left: 0;
    text-align: left;
  }
  .history-head {
    align-items: flex-start;
  }
  .reel-tile {
    flex-basis: 104px;
    height: 136px;
  }
  .reel-track {
    padding: 10px;
  }
  .reel-window {
    height: 160px;
  }
  .fair-hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
  .fair-hero .fair-icon {
    width: 54px;
    height: 54px;
    border-radius: 15px;
  }
  .fair-hero .fair-icon svg {
    width: 25px;
    height: 25px;
  }
  .steps {
    grid-template-columns: 1fr;
  }
  .page-actions {
    width: 100%;
  }
  .page-actions .btn {
    flex: 1;
  }
}

/* ---------- studio ---------- */
.studio-top {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
  margin: 4px 0 16px;
}

.studio-settings {
  min-width: min(100%, 420px);
  flex: 1;
}

.studio-settings summary {
  cursor: pointer;
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 700;
}

.studio-form {
  display: grid;
  gap: 10px;
}

.studio-text {
  height: auto;
  min-height: 72px;
  resize: vertical;
  padding: 10px 12px;
  line-height: 1.45;
}

.studio-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.count-row,
.check-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.check-row {
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: end;
}

.checkline {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.econ-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.econ-card {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}

.econ-label,
.econ-note {
  color: var(--muted);
  font-size: 11px;
}

.econ-value {
  margin: 3px 0;
  font-size: 18px;
  font-weight: 750;
}

.studio-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0;
}

.studio-note {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.studio-cover {
  width: 100%;
  max-height: 280px;
  object-fit: contain;
  border-radius: 12px;
  margin: 8px 0 12px;
  background: rgba(0, 0, 0, 0.25);
}

.studio-items {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.studio-item,
.plan-brief,
.draft-card {
  display: flex;
  align-items: center;
  gap: 10px;
}

.studio-item-main,
.draft-main {
  min-width: 0;
  flex: 1;
}

.studio-chance {
  display: grid;
  justify-items: end;
  font-size: 12px;
  color: var(--muted);
}

.studio-chance b {
  color: var(--text);
  font-size: 13px;
}

.studio-copy {
  white-space: pre-wrap;
  line-height: 1.5;
  margin: 0;
}

.studio-plan,
.studio-drafts {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.plan-card,
.draft-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.plan-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.plan-briefs {
  display: grid;
  gap: 8px;
}

.draft-price {
  font-weight: 750;
  white-space: nowrap;
}

.draft-thumb {
  width: 54px;
  height: 54px;
  object-fit: cover;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
}

.draft-thumb-empty {
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
}

@media (max-width: 720px) {
  .count-row,
  .econ-grid,
  .check-row {
    grid-template-columns: 1fr 1fr;
  }
}

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