/* ==========================================================
   LIBRARY UI — KomoCalm (clean v4)
   ========================================================== */

:root {
  --bg: #0e1a12;
  --text: #eef7f1;
  --accent: #8fffd2;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, sans-serif;
}

#library-shell {
  max-width: 900px;
  margin: auto;
  padding: 24px;
}

#library-title {
  font-size: 34px;
  font-weight: 650;
  text-align: center;
  margin: 22px 0 16px;
  opacity: 0.95;
}

.kc-lib-status {
  text-align: center;
  padding: 10px;
  margin-bottom: 18px;
  opacity: 0.9;
}
.kc-lib-status-info    { color: var(--accent); }
.kc-lib-status-warning { color: #ffbf6b; }
.kc-lib-status-error   { color: #ff6b6b; }

.kc-lang-switcher {
  margin: 4px auto 14px;
  text-align: center;
  font-size: 0.95rem;
  opacity: 0.85;
  user-select: none;
}
.kc-lang-switcher span { padding: 0 4px; cursor: pointer; }
.kc-lang-switcher span.active {
  font-weight: 650;
  color: var(--accent);
  opacity: 1;
}

#kc-lib-form-section {
  margin: 16px auto 26px;
  max-width: 520px;
  text-align: center;
  display: none;
}
#kc-lib-intro {
  opacity: 0.85;
  margin: 14px 0 16px;
}

#kc-lib-email,
#kc-lib-form button {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 16px;
  box-sizing: border-box;
}
#kc-lib-email {
  border: 1px solid rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  outline: none;
}
#kc-lib-email:focus {
  border-color: var(--accent);
  background: rgba(255,255,255,0.12);
}
#kc-lib-form button {
  margin-top: 14px;
  font-weight: 650;
  border: none;
  background: var(--accent);
  color: #003322;
  cursor: pointer;
  transition: opacity 0.2s ease;
}
#kc-lib-form button:hover { opacity: 0.92; }

#kc-lib-books-section { display: none; margin-top: 10px; }
.kc-lib-separator { margin: 34px 0 12px; opacity: 0.75; }

.kc-lib-book-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  padding: 18px;
  border-radius: 14px;
  margin-bottom: 14px;
  transition: 0.2s ease;
}
.kc-lib-book-card:hover {
  background: rgba(255,255,255,0.10);
  transform: translateY(-1px);
}
.kc-lib-book-title { flex: 1; font-size: 18px; opacity: 0.92; }

.kc-lib-book-open,
.kc-lib-book-cta {
  margin-left: auto;
  min-width: 140px;
  font-size: 15px;
  font-weight: 650;
  padding: 12px 22px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s ease;
}
.kc-lib-book-open { background: var(--accent); color: #003322; }
.kc-lib-book-open:hover, .kc-lib-book-cta:hover { opacity: 0.92; }

.kc-lib-book-cta { background: #444; color: #fff; }
.kc-lib-book-cta.type-free { background: #EDFFEC; color: #003322; }
.kc-lib-book-cta.type-paid { background: #10e7ff; color: #002a33; }
.kc-lib-book-cta.type-membership { background: linear-gradient(135deg, #b58cff, #8f6bff); color: #fff; }
.kc-lib-book-cta.type-coming_soon { background: rgba(255,255,255,0.15); color: rgba(255,255,255,0.6); cursor: default; }
.kc-lib-book-cta.type-sample { background: #41FFCB; color: #002a33; }
