:root {
  --paper:#f6f5f0;
  --white:#fffefa;
  --ink:#27362e;
  --muted:#747a70;
  --line:#e1e3d9;
  --green:#304e41;
  --mint:#dfe9d8;
  --orange:#c88257;
  --soft:#eeeee6;
  --danger:#9b463c;
  font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  color:var(--ink);
  background:var(--paper);
  font-synthesis:none
}
* {
  box-sizing:border-box
}
body {
  margin:0
}
button,input,select {
  font:inherit
}
button,a,input,select {
  touch-action:manipulation
}
button,a {
  -webkit-tap-highlight-color:transparent
}
button {
  cursor:pointer
}
button:disabled {
  cursor:wait;
  opacity:.55
}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible {
  outline:3px solid #91aa83;
  outline-offset:3px
}
a {
  color:inherit
}
h1,h2,h3,p {
  margin-top:0
}
h1,h2,.serif {
  font-family:Georgia,"Times New Roman",serif;
  font-weight:400
}
h1 {
  font-size:42px;
  letter-spacing:-1.4px;
  line-height:1.12;
  margin-bottom:12px
}
h2 {
  font-size:27px;
  letter-spacing:-.6px;
  margin-bottom:6px
}
h3 {
  font-size:15px;
  line-height:1.5
}
p {
  line-height:1.6
}
.muted {
  color:var(--muted)
}
.small {
  font-size:12px
}
.eyebrow {
  text-transform:uppercase;
  letter-spacing:1.8px;
  font-size:10px;
  font-weight:700;
  color:var(--muted)
}
.layout {
  display:grid;
  grid-template-columns:232px minmax(0,1fr);
  min-height:100vh
}
.sidebar {
  background:#efefe6;
  border-right:1px solid var(--line);
  padding:35px 22px;
  display:flex;
  flex-direction:column;
  position:sticky;
  top:0;
  height:100dvh
}
.brand {
  display:flex;
  align-items:center;
  gap:10px;
  text-decoration:none;
  font-family:Georgia,serif;
  font-size:24px;
  letter-spacing:-.8px
}
.brand img {
  width:35px;
  height:35px
}
.sidebar .eyebrow {
  margin:50px 12px 15px
}
.nav {
  display:flex;
  flex-direction:column;
  gap:6px
}
.nav a {
  display:flex;
  align-items:center;
  gap:12px;
  padding:12px;
  border-radius:8px;
  text-decoration:none;
  font-size:13px;
  color:#6e756b
}
.nav a.active {
  background:var(--green);
  color:#fff
}
.nav a:hover:not(.active) {
  background:#e5e7dc
}
.icon {
  font-size:17px;
  width:22px;
  text-align:center
}
.sidebar-bottom {
  margin-top:auto;
  padding-top:25px
}
.sidebar-note {
  font:italic 17px/1.5 Georgia,serif;
  border-top:1px solid #d9ddd0;
  padding:20px 12px;
  color:#7d8475
}
.profile {
  display:flex;
  gap:10px;
  align-items:center;
  padding:12px 5px
}
.avatar {
  display:grid;
  place-items:center;
  width:34px;
  height:34px;
  border-radius:50%;
  background:#dce2d3;
  font:17px Georgia,serif
}
.profile strong {
  display:block;
  font-size:12px
}
.profile span {
  font-size:11px;
  color:var(--muted)
}
main {
  max-width:1440px;
  width:100%;
  padding:30px 52px 50px;
  margin:auto;
  align-self:start
}
.topbar {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding-bottom:31px;
  border-bottom:1px solid var(--line);
  font-size:12px;
  color:var(--muted)
}
.topbar-right {
  display:flex;
  align-items:center;
  gap:18px
}
.online {
  display:flex;
  gap:6px;
  align-items:center
}
.online:before {
  content:"";
  width:6px;
  height:6px;
  background:#7e9970;
  border-radius:50%
}
.page-head {
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:20px;
  margin:38px 0 28px
}
.page-head p {
  font-size:13px;
  color:var(--muted);
  margin:0
}
.page-head .eyebrow {
  margin-bottom:13px
}
.btn {
  display:inline-flex;
  gap:8px;
  align-items:center;
  justify-content:center;
  background:var(--green);
  color:#fff;
  border:1px solid var(--green);
  border-radius:7px;
  padding:11px 16px;
  font-size:12px;
  line-height:1.3;
  white-space:nowrap;
  text-decoration:none
}
.btn:hover {
  background:#233d32
}
.btn.secondary {
  background:transparent;
  color:var(--ink);
  border-color:#ced4c6
}
.btn.secondary:hover {
  background:var(--soft)
}
.btn.quiet {
  background:transparent;
  border-color:transparent;
  color:var(--muted);
  padding:6px 8px
}
.btn.danger {
  color:var(--danger);
  border-color:#dfc5be;
  background:transparent
}
.actions {
  display:flex;
  gap:9px;
  align-items:center;
  flex-wrap:wrap
}
.stats {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:15px;
  margin-bottom:23px
}
.stat {
  background:var(--white);
  border:1px solid var(--line);
  border-radius:10px;
  padding:23px 25px;
  position:relative
}
.stat:first-child {
  background:var(--green);
  color:#fff;
  border-color:var(--green)
}
.stat .label {
  font-size:12px;
  color:var(--muted);
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:23px
}
.stat:first-child .label,.stat:first-child .sub {
  color:#bfcdbb
}
.stat .value {
  font-family:Georgia,serif;
  font-size:38px;
  letter-spacing:-1px
}
.stat .value small {
  font:14px Inter,sans-serif;
  letter-spacing:0;
  color:var(--muted)
}
.stat:first-child .value small {
  color:#bfcdbb
}
.stat .sub {
  font-size:10px;
  color:var(--muted);
  margin-top:12px
}
.panel {
  background:var(--white);
  border:1px solid var(--line);
  border-radius:10px;
  padding:25px;
  min-width:0
}
.panel-head {
  display:flex;
  justify-content:space-between;
  gap:15px;
  align-items:center;
  margin-bottom:22px
}
.panel-head h2 {
  font-size:23px
}
.panel-head p {
  font-size:11px;
  color:var(--muted);
  margin:0
}
.grid {
  display:grid;
  grid-template-columns:minmax(0,1.7fr) minmax(260px,1fr);
  gap:22px;
  margin-bottom:22px
}
.chart {
  width:100%;
  height:auto;
  display:block;
  min-height:150px
}
.chart .bar {
  fill:#b5c5a5
}
.chart .bar:last-of-type {
  fill:var(--green)
}
.chart text {
  fill:#92988b;
  font:10px Inter,sans-serif
}
.chart .gridline {
  stroke:#e9ece3;
  stroke-dasharray:3 5
}
.chart-caption {
  display:flex;
  justify-content:space-between;
  border-top:1px solid var(--line);
  padding-top:16px;
  font-size:11px;
  color:var(--muted)
}
.chart-caption strong {
  color:var(--ink)
}
.device-line {
  margin-bottom:24px
}
.device-label {
  display:flex;
  justify-content:space-between;
  font-size:12px;
  margin-bottom:8px;
  gap:8px
}
.device-label strong {
  font-weight:500
}
.device-label span {
  color:var(--muted)
}
.track {
  display:block;
  width:100%;
  height:5px;
  fill:#e9ece3
}
.track .fill {
  fill:#8ba37a
}
.device-line:nth-child(3n) .fill {
  fill:#c48a64
}
.device-line:nth-child(3n+1) .fill {
  fill:#637b70
}
.device-time {
  font-size:10px;
  color:var(--muted);
  margin-top:7px
}
.footnote {
  font-size:10px;
  line-height:1.6;
  color:var(--muted);
  border-top:1px solid var(--line);
  padding-top:14px;
  margin-top:12px
}
.book-grid {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px
}
.book-card {
  border:1px solid var(--line);
  border-radius:8px;
  padding:17px;
  display:flex;
  gap:14px;
  background:var(--white);
  text-align:left;
  color:inherit;
  width:100%;
  position:relative
}
.book-card:hover {
  border-color:#94a58b;
  background:#fbfcf7
}
.cover {
  width:62px;
  height:90px;
  border-radius:3px 6px 6px 3px;
  flex-shrink:0;
  background:#e4dec9;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  box-shadow:inset 5px 0 0 #0000000b;
  font:31px Georgia,serif;
  color:#81795e;
  border:1px solid #00000008
}
.cover img {
  width:100%;
  height:100%;
  object-fit:cover
}
.book-card:nth-child(3n+2) .cover {
  background:#dce4dc;
  color:#6b7c6c
}
.book-card:nth-child(3n) .cover {
  background:#e9d6cd;
  color:#9b7c69
}
.book-info {
  min-width:0;
  flex:1
}
.book-info h3 {
  font:17px/1.3 Georgia,serif;
  margin:2px 0 5px;
  overflow-wrap:anywhere
}
.book-info .author {
  font-size:10px;
  color:var(--muted);
  margin-bottom:13px
}
.book-info .time {
  font-size:11px
}
.book-info .eta {
  font-size:10px;
  color:var(--muted);
  margin-top:8px;
  line-height:1.5
}
.progress {
  margin-top:10px;
  height:3px
}
.empty {
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  min-height:210px;
  padding:28px;
  color:var(--muted)
}
.empty .symbol {
  font:40px Georgia,serif;
  color:#b6c2a9;
  margin-bottom:12px
}
.empty h3 {
  color:var(--ink);
  font:22px Georgia,serif;
  margin-bottom:9px
}
.empty p {
  max-width:360px;
  font-size:12px;
  margin-bottom:18px
}
.empty .actions {
  justify-content:center
}
.filterbar {
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
  margin-bottom:20px
}
.filterbar label {
  display:flex;
  align-items:center;
  gap:7px;
  font-size:11px;
  color:var(--muted)
}
input,select {
  background:#fffefa;
  border:1px solid #ccd2c4;
  color:var(--ink);
  padding:10px 11px;
  border-radius:6px;
  min-width:0;
  max-width:100%;
  font-size:13px
}
input[type=date] {
  font-size:11px;
  padding:8px
}
input[type=file] {
  width:100%;
  font-size:12px
}
label.field {
  display:flex;
  flex-direction:column;
  gap:7px;
  font-size:12px;
  margin:0 0 17px
}
label.field small {
  color:var(--muted);
  font-size:10px;
  line-height:1.5
}
.form-row {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px
}
textarea {
  font:inherit
}
.table-scroll {
  overflow-x:auto
}
table {
  width:100%;
  border-collapse:collapse;
  font-size:12px;
  text-align:left
}
th {
  color:var(--muted);
  font-size:10px;
  font-weight:500;
  padding:0 13px 14px;
  border-bottom:1px solid var(--line);
  white-space:nowrap
}
td {
  padding:15px 13px;
  border-bottom:1px solid #eeefe8
}
tr:last-child td {
  border-bottom:0
}
td.title {
  max-width:240px
}
td.title strong {
  font-weight:500;
  display:block;
  overflow-wrap:anywhere
}
.badge {
  font-size:9px;
  padding:3px 6px;
  border-radius:4px;
  display:inline-block;
  background:#ecefe5;
  color:#667858;
  white-space:nowrap;
  margin-top:5px
}
.badge.warn {
  background:#f8ecda;
  color:#9e7142
}
.notice {
  font-size:12px;
  padding:15px 18px;
  background:#e9efdf;
  border:1px solid #d4dfc7;
  border-radius:7px;
  line-height:1.6;
  margin-bottom:22px
}
.notice.warn {
  background:#fbf0de;
  border-color:#e8d5b4;
  color:#89663d
}
.timer-banner {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  background:#e4ecdc;
  padding:15px 20px;
  border:1px solid #d1dfc6;
  border-radius:8px;
  margin:22px 0
}
.timer-banner strong {
  font-size:13px
}
.timer-banner p {
  font-size:11px;
  color:#637255;
  margin:5px 0 0
}
.timer-clock {
  font:24px Georgia,serif;
  white-space:nowrap
}
.settings-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:20px
}
.settings-grid .panel h2 {
  margin-bottom:22px
}
.device-card {
  padding:21px;
  border:1px solid var(--line);
  border-radius:8px;
  background:var(--white);
  margin-bottom:14px
}
.device-card header {
  display:flex;
  align-items:center;
  gap:13px;
  margin-bottom:16px
}
.device-card h3 {
  margin:0
}
.device-card p {
  margin:4px 0 0;
  font-size:11px;
  color:var(--muted)
}
.device-symbol {
  display:grid;
  place-items:center;
  border-radius:8px;
  width:42px;
  height:48px;
  background:#e7ecdf;
  font-size:24px
}
.detail-hero {
  display:flex;
  gap:25px;
  align-items:center;
  margin:28px 0
}
.detail-hero .cover {
  width:100px;
  height:145px;
  font-size:48px
}
.detail-hero h1 {
  font-size:36px
}
.detail-stats {
  display:flex;
  gap:30px;
  font-size:12px;
  flex-wrap:wrap
}
.detail-stats strong {
  display:block;
  font:26px Georgia,serif;
  margin:7px 0
}
.back {
  font-size:11px;
  text-decoration:none;
  color:var(--muted)
}
.loading {
  padding:80px;
  text-align:center;
  color:var(--muted)
}
.footer {
  margin-top:36px;
  display:flex;
  justify-content:space-between;
  font-size:10px;
  color:#909687
}
.auth-layout {
  min-height:100dvh;
  display:grid;
  grid-template-columns:1fr 1fr
}
.auth-story {
  background:#e9eddf;
  padding:60px 12%;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  border-right:1px solid var(--line)
}
.auth-story h1 {
  font-size:58px;
  line-height:1.12;
  max-width:440px;
  margin:70px 0 24px
}
.auth-story p {
  max-width:340px;
  font-size:14px;
  color:#6f7c65
}
.book-art {
  margin:45px 0;
  display:flex;
  align-items:flex-end;
  justify-content:center;
  gap:8px;
  height:140px;
  border-bottom:2px solid #afba9f;
  transform:rotate(-3deg)
}
.book-art span {
  display:block;
  width:38px;
  height:115px;
  background:#9daf8d;
  border:1px solid #60734b22;
  border-radius:2px;
  box-shadow:inset 5px 0 #ffffff30
}
.book-art span:nth-child(2) {
  height:140px;
  background:#d2b697
}
.book-art span:nth-child(3) {
  height:128px;
  background:#657c65;
  transform:rotate(12deg);
  transform-origin:bottom left
}
.book-art span:nth-child(4) {
  height:98px;
  background:#b6bc98
}
.auth-form {
  display:flex;
  justify-content:center;
  align-items:center;
  padding:40px
}
.auth-form>div {
  width:100%;
  max-width:340px
}
.auth-form h2 {
  font-size:33px;
  margin-bottom:12px
}
.auth-form p {
  font-size:12px;
  color:var(--muted);
  margin-bottom:30px
}
.auth-form .btn {
  width:100%;
  padding:13px
}
.auth-switch {
  display:block;
  margin-top:20px;
  text-align:center;
  font-size:12px
}
.error {
  color:var(--danger);
  font-size:12px;
  line-height:1.5;
  min-height:18px
}
dialog {
  border:1px solid var(--line);
  border-radius:12px;
  padding:28px;
  width:480px;
  max-width:calc(100% - 24px);
  max-height:90dvh;
  overflow:auto;
  background:var(--white);
  color:var(--ink);
  box-shadow:0 20px 80px #24352c33
}
dialog::backdrop {
  background:#26372a66;
  backdrop-filter:blur(3px)
}
dialog h2 {
  font-size:29px;
  margin-bottom:12px
}
dialog p {
  font-size:12px;
  color:var(--muted)
}
dialog .actions {
  justify-content:flex-end;
  margin-top:20px
}
#toast {
  position:fixed;
  bottom:25px;
  right:25px;
  max-width:360px;
  border-radius:8px;
  background:var(--ink);
  color:#fff;
  font-size:12px;
  line-height:1.5;
  padding:15px 20px;
  box-shadow:0 6px 30px #0002;
  z-index:20;
  display:none
}
#toast.visible {
  display:block
}
.search {
  margin-left:auto;
  max-width:240px
}
.mobile-brand {
  display:none
}
.split-note {
  display:flex;
  align-items:center;
  gap:8px;
  font-size:11px;
  color:var(--muted)
}
.year-note {
  font:italic 15px Georgia,serif;
  color:#839074
}
.topbar .btn {
  padding:8px 12px
}
.spaced {
  margin-top:22px
}
@media(min-width:1500px) {
  main {
    padding-left:65px;
    padding-right:65px
  }
  .stat {
    padding:27px 30px
  }
}
@media(max-width:1150px) {
  main {
    padding:25px
  }
  .layout {
    grid-template-columns:200px minmax(0,1fr)
  }
  .sidebar {
    padding:30px 14px
  }
  .book-grid {
    grid-template-columns:repeat(2,minmax(0,1fr))
  }
  .grid {
    grid-template-columns:1fr
  }
  .stats {
    gap:10px
  }
  .stat {
    padding:20px
  }
  .stat .value {
    font-size:32px
  }
  .settings-grid {
    grid-template-columns:1fr
  }
}
@media(max-width:720px) {
  .layout {
    display:block
  }
  .sidebar {
    position:sticky;
    top:0;
    height:auto;
    z-index:5;
    padding:12px 16px;
    border-right:0;
    border-bottom:1px solid var(--line)
  }
  .sidebar .brand {
    font-size:22px
  }
  .sidebar .brand img {
    width:29px;
    height:29px
  }
  .sidebar .eyebrow,.sidebar-bottom {
    display:none
  }
  .nav {
    flex-direction:row;
    margin-top:13px;
    gap:4px;
    overflow-x:auto
  }
  .nav a {
    padding:8px 10px;
    font-size:11px;
    gap:5px;
    white-space:nowrap
  }
  .nav .icon {
    font-size:13px;
    width:15px
  }
  main {
    padding:20px 16px 35px
  }
  .topbar {
    padding-bottom:18px;
    font-size:10px
  }
  .topbar-right {
    gap:9px
  }
  .topbar .online {
    display:none
  }
  .page-head {
    margin:27px 0 23px;
    align-items:flex-start;
    flex-direction:column;
    gap:14px
  }
  h1 {
    font-size:34px
  }
  .stats {
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:7px
  }
  .stat {
    padding:14px 10px
  }
  .stat .label {
    font-size:10px;
    line-height:1.5;
    margin-bottom:20px;
    display:block
  }
  .stat .label .icon {
    display:none
  }
  .stat .value {
    font-size:24px
  }
  .stat .value small {
    display:block;
    margin-top:4px;
    font-size:10px
  }
  .stat .sub {
    font-size:9px
  }
  .panel {
    padding:19px 15px
  }
  .panel-head h2 {
    font-size:22px
  }
  .book-grid {
    grid-template-columns:1fr
  }
  .book-card {
    padding:15px
  }
  .book-info h3 {
    font-size:19px
  }
  .auth-layout {
    display:block
  }
  .auth-story {
    padding:24px;
    border-right:0
  }
  .auth-story h1 {
    font-size:36px;
    margin:30px 0 14px
  }
  .auth-story p {
    font-size:12px;
    margin:0
  }
  .auth-story .book-art,.auth-story>.small {
    display:none
  }
  .auth-form {
    padding:32px 24px
  }
  .timer-banner {
    flex-wrap:wrap
  }
  .timer-clock {
    font-size:21px
  }
  .timer-banner .actions {
    margin-left:auto
  }
  .detail-hero {
    gap:17px
  }
  .detail-hero h1 {
    font-size:28px
  }
  .detail-hero .cover {
    width:80px;
    height:116px
  }
  .detail-stats {
    gap:20px
  }
  .detail-stats strong {
    font-size:22px
  }
  .filterbar {
    gap:8px
  }
  .filterbar input {
    max-width:142px
  }
  .search {
    max-width:100%;
    width:100%;
    margin:0
  }
  .footer {
    gap:12px;
    line-height:1.5
  }
  .form-row {
    gap:10px
  }
  th,td {
    padding-left:8px;
    padding-right:8px
  }
  .profile {
    display:none
  }
  dialog {
    padding:23px
  }
}
@media(prefers-reduced-motion:no-preference) {
  .panel,.stat,.book-card {
    animation:appear .25s ease-out
  }
  @keyframes appear {
    from {
      opacity:.5;
      transform:translateY(4px)
    }
    to {
      opacity:1;
      transform:none
    }
  }
}
