* { box-sizing: border-box; }
:root { font: 100%/1.6 system-ui, "Microsoft JhengHei", sans-serif; color: #17302a; background: #f5f8f5; }
body { margin: 0; }
button, input, select { font: inherit; }
a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid #23644e; outline-offset: 4px; }
.shell { min-height: 100vh; display: grid; grid-template-columns: 17rem minmax(0, 1fr); }
.sidebar { background: #e9f0e9; border-right: 1px solid #cfdbd1; padding: 2rem 1.375rem; display: flex; flex-direction: column; gap: 2rem; }
.brand { width: fit-content; text-decoration: none; font-size: 1.7rem; font-weight: 750; letter-spacing: -.045em; padding-inline: .5rem; }
.brand span { color: #34624f; }
nav { display: grid; gap: .25rem; }
nav a { text-decoration: none; padding: .625rem .75rem; border-radius: .6rem; }
nav a:hover, nav a[aria-current] { background: #d7e6d9; }
nav a[aria-current] { font-weight: 650; }
.language { margin-top: auto; padding-inline: .5rem; }
.language label { display: block; font-size: .875rem; margin-bottom: .375rem; }
select { width: 100%; max-width: 11rem; border: 1px solid #a6b9ac; border-radius: .5rem; background: #fff; color: inherit; padding: .45rem .6rem; }
main { width: min(100%, 76rem); padding: clamp(1.375rem, 5vw, 4.5rem); }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(1.85rem, 3.6vw, 3rem); line-height: 1.25; margin: .6rem 0 1.6rem; letter-spacing: -.025em; }
h2 { font-size: 1.2rem; }
.preview { color: #395749; font-size: .875rem; }
.feature, .panel { border: 1px solid #c9d7cd; border-radius: 1rem; padding: clamp(1.125rem, 3.5vw, 2rem); }
.feature { background: #e3f1e7; margin-bottom: 1.4rem; }
.feature h2 { font-size: 1.45rem; }
.feature p, .panel p { margin-block: .5rem; color: #40574d; }
.panel { background: #fff; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: .85rem; }
.button { display: inline-block; text-decoration: none; color: #fff; background: #235843; border-radius: .5rem; padding: .5rem .8rem; margin-top: .8rem; }
progress { display: block; margin-block: .75rem; width: 100%; max-width: 32rem; height: 1rem; accent-color: #28654c; }
details { margin-top: .6rem; border: 1px solid #d0ded2; background: #fff; border-radius: .65rem; padding: .7rem .85rem; }
summary { cursor: pointer; }
.chapters { display: grid; grid-template-columns: repeat(auto-fill, minmax(3.25rem, 1fr)); gap: .375rem; margin-top: .8rem; }
.chapters label { display: flex; align-items: center; justify-content: center; gap: .25rem; min-height: 2.75rem; border-radius: .4rem; background: #eff5ee; cursor: pointer; }
.chapters input { margin: 0; accent-color: #28654c; }
@media (max-width: 47rem) {
  .shell { display: block; }
  .sidebar { padding: 1rem; gap: .65rem; border-right: 0; border-bottom: 1px solid #cfdbd1; }
  nav { display: flex; flex-wrap: wrap; }
  nav a { padding: .375rem .55rem; font-size: .9rem; }
}

.date-fields { display: flex; flex-wrap: wrap; gap: .75rem 1rem; margin-block: 1rem; }
.date-fields label { display: grid; gap: .25rem; }
.date-fields input { border: 1px solid #a6b9ac; border-radius: .5rem; padding: .4rem .55rem; color: inherit; background: #fff; }

.cycle-controls { display: flex; flex-wrap: wrap; align-items: start; gap: 1rem; margin-bottom: 1rem; }
.cycle-controls > label { display: grid; gap: .25rem; }
.cycle-controls select { max-width: 100%; }
.start-cycle { margin: 0; }
.start-cycle p { margin-top: .5rem; }
.date-fields .button { align-self: end; margin-top: 0; border: 0; cursor: pointer; }
#reading-status:not(:empty) { margin-bottom: .75rem; color: #833826; }
.reading-timeline { width: 100%; border-collapse: collapse; margin-block: .6rem 1.2rem; background: #fff; }
.reading-timeline th, .reading-timeline td { text-align: left; padding: .5rem; border-bottom: 1px solid #d0ded2; }
.reading-timeline progress { height: .65rem; margin: .1rem 0; min-width: 2rem; }
.book-list { margin-top: 1.4rem; }
