:root{
  --paper:#f5f3ee;
  --card:#fffefb;
  --line:#e7e3d9;
  --line2:#f1ede5;
  --ink:#191815;
  --ink2:#3f3c36;
  --muted:#8d877c;
  --accent:#0e5c55;
  --accent-soft:#e9f2f0;
  --heart:#d0554f;
  --serif:'Iowan Old Style',Palatino,'Palatino Linotype',Georgia,'Times New Roman',serif;
  --sans:-apple-system,BlinkMacSystemFont,'Segoe UI','PingFang SC','Hiragino Sans GB','Microsoft YaHei',sans-serif;
  --safe:env(safe-area-inset-bottom,0px);
}

*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{height:100%}
body{
  margin:0;background:#e9e6df;color:var(--ink);
  font-family:var(--sans);
  -webkit-text-size-adjust:100%;
}

.app{
  height:100%;max-width:480px;margin:0 auto;
  background:var(--paper);display:flex;flex-direction:column;
  overflow:hidden;position:relative;
}

/* 顶栏 */
.top{
  flex:none;display:flex;align-items:center;gap:11px;
  padding:14px 20px 12px;border-bottom:1px solid var(--line);
  padding-top:calc(14px + env(safe-area-inset-top,0px));
}
.mark{
  width:38px;height:38px;flex:none;border-radius:11px;background:var(--accent);color:#fff;
  display:flex;align-items:center;justify-content:center;
  font-size:13px;font-weight:700;letter-spacing:.02em;
}
.brand{min-width:0}
.brand h1{margin:0;font-size:19px;font-weight:700;letter-spacing:.03em;white-space:nowrap}
.brand p{margin:3px 0 0;font-size:11.5px;color:var(--muted);letter-spacing:.05em}

/* 选集胶囊 */
.pills{flex:none;display:flex;gap:7px;padding:12px 16px 0}
.pill{
  flex:1;height:38px;border-radius:999px;border:1px solid var(--line);background:#fbfaf6;
  cursor:pointer;font-family:inherit;font-size:12.5px;font-weight:600;color:var(--muted);
  font-variant-numeric:tabular-nums;
}
.pill.is-on{background:var(--accent);border-color:var(--accent);color:#fff}
.pill:active{opacity:.85}

/* 筛选 */
.filter{flex:none;display:flex;gap:8px;padding:10px 16px 10px}
.seg{
  flex:1;height:40px;border-radius:11px;border:1px solid var(--line);background:#fbfaf6;
  display:flex;align-items:center;justify-content:center;gap:6px;
  font-family:inherit;font-size:13px;font-weight:600;color:var(--muted);cursor:pointer;
}
.seg .n{font-variant-numeric:tabular-nums}
.seg svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.9;
  stroke-linecap:round;stroke-linejoin:round}
.seg.is-on{background:var(--accent);border-color:var(--accent);color:#fff}
.seg.is-on svg{fill:currentColor}
.seg:active{opacity:.85}

/* 课表 */
.list{flex:1;min-height:0;overflow-y:auto;-webkit-overflow-scrolling:touch}
.rows{margin:0;padding:0;list-style:none}
.row{
  position:relative;display:flex;align-items:stretch;
  border-bottom:1px solid var(--line2);background:var(--paper);
}
.hit{
  flex:1;min-width:0;display:flex;align-items:center;gap:10px;height:64px;
  padding:0 4px 0 16px;background:none;border:0;font-family:inherit;
  text-align:left;cursor:pointer;color:inherit;
}
.no{
  width:34px;height:34px;flex:none;border-radius:50%;
  border:1.5px solid #d8d2c6;background:#fbfaf6;
  display:flex;align-items:center;justify-content:center;
  font-size:21px;font-weight:600;line-height:1;color:var(--muted);
  font-variant-numeric:tabular-nums;letter-spacing:-.02em;
}
.tt{flex:1;min-width:0;display:flex;align-items:baseline;gap:7px}
.title{
  flex:0 1 auto;min-width:0;
  font-family:var(--serif);font-size:17px;line-height:1.15;color:var(--ink);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;letter-spacing:.01em;
}
.meta{flex:none;font-size:12.5px;color:var(--muted);font-variant-numeric:tabular-nums}
.fav{
  width:52px;flex:none;background:none;border:0;cursor:pointer;
  display:flex;align-items:center;justify-content:center;
}
.fav svg{width:21px;height:21px;fill:none;stroke:#bdb8ae;stroke-width:1.8;
  stroke-linecap:round;stroke-linejoin:round}
.fav[aria-pressed="true"] svg{fill:var(--heart);stroke:var(--heart)}

.row.is-on{background:var(--accent-soft)}
.row.is-on::before{content:"";position:absolute;left:0;top:0;bottom:0;width:3px;background:var(--accent)}
.row.is-on .no{color:var(--accent);border-color:var(--accent);background:#fff}
.row.is-on .title{font-weight:600;color:#0b4d47}
.row.is-on .meta{color:#5d8b86}
.bar{
  position:absolute;left:0;right:0;bottom:0;height:2px;background:#d5e6e3;display:none;
}
.row.is-on .bar{display:block}
.row.has-progress .bar{display:block}
.bar i{display:block;height:100%;width:0;background:var(--accent)}

/* 分段标题 */
.secthead{
  position:relative;display:flex;align-items:center;gap:8px;
  height:30px;padding:0 20px;background:#f1eee7;
  font-size:11px;font-weight:600;letter-spacing:.08em;color:var(--muted);
}
.secthead span{font-variant-numeric:tabular-nums}
.secthead::after{content:"";flex:1;height:1px;background:var(--line)}

/* 继续收听 */
.resume{position:relative;border-bottom:1px solid var(--line2);background:var(--accent-soft)}
.resume .hit{height:60px;padding-left:16px;padding-right:16px;gap:12px}
.resume .tt{flex-direction:column;align-items:flex-start;gap:3px}
.r-icon{
  width:30px;height:30px;flex:none;border-radius:50%;background:var(--accent);
  display:flex;align-items:center;justify-content:center;
}
.r-icon svg{width:14px;height:14px;fill:#fff;margin-left:1px}
.r-lbl{font-size:11px;font-weight:600;letter-spacing:.06em;color:var(--accent)}
.resume .title{font-size:16px;font-weight:600;color:#0b4d47}
.resume .meta{color:#5d8b86;text-align:right;flex:none}

.empty{
  margin:0;padding:34px 30px;text-align:center;color:var(--muted);
  font-size:13px;line-height:1.9;
}
.empty b{color:var(--ink2);font-weight:600}

/* 空态与播放器 */
.idle{
  flex:none;padding:18px 22px calc(26px + var(--safe));
  text-align:center;color:var(--muted);font-size:12.5px;letter-spacing:.04em;
  border-top:1px solid var(--line);background:var(--card);
}

.player{
  flex:none;background:var(--card);border-top:1px solid var(--line);
  box-shadow:0 -8px 22px rgba(25,24,21,.07);
  padding:14px 20px calc(22px + var(--safe));
}
.now{display:flex;align-items:center;gap:10px}
.now .lbl{flex:none;font-size:11px;font-weight:600;letter-spacing:.14em;color:var(--accent)}
.now .nm{
  flex:1;min-width:0;font-family:var(--serif);font-size:16px;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.player .fav{width:44px;margin-right:-10px}
.player .fav svg{width:23px;height:23px}

.seek{
  -webkit-appearance:none;appearance:none;display:block;
  width:100%;height:28px;margin:6px 0 0;padding:0;background:transparent;cursor:pointer;
}
.seek:disabled{cursor:default}
.seek::-webkit-slider-runnable-track{height:6px;border-radius:3px;background:#e3ded4}
.seek::-moz-range-track{height:6px;border-radius:3px;background:#e3ded4}
.seek::-webkit-slider-thumb{
  -webkit-appearance:none;appearance:none;width:20px;height:20px;margin-top:-7px;
  border-radius:50%;background:#fff;border:3px solid var(--accent);
  box-shadow:0 1px 4px rgba(0,0,0,.2);
}
.seek::-moz-range-thumb{
  width:14px;height:14px;border-radius:50%;background:#fff;border:3px solid var(--accent);
  box-shadow:0 1px 4px rgba(0,0,0,.2);
}
.seek:disabled::-webkit-slider-thumb{border-color:#c9c4ba}
.seek:disabled::-moz-range-thumb{border-color:#c9c4ba}
.seek:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:8px}

.times{display:flex;justify-content:space-between;margin-top:0;
  font-size:12px;color:var(--muted);font-variant-numeric:tabular-nums}

.controls{display:flex;align-items:center;justify-content:center;gap:8px;margin-top:10px}
.nav{
  width:48px;height:48px;flex:none;border-radius:50%;border:0;background:none;
  cursor:pointer;display:flex;align-items:center;justify-content:center;
}
.nav svg{width:23px;height:23px;fill:none;stroke:var(--ink2);stroke-width:1.8;
  stroke-linecap:round;stroke-linejoin:round}
.nav:active{background:#f1ede5}
.skip{
  width:58px;height:58px;flex:none;border-radius:50%;border:1.5px solid var(--line);
  background:#fbfaf6;cursor:pointer;font-family:inherit;
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;
}
.skip svg{width:22px;height:22px;fill:none;stroke:var(--ink2);stroke-width:1.8;
  stroke-linecap:round;stroke-linejoin:round}
.skip span{font-size:10px;font-weight:700;color:var(--ink2)}
.skip:active{background:#f1ede5}
.play{
  width:76px;height:76px;flex:none;border-radius:50%;border:0;background:var(--accent);
  cursor:pointer;display:flex;align-items:center;justify-content:center;
  box-shadow:0 7px 18px rgba(14,92,85,.3);
}
.play svg{width:30px;height:30px;fill:#fff}
.play:active{transform:scale(.97)}

.modes{display:flex;gap:8px;margin-top:16px}
.mode{
  flex:1;height:44px;border-radius:12px;border:1px solid var(--line);background:#fbfaf6;
  cursor:pointer;font-family:inherit;font-size:13px;font-weight:600;color:var(--muted);
}
.mode.is-on{background:var(--accent-soft);border-color:#9dc6c1;color:var(--accent)}
.mode:active{opacity:.85}

.msg{margin:12px 0 0;text-align:center;font-size:12.5px;color:var(--heart)}
.msg.info{color:var(--accent)}

button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}

@media (min-width:481px){
  .app{height:min(900px,100%);margin:18px auto;border-radius:22px;
    box-shadow:0 18px 50px rgba(0,0,0,.16)}
}
