* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  min-height: 100%;
  background: #090a10;
  color: #f4efe6;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.library-hall {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 88px 24px 100px;
  gap: 40px;
  background:
    radial-gradient(circle at 50% 18%, rgba(217, 119, 6, 0.14), transparent 52%),
    radial-gradient(circle at 80% 80%, rgba(99, 102, 241, 0.12), transparent 50%);
}

.hall-header {
  text-align: center;
  max-width: 560px;
}

.hall-kicker {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.22em;
  color: #f59e0b;
  margin-bottom: 10px;
}

.hall-header h1 {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  margin-bottom: 10px;
}

.hall-header p {
  font-size: 14px;
  line-height: 1.6;
  color: #a8a29e;
}

kbd {
  padding: 2px 6px;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;
}

.archive-shelf {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 20px;
  width: min(900px, 100%);
}

.tome-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  min-height: 230px;
  padding: 22px 20px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(20, 22, 34, 0.85);
  color: #faf7f2;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.45);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.tome-card:hover {
  transform: translateY(-6px) rotate(-0.6deg);
  box-shadow: 0 26px 54px rgba(0, 0, 0, 0.6);
}

.tome-amber:hover { border-color: #f59e0b; }
.tome-cyan:hover { border-color: #38bdf8; }
.tome-violet:hover { border-color: #a855f7; }
.tome-emerald:hover { border-color: #34d399; }

.tome-spine {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-family: Georgia, serif;
  font-size: 16px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.tome-label {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.25;
  margin-top: auto;
  margin-bottom: 6px;
}

.tome-sub {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  color: #a8a29e;
}

/* Object Reader Overlay */
.k-reader-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9600;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(4, 6, 12, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}

.k-reader-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.k-reader-sheet {
  width: min(640px, 100%);
  max-height: min(82vh, 680px);
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  background: #141724;
  border: 1px solid rgba(245, 158, 11, 0.35);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.7);
  overflow: hidden;
}

.k-reader-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 26px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.k-reader-kicker {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  color: #f59e0b;
  margin-bottom: 6px;
}

.k-reader-title {
  font-size: 22px;
  font-weight: 700;
  color: #faf7f2;
}

.k-reader-close {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: #f8fafc;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  flex-shrink: 0;
}

.k-reader-close:hover {
  border-color: #f59e0b;
}

.k-reader-body {
  padding: 22px 26px;
  overflow-y: auto;
  font-size: 15px;
  line-height: 1.75;
  color: #e7e5e4;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.k-reader-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 26px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.25);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  color: #a8a29e;
}
