/* ============================================================
   方块盒子皮肤站 · 与官网 / 论坛同源的绿色主题
   ============================================================ */

:root {
  --g50: #e8f5e9;
  --g100: #c8e6c9;
  --g200: #a5d6a7;
  --g300: #81c784;
  --g500: #4caf50;
  --g600: #43a047;
  --g700: #388e3c;
  --g800: #2e7d32;
  --g900: #1b5e20;

  --bg: #f5f9f5;
  --bg-2: #eef6ed;
  --card: #ffffff;
  --card-2: #fbfdfb;
  --line: #e3ebe2;
  --line-2: #d2e2d1;
  --ink: #17251a;
  --ink-2: #52665a;
  --ink-3: #87998b;
  --brand: var(--g800);
  --brand-ink: #ffffff;
  --brand-soft: rgba(46, 125, 50, 0.09);
  --brand-line: rgba(46, 125, 50, 0.22);
  --accent: #f0a020;
  --danger: #c62828;
  --danger-soft: #fdecea;
  --warn: #b26a00;
  --warn-soft: #fff5e6;

  --radius: 18px;
  --radius-sm: 12px;
  --shadow-sm: 0 1px 2px rgba(23, 37, 26, 0.04), 0 3px 10px rgba(23, 37, 26, 0.045);
  --shadow-md: 0 10px 30px rgba(23, 37, 26, 0.09), 0 2px 8px rgba(23, 37, 26, 0.05);
  --nav-bg: rgba(245, 249, 245, 0.86);
  --font: "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "HarmonyOS Sans SC", system-ui, -apple-system, sans-serif;
  --mono: "Cascadia Code", Consolas, "SF Mono", Menlo, monospace;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #0d1310;
  --bg-2: #121a15;
  --card: #151d18;
  --card-2: #18211b;
  --line: #24312a;
  --line-2: #2f4038;
  --ink: #e7f0e9;
  --ink-2: #a7baac;
  --ink-3: #7d9184;
  --brand: #66bb6a;
  --brand-ink: #10270f;
  --brand-soft: rgba(102, 187, 106, 0.12);
  --brand-line: rgba(102, 187, 106, 0.32);
  --accent: #e5b45a;
  --danger: #ef7c74;
  --danger-soft: rgba(198, 40, 40, 0.16);
  --warn: #e0a94a;
  --warn-soft: rgba(178, 106, 0, 0.16);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.45);
  --nav-bg: rgba(13, 19, 16, 0.86);
  color-scheme: dark;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.modal-open { overflow: hidden; }
::selection { background: var(--g100); color: var(--g900); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font-family: inherit; font-size: 15px; color: inherit; }
button { cursor: pointer; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 22px; }
.page { flex: 1; padding: 34px 0 60px; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.mono { font-family: var(--mono); word-break: break-all; }
.nowrap { white-space: nowrap; }
.spacer { flex: 1; }
.hidden { display: none !important; }

/* ---------------- 顶栏 ---------------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: var(--nav-bg);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { display: flex; align-items: center; gap: 20px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; flex: none; }
.brand-logo { width: 34px; height: 34px; object-fit: contain; }
.brand-text { font-size: 17px; letter-spacing: 0.2px; }
.brand-text small { font-size: 10px; font-weight: 800; letter-spacing: 1.5px; color: var(--ink-3); margin-left: 6px; }
.nav-links { display: flex; align-items: center; gap: 3px; }
.nav-links a {
  padding: 7px 13px; border-radius: 999px; font-size: 14.5px; font-weight: 600; color: var(--ink-2);
  transition: background 0.18s, color 0.18s; white-space: nowrap;
}
.nav-links a:hover { background: var(--brand-soft); color: var(--brand); }
.nav-links a.active { background: var(--brand-soft); color: var(--brand); }
.nav-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; flex: none; }
.nav-user { display: flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font-size: 13.5px; font-weight: 700; flex: none; }
.nav-user:hover { border-color: var(--brand-line); color: var(--brand); }
.nav-user-name { max-width: 180px; flex: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-user .avatar { flex: 0 0 auto; width: 28px; height: 28px; }

.icon-btn {
  width: 36px; height: 36px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--card); display: inline-grid; place-items: center; color: var(--ink-2);
  transition: color 0.18s, border-color 0.18s, background 0.18s;
}
.icon-btn:hover { color: var(--brand); border-color: var(--brand-line); background: var(--brand-soft); }

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 38px; padding: 0 16px; border-radius: 999px; border: 1px solid transparent;
  font-size: 14px; font-weight: 700; cursor: pointer; white-space: nowrap;
  transition: transform 0.15s, box-shadow 0.18s, background 0.18s, border-color 0.18s, color 0.18s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: linear-gradient(135deg, var(--g600), var(--g800)); color: #fff; box-shadow: 0 6px 16px rgba(46, 125, 50, 0.24); }
.btn-primary:hover { box-shadow: 0 8px 22px rgba(46, 125, 50, 0.32); }
.btn-ghost { background: var(--card); border-color: var(--line-2); color: var(--ink-2); }
.btn-ghost:hover { border-color: var(--brand-line); color: var(--brand); background: var(--brand-soft); }
.btn-soft { background: var(--brand-soft); color: var(--brand); }
.btn-soft:hover { background: var(--brand-line); }
.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn-lg { height: 46px; padding: 0 24px; font-size: 15px; }
.btn[disabled] { opacity: 0.55; pointer-events: none; }

/* ---------------- 页面标题 ---------------- */
.page-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font-size: 28px; letter-spacing: -0.4px; line-height: 1.25; }
.page-head p { color: var(--ink-2); font-size: 14.5px; }
.kicker { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 800; letter-spacing: 1.6px; color: var(--brand); text-transform: uppercase; }
.kicker::before { content: ""; width: 18px; height: 2px; border-radius: 2px; background: currentColor; }

/* ---------------- 首页英雄区 ---------------- */
.hero {
  position: relative; overflow: hidden;
  border-radius: 26px; border: 1px solid var(--line);
  background:
    radial-gradient(900px 400px at 88% -10%, rgba(76, 175, 80, 0.22), transparent 60%),
    radial-gradient(700px 360px at 0% 110%, rgba(129, 199, 132, 0.2), transparent 60%),
    linear-gradient(150deg, var(--card-2), var(--card));
  box-shadow: var(--shadow-sm);
  padding: 44px 46px;
  display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 30px; align-items: center;
}
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; padding: 30px 26px; } }
.hero-copy h1 { font-size: 42px; line-height: 1.2; letter-spacing: -1.2px; margin: 12px 0 14px; }
.hero-copy h1 em { font-style: normal; color: var(--brand); }
.hero-copy p { color: var(--ink-2); font-size: 15.5px; max-width: 520px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.hero-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand); font-size: 12px; font-weight: 700;
}
.chip-grey { background: var(--line); color: var(--ink-2); }
.hero-viewer { display: flex; justify-content: center; align-items: center; position: relative; flex-wrap: wrap; gap: 10px; }
.viewer-stage {
  position: relative; width: 100%; max-width: 340px; aspect-ratio: 4 / 5;
  border-radius: 22px; overflow: hidden;
  background:
    radial-gradient(circle at 50% 38%, rgba(76, 175, 80, 0.2), transparent 55%),
    linear-gradient(180deg, transparent, rgba(46, 125, 50, 0.06));
  border: 1px solid var(--line);
}
.viewer-stage canvas { width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
.viewer-stage canvas.grabbing { cursor: grabbing; }
.viewer-hint {
  position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%);
  font-size: 11px; color: var(--ink-3); background: var(--nav-bg); padding: 2px 9px; border-radius: 999px;
  backdrop-filter: blur(6px); pointer-events: none; white-space: nowrap;
}
.viewer-badge {
  position: absolute; top: 10px; left: 10px; font-size: 11px; font-weight: 800;
  background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 3px 9px; color: var(--ink-2);
}
.preset-strip { display: flex; gap: 7px; justify-content: center; margin-top: 14px; flex-wrap: wrap; flex-basis: 100%; }
.preset-dot {
  width: 38px; height: 38px; border-radius: 10px; border: 2px solid transparent; background: var(--bg-2);
  padding: 2px; cursor: pointer; transition: border-color 0.15s, transform 0.15s;
}
.preset-dot:hover { transform: translateY(-2px); }
.preset-dot.active { border-color: var(--brand); }
.preset-dot canvas { width: 100%; height: 100%; border-radius: 7px; }

/* ---------------- 数据条 ---------------- */
.stat-band {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 18px 0 0;
}
.stat-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 16px 18px; box-shadow: var(--shadow-sm);
}
.stat-card b { display: block; font-size: 24px; letter-spacing: -0.5px; line-height: 1.2; }
.stat-card span { font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
@media (max-width: 680px) { .stat-band { grid-template-columns: repeat(2, 1fr); } }

/* ---------------- 通用区块 ---------------- */
.section { margin-top: 34px; }
.section-head { display: flex; align-items: flex-end; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.section-head h2 { font-size: 21px; letter-spacing: -0.3px; }
.section-head p { color: var(--ink-3); font-size: 13.5px; }
.section-head .btn { margin-left: auto; }
.section-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.section-actions .btn { margin-left: 0; }

/* ---------------- 皮肤卡片 ---------------- */
.skin-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 920px) { .skin-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 680px) { .skin-grid { grid-template-columns: repeat(2, 1fr); } }
.skin-card {
  position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; box-shadow: var(--shadow-sm); cursor: pointer;
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
  display: flex; flex-direction: column; gap: 10px;
}
.skin-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--brand-line); }
.skin-thumb {
  position: relative; border-radius: 13px; overflow: hidden; aspect-ratio: 1 / 1;
  background:
    linear-gradient(45deg, var(--bg-2) 25%, transparent 25%, transparent 75%, var(--bg-2) 75%),
    linear-gradient(45deg, var(--bg-2) 25%, var(--card-2) 25%, var(--card-2) 75%, var(--bg-2) 75%);
  background-size: 22px 22px; background-position: 0 0, 11px 11px;
  display: grid; place-items: center;
}
.skin-thumb canvas { width: 62%; height: 62%; image-rendering: pixelated; border-radius: 14px; box-shadow: 0 8px 22px rgba(0, 0, 0, 0.16); }
.skin-thumb .skin-tag {
  position: absolute; top: 8px; right: 8px; font-size: 10.5px; font-weight: 800; padding: 2px 7px;
  border-radius: 999px; background: rgba(0, 0, 0, 0.42); color: #fff; backdrop-filter: blur(4px);
}
.skin-name { font-weight: 750; font-size: 14.5px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.skin-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-3); }
.skin-meta .who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.skin-meta .num { margin-left: auto; display: inline-flex; gap: 8px; align-items: center; }
.skin-meta .num span { display: inline-flex; align-items: center; gap: 3px; }

/* 衣柜卡片下方的管理按钮 */
.card-actions { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 2px; }
.card-actions button {
  border: 1px solid var(--line); background: var(--bg); border-radius: 8px;
  height: 26px; padding: 0 8px; font-size: 11.5px; font-weight: 700; color: var(--ink-2);
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.card-actions button:hover { color: var(--brand); border-color: var(--brand-line); background: var(--brand-soft); }
.card-actions button[data-public="1"] { color: var(--brand); border-color: var(--brand-line); background: var(--brand-soft); }
.card-actions button.danger:hover { color: var(--danger); border-color: var(--danger); background: var(--danger-soft); }

/* 上传预览 */
.upload-preview { display: grid; grid-template-columns: 220px 1fr; gap: 18px; align-items: start; }
@media (max-width: 620px) { .upload-preview { grid-template-columns: 1fr; } }
.upload-preview .viewer-stage { aspect-ratio: 1 / 1.15; max-width: none; }

/* ---------------- 皮肤详情页 ---------------- */
.detail-card { display: grid; grid-template-columns: 360px 1fr; gap: 28px; padding: 24px; }
@media (max-width: 820px) { .detail-card { grid-template-columns: 1fr; padding: 18px; } }
.detail-viewer-col { min-width: 0; }
.detail-stage { max-width: none; aspect-ratio: 1 / 1.08; }
.viewer-tools { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 10px; }
.viewer-tools button {
  border: 1px solid var(--line); background: var(--card); border-radius: 9px;
  height: 30px; padding: 0 11px; font-size: 12px; font-weight: 600; color: var(--ink-2);
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.viewer-tools button:hover { color: var(--brand); border-color: var(--brand-line); }
.viewer-tools button.active { color: var(--brand); border-color: var(--brand); background: var(--brand-soft); }
.detail-info { min-width: 0; }
.detail-info .detail-title { font-size: 28px; }
.detail-info .btn-row { max-width: 560px; }
.detail-info .btn-row .btn { flex: 0 0 auto; }

/* ---------------- 评论 ---------------- */
.comments-panel { margin-top: 30px; }
.comments-panel .panel-head .small { margin-left: 8px; }
.comment-item { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.comment-item .avatar { flex: 0 0 auto; }
.comment-item:last-child { border-bottom: none; }
.comment-main { flex: 1; min-width: 0; }
.comment-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.comment-head b { font-size: 14px; }
.comment-head .copy-btn { margin-left: auto; }
.comment-content { color: var(--ink-2); font-size: 14px; white-space: pre-wrap; word-break: break-word; margin-top: 3px; }
.comment-form { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 16px; }
.comment-form textarea {
  width: 100%; min-height: 90px; resize: vertical; border-radius: 12px;
  border: 1px solid var(--line-2); background: var(--bg); padding: 11px 13px; outline: none;
  font-size: 14px; line-height: 1.6; transition: border-color 0.18s, background 0.18s;
}
.comment-form textarea:focus { border-color: var(--brand-line); background: var(--card); }
.comment-form-foot { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.comment-form-foot .small { flex: 1; }

/* ---------------- 管理后台 ---------------- */
.report-card {
  display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; margin-bottom: 12px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}
.report-thumb {
  width: 56px; height: 56px; flex: none; border-radius: 12px; overflow: hidden;
  display: grid; place-items: center; background: var(--bg-2); border: 1px solid var(--line);
}
.report-thumb canvas { width: 44px; height: 44px; image-rendering: pixelated; }
.report-main { flex: 1; min-width: 0; }
.report-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 700; }
.report-detail { color: var(--ink-2); font-size: 13.5px; margin-top: 4px; word-break: break-word; }
.report-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; flex: none; }
@media (max-width: 680px) {
  .report-card { flex-wrap: wrap; }
  .report-actions { width: 100%; justify-content: flex-start; }
}

/* ---------------- 皮肤库工具条 ---------------- */
.toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 18px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px; box-shadow: var(--shadow-sm);
}
.seg { display: inline-flex; background: var(--bg-2); border-radius: 999px; padding: 3px; gap: 2px; }
.seg button {
  border: none; background: transparent; height: 32px; padding: 0 13px; border-radius: 999px;
  font-size: 13.5px; font-weight: 700; color: var(--ink-2);
}
.seg button.active { background: var(--card); color: var(--brand); box-shadow: var(--shadow-sm); }
.search-box { position: relative; flex: 1; min-width: 190px; }
.search-box input {
  width: 100%; height: 38px; border-radius: 999px; border: 1px solid var(--line-2);
  background: var(--bg); padding: 0 14px 0 38px; outline: none; font-size: 14px;
  transition: border-color 0.18s, background 0.18s;
}
.search-box input:focus { border-color: var(--brand-line); background: var(--card); }
.search-box svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--ink-3); }
.select {
  height: 38px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--card);
  padding: 0 34px 0 14px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); outline: none;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2387998b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 12px;
}
.pager { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 26px; }
.pager button {
  min-width: 38px; height: 38px; border-radius: 11px; border: 1px solid var(--line);
  background: var(--card); color: var(--ink-2); font-weight: 700; font-size: 13.5px;
}
.pager button.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.pager button[disabled] { opacity: 0.45; }

/* ---------------- 空状态 / 骨架 ---------------- */
.empty {
  border: 1px dashed var(--line-2); border-radius: var(--radius); padding: 46px 24px;
  text-align: center; color: var(--ink-3); background: var(--card-2);
}
.empty b { display: block; color: var(--ink-2); font-size: 15px; margin-bottom: 4px; }
.skeleton { color: var(--ink-3); padding: 40px 0; text-align: center; font-size: 14px; }

/* ---------------- 三步骤 ---------------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 780px) { .steps { grid-template-columns: 1fr; } }
.step-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow-sm);
}
.step-num {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand); font-weight: 800; font-size: 14px; margin-bottom: 12px;
}
.step-card h3 { font-size: 16px; margin-bottom: 6px; }
.step-card p { color: var(--ink-2); font-size: 13.5px; }
.code-line {
  display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 8px 10px;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px;
  font-family: var(--mono); font-size: 12px; color: var(--ink-2); overflow: hidden;
}
.code-line code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.copy-btn { border: none; background: var(--card); border: 1px solid var(--line); border-radius: 8px; height: 26px; padding: 0 9px; font-size: 11.5px; font-weight: 700; color: var(--ink-2); flex: none; }
.copy-btn:hover { color: var(--brand); border-color: var(--brand-line); }

/* ---------------- 我的衣柜 ---------------- */
.dash { display: grid; grid-template-columns: 320px 1fr; gap: 18px; align-items: start; }
@media (max-width: 900px) { .dash { grid-template-columns: 1fr; } }
.panel {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); overflow: hidden;
}
.panel-head { display: flex; align-items: center; gap: 10px; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.panel-head h2 { font-size: 16px; }
.panel-head .btn { margin-left: auto; }
.panel-body { padding: 18px; }
.me-card { text-align: center; padding: 24px 18px 18px; }
.me-avatar { width: 76px; height: 76px; border-radius: 20px; margin: 0 auto 12px; overflow: hidden; border: 2px solid var(--line); background: var(--bg-2); }
.me-avatar img, .me-avatar .avatar-letter { width: 100%; height: 100%; object-fit: cover; }
.me-card h2 { font-size: 19px; letter-spacing: -0.3px; }
.me-card .uname { color: var(--ink-3); font-size: 13px; margin-bottom: 8px; }
.me-card .uuid { font-family: var(--mono); font-size: 11px; color: var(--ink-3); background: var(--bg-2); border-radius: 8px; padding: 5px 8px; display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.me-stats { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); margin-top: 16px; padding-top: 14px; }
.me-stats b { display: block; font-size: 18px; }
.me-stats span { font-size: 11.5px; color: var(--ink-3); }
.current-viewer { width: 100%; aspect-ratio: 1 / 1.15; border-radius: 14px; background: radial-gradient(circle at 50% 40%, rgba(76, 175, 80, 0.13), transparent 60%), var(--bg-2); }
.current-viewer canvas { width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.btn-row .btn { flex: 1; }

/* ---------------- 上传 ---------------- */
.dropzone {
  border: 1.5px dashed var(--line-2); border-radius: 14px; padding: 22px; text-align: center;
  background: var(--bg-2); color: var(--ink-3); transition: border-color 0.18s, background 0.18s; cursor: pointer;
}
.dropzone:hover, .dropzone.drag { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.dropzone b { display: block; color: var(--ink-2); font-size: 14px; margin-bottom: 3px; }
.dropzone small { font-size: 12px; }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; font-weight: 700; color: var(--ink-2); margin-bottom: 6px; }
.field input[type="text"], .field input[type="search"], .field textarea, .field select {
  width: 100%; border-radius: 11px; border: 1px solid var(--line-2); background: var(--bg);
  padding: 10px 12px; outline: none; font-size: 14px; transition: border-color 0.18s, background 0.18s;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--brand-line); background: var(--card); }
.field textarea { min-height: 84px; resize: vertical; }
.field .hint { font-size: 11.5px; color: var(--ink-3); margin-top: 5px; }
.radio-row { display: flex; gap: 8px; flex-wrap: wrap; }
.radio-pill { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 1px solid var(--line-2); border-radius: 999px; font-size: 13px; font-weight: 600; cursor: pointer; background: var(--bg); }
.radio-pill:has(input:checked) { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.radio-pill input { accent-color: var(--brand); }

/* ---------------- 弹窗 ---------------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px;
  background: rgba(10, 20, 14, 0.5); backdrop-filter: blur(3px);
  opacity: 0; transition: opacity 0.18s;
}
.modal-overlay.show { opacity: 1; }
.modal {
  width: 100%; max-height: calc(100vh - 40px); overflow: auto; background: var(--card);
  border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-md);
  transform: translateY(8px) scale(0.985); transition: transform 0.18s;
}
.modal-overlay.show .modal { transform: none; }
.modal-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--card); z-index: 2; }
.modal-head h3 { font-size: 17px; }
.modal-head .icon-btn { margin-left: auto; }
.modal-body { padding: 20px; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 14px 20px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.skin-detail { display: grid; grid-template-columns: 320px 1fr; gap: 22px; }
@media (max-width: 680px) { .skin-detail { grid-template-columns: 1fr; } }
.skin-detail .viewer-stage { max-width: none; aspect-ratio: 1 / 1.05; }
.detail-title { font-size: 21px; letter-spacing: -0.4px; }
.detail-owner { display: flex; align-items: center; gap: 8px; margin: 8px 0 14px; color: var(--ink-2); font-size: 13.5px; }
.detail-facts { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.fact { background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 7px 11px; font-size: 12.5px; color: var(--ink-2); }
.fact b { color: var(--ink); }
.detail-desc { color: var(--ink-2); font-size: 13.5px; margin-bottom: 18px; }

/* ---------------- 玩家主页 ---------------- */
.profile-hero {
  display: grid; grid-template-columns: 300px 1fr; gap: 26px; align-items: center;
  background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 26px;
  box-shadow: var(--shadow-sm);
  background-image: radial-gradient(600px 260px at 100% 0%, rgba(76, 175, 80, 0.12), transparent 60%);
}
@media (max-width: 780px) { .profile-hero { grid-template-columns: 1fr; } }
.profile-hero .viewer-stage { max-width: 280px; margin: 0 auto; aspect-ratio: 1 / 1.1; }
.profile-name { font-size: 32px; letter-spacing: -0.8px; line-height: 1.2; }
.profile-sub { color: var(--ink-2); font-size: 14px; margin-top: 4px; }
.profile-bio { color: var(--ink-2); margin-top: 10px; max-width: 560px; }
.profile-facts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.profile-facts .fact b { display: block; font-size: 16px; }

/* ---------------- 关于页 ---------------- */
.about-hero { text-align: center; padding: 26px 0 10px; }
.about-hero h1 { font-size: 38px; letter-spacing: -1px; }
.about-hero p { color: var(--ink-2); max-width: 640px; margin: 10px auto 0; }
.about-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (max-width: 760px) { .about-grid { grid-template-columns: 1fr; } }
.about-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow-sm); }
.about-card h2 { font-size: 18px; margin-bottom: 10px; }
.about-card h3 { font-size: 14.5px; margin: 16px 0 6px; color: var(--brand); }
.about-card p, .about-card li { color: var(--ink-2); font-size: 14px; }
.about-card ul { padding-left: 18px; display: grid; gap: 4px; margin: 6px 0; }
.about-card code { font-family: var(--mono); font-size: 12.5px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 5px; }
.about-card a { color: var(--brand); font-weight: 600; }
.about-card a:hover { text-decoration: underline; }
.about-wide { grid-column: 1 / -1; }
.io-table { width: 100%; border-collapse: collapse; font-size: 13.5px; margin-top: 8px; }
.io-table th, .io-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.io-table th { color: var(--ink-3); font-size: 12px; font-weight: 700; }
.io-table code { font-size: 12px; }

/* ---------------- 页脚 ---------------- */
.footer { border-top: 1px solid var(--line); background: var(--card-2); margin-top: 46px; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; padding: 26px 0; }
.footer-brand { display: flex; gap: 10px; align-items: center; }
.footer-brand img { width: 34px; height: 34px; }
.footer-brand b { font-size: 14px; }
.footer-brand p { font-size: 12px; color: var(--ink-3); }
.footer-links { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: var(--ink-2); margin-left: auto; }
.footer-links a:hover { color: var(--brand); }
.footer-copy { width: 100%; font-size: 11.5px; color: var(--ink-3); border-top: 1px solid var(--line); padding-top: 12px; }

/* ---------------- 提示条 ---------------- */
.toast-stack { position: fixed; right: 18px; bottom: 18px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 12px;
  font-size: 13.5px; font-weight: 600; box-shadow: var(--shadow-md);
  opacity: 0; transform: translateY(8px); transition: all 0.24s; max-width: 320px;
}
.toast.show { opacity: 1; transform: none; }
.toast-ok { background: var(--g800); color: #fff; }
.toast-error { background: var(--danger); color: #fff; }

/* ---------------- 工具类 ---------------- */
.avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: var(--bg-2); }
.avatar-sm { width: 28px; height: 28px; }
.avatar-letter { display: inline-grid; place-items: center; font-weight: 800; color: var(--brand); background: var(--brand-soft); }
.me-avatar .avatar-letter { width: 100%; height: 100%; }
.notice { background: var(--warn-soft); border: 1px solid rgba(178, 106, 0, 0.24); color: var(--warn); border-radius: 12px; padding: 10px 14px; font-size: 13.5px; }
.error-text { color: var(--danger); font-size: 13px; margin-top: 8px; min-height: 18px; }
.flex { display: flex; align-items: center; gap: 10px; }
.mt-2 { margin-top: 10px; } .mt-3 { margin-top: 16px; } .mt-4 { margin-top: 24px; }
.w-full { width: 100%; }
.tabs-line { display: flex; gap: 18px; border-bottom: 1px solid var(--line); margin-bottom: 16px; flex-wrap: wrap; }
.tabs-line button { border: none; background: none; padding: 10px 2px; font-size: 14px; font-weight: 700; color: var(--ink-3); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs-line button.active { color: var(--brand); border-bottom-color: var(--brand); }
.badge-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--g500); display: inline-block; }
.link { color: var(--brand); font-weight: 600; }
.link:hover { text-decoration: underline; }
hr.sep { border: none; border-top: 1px solid var(--line); margin: 18px 0; }

/* ---------------- 窄屏 ---------------- */
@media (max-width: 640px) {
  .topbar-inner { height: auto; min-height: 56px; gap: 6px; padding-top: 8px; padding-bottom: 8px; flex-wrap: wrap; overflow: visible; }
  .brand { order: 1; }
  .nav-actions { order: 2; margin-left: auto; gap: 6px; }
  .nav-links { order: 3; width: 100%; justify-content: center; overflow-x: auto; scrollbar-width: none; }
  .nav-links::-webkit-scrollbar { display: none; }
  .brand-text { font-size: 15px; }
  .brand-text small { display: none; }
  .brand-logo { width: 30px; height: 30px; }
  .nav-links { gap: 0; flex: none; }
  .nav-links a { padding: 6px 9px; font-size: 13px; }
  .nav-user-name { display: none; }
  .nav-user { padding: 3px; }
  .nav-actions { gap: 6px; }
  .nav-actions .btn-sm { padding: 0 10px; }
  .page { padding-top: 20px; }
  .hero-copy h1 { font-size: 32px; }
  .hero { padding: 26px 20px; }
  .viewer-stage { max-width: 320px; }
  .page-head h1 { font-size: 24px; }
  .page-head .btn { margin-left: 0 !important; }
  .footer-links { margin-left: 0; }
}
