:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #14141f;
  --bg-tertiary: #1e1e2e;
  --text-primary: #ffffff;
  --text-secondary: #a0a0b0;
  --text-muted: #606070;
  --accent: #00d4ff;
  --accent-secondary: #00ff88;
  --danger: #ff4466;
  --focus-ring: #00d4ff;
  --focus-glow: rgba(0, 212, 255, 0.4);
  --radius-md: 12px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
  width: 600px; height: 600px; overflow: hidden;
  background: #000;
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
#app { width: 100%; height: 100%; position: relative; }
.screen { width: 100%; height: 100%; position: absolute; top: 0; left: 0; display: flex; flex-direction: column; }
.screen.hidden { display: none; }
.focusable { transition: all 0.15s ease; border: 2px solid transparent; cursor: pointer; outline: none; }
.focusable:focus { border-color: var(--focus-ring); box-shadow: 0 0 20px var(--focus-glow); }
.hidden { display: none !important; }

/* ---------- top bar ---------- */
.topbar {
  flex: 0 0 auto;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  background: var(--bg-primary);
  border-bottom: 1px solid #23232f;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-tertiary);
  border-radius: 8px;
  font-weight: 800; font-size: 19px;
  color: var(--accent);
  font-family: Georgia, 'Times New Roman', serif;
}
.brand-name { font-size: 21px; font-weight: 700; letter-spacing: 0.3px; }
.meta { display: flex; align-items: center; gap: 14px; }
.counter {
  font-size: 16px; font-weight: 700; color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}
.status { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-muted); }
.dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--text-muted);
  box-shadow: 0 0 0 0 transparent;
  transition: all 0.2s ease;
}
.status.live .dot { background: var(--accent-secondary); box-shadow: 0 0 8px var(--accent-secondary); }
.status.live #status-text { color: var(--accent-secondary); }

/* ---------- reader ---------- */
.reader {
  flex: 1 1 auto;
  display: flex;
  padding: 16px;
  min-height: 0;
}
.card {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 20px;
  min-height: 0;
}
.card.focusable { border: 2px solid #2a2a3a; }
.card.focusable:focus { border-color: var(--focus-ring); box-shadow: 0 0 20px var(--focus-glow); }
.card-head { display: flex; align-items: center; gap: 14px; flex: 0 0 auto; }
.avatar {
  width: 52px; height: 52px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px;
  font-size: 26px; font-weight: 800; color: #07070c;
  font-family: Georgia, serif;
  background: var(--accent);
}
.card-titles { min-width: 0; }
.art-title {
  font-size: 27px; line-height: 1.18; font-weight: 800;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.chip {
  display: inline-block;
  margin-top: 6px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase;
  color: var(--accent);
  background: rgba(0, 212, 255, 0.10);
  border: 1px solid rgba(0, 212, 255, 0.25);
  padding: 3px 9px; border-radius: 999px;
}
.art-extract {
  flex: 1 1 auto;
  margin-top: 16px;
  font-size: 20px; line-height: 1.52;
  color: var(--text-primary);
  display: -webkit-box; -webkit-line-clamp: 9; -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-foot { flex: 0 0 auto; margin-top: 12px; }
.hint { font-size: 13px; color: var(--text-muted); }

/* ---------- nav bar ---------- */
.navbar {
  flex: 0 0 auto;
  display: flex;
  gap: 8px;
  padding: 10px 12px 14px;
  background: var(--bg-primary);
  border-top: 1px solid #23232f;
}
.navbtn {
  flex: 1 1 0;
  min-height: 72px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border-radius: 10px;
  font-family: inherit;
}
.navbtn .nb-ico { font-size: 22px; line-height: 1; }
.navbtn .nb-lbl { font-size: 13px; font-weight: 600; }
.navbtn.primary { background: rgba(0, 212, 255, 0.12); color: var(--accent); }
.navbtn.primary .nb-ico { color: var(--accent); }
.navbtn.saved-on { color: var(--accent-secondary); }
.navbtn.saved-on .nb-ico { color: var(--accent-secondary); }
.navbtn.focusable:focus { background: var(--bg-secondary); color: var(--text-primary); }

/* ---------- saved list ---------- */
.list-wrap {
  flex: 1 1 auto;
  overflow: hidden;
  padding: 12px 14px;
  display: flex; flex-direction: column; gap: 10px;
}
.list-item {
  flex: 0 0 auto;
  min-height: 72px;
  background: var(--bg-secondary);
  border-radius: 10px;
  padding: 12px 14px;
  border: 2px solid #23232f;
}
.list-item.focusable:focus { border-color: var(--focus-ring); box-shadow: 0 0 20px var(--focus-glow); }
.li-title { font-size: 18px; font-weight: 700; }
.li-extract {
  margin-top: 4px; font-size: 14px; color: var(--text-secondary);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.empty {
  flex: 1 1 auto;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; color: var(--text-muted); text-align: center; padding: 20px;
}
.empty .e-ico { font-size: 46px; }
.empty .e-txt { font-size: 17px; }

/* ---------- about ---------- */
.about-wrap {
  flex: 1 1 auto;
  padding: 22px;
  display: flex; flex-direction: column; gap: 16px;
  overflow: hidden;
}
.about-h { font-size: 26px; font-weight: 800; }
.about-p { font-size: 18px; line-height: 1.5; color: var(--text-secondary); }
.ctrl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ctrl {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg-secondary); border-radius: 10px; padding: 12px 14px;
}
.key {
  min-width: 64px; text-align: center;
  font-weight: 700; font-size: 15px; color: var(--accent);
  background: var(--bg-tertiary); border-radius: 8px; padding: 6px 8px;
}
.ctxt { font-size: 15px; color: var(--text-primary); }
.about-note { margin-top: auto; font-size: 13px; color: var(--text-muted); line-height: 1.5; }
