/* ========= 荒野乱斗角色图鉴 · 卡通风样式 =========
   设计语言：放射阳光底 + 厚黑描边 + 胖圆字体 + 3D 立体按钮 + 高饱和撞色
   所有可调参数（颜色/圆角/描边/阴影/背景/字体）都在 theme.css 里。 */
@import url("theme.css");

/* 本地字体：角色名用「华康娃娃体」，另备「字魂布丁体」 */
@font-face {
  font-family: "Wawa";
  src: url("../../Design/素材/字体/华康娃娃体简W5.ttf") format("truetype");
  font-display: swap;
}
@font-face {
  font-family: "Pudding";
  src: url("../../Design/素材/字体/字魂27号-布丁体.ttf") format("truetype");
  font-display: swap;
}

* { box-sizing: border-box; }

/* 自定义滚动条：暗色 + 主题描边，贴合网页风格 */
* { scrollbar-width: thin; scrollbar-color: var(--panel2) rgba(8,22,44,.4); }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: rgba(8,22,44,.4); }
::-webkit-scrollbar-thumb {
  background: var(--panel2); border: 2px solid var(--ink); border-radius: 999px;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

html, body {
  margin: 0;
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 600;
  -webkit-font-smoothing: antialiased;
  /* 放射光束（从中心发散）+ 中心亮蓝向边缘深蓝的径向渐变 + 中央冷光晕（均由 theme.css 变量驱动） */
  background:
    repeating-conic-gradient(from 0deg at 50% 42%,
      rgba(255,255,255,var(--ray-alpha)) 0deg var(--ray-deg),
      rgba(255,255,255,0) var(--ray-deg) calc(var(--ray-deg) * 2)),
    radial-gradient(80% 60% at 50% 30%, rgba(150,225,255,var(--glow-alpha)), transparent 60%),
    radial-gradient(130% 110% at 50% 40%, var(--bg-top), var(--bg) 70%);
  background-attachment: fixed;
  min-height: 100vh;
}

/* 弹性纵向布局：让页脚 margin-top:auto 能顶到最底部 */
body { display: flex; flex-direction: column; }

/* 嵌在外壳 iframe 里时透明，露出外壳的背景循环视频 */
html.embedded, html.embedded body { background: transparent; }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

.wrap { max-width: 1280px; margin: 0 auto; padding: 0 24px; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: linear-gradient(180deg, rgba(24,41,63,.96), rgba(12,24,40,.92));
  backdrop-filter: blur(8px);
  border-bottom: var(--stroke) solid var(--ink);
  box-shadow: 0 4px 0 rgba(0,0,0,.3);
}
.topbar .wrap { display: flex; align-items: center; gap: 16px; height: 70px; }
.brand {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-display); font-size: 24px; letter-spacing: .5px;
  color: #fff; text-shadow: 0 2px 0 var(--ink);
}
.brand .logo {
  width: 42px; height: 42px; border-radius: 13px;
  background: linear-gradient(180deg, #ffe277, var(--accent) 55%, var(--accent-d));
  display: grid; place-items: center; color: var(--ink); font-size: 22px;
  border: var(--stroke) solid var(--ink);
  box-shadow: 0 4px 0 var(--ink);
  transform: rotate(-6deg);
  animation: pop 3s ease-in-out infinite;
}
@keyframes pop { 0%,100%{transform:rotate(-6deg) scale(1)} 50%{transform:rotate(-6deg) scale(1.08)} }
.brand b { color: var(--accent); }
.topbar .spacer { flex: 1; }
.back-link {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 18px; border-radius: 999px;
  background: var(--panel2); border: var(--stroke) solid var(--ink);
  color: #fff; font-weight: 800; box-shadow: 0 4px 0 var(--ink);
  transition: transform .1s, box-shadow .1s;
}
.back-link:hover { transform: translateY(-1px); }
.back-link:active { transform: translateY(4px); box-shadow: 0 0 0 var(--ink); }

/* ---------- 大标题（描边卡通字） ---------- */
.page-title {
  margin: 38px 0 6px; font-family: var(--font-display);
  font-size: 46px; font-weight: 400; color: #fff;
  letter-spacing: 1px; line-height: 1;
  -webkit-text-stroke: 3px var(--ink);
  paint-order: stroke fill;
  text-shadow: 0 6px 0 var(--ink);
}
.page-sub { margin: 0 0 28px; color: var(--muted); font-weight: 700; }

/* ---------- 首页顶部壁纸 Banner ---------- */
.hero {
  position: relative;
  height: clamp(220px, 32vw, 360px);
  margin-bottom: 0;
  background: var(--bg) center 38%/cover no-repeat;
  border-bottom: var(--stroke) solid var(--ink);
  box-shadow: 0 6px 0 rgba(0,0,0,.25);
  display: flex; align-items: flex-end;
  overflow: hidden;
}
.hero::after { /* 底部渐隐，融入下方背景 */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, transparent 45%, rgba(8,22,44,.65) 100%);
}
.hero-inner { position: relative; z-index: 1; padding: 0 24px 22px; max-width: 1280px; margin: 0 auto; width: 100%; }
.hero-title {
  margin: 0; font-family: var(--font-display); font-weight: 400;
  font-size: clamp(34px, 5vw, 58px); color: #fff; line-height: 1;
  -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill;
  text-shadow: 0 6px 0 var(--ink);
}
.hero-sub {
  margin: 10px 0 0; font-weight: 800; color: #fff;
  font-size: clamp(13px, 1.6vw, 17px);
  text-shadow: 0 2px 0 var(--ink), 0 0 10px rgba(0,0,0,.4);
}

/* ---------- 闪电折角黑丝带分隔（壁纸 ↔ 背景） ---------- */
.hero-divider {
  position: relative;
  height: var(--divider-h, 89px);
  margin: var(--divider-mt, -40px) 0 16px;   /* 上移，让尖角嵌入壁纸下沿 */
  display: grid; place-items: center;
}
.hero-divider::before {       /* 撕裂黑带（已固化的折角形状；折角编辑器仍可临时覆盖） */
  content: ""; position: absolute; inset: 0;
  background: #0a0e15;
  clip-path: var(--divider-clip, polygon(0% 40%, 21.8% 32.6%, 16.1% 16.3%, 100% 0.1%, 100% 59.5%, 75.2% 64.9%, 79.8% 81.1%, 0% 100%));
}
.hd-text {
  position: relative; z-index: 1;
  font-family: "Pudding", var(--font-display); font-weight: 400;   /* 与角色名同字体 */
  font-size: var(--divider-text-size, 90px); letter-spacing: 2px;
  color: #fdf2cf;                                  /* 奶白填充 */
  -webkit-text-stroke: 8px #07090d; paint-order: stroke fill;  /* 黑描边（加粗一倍） */
  text-shadow: 0 4px 0 #07090d;
  /* 位置、倾斜由编辑器控制 */
  transform: translate(var(--divider-text-x, 5px), var(--divider-text-y, -21px)) skewX(var(--divider-text-skew, -11deg));
}

/* ---------- 首页角色：图标 + 名字（极简，无卡片框） ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);   /* 每排 8 个 */
  gap: 22px 10px; padding: 6px 0 30px;
}

/* 排序工具条：放在角色网格左上方，横向排列 */
.sortbar { display: flex; align-items: center; gap: 10px; margin: 2px 0 16px; }
.sortbar-label { font-weight: 800; color: var(--muted); font-size: 14px; text-shadow: 0 2px 0 var(--ink); }
.sort-btn {
  height: 40px; padding: 0 18px; border-radius: 12px; cursor: pointer;
  font-family: var(--font-display); font-weight: 400; font-size: 16px; color: #fff;
  background: var(--panel2); border: var(--stroke) solid var(--ink); box-shadow: 0 4px 0 var(--ink);
  transition: transform .08s, box-shadow .08s, filter .1s;
}
.sort-btn:hover { filter: brightness(1.12); }
.sort-btn:active { transform: translateY(4px); box-shadow: 0 0 0 var(--ink); }
/* 选中：只有顶面变黄，厚度（底部 3D 侧边）保持黑色 */
.sort-btn.active { background: linear-gradient(180deg, #ffe277, var(--accent) 60%); color: var(--ink); box-shadow: 0 4px 0 var(--ink); }

/* 稀有度分区 */
.rarity-section { margin-bottom: 26px; }
.rarity-h {
  font-family: var(--font-display); font-weight: 400; font-size: 22px; color: #fff;
  margin: 0 0 12px; padding-left: 14px; position: relative; line-height: 1.2;
  -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; text-shadow: 0 3px 0 var(--ink);
}
.rarity-h::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 7px; height: 76%; border-radius: 4px;
  background: var(--rc, var(--accent)); border: 2px solid var(--ink);
}
.char-card {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 10px 6px; text-align: center; cursor: pointer;
  transition: transform .14s cubic-bezier(.34,1.56,.64,1);
}
.char-card:hover { transform: translateY(-6px) scale(1.06); }
.grid.editing .char-card:hover { transform: none; }  /* 编辑时不放大，方便拖滑条 */
.icon-slider {
  width: 86%; margin-top: 8px; height: 6px; -webkit-appearance: none; appearance: none;
  border-radius: 999px; background: #0c1d2e; border: 2px solid var(--ink); cursor: pointer;
}
.icon-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: var(--accent2); border: 2px solid var(--ink); }
.icon-slider::-moz-range-thumb { width: 14px; height: 14px; border: 2px solid var(--ink); border-radius: 50%; background: var(--accent2); }
.char-card .avatar {
  width: clamp(96px, 12vw, 130px); aspect-ratio: 1;
  background: center/contain no-repeat;
}
.char-card .cname {
  font-family: "Pudding", var(--font-display); font-weight: 400; font-size: 23px;
  color: #fff; -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill;
  text-shadow: 0 3px 0 var(--ink);
}
/* 倾斜的描边稀有度徽章（角色页头部仍在用） */
.rarity-badge {
  display: inline-block; padding: 4px 14px; border-radius: 999px;
  font-family: var(--font-display); font-weight: 400; font-size: 14px;
  color: var(--ink);
  background: var(--rc, var(--accent));
  border: var(--stroke) solid var(--ink);
  box-shadow: 0 3px 0 var(--ink);
  transform: rotate(-3deg);
}

/* ---------- 角色页头部 ---------- */
.char-head { display: flex; align-items: center; gap: 18px; margin: 60px 0 24px; }
.char-head .avatar {
  width: 82px; height: 82px; border-radius: 20px;
  background: #0c1d2e center/cover no-repeat;
  border: var(--stroke) solid var(--ink); box-shadow: 0 5px 0 var(--ink);
}
.char-head h1 {
  margin: 0; font-family: "Pudding", var(--font-display); font-weight: 400; font-size: 40px;
  color: #fff; -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill;
  text-shadow: 0 4px 0 var(--ink); line-height: 1.1;
}
.char-head .meta { display: flex; align-items: center; gap: 10px; margin-top: 8px; }

/* ---------- 角色页布局 ---------- */
.layout {
  display: grid; grid-template-columns: 318px 1fr; gap: 26px;
  align-items: start; padding-bottom: 80px;
}

/* 皮肤选择区 */
.skins-panel {
  background: linear-gradient(180deg, var(--panel2), var(--panel));
  border: var(--stroke) solid var(--ink); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--hard);   /* 保留厚度硬边，无模糊渐变投影 */
  position: sticky; top: 90px;
  max-height: calc(100vh - 116px); overflow-y: auto;
}
.group-title {
  font-family: var(--font-display); font-weight: 400; font-size: 15px;
  letter-spacing: .5px; color: var(--accent);
  margin: 18px 2px 12px; display: flex; align-items: center; gap: 10px;
  text-shadow: 0 2px 0 var(--ink);
}
.group-title:first-child { margin-top: 2px; }
.group-title::after { content: ""; flex: 1; height: var(--stroke); background: var(--ink); border-radius: 2px; }
.skin-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.skin-tile {
  border: var(--stroke) solid var(--ink); border-radius: 16px; overflow: hidden;
  cursor: pointer; background: #0c1d2e; box-shadow: 0 4px 0 var(--ink);
  transition: transform .12s cubic-bezier(.34,1.56,.64,1), box-shadow .12s;
}
.skin-tile:hover { transform: translateY(-3px) rotate(-1deg); box-shadow: 0 7px 0 var(--ink); }
.skin-tile.active {
  border-color: var(--accent);
  box-shadow: 0 4px 0 var(--accent-d), 0 0 0 3px rgba(255,210,63,.35);
}
.skin-tile .thumb {
  width: 100%; aspect-ratio: 16/10; background: #0c1d2e center/cover no-repeat;
  display: grid; place-items: center; color: var(--muted); font-size: 12px; font-weight: 700;
}
.skin-tile .sname {
  padding: 8px 8px; font-size: 14px; font-weight: 800; text-align: center;
  background: rgba(0,0,0,.22);
}
.skin-tile.active .sname { color: var(--accent); }

/* ---------- 播放器 ---------- */
.player-area { display: grid; gap: 18px; }
.player-shell {
  background: #000; border: var(--stroke) solid var(--ink);
  border-radius: var(--radius); overflow: hidden; position: relative;
  box-shadow: var(--hard);   /* 保留厚度硬边，无模糊渐变投影 */
}
/* 舞台用固定宽高比撑高度（由视频元数据设置），换 src 时高度不依赖视频元素、不塌陷 */
.video-stage {
  position: relative; background: #000; line-height: 0; overflow: hidden;
  aspect-ratio: var(--ar, 16 / 9); max-height: 70vh;
}
/* 双 video 叠放，靠 opacity 瞬间切换（隐藏的那个先加载好第一帧再显示，杜绝闪烁） */
.video-stage .vid {
  position: absolute; inset: 0; width: 100%; height: 100%; display: block;
  background: #000; object-fit: contain; transform-origin: center center; opacity: 0;
}
.video-stage .vid.show { opacity: 1; }
.video-stage.zoomed { cursor: grab; }
.video-stage.zoomed:active { cursor: grabbing; }
/* 左键长按 2 倍速时的角标 */
.player-shell.fast-on .video-stage::after {
  content: "2×"; position: absolute; top: 12px; right: 14px; z-index: 6;
  background: var(--accent); color: var(--ink);
  font-family: var(--font-display); font-weight: 400; font-size: 14px;
  padding: 3px 12px; border-radius: 999px; border: var(--stroke) solid var(--ink);
}
.frame-badge {
  position: absolute; top: 12px; left: 14px; z-index: 5;
  background: var(--accent); color: var(--ink);
  border: var(--stroke) solid var(--ink); box-shadow: 0 3px 0 var(--ink);
  padding: 5px 14px; border-radius: 999px;
  font-family: var(--font-display); font-weight: 400; font-size: 14px;
  font-variant-numeric: tabular-nums; transform: rotate(-2deg);
}

/* 进度条 */
.scrub-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px 0; background: var(--panel); }
.time-text { font-size: 13px; color: var(--muted); font-weight: 800; font-variant-numeric: tabular-nums; min-width: 80px; }
.scrub {
  -webkit-appearance: none; appearance: none; height: 10px; flex: 1;
  border-radius: 999px; cursor: pointer;
  background: #0c1d2e; border: 2px solid var(--ink);
}
.scrub::-webkit-slider-thumb {
  -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, var(--accent) 55%);
  border: 3px solid var(--ink); cursor: pointer; margin-top: -1px;
  box-shadow: 0 2px 0 var(--ink);
}
.scrub::-moz-range-thumb { width: 20px; height: 20px; border: 3px solid var(--ink); border-radius: 50%; background: var(--accent); }

/* 控制栏 */
.controls {
  display: flex; flex-wrap: wrap; align-items: center; gap: 9px;
  padding: 14px 16px 16px; background: var(--panel);
}
.ctrl {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 44px; min-width: 44px; padding: 0 14px;
  background: linear-gradient(180deg, var(--panel2), var(--panel));
  border: var(--stroke) solid var(--ink); color: #fff;
  border-radius: 13px; font-weight: 800; font-size: 14px; cursor: pointer;
  box-shadow: 0 4px 0 var(--ink); transition: transform .08s, box-shadow .08s, filter .1s;
  user-select: none;
}
.ctrl:hover { filter: brightness(1.12); }
.ctrl:active { transform: translateY(4px); box-shadow: 0 0 0 var(--ink); }
/* 统一规则：所有 3D 按钮的厚度（底边）保持黑色 var(--ink)，只有顶面有颜色 */
.ctrl.primary {
  background: linear-gradient(180deg, #ffe277, var(--accent) 60%);
  color: var(--ink); border-color: var(--ink); box-shadow: 0 4px 0 var(--ink);
  font-family: var(--font-display); font-weight: 400; font-size: 16px;
}
.ctrl.primary:active { box-shadow: 0 0 0 var(--ink); }
.ctrl.on {
  background: linear-gradient(180deg, #5fe0ff, var(--accent2));
  color: var(--ink); box-shadow: 0 4px 0 var(--ink);
}
.ctrl.icon-only { width: 48px; padding: 0; font-size: 20px; }
.ctrl .ic { flex: none; }   /* 按钮内简约线性图标 */
.ctrl-group { display: inline-flex; gap: 8px; align-items: center; }
.ctrl-sep { width: var(--stroke); height: 28px; background: var(--ink); border-radius: 2px; margin: 0 3px; opacity: .6; }
.ctrl-label { color: var(--muted); font-size: 13px; font-weight: 800; margin-right: 2px; }
.ctrl-flex { flex: 1 1 auto; min-width: 8px; }   /* 弹性占位：把后面的内容推到右侧 */

select.ctrl { padding-right: 12px; appearance: none; }

/* 放大的圆角正方形播放键：上面黄、3D 底边黑色、图标用伪元素保证居中 */
.ctrl.primary.play-big {
  width: 84px; height: 84px; padding: 0; border-radius: 20px;
  color: var(--ink); box-shadow: 0 6px 0 var(--ink);
}
.ctrl.primary.play-big:active { transform: translateY(6px); box-shadow: 0 0 0 var(--ink); }
.play-big::before, .play-big::after { content: ""; display: block; }
.play-big:not(.is-playing)::before {        /* 播放三角形 */
  width: 0; height: 0; margin-left: 6px;
  border-style: solid; border-width: 18px 0 18px 30px;
  border-color: transparent transparent transparent currentColor;
}
.play-big:not(.is-playing)::after { display: none; }
.play-big.is-playing::before, .play-big.is-playing::after {   /* 暂停双竖杠 */
  width: 9px; height: 34px; border-radius: 3px; background: currentColor;
}

/* 右侧控件簇：缩放 / 音量 两条拖动条上下并列，叠在「截图」上方；全屏在最右 */
.right-cluster { display: flex; flex-direction: column; gap: 6px; align-items: center; }
.slider-stack { display: flex; flex-direction: column; gap: 5px; }
.slider-row { display: flex; align-items: center; gap: 8px; }
.slider-row .ctrl-label { width: 30px; flex: none; margin: 0; text-align: right; }
.vrange { width: 120px; height: 8px; -webkit-appearance: none; appearance: none; border-radius: 999px; background: #0c1d2e; border: 2px solid var(--ink); cursor: pointer; }
.vrange::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: var(--accent2); border: 3px solid var(--ink); }
.vrange::-moz-range-thumb { width: 16px; height: 16px; border: 3px solid var(--ink); border-radius: 50%; background: var(--accent2); }

/* 分段卡 */
.segments-card {
  background: linear-gradient(180deg, var(--panel2), var(--panel));
  border: var(--stroke) solid var(--ink); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--hard);
}
.segments-card h3 {
  margin: 0 0 14px; font-family: var(--font-display); font-weight: 400; font-size: 19px;
  color: var(--accent); text-shadow: 0 2px 0 var(--ink);
}
.seg-list { display: flex; flex-wrap: wrap; gap: 10px; }
.seg-chip {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 9px 16px; border-radius: 13px; cursor: pointer;
  background: var(--panel2); border: var(--stroke) solid var(--ink);
  font-weight: 800; font-size: 14px; box-shadow: 0 4px 0 var(--ink);
  transition: transform .08s, box-shadow .08s;
}
.seg-chip:hover { transform: translateY(-2px); }
.seg-chip:active { transform: translateY(4px); box-shadow: 0 0 0 var(--ink); }
.seg-chip.active {
  background: linear-gradient(180deg, #ffe277, var(--accent) 60%); color: var(--ink);
  box-shadow: 0 4px 0 var(--accent-d);
}
.seg-chip .t { color: var(--muted); font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; }
.seg-chip.active .t { color: rgba(20,10,46,.65); }
.seg-empty { color: var(--muted); font-size: 14px; font-weight: 700; }

.hint { color: var(--muted); font-size: 13px; font-weight: 700; margin-top: 14px; line-height: 1.9; }
kbd {
  display: inline-block; padding: 2px 9px; border-radius: 7px;
  background: var(--panel2); border: 2px solid var(--ink);
  font-family: var(--font-display); font-size: 12px; font-weight: 400; color: #fff;
  box-shadow: 0 2px 0 var(--ink);
}

/* 滚动条 */
.skins-panel::-webkit-scrollbar { width: 10px; }
.skins-panel::-webkit-scrollbar-thumb { background: var(--line); border-radius: 999px; border: 2px solid var(--panel); }

/* 全屏 */
.player-shell:fullscreen { background: #000; display: flex; flex-direction: column; justify-content: center; border-radius: 0; border: none; }
.player-shell:fullscreen .video-stage { max-height: calc(100vh - 140px); }

/* ---------- 响应式（每排数量随屏幕收窄递减） ---------- */
@media (max-width: 1200px) { .grid { grid-template-columns: repeat(7, 1fr); } }
@media (max-width: 1040px) { .grid { grid-template-columns: repeat(6, 1fr); } }
@media (max-width: 880px) {
  .layout { grid-template-columns: 1fr; }
  .skins-panel { position: static; max-height: none; order: 2; }
  .player-area { order: 1; }
  .skin-list { grid-template-columns: repeat(3, 1fr); }
  .page-title { font-size: 36px; }
  .grid { grid-template-columns: repeat(5, 1fr); }
}
@media (max-width: 640px) { .grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 520px) {
  .wrap { padding: 0 14px; }
  .grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .skin-list { grid-template-columns: repeat(2, 1fr); }
  .controls { gap: 7px; }
  .char-head h1 { font-size: 30px; }
}

.empty-state { text-align: center; color: var(--muted); font-weight: 700; padding: 90px 20px; }

/* ============================================================
 * 作者模式 UI（第 2 期）：编辑入口 / 可编辑分段 / 拖拽 / 设封面 / 导出
 * 这些只在本地解锁(?author=1)后出现，读者看不到。
 * ============================================================ */

/* 播放器作者按钮：默认隐藏，作者模式显示 */
.author-only { display: none !important; }
.player-shell.author-on .author-only { display: inline-flex !important; }
.ctrl.cover { background: linear-gradient(180deg, #ff9ec2, var(--pink) 60%); color: var(--ink); box-shadow: 0 4px 0 var(--ink); }
.ctrl.preset { background: linear-gradient(180deg, #b388ff, #8a5cf0 60%); color: #fff; box-shadow: 0 4px 0 var(--ink); }
.ctrl.cover:active, .ctrl.preset:active { box-shadow: 0 0 0 var(--ink); }

/* 拖拽排序：可拖的皮肤瓦片 */
.skin-tile.draggable { cursor: grab; }
.skin-tile.draggable::after {
  content: "⠿"; position: absolute; top: 4px; right: 8px; z-index: 2;
  color: #fff; font-size: 14px; text-shadow: 0 1px 2px #000; opacity: .8;
}
.skin-tile { position: relative; }
.skin-tile.dragging { opacity: .35; }
.skin-tile.drag-over { box-shadow: 0 0 0 3px var(--accent2), 0 4px 0 var(--ink); }
/* 跟随指针的拖动残影 */
.skin-clone {
  position: fixed; z-index: 200; width: 130px; pointer-events: none; opacity: .92;
  box-shadow: 0 10px 22px rgba(0,0,0,.6); transform: rotate(-3deg);
}
/* 空分区占位（作者编辑时三个分区都显示，可作为拖入目标） */
.skin-list.droppable { min-height: 56px; }
.skin-empty {
  grid-column: 1 / -1; display: grid; place-items: center;
  color: var(--muted); font-weight: 700; font-size: 12px;
  padding: 14px 0; border: 2px dashed var(--line); border-radius: 14px;
}

/* 上一个 / 下一个 角色切换箭头 */
.char-nav {
  position: fixed; top: 50%; transform: translateY(-50%); z-index: 50;
  width: 50px; height: 74px; display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 400; font-size: 42px; line-height: 1; color: #fff;
  background: linear-gradient(180deg, var(--panel2), var(--panel));
  border: var(--stroke) solid var(--ink); border-radius: 16px; box-shadow: 0 5px 0 var(--ink);
  cursor: pointer; transition: transform .08s, box-shadow .08s, filter .1s;
}
.char-nav:hover { filter: brightness(1.14); }
.char-nav:active { transform: translateY(-50%) translateY(4px); box-shadow: 0 1px 0 var(--ink); }
.char-nav-prev { left: 12px; }
.char-nav-next { right: 12px; }
@media (max-width: 1000px) { .char-nav { width: 40px; height: 60px; font-size: 32px; } }

/* 进度条「上方」的分段胶囊（骑在视频/面板分界线上，下方小杆连到进度条） */
.seg-track-row {
  display: flex; align-items: flex-end; gap: 12px;
  padding: 0 16px; height: 20px; box-sizing: content-box;
  background: var(--panel);                       /* 与下方面板同色，不再是黑色 */
  border-top: var(--stroke) solid var(--ink);     /* 视频↔面板 的黑线分割（与边缘同色） */
  position: relative; z-index: 4;
}
.seg-spacer { min-width: 80px; flex: none; }   /* 与 .time-text 同宽，让轨道对齐进度条 */
.seg-track { position: relative; flex: 1; height: 20px; }   /* 矮，让胶囊上半溢出到视频上方 */
.seg-marker {
  position: absolute; bottom: 2px; transform: translateX(-18px);   /* 让图标中心对准时间点（与小杆一致） */
  padding: 0; cursor: pointer; background: transparent; border: 0; z-index: 1;
}
.seg-marker:hover, .seg-marker.active, .seg-marker.dragging { z-index: 5; }
.seg-marker.dragging { cursor: grabbing; }
.sm-chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px;   /* 默认只放图标，紧凑成圆 */
  border-radius: 999px; white-space: nowrap;
  background: linear-gradient(180deg, var(--panel2), var(--panel));
  border: 2px solid var(--ink); box-shadow: 0 2px 0 var(--ink);
  transition: transform .1s;
}
.player-shell.author-on .sm-chip { padding: 2px 9px 2px 3px; }   /* 作者模式露出文字 */
.sm-img {   /* 直接用本地图标，无圆圈底，叠在最上层（Hero/3D/Failed 用此原始大小） */
  width: 27px; height: 27px; flex: none; object-fit: contain;
  position: relative; z-index: 2; filter: drop-shadow(0 1px 2px rgba(0,0,0,.55));
}
/* 这 5 个盾牌图标缩小到 0.75×（用 scale，盒子尺寸不变，锚点/小杆对齐保持一致） */
.sm-img[data-type="attack"], .sm-img[data-type="super"], .sm-img[data-type="gadget"],
.sm-img[data-type="starpower"], .sm-img[data-type="hypercharge"] { transform: scale(0.74); }
.sm-name {   /* 常规页面只显示图标更简洁；作者模式才显示文字 */
  display: none;
  font-family: var(--font-display); font-weight: 400; font-size: 11px; color: #fff;
  text-shadow: 0 2px 0 var(--ink);
}
.player-shell.author-on .sm-name { display: inline; }
.sm-stem {   /* 从胶囊底部、图标中心位置垂下的小杆，对准进度条滑块 */
  position: absolute; top: 100%; left: 18px; transform: translateX(-50%);
  width: 3px; height: 10px; background: var(--accent); border-radius: 2px;
}
.seg-marker:hover .sm-chip { transform: translateY(-2px); }
.seg-marker.dragging .sm-chip { transform: scale(1.06); box-shadow: 0 3px 0 var(--ink); }
.seg-marker.active .sm-chip { border-color: var(--accent); }
.seg-marker.active .sm-name { color: var(--accent); }
.seg-del {
  display: none; position: absolute; top: -8px; right: -8px; z-index: 3;
  width: 18px; height: 18px; line-height: 14px; text-align: center; border-radius: 50%;
  background: var(--pink); color: #fff; font-size: 11px; font-weight: 800;
  border: 2px solid var(--ink); box-shadow: 0 1px 0 var(--ink);
}
.player-shell.author-on .seg-del { display: block; }

/* 作者打点图标条 */
.player-shell.author-on .seg-picker { display: flex !important; }   /* 覆盖 .author-only 的 inline-flex */
.seg-picker {
  flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 8px 16px 4px; background: var(--panel);
}
.seg-picker .sp-label {
  font-family: var(--font-display); font-weight: 400; font-size: 14px; color: var(--accent);
  margin-right: 2px; text-shadow: 0 2px 0 var(--ink);
}
.sp-btn {
  display: inline-flex; flex-direction: column; align-items: center; gap: 2px;
  width: 56px; padding: 6px 4px; cursor: pointer;
  font-weight: 800; font-size: 11px; color: #fff;
  background: var(--panel2); border: 2px solid var(--ink); border-radius: 12px; box-shadow: 0 3px 0 var(--ink);
  transition: transform .08s, box-shadow .08s, filter .1s;
}
.sp-btn img { width: 30px; height: 30px; object-fit: contain; pointer-events: none; }
.sp-btn:hover { filter: brightness(1.14); }
.sp-btn:active { transform: translateY(3px); box-shadow: 0 0 0 var(--ink); }

/* 导出弹窗按钮 */
.ab-btn {
  height: 40px; padding: 0 16px; border-radius: 11px; cursor: pointer;
  font-family: var(--font-display); font-weight: 400; font-size: 14px; color: #fff;
  background: var(--panel2); border: var(--stroke) solid var(--ink); box-shadow: 0 4px 0 var(--ink);
  transition: transform .08s, box-shadow .08s, filter .1s;
}
.ab-btn:hover { filter: brightness(1.12); }
.ab-btn:active { transform: translateY(4px); box-shadow: 0 0 0 var(--ink); }
.ab-btn.ab-export { background: linear-gradient(180deg, #ffe277, var(--accent) 60%); color: var(--ink); box-shadow: 0 4px 0 var(--ink); }

/* 导出弹窗 */
.export-mask {
  position: fixed; inset: 0; z-index: 60; display: grid; place-items: center;
  background: rgba(4,12,24,.7); padding: 20px;
}
.export-modal {
  width: min(720px, 100%); max-height: 86vh; overflow: auto;
  background: linear-gradient(180deg, var(--panel2), var(--panel));
  border: var(--stroke) solid var(--ink); border-radius: var(--radius); box-shadow: var(--hard);
  padding: 22px;
}
.export-modal h3 {
  margin: 0 0 10px; font-family: var(--font-display); font-weight: 400; font-size: 22px;
  color: var(--accent); text-shadow: 0 2px 0 var(--ink);
}
.export-tip { margin: 0 0 12px; color: var(--muted); font-weight: 700; line-height: 1.7; font-size: 14px; }
.export-tip code {
  background: var(--bg); border: 2px solid var(--ink); border-radius: 6px;
  padding: 1px 6px; font-family: ui-monospace, Menlo, monospace; font-size: 12px; color: var(--accent2);
}
.export-text {
  width: 100%; height: 300px; border: 2px solid var(--ink); border-radius: 10px;
  background: var(--bg); color: var(--text); padding: 12px;
  font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; line-height: 1.55; resize: vertical;
}
.export-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }

/* 轻提示 */
.author-toast {
  position: fixed; bottom: 22px; left: 50%; z-index: 70;
  transform: translateX(-50%) translateY(20px); opacity: 0;
  background: var(--accent); color: var(--ink); font-family: var(--font-display); font-weight: 400;
  padding: 10px 22px; border-radius: 999px; border: var(--stroke) solid var(--ink);
  box-shadow: 0 4px 0 var(--ink); transition: .25s; pointer-events: none;
}
.author-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 页脚署名（推到页面最底部） ---------- */
.site-footer {
  margin-top: auto;            /* 配合 body 弹性布局，顶到最下方 */
  text-align: center; padding: 40px 16px 28px;
  font-family: "Pudding", var(--font-display); font-weight: 400; letter-spacing: 1.5px;
  color: rgba(255,255,255,.75); text-shadow: 0 2px 0 var(--ink);
}
