/* =========================================================
   Publisher list page (publisher.css)
   - Works with common_v25.css + responsive_v25.css
   ========================================================= */


/* =========================================================
   Kana navigation
   ========================================================= */

.pub-kana {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  background: transparent;
  gap: 8px;
  margin: 14px 0 18px;
  padding: 0;
}

@media (min-width: 769px){
  .pub-kana{
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

.pub-kana__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--prm-gray);
  border-radius: 2px;
  background: #fff;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--prm-gold);
}

@media (min-width: 769px) {
  .pub-kana__btn{
    height: 34px;
    padding: 0 10px;
  }
}

.pub-kana__btn:hover {
  border-color: var(--prm-gold);
  background: var(--prm-ivory);
  color: var(--prm-gold);
}

.pub-kana__btn:active {
  transform: translateY(1px);
}

.pub-kana__btn:focus-visible {
  outline: 2px solid var(--prm-gold);
  outline-offset: 2px;
}


/* =========================================================
   Groups (ア / カ / サ...)
   ========================================================= */

.pub-group {
  margin: 22px 0 26px;
}

.pub-group {
  scroll-margin-top: 16px;
}

.pub-group__head {
  margin: 0 0 10px;
  padding: 0 0 6px;
  border-bottom: 1px solid var(--prm-gray);
  color: var(--prm-gold);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
}


/* =========================================================
   Publisher list
   ========================================================= */

.pub-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 18px;
}

.pub-list li {
  margin: 0;
  padding: 6px 8px;
  border-radius: 2px;
  line-height: 1.65;
  overflow-wrap: anywhere;
  word-break: normal;
}

.pub-list li:hover {
  background: #f7f7f7;
}

.pub-list a {
  color: var(--prm-text);
  text-decoration: none;
}
.pub-list a:hover {
  text-decoration: underline;
  text-underline-offset: 0.14em;
}


/* =========================================================
   Note
   ========================================================= */

.pub-note {
  margin: 24px 0 0;
  color: var(--prm-subtext);
  font-size: 12px;
  text-align: right;
}


/* =========================================================
   Mobile
   ========================================================= */

@media screen and (max-width: 768px) {

  /* Kana bar: single-row horizontal scroll + sticky */
  .pub-kana {
    position: sticky;
    top: 6px;
    z-index: 2;

    margin: 10px 0 14px;
    padding: 10px 6px;

    background: #fff;
    border-bottom: 1px solid var(--prm-gray);

    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    gap: 8px;
  }

  .pub-kana__btn {
    flex: 0 0 auto;
    min-width: 44px;
    height: 34px;
    font-size: 14px;
  }

  .pub-list {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .pub-group__head {
    font-size: 22px;
  }

  .pub-group {
    scroll-margin-top: 72px;
  }
}


/* =========================================================
   Search (Publisher filter)
   ========================================================= */

.pub-search {
  margin: 10px 0 18px;
  padding: 10px 12px;
  border: 1px solid var(--prm-gray);
  border-radius: 2px;
  background: #fff;

  /* iOS Safari / flex & grid overflow fix */
  min-width: 0;
}

.pub-search input[type="search"],
.pub-search input[type="text"] {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.pub-search input {
  overflow: hidden;
  text-overflow: ellipsis;
  /* white-space: nowrap; */
}

.pub-search__row,
.pub-search__input {
  min-width: 0;
}

.pub-search__label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--prm-gold);
  margin: 0 0 8px;
}

.pub-search__row {
  position: relative;
}

.pub-search__input {
  width: 100%;
  height: 40px;
  padding: 0 40px 0 12px;
  border: 1px solid var(--prm-gray);
  border-radius: 2px;
  font-size: 14px;
  outline: none;
}

.pub-search__input:focus {
  border-color: var(--prm-gold);
}

.pub-search__input::-webkit-search-cancel-button {
  -webkit-appearance: none;
}

.pub-search__clear {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border: 1px solid var(--prm-gray);
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
  line-height: 26px;
  font-size: 16px;
  color: var(--prm-subtext);
}

.pub-search__clear:hover {
  border-color: var(--prm-gold);
  color: var(--prm-gold);
}

.pub-search__hint {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--prm-subtext);
}

@media screen and (max-width: 768px) {
  .pub-search {
    margin: 8px 0 14px;
    padding: 10px;
  }

  @supports (-webkit-touch-callout: none) {
    .pub-search__input {
      font-size: 16px;
    }
  }
}