/* S.J.G.S.M. Today · Bookshelf card (GUIA-TARJETAS-TODAY). Same icon column, title and type scale as Weather Atlas, Zodiac Live
   and Travel Advice; the motif is an exclusive S.J.G.S.M. book-room illustration, toned
   in gold on burgundy, its edges fading into the card. Text contrast over the picture: 6.3:1 or more on wide screens (900–1366 px).
   The whole card opens the Bookshelf. */
#today-tools > [data-today-tool="ext-bookshelf"] {
  --bookshelf-shade: linear-gradient(100deg, #2f0c1cf2, #451224d6 48%, #44122466);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-content: center;
  column-gap: clamp(.75rem, 2.8vw, 1.25rem);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-width: 0;
  box-sizing: border-box;
  min-height: 6.4rem;
  margin: 0 0 1rem;
  padding: clamp(.85rem, 3vw, 1.5rem) clamp(.8rem, 3vw, 1.4rem);
  border: 1px solid #a77b53;
  border-radius: 14px;
  color: #fff2d8;
  background-color: #48162a;
  box-shadow: inset 0 0 0 2px rgba(234,195,128,.15), 0 6px 18px rgba(35,12,20,.12);
  background-image: var(--bookshelf-shade), url("today-motif.webp?ver=1.1.2"), linear-gradient(120deg, #371321, #7c2a41 60%, #481726);
  background-position: center, right center, center;
  background-size: cover, auto 100%, cover;
  background-repeat: no-repeat;
}
#today-tools > [data-today-tool="ext-bookshelf"][hidden],
#today-tools > [data-today-tool="ext-bookshelf"][data-today-disabled] { display: none !important; }
#today-tools [data-today-tool="ext-bookshelf"] > .today-miniapp-icon {
  grid-column: 1;
  grid-row: 1 / -1;
  align-self: center;
  box-sizing: border-box;
  inline-size: var(--sjgsm-today-icon-size, clamp(4rem, 10vw, 5rem));
  block-size: var(--sjgsm-today-icon-size, clamp(4rem, 10vw, 5rem));
  object-fit: contain;
  margin: 0;
  border: 1px solid #bc915d;
  border-radius: 24%;
  box-shadow: 0 3px 8px #20081480;
}
#today-tools [data-today-tool="ext-bookshelf"] h2 {
  grid-column: 2;
  min-width: 0;
  overflow-wrap: anywhere;
  margin: 0;
  font: normal clamp(1.45rem, 4vw, 2rem)/1.15 var(--serif, Georgia, serif);
}
#today-tools [data-today-tool="ext-bookshelf"] h2 a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #fff2d8;
  text-decoration: none;
}
#today-tools [data-today-tool="ext-bookshelf"] h2 a::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: 14px; }
#today-tools [data-today-tool="ext-bookshelf"] h2 a:focus-visible { outline: 3px solid #f3c686; outline-offset: 3px; border-radius: 4px; }
#today-tools [data-today-tool="ext-bookshelf"] > p {
  grid-column: 2;
  max-width: 34em;
  min-width: 0;
  overflow-wrap: anywhere;
  margin: 0;
  color: #f8e5d4;
  font: 1rem/1.42 var(--sans, system-ui, sans-serif);
  text-shadow: 0 1px 4px #270b14;
}
@media (max-width: 899.98px) {
  /* On a phone the text runs over the picture: a deeper shade keeps it at 5.8:1 or more (measured at 320–412 px). */
  #today-tools > [data-today-tool="ext-bookshelf"] { --bookshelf-shade: linear-gradient(100deg, #2f0c1cf2, #451224d0 44%, #44122499); }
}
@media (forced-colors: active) {
  #today-tools > [data-today-tool="ext-bookshelf"] { background: Canvas; color: CanvasText; border-color: CanvasText; }
  #today-tools [data-today-tool="ext-bookshelf"] h2 a,
  #today-tools [data-today-tool="ext-bookshelf"] > p { color: CanvasText; text-shadow: none; }
  #today-tools [data-today-tool="ext-bookshelf"] > .today-miniapp-icon { box-shadow: none; }
}
