* { box-sizing: border-box; margin: 0; padding: 0; user-select: none; -webkit-tap-highlight-color: transparent; }
input, textarea { user-select: text; -webkit-user-select: text; }
html, body {
  width: 100%; height: 100%;
  background: #040507;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "SF Pro Display", sans-serif;
  display: flex; justify-content: center; align-items: center; overflow: hidden;
}

.phone-frame {
  position: relative;
  width: 100%; max-width: 414px;
  height: 100%; max-height: 896px;
  background: #08090c;
  color: #f4f4f5;
  overflow: hidden;
  display: flex; flex-direction: column;
}

.profile-page {
  flex: 1; display: flex; flex-direction: column; height: 100%; overflow: hidden;
  background: radial-gradient(circle at 50% 0%, #171923 0%, #08090c 58%);
}

.info-banner {
  background: rgba(240, 185, 11, 0.14);
  border-bottom: 1px solid rgba(240, 185, 11, 0.25);
  color: #fde68a;
  font-size: 11px;
  padding: 7px 12px;
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  flex-shrink: 0;
}
.info-banner.hidden { display: none; }
.banner-close {
  background: none; border: none; color: #fde68a; font-size: 13px; cursor: pointer;
}

.top-nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 52px; padding: 0 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}
.nav-title { font-size: 18px; font-weight: 800; color: #ffffff; }
.nav-right-actions { display: flex; align-items: center; gap: 4px; }
.nav-icon-btn {
  width: 36px; height: 36px; border-radius: 10px;
  background: transparent; border: none; color: #e4e4e7;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; text-decoration: none;
}
.nav-icon-btn svg { width: 20px; height: 20px; }

.wallet-box {
  margin: 12px 14px 8px;
  padding: 14px;
  border-radius: 16px;
  background: linear-gradient(155deg, #171a24 0%, #0f1117 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}
.wallet-top {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 12px;
}
.wallet-sub { font-size: 11px; color: #9ca3af; margin-bottom: 4px; }
.wallet-balance {
  font-size: 26px; font-weight: 800; color: #ffffff;
  font-variant-numeric: tabular-nums;
}
.reset-quota-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #d1d5db; font-size: 11px; font-weight: 600;
  padding: 5px 10px; border-radius: 8px; cursor: pointer;
}
.wallet-actions-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.w-action-btn {
  height: 36px; border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: #f4f4f5; font-size: 12px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  cursor: pointer;
}
.w-action-btn.primary {
  background: #F0B90B; color: #090a0d; border-color: #F0B90B;
}
.w-action-btn svg { width: 15px; height: 15px; }

.primary-tabs {
  display: grid; grid-template-columns: repeat(2, 1fr);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}
.p-tab {
  position: relative; background: none; border: none;
  color: #71717a; font-size: 14px; font-weight: 700;
  padding: 11px 0; cursor: pointer;
}
.p-tab.active { color: #ffffff; }
.p-tab.active::after {
  content: ""; position: absolute; bottom: 0; left: 22%; right: 22%;
  height: 2.5px; border-radius: 2px; background: #F0B90B;
}

.tab-panel { display: none; flex: 1; flex-direction: column; min-height: 0; position: relative; }
.tab-panel.active { display: flex; }

.stats-strip {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  flex-shrink: 0;
}
.strip-label { font-size: 10px; color: #71717a; }
.strip-count { font-size: 14px; font-weight: 800; color: #ffffff; margin-top: 2px; }
.strip-total-val {
  font-size: 15px; font-weight: 800; color: #F0B90B; margin-top: 2px;
  font-variant-numeric: tabular-nums;
}

.scroll-area { flex: 1; overflow-y: auto; padding: 12px 14px 20px; }
.collection-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

.hold-card {
  position: relative;
  background: linear-gradient(165deg, #171a24 0%, #0f1117 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px; padding: 9px;
  display: flex; flex-direction: column; gap: 6px;
  cursor: pointer;
}
.status-badge {
  position: absolute; top: 8px; right: 8px; z-index: 4;
  font-size: 9px; font-weight: 800; padding: 2px 6px; border-radius: 6px;
}
.status-badge.buyback { background: rgba(34, 197, 94, 0.18); color: #4ade80; }
.status-badge.holding { background: rgba(240, 185, 11, 0.18); color: #F0B90B; }

.psa-frame-box {
  position: relative;
  width: 100%;
  aspect-ratio: 5 / 7;
  border-radius: 8px;
  background: #141720;
  border: 1px solid rgba(255, 255, 255, 0.12);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}

.hold-img-skeleton {
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, #141720 18%, #232838 45%, #141720 72%);
  background-size: 220% 100%;
  animation: shimmerProfile 1.25s infinite linear;
  z-index: 1;
  transition: opacity 0.25s ease;
}
.hold-img-skeleton.hidden {
  opacity: 0;
  pointer-events: none;
}

.hold-card-img {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.hold-card-img.loaded {
  opacity: 1;
}

@keyframes shimmerProfile {
  0% { background-position: 220% 0; }
  100% { background-position: -220% 0; }
}

.hold-name {
  font-size: 12px; font-weight: 700; color: #ffffff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hold-grade { font-size: 10px; color: #9ca3af; }
.hold-val {
  font-size: 14px; font-weight: 800; color: #F0B90B;
  font-variant-numeric: tabular-nums;
}

.empty-collection {
  grid-column: 1 / -1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 54px 16px; gap: 10px; text-align: center;
}
.empty-art-circle {
  width: 56px; height: 56px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.05); color: #9ca3af;
  display: flex; align-items: center; justify-content: center;
}
.empty-text { font-size: 13px; color: #9ca3af; }
.go-draw-btn {
  margin-top: 4px; background: #F0B90B; color: #090a0d;
  text-decoration: none; font-size: 12px; font-weight: 800;
  padding: 8px 18px; border-radius: 999px;
}

.fab-filter-btn {
  position: absolute; right: 14px; bottom: 14px; z-index: 10;
  background: #F0B90B; color: #090a0d; border: none;
  border-radius: 999px; padding: 9px 14px;
  font-size: 12px; font-weight: 800;
  display: inline-flex; align-items: center; gap: 5px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5); cursor: pointer;
}
.fab-filter-btn svg { width: 15px; height: 15px; }

.records-top-bar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px; border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.records-hint { font-size: 11px; color: #71717a; }
.time-select {
  background: #12141c; color: #e4e4e7;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px; padding: 4px 8px; font-size: 11px;
}
.refresh-indicator {
  display: none; text-align: center; font-size: 11px; color: #F0B90B; padding: 6px 0;
}
.refresh-indicator.show { display: block; }
.records-list { display: flex; flex-direction: column; gap: 8px; }
.record-row {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.record-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.record-mini-thumb {
  width: 34px; height: 34px; border-radius: 8px;
  background: rgba(240, 185, 11, 0.12); color: #F0B90B;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; flex-shrink: 0;
}
.record-title {
  font-size: 12px; font-weight: 700; color: #ffffff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.op-tag {
  display: inline-block; margin-top: 3px; font-size: 10px; font-weight: 700;
  padding: 1px 6px; border-radius: 5px;
}
.op-tag.draw { background: rgba(59, 130, 246, 0.16); color: #93c5fd; }
.op-tag.buy { background: rgba(240, 185, 11, 0.16); color: #F0B90B; }
.op-tag.buyback { background: rgba(34, 197, 94, 0.16); color: #4ade80; }
.record-right { text-align: right; flex-shrink: 0; }
.record-amt { font-size: 13px; font-weight: 800; color: #ffffff; font-variant-numeric: tabular-nums; }
.record-time { font-size: 10px; color: #71717a; margin-top: 2px; }

.sheet-backdrop {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(0, 0, 0, 0);
  backdrop-filter: blur(0px);
  display: flex; align-items: flex-end; justify-content: center;
  visibility: hidden; opacity: 0; pointer-events: none;
  transition: opacity 0.28s ease, background 0.28s ease, backdrop-filter 0.28s ease, visibility 0s linear 0.28s;
}
.sheet-backdrop.open {
  visibility: visible; opacity: 1; pointer-events: auto;
  background: rgba(0, 0, 0, 0.68); backdrop-filter: blur(5px);
  transition: opacity 0.28s ease, background 0.28s ease, backdrop-filter 0.28s ease, visibility 0s linear 0s;
}
.sheet-backdrop .bottom-sheet {
  width: 100%; max-width: 414px;
  transform: translateY(100%);
  transition: transform 0.34s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}
.sheet-backdrop.open .bottom-sheet {
  transform: translateY(0);
}
.bottom-sheet {
  width: 100%; max-width: 414px;
  background: #141720; border-radius: 20px 20px 0 0;
  padding: 12px 16px 26px; border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.sheet-handle { width: 38px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.2); margin: 0 auto 12px; }
.sheet-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; }
.sheet-title { font-size: 16px; font-weight: 800; color: #ffffff; }
.sheet-sub { font-size: 12px; color: #9ca3af; margin-top: 2px; }
.sheet-close { background: none; border: none; color: #9ca3af; font-size: 16px; cursor: pointer; }
.sheet-body { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.sheet-label { font-size: 12px; color: #a1a1aa; }
.preset-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.preset-btn {
  height: 34px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04); color: #e4e4e7; font-size: 12px; font-weight: 700; cursor: pointer;
}
.preset-btn.active { border-color: #F0B90B; color: #F0B90B; background: rgba(240, 185, 11, 0.14); }
.sheet-input {
  width: 100%; height: 38px; border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #0c0e14; color: #ffffff; padding: 0 12px; font-size: 13px;
}
.sheet-submit-btn {
  width: 100%; height: 42px; border-radius: 11px; border: none;
  background: #F0B90B; color: #090a0d; font-size: 14px; font-weight: 800; cursor: pointer;
}

.detail-modal-backdrop {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(0, 0, 0, 0.72);
  display: none; align-items: center; justify-content: center; padding: 16px;
}
.detail-modal-backdrop.open { display: flex; }
.detail-modal-card {
  width: 100%; max-width: 360px;
  background: #141720; border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 12px;
}
.modal-header { display: flex; justify-content: space-between; align-items: center; font-size: 15px; }
.modal-close { background: none; border: none; color: #9ca3af; font-size: 16px; cursor: pointer; }
.modal-body { display: flex; flex-direction: column; gap: 7px; font-size: 12px; color: #d4d4d8; }
.modal-footer { display: grid; grid-template-columns: 1fr 1.4fr; gap: 8px; margin-top: 4px; }
.btn-modal-secondary {
  height: 38px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.14);
  background: transparent; color: #e4e4e7; font-size: 12px; font-weight: 700; cursor: pointer;
}
.btn-modal-primary {
  height: 38px; border-radius: 10px; border: none;
  background: #F0B90B; color: #090a0d; font-size: 12px; font-weight: 800; cursor: pointer;
}

.bottom-nav {
  display: grid; grid-template-columns: repeat(3, 1fr);
  width: 100%;
  height: 68px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(10, 12, 16, 0.95);
  backdrop-filter: blur(12px);
  padding: 8px 0 12px;
  box-sizing: border-box;
  flex-shrink: 0;
}
.nav-item {
  text-decoration: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; height: 100%; width: 100%; line-height: 1;
  color: #71717a; font-size: 11px; font-weight: 500; letter-spacing: 0.4px;
}
.nav-item svg { width: 20px; height: 20px; flex-shrink: 0; display: block; }
.nav-item span { line-height: 1; display: block; }
.nav-item.active { color: #F0B90B; font-weight: 700; }