:root {
  color-scheme: light;
  --bg: #f2f2f7;
  --panel: rgba(255,255,255,0.72);
  --panel-strong: rgba(255,255,255,0.88);
  --text: #111111;
  --muted: #6b7280;
  --accent: #007aff;
  --accent-2: #34c759;
  --danger: #ff3b30;
  --border: rgba(15,23,42,0.08);
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --blur: saturate(180%) blur(24px);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(0,122,255,.12), transparent 28%),
    radial-gradient(circle at top right, rgba(52,199,89,.10), transparent 24%),
    linear-gradient(180deg, #f8f9fd 0%, #eef1f7 100%);
  color: var(--text);
}

.app { max-width: 1680px; margin: 0 auto; padding: 24px; }
.hero, .panel {
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  border-radius: 28px;
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
}
.hero {
  padding: 28px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
}
.hero h1 { margin: 8px 0 10px; font-size: 38px; letter-spacing: -0.03em; }
.subtitle, .muted { color: var(--muted); }
.eyebrow, .section-kicker {
  margin: 0;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: 12px;
  font-weight: 700;
}
.pill {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(0,122,255,.10);
  color: var(--accent);
  border: 1px solid rgba(0,122,255,.12);
  white-space: nowrap;
  font-weight: 600;
}

.workspace-layout {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}
.sidebar-stack,
.content-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.sidebar-stack {
  position: sticky;
  top: 10px;
  max-height: calc(100vh - 20px);
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
  scrollbar-gutter: stable;
}
.panel { padding: 18px; }
.panel.full { grid-column: 1 / -1; }
.panel.tight-panel { padding: 12px; }
.sidebar-panel { padding: 13px; }
.section-heading,
.place-header-row,
.group-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.section-heading h2,
.panel h2 { margin: 0; font-size: 20px; letter-spacing: -0.02em; }
label span, .label { display: block; margin-bottom: 6px; color: #4b5563; font-size: 12px; font-weight: 600; }
input, select {
  width: 100%;
  padding: 11px 13px;
  border-radius: 14px;
  border: 1px solid rgba(15,23,42,.08);
  background: rgba(255,255,255,.92);
  color: var(--text);
  outline: none;
  font-size: 15px;
}
input:focus, select:focus { border-color: rgba(0,122,255,.32); box-shadow: 0 0 0 4px rgba(0,122,255,.10); }
input[type="range"] {
  padding: 0;
  accent-color: var(--accent);
  background: transparent;
  box-shadow: none;
}
button {
  border: 0;
  border-radius: 14px;
  padding: 10px 12px;
  cursor: pointer;
  font-weight: 700;
  color: white;
  background: linear-gradient(180deg, #1590ff 0%, #007aff 100%);
  box-shadow: 0 8px 20px rgba(0,122,255,.18);
}
button.ghost {
  background: rgba(255,255,255,.82);
  color: var(--text);
  border: 1px solid rgba(15,23,42,.08);
  box-shadow: none;
}
button.active-tab {
  background: rgba(0,122,255,.12);
  color: var(--accent);
  border: 1px solid rgba(0,122,255,.16);
  box-shadow: none;
}
.row { display: flex; gap: 10px; align-items: center; }
.wrap { flex-wrap: wrap; }
.top12 { margin-top: 12px; }
.top16 { margin-top: 16px; }
.hidden { display: none !important; }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; word-break: break-all; }
.provider-grid,
.action-grid {
  display: grid;
  gap: 6px;
}
.provider-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.action-grid { grid-template-columns: 1fr; }
.compact-actions { gap: 6px; }
.single-column {
  grid-template-columns: 1fr !important;
}
.sidebar-meta-card,
.sidebar-summary-card {
  background: var(--panel-strong);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 10px;
}
.meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 0;
  font-size: 12px;
  color: var(--muted);
}
.meta-row + .meta-row {
  border-top: 1px solid rgba(15,23,42,.06);
}
.meta-row strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}
.summary-main {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.summary-main strong {
  font-size: 24px;
  letter-spacing: -0.03em;
}
.summary-main span,
.summary-sub-grid span {
  color: var(--muted);
  font-size: 11px;
}
.summary-sub-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}
.summary-sub-grid > div {
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(15,23,42,.06);
  border-radius: 12px;
  padding: 8px;
}
.summary-sub-grid strong {
  display: block;
  margin-top: 2px;
  font-size: 14px;
  color: var(--text);
}
.segmented-pair {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.segmented-wrap { display: flex; flex-direction: column; gap: 6px; }
.segmented-title { color: #4b5563; font-size: 12px; font-weight: 600; }
.range-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.range-head .segmented-title {
  flex: 0 0 auto;
}
.range-head strong {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 18px;
  color: var(--text);
  text-align: right;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.segmented-control {
  display: inline-flex;
  padding: 3px;
  border-radius: 14px;
  background: rgba(118,118,128,.12);
  border: 1px solid rgba(15,23,42,.06);
  gap: 4px;
}
.segment-btn {
  background: transparent;
  color: #374151;
  box-shadow: none;
  border: 0;
  border-radius: 10px;
  padding: 8px 10px;
}
.segment-btn.active {
  background: rgba(255,255,255,.92);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(15,23,42,.08);
}
.qr-wrap {
  display: flex; justify-content: center; align-items: center; min-height: 192px;
  border: 1px dashed rgba(15,23,42,.10); border-radius: 18px; background: rgba(255,255,255,.52);
}
.qr-wrap img { max-width: 176px; max-height: 176px; background: white; padding: 6px; border-radius: 16px; }
.compact-filter-panel {
  padding-top: 2px;
}
.upload-hint {
  font-size: 12px;
  line-height: 1.5;
}
.compact-chip-row {
  gap: 6px;
}
.compact-details {
  border: 1px dashed rgba(15,23,42,.10);
  border-radius: 14px;
  padding: 8px 10px;
  background: rgba(255,255,255,.48);
}
.compact-details summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  color: #334155;
}
.sidebar-stack::-webkit-scrollbar {
  width: 8px;
}
.sidebar-stack::-webkit-scrollbar-thumb {
  background: rgba(100,116,139,.35);
  border-radius: 999px;
}
.sidebar-stack::-webkit-scrollbar-track {
  background: transparent;
}
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.card, .skin-card, .wall-tile, .overview-summary-card {
  background: var(--panel-strong);
  border: 1px solid var(--border);
  border-radius: 24px;
  overflow: hidden;
}
.wall-tile { box-shadow: 0 2px 10px rgba(15,23,42,.05); }
.card { padding: 16px; }
.card h3 { margin: 0 0 12px; }
.card p { margin: 6px 0; color: var(--muted); }
.empty {
  color: var(--muted);
  padding: 18px;
  border: 1px dashed rgba(15,23,42,.10);
  border-radius: 18px;
  background: rgba(255,255,255,.45);
}
.tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  align-items: stretch;
}
.skin-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.legendary-card {
  border: 1px solid rgba(255, 186, 73, .38);
  box-shadow: 0 0 0 1px rgba(255, 186, 73, .12) inset, 0 10px 24px rgba(201, 147, 47, .10);
}
.legendary-poster-card {
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
  color: #0f172a;
  border: 2px solid #79f2dc;
  box-shadow: 0 8px 20px rgba(121, 242, 220, .15);
}
.export-progress {
  background: rgba(255,255,255,.88);
  border: 1px solid rgba(15,23,42,.08);
  border-radius: 16px;
  padding: 10px 12px;
}
.export-progress-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: #475569;
  margin-bottom: 8px;
}
.export-progress-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(15,23,42,.08);
  overflow: hidden;
}
.export-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #60a5fa 0%, #34d399 100%);
  transition: width .25s ease;
}
.card-media {
  position: relative;
}
.legendary-media {
  background: transparent !important;
  border-bottom-left-radius: 20px;
  border-bottom-right-radius: 20px;
}
.legendary-frame {
  position: relative;
  padding: 14px;
  border: 0;
  margin: 0;
  min-height: auto;
  background: transparent !important;
}
.legendary-image-stage {
  background: linear-gradient(180deg, #101722 0%, #141c28 100%) !important;
  border-radius: 24px;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.legendary-frame img {
  height: 280px !important;
  background: transparent !important;
  padding: 18px 10px 4px !important;
  filter: drop-shadow(0 18px 28px rgba(0,0,0,.35));
}
.legendary-poster-card .legendary-image-stage,
.export-dom-shot .legendary-poster-card .legendary-image-stage {
  background: linear-gradient(180deg, #101722 0%, #141c28 100%) !important;
}
.legendary-topline {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.legendary-date {
  color: rgba(255,255,255,.78);
  font-size: 12px;
  font-weight: 600;
}
.legendary-poster-card h3,
.legendary-poster-card .muted {
  color: #111827 !important;
}
.legendary-flag,
.wear-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .02em;
}
.legendary-flag {
  color: #fff8e8;
  border: 1px solid rgba(255,255,255,.16);
  backdrop-filter: blur(8px);
}
.flag-premium {
  background: linear-gradient(180deg, #ffb547 0%, #d38a09 100%);
}
.flag-fine {
  background: linear-gradient(180deg, #74a8ff 0%, #3568d4 100%);
}
.flag-standard {
  background: linear-gradient(180deg, #7b8594 0%, #556070 100%);
}
.wear-chip {
  min-width: 32px;
  color: #fff;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(15,23,42,.44);
}
.legendary-body {
  padding-top: 10px !important;
}
.legendary-inline-meta {
  font-size: 18px;
  font-weight: 800;
  color: #4b5563;
}
.legendary-inline-sub {
  margin-top: 6px;
  color: #64748b;
  font-size: 14px;
}
.legendary-poster-card .body > h3,
.legendary-poster-card .body > .muted {
  color: #111827;
}
.legendary-poster-card .detail-list,
.legendary-poster-card .badge {
  display: none !important;
}
.wear-s { background: linear-gradient(180deg, #34d399 0%, #059669 100%); }
.wear-a { background: linear-gradient(180deg, #60a5fa 0%, #2563eb 100%); }
.wear-b { background: linear-gradient(180deg, #fbbf24 0%, #d97706 100%); }
.wear-c { background: linear-gradient(180deg, #f87171 0%, #dc2626 100%); }
.wear-na { background: linear-gradient(180deg, #94a3b8 0%, #64748b 100%); }
.skin-card img, .summary-cover img {
  display: block;
  width: 100%;
  height: 250px;
  object-fit: contain;
  object-position: center;
  background: linear-gradient(180deg, rgba(245,247,255,.95), rgba(234,238,247,.95));
  padding: 10px;
}
.skin-card.dense img { height: 180px; padding: 8px; }
.skin-card .body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.skin-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
  line-height: 1.35;
  letter-spacing: -0.02em;
  min-height: calc(1.35em * 2);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}
.skin-card .body > .muted {
  min-height: 1.2em;
}
.detail-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
}
.detail-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px dashed rgba(15,23,42,.08);
  font-size: 12px;
  color: var(--muted);
}
.detail-row strong {
  color: var(--text);
  font-weight: 700;
}
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 10px; }
.badge {
  display: inline-flex; align-items: center; border-radius: 999px; padding: 5px 9px; font-size: 12px;
  border: 1px solid rgba(15,23,42,.08); background: rgba(255,255,255,.82); color: #334155;
}
.badge.rare-6, .badge.rare-7 { background: rgba(255, 186, 73, .18); border-color: rgba(255, 186, 73, .30); color: #9a5f00; }
.badge.rare-5 { background: rgba(201, 125, 255, .18); border-color: rgba(201, 125, 255, .30); color: #7d3cc0; }
.badge.rare-4 { background: rgba(0, 122, 255, .14); border-color: rgba(0, 122, 255, .22); color: #005fd1; }
.badge.rare-3 { background: rgba(52, 199, 89, .14); border-color: rgba(52, 199, 89, .22); color: #22863a; }
.alert {
  padding: 12px 14px; border-radius: 16px; border: 1px solid var(--border); background: rgba(255,255,255,.72); color: var(--text);
}
.alert.warning { background: rgba(255, 204, 0, .15); border-color: rgba(255, 204, 0, .24); color: #9a6b00; }
.alert.error { background: rgba(255, 59, 48, .12); border-color: rgba(255, 59, 48, .22); color: #c22920; }
.alert.success { background: rgba(52, 199, 89, .12); border-color: rgba(52, 199, 89, .22); color: #188038; }
.overview-canvas {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 0;
  margin-top: 2px;
}
.wall-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  align-items: stretch;
  justify-content: start;
}
.dense-mode .wall-grid {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.wall-tile {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 24px;
  background: rgba(255,255,255,.78);
  display: flex;
  flex-direction: column;
}
.legendary-tile {
  box-shadow: 0 0 0 1px rgba(255, 186, 73, .12) inset, 0 12px 30px rgba(201, 147, 47, .14);
}
.dense-mode .wall-tile { border-radius: 22px; }
.wall-tile img {
  display: block;
  width: 100%;
  height: 150px;
  object-fit: contain;
  object-position: center;
  background: linear-gradient(180deg, rgba(245,247,255,.98), rgba(236,240,248,.96));
  padding: 8px;
  margin: 0;
  border-radius: 18px;
  flex-shrink: 0;
}
.dense-mode .wall-tile img { height: 130px; padding: 8px; margin: 0; border-radius: 16px; object-fit: contain; }
.tile-meta {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}
.tile-meta strong {
  font-size: 15px;
  line-height: 1.28;
  letter-spacing: -0.02em;
  min-height: calc(1.28em * 2);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}
.tile-meta span { color: var(--muted); font-size: 12px; line-height: 1.2; }
.group-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; padding: 0 2px; }
.group-header h3 { margin: 0; font-size: 20px; letter-spacing: -0.02em; }
.rare-border-6, .rare-border-7 { border-color: rgba(255, 186, 73, .45); box-shadow: 0 0 0 1px rgba(255, 186, 73, .10) inset; }
.rare-border-5 { border-color: rgba(201, 125, 255, .45); box-shadow: 0 0 0 1px rgba(201, 125, 255, .10) inset; }
.rare-border-4 { border-color: rgba(0, 122, 255, .34); box-shadow: 0 0 0 1px rgba(0, 122, 255, .08) inset; }
.rare-border-3 { border-color: rgba(52, 199, 89, .34); box-shadow: 0 0 0 1px rgba(52, 199, 89, .08) inset; }
.overview-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(260px, 1fr));
  gap: 18px;
  align-items: stretch;
}
.overview-summary-card {
  padding: 8px 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
}
.summary-cover {
  height: 120px;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(245,247,255,.95), rgba(234,238,247,.95));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.summary-cover img { height: 100%; padding: 4px; }
.summary-fallback { font-size: 28px; }
.summary-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 4px 2px;
  flex: 1;
}
.summary-meta strong {
  font-size: 15px;
  line-height: 1.25;
  margin: 0;
  min-height: calc(1.25em * 2);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}
.summary-meta span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
}

.game-overview-panel {
  background: linear-gradient(180deg, rgba(24, 26, 31, .96), rgba(31, 34, 39, .96));
  color: #f3f4f6;
  border-color: rgba(0, 255, 170, .14);
}
.game-overview-panel h2,
.game-overview-panel .game-overview-kicker,
.game-overview-panel .game-overview-subline,
.game-overview-panel .stat-card,
.game-overview-panel .label {
  color: #f3f4f6;
}
.game-overview-hero {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin-bottom: 18px;
}
.game-overview-left h2 {
  margin: 4px 0 8px;
  font-size: 44px;
  letter-spacing: -0.04em;
}
.game-overview-kicker {
  font-size: 13px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #20f59a;
}
.game-overview-subline {
  color: rgba(243,244,246,.7);
  font-size: 14px;
}
.game-rank-btn {
  background: rgba(13, 16, 20, .56);
  color: #24f2a1;
  border: 1px solid rgba(36, 242, 161, .4);
  box-shadow: inset 0 0 0 1px rgba(36, 242, 161, .06);
  border-radius: 0;
  padding: 18px 28px;
}
.game-overview-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}
.game-stat-card {
  min-height: 126px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: linear-gradient(180deg, rgba(71, 76, 82, .62), rgba(56, 61, 68, .72));
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.04);
}
.game-stat-card strong {
  font-size: 42px;
  line-height: 1;
  letter-spacing: -0.03em;
  color: #1df0a0;
}
.game-stat-card span {
  margin-top: 10px;
  font-size: 15px;
  color: rgba(243,244,246,.82);
}
.ios-shell { padding-top: 28px; }
.ios-hero, .ios-panel, .ios-card, .ios-stat { position: relative; }
.ios-hero::after, .ios-panel::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.65);
}
.place-header-row { justify-content: space-between; align-items: center; margin-bottom: 12px; }
.manual-place-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}
.filter-panel {
  background: rgba(255,255,255,.82);
  border: 1px solid rgba(15,23,42,.08);
  border-radius: 20px;
  padding: 14px;
}
.filter-block {
  border-top: 1px dashed rgba(15,23,42,.08);
  padding-top: 10px;
}
.filter-block-title {
  font-size: 12px;
  font-weight: 700;
  color: #4b5563;
  margin-bottom: 8px;
}
.legendary-filter-block {
  background: linear-gradient(180deg, rgba(255,186,73,.08), rgba(255,255,255,.02));
  border-radius: 16px;
  padding: 10px;
}
.filter-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}
.filter-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}
.filter-check input {
  width: auto;
}
.manual-place-grid label {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.order-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.order-item {
  background: rgba(255,255,255,.82);
  border: 1px solid rgba(15,23,42,.08);
  border-radius: 18px;
  padding: 14px;
}
.compact-order-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.export-capture {
  position: fixed;
  left: -10000px;
  top: 0;
  width: 1440px;
  display: none;
}
.export-dom-shot {
  width: 1440px;
  padding: 24px;
  background:
    radial-gradient(circle at top left, rgba(0,122,255,.12), transparent 28%),
    radial-gradient(circle at top right, rgba(52,199,89,.10), transparent 24%),
    linear-gradient(180deg, #f8f9fd 0%, #eef1f7 100%);
}
.export-dom-shot .overview-stage-panel,
.export-dom-shot .game-overview-panel,
.export-dom-shot .ios-panel,
.export-dom-shot .ios-card,
.export-dom-shot .skin-card,
.export-dom-shot .wall-tile,
.export-dom-shot .game-stat-card {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}
.export-capture .export-img-wrap {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.export-capture .export-img-wrap > img,
.export-capture .export-img-wrap > canvas {
  display: block;
  width: auto !important;
  height: auto !important;
  max-width: calc(100% - 20px) !important;
  max-height: calc(100% - 20px) !important;
  object-fit: contain !important;
  object-position: center !important;
  flex: 0 0 auto;
}
.export-sheet {
  background: #eef1f7;
  color: #111827;
  padding: 24px;
}
.export-top {
  border-radius: 24px;
  padding: 24px;
  margin-bottom: 16px;
}
.export-hero-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 28px;
  padding: 28px;
  margin-bottom: 16px;
}
.export-kicker {
  letter-spacing: .18em;
  text-transform: uppercase;
  font-size: 12px;
  color: #20f59a;
}
.export-emblem {
  font-size: 48px;
  width: 88px;
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.1);
}
.export-dark {
  background: linear-gradient(180deg, rgba(24,26,31,.98), rgba(31,34,39,.98));
  color: #f3f4f6;
}
.export-title { font-size: 38px; font-weight: 800; }
.export-subtitle { margin-top: 6px; color: rgba(243,244,246,.75); }
.export-stats {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.export-stat, .export-panel, .export-place, .export-card {
  background: rgba(255,255,255,.9);
  border: 1px solid rgba(15,23,42,.08);
  border-radius: 20px;
}
.export-dark .export-stat { background: rgba(71,76,82,.68); border-color: rgba(255,255,255,.08); }
.export-stat { padding: 18px; text-align: center; }
.export-stat strong { display:block; font-size: 34px; color:#1df0a0; }
.export-stat span { color: rgba(243,244,246,.84); }
.export-panel { padding: 18px; margin-bottom: 16px; box-shadow: 0 10px 30px rgba(15,23,42,.06); }
.export-place-panel { background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,250,252,.95)); }
.export-group-panel h3 { margin: 0; }
.export-group-head { display:flex; justify-content:space-between; align-items:center; margin-bottom: 14px; }
.export-place-grid { display:grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap:12px; }
.export-place { padding: 14px; display:flex; flex-direction:column; gap:6px; background: linear-gradient(180deg, #ffffff, #f8fafc); }
.export-card-grid { display:grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap:12px; }
.export-card { overflow:hidden; }
.export-poster-card { background: linear-gradient(180deg, #ffffff, #f8fafc); min-height: 150px; position: relative; }
.export-poster-badge {
  margin: 14px 14px 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(15,23,42,.06);
  font-size: 12px;
  font-weight: 700;
}
.export-card img { width:100%; height:180px; object-fit:contain; background:#f8fafc; display:block; }
.export-noimg { height:180px; display:flex; align-items:center; justify-content:center; color:#6b7280; background:#f8fafc; }
.export-card-body { padding: 12px; display:flex; flex-direction:column; gap:4px; }
.export-text-card-body { padding-top: 12px; min-height: 110px; justify-content: center; }
.raw-dump {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
  line-height: 1.45;
  background: rgba(255,255,255,.82);
  border: 1px solid rgba(15,23,42,.08);
  border-radius: 18px;
  padding: 16px;
  max-height: 360px;
  overflow: auto;
}

@media (max-width: 1280px) {
  .overview-summary-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .game-overview-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .workspace-layout { grid-template-columns: 1fr; }
  .sidebar-stack {
    position: static;
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }
  .hero,
  .game-overview-hero {
    flex-direction: column;
    align-items: stretch;
  }
  .hero-status-grid,
  .auth-overview-grid,
  .manual-place-grid,
  .order-list,
  .game-overview-stats {
    grid-template-columns: 1fr 1fr;
  }
  .membership-shop-grid,
  .account-membership-grid,
  .auth-overview-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 680px) {
  .app { padding: 14px; }
  .hero h1,
  .game-overview-left h2 {
    font-size: 30px;
  }
  .hero-status-grid,
  .manual-place-grid,
  .order-list,
  .game-overview-stats,
  .gallery,
  .auth-action-grid,
  .hub-actions,
  .hub-metrics,
  .payment-method-grid {
    grid-template-columns: 1fr;
  }
  .shop-actions {
    flex-direction: column;
  }
  .hero-welcome {
    width: 100%;
    justify-content: center;
  }
}

/* --- 新增：自定义列数与大图展示 --- */
.overview-canvas {
  --col-count: 5;
}
.wall-grid {
  grid-template-columns: repeat(var(--col-count), minmax(0, 1fr)) !important;
}
.wall-tile.large-item {
  grid-column: span 2;
  grid-row: span 2;
  border: 2px solid rgba(29, 240, 160, 0.6) !important;
  box-shadow: 0 0 15px rgba(29, 240, 160, 0.3);
}
.wall-tile.large-item img {
  height: 280px !important;
}
.dense-mode .wall-tile.large-item img {
  height: 240px !important;
}
@media (max-width: 980px) {
  .wall-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}
@media (max-width: 680px) {
  .wall-grid {
    grid-template-columns: 1fr !important;
  }
  .wall-tile.large-item {
    grid-column: span 1;
    grid-row: span 1;
  }
}

.auth-tabbar {
  display: flex;
  width: 100%;
}
.auth-tabbar .segment-btn {
  flex: 1;
}
.auth-panel-body {
  border-top: 1px solid rgba(15,23,42,.06);
  padding-top: 14px;
}
.auth-form-tip {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(0,122,255,.06);
  border: 1px solid rgba(0,122,255,.10);
  color: #3b4a64;
  font-size: 13px;
  line-height: 1.65;
}
.auth-action-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.feature-lock-note {
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255,159,10,.10);
  border: 1px solid rgba(255,159,10,.18);
  color: #8a5a00;
  font-size: 12px;
  line-height: 1.5;
}
.order-list-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.order-list-card.empty-state {
  padding: 16px;
  border-radius: 18px;
  border: 1px dashed rgba(15,23,42,.10);
  background: rgba(255,255,255,.56);
  color: var(--muted);
  line-height: 1.7;
}
.payment-order-item {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(15,23,42,.08);
  background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(248,250,252,.88));
  box-shadow: 0 8px 24px rgba(15,23,42,.05);
}
.payment-order-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}
.payment-order-head strong {
  word-break: break-all;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid rgba(15,23,42,.08);
}
.status-pill.success {
  background: rgba(52,199,89,.12);
  color: #0f7a31;
}
.status-pill.warn {
  background: rgba(255,159,10,.12);
  color: #9a5d00;
}
.status-pill.muted {
  background: rgba(15,23,42,.06);
  color: #475569;
}
button:disabled {
  cursor: not-allowed;
  opacity: .58;
  box-shadow: none;
}
.hero-top-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
  margin-left: auto;
  flex-wrap: wrap;
}
.hero-action-btn {
  min-width: 118px;
  padding: 12px 18px;
  font-size: 15px;
}
.service-contact-btn {
  min-width: 96px;
}
.hero-welcome {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.12);
  color: #f8fafc;
  font-size: 14px;
  font-weight: 700;
}
.functional-hero {
  background:
    radial-gradient(circle at top left, rgba(255,196,64,.10), transparent 22%),
    radial-gradient(circle at right, rgba(0,122,255,.10), transparent 26%),
    linear-gradient(135deg, rgba(15,23,42,.96) 0%, rgba(27,36,58,.94) 58%, rgba(31,44,74,.90) 100%);
  border-color: rgba(255,255,255,.08);
}
.functional-hero h1,
.functional-hero .subtitle,
.functional-hero .eyebrow {
  color: #f8fafc;
}
.hero-main-copy {
  max-width: 980px;
}
.full-width-copy {
  max-width: 100%;
}
.hero-status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.hero-status-card {
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}
.hero-status-card span,
.hero-status-card small {
  display: block;
  color: rgba(226,232,240,.80);
}
.hero-status-card span {
  font-size: 12px;
  margin-bottom: 6px;
}
.hero-status-card strong {
  display: block;
  color: #ffffff;
  font-size: 18px;
  letter-spacing: -.02em;
}
.hero-status-card small {
  margin-top: 8px;
  line-height: 1.55;
  font-size: 12px;
}
.hero-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.hero-tag {
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  color: rgba(248,250,252,.92);
  font-size: 12px;
  font-weight: 700;
}
.top-access-bar {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}
.account-corner-dock {
  width: min(720px, 100%);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.access-mini-card {
  padding: 14px;
}
.auth-status-card {
  background: rgba(255,255,255,.96);
}
.auth-primary-btn {
  background: linear-gradient(180deg, #1590ff 0%, #007aff 100%);
  color: #fff;
  box-shadow: 0 10px 24px rgba(0,122,255,.22);
}
.premium-kicker {
  color: #8b5a00;
}
.hero-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.premium-price-row strong {
  font-size: 28px;
  letter-spacing: -0.04em;
  color: #231815;
}
.premium-price-row span {
  color: #8b5a00;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.compact-price-row strong {
  font-size: 26px;
}
.premium-benefit-list {
  display: grid;
  gap: 8px;
}
.premium-benefit-item {
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255,255,255,.52);
  border: 1px solid rgba(178,134,33,.14);
  color: #5f4300;
  font-size: 12px;
  font-weight: 600;
}
.premium-meta-card {
  background: linear-gradient(180deg, rgba(255,244,216,.94) 0%, rgba(255,236,186,.86) 100%);
  border-color: rgba(178,134,33,.20);
}
.premium-pay-btn {
  background: linear-gradient(180deg, #ffcb63 0%, #d89a24 100%);
  color: #231815;
  box-shadow: 0 10px 24px rgba(216,154,36,.28);
}
.payment-orders-panel {
  padding: 18px;
}
.membership-shop-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) repeat(2, minmax(240px, 1fr));
  gap: 14px;
}
.membership-shop-card,
.membership-side-card,
.auth-highlight-card,
.hub-card {
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(15,23,42,.08);
  background: rgba(255,255,255,.84);
}
.membership-shop-card h3,
.membership-side-card h3,
.auth-highlight-card h3,
.hub-card h3 {
  margin: 6px 0 0;
  font-size: 26px;
  letter-spacing: -.03em;
}
.membership-side-card h3,
.auth-highlight-card h3,
.email-hub-card h3,
.account-hub-card h3 {
  font-size: 20px;
}
.shop-note,
.hub-note {
  margin: 10px 0 0;
  color: #5b6475;
  line-height: 1.7;
}
.account-membership-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.hub-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
.hub-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  background: rgba(0,122,255,.10);
  border: 1px solid rgba(0,122,255,.12);
}
.premium-icon {
  background: rgba(255,203,99,.26);
  border-color: rgba(178,134,33,.18);
}
.hub-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.hub-metric {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255,255,255,.70);
  border: 1px solid rgba(15,23,42,.06);
}
.hub-metric span {
  display: block;
  color: #64748b;
  font-size: 12px;
  margin-bottom: 6px;
}
.hub-metric strong {
  display: block;
  color: #111827;
  font-size: 15px;
  line-height: 1.45;
  word-break: break-word;
}
.hub-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.orders-subheading h3 {
  margin: 0;
  font-size: 18px;
}
.shop-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.shop-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.62);
  border: 1px solid rgba(178,134,33,.18);
  color: #7a5200;
  font-size: 12px;
  font-weight: 700;
}
.shop-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.step-list {
  margin: 0;
  padding-left: 18px;
  color: #475569;
  line-height: 1.75;
}
.compact-steps {
  gap: 6px;
}
.auth-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr);
  gap: 14px;
  align-items: stretch;
}
.auth-side-stack {
  display: grid;
  gap: 14px;
}
.mini-modal-shell {
  position: fixed;
  inset: 0;
  z-index: 2400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}
.mini-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15,23,42,.58);
  backdrop-filter: blur(10px);
}
.mini-modal-card {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  padding: 22px;
  border-radius: 24px;
  border: 1px solid rgba(15,23,42,.08);
  background: rgba(255,255,255,.96);
  box-shadow: 0 24px 70px rgba(15,23,42,.24);
  max-height: calc(100vh - 36px);
  overflow: auto;
}
.payment-dialog-card {
  width: min(440px, 100%);
}
.support-dialog-card {
  width: min(520px, 100%);
  text-align: center;
}
.mini-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  min-width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 999px;
  font-size: 20px;
  line-height: 1;
}
.mini-modal-head h2 {
  margin: 6px 0 0;
  font-size: 28px;
  letter-spacing: -.03em;
}
.support-modal-head h2 {
  font-size: 34px;
}
.support-modal-text {
  margin: 0;
  font-size: 30px;
  line-height: 1.45;
  color: #0f172a;
  font-weight: 700;
}
.auth-panel-stack {
  position: relative;
}
.auth-panel-view,
.payment-panel-view {
  animation: modalFadeIn .18s ease;
}
.auth-switch-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  color: #64748b;
  font-size: 13px;
}
.link-btn {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}
.link-btn:hover {
  text-decoration: underline;
}
.payment-summary-card {
  padding: 16px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(248,250,252,.90));
  border: 1px solid rgba(15,23,42,.08);
}
.payment-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #64748b;
  font-size: 13px;
}
.payment-summary-row + .payment-summary-row {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(15,23,42,.06);
}
.payment-summary-row strong {
  color: #111827;
  font-size: 15px;
}
.payment-method-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.payment-method-btn {
  background: rgba(255,255,255,.92);
  color: #111827;
  border: 1px solid rgba(15,23,42,.08);
  box-shadow: none;
}
.payment-method-btn.active {
  background: linear-gradient(180deg, #1590ff 0%, #007aff 100%);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 10px 24px rgba(0,122,255,.18);
}
.auth-entry-note {
  color: var(--muted);
  line-height: 1.7;
  font-size: 13px;
}
body.modal-open {
  overflow: hidden;
}
@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (max-width: 1180px) {
  .top-access-bar {
    justify-content: stretch;
  }
  .account-corner-dock {
    width: 100%;
  }
}
@media (max-width: 840px) {
  .account-corner-dock {
    grid-template-columns: 1fr;
  }
  .hero-top-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  .hero-status-grid {
    grid-template-columns: 1fr;
  }
}
