/* ============================================================
   站点壳（侧栏 + 页脚）—— 全站唯一一份
   - 静态页：由 static/style.css 顶部 @import 引入
   - 训练器（独立构建产物）：直接 <link href="/static/shared/shell.css">，
     因为它不能引用整份 style.css（`.chip` / `.card` 等类名会和应用内部样式互相污染）
   因此本文件自带壳需要的 css 变量，不依赖 style.css。

   类名一律 shell- 前缀：页面里可能有自己的 .side / .main
   （如扒和弦结果视图的前后和弦 span），通用类名会互相污染。
   ============================================================ */

:root {
  --side-w: 208px;            /* 桌面侧栏宽度；小屏置 0，供固定定位元素（播放条）对齐 */
  --gutter: 28px;             /* 内容区左右留白；固定定位元素也用它对齐 */
  --line: rgba(0, 0, 0, 0.07);
  --text: #1a1a1a;
  --text2: #5c5c5c;
  --text3: #999;
}

/* ---------- 骨架：桌面左侧固定导航，小屏退回顶部一行 ---------- */
.shell { display: flex; align-items: flex-start; flex: 1; width: 100%; }

.shell-side {
  flex: none; width: var(--side-w); height: 100vh; position: sticky; top: 0;
  display: flex; flex-direction: column; gap: 16px;
  padding: 26px 20px; border-right: 1px solid var(--line);
}
.shell-brand { font-size: 15px; font-weight: 700; letter-spacing: -0.01em; }
.shell-tagline { font-size: 12.5px; color: var(--text3); line-height: 1.7; margin-top: -8px; }
.shell-nav { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; }
.shell-nav a {
  padding: 8px 10px; border-radius: 8px; text-decoration: none;
  font-size: 14px; font-weight: 600; color: var(--text2); transition: .12s;
}
.shell-nav a:hover { background: rgba(0, 0, 0, 0.035); color: var(--text); }
.shell-nav a.active { background: var(--text); color: #fff; }
.shell-foot { margin-top: auto; font-size: 11.5px; color: var(--text3); line-height: 1.7; }
.shell-foot a { color: var(--text2); text-decoration: none; border-bottom: 1px solid var(--line); }
.shell-foot a:hover { color: var(--text); }

/* ---------- 反馈：按钮 + 点击后的小弹窗（微信号由 shell.js 解码后插入） ---------- */
.shell-fb {
  display: inline-block; padding: 0; border: none; background: none; cursor: pointer;
  font-family: inherit; font-size: 11.5px; color: var(--text2); text-align: left;
  border-bottom: 1px solid var(--line); border-radius: 0; transition: .12s;
}
.shell-fb:hover { color: var(--text); }
.shell-fb-card {
  margin-bottom: 8px; padding: 9px 11px;
  border: 1px solid var(--line); border-radius: 10px; background: #fff;
}
.shell-fb-msg { font-size: 11.5px; color: var(--text2); line-height: 1.6; }
.shell-fb-line { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.shell-fb-v { flex: 1; min-width: 0; font-size: 12.5px; color: var(--text); word-break: break-all; }
.shell-fb-copy {
  flex: none; padding: 1px 8px; cursor: pointer;
  border: 1px solid var(--line); border-radius: 999px; background: #fff;
  font-family: inherit; font-size: 11px; color: var(--text2); transition: .12s;
}
.shell-fb-copy:hover { color: #1d4ed8; border-color: #1d4ed8; }

.shell-main { flex: 1; min-width: 0; padding: 32px var(--gutter) 0; display: flex; flex-direction: column; }
/* 训练器是挂载到 #root 的独立应用：让内容列撑满，页脚贴底 */
#root { flex: 1; }

/* ---------- 页脚（一行签名 + 窄屏兜底的反馈行） ---------- */
.foot {
  max-width: 720px; width: 100%; margin-top: auto;
  padding: 26px 0 40px; border-top: 1px solid var(--line);
}
.foot p { font-size: 12.5px; color: var(--text3); line-height: 1.7; }
/* 反馈行在桌面靠侧栏底部承载，页脚这份只在窄屏出现，避免同屏出现两遍 */
.foot-fb { display: none; }

/* ---------- 小屏：侧栏折成顶部一行 ---------- */
@media (max-width: 900px) {
  :root { --side-w: 0px; --gutter: 20px; }
  .shell { display: block; }
  .shell-side {
    position: static; width: auto; height: auto; border-right: none;
    flex-direction: row; align-items: center; flex-wrap: wrap; gap: 12px;
    padding: 16px 20px 12px;
  }
  .shell-tagline, .shell-foot { display: none; }
  .foot-fb { display: block; margin-top: 6px; }
  .shell-nav { flex-direction: row; gap: 14px; margin: 0 0 0 auto; }
  .shell-nav a { padding: 0 0 2px; border-radius: 0; font-size: 13.5px; font-weight: 400; }
  .shell-nav a:hover { background: none; }
  .shell-nav a.active { background: none; color: var(--text); border-bottom: 1px solid var(--text); }
  .shell-main { padding: 12px 20px 0; }
}
