.portal {
  font-size: 14px;
}

/* Portal Rail (Sidebar) */
.portal-rail {
  position: fixed;
  inset: 0 auto 0 0;
  width: 245px;
  background: var(--bg-base);
  padding: 28px 16px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  z-index: 10;
}

.portal-logo {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.03em;
  padding: 0 12px;
  color: var(--ink);
}

.portal-logo span {
  display: block;
  font-size: 9px;
  letter-spacing: 0.1em;
  margin-top: 6px;
  color: var(--muted);
  font-weight: 500;
}

.portal-rail nav {
  display: grid;
  gap: 4px;
  margin-top: 48px;
}

.portal-rail nav a {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 13px;
  font-weight: 500;
  padding: 12px 16px;
  border-radius: 8px;
  color: var(--ink-secondary);
  transition: all 0.2s ease;
}

.portal-rail nav a[aria-current],
.portal-rail nav a:hover {
  background: var(--bg-elevated);
  color: var(--ink);
}

.portal-rail nav span {
  font-size: 18px;
  width: 20px;
  text-align: center;
  opacity: 0.7;
}

.rail-bottom {
  margin-top: auto;
  display: grid;
  gap: 10px;
  font-size: 10px;
}

.rail-bottom a {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 11px 14px;
  text-align: center;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink-secondary);
  background: rgba(255, 255, 255, 0.02);
  transition: all 0.2s ease;
}

.rail-bottom a:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--line-strong);
  color: var(--ink);
}

/* PLAY OFFLINE DISTRICT: blue is reserved for the game. */
.rail-bottom a[data-game-link],
.rail-bottom a[href="/game/"] {
  border-color: var(--game-accent-line);
  background: var(--game-accent-soft);
  color: #e8e8e6;
}

.rail-bottom a[data-game-link]:hover,
.rail-bottom a[href="/game/"]:hover {
  border-color: var(--game-accent);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

/* Portal Main Area */
.portal-main {
  margin-left: 245px;
  padding: 24px 36px 80px;
  min-height: 100vh;
}

.portal-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 40px;
  margin-bottom: 36px;
}

.portal-top > span {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.1em;
  font-weight: 500;
  text-transform: uppercase;
}

.portal-top > div {
  display: flex;
  gap: 10px;
}

.portal .button {
  padding: 10px 20px;
  font-size: 11px;
  letter-spacing: 0.04em;
  min-height: 38px;
}

/* Portal Title */
.portal-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 32px;
}

.portal-title h1 {
  font-size: 32px;
  letter-spacing: -0.02em;
  font-weight: 600;
}

.portal-title > span {
  color: var(--muted);
  font-size: 14px;
}

/* Toolbar */
.toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin: 24px 0;
}

.toolbar > input {
  flex: 1;
  min-width: 180px;
}

/* Form Inputs */
.portal input:not([type='checkbox']):not([type='file']),
.portal select,
.portal textarea {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  color: var(--ink);
  padding: 12px 14px;
  border-radius: 6px;
  min-width: 0;
  max-width: 100%;
  font-size: 14px;
  transition: all 0.2s ease;
}

.portal input:focus,
.portal select:focus,
.portal textarea:focus {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.03);
  outline: none;
}

.portal textarea {
  resize: vertical;
  min-height: 100px;
}

/* Segmented Control */
.segmented {
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  background: rgba(255, 255, 255, 0.02);
}

.segmented button {
  border: 0;
  background: transparent;
  color: var(--ink-secondary);
  font-size: 11px;
  font-weight: 500;
  padding: 10px 16px;
  transition: all 0.2s ease;
  letter-spacing: 0.02em;
}

.segmented button.active {
  background: var(--accent-fill);
  color: var(--accent-ink);
}

.segmented button:hover:not(.active) {
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
}

/* Status Messages */
.status {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  margin: 12px 0;
}

/* Panel */
.panel {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 28px;
  margin-bottom: 24px;
}

/* Asset Grid */
.asset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 24px;
}

.asset-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.2s ease;
}

.asset-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.asset-image {
  width: 100%;
  aspect-ratio: 1;
  background: var(--bg-base);
  position: relative;
  overflow: hidden;
}

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

.asset-card h2 {
  font-size: 15px;
  font-weight: 600;
  padding: 16px 16px 8px;
  letter-spacing: -0.01em;
}

.asset-card p {
  font-size: 13px;
  color: var(--muted);
  padding: 0 16px;
  margin: 0 0 12px;
  line-height: 1.5;
}

/* Token IDs are 64 characters: one line with an ellipsis; the full ID is in the title tooltip. */
.asset-card p.asset-token {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
}

.asset-card .button {
  margin: auto 16px 16px;
  width: calc(100% - 32px);
}

.badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--accent-fill);
  color: var(--accent-ink);
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Profile Layout */
.profile-layout,
.wardrobe-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

.portal[data-page='profile'] .portal-title,
.portal[data-page='profile'] > .portal-main > .status,
.portal[data-page='profile'] .profile-layout {
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
}

.portal[data-page='profile'] .profile-layout {
  grid-template-columns: minmax(310px, .86fr) minmax(430px, 1.14fr);
  align-items: start;
}

.portal[data-page='profile'] .profile-preview,
.portal[data-page='profile'] #profile-form {
  box-shadow: 0 18px 42px rgba(0,0,0,.12);
}

.profile-preview {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  padding: 0 0 28px;
}

.profile-banner {
  height: 140px;
  background: linear-gradient(135deg, #1b1c1f 0%, #3b3d42 100%);
  position: relative;
  z-index: 0;
  background-size: cover;
  background-position: center;
}

.profile-avatar {
  position: relative;
  z-index: 1;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 4px solid var(--bg-elevated);
  margin: -50px auto 16px;
  display: block;
  object-fit: cover;
}

.profile-preview h2 {
  text-align: center;
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 700;
  margin: 0 20px 10px;
  letter-spacing: -0.01em;
}

.profile-preview p {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  margin: 0 20px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  white-space: pre-line;
}

/* Owner studio: a collectible-first profile editor rather than a settings form. */
.profile-title > div > p:last-child { margin: 9px 0 0; color: var(--muted); max-width: 460px; line-height: 1.55; }
.profile-studio-layout { grid-template-columns: minmax(340px, .9fr) minmax(440px, 1.1fr) !important; gap: 28px; }
.profile-preview { position: sticky; top: 22px; overflow: hidden; }
.profile-banner { height: 190px; background-image: linear-gradient(90deg, rgba(8,8,9,.18), rgba(8,8,9,.48)), url('/assets/asm-phone-promo.png'); }
.profile-preview-tag { position: absolute; right: 16px; top: 16px; padding: 7px 10px; border: 1px solid rgba(255,255,255,.3); border-radius: 999px; background: rgba(10,10,11,.66); backdrop-filter: blur(10px); color: #fff; font-size: 10px; font-weight: 700; letter-spacing: .08em; }
.profile-preview-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; padding: 0 24px; }
.profile-preview-heading .eyebrow { margin: 0 0 6px; }
.profile-preview h2 { margin: 0; text-align: left; }
.profile-preview > #profile-bio { text-align: left; margin: 12px 24px 0; }
.profile-visibility { flex: 0 0 auto; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .08em; padding: 7px 10px; }
.profile-visibility.is-public { border-color: color-mix(in srgb, var(--accent) 68%, transparent); background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent-bright); }
.profile-preview .progress { margin: 22px 24px 0; }
.profile-look-heading { padding: 28px 24px 12px; }
.profile-look-heading .eyebrow { margin: 0 0 4px; }
.profile-look-heading h3 { font-size: 20px; }
.profile-preview .profile-look-caption { margin: 12px 24px 0; text-align: left; }
.profile-collections-summary { display: grid; gap: 14px; margin: 28px 24px 0; padding-top: 22px; border-top: 1px solid var(--line); }
.profile-collections-summary .eyebrow { margin: 0 0 5px; }
.profile-collections-summary h3 { margin: 0; font-size: 20px; }
#profile-collections-list { display: grid; gap: 8px; }
.profile-empty-collections { margin: 0 !important; color: var(--muted); font-size: 13px; }
.profile-collection-row { display: flex; align-items: center; gap: 10px; min-width: 0; border: 1px solid var(--line); border-radius: 10px; padding: 9px; color: inherit; text-decoration: none; transition: border-color .18s ease, transform .18s ease; }
.profile-collection-row:hover { border-color: var(--accent); transform: translateY(-1px); }
.profile-collection-cover { display: grid; place-items: center; width: 38px; height: 38px; overflow: hidden; border-radius: 7px; background: var(--bg-base); color: var(--accent-bright); font-size: 10px; font-weight: 800; }
.profile-collection-cover img { width: 100%; height: 100%; object-fit: cover; }
.profile-collection-row > span:nth-child(2) { display: grid; min-width: 0; gap: 2px; }
.profile-collection-row b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.profile-collection-row small { color: var(--muted); font-size: 11px; }
.profile-collection-row em { margin-left: auto; color: var(--accent-bright); font-size: 10px; font-style: normal; font-weight: 700; }
.profile-studio-form { display: grid; gap: 0; overflow: hidden; }
.profile-studio-form fieldset { display: grid; gap: 0; min-width: 0; padding: 0; border: 0; }
.profile-studio-form legend { padding: 24px 28px; width: 100%; border-bottom: 1px solid var(--line); font-size: 12px; font-weight: 800; letter-spacing: .09em; }
.profile-form-section { display: grid; gap: 16px; padding: 26px 28px; border-bottom: 1px solid var(--line); }
.profile-form-section h2 { margin: 6px 0 0; font-size: 22px; }
.profile-form-section p { margin: 8px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.profile-form-section .eyebrow { margin: 0; }
.social-inputs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.social-inputs label { display: grid; gap: 7px; }
.collector-socials { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; }
.collector-socials a { border: 1px solid var(--line); border-radius: 999px; color: var(--accent-bright); font-size: 11px; font-weight: 700; letter-spacing: .06em; padding: 7px 10px; text-decoration: none; }
.collector-socials a:hover { border-color: var(--accent); }
.profile-community-settings { background: linear-gradient(130deg, color-mix(in srgb, var(--accent) 8%, transparent), transparent 60%); }
.profile-studio-form > fieldset > .profile-identity-note { margin: 20px 28px 0; }
.profile-studio-form > fieldset > .button[type='submit'] { margin: 20px 28px 28px; justify-self: start; }

.profile-look-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 24px 24px 12px; }
.profile-look-heading h3 { margin: 0; }
.profile-preview .profile-look-caption { margin-top: 16px; }
.profile-identity-note { color: var(--muted); line-height: 1.6; }
asm-viewer[hidden] { display: none !important; }
.preview-unavailable canvas { opacity: .25; }
.viewer-feedback { padding: 12px 16px; }

/* Upload Grid */
.upload-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.upload-grid label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-secondary);
  letter-spacing: 0.02em;
}

.owned-avatar-picker {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,.025);
  color: var(--ink-secondary);
  font-size: 12px;
  line-height: 1.45;
}

.owned-avatar-picker select { width: 100%; }
.owned-avatar-picker small { color: var(--muted); font-size: 11px; }

.upload-grid input[type='file'] {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--ink-secondary);
  font-size: 13px;
}

/* Wardrobe-specific */
.wardrobe-layout asm-viewer {
  height: 450px;
  background: var(--bg-base);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
}

#wardrobe-slots {
  display: grid;
  gap: 18px;
}

#wardrobe-slots label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-secondary);
  margin-bottom: 8px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

#wardrobe-slots select {
  width: 100%;
}

/* Keep native dropdown choices readable in the dark Wardrobe UI. */
#wardrobe-slots select {
  color-scheme: dark;
  background-color: #151516;
  color: #f2f0e9;
}

#wardrobe-slots select option {
  background-color: #151516;
  color: #f2f0e9;
}

#wardrobe-slots select option:checked,
#wardrobe-slots select option:hover {
  background-color: #bbff00;
  color: #111111;
}

#wardrobe-slots small {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  color: var(--subtle);
}

.preset-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-subtle);
}

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

.preset-row span {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
}

.preset-row .button {
  padding: 8px 16px;
  min-height: 34px;
}

/* Dialog */
.portal-dialog {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-elevated);
  color: var(--ink);
  padding: 32px;
  max-width: 600px;
  box-shadow: 
    0 0 0 1px rgba(0, 0, 0, 0.05),
    0 4px 8px rgba(0, 0, 0, 0.2),
    0 12px 32px rgba(0, 0, 0, 0.4);
}

.portal-dialog::backdrop {
  background: rgba(8, 9, 10, 0.85);
  backdrop-filter: blur(8px);
}

.portal-dialog h2 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.preview-dialog asm-viewer {
  height: 400px;
  background: var(--bg-base);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  margin: 20px 0;
}

/* Catalog Preview */
.catalog-preview {
  margin-top: 32px;
}

.catalog-preview h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 20px;
  letter-spacing: -0.01em;
}

.catalog-preview .asset-grid {
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

/* Shop Hero */
.shop-hero {
  height: 400px;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 40px;
  background: var(--bg-base);
  position: relative;
  border: 1px solid var(--line);
}

.shop-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shop-hero > div {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px;
  background: linear-gradient(90deg, rgba(8, 9, 10, 0.8), rgba(8, 9, 10, 0.3));
}

.shop-hero h2 {
  font-size: 42px;
  font-weight: 600;
  margin-bottom: 16px;
  letter-spacing: -0.03em;
}

.shop-hero p {
  font-size: 16px;
  color: var(--ink-secondary);
  max-width: 480px;
  line-height: 1.6;
}

/* Shop is the single public release and mint destination. */
.shop-hero-actions { display:flex; flex-wrap:wrap; gap:12px; margin-top:24px; }
.shop-explainer { display:grid; grid-template-columns:repeat(3,1fr); gap:16px; margin:0 0 58px; }
.shop-explainer article, .crate-placeholder { border:1px solid var(--line); border-radius:12px; background:var(--bg-elevated); padding:24px; }
.shop-explainer span { color:var(--accent-bright); font-size:12px; font-weight:700; letter-spacing:.1em; }
.shop-explainer h2, .crate-placeholder h2 { font-size:18px; margin:14px 0 8px; }
.shop-explainer p, .crate-placeholder p { color:var(--muted); font-size:14px; line-height:1.55; margin:0; }
.shop-section { margin:0 0 64px; scroll-margin-top:24px; }
.shop-section-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:24px; margin-bottom:22px; }
.shop-section-heading h2 { margin:6px 0 8px; font-size:28px; }
.shop-section-heading p { color:var(--muted); margin:0; max-width:620px; line-height:1.55; }
.shop-filters { display:flex; align-items:end; flex-wrap:wrap; gap:14px; padding:16px; background:var(--bg-elevated); border:1px solid var(--line); border-radius:10px; margin:16px 0 28px; }
.shop-filters label { display:grid; gap:6px; color:var(--muted); font-size:11px; font-weight:600; letter-spacing:.07em; text-transform:uppercase; }
.shop-filters select { min-width:155px; }
.shop-filters span { margin-left:auto; color:var(--subtle); font-size:12px; }
.shop-collection-group { margin:0 0 42px; }
.shop-collection-group > div:first-child { padding-bottom:16px; }
.shop-collection-group h3 { margin:5px 0 7px; font-size:22px; }
.shop-collection-group p { margin:0; color:var(--muted); font-size:14px; }
body[data-page="shop"] .shop-collection-group .eyebrow { overflow-wrap:anywhere; }
.release-price { color:var(--accent-bright) !important; font-size:12px !important; font-weight:700; letter-spacing:.04em; }
.release-traits { display:flex; flex-wrap:wrap; gap:6px; padding:0 16px 16px; }
.release-traits span { border:1px solid var(--line); border-radius:999px; color:var(--ink-secondary); font-size:11px; padding:3px 8px; }
.shop-release-summary { display:flex; flex-wrap:wrap; align-items:center; gap:8px 12px; padding:0 16px 16px; }
.shop-release-summary .release-price { padding:0; margin:0; }
.shop-rarity { --rarity-color:var(--rarity-common); display:inline-flex; flex-wrap:wrap; align-items:center; gap:5px; max-width:100%; padding:4px 8px; border:1px solid color-mix(in srgb,var(--rarity-color) 40%,var(--line)); border-radius:6px; color:color-mix(in srgb, var(--rarity-color) 70%, #fff); font-size:11px; line-height:1.4; overflow-wrap:anywhere; }
.shop-rarity > span { color:var(--muted); }
.shop-rarity[data-rarity="uncommon"] { --rarity-color:var(--rarity-uncommon); }
.shop-rarity[data-rarity="rare"] { --rarity-color:var(--rarity-rare); }
.shop-rarity[data-rarity="very-rare"] { --rarity-color:var(--rarity-very-rare); }
.shop-rarity[data-rarity="epic"] { --rarity-color:var(--rarity-epic); }
.shop-rarity[data-rarity="legendary"] { --rarity-color:var(--rarity-legendary); }
.shop-rarity[data-rarity="mythic"] { --rarity-color:var(--rarity-mythic); }
.shop-rarity[data-rarity="super-rare"] { --rarity-color:var(--rarity-super-rare); }
.shop-rarity[data-rarity="exotic"] { --rarity-color:var(--rarity-exotic); }
.crate-placeholder { margin-top:24px; border-style:dashed; max-width:460px; }
.crate-preview-status { flex-shrink:0; display:inline-flex; padding:10px 14px; border:1px solid var(--line); border-radius:999px; color:var(--accent-bright); font-size:10px; font-weight:700; letter-spacing:.08em; }
.crate-info-panel { display:grid; grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr); border:1px solid var(--line); border-radius:12px; background:var(--bg-elevated); overflow:hidden; }
.crate-info-intro { padding:32px; border-right:1px solid var(--line); background:linear-gradient(135deg,rgba(145,126,225,.12),transparent); }
.crate-info-mark { display:block; color:var(--accent-bright); font-size:52px; line-height:1; margin-bottom:24px; }
.crate-info-intro h3 { margin:10px 0 16px; font-size:clamp(26px,3vw,38px); line-height:1.12; }
.crate-info-intro > p:last-child, .crate-info-steps p, .crate-release-note { color:var(--muted); font-size:14px; line-height:1.65; }
.crate-info-intro > p:last-child { margin:0; }
.crate-info-steps { list-style:none; padding:12px 28px; margin:0; }
.crate-info-steps li { display:flex; gap:18px; padding:22px 0; }
.crate-info-steps li + li { border-top:1px solid var(--line); }
.crate-info-steps li > span { color:var(--accent-bright); font-size:12px; font-weight:700; padding-top:3px; }
.crate-info-steps h3 { margin:0 0 7px; font-size:17px; }
.crate-info-steps p { margin:0; }
.crate-release-note { margin:18px 0 0; padding:16px 20px; border-left:2px solid var(--accent-bright); }
.crate-release-note strong { color:var(--ink-secondary); }
@media(max-width:700px) {
  .shop-crates .shop-section-heading { align-items:flex-start; flex-direction:column; gap:16px; }
  .crate-info-panel { grid-template-columns:minmax(0,1fr); }
  .crate-info-intro { padding:24px; border-right:0; border-bottom:1px solid var(--line); }
  .crate-info-steps { padding:4px 24px; }
}

/* Orders */
.order-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

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

.order-row strong {
  display: block;
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--ink);
}

.order-row p {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}

.order-row .button {
  flex-shrink: 0;
}

/* Collector Grid */
.collector-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.community-intro {
  max-width: 680px;
  margin: -4px auto 22px;
  color: var(--muted);
  text-align: center;
  line-height: 1.55;
}

.owner-collection-layout { align-items: start; }
.owner-collection-results { margin: 0 0 14px; color: var(--muted); font-size: 12px; letter-spacing: .05em; text-transform: uppercase; }
.community-owned-asset .asset-image { background: var(--bg-base); }
.community-owned-asset .asset-image img { object-fit: cover; }

/* Keep the directory explanation deliberately centered below the page title.
   Detail pages hide the Community mode switch and retain their own heading. */
.collector-detail ~ .community-intro {
  display: none;
}

.community-discovery-meta,
.community-card-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.community-discovery-meta {
  margin: -6px 0 24px;
}

.community-discovery-meta span,
.community-card-facts span,
.community-handle {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: .06em;
  line-height: 1.2;
  padding: 6px 9px;
  text-transform: uppercase;
}

.community-card-facts {
  margin: 16px 0 2px;
}

.community-handle {
  display: inline-block;
  margin: 4px 0 0;
  text-transform: none;
}

.community-empty .button {
  margin-top: 22px;
}

.collector-card {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.2s ease;
}

.collector-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.collector-card .button {
  margin-top: 18px;
}

.collector-card > img,
.collector-card > .collector-banner {
  display: block;
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.collector-card-body {
  display: grid;
  align-content: start;
  padding: 22px;
}

.collector-card-avatar {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  margin: -56px 0 14px;
  overflow: hidden;
  border: 4px solid var(--bg-elevated);
  border-radius: 50%;
  background: var(--bg-base);
  box-shadow: 0 8px 18px rgba(0, 0, 0, .28);
}

.collector-card-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.collector-card-avatar i {
  color: var(--accent-bright);
  font-size: 24px;
  font-style: normal;
  font-weight: 800;
}

.collector-card-body h2 { margin: 12px 0 4px; }
.collector-card-body > p:not(.eyebrow) { color: var(--muted); line-height: 1.55; min-height: 44px; }
.collector-card-body .button { width: 100%; text-align: center; }

.collector-banner {
  height: 120px;
  background: linear-gradient(135deg, #1b1c1f 0%, #3b3d42 100%);
}

.collector-identity {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 20px 20px;
  margin-top: -40px;
}

.collector-identity > img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 4px solid var(--bg-elevated);
  object-fit: cover;
  flex-shrink: 0;
}

.collector-identity h2 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}

.collector-identity p {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}

.community-profile-grid {
  display: grid;
  grid-template-columns: minmax(250px, .8fr) minmax(0, 1.2fr);
  gap: 24px;
  margin: 24px 0;
}

.community-look,
.community-showcase {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-base);
}

.community-look asm-viewer {
  display: block;
  height: 340px;
  margin: 14px 0;
  border-radius: 10px;
  background: var(--bg-elevated);
}

.community-look > p:not(.eyebrow) {
  color: var(--muted);
  font-size: 13px;
}

.community-equipped {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.community-equipped span {
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
}

.community-showcase > h2 {
  margin: 4px 0 18px;
}

.community-showcase-copy { margin: -8px 0 18px; color: var(--muted); line-height: 1.55; }
.community-collections-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.community-collection-card { display: grid; grid-template-columns: 72px minmax(0, 1fr); align-items: center; gap: 13px; min-height: 96px; padding: 11px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.025); color: inherit; text-decoration: none; transition: border-color .18s ease, background .18s ease, transform .18s ease; }
.community-collection-card:hover { border-color: var(--accent); background: rgba(255,255,255,.05); transform: translateY(-2px); }
.community-collection-cover { display: grid; place-items: center; width: 72px; height: 72px; overflow: hidden; border-radius: 9px; background: var(--bg-base); color: var(--accent-bright); font-size: 12px; font-weight: 800; }
.community-collection-cover img { width: 100%; height: 100%; object-fit: cover; }
.community-collection-card-copy { display: grid; min-width: 0; gap: 5px; }
.community-collection-card-copy b { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.community-collection-card-copy small { color: var(--muted); font-size: 11px; }
.community-collection-open { grid-column: 2; color: var(--accent-bright); font-size: 10px; font-weight: 800; letter-spacing: .06em; }
.community-collections-empty { color: var(--muted); }

.collector-collection-detail { max-width: 1180px; margin: 0 auto; padding: 28px; border: 1px solid var(--line); border-radius: 18px; background: var(--bg-elevated); box-shadow: 0 26px 70px rgba(0,0,0,.24); }
.collector-collection-detail > .underlink { display: inline-block; margin-bottom: 34px; }
.collector-collection-heading { max-width: 720px; margin-bottom: 28px; }
.collector-collection-heading h2 { margin: 6px 0 10px; font-size: clamp(30px, 4vw, 46px); letter-spacing: -.035em; }
.collector-collection-heading > p:not(.eyebrow) { margin: 0; color: var(--muted); line-height: 1.55; }
.owner-public-collection-card { margin-bottom: 28px; }
.owner-public-collection-card .public-collection-heading { padding-bottom: 15px; }
.owner-collection-summary { display: flex; flex-wrap: wrap; gap: 9px 18px; padding: 0 24px 22px 122px; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .09em; }
.owner-collection-summary span + span { padding-left: 18px; border-left: 1px solid var(--line); }
.community-owned-item-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.community-owned-item-card { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.025); }
.community-owned-item-card > img, .community-owned-item-placeholder { display: block; width: 100%; aspect-ratio: 1 / .82; object-fit: cover; background: var(--bg-base); }
.community-owned-item-placeholder { display: grid; place-items: center; color: var(--accent-bright); font-size: 18px; font-weight: 800; }
.community-owned-item-card > div:last-child { padding: 14px; }
.community-owned-item-card h3 { margin: 0; font-size: 14px; }
.community-owned-item-card p { margin: 6px 0 0; color: var(--muted); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; }

/* Public Community profile: treat it as a collectible identity, not an admin card. */
.collector-grid:has(.collector-detail) { display: block; max-width: 1180px; margin: 0 auto; }
.collector-detail { overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--bg-elevated); box-shadow: 0 26px 70px rgba(0,0,0,.24); }
.collector-detail > .collector-banner { position: relative; height: clamp(250px, 34vw, 390px); background-image: linear-gradient(90deg, rgba(8,8,9,.42), rgba(8,8,9,.1) 55%, rgba(8,8,9,.5)), url('/assets/asm-phone-promo.png'); background-size: cover; background-position: center 44%; }
.collector-detail > img.collector-banner { width: 100%; height: clamp(250px, 34vw, 390px); object-fit: cover; }
.collector-detail .collector-identity { position: relative; z-index: 1; flex-direction: column; align-items: center; gap: 8px; margin: -66px 28px 0; padding: 0 0 24px; text-align: center; }
.collector-detail .collector-identity > img { width: 128px; height: 128px; border-width: 5px; background: var(--bg-elevated); box-shadow: 0 12px 30px rgba(0,0,0,.3); }
.collector-detail .collector-identity > div { max-width: 680px; }
.collector-detail .collector-identity h2 { margin: 4px 0 6px; font-size: clamp(28px, 4vw, 42px); letter-spacing: -.035em; }
.collector-detail .collector-identity p { font-size: 14px; line-height: 1.6; }
.collector-detail .community-handle { margin-top: 0; }
.collector-detail .community-handle-link { color: var(--accent-bright); text-decoration: none; transition: border-color .18s ease, background .18s ease; }
.collector-detail .community-handle-link:hover,
.collector-detail .community-handle-link:focus-visible { border-color: var(--accent); background: rgba(255,255,255,.07); }
.collector-detail .collector-socials { justify-content: center; }
.collector-detail .community-discovery-meta { justify-content: center; margin: 0 28px 28px; }
.collector-detail .community-showcase { margin: 0 28px 28px; padding: 26px; border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(145deg, rgba(255,255,255,.04), rgba(255,255,255,.01)); }
.collector-detail .community-showcase > h2 { font-size: 28px; margin: 7px 0 10px; }
.collector-detail .community-wardrobe { margin: 0 28px 28px; padding: 26px; border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(150deg, rgba(255,255,255,.055), rgba(255,255,255,.015)); }
.community-wardrobe-heading { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 14px; margin-bottom: 20px; }
.community-wardrobe-heading h2 { margin: 5px 0; font-size: clamp(24px, 3vw, 34px); letter-spacing: -.035em; }
.community-wardrobe-heading p:last-child { margin: 0; color: var(--muted); font-size: 13px; }
.community-wardrobe-grid { display: grid; grid-template-columns: minmax(280px, 1.15fr) minmax(250px, .85fr); gap: 20px; }
.community-look-stage { position: relative; min-height: 430px; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #dedee1; }
.community-look-stage asm-viewer { width: 100%; height: 430px; }
.community-look-stage > span { position: absolute; bottom: 14px; left: 14px; padding: 7px 10px; border-radius: 6px; background: rgba(8,8,9,.75); color: #fff; font-size: 10px; font-weight: 800; letter-spacing: .1em; pointer-events: none; }
.community-look-side { display: flex; flex-direction: column; min-width: 0; }
.community-look-pieces { display: grid; gap: 8px; margin: 10px 0 18px; }
.community-look-piece { display: flex; align-items: center; gap: 11px; min-width: 0; padding: 8px; border: 1px solid var(--line); border-radius: 9px; background: rgba(0,0,0,.12); }
.community-look-piece img,.community-look-piece-fallback { flex: none; width: 52px; height: 52px; border-radius: 6px; object-fit: cover; background: #dedee1; }
.community-look-piece-fallback { display: grid; place-items: center; color: #222; font-size: 10px; font-weight: 800; }
.community-look-piece span:last-child { display: grid; min-width: 0; gap: 4px; }
.community-look-piece small { color: var(--muted); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.community-look-piece b { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.community-share-quest { margin-top: auto; padding: 18px; border: 1px solid var(--accent); border-radius: 10px; background: rgba(255,255,255,.035); }
.community-share-quest h3 { margin: 7px 0; font-size: 19px; }
.community-share-quest > p:not(.eyebrow) { margin: 0 0 14px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.community-share-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.community-share-actions .button { flex: 1 1 140px; text-align: center; }
.community-share-quest small { display: block; margin-top: 12px; color: var(--muted); line-height: 1.5; }
.collector-detail > .underlink { display: inline-block; margin: 0 28px 30px; }

@media (max-width: 760px) {
  .collector-detail .collector-identity { margin-left: 16px; margin-right: 16px; }
  .collector-detail .community-showcase { margin: 0 16px 20px; padding: 18px; }
  .collector-detail .community-wardrobe { margin: 0 16px 20px; padding: 18px; }
  .community-wardrobe-grid { grid-template-columns: 1fr; }
  .community-look-stage { min-height: 350px; }
  .community-look-stage asm-viewer { height: 350px; }
  .collector-detail > .underlink { margin: 0 16px 24px; }
  .collector-collection-detail { padding: 20px 16px; border-radius: 14px; }
  .collector-collection-detail > .underlink { margin-bottom: 26px; }
  .owner-public-collection-card .public-collection-heading { padding-bottom: 13px; }
  .owner-collection-summary { padding: 0 20px 18px; }
  .social-inputs { grid-template-columns: 1fr; }
}

/* Public Collections */
.public-collections {
  overflow: hidden;
}

.public-collection-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,.14);
}
.public-collection-action h2 { margin: .15rem 0 .45rem; font-size: 1.15rem; }
.public-collection-action p:not(.eyebrow) { margin: 0; max-width: 54ch; color: var(--muted,#aaa); }
@media (max-width:680px) {
  .public-collection-action { align-items: flex-start; flex-direction: column; gap: 14px; }
  .public-collection-action .button { width: 100%; text-align: center; }
}

.public-collection-card {
  --collection-banner: linear-gradient(135deg, #1b1c1f, #3b3d42);
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg-elevated);
  margin-bottom: 24px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.public-collection-banner {
  height: 150px;
  background-image: linear-gradient(
      90deg,
      rgba(15, 16, 17, 0.7),
      rgba(15, 16, 17, 0.1)
    ),
    var(--collection-banner);
  background-position: center;
  background-size: cover;
}

.public-collection-heading {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 24px 20px;
  margin-top: -40px;
}

.public-collection-heading img,
.collection-profile-fallback {
  width: 80px;
  height: 80px;
  display: grid;
  place-items: center;
  flex: 0 0 80px;
  border: 4px solid var(--bg-elevated);
  border-radius: 50%;
  background: #2a2b2f;
  object-fit: cover;
  color: var(--ink);
  font-size: 32px;
  font-weight: 700;
}

.public-collection-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.public-collection-heading h2 {
  margin: 6px 0;
  color: var(--ink);
  font-size: 26px;
  letter-spacing: -0.02em;
  font-weight: 600;
}

.public-collection-heading span {
  color: var(--muted);
  font-size: 13px;
}

.public-collection-items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  padding: 0 24px 24px;
}

.public-release {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  transition: all 0.2s ease;
}

.public-release:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--line-strong);
}

.public-release-image {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  background: var(--bg-base) center/cover no-repeat;
  flex-shrink: 0;
}

.public-release strong,
.public-release span {
  display: block;
}

.public-release strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 4px;
}

.public-release span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.public-collection-empty {
  padding: 32px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  color: var(--muted);
  text-align: center;
}

.public-collection-empty p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.public-collection-empty strong {
  display: block;
  color: var(--ink);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.public-collection-empty span {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  color: var(--ink-secondary);
}

/* Empty State */
.empty {
  text-align: center;
  padding: 60px 32px;
  color: var(--muted);
}

.empty h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.empty p {
  font-size: 14px;
  line-height: 1.6;
  max-width: 400px;
  margin: 0 auto;
}

/* Responsive - Mobile */
@media (max-width: 750px) {
  .portal-rail {
    position: relative;
    width: 100%;
    height: auto;
    padding: 16px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .portal-logo {
    font-size: 22px;
  }

  .portal-logo span {
    display: none;
  }

  .portal-rail nav {
    display: flex;
    gap: 6px;
    /* Full-bleed scroller: padding keeps the first and last tab clear of the screen edge,
       the edge fades show there is more to scroll, and snapping stops on whole labels. */
    margin: 16px -16px 0;
    padding: 0 16px 4px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-padding-inline: 16px;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    --nav-fade-start: #000;
    --nav-fade-end: transparent;
    -webkit-mask-image: linear-gradient(90deg, var(--nav-fade-start) 0, #000 40px, #000 calc(100% - 40px), var(--nav-fade-end) 100%);
    mask-image: linear-gradient(90deg, var(--nav-fade-start) 0, #000 40px, #000 calc(100% - 40px), var(--nav-fade-end) 100%);
  }

  /* site-config.js marks the edges that have more tabs; only those edges fade. */
  .portal-rail nav[data-scroll-start="false"] { --nav-fade-start: transparent; }
  .portal-rail nav[data-scroll-end="true"] { --nav-fade-end: #000; }

  .portal-rail nav::-webkit-scrollbar {
    display: none;
  }

  .portal-rail nav a {
    flex: 0 0 auto;
    font-size: 12px;
    padding: 10px 14px;
    white-space: nowrap;
    gap: 8px;
    min-height: 44px;
    scroll-snap-align: start;
  }

  /* Phone tap targets: header buttons and segmented tabs are at least 44px tall. */
  .portal .button,
  .portal .segmented button {
    min-height: 44px;
  }

  .portal-rail nav span {
    display: none;
  }

  .rail-bottom {
    display: none;
  }

  .portal-main {
    margin: 0;
    padding: 20px 16px 60px;
  }

  .portal-top {
    margin-bottom: 24px;
  }

  .portal-title {
    align-items: flex-start;
    margin-bottom: 24px;
    flex-direction: column;
  }

  .portal-title h1 {
    font-size: 28px;
  }

  .portal-title > span {
    display: none;
  }

  .portal-title > .button {
    padding: 9px 14px;
    font-size: 11px;
  }

  .toolbar {
    gap: 10px;
  }

  .toolbar input {
    flex-basis: 100%;
  }

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

  .asset-card h2 {
    font-size: 14px;
  }

  .asset-card .button {
    padding: 9px 12px;
    font-size: 11px;
  }

  .profile-layout,
  .wardrobe-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .upload-grid {
    grid-template-columns: 1fr;
  }

  .panel {
    padding: 20px;
  }

  .profile-preview {
    padding: 0 0 24px;
  }

  .wardrobe-layout asm-viewer {
    height: 360px;
  }

  .catalog-preview .asset-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .portal-dialog {
    padding: 24px;
    width: calc(100vw - 32px);
  }

  .preview-dialog asm-viewer {
    height: 320px;
  }

  .collector-grid {
    grid-template-columns: 1fr;
  }

  .community-profile-grid {
    grid-template-columns: 1fr;
  }

  .community-look asm-viewer {
    height: 300px;
  }

  .collector-banner {
    height: 100px;
  }

  .collector-identity {
    align-items: flex-start;
    margin-top: -35px;
  }

  .collector-identity > img {
    width: 70px;
    height: 70px;
  }

  .collector-identity h2 {
    font-size: 18px;
  }

  .shop-hero {
    height: 280px;
  }

  .shop-hero > div {
    padding: 24px;
  }

  .shop-hero h2 {
    font-size: 32px;
  }

  .shop-explainer {
    grid-template-columns: 1fr;
    margin-bottom: 40px;
  }

  .shop-section {
    margin-bottom: 46px;
  }

  .shop-section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .shop-filters {
    align-items: stretch;
  }

  .shop-filters label,
  .shop-filters select {
    width: 100%;
  }

  .shop-filters span {
    margin-left: 0;
  }

  .order-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .empty {
    padding: 45px 20px;
  }

  .portal .button {
    max-width: 100%;
  }

  .public-collection-banner {
    height: 120px;
  }

  .public-collection-heading {
    margin-top: -35px;
    padding: 0 20px 16px;
  }

  .public-collection-heading img,
  .collection-profile-fallback {
    width: 70px;
    height: 70px;
    flex: 0 0 70px;
  }

  .public-collection-heading h2 {
    font-size: 22px;
  }

  .public-collection-items {
    grid-template-columns: 1fr;
    padding: 0 20px 20px;
  }
}

/* --- Restored: critical rules dropped during the visual redesign --- */
.form fieldset{padding:0;border:0;min-width:0}
.form legend{font-size:12px;font-weight:600;margin-bottom:24px;color:var(--muted);text-transform:uppercase;letter-spacing:.04em}
.form label{display:grid;gap:8px;margin-bottom:20px;color:var(--ink-secondary);font-size:13px}
.form label input,.form label textarea,.form label select{width:100%}
.form .check{display:flex;align-items:center;gap:12px}
.form .check{min-height:44px}.form .check input{width:24px;height:24px;flex:none;accent-color:var(--accent)}
.form small{font-size:11px;color:var(--subtle)}
.form input[type=file]{font-size:11px;width:100%}
.check{display:flex;align-items:center;gap:12px}
.caption{color:var(--muted);font-size:12px;margin:15px 0 25px}
.progress{display:grid;gap:7px;margin:25px 20px 0;border:1px solid var(--line);border-radius:12px;padding:16px}
.progress span{font-size:10px;color:var(--muted);text-transform:uppercase;letter-spacing:.04em}
.progress strong{font-size:15px;color:var(--ink)}
.orders{margin-top:65px}
.purchase-success{margin-top:48px;padding:24px;border:1px solid color-mix(in srgb,var(--accent) 46%,var(--line));border-radius:16px;background:linear-gradient(135deg,color-mix(in srgb,var(--accent) 12%,var(--bg-elevated)),var(--bg-elevated));display:grid;grid-template-columns:minmax(0,1fr) minmax(180px,280px);gap:28px;align-items:center}
.purchase-success[hidden]{display:none}
.purchase-success h2{font-size:clamp(25px,3vw,38px);line-height:1.02;margin:7px 0 12px}
.purchase-success p{color:var(--muted);line-height:1.55;max-width:62ch}
.purchase-success dl{display:grid;grid-template-columns:max-content minmax(0,1fr);gap:6px 12px;margin:18px 0;color:var(--muted);font-size:13px}.purchase-success dd{margin:0;color:var(--ink)}.receipt-token{overflow-wrap:anywhere}
.purchase-success-actions{display:flex;flex-wrap:wrap;gap:9px}.purchase-success-actions .button{margin:0}
.purchase-success-image{width:100%;aspect-ratio:1;object-fit:cover;border-radius:12px;border:1px solid var(--line)}
@media (max-width:700px){.purchase-success{grid-template-columns:1fr}.purchase-success-image{max-width:330px;order:-1}}
.orders>h2{font-size:23px;margin-bottom:15px;color:var(--ink)}
.table-wrap{overflow-x:auto}
.portal-table{border-collapse:collapse;width:100%}
.portal-table th,.portal-table td{padding:10px 12px;border-bottom:1px solid var(--line);text-align:left;font-size:13px;color:var(--ink-secondary)}
.portal-table th{color:var(--muted);font-weight:500;font-size:11px;text-transform:uppercase;letter-spacing:.04em}

/* Collections Marketplace */
.portal[data-page='collectors'] .portal-title,
.portal[data-page='inventory'] .portal-title {
  justify-content: center;
  text-align: center;
  margin-bottom: 18px;
}

.portal[data-page='collectors'] .toolbar {
  max-width: 700px;
  margin: 26px auto 14px;
}

.portal[data-page='inventory'] .toolbar {
  max-width: 760px;
  justify-content: center;
  margin: 26px auto 14px;
}

.portal[data-page='inventory'] .toolbar > input { flex: 1 1 360px; }

.portal[data-page='collectors'] .status,
.portal[data-page='inventory'] .status {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.portal[data-page='collectors'] .collector-grid,
.portal[data-page='inventory'] .asset-grid {
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
}

.portal[data-page='collectors'] .community-empty,
.portal[data-page='inventory'] .empty {
  grid-column: 1 / -1;
  max-width: 680px;
  width: 100%;
  margin: 26px auto;
  padding: 62px 38px;
  border: 1px dashed var(--line-strong);
  border-radius: 18px;
  background: radial-gradient(circle at 50% 0%, rgba(255,255,255,.07), transparent 65%), var(--bg-elevated);
}

/* Community Map: deliberately a broad-area visual, never a precise map. */
.location-inputs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.profile-location-settings { background: linear-gradient(130deg, color-mix(in srgb, #ffffff 5%, transparent), transparent 62%); }
.profile-location-settings > small { display: block; margin-top: -6px; line-height: 1.55; }
.community-map-privacy { max-width: 650px; margin: 16px auto 18px; color: var(--muted); font-size: 13px; line-height: 1.55; text-align: center; }
.community-map { max-width: 1180px; margin: 8px auto 0; }
.community-map-canvas { position: relative; min-height: min(55vw, 620px); overflow: hidden; border: 1px solid var(--line-strong); border-radius: 20px; background: radial-gradient(ellipse at 16% 35%, rgba(49, 102, 156, .34), transparent 32%), radial-gradient(ellipse at 72% 68%, rgba(116, 72, 143, .24), transparent 32%), linear-gradient(145deg, #070d14, #101925 53%, #11101a); isolation: isolate; cursor: grab; touch-action: none; }
.community-map-canvas.is-dragging { cursor: grabbing; }
.community-map-world { position: absolute; width: 100%; height: auto; aspect-ratio: 2 / 1; top: 50%; left: 0; margin-top: -25%; transform-origin: center; transition: transform .18s ease-out; }
.community-map-canvas.is-dragging .community-map-world { transition: none; }
.community-world-art { position: absolute; inset: 0; width: 100%; height: 100%; }
.community-world-art .map-land { fill: #29353e; stroke: #667782; stroke-width: .65; stroke-linejoin: round; }
.community-world-art .map-land path { cursor: zoom-in; }
.community-world-art .map-land path:hover { fill: #40525e; }
.community-world-art .map-subdivision { fill: none; stroke: rgba(102, 119, 130, .92); stroke-width: .58; stroke-linejoin: round; pointer-events: auto; }
.community-world-art .map-subdivision path { cursor: zoom-in; }
.community-world-art .map-subdivision path:hover { stroke: rgba(240, 248, 255, .98); stroke-width: .85; }
.community-world-art .map-graticule { stroke: rgba(157, 183, 210, .16); stroke-width: 1; }
.community-world-art .map-coast { stroke: rgba(231, 243, 255, .38); stroke-width: 2; stroke-dasharray: 10 13; }
.community-world-art .map-labels { fill: rgba(230, 240, 249, .55); font: 700 18px/1 ui-sans-serif, system-ui, sans-serif; letter-spacing: .18em; text-anchor: middle; }
.community-map-grid { position: absolute; inset: 0; z-index: -1; opacity: .1; background-image: linear-gradient(rgba(222,238,255,.13) 1px, transparent 1px), linear-gradient(90deg, rgba(222,238,255,.13) 1px, transparent 1px); background-size: 8% 14%; mask-image: radial-gradient(ellipse at center, #000 24%, transparent 82%); }
.community-map-toolbar { position: absolute; z-index: 5; top: 16px; left: 16px; display: grid; grid-template-columns: 42px 42px auto; overflow: hidden; border: 1px solid rgba(255,255,255,.2); border-radius: 12px; background: rgba(10,13,18,.85); box-shadow: 0 8px 24px rgba(0,0,0,.28); backdrop-filter: blur(10px); }
.community-map-toolbar button, .community-map-toolbar output { display: grid; place-items: center; min-width: 42px; height: 40px; margin: 0; border: 0; border-right: 1px solid rgba(255,255,255,.13); background: transparent; color: var(--ink); font: 700 18px/1 inherit; }
.community-map-toolbar button { cursor: pointer; }
.community-map-toolbar button:hover { background: rgba(255,255,255,.11); }
.community-map-toolbar .community-map-reset { width: auto; padding: 0 11px; font-size: 10px; letter-spacing: .08em; }
.community-map-toolbar output { padding: 0 10px; border-right: 0; color: var(--muted); font-size: 10px; letter-spacing: .07em; }
.community-map-pin { --pin-size: 44px; position: absolute; left: var(--map-x); top: var(--map-y); display: block; width: var(--pin-size); height: var(--pin-size); color: var(--ink); text-decoration: none; transform: translate(-50%, -50%) scale(var(--pin-inverse-scale, 1)); transform-origin: center; }
.community-map-avatar { position: relative; display: grid; place-items: center; width: var(--pin-size); height: var(--pin-size); overflow: visible; border: 2px solid rgba(255,255,255,.92); border-radius: 50%; background: var(--game-accent); box-shadow: 0 0 0 5px var(--game-accent-soft), 0 8px 16px rgba(0,0,0,.38); font-size: 13px; font-weight: 800; }
.community-map-avatar::after { content: ''; position: absolute; bottom: -7px; width: 12px; height: 12px; border-right: 2px solid rgba(255,255,255,.9); border-bottom: 2px solid rgba(255,255,255,.9); background: var(--game-accent); transform: rotate(45deg); }
.community-map-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.community-map-avatar i { color: var(--ink); font-style: normal; }
.community-map-avatar em { position: absolute; right: -8px; bottom: -8px; z-index: 2; display: grid; place-items: center; min-width: 22px; height: 22px; padding: 0 4px; border: 2px solid #11151d; border-radius: 999px; background: var(--ink); color: #11151d; font: 800 9px/1 inherit; font-style: normal; }
.community-map-pin:hover { color: var(--game-accent-bright); z-index: 2; }
.community-map-pin:hover .community-map-avatar { filter: brightness(1.16); transform: translateY(-3px); }
.community-map-empty { position: absolute; top: 50%; left: 50%; width: min(430px, calc(100% - 32px)); padding: 28px; border: 1px solid rgba(255,255,255,.16); border-radius: 16px; background: rgba(8, 11, 16, .71); text-align: center; transform: translate(-50%, -50%); }
.community-map-empty .eyebrow { margin: 0 0 7px; }
.community-map-empty h2 { margin: 0; font-size: 25px; }
.community-map-empty p:not(.eyebrow) { margin: 10px 0 18px; color: var(--muted); line-height: 1.55; }
.community-map-legend { display: flex; justify-content: space-between; gap: 16px; padding: 13px 2px 0; color: var(--muted); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; }
.community-map-legend span { display: inline-flex; align-items: center; gap: 7px; }
.community-map-legend i { width: 9px; height: 9px; border-radius: 50%; background: var(--game-accent); box-shadow: 0 0 0 3px var(--game-accent-soft); }

@media (max-width: 680px) {
  .location-inputs { grid-template-columns: 1fr; }
  /* Phones: a tall map (>= 60vh) that opens zoomed in (mapFitScale in portal.js). */
  .community-map-canvas { min-height: max(60vh, 440px); }
  /* Markers keep a 44px tap target; the avatar inside is drawn a little smaller. */
  .community-map-pin { --pin-size: 44px; display: grid; place-items: center; }
  .community-map-pin .community-map-avatar { width: 34px; height: 34px; }
  .community-map-pin span { font-size: 10px; }
  .community-map-toolbar { grid-template-columns: 44px 44px auto; }
  .community-map-toolbar button, .community-map-toolbar output { min-width: 44px; height: 44px; }
  .community-map-legend { flex-direction: column; gap: 6px; }
}

/* Map hero: eyebrow + big bold h1, left-aligned like Shop and Inventory. The Map is
   part of the Offline District community, so it carries the game blue. */
body[data-page="map"] .map-hero { display: grid; gap: 12px; max-width: 1180px; margin: 0 auto 22px; padding: 22px 18px 20px; border: 1px solid var(--line-strong); border-radius: 18px; background: radial-gradient(90% 80% at 0% 0%, var(--game-accent-soft), transparent 62%), linear-gradient(180deg, #17181a, #0f1011); }
body[data-page="map"] .map-hero .eyebrow { margin: 0; color: #e8e8e6; font-size: 11px; font-weight: 700; letter-spacing: .14em; }
body[data-page="map"] .map-hero h1 { margin: 0; font-size: clamp(40px, 11vw, 84px); font-weight: 800; line-height: .9; letter-spacing: -.05em; text-transform: uppercase; }
body[data-page="map"] .map-hero-lede { margin: 0; max-width: 60ch; color: var(--ink-secondary); font-size: 15px; line-height: 1.55; }
body[data-page="map"] .map-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
body[data-page="map"] .map-hero-actions .button { min-height: 44px; }
body[data-page="map"] #collector-status { max-width: 1180px; margin: 0 auto 12px; }
@media (min-width: 900px) { body[data-page="map"] .map-hero { padding: 32px 32px 28px; } }

.collections-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 420px));
  justify-content: center;
  gap: 28px;
  max-width: 1180px;
  margin: 32px auto;
}

.collection-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s ease;
}

.collection-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.collection-card > img {
  display: block;
  width: 100%;
  height: 190px;
  object-fit: cover;
  background: var(--bg-base);
}

.collection-card > div {
  padding: 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.collection-card h2 {
  margin: 7px 0 10px;
  font-size: 23px;
  letter-spacing: -.03em;
}

.collection-card p:not(.eyebrow) {
  min-height: 42px;
  color: var(--muted);
  line-height: 1.55;
}

.collection-card .button { margin-top: auto; width: 100%; text-align: center; }
.collection-card > div > p:not(.eyebrow) { margin-bottom: 20px; }

.collection-identity { display:flex; align-items:center; gap:12px; }
.collection-avatar { width:56px; height:56px; object-fit:cover; border:1px solid var(--line); border-radius:50%; flex-shrink:0; }
.collection-detail-branding { margin:0 0 26px; border:1px solid var(--line); border-radius:16px; overflow:hidden; background:var(--bg-elevated); }
.collection-detail-banner { display:block; width:100%; aspect-ratio:3 / 1; object-fit:cover; }
.collection-detail-identity { display:flex; align-items:center; gap:18px; padding:20px; }
.collection-detail-identity .collection-avatar { width:80px; height:80px; }
.collection-detail-identity h2 { margin:5px 0; font-size:24px; }
.collection-detail-identity p { margin:0; color:var(--muted); line-height:1.5; }
@media(max-width:600px) {
  .collection-detail-identity { gap:12px; padding:15px; }
  .collection-detail-identity .collection-avatar { width:60px; height:60px; }
  .collection-detail-identity h2 { font-size:20px; }
}

.collection-card-image {
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--bg-base);
}

.collection-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.collection-card:hover .collection-card-image img {
  transform: scale(1.05);
}

.collection-card-info {
  padding: 20px;
}

.collection-card-info h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.collection-card-info p {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}

/* Items View */
.items-header {
  display: flex;
  align-items: center;
  gap: 24px;
  max-width: 1180px;
  margin: 0 auto 24px;
}

.items-header h2 {
  font-size: 28px;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.collection-browse-layout {
  display: grid;
  grid-template-columns: minmax(218px, 250px) minmax(0, 1fr);
  gap: 28px;
  max-width: 1180px;
  margin: 0 auto;
}

.items-filters {
  align-self: start;
  display: grid;
  gap: 22px;
  position: sticky;
  top: 22px;
  margin: 0;
  padding: 20px;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.filter-rail-heading { border-bottom: 1px solid var(--line); padding-bottom: 18px; }
.filter-rail-heading h3 { margin: 7px 0 15px; font-size: 19px; letter-spacing: -.02em; }
.filter-reset { padding: 0; border: 0; background: transparent; color: var(--accent-bright); font: inherit; font-size: 10px; letter-spacing: .08em; cursor: pointer; }
.filter-group { display: grid; gap: 9px; }
.filter-group h4 { margin: 0; color: var(--muted); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }
.filter-options { display: grid; gap: 5px; }
.filter-option { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 10px 11px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--ink-secondary); text-align: left; text-transform: capitalize; font: inherit; font-size: 13px; cursor: pointer; transition: .18s ease; }
.filter-option:hover { background: rgba(255,255,255,.05); color: var(--ink); }
.filter-option.active { border-color: var(--line-strong); background: rgba(255,255,255,.08); color: var(--ink); }
.filter-option span { min-width: 15px; color: var(--muted); font-size: 10px; text-align: right; }
.collection-items-panel { min-width: 0; }

.items-filters[hidden] { display: none; }

/* Legacy select styling stays for Admin and older screens. */
.items-filters label {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.items-filters select {
  padding: 8px 12px;
  background: var(--bg-base);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  font-size: 13px;
  cursor: pointer;
}

.items-filters select:hover {
  border-color: var(--line-strong);
}

.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 22px;
}

.items-grid .asset-card { min-width: 0; }

/* Collections: square image cards. The art fills its 1:1 box; name, price and the slot / rarity /
   colour tags sit in a tight block over one action, each card keeps its own height (no stretching
   to a taller neighbour), and phones show two cards a row like the Shop. Scoped to the Collections
   page: the Collectors owned-collection view reuses .collection-items-panel with portal.js card(),
   whose first paragraph is the token line, not a description. The release description leaves the
   card face but stays readable to screen readers; an empty "No matching releases." spans the grid. */
body[data-page="collections"] .collection-items-panel .items-grid { align-items: start; }
body[data-page="collections"] .collection-items-panel .items-grid > .empty { grid-column: 1 / -1; }
body[data-page="collections"] .collection-items-panel .asset-card h2 { padding: 10px 12px 4px; font-size: 14px; line-height: 1.2; overflow-wrap: anywhere; }
body[data-page="collections"] .collection-items-panel .asset-card p { margin: 0 0 6px; padding: 0 12px; font-size: 12px; line-height: 1.4; }
body[data-page="collections"] .collection-items-panel .asset-card h2 + p { position: absolute; width: 1px; height: 1px; margin: 0; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
body[data-page="collections"] .collection-items-panel .asset-card p:empty { display: none; }
body[data-page="collections"] .collection-items-panel .release-traits { padding: 0 12px 10px; }
body[data-page="collections"] .collection-items-panel .asset-card .button { margin: 0 12px 12px; width: calc(100% - 24px); }
@media (max-width: 600px) {
  body[data-page="collections"] .collection-items-panel .items-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  body[data-page="collections"] .collection-items-panel .asset-card h2 { padding: 9px 10px 3px; }
  body[data-page="collections"] .collection-items-panel .asset-card p { padding: 0 10px; font-size: 11px; }
  body[data-page="collections"] .collection-items-panel .release-traits { gap: 4px; padding: 0 10px 9px; }
  body[data-page="collections"] .collection-items-panel .release-traits span { padding: 2px 7px; font-size: 10px; }
  body[data-page="collections"] .collection-items-panel .asset-card .button { margin: 0 10px 10px; width: calc(100% - 20px); }
}

@media (max-width: 850px) {
  .collection-browse-layout { grid-template-columns: 1fr; }
  .items-filters { position: static; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .filter-rail-heading { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .items-filters { grid-template-columns: 1fr; }
}

.item-card {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s ease;
}

.item-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.item-card-image {
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--bg-base);
  position: relative;
}

.item-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.item-card-info {
  padding: 16px;
}

.item-card-info h4 {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.item-price {
  font-size: 16px;
  font-weight: 600;
  color: var(--accent-bright);
  margin: 0;
}

.item-not-listed {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}

/* Item Detail Dialog */
.item-detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  padding: 42px;
  max-width: 1200px;
}

.item-detail-left,
.item-detail-right {
  min-width: 0;
}

details summary {
  outline: none;
}

details[open] summary {
  margin-bottom: 16px;
}

/* Issuer metadata review */
.metadata-guidance,
.metadata-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0 20px;
}

.metadata-guidance section,
.metadata-preview-grid section {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-elevated);
}

.metadata-guidance h3,
.metadata-preview-grid h4 {
  margin: 0 0 7px;
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--accent-bright);
}

.metadata-guidance p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.metadata-preview-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.metadata-traits {
  display: grid;
  gap: 7px;
  margin: 0;
}

.metadata-traits div {
  display: grid;
  grid-template-columns: minmax(90px, .7fr) minmax(0, 1.3fr);
  gap: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}

.metadata-traits div:last-child { border-bottom: 0; padding-bottom: 0; }
.metadata-traits dt { color: var(--muted); }
.metadata-traits dd { margin: 0; overflow-wrap: anywhere; color: var(--ink); }

@media (max-width: 760px) {
  .metadata-guidance,
  .metadata-preview-grid { grid-template-columns: 1fr; }
}

/* Shop checkout: an item preview, a quiet approval panel, and a verified receipt. */
.checkout-dialog,.purchase-success-dialog{width:min(900px,calc(100vw - 40px));max-width:900px;max-height:calc(100dvh - 40px);padding:0;overflow:auto;border-radius:24px;background:#151617;border:1px solid #353638;box-shadow:0 32px 120px #0009}
.checkout-dialog::backdrop,.purchase-success-dialog::backdrop{background:#08090bd9;backdrop-filter:blur(14px)}
.checkout-dialog .dialog-close,.purchase-success-dialog .dialog-close{position:absolute;top:20px;right:20px;z-index:2;width:32px;height:32px;display:grid;place-items:center;padding:0;border:1px solid #ffffff1c;border-radius:50%;background:#1c1d20;color:#b4b8c0;font-size:24px;line-height:1}
.checkout-dialog .dialog-close:hover,.purchase-success-dialog .dialog-close:hover{color:#fff;background:#303237}
.checkout-header{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:27px 72px 27px 30px;border-bottom:1px solid var(--line)}
.checkout-wordmark{font-size:18px;font-weight:700;letter-spacing:-.05em}.checkout-wordmark>span{font-size:10px;font-weight:500;color:#9296a0;letter-spacing:.12em;margin-left:10px}
.checkout-network{display:flex;align-items:center;gap:7px;font-size:9px;letter-spacing:.09em;color:#afb3bd}.checkout-network i{width:5px;height:5px;border-radius:50%;background:#b6f2b1;box-shadow:0 0 12px #b6f244}
.checkout-layout{display:grid;grid-template-columns:1fr 1fr}.checkout-item{padding:28px;border-right:1px solid var(--line);background:linear-gradient(145deg,#1c1d20,#141516)}
.checkout-art{position:relative;aspect-ratio:1.3;display:grid;place-items:center;border-radius:14px;overflow:hidden;background:radial-gradient(ellipse at 50% 35%,#44474c,#222427 70%);border:1px solid #ffffff0c}
.checkout-art img{display:block;width:100%;height:100%;max-height:270px;object-fit:contain}.checkout-art-tag{position:absolute;bottom:13px;left:14px;padding:5px 8px;border-radius:4px;background:#121416c9;color:#d0d4dc;font-size:8px;letter-spacing:.14em}
.checkout-art-placeholder{font-size:66px;font-weight:700;letter-spacing:-.08em;color:#ffffff35}
.checkout-item-copy{padding-top:23px}.checkout-item-copy .eyebrow,.checkout-approval .eyebrow{font-size:9px;letter-spacing:.12em;color:#a1a6b1;margin:0 0 9px}
.checkout-item-copy h3{margin:0 0 8px;font-size:25px;font-weight:600;line-height:1.16;letter-spacing:-.03em}.checkout-item-copy>p:not(.eyebrow){margin:0;color:#9da1aa;font-size:12px;line-height:1.6}
.checkout-total{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:21px 0 17px;margin-top:20px;border-top:1px solid #ffffff12}.checkout-total>span{font-size:12px;color:#d0d4dc}.checkout-currency-note{display:block;margin-top:3px;color:#8f949e;font-size:10px}.checkout-total strong{font-size:32px;line-height:1;font-weight:500;letter-spacing:-.04em}.checkout-total small{font-size:13px;letter-spacing:0;color:#aeb4c0;font-weight:400}
.checkout-item-copy p.checkout-one-approval{font-size:11px;color:#c6d6c6;display:flex;gap:7px;align-items:baseline}.checkout-one-approval>span{color:#b6f2b1}
.checkout-order-facts,.purchase-token-details{margin-top:18px;color:#9da3ae;font-size:10px}.checkout-order-facts summary,.purchase-token-details summary{cursor:pointer;width:fit-content}.checkout-order-facts dl{display:grid;gap:5px;margin:12px 0 0;font-size:11px}.checkout-order-facts dt{color:#818894}.checkout-order-facts dd{margin:0 0 6px;color:#c4cad3;overflow-wrap:anywhere}
.checkout-approval{padding:35px 30px 25px;text-align:center}.checkout-approval h2{font-size:32px;line-height:1.12;letter-spacing:-.045em;margin:0 0 12px}.checkout-intro{max-width:270px;margin:0 auto 23px;color:#a4a9b2;font-size:12px;line-height:1.7}
.checkout-qr-frame{width:232px;height:232px;max-width:100%;margin:0 auto;padding:8px;background:#fff;border-radius:16px;box-shadow:0 8px 32px #0003}.checkout-dialog #payment-qr{display:block;width:100%;height:100%;max-width:none;object-fit:contain;border-radius:8px;margin:0}
.checkout-scan-label{margin:12px 0 16px;color:#aeb4be;font-size:10px;letter-spacing:.03em}.checkout-dialog #payment-link{display:flex;justify-content:space-between;align-items:center;max-width:232px;margin:0 auto;min-height:42px;border-radius:8px;border-color:#ffffff26;background:#ffffff04}.checkout-dialog #payment-link:hover{background:#ffffff0c;border-color:#ffffff45}
.checkout-live-status{display:flex;justify-content:center;align-items:baseline;gap:8px;margin:22px auto 0;max-width:285px;text-align:left}.checkout-status-dot{flex:0 0 5px;width:5px;height:5px;border-radius:50%;background:#e8e8e6}.checkout-live-status p{margin:0;color:#b7bdc9;font-size:11px;line-height:1.6}.checkout-recovery-actions{display:flex;flex-wrap:wrap;gap:8px;justify-content:center}.checkout-recovery-actions .button{margin-top:14px}/* While a signed Xaman request is "checking" (data-xaman-state on the dialog) the action row keeps a button's room (14px margin + 43px button), so the dialog does not grow and re-centre when SEND A NEW REQUEST appears on a decline. */.checkout-dialog[data-xaman-state="checking"] .checkout-recovery-actions{min-height:57px}.checkout-dialog:has(#payment-payload:not([hidden])) #deliver-order{display:none}
.checkout-finish-note{margin:13px auto 0;max-width:230px;color:#7f8692;font-size:10px;line-height:1.6}.checkout-footer{display:flex;justify-content:space-between;gap:12px;padding:17px 28px;border-top:1px solid var(--line);color:#868c97;font-size:10px}
.purchase-success-dialog{max-width:850px}.purchase-success-dialog .purchase-success{margin:0;padding:0;border:0;border-radius:0;background:transparent;grid-template-columns:.92fr 1.08fr;gap:0;align-items:stretch}
.purchase-success-art{position:relative;display:grid;place-items:center;min-height:480px;background:radial-gradient(ellipse at 50% 35%,#434845,#202522 70%);overflow:hidden}.purchase-success-dialog .purchase-success-image{width:100%;height:100%;max-height:650px;border:0;border-radius:0;object-fit:contain}.purchase-art-label{position:absolute;bottom:25px;left:28px;font-size:9px;letter-spacing:.15em;color:#c0c9c2}
.purchase-success-copy{padding:40px 34px 26px}.purchase-verified-icon{display:grid;place-items:center;width:44px;height:44px;border-radius:50%;border:1px solid #b5eeb239;background:#aef7a80c;color:#b8edb3;font-size:24px;margin-bottom:23px}.purchase-success-dialog .eyebrow{font-size:9px;letter-spacing:.12em;color:#b4d4b5;margin:0 0 11px}.purchase-success-dialog h2{font-size:43px;line-height:1.03;letter-spacing:-.055em;font-weight:500;margin:0 0 18px}.purchase-success-dialog p.purchase-item-name{font-size:17px;font-weight:500;color:#f0f2f4;margin:0 0 8px}.purchase-success-dialog p.purchase-confirmation{font-size:12px;line-height:1.75;color:#a3aab4;margin:0}
.purchase-receipt-summary{display:grid;gap:9px;margin:22px 0;padding:16px 0;border-block:1px solid var(--line);font-size:11px;color:#9ba3ae}.purchase-receipt-summary>span{display:flex;justify-content:space-between;gap:12px}.purchase-receipt-summary strong{font-weight:500;color:#e0e5eb}.purchase-receipt-summary .purchase-verified-label{color:#b4d4b5;font-size:10px;padding-top:3px}
.purchase-success-dialog .purchase-success-actions{display:grid;gap:9px}.purchase-success-dialog .purchase-success-actions .button{display:flex;align-items:center;justify-content:center;gap:14px;min-height:44px;border-radius:8px}.purchase-success-dialog .purchase-success-actions .button.filled{background:#dae8d6;border-color:#dae8d6;color:#1c271b}.purchase-success-dialog .purchase-success-actions .button.filled:hover{background:#eff7ec}.purchase-receipt-links{display:flex;flex-wrap:wrap;gap:16px;margin-top:19px;font-size:9px;letter-spacing:.035em;color:#a7b0bb}.purchase-receipt-links a:hover{color:#fff}.purchase-success-dialog .purchase-token-details dl{display:block;font-size:10px;margin:10px 0 0}.purchase-token-details dd{margin-top:6px;color:#a4acb7}
.checkout-dialog :focus-visible,.purchase-success-dialog :focus-visible{outline:2px solid #ffffff;outline-offset:4px}.checkout-dialog h2:focus,.purchase-success-dialog h2:focus{outline:none}
@media(max-width:640px){.checkout-dialog,.purchase-success-dialog{width:calc(100vw - 24px);max-height:calc(100dvh - 24px);border-radius:18px}.checkout-header{padding:22px 59px 22px 20px}.checkout-wordmark>span{font-size:8px;margin-left:5px}.checkout-network{font-size:8px;gap:5px}.checkout-dialog .dialog-close,.purchase-success-dialog .dialog-close{right:14px;top:14px}.checkout-layout{grid-template-columns:1fr}.checkout-item{padding:20px;border-right:0;border-bottom:1px solid var(--line);display:grid;grid-template-columns:90px minmax(0,1fr);gap:16px;align-items:start}.checkout-art{aspect-ratio:1;border-radius:10px}.checkout-art img{max-height:90px}.checkout-art-tag{display:none}.checkout-item-copy{padding:0}.checkout-item-copy h3{font-size:21px}.checkout-item-copy>.eyebrow{font-size:8px}.checkout-item-copy>p:not(.eyebrow):not(.checkout-one-approval){display:none}.checkout-total{padding:12px 0 9px;margin-top:12px}.checkout-total strong{font-size:25px}.checkout-currency-note{font-size:9px}.checkout-order-facts{margin-top:10px}.checkout-approval{padding:25px 20px}.checkout-approval h2{font-size:29px}.checkout-intro{margin-bottom:18px}.checkout-footer{padding:15px 20px;font-size:8px}.purchase-success-dialog .purchase-success{grid-template-columns:1fr}.purchase-success-art{min-height:0;height:210px}.purchase-success-dialog .purchase-success-image{max-height:210px}.purchase-art-label{bottom:16px;left:20px;font-size:8px}.purchase-success-copy{padding:24px}.purchase-verified-icon{width:34px;height:34px;font-size:20px;margin-bottom:16px}.purchase-success-dialog h2{font-size:37px}.purchase-success-dialog h2 br{display:none}.purchase-success-dialog h2 br::after{content:' '}.purchase-success-dialog .purchase-success-image{order:initial}}
@media(prefers-reduced-motion:no-preference){.checkout-dialog[open],.purchase-success-dialog[open]{animation:checkout-enter .22s ease-out}@keyframes checkout-enter{from{opacity:0;transform:translateY(10px) scale(.985)}to{opacity:1;transform:translateY(0) scale(1)}}}
@media(max-width:640px){.purchase-success-dialog h2 br{display:initial}.purchase-success-dialog h2 br::after{content:none}}
.asset-card.unclaimed-reward{border-color:#d7cf8a80;background:linear-gradient(150deg,#24251f,#151a19)}
.asset-card.unclaimed-reward .badge{background:#d7cf8a;color:#1d231e}
.asset-card.unclaimed-reward .asset-image img{object-fit:contain;background:#171b18}
.asset-card.unclaimed-reward p{color:#c9cbbb}
.asset-card.unclaimed-reward .button{display:flex;justify-content:center;align-items:center;margin-top:auto}

/* Legal links on every portal page (privacy review G7). 44px tap targets, quiet like the public footer. */
.portal-legal { display: flex; flex-wrap: wrap; gap: 0 20px; margin: 56px 0 0; padding-top: 12px; border-top: 1px solid var(--line); font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.portal-legal a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); transition: color .2s ease; }
.portal-legal a:hover { color: var(--ink); }
.portal-legal a:focus-visible { outline: 2px solid var(--accent-bright); outline-offset: 2px; }
.checkout-terms { max-width: 270px; margin: -12px auto 18px; color: #a4a9b2; font-size: 11px; line-height: 1.6; }
.checkout-terms a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* Signed-out state on private portal pages (profile, inventory, wardrobe, explorer, admin):
   the page stays put and offers sign-in. No redirect and no automatic Xaman request. */
.portal-signed-out {
  display: grid;
  place-items: start;
  margin: 8px 0 32px;
}
.portal-signed-out[hidden] { display: none; }
.portal-signed-out-card {
  width: 100%;
  max-width: 620px;
  padding: 32px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--bg-elevated);
}
.portal-signed-out-card .eyebrow { margin: 0 0 12px; color: var(--muted); font-size: 11px; letter-spacing: 0.12em; }
.portal-signed-out-card h2 {
  margin: 0 0 12px;
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.portal-signed-out-card p { margin: 0 0 12px; color: var(--ink-secondary); font-size: 15px; line-height: 1.55; }
.portal-signed-out-card .portal-signed-out-note { color: var(--muted); font-size: 13px; }
.portal-signed-out-card .button { margin-top: 8px; min-height: 44px; }
@media (max-width: 750px) {
  .portal-signed-out-card { padding: 22px; }
  .portal-signed-out-card .button { width: 100%; justify-content: center; }
}

/* /collections/ heading on the portal hero scale (same as Community, Map, Inventory). */
body[data-page="collections"] .portal-title h1 {
  margin: 0;
  font-size: clamp(40px, 9vw, 76px);
  line-height: .9;
  font-weight: 800;
  letter-spacing: -.045em;
  text-transform: uppercase;
}

/* Portal media: NFT art and collection images arrive full size (the account service has no
   thumbnails yet). Off-screen cards skip layout, paint and image decode until they near the
   viewport; the reserved size keeps the scrollbar stable. */
.items-grid > .asset-card,
.collection-items-panel .asset-card,
.collections-grid > .collection-card {
  content-visibility: auto;
  contain-intrinsic-size: auto 420px;
}

/* Twelve rail links since SITE-UPGRADE phase 2 (Crates, VIP check and Redeem joined the account nav): a tighter
   rhythm on desktop, and on a short screen the rail scrolls instead of clipping its bottom links. */
@media (min-width: 751px) {
  .portal-rail { overflow-y: auto; scrollbar-width: thin; }
  .portal-rail nav { gap: 2px; margin-top: 32px; }
  .portal-rail nav a { padding: 10px 16px; }
}
@media (min-width: 751px) and (max-height: 820px) {
  .portal-rail nav { margin-top: 18px; }
  .portal-rail nav a { padding: 7px 16px; }
}

/* The centre line (2026-10-13): the portal's legal row is centred like the public footer. */
.portal-legal { justify-content: center; text-align: center; }

/* Shop crates (2026-10-13: the Crates page folded into the Shop): the release rules in one calm line and the way to
   your sealed crates in My collection. */
.crate-legal-note { max-width: 72ch; margin: 14px 0 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.crate-legal-note a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* The Market is closed for now (2026-10-13): /market/ is a static "coming soon", so the Sell links on collection tiles,
   Wardrobe cards and sealed crates stay hidden until it opens. */
a[href^="/market/?sell="], .crate-sell-link { display: none !important; }
.market-soon { display: grid; place-items: center; min-height: 52vh; margin: 24px 0 0; padding: 48px 24px; border: 1px solid var(--line); border-radius: 22px; background: #111214; text-align: center; }
.market-soon h1 { margin: 10px 0 0; font-size: clamp(44px, 9vw, 96px); line-height: .9; letter-spacing: -.05em; text-transform: uppercase; }
.market-soon-lede { max-width: 52ch; margin: 18px auto 0; color: var(--ink-secondary); font-size: 16px; line-height: 1.6; }
.market-soon-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 26px; }

/* Closed beta (2026-10-13): the Shop says who can take part today. */
.shop-beta-note { margin: 12px 0 0; color: var(--muted); font: 500 12px/1.4 var(--mono, ui-monospace, monospace); letter-spacing: .12em; text-transform: uppercase; }

/* The centre rule inside the app (2026-10-13, Connor: "everything centred"). The sidebar stays a left app rail; in the
   main column the page titles sit on the centre line, and where a hero stacks (phones, narrow windows) its copy and CTA
   rows centre too. Wide two-column heroes keep their art beside the copy. */
.portal-title { flex-direction: column; align-items: center; justify-content: center; text-align: center; }
@media (max-width: 960px) {
  :is(.inv-hero-copy, .shop-stage-copy, .wardrobe-hero-copy, .map-hero, .vip-hero, .redeem-hero) { text-align: center; }
  :is(.inv-hero-copy, .shop-stage-copy, .wardrobe-hero-copy) > p { margin-inline: auto; }
  :is(.inv-hero-actions, .shop-hero-actions, .wardrobe-hero-actions, .map-hero-actions, .shop-stage-facts) { justify-content: center; }
}

/* Closed beta (RELEASE/CLOSED-BETA-CONTRACT.md): one calm, centred panel for a signed-in wallet outside the beta, or after
   a gated action is refused. Black / grey / white, like the rest of the app. */
.beta-gate { display: grid; justify-items: center; gap: 12px; margin: 0 0 24px; padding: 28px 22px; border: 1px solid var(--line-strong); border-radius: 18px; background: #111214; text-align: center; }
.beta-gate-k { margin: 0; color: var(--muted); font: 500 11px/1.2 var(--mono, ui-monospace, monospace); letter-spacing: .16em; }
.beta-gate h2 { margin: 0; font-size: clamp(24px, 4vw, 36px); line-height: 1; letter-spacing: -.03em; text-wrap: balance; }
.beta-gate-copy { max-width: 54ch; margin: 0; color: var(--ink-secondary); font-size: 15px; line-height: 1.55; }
.beta-gate-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 6px; }
.beta-gate-fine { margin: 0; color: var(--muted); font-size: 13px; }
