/* 入口页和等待页。简洁版：白底黑字，灰色做辅助，红色只在出错时出现。样稿见任务 10-27-link-entry 的 research/mockups/d_simple.png。
   等待页中间是封面落下成堆的动效区，步骤压成一根进度条加百分比（任务 10-30-wait-cover-drop）。 */
:root { --fg: #141414; --mute: #8A8A8A; --line: #E6E6E6; --edge: #CFCFCF; --faint: #A3A3A3; --red: #D93025; --red-bg: #FDF2F1; }

* { margin: 0; padding: 0; box-sizing: border-box; }
html { background: #fff; -webkit-text-size-adjust: 100%; }
body { background: #fff; color: var(--fg); font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased; }
.d { max-width: 480px; margin: 0 auto; padding: 30px 22px 48px; min-height: 100vh; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }

.mark { font-size: 13px; color: var(--mute); }
.btn { display: grid; place-items: center; width: 100%; height: 50px; border: 0; border-radius: 10px; background: var(--fg); color: #fff;
  font: inherit; font-size: 16px; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn:disabled { opacity: .6; cursor: default; }
.offline { margin-top: 14px; padding: 10px 12px; border-radius: 8px; background: #F4F4F4; font-size: 13px; line-height: 1.6; }

/* 入口 */
h1 { font-size: 30px; line-height: 1.35; font-weight: 600; margin: 56px 0 30px; }
/* 第一页右上角的唱片和唱臂（2026-11-05 加黑胶，2026-11-06 改成深灰唱片配橙标、左边加唱臂）。--s 是唱片直径 min(190px, 半屏)，
   SVG 按它等比缩放（viewBox 226×192，唱片直径 190，圆心在 (130, 96)）。唱片右边三分之一伸出去、被 .vinyl 裁掉，位置和原来的黑胶一样；
   唱臂在唱片左边，320 宽也碰不到标题（窄屏唱臂摆进来的角度小一点）。宽屏上内容栏右边空得下，整张露出来，只淡入不滑入
   （640 留了桌面滚动条的宽度，不出横向滚动）。打开时从右边滑进来，唱片 4 秒一圈，唱臂从左边摆到唱片上再轻轻晃；
   减弱动效时都不动（见文件末尾） */
.d { position: relative; }
.vinyl { --s: min(190px, 50vw); position: absolute; top: calc(8px - var(--s) / 190); right: 0; width: calc(var(--s) * 161.67 / 190);
  height: calc(var(--s) * 192 / 190); overflow: hidden; pointer-events: none; }
.vinyl .vin { width: calc(var(--s) * 226 / 190); height: 100%; animation: vin 1s cubic-bezier(.2, .8, .2, 1) both; }
.vinyl svg { display: block; width: 100%; height: 100%; overflow: visible; }
.vinyl .vdisc, .vinyl .varm, .vinyl .vwob { transform-box: view-box; transform-origin: 0 0; } /* 绕各自局部原点：唱片圆心、唱臂支点 */
.vinyl .vdisc { animation: spin 4s linear infinite; }
.vinyl .varm { animation: varm 1.6s cubic-bezier(.45, 0, .2, 1) .5s both; }
.vinyl .vwob { animation: vwob 2.4s ease-in-out 2.1s infinite; }
@keyframes vin { from { transform: translateX(70px); opacity: 0; } }
@keyframes vfade { from { opacity: 0; } }
@keyframes varm { from { transform: rotate(8deg); } }
@keyframes varm-sm { from { transform: rotate(4deg); } }
@keyframes vwob { 50% { transform: rotate(-.4deg); } }
@media (max-width: 359px) { .vinyl .varm { animation-name: varm-sm; } }
@media (min-width: 640px) { .vinyl { --s: 190px; overflow: visible; } .vinyl .vin { animation-name: vfade; } }
label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; }
textarea { display: block; width: 100%; height: 76px; resize: none; border: 1px solid var(--edge); border-radius: 10px; padding: 11px 13px;
  font: inherit; font-size: 16px; line-height: 1.5; color: var(--fg); background: #fff; }
textarea::placeholder { color: var(--faint); }
textarea:focus { outline: none; border-color: var(--fg); box-shadow: 0 0 0 1px var(--fg); }
textarea[aria-invalid="true"] { border-color: var(--red); }
textarea[aria-invalid="true"]:focus { box-shadow: 0 0 0 1px var(--red); }
.help { font-size: 13px; line-height: 1.6; color: var(--mute); margin-top: 9px; }
.err { font-size: 13px; line-height: 1.6; color: var(--red); margin-top: 6px; }
.entry .btn { margin-top: 22px; }
input.code { display: block; width: 100%; height: 50px; border: 1px solid var(--edge); border-radius: 10px; padding: 0 13px; background: #fff;
  color: var(--fg); font: 600 18px Menlo, monospace; letter-spacing: .14em; text-transform: uppercase; }
input.code::placeholder { color: var(--faint); font-weight: 400; }
input.code:focus { outline: none; border-color: var(--fg); box-shadow: 0 0 0 1px var(--fg); }
input.code[aria-invalid="true"] { border-color: var(--red); }
input.code[aria-invalid="true"]:focus { box-shadow: 0 0 0 1px var(--red); }
.codebar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 18px; padding: 10px 12px;
  border-radius: 10px; background: #F4F4F4; font-size: 13px; color: var(--mute); }
.codebar b { margin-left: 6px; font: 600 14px Menlo, monospace; letter-spacing: .08em; color: var(--fg); }
.codebar .change { border: 0; background: none; padding: 4px 0; font: inherit; color: var(--fg); text-decoration: underline; cursor: pointer; }
.h1s { font-size: 26px; margin: 28px 0 14px; }
.note { font-size: 13px; line-height: 1.7; color: var(--mute); margin-top: 16px; }
.link-guide { margin-bottom: 18px; padding: 10px 13px 11px; border-radius: 10px; background: #F4F4F4;
  font-size: 14px; line-height: 1.55; }
.link-guide h2 { margin-bottom: 4px; font-size: inherit; font-weight: 600; }
.link-guide ol { padding-left: 19px; }
.link-guide li + li { margin-top: 2px; }
.link-tips { margin-top: 9px; color: #666560; font-size: 13px; line-height: 1.6; }
.link-tips summary { padding: 5px 0; color: var(--fg); font-weight: 600; cursor: pointer; }
.link-tips p { margin: 0 0 6px 16px; }
.link-guide strong { color: var(--fg); font-weight: 600; }
@media (max-width: 360px) { .link-entry textarea { height: 96px; } }
/* 免费领码：第一页表单下面；第二页刚领到的码的提醒 */
.free { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); }
.free .ask { font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.free .freeline { font-size: 13px; line-height: 1.7; color: var(--mute); }
.free .last { color: var(--fg); text-decoration: underline; }
/* 店铺入口：第一页最下面，一直显示（2026-11-05 起） */
.shop { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); }
.shop .ask { font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.shop .why { font-size: 13px; line-height: 1.7; color: var(--mute); margin-bottom: 4px; }
.shop .fast { font-size: 13px; line-height: 1.7; margin-bottom: 14px; }  /* 付费优先那行：黑字，"优速通"加粗 */
.shop .fast b { font-weight: 600; }
/* 点领码被拒后店铺区闪一下（entry.js 的 freeDenied，1.5 秒，2026-11-08）：浅黄底往外扩一圈，慢慢褪掉 */
.shop.flash { animation: flash 1.5s ease-out; }
@keyframes flash { 0%, 35% { background: #FFF1D6; box-shadow: 0 0 0 10px #FFF1D6; }
  100% { background: rgba(255, 241, 214, 0); box-shadow: 0 0 0 10px rgba(255, 241, 214, 0); } }
.btn.outline { background: #fff; color: var(--fg); border: 1px solid var(--edge); }
.fresh { margin-top: 10px; font-size: 13px; line-height: 1.7; color: var(--fg); }

/* 等待：品牌 / 标题区 .jhead / 动效区 .pile / 正文区 .jbody（任务 10-30-wait-cover-drop）。
   标题区固定高度：生成完不写标题，堆也不跳 */
.jhead { height: 76px; padding-top: 40px; }
.head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.head h2 { font-size: 26px; font-weight: 600; line-height: 36px; }
.head .t { font-size: 14px; color: var(--mute); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* 动效区：封面落下成堆（pile.js 管位置，这里管样子）。overflow 藏住从上沿外面落进来的卡，也不撑出横向滚动 */
.pile { position: relative; height: 220px; overflow: hidden; pointer-events: none; user-select: none; -webkit-user-select: none; }
.pile .cv, .pile .fc { position: absolute; left: 50%; top: 0; border: 2px solid #fff; border-radius: 3px; overflow: hidden; }
.pile .cv { width: 84px; height: 84px; margin: -42px 0 0 -42px; background: #D3D1C7; box-shadow: 0 1px 4px rgba(0, 0, 0, .16);
  transition: transform .6s cubic-bezier(.3, 1.4, .5, 1), opacity .4s; }
.pile .fc { z-index: 2; width: 109px; height: 109px; margin: -54.5px 0 0 -54.5px; background: #2C2C2A; color: #F1EFE8;
  box-shadow: 0 3px 12px rgba(0, 0, 0, .24); transition: transform .7s cubic-bezier(.3, 1.4, .5, 1), opacity .4s; }
.pile img { position: absolute; top: 0; left: 0; display: block; width: 100%; height: 100%; object-fit: cover; transition: opacity .4s; }
/* 人物卡没有图（配图还在做、纯排版人物）时是深色字卡"你像 / 名字"；图来了盖在上面 */
.pile .ft { position: absolute; left: 9px; right: 9px; bottom: 8px; }
.pile .fk { font-size: 11px; opacity: .65; }
.pile .fn { font-size: 15px; font-weight: 600; line-height: 1.3; margin-top: 1px; word-break: break-word; }
.pile.still .cv, .pile.still .fc, .pile.still img { transition: none; }

/* 堆下的说明。.sm 是歌单规模下面的地区和意象，排队时也用它写付费码优先的那行小字 */
.cap { text-align: center; margin-top: 2px; }
.cap .big { font-size: 15px; font-weight: 600; line-height: 1.6; font-variant-numeric: tabular-nums; }
.cap .sm { font-size: 12.5px; line-height: 1.6; color: var(--mute); margin-top: 3px; }
.cap .sm span { display: inline-block; }
.cap .sm .dot { margin: 0 6px; }
.queue { font-size: 14px; line-height: 1.7; color: var(--mute); }
/* 排队时的"取消排队"：灰色小字链接的样子，不做成按钮，免得误点（2026-11-05） */
.cap .cancelrow { margin-top: 10px; font-size: 13px; line-height: 1.6; }
.cap .cancel { font: inherit; color: var(--mute); background: none; border: 0; padding: 4px 2px; text-decoration: underline;
  text-underline-offset: 3px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.cap .cancel[disabled] { opacity: .5; cursor: default; }
.cap .cancelmsg { font-size: 13px; line-height: 1.6; color: var(--red); margin-top: 6px; }
/* 排队页免费单的买点栏（任务 11-08-queue-upsell，版式 A）：紧跟排队那句的细边框一块，标题右边小黑钮"去买码"；
   块下面"已经买好了？输入兑换码 ›"，点了换成输入框 + 描边"插队"。占位字是中文：不用兑换码的等宽粗体和字距。
   "取消排队"挪到正文区最下面（.cap.foot） */
.jupsell { margin-top: 16px; }
.ubox { padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.utop { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.ubox .uh { font-size: 14.5px; font-weight: 600; line-height: 1.5; }
.ugo { flex: none; display: grid; place-items: center; height: 30px; padding: 0 14px; border-radius: 15px; background: var(--fg); color: #fff;
  font-size: 13.5px; font-weight: 600; text-decoration: none; }
.ubox .ud { font-size: 12.5px; line-height: 1.6; color: var(--mute); margin-top: 4px; }
.uhave { margin-top: 10px; text-align: center; font-size: 13px; line-height: 1.6; color: var(--mute); }
.uhave button { font: inherit; color: var(--fg); background: none; border: 0; padding: 4px 2px; text-decoration: underline; cursor: pointer; }
.jupsell .urow { display: flex; gap: 8px; margin-top: 10px; }
.jupsell .urow[hidden] { display: none; }
.jupsell input.code { flex: 1; min-width: 0; height: 44px; }
.jupsell input.code::placeholder { font: 400 15px "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; letter-spacing: 0; }
.jupsell .urow .btn { flex: none; width: auto; height: 44px; padding: 0 18px; font-size: 15px; }
.ubox .unote { font-size: 14px; line-height: 1.7; text-align: center; }
.cap.foot { margin-top: 14px; }
.who .k { font-size: 12.5px; color: var(--mute); }
.who .nm { font-size: 20px; font-weight: 600; line-height: 1.4; margin-top: 1px; }
.who .en { font-size: 13px; color: var(--mute); }
.who .wk { font-size: 12.5px; color: var(--mute); margin-top: 4px; }
.wait { font-size: 13px; line-height: 1.6; color: var(--mute); margin-top: 10px; }

/* 进度条 + 假百分比：每 0.25 秒推一次，宽度跟着过渡；出错时停住变红 */
.prow { display: flex; align-items: center; gap: 12px; margin-top: 24px; }
.pbar { flex: 1; height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; }
.pbar i { display: block; height: 100%; border-radius: 2px; background: var(--fg); transition: width .25s linear; }
.pnum { flex: none; min-width: 3em; text-align: right; font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
.prow.bad .pbar i { background: var(--red); }
.prow.bad .pnum { color: var(--red); }
.pstep { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 8px; }
.pstep .now { font-size: 13.5px; line-height: 1.6; }
.pstep .now.bad { color: var(--red); }
/* "全部步骤"：在跑时在当前步右边，生成完挪到主按钮下面 */
.more { flex: none; display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 6px 0; font: inherit;
  font-size: 13px; color: var(--mute); cursor: pointer; }
.more::after { content: ""; width: 5px; height: 5px; margin-top: -3px; border: solid currentColor; border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg); }
.more[aria-expanded="true"]::after { margin-top: 3px; transform: rotate(-135deg); }
.morerow { text-align: center; margin-top: 8px; }
.jbody .steps { margin-top: 10px; }

.steps { list-style: none; border-top: 1px solid var(--line); }
.st { display: grid; grid-template-columns: 30px 1fr auto; column-gap: 8px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.st .ic { width: 20px; height: 20px; margin-top: 1px; border-radius: 50%; border: 1.5px solid var(--edge); display: grid; place-items: center;
  color: #fff; font-size: 12px; font-weight: 700; line-height: 1; }
.st .nm { font-size: 15.5px; }
.st .tm { grid-column: 3; grid-row: 1; padding-top: 2px; font-size: 13px; color: var(--mute); font-variant-numeric: tabular-nums; white-space: nowrap; }
.st .sub { grid-column: 2; margin-top: 3px; font-size: 13px; line-height: 1.6; color: var(--mute); }
.st .sub span { display: block; }
.st.done .ic { background: var(--fg); border-color: var(--fg); }
.st.running .ic { border-color: #E2E2E2; border-top-color: var(--fg); animation: spin 1s linear infinite; }
.st.pending .nm { color: var(--faint); }
.st.failed .ic { background: var(--red); border-color: var(--red); }
.st.failed .sub { color: var(--red); }
@keyframes spin { to { transform: rotate(360deg); } }
/* 生成完：步骤下面的"查看完整结果 ›"。.btn 是 grid，文字和 › 会分两行，这里改成横排 */
.btn.go-result { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 22px; }
.go-result .ch { font-weight: 400; opacity: .6; }

.addr { font-size: 13px; line-height: 1.7; color: var(--mute); margin-top: 18px; }
.addr code { display: block; font: 12.5px Menlo, monospace; color: var(--fg); word-break: break-all; }
.errbox { margin-top: 20px; padding: 14px 14px 16px; border-radius: 10px; background: var(--red-bg); }
.errbox p { font-size: 14px; line-height: 1.7; }
.errbox .why { font-size: 13px; color: #6B6B6B; margin: 2px 0 14px; word-break: break-all; }
.errbox .codeok { font-size: 13px; color: #6B6B6B; margin: -6px 0 14px; }
.errbox .codeok a { color: var(--fg); }
.errbox .retrymsg { font-size: 13px; color: var(--red); margin-top: 8px; }
.errbox .retrymsg:empty { display: none; }
/* 隐私歌单改公开的步骤（entry.js 的 privateBox，任务 11-04-private-playlist-guide）：第二页在输入框下的 .err 里，
   等待页在出错框的 .why 里（这时是 div.why；原因一句话时是 p.why，break-all 是给很长的日志行的，步骤里不拆英文词）。
   字号、颜色、行距跟着外面那一层；编号缩在字里，不伸到页边外 */
.err ol, .errbox .why ol { margin: 2px 0; padding-left: 1.4em; }
.err li + li, .errbox .why li + li { margin-top: 4px; }
.errbox div.why { line-height: 1.7; word-break: normal; }
.errbox .why p { font-size: inherit; }
.lost p { font-size: 15px; line-height: 1.8; margin: 56px 0 18px; }
.lost a { color: var(--fg); font-size: 15px; }
.lost.maint p { margin-top: 0; color: var(--mute); }  /* 站主施工中：标题下面那句 */

.enter { animation: fade .2s ease-out; }
@keyframes fade { from { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .st.running .ic { animation: none; }
  .pbar i { transition: none; }
  .enter { animation: none; }
  .pile .cv, .pile .fc, .pile img { transition: none; }
  .vinyl .vin, .vinyl .vdisc, .vinyl .varm, .vinyl .vwob { animation: none; }
}
