/* Styles for xanrean/books.html — moved out of the markup verbatim. */
    /* Nav */
    nav {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      z-index: 100;
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 1rem 2rem;
      background: rgba(255,255,255,0.9);
      backdrop-filter: blur(12px);
      border-bottom: 1px solid rgba(124,58,237,0.1);
    }

    [data-theme="dark"] nav {
      background: rgba(10,6,20,0.9);
      border-bottom-color: rgba(124,58,237,0.2);
    }

    .nav-logo {
      display: flex;
      align-items: center;
      gap: 0.75rem;
      font-family: var(--font-display);
      font-size: 1.25rem;
      font-weight: 700;
      color: var(--royal);
      text-decoration: none;
    }

    .nav-tama {
      width: 32px;
      height: 32px;
      background: url('/images/tama-icon.png') center/contain no-repeat;
      image-rendering: pixelated;
    }

    .theme-toggle {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 8px;
      width: 40px;
      height: 40px;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      font-size: 1.25rem;
      color: var(--text);
    }

    .theme-toggle:hover {
      background: var(--surface2);
    }

    /* Hero */
    .books-hero {
      padding: 8rem 2rem 3rem;
      text-align: center;
      background: linear-gradient(180deg, rgba(124,58,237,0.1) 0%, transparent 100%);
    }

    .books-hero h1 {
      font-family: var(--font-display);
      font-size: clamp(2.5rem, 6vw, 4rem);
      background: linear-gradient(135deg, #c4b5fd, #8b5cf6);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
    }

    .books-hero p {
      max-width: 600px;
      margin: 1rem auto 0;
      color: var(--muted);
    }

    /* Series jump-nav */
    .series-jump {
      display: flex;
      flex-wrap: wrap;
      gap: 0.5rem;
      justify-content: center;
      max-width: 900px;
      margin: 2rem auto 0;
    }

    .series-jump a {
      padding: 0.4rem 1rem;
      border: 1px solid var(--border);
      border-radius: 100px;
      font-size: 0.8rem;
      font-weight: 600;
      letter-spacing: 0.03em;
      color: var(--muted);
      text-decoration: none;
      transition: color 0.2s, border-color 0.2s, background 0.2s;
    }

    .series-jump a:hover {
      color: var(--royal-light);
      border-color: rgba(139,92,246,0.5);
      background: rgba(124,58,237,0.08);
    }

    /* Group Section */
    .tier-section {
      padding: 4rem 2rem;
      max-width: 1200px;
      margin: 0 auto;
    }

    .tier-section + .tier-section {
      border-top: 1px solid var(--border);
    }

    .tier-header {
      text-align: center;
      margin-bottom: 3rem;
    }

    .tier-badge {
      display: inline-flex;
      align-items: center;
      gap: 0.5rem;
      padding: 0.5rem 1rem;
      border-radius: 100px;
      font-size: 0.75rem;
      font-weight: 700;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      margin-bottom: 1rem;
    }

    .tier-badge.series {
      background: linear-gradient(135deg, rgba(139,92,246,0.2), rgba(124,58,237,0.2));
      border: 1px solid rgba(139,92,246,0.4);
      color: #c4b5fd;
    }

    .tier-badge.novella {
      background: linear-gradient(135deg, rgba(59,130,246,0.2), rgba(37,99,235,0.2));
      border: 1px solid rgba(59,130,246,0.4);
      color: #93c5fd;
    }

    .tier-badge.omnibus {
      background: linear-gradient(135deg, rgba(245,158,11,0.2), rgba(217,119,6,0.2));
      border: 1px solid rgba(245,158,11,0.4);
      color: #fcd34d;
    }

    .tier-header h2 {
      font-family: var(--font-display);
      font-size: clamp(1.8rem, 4vw, 2.6rem);
      margin-bottom: 0.5rem;
    }

    .tier-header p {
      color: var(--muted);
      max-width: 620px;
      margin: 0 auto;
    }

    /* Books Grid */
    .books-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
      gap: 2rem;
    }

    .book-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 16px;
      overflow: hidden;
      transition: transform 0.3s, box-shadow 0.3s;
      text-decoration: none;
      color: inherit;
      display: flex;
      flex-direction: column;
    }

    .book-card:hover {
      transform: translateY(-4px);
      box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    }

    [data-theme="light"] .book-card:hover {
      box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    }

    .book-cover {
      aspect-ratio: 2/3;
      background: var(--surface2);
      background-size: cover;
      background-position: center;
      position: relative;
    }

    .book-cover::after {
      content: '';
      position: absolute;
      inset: 0;
      background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,0.5) 100%);
      opacity: 0;
      transition: opacity 0.3s;
    }

    .book-card:hover .book-cover::after {
      opacity: 1;
    }

    .book-status {
      position: absolute;
      top: 1rem;
      left: 1rem;
      padding: 0.25rem 0.75rem;
      border-radius: 100px;
      font-size: 0.7rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.05em;
    }

    .book-status.published {
      background: rgba(16,185,129,0.9);
      color: white;
    }

    .book-status.preview {
      background: rgba(245,158,11,0.9);
      color: white;
    }

    .book-status.draft {
      background: rgba(107,114,128,0.9);
      color: white;
    }

    .book-info {
      padding: 1.5rem;
      flex: 1;
      display: flex;
      flex-direction: column;
    }

    .book-volume {
      font-size: 0.75rem;
      font-weight: 700;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      color: var(--muted);
      margin-bottom: 0.25rem;
    }

    .book-title {
      font-family: var(--font-display);
      font-size: 1.25rem;
      margin-bottom: 0.5rem;
      line-height: 1.3;
    }

    .book-blurb {
      color: var(--muted);
      font-size: 0.9rem;
      line-height: 1.6;
      flex: 1;
    }

    .book-meta {
      display: flex;
      gap: 1rem;
      margin-top: 1rem;
      padding-top: 1rem;
      border-top: 1px solid var(--border);
      font-size: 0.8rem;
      color: var(--muted);
    }

    .book-meta span {
      display: flex;
      align-items: center;
      gap: 0.25rem;
    }

    .empty-state {
      text-align: center;
      padding: 4rem 2rem;
      color: var(--muted);
    }

    .empty-state-icon {
      font-size: 4rem;
      margin-bottom: 1rem;
      opacity: 0.5;
    }

    /* Footer */
    footer {
      background: var(--surface);
      border-top: 1px solid var(--border);
      padding: 0.75rem 1.5rem;
      margin-top: 4rem;
    }

    .footer-inner {
      max-width: 1200px;
      margin: 0 auto;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 1rem;
      flex-wrap: wrap;
    }

    .footer-brand {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      font-family: var(--font-display);
      font-size: 1rem;
      color: var(--royal);
    }

    .footer-tama {
      width: 24px;
      height: 24px;
      background: url('/images/tama-icon.png') center/contain no-repeat;
      image-rendering: pixelated;
    }

    .footer-link {
      color: var(--muted);
      text-decoration: none;
      font-size: 0.9rem;
    }

    .footer-link:hover {
      color: var(--royal-light);
    }

    @media (max-width: 768px) {
      .footer-inner { flex-direction: column; text-align: center; }
    }
  