/* ============================================
   吉他谱公益教学网 · 全站样式
   温暖简洁 · 米白 + 原木色
   ============================================ */
:root {
  --bg: #FAF6F0;
  --bg-soft: #F3ECE1;
  --card: #FFFDF8;
  --ink: #46372A;
  --muted: #8A7A6B;
  --line: #EDE3D3;
  --brand: #D97A3B;
  --brand-dark: #C05F24;
  --brand-soft: #F6E3D2;
  --ok: #5B8A55;
  --danger: #C45C4A;
  --radius: 14px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

.container { width: min(1080px, 92vw); margin: 0 auto; }

/* ---------- 头部 ---------- */
.site-header {
  background: rgba(250, 246, 240, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.header-inner { display: flex; align-items: center; gap: 22px; min-height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); font-weight: 700; font-size: 1.05rem; }
.brand:hover { text-decoration: none; }
.brand-mark { color: var(--brand); }
.brand-img { height: 30px; width: auto; }
.main-nav { display: flex; gap: 4px; flex: 1; }
.main-nav a {
  color: var(--ink); padding: 6px 13px; border-radius: 999px; font-size: .95rem;
  opacity: .75; transition: all .15s;
}
.main-nav a:hover { opacity: 1; text-decoration: none; background: var(--brand-soft); color: var(--brand-dark); }
.main-nav a.active { opacity: 1; background: var(--brand-soft); color: var(--brand-dark); font-weight: 600; }
.header-user { display: flex; align-items: center; gap: 10px; }
.user-chip { display: inline-flex; align-items: center; gap: 7px; font-size: .9rem; }
.user-chip em { font-style: normal; background: var(--brand); color: #fff; border-radius: 999px; padding: 1px 8px; font-size: .75rem; }
.admin-link { font-size: .85rem; opacity: .8; }

/* 登录用户独立横排卡片（位于导航下方） */
.user-bar {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
  margin-top: 12px; margin-bottom: 4px; padding: 10px 16px;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 1px 6px rgba(120, 90, 40, .05);
}
.user-bar-main { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 600; font-size: .95rem; }
.user-bar-main:hover { text-decoration: none; color: var(--brand-dark); }
.user-bar-name { max-width: 12em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-bar .lv-pill { font-style: normal; background: var(--brand); color: #fff; border-radius: 999px; padding: 1px 9px; font-size: .75rem; }
.user-bar-points { font-size: .8rem; color: var(--muted); }
.user-bar-spacer { flex: 1; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-block; border: 1px solid transparent; border-radius: 999px;
  padding: 9px 22px; font-size: .95rem; cursor: pointer; transition: all .15s;
  background: transparent; color: var(--ink); text-align: center;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-ghost { border-color: var(--line); background: var(--card); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand-dark); }
.btn-sm { padding: 5px 14px; font-size: .85rem; }
.btn-block { width: 100%; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-mini { border: 1px solid var(--line); background: var(--card); color: var(--muted); border-radius: 8px; padding: 3px 9px; font-size: .8rem; cursor: pointer; }
.btn-danger.btn-mini { color: var(--danger); border-color: #E8CBC2; }
.btn-danger.btn-mini:hover { background: var(--danger); color: #fff; }
.btn-ghost.btn-mini:hover { border-color: var(--brand); color: var(--brand-dark); }
.btn:active { transform: translateY(0); }

/* ---------- 首页 Hero ---------- */
.hero { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; padding: 52px 0 24px; align-items: center; }
.hero-copy { max-width: 680px; }
.hero-media { position: relative; }
.eyebrow { display: inline-block; color: var(--brand-dark); font-size: .82rem; letter-spacing: .12em; font-weight: 600; margin-bottom: 10px; }
.hero-title { font-size: clamp(1.8rem, 4vw, 2.7rem); line-height: 1.25; margin: 6px 0 12px; }
.hero-title em { font-style: normal; color: var(--brand); }
.hero-sub { color: var(--muted); font-size: 1.02rem; max-width: 34em; }
.hero-cta { display: flex; gap: 12px; margin-top: 22px; }
.strings { display: grid; grid-template-columns: repeat(6, 1fr); gap: 9px; margin-top: 26px; max-width: 320px; }
.strings span { height: 5px; border-radius: 99px; background: linear-gradient(90deg, var(--brand), #E8A96B); opacity: .55; }
.hero-media { position: relative; }
.hero-img { width: 100%; height: auto; border-radius: 22px; box-shadow: 0 18px 40px rgba(70, 55, 42, .16); display: block; }
.hero-note { position: absolute; left: 16px; bottom: 16px; background: rgba(255, 253, 248, .92); padding: 6px 14px; border-radius: 999px; font-size: .85rem; color: var(--brand-dark); font-weight: 600; }

/* ---------- 区块 ---------- */
.section { padding: 34px 0; }
.section-head { margin-bottom: 18px; }
.section-head h2 { margin: 0; font-size: 1.5rem; }
.cards-grid { display: grid; gap: 16px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; transition: all .18s;
}
a.card { color: var(--ink); display: block; }
a.card:hover { text-decoration: none; transform: translateY(-3px); box-shadow: 0 12px 26px rgba(70, 55, 42, .1); border-color: #E2C9AC; }
.card h3 { margin: 0 0 6px; font-size: 1.05rem; }
.card p { margin: 0; color: var(--muted); font-size: .9rem; }
.card-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--brand-soft); color: var(--brand-dark); display: grid; place-items: center; margin-bottom: 12px; }
.card-meta { margin-top: 10px; font-size: .85rem; color: var(--muted); }

.path-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.step { background: var(--card); border: 1px dashed #E2C9AC; border-radius: var(--radius); padding: 20px; position: relative; }
.step::before { content: attr(data-n); }
.step h3 { margin: 0 0 6px; }
.step p { margin: 0; color: var(--muted); font-size: .9rem; }

/* ---------- 徽章 / 片 ---------- */
.badge { display: inline-block; background: var(--bg-soft); color: var(--ink); border-radius: 999px; padding: 2px 12px; font-size: .8rem; }
.b-easy { background: #E8F0E4; color: #4E7A48; }
.b-mid { background: #FBEEDB; color: #A66A2C; }
.b-hard { background: #F8E4E0; color: #B04A3A; }
.chip {
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  border-radius: 999px; padding: 6px 16px; font-size: .88rem; cursor: pointer; transition: all .15s;
}
.chip:hover { border-color: var(--brand); }
.chip.on { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }

/* ---------- 注册数字ID选择 ---------- */
.uid-cands { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 2px; }
.uid-cands .uid-chip { font-family: inherit; }
.uid-chip.on { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }

/* ---------- 多语言切换器 ---------- */
.lang-switch { display: inline-flex; align-items: center; gap: 2px; margin: 0 8px; font-size: .8rem; white-space: nowrap; }
.lang-switch .lang-on { color: var(--brand); font-weight: 600; padding: 2px 6px; }
.lang-switch .lang-link { color: var(--muted); padding: 2px 6px; border-radius: 6px; text-decoration: none; }
.lang-switch .lang-link:hover { color: var(--brand); background: rgba(127, 90, 60, .08); text-decoration: none; }
.footer-bottom .lang-switch { margin-left: 14px; }

/* ---------- 工具条 / 搜索 ---------- */
.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.search-box {
  display: flex; align-items: center; gap: 8px; background: var(--card);
  border: 1px solid var(--line); border-radius: 999px; padding: 7px 15px; flex: 1; min-width: 220px;
}
.search-box input { border: none; outline: none; background: transparent; font-size: .92rem; width: 100%; color: var(--ink); }
.search-box svg { color: var(--muted); flex: none; }

/* ---------- 列表 ---------- */
.item-list { display: flex; flex-direction: column; gap: 12px; }
.item-row {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 20px; transition: all .15s; color: var(--ink);
}
.item-row:hover { text-decoration: none; border-color: #E2C9AC; box-shadow: 0 8px 18px rgba(70,55,42,.08); transform: translateY(-1px); }
.item-row .title { font-weight: 600; font-size: 1.02rem; }
.item-row .sub { color: var(--muted); font-size: .85rem; }
.view-head { text-align: center; padding: 38px 0 16px; }
.view-head h1 { margin: 0 0 6px; font-size: 1.9rem; }
.view-head p { margin: 0; color: var(--muted); }

/* ---------- 详情页 ---------- */
.score-detail { max-width: 820px; }
.back-link { color: var(--muted); font-size: .9rem; display: inline-block; margin-bottom: 14px; }
.score-head { margin-bottom: 18px; }
.score-head h1 { margin: 0 0 8px; font-size: 1.8rem; }
.score-meta { display: flex; gap: 8px; flex-wrap: wrap; }
.chord-block { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 16px; }
.chord-block h3 { margin: 0 0 12px; font-size: 1rem; }
.chord-row { display: flex; gap: 8px; flex-wrap: wrap; }
.chord-pill { background: var(--brand-soft); color: var(--brand-dark); border-radius: 999px; padding: 3px 14px; font-weight: 600; font-size: .95rem; }
.lyrics .lc { display: flex; gap: 14px; padding: 4px 0; border-bottom: 1px dashed var(--line); }
.lyrics .ch { flex: none; width: 74px; color: var(--brand-dark); font-weight: 700; }
.lyrics .tx { color: var(--ink); }
.action-bar { display: flex; gap: 10px; flex-wrap: wrap; margin: 6px 0 8px; }
.select-sm { border: 1px solid var(--line); border-radius: 999px; padding: 7px 12px; font-size: .88rem; background: var(--card); color: var(--ink); }
.muted-inline { color: var(--muted); font-size: .85rem; }
.pay-block { text-align: center; }

/* ---------- 和弦词典 ---------- */
.chord-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 16px; }
.chord-cell { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; text-align: center; transition: all .15s; }
.chord-cell:hover { border-color: #E2C9AC; box-shadow: 0 8px 18px rgba(70,55,42,.08); }
.chord-cell .cname { font-weight: 700; font-size: 1.2rem; }
.chord-cell .ctype { color: var(--muted); font-size: .82rem; margin-bottom: 8px; }
.chord-cell svg { width: 100%; height: auto; }

/* ---------- 调音器 ---------- */
.tuner-wrap { max-width: 860px; }
.tuner-strings { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin: 18px 0; }
.tuner-key {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 6px; text-align: center; cursor: pointer; transition: all .15s;
}
.tuner-key:hover { border-color: var(--brand); background: var(--brand-soft); }
.tuner-key .note { font-size: 1.25rem; font-weight: 700; color: var(--brand-dark); }
.tuner-key .hz { color: var(--muted); font-size: .78rem; }
.tuner-key .name { font-size: .82rem; }
.tuner-key.playing { background: var(--brand); color: #fff; border-color: var(--brand); }
.tuner-key.playing .note, .tuner-key.playing .hz, .tuner-key.playing .name { color: #fff; }
.playing-hint { text-align: center; color: var(--muted); min-height: 1.6em; margin-bottom: 12px; }
.tuner-mic { text-align: center; }
.mic-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.mic-head h3 { margin: 0; }
.mic-status { color: var(--muted); font-size: .9rem; margin: 14px 0; }
.mic-readout { display: flex; align-items: baseline; justify-content: center; gap: 14px; margin: 10px 0 6px; }
.mic-note { font-size: 2.6rem; font-weight: 800; color: var(--brand-dark); }
.mic-freq { color: var(--muted); font-size: 1.05rem; }
.mic-deviation { font-size: 1.1rem; font-weight: 600; }
.mic-deviation.low { color: #B08A2C; }
.mic-deviation.high { color: #B04A3A; }
.mic-deviation.in { color: var(--ok); }
.mic-meter { position: relative; height: 10px; background: var(--bg-soft); border-radius: 99px; margin: 12px 0 4px; }
.mic-meter-zero { position: absolute; left: 50%; top: -3px; bottom: -3px; width: 2px; background: var(--muted); opacity: .5; }
.mic-marker { position: absolute; top: -5px; width: 4px; height: 20px; background: var(--brand-dark); border-radius: 3px; transform: translateX(-50%); transition: left .08s; }
.mic-target { color: var(--muted); font-size: .9rem; min-height: 1.4em; }
.mic-tip { color: var(--muted); font-size: .8rem; margin-top: 8px; }
.tuner-hint { margin: 18px 0; padding: 14px 18px; background: var(--brand-soft); border-radius: var(--radius); color: var(--brand-dark); font-size: .9rem; }

/* ---------- 登录 / 表单 ---------- */
.auth-wrap { display: grid; place-items: center; padding: 46px 0; }
.auth-card { width: min(400px, 100%); padding: 26px; }
.tabs { display: flex; gap: 8px; justify-content: center; margin: 12px 0 18px; }
.form-stack { display: flex; flex-direction: column; gap: 12px; }
.field-label { font-size: .88rem; color: var(--muted); margin-bottom: -6px; }
.text-input {
  width: 100%; border: 1px solid var(--line); background: var(--card); color: var(--ink);
  border-radius: 10px; padding: 10px 14px; font-size: .95rem; font-family: inherit; outline: none; transition: border .15s;
}
.text-input:focus { border-color: var(--brand); }
textarea.text-input { line-height: 1.7; resize: vertical; }
.pwd-wrap { position: relative; }
.pwd-wrap .text-input { padding-right: 44px; }
.pwd-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; font-size: 1.05rem; line-height: 1;
  padding: 6px; color: var(--muted); border-radius: 8px;
}
.pwd-toggle:hover { background: rgba(0,0,0,.05); }
.form-note { color: var(--muted); font-size: .8rem; text-align: center; margin: 10px 0 0; }
.form-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.input-sm { padding: 6px 10px; font-size: .85rem; border-radius: 8px; }
.toast-msg {
  background: #FBEEDB; color: #A66A2C; border-radius: 10px; padding: 10px 16px;
  margin-bottom: 14px; font-size: .92rem;
}
.toast-msg.toast-ok { background: #E8F0E4; color: #4E7A48; }

/* ---------- 个人中心 ---------- */
.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.profile-card h3 { margin-top: 0; }
.level-big { font-size: 1.9rem; font-weight: 800; color: var(--brand-dark); }
.level-title { font-size: .95rem; color: var(--muted); font-weight: 400; }
.progress { height: 8px; background: var(--bg-soft); border-radius: 99px; overflow: hidden; margin: 8px 0; }
.progress-bar { height: 100%; background: linear-gradient(90deg, var(--brand), #E8A96B); border-radius: 99px; }
.plain-list { padding-left: 1.1em; margin: 8px 0; color: var(--ink); font-size: .9rem; }
.block-card { margin-top: 16px; }
.block-card h3 { margin-top: 0; }
.group-title { color: var(--brand-dark); margin: 16px 0 8px; font-size: .95rem; }
.reward-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.reward-cols h4 { margin: 0 0 8px; font-size: .92rem; }
.muted { color: var(--muted); }
.ok-text { color: var(--ok); font-weight: 600; }

/* ---------- 后台 ---------- */
.admin-body { background: #F7F2EA; }
.admin-main { padding: 26px 0 60px; }
.admin-title { font-size: 1.5rem; margin: 0 0 16px; }
.row-between { display: flex; align-items: center; justify-content: space-between; }
.admin-table { width: 100%; border-collapse: collapse; font-size: .9rem; margin-top: 10px; }
.admin-table th { text-align: left; color: var(--muted); font-weight: 600; border-bottom: 1px solid var(--line); padding: 8px 10px; font-size: .82rem; }
.admin-table td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.admin-table tr:hover td { background: rgba(217, 122, 59, .04); }
.row-actions { display: flex; gap: 6px; align-items: center; }
.img-setting { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.img-setting > div { display: flex; flex-direction: column; gap: 8px; }

/* ---------- 底部（浅色 + 友情链接横排） ---------- */
.site-footer { background: #F3ECE1; border-top: 1px solid var(--line); margin-top: 60px; }
.footer-inner { padding: 34px 0 20px; }
.footer-cols { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 26px; margin-bottom: 24px; }
.footer-logo { font-weight: 700; font-size: 1.05rem; color: var(--ink); margin-bottom: 6px; }
.footer-desc { color: var(--muted); font-size: .88rem; max-width: 30em; margin: 0; }
.footer-col h4 { margin: 0 0 8px; font-size: .88rem; color: var(--ink); }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 5px; }
.footer-col a { color: var(--muted); font-size: .88rem; }
.footer-col a:hover { color: var(--brand-dark); }
.footer-links { padding: 14px 18px; background: rgba(255, 253, 248, .72); border: 1px solid #E8DCCC; border-radius: 12px; display: flex; align-items: flex-start; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.links-label { color: var(--muted); font-size: .85rem; flex: none; margin-top: 2px; }
.links-row { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.links-row a { color: #A59A8B; font-size: .86rem; }
.links-row a:hover { color: var(--brand-dark); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; border-top: 1px solid #E8DCCC; padding-top: 14px; }
.footer-tagline { color: var(--brand-dark); font-weight: 600; font-size: .9rem; }
.footer-copy { color: #A59A8B; font-size: .82rem; }

/* ---------- V2 新增：精选 / 点赞 / 评论 / 用户主页 / 广告 ---------- */
.b-featured { background: #F5DFA8; color: #8A6410; font-weight: 600; }
.btn-liked { background: #F6DCDC; border-color: #EFB7B0; color: #B05048; }
.comment-row { border-bottom: 1px dashed var(--line); padding: 10px 2px; }
.comment-row:last-child { border-bottom: none; }
.comment-name { font-weight: 600; font-size: .9rem; margin-right: 10px; }
.comment-time { color: var(--muted); font-size: .78rem; }
.comment-body { margin: 6px 0 0; font-size: .95rem; }

.user-profile-card { display: flex; gap: 18px; align-items: center; padding: 24px; margin-bottom: 18px; flex-wrap: wrap; }
.user-avatar { width: 64px; height: 64px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), #E8A96B); color: #fff; font-size: 1.6rem; font-weight: 700; display: grid; place-items: center; flex: none; object-fit: cover; }
.avatar-fallback { line-height: 1; }
.avatar-sm { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), #E8A96B); color: #fff; font-size: .95rem; font-weight: 700; display: inline-grid; place-items: center; flex: none; object-fit: cover; vertical-align: middle; }
img.avatar-sm { border: 1px solid #EDE3D3; }
.user-chip-link { display: inline-flex; align-items: center; gap: 7px; color: var(--ink); }
.user-chip-link:hover { text-decoration: none; color: var(--brand-dark); }
.contact-line { margin: 8px 0 0; padding: 8px 12px; background: var(--brand-soft); border-radius: 10px; font-size: .9rem; color: var(--brand-dark); }
.follow-list { display: flex; flex-wrap: wrap; gap: 10px; }
.follow-chip { display: inline-flex; align-items: center; gap: 8px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: .9rem; color: var(--ink); }
.follow-chip:hover { border-color: var(--brand); text-decoration: none; }

.home-layout { display: grid; gap: 20px; align-items: start; max-width: 1320px; margin: 0 auto; padding: 0 20px; }
/* 正文始终单栏居中，广告不再挤压正文 */
.home-layout.ad-both, .home-layout.ad-left, .home-layout.ad-right, .home-layout.ad-none { grid-template-columns: minmax(0, 1fr); }
.home-main { min-width: 0; max-width: 1080px; margin: 0 auto; }
/* 小屏/中屏：广告移到正文下方双列卡片，不占内容流 */
.ad-column { order: 99; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 22px; }
.ad-card { display: block; background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; text-align: center; box-shadow: 0 6px 16px rgba(70,55,42,.06); }
.ad-card img { display: block; width: 100%; height: auto; }
.ad-title { display: block; padding: 10px 12px; font-size: .9rem; color: var(--ink); }
.ad-tag { display: inline-block; margin: 0 auto 10px; font-size: .7rem; color: #A59A8B; border: 1px solid #E8DCCC; border-radius: 4px; padding: 0 6px; }
.ad-column .ad-card + .ad-card { margin-top: 0; }
/* 大屏（视口 ≥1760px，两侧有足够留白）：广告固定贴在屏幕最左/最右边缘，正文保持居中不偏移 */
@media (min-width: 1760px) {
  .ad-column { position: fixed; top: 120px; width: 190px; display: block; order: initial; margin-top: 0; z-index: 40; }
  .home-layout.ad-both .ad-column:first-child, .home-layout.ad-left .ad-column { left: 12px; }
  .home-layout.ad-both .ad-column:last-child, .home-layout.ad-right .ad-column { right: 12px; }
  .ad-column .ad-card + .ad-card { margin-top: 14px; }
}

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
  .home-layout.ad-both, .home-layout.ad-left, .home-layout.ad-right, .home-layout.ad-none { grid-template-columns: 1fr; }
  .home-main { max-width: none; }
  .ad-column { position: static; order: 99; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
  .ad-card img { max-height: 260px; object-fit: cover; }
  .hero { grid-template-columns: 1fr; gap: 24px; padding-top: 30px; }
  .hero-media { margin-top: 24px; }
  .grid-4, .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .path-steps, .profile-grid, .reward-cols { grid-template-columns: 1fr; }
  .footer-cols, .img-setting { grid-template-columns: 1fr; }
  .header-inner { flex-wrap: wrap; gap: 10px; padding: 10px 0; }
  .main-nav { order: 3; width: 100%; justify-content: center; overflow-x: auto; }
  .form-row { grid-template-columns: 1fr; }
  .tuner-strings { grid-template-columns: repeat(3, 1fr); }
  /* 后台表格窄屏横向滚动，避免撑破页面 */
  .admin-body .card.block-card { overflow-x: auto; }
  .admin-body .admin-table { min-width: 640px; }
}

@media (max-width: 480px) {
  .container { width: 94vw; }
  .brand-name { font-size: .95rem; }
  .user-chip-link span { display: none; }
  .header-user { gap: 6px; }
  .user-bar { gap: 8px; padding: 9px 12px; }
  .user-bar-name { max-width: 7em; }
  .user-bar-points { display: none; }
  .hero { padding-top: 20px; gap: 18px; }
  .hero-title { font-size: 1.6rem; }
  .hero-sub { font-size: .95rem; }
  .hero-cta { flex-wrap: wrap; }
  .hero-cta .btn { flex: 1; min-width: 130px; }
  .section { padding: 24px 0; }
  .section-head h2 { font-size: 1.25rem; }
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .ad-column { grid-template-columns: 1fr; }
  .ad-card img { max-height: 200px; }
  .cards-grid { gap: 12px; }
  .path-steps { gap: 12px; }
  .toolbar { gap: 6px; }
  .search-box { min-width: 150px; }
  .view-head { padding: 26px 0 12px; }
  .view-head h1 { font-size: 1.5rem; }
  .score-head h1 { font-size: 1.45rem; }
  .item-row { padding: 13px 14px; gap: 10px; flex-wrap: wrap; }
  .item-row .badge { margin-left: auto; }
  .user-profile-card { flex-direction: column; align-items: center; text-align: center; padding: 20px 16px; }
  .user-profile-card .action-bar { justify-content: center; }
  .contact-line { text-align: left; }
  .lyrics .lc { gap: 8px; }
  .lyrics .ch { width: 56px; font-size: .9rem; }
  .chord-block { padding: 14px 14px; }
  .auth-wrap { padding: 24px 0; }
  .tuner-strings { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .mic-note { font-size: 2rem; }
  .footer-inner { padding: 24px 0 16px; }
  .footer-links { padding: 12px 14px; }
  .form-row { grid-template-columns: 1fr; gap: 10px; }
}

/* ---------- V2.3 新增：消息 / 钱包 / 小输入框补全 ---------- */
.input-sm { border: 1px solid var(--line); background: var(--card); color: var(--ink); }

/* 顶部消息铃铛与未读徽标（未读时闪烁） */
.msg-bell { position: relative; display: inline-flex; align-items: center; justify-content: center; color: var(--ink); padding: 6px; border-radius: 10px; }
.msg-bell:hover { color: var(--brand-dark); background: var(--brand-soft); text-decoration: none; }
.msg-badge { position: absolute; top: -4px; right: -6px; min-width: 18px; height: 18px; line-height: 18px; padding: 0 5px; border-radius: 999px; background: #E05A3D; color: #fff; font-size: .72rem; font-weight: 700; text-align: center; box-shadow: 0 2px 6px rgba(224, 90, 61, .4); }
.msg-badge.flash { animation: msgFlash 1.1s ease-in-out infinite; }
@keyframes msgFlash {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.22); opacity: .72; }
}

/* 消息中心 */
.msg-page .chat-box { display: flex; flex-direction: column; gap: 12px; max-height: 52vh; overflow-y: auto; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 14px; padding: 18px; margin: 14px 0; }
.chat-row { display: flex; flex-direction: column; align-items: flex-start; }
.chat-row.mine { align-items: flex-end; }
.bubble { max-width: 74%; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; font-size: .94rem; line-height: 1.6; }
.chat-row.mine .bubble { background: var(--brand); color: #fff; border-color: var(--brand); }
.chat-time { font-size: .72rem; color: var(--muted); margin-top: 4px; padding: 0 4px; }
.chat-form { display: flex; gap: 10px; align-items: flex-end; }
.chat-form .text-input { flex: 1; }

/* 钱包 */
.wallet-balance { font-size: 1.8rem; font-weight: 800; color: var(--brand-dark); }
.msg-page .item-row { border-bottom: 1px dashed var(--line); }

/* ---------- V2.4 新增：第三方登录 ---------- */
.oauth-divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .82rem; margin: 18px 0 12px; }
.oauth-divider::before, .oauth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.oauth-btns { display: flex; gap: 10px; justify-content: center; }
.oauth-btn { flex: 1; max-width: 220px; color: #fff; }
.oauth-btn:hover { color: #fff; opacity: .9; transform: translateY(-1px); text-decoration: none; }
.oauth-wechat { background: #07C160; border-color: #07C160; }
.oauth-qq { background: #12B7F5; border-color: #12B7F5; }

/* ---------- V3.0 新增：头衔等级吉他图标 ---------- */
.t-icon { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; vertical-align: -3px; margin-left: 4px; }
.t-icon img { width: 20px; height: 20px; object-fit: contain; display: block; }
.t-icon .g-neck { position: relative; width: 5px; height: 14px; border-radius: 2px; background: #333; margin-bottom: -7px; z-index: 1; }
.t-icon .g-body { position: relative; width: 15px; height: 15px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; }
.t-icon .g-hole { width: 5px; height: 5px; border-radius: 50%; }
.t-icon .g-note { position: absolute; top: -2px; right: -4px; font-size: 10px; line-height: 1; color: #fff; opacity: 0; }
/* 初级：吉他中心为空（空心轮廓） */
.t-icon.tier1 .g-body { border: 2px solid #B96A2E; background: transparent; }
.t-icon.tier1 .g-hole { background: transparent; border: 1px solid #B96A2E; }
.t-icon.tier1 .g-neck { background: #B96A2E; }
/* 中级：吉他图标一半空（半填充） */
.t-icon.tier2 .g-body { border: 2px solid #B96A2E; background: linear-gradient(180deg, #B96A2E 50%, transparent 50%); }
.t-icon.tier2 .g-hole { background: #fff; }
.t-icon.tier2 .g-neck { background: #B96A2E; }
/* 高级：全黑吉他 + 音乐图标在吉他上动态显示 */
.t-icon.tier3 .g-body { border: 2px solid #1B1B1B; background: #1B1B1B; }
.t-icon.tier3 .g-hole { background: #fff; }
.t-icon.tier3 .g-note { opacity: 1; animation: gnote-bounce 1.2s ease-in-out infinite; }
.t-icon.tier3 .g-neck { background: #1B1B1B; }
/* 演奏级：全黑 + 音符动画 + 金色描边 */
.t-icon.tier4 .g-body { border: 2px solid #C9A227; background: #1B1B1B; }
.t-icon.tier4 .g-hole { background: #C9A227; }
.t-icon.tier4 .g-note { opacity: 1; animation: gnote-spin 1.6s ease-in-out infinite; color: #FFD75E; }
.t-icon.tier4 .g-neck { background: #1B1B1B; }
@keyframes gnote-bounce { 0%,100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-3px) scale(1.25); } }
@keyframes gnote-spin { 0%,100% { transform: rotate(0deg) translateY(0); } 50% { transform: rotate(15deg) translateY(-3px); } }
/* 认证证书徽标 */
.cert-badge { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; color: #8A5A2A; background: #F6E9D8; border: 1px solid #E4CDA8; border-radius: 999px; padding: 2px 10px; }
.gtype-chip { display: inline-block; font-size: .75rem; padding: 1px 8px; border-radius: 999px; background: #F3ECE1; color: #8A7A6B; }
.gtype-chip.folk { background: #EAF3EA; color: #4E7A48; }
.gtype-chip.classical { background: #E8EDF6; color: #4A5D8A; }
/* 证书页 */
.cert-page { max-width: 820px; margin: 0 auto; padding: 30px 16px 50px; }
.cert-sheet { background: #FFFDF6; border: 3px double #C9A227; border-radius: 18px; padding: 42px 36px; text-align: center; box-shadow: 0 14px 40px rgba(70,55,42,.12); }
.cert-sheet h1 { font-size: 2rem; letter-spacing: 6px; color: #8A5A2A; margin: 8px 0 4px; }
.cert-sheet .cert-sub { color: #A88B5A; letter-spacing: 4px; font-size: .95rem; }
.cert-sheet .cert-seal { width: 96px; height: 96px; border: 3px solid #C0392B; border-radius: 50%; color: #C0392B; display: inline-flex; align-items: center; justify-content: center; font-size: .82rem; line-height: 1.3; padding: 6px; opacity: .85; transform: rotate(-8deg); }
.cert-sheet .cert-name { font-size: 2rem; color: #46372A; font-weight: 700; margin: 10px 0 2px; }
.cert-sheet .cert-body { color: #6B5B4C; font-size: 1.05rem; line-height: 2; margin: 14px 0; }
.cert-sheet .cert-no { color: #A88B5A; font-size: .85rem; margin-top: 20px; }

/* 全站通栏广告（site_top / site_bottom）：独立容器，不影响页面原有布局 */
.site-ad{max-width:1080px;width:min(1080px,92vw);margin:14px auto;padding:0 16px;overflow:hidden}
.site-ad a{display:block;border-radius:10px;overflow:hidden;background:#f7f7f8;box-shadow:0 1px 4px rgba(0,0,0,.05);transition:opacity .18s}
.site-ad a:hover{opacity:.9}
.site-ad img{width:100%;max-height:110px;object-fit:cover;display:block}
.site-ad-txt{display:block;padding:12px 16px;color:#666;font-size:14px;text-align:center}
/* 通栏广告条目：无链接时纯文本（鼠标悬停无变化），有链接时可点击 */
.site-ad-item{display:block;border-radius:10px;overflow:hidden;background:#f7f7f8;box-shadow:0 1px 4px rgba(0,0,0,.05)}
.site-ad-item .site-ad-txt{display:block;padding:12px 16px;color:#666;font-size:14px;text-align:center}
.site-ad-item[href]{transition:opacity .18s}
.site-ad-item[href]:hover{opacity:.9}
/* 通栏文字滚动：样式框固定不动，只有文字在框内移动
   loop=左移出框后从右循环出现；bounce=撞框往返 */
.site-ad-marquee{overflow:hidden;white-space:nowrap}
.site-ad-marquee .site-ad-txt{display:inline-block;position:relative;padding:12px 16px;text-align:left;will-change:transform}
.site-ad-marquee--loop .site-ad-txt{animation:adMarqueeLoop 18s linear infinite}
.site-ad-marquee--bounce .site-ad-txt{animation:adMarqueeBounce 9s ease-in-out infinite alternate}
@keyframes adMarqueeLoop{from{transform:translateX(var(--cw,1200px))}to{transform:translateX(-100%)}}
@keyframes adMarqueeBounce{from{transform:translateX(0)}to{transform:translateX(var(--dist,0px))}}
@media (max-width:640px){.site-ad{padding:0 10px}.site-ad img{max-height:80px}.site-ad-marquee--loop{animation-duration:12s}}

/* 文字广告栏（教程要点上方 / 曲谱和弦上方） */
.text-ad{display:block;background:#faf6ef;border:1px solid #eee3cf;border-radius:10px;padding:10px 16px;margin:14px 0;font-size:.92rem;color:#7a6a55;text-align:center;text-decoration:none;transition:background .15s}
.text-ad:hover{background:#f4ecdf;text-decoration:none;color:#6b5a42}

/* 文字广告栏样式变体 */
.text-ad--default{background:#faf6ef;border-color:#eee3cf;color:#7a6a55}
.text-ad--default:hover{background:#f4ecdf;color:#6b5a42}
.text-ad--blue{background:#eef6fc;border-color:#cfe4f3;color:#2d6a94}
.text-ad--blue:hover{background:#e2f0f9;color:#235a80}
.text-ad--green{background:#eef8f1;border-color:#cdeed6;color:#2f7d4f}
.text-ad--green:hover{background:#e3f4e9;color:#266a41}
.text-ad--orange{background:#fdf3e7;border-color:#f3ddc3;color:#b06a1f}
.text-ad--orange:hover{background:#f9ead5;color:#9a5c19}
.text-ad--red{background:#fdf0f0;border-color:#f5d3d3;color:#b03a3a}
.text-ad--red:hover{background:#fbe6e6;color:#9c3030}
.text-ad--dark{background:#3a332b;border-color:#2b251f;color:#f5eee2}
.text-ad--dark:hover{background:#4a4238;color:#fffaf0}
/* 后台样式徽标 */
.ad-style-badge{display:inline-block;font-size:.72rem;padding:2px 8px;border-radius:4px;border:1px solid #e6ddcf;color:#8a7c68;background:#faf6ef}
.ad-style-badge--blue{color:#2d6a94;background:#eef6fc;border-color:#cfe4f3}
.ad-style-badge--green{color:#2f7d4f;background:#eef8f1;border-color:#cdeed6}
.ad-style-badge--orange{color:#b06a1f;background:#fdf3e7;border-color:#f3ddc3}
.ad-style-badge--red{color:#b03a3a;background:#fdf0f0;border-color:#f5d3d3}
.ad-style-badge--dark{color:#f5eee2;background:#3a332b;border-color:#2b251f}

/* 首页主视觉轮播 */
.hero-slide{display:none}
.hero-slide.is-active{display:block;animation:heroFade .8s ease}
@keyframes heroFade{from{opacity:0}to{opacity:1}}
.hero-carousel{position:relative}
.hero-dots{position:absolute;left:50%;bottom:14px;transform:translateX(-50%);display:flex;gap:8px;z-index:5}
.hero-dot{width:9px;height:9px;border-radius:50%;border:none;background:rgba(255,253,248,.55);cursor:pointer;padding:0;transition:background .2s,transform .2s}
.hero-dot.is-active{background:#fff;transform:scale(1.25)}
.hero-dot:hover{background:#fff}

/* 两步上传：选择文件 → 点击上传 → 进度条 */
.file-upload-wrap{position:relative;display:inline-flex;flex-wrap:wrap;align-items:center;gap:10px;max-width:100%}
.file-upload-input{position:absolute;left:-9999px;top:auto;width:1px;height:1px;opacity:0;cursor:pointer;z-index:-1}
.file-upload-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:8px 20px;border-radius:8px;background:#f0e9de;border:1px solid #ddd0bd;color:#5b4c3a;font-size:.9rem;cursor:pointer;font-family:inherit;transition:background .15s,color .15s;line-height:1.4}
.file-upload-wrap:hover .file-upload-btn{background:#e6dbc9;color:#4a3e2e}
.file-upload-hint{font-size:.78rem;color:#a5998a}
.file-upload-file{font-size:.78rem;color:#5b4c3a;max-width:220px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.form-stack .file-upload-wrap{margin-bottom:4px}
.file-upload-progress{display:inline-flex;align-items:center;gap:8px;min-width:170px}
.file-upload-bar{flex:1;height:8px;border-radius:99px;background:#efe6d8;overflow:hidden;position:relative}
.file-upload-bar::after{content:"";position:absolute;left:0;top:0;bottom:0;width:0;background:linear-gradient(90deg,#b98a4e,#8a5c2f);border-radius:99px;transition:width .15s}
.file-upload-pct{font-size:.75rem;color:#8a7c68;min-width:36px;text-align:right}
.file-upload-del{display:inline-flex;align-items:center;padding:6px 14px;border-radius:8px;background:#fdf0ee;border:1px solid #ecc9c3;color:#a8433a;font-size:.85rem;cursor:pointer;font-family:inherit;transition:background .15s;position:relative;z-index:3}
.file-upload-del[hidden]{display:none}
.file-upload-del:hover{background:#f7ddd8}
/* 多图缩略图列表 */
.file-upload-thumbs{display:flex;flex-wrap:wrap;gap:10px;margin-top:8px}
.file-upload-thumb{position:relative;display:inline-block;width:78px;height:78px;border-radius:10px;overflow:hidden;border:1px solid #e6d9c4;background:#fdfbf7}
.file-upload-thumb img{width:100%;height:100%;object-fit:cover;display:block}
.file-upload-thumb-del{position:absolute;top:2px;right:2px;z-index:3;width:20px;height:20px;line-height:18px;border-radius:50%;border:none;background:rgba(60,30,10,.62);color:#fff;font-size:1rem;cursor:pointer;font-family:inherit;padding:0;text-align:center}
.file-upload-thumb-del:hover{background:rgba(168,67,58,.9)}
/* 教程/曲谱多图展示 */
.lesson-gallery{display:flex;flex-wrap:wrap;gap:12px;justify-content:center;margin-bottom:4px}
.lesson-gallery img{max-width:100%;max-height:420px;border-radius:12px;object-fit:contain;flex:1 1 260px;min-width:200px}
.body-inline-img{display:inline-block;margin:6px 4px}
.body-inline-img img{max-width:100%;max-height:420px;border-radius:12px}
.publish-img-block{margin:10px 0 2px;padding:10px 12px;border:1px dashed #e0d3bf;border-radius:12px;background:#fdfbf7}
/* 相册/音频/视频 */
.media-tabs{display:flex;gap:8px;margin:10px 0 6px;flex-wrap:wrap}
.media-tab{padding:6px 18px;border-radius:99px;border:1px solid #e0d3bf;background:#fff;color:#5b4c3a;cursor:pointer;font-family:inherit;font-size:.9rem}
.media-tab.on{background:#8a5c2f;color:#fff;border-color:#8a5c2f}
.media-pane{display:none}
.media-pane.on{display:block}
.media-new-group{margin:8px 0 14px}
.media-group{border:1px solid #e6d9c4;border-radius:12px;padding:12px;margin:12px 0;background:#fff}
.media-group-head{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:10px}
.media-privacy-select{padding:6px 12px;border-radius:8px;border:1px solid #d8c9b0;background:#fdfbf7;color:#5b4c3a;font-family:inherit;font-size:.85rem;cursor:pointer}
.media-privacy-select:focus{outline:none;border-color:#8a5c2f}
.media-group-upload{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-bottom:10px}
.media-group-upload .file-upload-bar{flex:1;min-width:120px}
.media-upload-progress{display:inline-flex;align-items:center;gap:8px;min-width:170px}
.media-file-list{display:flex;flex-direction:column;gap:6px}
.media-file-row{display:flex;align-items:center;gap:10px;padding:6px 10px;border-radius:8px;background:#faf6ee;color:inherit;text-decoration:none;flex-wrap:wrap}
.media-file-row:hover{background:#f2e9d8}
.media-file-icon{width:26px;height:26px;line-height:26px;text-align:center;border-radius:6px;font-size:.8rem;color:#fff;flex:none}
.media-file-icon[data-ext="mp3"],.media-file-icon[data-ext="wav"],.media-file-icon[data-ext="m4a"],.media-file-icon[data-ext="ogg"],.media-file-icon[data-ext="aac"]{background:#7c9b6e}
.media-file-icon[data-ext="mp4"],.media-file-icon[data-ext="webm"],.media-file-icon[data-ext="mov"],.media-file-icon[data-ext="mkv"],.media-file-icon[data-ext="flv"]{background:#6e8f9b}
.media-file-icon{background:#b98a4e}
.media-file-name{flex:1;min-width:120px;word-break:break-all}
.user-media-group{margin:10px 0 14px}
/* 媒体分组卡片：QQ 空间式缩略图（名称与编辑在缩略图下方，不出缩略图范围） */
.media-group-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(196px,1fr));gap:14px;margin-top:8px}
.media-group-card{display:flex;flex-direction:column;border:1px solid #eee4d4;border-radius:14px;background:#fffdf9;padding:10px;cursor:pointer;transition:box-shadow .18s,transform .18s;min-width:0}
.media-group-card:hover{box-shadow:0 8px 20px rgba(70,55,42,.08);transform:translateY(-2px)}
.media-group-cover{position:relative;width:100%;aspect-ratio:4/3;border-radius:10px;overflow:hidden;background:#f3ede2;display:flex;align-items:center;justify-content:center;border:1px solid #eadfce;flex-shrink:0}
.media-group-cover img{width:100%;height:100%;object-fit:cover;display:block}
.media-cover-ph{font-size:1.05rem;color:#a99a80}
.media-cover-empty{position:absolute;bottom:4px;left:4px;background:rgba(90,70,40,.72);color:#fff;font-size:.68rem;padding:1px 6px;border-radius:99px}
.media-cover-count{position:absolute;top:4px;right:4px;background:rgba(60,30,10,.62);color:#fff;font-size:.72rem;padding:1px 8px;border-radius:99px}
.media-cover-view{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:rgba(24,16,8,.45);color:#fff;font-size:.9rem;opacity:0;transition:opacity .18s;letter-spacing:2px}
.media-group-card:hover .media-cover-view{opacity:1}
.media-group-body{display:flex;flex-direction:column;gap:4px;padding-top:8px;min-width:0}
.media-group-title{display:flex;gap:6px;align-items:center;flex-wrap:nowrap;min-width:0}
.media-group-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:0 1 auto;min-width:0}
.media-group-tools{display:flex;gap:6px;align-items:center;flex-wrap:wrap}
.media-group-tools .media-group-upload{display:inline-flex;gap:6px;align-items:center;flex-wrap:wrap}
/* 媒体查看器（相册查看器 / 播放器） */
.media-viewer{position:fixed;inset:0;z-index:9999;display:flex;align-items:center;justify-content:center}
.media-viewer[hidden]{display:none}
.media-viewer-backdrop{position:absolute;inset:0;background:rgba(24,16,8,.82)}
.media-viewer-box{position:relative;z-index:2;width:min(880px,94vw);max-height:92vh;background:#fffdf9;border-radius:16px;box-shadow:0 24px 60px rgba(0,0,0,.4);display:flex;flex-direction:column;overflow:hidden}
.media-viewer-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 16px;border-bottom:1px solid #eee4d4}
.media-viewer-title{font-weight:700;color:#4a3e2e;word-break:break-all}
.media-viewer-close{background:none;border:none;font-size:1.6rem;line-height:1;color:#8a7c68;cursor:pointer;padding:0 6px}
.media-viewer-close:hover{color:#a8433a}
.media-viewer-stage{flex:1;min-height:0;padding:14px;display:flex;align-items:center;justify-content:center;overflow:auto;background:#f6efe3}
.media-viewer-stage img{max-width:100%;max-height:64vh;border-radius:10px;box-shadow:0 6px 24px rgba(0,0,0,.18)}
.media-viewer-stage audio,.media-viewer-stage video{width:100%;max-height:64vh;border-radius:10px}
.media-viewer-controls{display:flex;align-items:center;justify-content:center;gap:16px;padding:10px 14px;border-top:1px solid #eee4d4}
.media-viewer-count{font-size:.85rem;color:#8a7c68;min-width:56px;text-align:center}
.media-viewer-name{padding:0 16px 10px;font-size:.82rem;color:#a99a80;text-align:center;word-break:break-all}
.media-viewer-del{padding:0 16px 14px;text-align:center}
.media-viewer-del form{display:inline-flex!important;gap:8px}
/* 富文本正文编辑器（发布曲谱/教程） */
.rich-toolbar{display:flex;gap:8px;align-items:center;margin:6px 0}
.rich-editor{min-height:220px;border:1px solid #d8c9b0;border-radius:12px;padding:12px 14px;background:#fff;line-height:1.75;outline:none;overflow:auto;font-size:.95rem;color:#3a2e1e}
.rich-editor:focus{border-color:#8a5c2f}
.rich-editor img{max-width:100%;max-height:420px;border-radius:10px;margin:6px 0;display:block}
.rich-editor:empty::before{content:attr(data-placeholder);color:#a99f8b}

/* 后台轮播图管理 */
.hero-manager{grid-column:1/-1;border:1px dashed #e0d3bf;border-radius:12px;padding:14px;background:#fdfbf7}
.hero-manager-list{display:flex;flex-wrap:wrap;gap:12px;margin-top:8px}
.hero-manager-item{position:relative;border:1px solid #e6dccb;border-radius:10px;overflow:hidden;background:#fff}
.hero-manager-item img{display:block;width:150px;height:auto;max-height:110px;object-fit:contain}
.hero-manager-idx{position:absolute;left:6px;top:6px;background:rgba(60,50,38,.78);color:#fff;font-size:.72rem;border-radius:4px;padding:1px 7px}
.hero-manager-del{position:absolute;right:6px;bottom:6px;padding:3px 10px}

/* 后台保存结果居中弹窗（5 秒自动消失） */
.admin-toast{position:fixed;left:50%;top:42%;transform:translate(-50%,-50%);background:#33302a;color:#fff;padding:16px 30px;border-radius:12px;z-index:9999;box-shadow:0 14px 40px rgba(0,0,0,.28);animation:toastIn .35s ease;font-size:1rem;font-weight:600;letter-spacing:.02em;max-width:86vw;text-align:center}
.admin-toast-ok{background:#2f7d4f}
.admin-toast.out{opacity:0;transition:opacity .7s}
@keyframes toastIn{from{opacity:0;transform:translate(-50%,-45%)}to{opacity:1;transform:translate(-50%,-50%)}}