

  #filter {
    margin: 15px 0;
    padding: 10px;
    width: 100%;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 6px;
  }

  /* GRID SERII */
  #series-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 25px;
  }

  /* Nagłówki kategorii */
  .series-category {
    grid-column: 1 / -1;
    font-size: 22px;
    font-weight: bold;
    margin: 30px 0 10px;
    color: #1e3a8a;
    border-bottom: 2px solid #d0d7e0;
    padding-bottom: 4px;
  }

  /* SERIE */
  .series-tile {
    background: #fff;
    border: 2px solid #d0d7e0;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    font-weight: bold;
    transition: background .2s, border-color .2s, transform .15s;
  }

  .series-tile:hover {
    background: #f0f6ff;
    border-color: #3b82f6;
    transform: translateY(-2px);
  }

  .issue-count {
    display: inline-block;
    background: #2563eb;
    color: white;
    padding: 2px 6px;
    border-radius: 999px;
    font-size: 11px;
    margin-left: 6px;
  }

  /* TRYB FOKUSOWY – tylko chowa grid, nic więcej */
  body.focus-mode #series-grid {
    display: none;
  }

  /* BLOK SERII */
  .series-block {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin: 25px 0;
    border: 2px solid #d0d7e0;
  }

  .series-header {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .close-series {
    cursor: pointer;
    font-size: 26px;
    padding: 5px 10px;
    border-radius: 6px;
    background: #eee;
    transition: 0.2s;
  }

  .close-series:hover { background: #ddd; }

  .expand-all-btn {
    margin: 10px 0 20px;
    padding: 8px 14px;
    background: #e2e8f0;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: 0.2s;
    display: inline-block;
  }

  .expand-all-btn:hover { background: #cbd5e1; }

  /* BLOKI NUMERÓW */
  .issue-block {
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 12px;
    background: #fff;
    border: 2px solid #d0d7e0;
  }

  /* GRID ZESZYTÓW */
  .grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 10px;
  }

  .grid-item {
    background: #fff;
    border: 2px solid #d0d7e0;
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    font-weight: bold;
    transition: background .2s, border-color .2s, transform .15s;
    font-size: 14px;
  }

  .grid-item:hover {
    background: #f0f6ff;
    border-color: #3b82f6;
    transform: translateY(-2px);
  }

  .grid-item.active {
    background: #dbeafe;
    border-color: #2563eb;
    color: #1e3a8a;
  }

  /* SZCZEGÓŁY ZESZYTU */
  .issue-details {
    display: none;
    background: white;
    padding: 12px 15px;
    margin-bottom: 10px;
    border-radius: 8px;
    border: 2px solid #d0d7e0;
  }

  .issue-details.active { display: block; }

  .issue-name {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 6px;
    color: black;
  }

  .close-issue {
    float: right;
    cursor: pointer;
    font-size: 18px;
    padding: 2px 6px;
    border-radius: 4px;
    background: #eee;
    margin-left: 10px;
    transition: 0.2s;
  }

  .close-issue:hover { background: #ddd; }

  /* WYDANIA */
  .edition-list ul {
    padding-left: 18px;
    margin: 6px 0 0;
  }

  .edition-list li {
    background: #f0f6ff;
    border-left: 4px solid #3b82f6;
    padding: 4px 8px;
    border-radius: 4px;
    margin-bottom: 4px;
    list-style: none;
  }

  /* UWAGI */
  .uwaga-box {
    margin-top: 8px;
    font-size: 13px;
    background: #e8f1ff;
    padding: 8px;
    border-left: 4px solid #2563eb;
    border-radius: 4px;
  }

  .uwaga-title { font-weight: bold; margin-bottom: 4px; }

  /* POWRÓT */
  .back-btn {
    margin-top: 25px;
    padding: 10px 16px;
    background: #2563eb;
    color: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 15px;
    display: inline-block;
    transition: 0.2s;
  }

  .back-btn:hover { background: #1e4fc7; }

  /* ERA HEADER */
  .era-header {
    margin: 22px 0 18px;
    padding: 10px 14px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    background: #e8efff;
    border: 2px solid #3b5bdb;
    border-radius: 6px;
    color: #0f1e63;
  }

  /* INDEKS LITEROWY A–Z */
  #letter-index {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 10px 0 25px;
    padding: 10px 0;
    border-bottom: 2px solid #d0d7e0;
  }

  .letter-btn {
    background: #fff;
    border: 2px solid #d0d7e0;
    border-radius: 6px;
    padding: 6px 10px;
    font-weight: bold;
    cursor: pointer;
    font-size: 14px;
    color: #1e3a8a;
    transition: background .2s, border-color .2s, transform .15s;
  }

  .letter-btn:hover {
    background: #f0f6ff;
    border-color: #3b82f6;
    transform: translateY(-2px);
  }

  .letter-btn.active {
    background: #dbeafe;
    border-color: #2563eb;
    color: #1e3a8a;
  }

  .arc-header {
    margin: 12px 0 8px;
    padding: 6px 12px;
    background: #fff7e6;
    border-left: 4px solid #f59e0b;
    font-weight: bold;
    border-radius: 4px;
    font-size: 13px;
    color: #7a4a00;
  }

  .missing-issue {
    background: #ccc !important;
    color: #555 !important;
    opacity: 0.6;
    cursor: default;
  }