﻿* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: #f6f4ed;
  color: #243c33;
  font:
    16px "Segoe UI",
    sans-serif;
}
header {
  height: 76px;
  border-bottom: 1px solid #cfcfc0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6vw;
  background: #fcfaf4;
}
header strong {
  font: 600 25px Georgia;
}
header b {
  display: inline-grid;
  place-items: center;
  background: #ad513b;
  color: white;
  border-radius: 7px;
  width: 38px;
  height: 38px;
  font: 26px serif;
  vertical-align: middle;
  margin-right: 8px;
}
header span {
  font-size: 14px;
}
i {
  margin: 0 7px;
  color: #b4b4a5;
}
main {
  max-width: 1480px;
  margin: auto;
  padding: 40px 6vw;
  display: grid;
  grid-template-columns: minmax(215px, 29%) minmax(0, 1fr);
  gap: 4vw;
}
small,
.listhead {
  font:
    600 11px "Segoe UI",
    sans-serif;
  letter-spacing: 0.15em;
  color: #637469;
}
h1,
h2 {
  font-family: Georgia, serif;
  font-weight: normal;
}
h1 {
  font-size: 38px;
  margin: 7px 0 24px;
}
label {
  font-size: 13px;
  display: block;
  margin-bottom: 7px;
}
select,
button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}
select {
  width: 100%;
  padding: 11px;
  border: 1px solid #babfaf;
  background: #fffdf7;
  border-radius: 8px;
}
.listhead,
.meta,
.foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.listhead {
  margin: 24px 0 8px;
  text-transform: uppercase;
}
.listhead span:last-child {
  letter-spacing: 0;
}
nav button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  border: 0;
  border-bottom: 1px solid #dddfd3;
  border-radius: 0;
  background: none;
  padding: 12px 10px;
  font-size: 14px;
}
nav button[aria-current="true"] {
  background: #dfe8dc;
  border-radius: 7px;
  color: #234a38;
  font-weight: 600;
}
nav em {
  font: 12px monospace;
  color: #737f73;
}
nav button span:last-child {
  margin-left: auto;
}
article {
  align-self: start;
  background: #fffdf7;
  border: 1px solid #d8d9cc;
  border-radius: 14px;
  overflow: clip;
}
#cover {
  height: 235px;
  position: relative;
  background: #d7e2cf;
  background-position: center;
  background-size: cover;
}
canvas {
  width: 100%;
  height: 100%;
}
.covertext {
  position: absolute;
  bottom: 18px;
  left: 0;
  padding: 14px 30px;
  background: linear-gradient(90deg, #f3f2dfed 75%, transparent);
  max-width: 100%;
  padding-right: 55px;
}
.covertext small {
  color: #355648;
}
h2 {
  margin: 6px 0 0;
  font-size: clamp(25px, 3vw, 46px);
}
.reading {
  padding: 22px clamp(18px, 3vw, 45px);
}
button {
  background: #fafbf4;
  border: 1px solid #cad1c4;
  padding: 9px 15px;
  border-radius: 7px;
}
button:hover {
  background: #e5ebdf;
}
button:disabled {
  opacity: 0.5;
  cursor: default;
}
#reset {
  font-size: 13px;
  border: none;
  background: transparent;
}
#lines {
  margin: 8px 0 24px;
}
.row {
  margin: 14px 0 20px;
}
.top {
  display: flex;
  align-items: center;
  gap: 14px;
}
.line {
  flex: 1;
  font:
    clamp(24px, 3.2vw, 44px)/1.55 "Microsoft YaHei",
    sans-serif;
  margin: 0;
  color: #69766b;
}
.row.current .line {
  color: #223f32;
}
.tools {
  display: flex;
  gap: 5px;
  flex-shrink: 0;
}
button.icon {
  width: 34px;
  height: 34px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  font:
    600 12px "Segoe UI",
    sans-serif;
  color: #4d6457;
  border-radius: 50%;
}
button.icon[lang] {
  font:
    15px "Microsoft YaHei",
    sans-serif;
}
button.icon svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}
button.icon[aria-pressed="true"],
button.icon.active {
  background: #31573f;
  border-color: #31573f;
  color: white;
}
.row:not(.current) button.icon:not(:disabled) {
  opacity: 0.7;
}
.row:not(.current) button.icon:not(:disabled):hover,
.row:not(.current) button.icon:not(:disabled):focus-visible {
  opacity: 1;
}
.row button.icon:disabled {
  opacity: 0.35;
}
.py,
.de {
  margin: 4px 0 0;
}
.py {
  color: #99503c;
  font-size: 18px;
}
.de {
  color: #4d5c52;
  font-style: italic;
}
.w {
  cursor: pointer;
  border-radius: 4px;
  transition: background-color 0.12s;
}
.w.hl {
  background: #f1dccb;
  color: #8f3f2a;
}
.metaright {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.rate {
  display: flex;
  align-items: center;
  gap: 3px;
}
.rate span {
  font-size: 12px;
  color: #637469;
  margin-right: 5px;
}
.rate button {
  padding: 4px 9px;
  font-size: 12px;
  border-radius: 14px;
}
.rate button[aria-pressed="true"] {
  background: #31573f;
  border-color: #31573f;
  color: white;
}
.foot {
  border-top: 1px solid #d8dbce;
  padding-top: 18px;
  font-size: 14px;
}
#next {
  background: #31573f;
  color: white;
  padding: 11px 22px;
}
#status {
  font-size: 13px;
  color: #6e6052;
  margin-bottom: 0;
}
@media (max-width: 700px) {
  header {
    height: 60px;
  }
  main {
    display: block;
    padding: 20px 4vw;
  }
  h1 {
    margin-bottom: 10px;
  }
  nav {
    display: flex;
    overflow: auto;
    gap: 5px;
    margin-bottom: 16px;
  }
  nav button {
    width: auto;
    min-width: max-content;
    border: 1px solid #d4d9cb;
    border-radius: 7px;
  }
  #cover {
    height: 170px;
  }
  .listhead {
    margin-top: 12px;
  }
  .meta {
    flex-wrap: wrap;
    gap: 8px;
  }
  .top {
    flex-wrap: wrap;
    gap: 6px;
  }
  .line {
    flex-basis: 100%;
  }
}
@media (min-width: 701px) {
  aside {
    position: sticky;
    top: 16px;
    align-self: start;
    max-height: calc(100vh - 32px);
    overflow: auto;
    scrollbar-width: thin;
  }
}
:focus-visible {
  outline: 3px solid #a65739;
  outline-offset: 2px;
}
/* ---- view switch ---- */
#mode {
  display: flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 26px;
  background: #ebeadd;
  border-radius: 10px;
}
#mode button {
  flex: 1;
  border: 0;
  background: transparent;
  padding: 9px 10px;
  font-size: 14px;
  color: #4d6457;
}
#mode button[aria-pressed="true"] {
  background: #fffdf7;
  color: #234a38;
  font-weight: 600;
  box-shadow: 0 1px 3px #3a4a3a26;
}
#status {
  padding: 0 clamp(18px, 3vw, 45px) 18px;
}
/* ---- song player ---- */
.player {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 18px 0 8px;
  padding: 12px 14px;
  background: #f3f2e6;
  border-radius: 12px;
  position: sticky;
  top: 8px;
  z-index: 2;
}
#playsong {
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: #31573f;
  border-color: #31573f;
  color: white;
  flex-shrink: 0;
}
#playsong svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}
#seek {
  flex: 1;
  min-width: 0;
  accent-color: #ad513b;
}
#clock {
  font: 13px monospace;
  color: #637469;
  white-space: nowrap;
}
#lyrics h3 {
  font: 600 11px "Segoe UI", sans-serif;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #637469;
  margin: 30px 0 4px;
}
#lyrics h3.refrain {
  color: #ad513b;
}
#lyrics .row {
  margin: 4px 0 10px;
  padding: 4px 12px;
  border-radius: 10px;
  transition: background-color 0.3s;
}
#lyrics .row.refrain {
  border-left: 3px solid #e6c3b0;
}
#lyrics .row.current {
  background: #eef2e8;
}
#lyrics .line {
  position: relative;
  padding-top: 14px;
  font-size: clamp(22px, 2.6vw, 36px);
  color: #8a958b;
}
#lyrics .row.current .line,
#lyrics .row.past .line {
  color: #5f6d63;
}
#lyrics .py,
#lyrics .de {
  display: none;
}
#lyrics.show-py .py,
#lyrics.show-de .de {
  display: block;
}
@media (max-width: 700px) {
  #lyrics .top {
    flex-wrap: nowrap;
  }
  #lyrics .line {
    flex-basis: auto;
  }
  .player {
    gap: 10px;
    padding: 10px;
  }
}
/* ---- global volume ---- */
.headright {
  display: flex;
  align-items: center;
  gap: 22px;
}
.volume {
  display: flex;
  align-items: center;
  gap: 6px;
}
#volumeicon {
  border: 0;
  background: transparent;
}
#volume {
  width: 110px;
  height: 4px;
  appearance: none;
  border-radius: 2px;
  background: linear-gradient(90deg, #31573f var(--fill, 100%), #cfd3c6 var(--fill, 100%));
  cursor: pointer;
}
#volume::-webkit-slider-thumb {
  appearance: none;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #31573f;
  border: 2px solid #fcfaf4;
}
#volume::-moz-range-thumb {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #31573f;
  border: 2px solid #fcfaf4;
}
@media (max-width: 700px) {
  .headright > span {
    display: none;
  }
  #volume {
    width: 80px;
  }
}

footer.legal {
  max-width: 1480px;
  margin: auto;
  padding: 8px 6vw 40px;
  font-size: 13px;
  color: #6b7a72;
}
footer.legal a {
  color: inherit;
}
