/* CrateMarket 1.1.29 — approved profile/legal/pagination/market UI completion */

/* Discounted conveyor prices: original above, discounted value fully visible below. */
.moving-crate .crate-cost.first-entry-price-active,
.moving-crate .crate-cost.progression-discount-active {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  justify-content: center !important;
  gap: 3px !important;
  width: calc(100% - 14px) !important;
  min-width: 0 !important;
  max-width: calc(100% - 14px) !important;
  margin-inline: auto !important;
  overflow: visible !important;
  white-space: normal !important;
  line-height: 1.08 !important;
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.moving-crate .crate-cost.first-entry-price-active s,
.moving-crate .crate-cost.progression-discount-active s {
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
  color: rgba(233, 237, 255, .75);
  font-size: clamp(.66rem, 2.2vw, .78rem);
  line-height: 1.1;
  text-decoration-thickness: 2px;
}
.moving-crate .crate-cost.first-entry-price-active strong,
.moving-crate .crate-cost.progression-discount-active strong {
  display: block;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  padding: 5px 5px;
  border: 1px solid rgba(255, 220, 94, .72);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 221, 91, .28), rgba(255, 184, 37, .17));
  color: #ffe66e;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.05), 0 4px 12px rgba(0,0,0,.22);
  font-size: clamp(.72rem, 2.4vw, .9rem);
  line-height: 1.1;
  overflow-wrap: anywhere;
}
.moving-crate .crate-cost.first-entry-price-active small {
  display: block;
  color: #ffe9a8;
  font-size: .62rem;
  line-height: 1;
}

/* Shared player identity. */
.cm129-player-avatar,
.cm129-inline-avatar {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 50%;
  border: 1px solid rgba(255, 206, 76, .75);
  background: #241b3b;
  box-shadow: 0 0 0 2px rgba(116, 78, 205, .18);
  object-fit: cover;
}
.cm129-player-avatar { width: 38px; height: 38px; }
.cm129-inline-avatar { width: 28px; height: 28px; }
.cm129-header-identity { display:flex; align-items:center; gap:9px; min-width:0; }
.cm129-header-identity .cloud-account-copy { min-width:0; }
.cm129-identity-fallback { color:#fff; font-weight:800; font-size:.72rem; }
.cm129-seller-row,
.cm129-leaderboard-player,
.cm129-status-identity { display:flex; align-items:center; gap:8px; min-width:0; }
.cm129-seller-row { margin-top: 4px; color: var(--muted, #b8c0d7); font-size:.82rem; }
.cm129-status-identity { margin-bottom: 14px; padding: 10px; border:1px solid var(--border, #38324e); border-radius:12px; background:rgba(255,255,255,.03); }

/* VIP master-owned tracking. */
.cm129-track-owned-master {
  display:flex;
  align-items:center;
  gap:10px;
  padding:9px 12px;
  border:1px solid rgba(255,207,67,.42);
  border-radius:12px;
  background:rgba(255,207,67,.08);
  cursor:pointer;
}
.cm129-track-owned-master input { width:18px; height:18px; accent-color:#ffd34b; }
.cm129-track-owned-master span { display:grid; gap:2px; }
.cm129-track-owned-master strong { color:#ffe47c; }
.cm129-track-owned-master small { color:var(--muted,#b8c0d7); }
.market-card[data-cm-owned-master="true"] .market-track-item { opacity:.82; }
.market-card[data-cm-owned-master="true"] .market-track-item input:disabled { cursor:not-allowed; }
.market-card[data-cm-owned="false"] .market-track-item { opacity:.48; }

/* Market alert owned value. */
.market-alert-item { align-items:flex-start !important; }
.cm129-alert-item-main { display:flex; align-items:center; gap:8px; min-width:0; }
.cm129-alert-item-value { display:grid; gap:2px; margin-top:6px; color:var(--muted,#c0c7dc); font-size:.75rem; line-height:1.25; }
.cm129-alert-item-value strong { color:#ffe98f; overflow-wrap:anywhere; font-variant-numeric:tabular-nums; }
.cm129-alert-change-wrap { display:grid; justify-items:end; gap:4px; }

/* Community pagination. */
.cm129-community-sort { min-width:190px; }
.cm129-community-pager {
  display:flex;
  align-items:center;
  justify-content:center;
  flex-wrap:wrap;
  gap:8px;
  margin:16px 0 6px;
  padding:10px;
  border:1px solid var(--border,#3a3450);
  border-radius:14px;
  background:rgba(255,255,255,.025);
}
.cm129-community-pager .cm129-page-summary { min-width:130px; text-align:center; color:var(--muted,#c0c7dc); }
.cm129-community-pager button[disabled] { opacity:.45; cursor:not-allowed; }
.cm129-community-loading { opacity:.62; pointer-events:none; }

/* Profile icon picker. */
.cm129-profile-section { display:grid; gap:14px; }
.cm129-profile-current { display:flex; align-items:center; gap:14px; }
.cm129-profile-current img { width:72px; height:72px; }
.cm129-icon-modal { position:fixed; inset:0; z-index:12000; display:grid; place-items:center; padding:18px; background:rgba(3,4,10,.78); backdrop-filter:blur(8px); }
.cm129-icon-modal.hidden { display:none; }
.cm129-icon-dialog { width:min(620px,100%); max-height:min(760px,92vh); overflow:auto; border:1px solid #494064; border-radius:20px; background:#12101d; box-shadow:0 24px 70px rgba(0,0,0,.58); padding:20px; }
.cm129-icon-dialog-head { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; }
.cm129-icon-grid { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:10px; margin:18px 0; }
.cm129-icon-option { display:grid; gap:7px; justify-items:center; padding:9px 6px; border:1px solid #3d3554; border-radius:14px; background:#191526; color:#eee; cursor:pointer; }
.cm129-icon-option img { width:min(78px,100%); aspect-ratio:1; object-fit:cover; border-radius:50%; }
.cm129-icon-option[aria-checked="true"] { border-color:#ffd54c; box-shadow:0 0 0 2px rgba(255,213,76,.25); background:rgba(255,213,76,.09); }
.cm129-icon-option span { font-size:.72rem; text-align:center; }
.cm129-icon-dialog-actions { display:flex; justify-content:flex-end; gap:9px; }

/* Admin legal editor and advisory lines. */
.cm129-store-url-status { display:block; margin-top:5px; font-size:.78rem; }
.cm129-store-url-status.neutral { color:#aeb7cc; }
.cm129-store-url-status.valid { color:#6fe3a1; }
.cm129-store-url-status.invalid { color:#ff7c8f; }
.cm129-legal-editor { display:grid; gap:12px; }
.cm129-legal-editor textarea { min-height:330px; font-family:ui-monospace,SFMono-Regular,Consolas,monospace; line-height:1.45; }
.cm129-legal-toolbar { display:flex; align-items:end; flex-wrap:wrap; gap:10px; }
.cm129-legal-toolbar .field { flex:1 1 210px; }
.cm129-legal-preview { min-height:160px; max-height:420px; overflow:auto; padding:16px; border:1px solid var(--border,#3c354f); border-radius:14px; background:#0e0c17; }
.cm129-legal-history { display:grid; gap:6px; max-height:170px; overflow:auto; }
.cm129-legal-history-row { display:flex; justify-content:space-between; gap:10px; padding:7px 9px; border-radius:9px; background:rgba(255,255,255,.035); }
.cm129-legacy-legal-controls { display:none !important; }

/* Safely rendered legal documents. */
.cm129-legal-content h1,.cm129-legal-content h2,.cm129-legal-content h3 { margin:1.2em 0 .45em; }
.cm129-legal-content p,.cm129-legal-content li { line-height:1.65; }
.cm129-legal-content ul,.cm129-legal-content ol { padding-left:1.4rem; }

@media (max-width:640px) {
  .cm129-icon-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .cm129-community-sort { width:100%; min-width:0; }
  .cm129-community-pager { display:grid; grid-template-columns:1fr 1fr; }
  .cm129-community-pager .cm129-page-summary { grid-column:1 / -1; order:-1; }
  .market-alert-item { display:grid !important; grid-template-columns:minmax(0,1fr) auto; }
}
