/* The services and note entries share the same image-first layout. */
.service-list,
.library-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
}
.service-list { margin-top: 24px; }
.service-card,
.library-entry {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid #4d606a;
  border-radius: 6px;
  background: #101f2b;
  color: #f2eddf;
}
.service-card { padding: 0; gap: 0; align-items: stretch; }
.service-cover,
.library-cover {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 5px 5px 0 0;
  background: #1c3040;
}
.service-cover img,
.library-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.service-cover img { object-position: center top; }
.service-cover-type {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #e6d4a8;
  background: radial-gradient(ellipse at 60% 32%, #414455 0, #242a37 52%, #1a2330);
  font: 500 clamp(21px, 2.3vw, 32px)/1.15 Georgia, serif;
  letter-spacing: .12em;
}
.service-cover-type::before,
.service-cover-type::after { content: ""; width: 12%; height: 1px; background: #a99876; }
.service-copy,
.library-entry-copy { padding: 16px 18px 18px; min-width: 0; }
.service-copy { flex: 1; display: flex; flex-direction: column; align-items: flex-start; }
.service-meta { display: flex; align-items: center; width: 100%; gap: 8px; margin-bottom: 9px; }
.rpg-theme .service-number {
  padding: 0;
  color: #c5b596;
  font: 13px/1.4 "DotGothic16", sans-serif;
  text-shadow: none;
}
.service-meta .service-kind { padding: 0; font-size: 12px; }
.service-meta .status-tag { margin-left: auto; font-size: 11px; line-height: 1.5; }
.service-copy h3 {
  margin: 0 0 8px;
  font-size: clamp(20px, 1.8vw, 24px);
  line-height: 1.4;
  color: #fff0d2;
  overflow-wrap: anywhere;
}
.service-copy p { margin: 0; font-size: 14px; line-height: 1.8; color: #cfdbdd; }
.service-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  align-self: flex-start;
  min-height: 44px;
  margin: 5px 18px 8px;
  padding: 0;
  color: #f3d69e;
  font-size: 14px;
}
.service-link span { margin: 0; font-size: 16px; }
.service-link::after { position: absolute; inset: 0; content: ""; border-radius: 6px; }
.service-card:has(.service-link:hover),
.library-entry:hover { background: #182b39; border-color: #c9b27b; }
.service-card:focus-within,
.library-entry:focus-visible { outline: 2px solid #f5d595; outline-offset: 2px; }
.library-meta { display: flex; justify-content: flex-end; align-items: center; margin: 0 0 12px; }
.library-meta a,
.library-more { color: #eddbb5; text-underline-offset: 4px; }
.library-meta a { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; }
.library-scroll {
  max-height: min(78svh, 790px);
  overflow-y: auto;
  scrollbar-color: #899599 #14242e;
  padding: 4px;
  outline-offset: 3px;
}
.library-scroll:focus-visible { outline: 2px solid #d0b980; }
.library-list { list-style: none; margin: 0; padding: 0; }
.library-list li { display: flex; min-width: 0; }
.library-entry { width: 100%; text-decoration: none; }
.library-entry-copy { display: block; }
.library-entry time { display: block; margin-bottom: 7px; color: #c7baa1; font-size: 12px; line-height: 1.5; }
.library-entry-title { display: block; font-size: 16px; line-height: 1.65; overflow-wrap: anywhere; }
.library-entry-copy:first-child { margin-block: auto; }
.library-entry-copy:first-child .library-entry-title { font-size: 19px; }
.library-more { display: block; width: 100%; min-height: 48px; margin-top: 14px; border: 1px solid #566977; border-radius: 4px; font: inherit; font-size: 14px; background: #122432; cursor: pointer; }
.library-more:hover:enabled { background: #213544; }
.library-more:disabled { cursor: default; opacity: .7; }
.library-status { color: #d8c7a2; font-size: 12px; line-height: 1.8; }
.library-status:empty { display: none; }
@media (max-width: 950px) {
  .service-list, .library-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
}
@media (max-width: 600px) {
  .service-list, .library-list { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .main-nav { gap: clamp(8px, 2.5vw, 18px); }
  .rpg-theme #services-title { text-wrap: balance; font-size: clamp(21px, 5.6vw, 26px); }
  .service-copy, .library-entry-copy { padding: 15px 16px; }
  .service-link { margin-inline: 16px; }
  .library-meta { margin-top: -8px; }
}
