/* Compact adjacent subject headings, using the existing book dimensions. */
#sec-book-summaries { display: grid; grid-template-columns: repeat(2, minmax(0, 139px)); column-gap: 16px; row-gap: 8px; }
#sec-book-summaries.hidden { display: none; }
#sec-book-summaries > .cat-header { grid-column: 1 / -1; }
#sec-book-summaries > .cat { min-width: 0; margin-bottom: 0; }
#sec-book-summaries .learning-books { grid-template-columns: minmax(0, 1fr); }
#sec-summary-finance { grid-column: 1 / -1; }
#sec-summary-finance .learning-books { grid-template-columns: repeat(2, minmax(0, 132px)); column-gap: 23px; }
#sec-psychology { grid-column: 1; }
#sec-summary-health { grid-column: 2; }
#sec-summary-finance .book-taachan { --cover: #171717; --spine: #080808; --foil: #e5c56e; color: #fff; border-color: #a78c53; }
#sec-summary-finance .book-taachan:hover { color: #fff; border-color: #f0d797; }
#sec-summary-finance .book-title { display: flex; flex-direction: column; gap: 1px; margin-top: 6px; font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif; line-height: 1.12; letter-spacing: 0; }
#sec-summary-finance .book-title strong { color: #e5c56e; font-size: 28px; letter-spacing: -.04em; }
#sec-summary-finance .taachan-small { font-size: 12px; font-weight: 700; }
#sec-summary-finance .book-subtitle { color: #f1dfae; font-size: 10px; line-height: 1.35; margin-top: 5px; }
#sec-summary-finance .book-author { color: #eee; font-size: 8px; margin-top: 4px; }
@media (max-width: 700px) {
  #sec-book-summaries { grid-template-columns: repeat(2, minmax(0, 115px)); column-gap: 12px; }
  #sec-summary-finance .learning-books { grid-template-columns: repeat(2, minmax(0, 108px)); column-gap: 19px; }
  #sec-book-summaries .book-card { height: 156px; }
  #sec-summary-finance .book-title { margin-top: 5px; }
  #sec-summary-finance .book-title strong { font-size: 23px; }
  #sec-summary-finance .taachan-small { font-size: 10px; }
  #sec-summary-finance .book-subtitle { font-size: 9px; margin-top: 4px; }
  #sec-summary-finance .book-author { font-size: 7px; margin-top: 3px; }
}

#sec-summary-health .book-health { --cover:#fffdf8; --spine:#eadfd5; --foil:#a72224; color:#27211f; border-color:#cebbb0; }
#sec-summary-health .book-title { display:flex; flex-direction:column; gap:3px; line-height:1.2; font-size:14px; margin-top:3px; }
#sec-summary-health .book-title small { font-size:9px; color:#aa2328; }
#sec-summary-health .book-title strong { color:#ba242b; font-size:14px; white-space:nowrap; }
#sec-summary-health .book-subtitle { font-size:8px; color:#685852; margin-top:5px; line-height:1.4; }
#sec-summary-health .book-author { font-size:7px; margin-top:4px; }
#sec-summary-health .book-open { border-color:#c9aaa9; }
@media(max-width:700px) { #sec-summary-health .book-title,#sec-summary-health .book-title strong { font-size:13px; } #sec-summary-health .book-subtitle { font-size:8px; } }
@media(max-width:480px) {
 #sec-book-summaries { grid-template-columns:repeat(2,minmax(0,115px)); column-gap:12px; }
 #sec-book-summaries .cat-header { gap:4px; }
 #sec-summary-finance .learning-books { grid-template-columns:repeat(2,minmax(0,108px)); column-gap:19px; }
 #sec-summary-finance .book-title strong { font-size:21px; }
 #sec-summary-health .book-title,#sec-summary-health .book-title strong { font-size:11px; }
}

/* The supplied cover remains intact and centered in its book tile. */
#sec-summary-finance .book-golden { padding:0; overflow:hidden; background:#f9f5e8; border-color:#d7cbbc; }
#sec-summary-finance .book-golden::before,#sec-summary-finance .book-golden::after { display:none; }
#sec-summary-finance .book-golden:hover { border-color:#9a80b7; }
#sec-summary-finance .book-golden-cover { display:block; width:100%; height:100%; object-fit:contain; }



#sec-summary-finance .book-yamazaki { padding:0; overflow:hidden; background:#faf7f0; border-color:#d7cbbc; }
#sec-summary-finance .book-yamazaki::before,#sec-summary-finance .book-yamazaki::after { display:none; }
#sec-summary-finance .book-yamazaki:hover { border-color:#b79863; }
#sec-summary-finance .book-yamazaki-cover { display:block; width:100%; height:100%; object-fit:contain; }

/* Desktop finance shelf: keep the three existing cards on one row. */
@media (min-width: 1024px) {
  #sec-summary-finance { width: 442px; }
  #sec-summary-finance .learning-books {
    grid-template-columns: repeat(3, minmax(0, 132px));
    column-gap: 23px;
  }
}

/* Use the full mobile content width for all summary shelves. */
@media (max-width:700px) {
  #sec-book-summaries {
    width:100%;
    grid-template-columns:repeat(2,minmax(0,1fr));
    column-gap:12px;
  }
  #sec-summary-finance {
    grid-column:1 / -1;
    width:100%;
    max-width:none;
    justify-self:stretch;
  }
  #sec-summary-finance .learning-books {
    width:100%;
    max-width:none;
    grid-template-columns:repeat(3,minmax(0,1fr));
    column-gap:clamp(5px,2vw,8px);
    padding:2px 0 14px;
  }
  #sec-summary-finance .book-card { min-width:0; }
  #sec-summary-finance .book-card > img {
    display:block;
    width:100%;
    max-width:100%;
    height:100%;
    object-fit:contain;
  }
  #sec-summary-finance .book-taachan { padding:7px 4px 7px 12px; }
  #sec-summary-finance .book-title strong { font-size:clamp(15px,4.4vw,19px); white-space:nowrap; }
  #sec-summary-finance .taachan-small { font-size:8px; }
  #sec-summary-finance .book-subtitle { font-size:8px; }
  /* Keep non-finance book tiles at their familiar shelf size as the parent expands. */
  #sec-psychology .learning-books,
  #sec-summary-health .learning-books {
    grid-template-columns:minmax(0,108px);
    justify-content:start;
  }
}
