/* Shared catalog composition; artwork remains owned by each game module. */
.library-entry > .game-catalog-card { flex: 1; width: 100%; }
.game-catalog-card { display: flex; flex-direction: column; min-width: 0; overflow: hidden; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.game-catalog-preview { flex: 0 0 168px; height: 168px; width: 100%; overflow: hidden; background: var(--surface-alt); border-bottom: 1px solid var(--line); }
.game-catalog-preview > svg { display: block; width: 100%; height: 100%; }
.game-catalog-symbol { display:grid; place-items:center; height:100%; color:var(--accent-ink); font-size:48px; background:var(--accent-soft); }
.game-catalog-info { display: flex; flex-direction: column; flex: 1; gap: 12px; padding: 20px; min-width: 0; }
.game-catalog-labels { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .07em; line-height: 1.5; }
.game-catalog-status { min-width: 0; overflow-wrap: anywhere; color: var(--accent-ink); background: var(--accent-soft); border-radius: 4px; padding: 3px 6px; letter-spacing: .02em; }
.game-catalog-info h3 { font-size: 27px; line-height: 1.15; margin: 0; overflow-wrap: anywhere; }
.game-catalog-description { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.game-catalog-facts { display: flex; flex-wrap: wrap; gap: 5px 10px; align-items: baseline; color: var(--muted); font-size: 11px; line-height: 1.6; padding-top: 2px; margin-top: auto; }
.game-catalog-facts span:first-child { color: var(--ink); font-weight: 700; }
.game-catalog-info > .button { width: 100%; min-height: 42px; margin-top: 3px; }
.game-catalog-info > .button:focus-visible { outline: 3px solid var(--focus); outline-offset: -5px; }

/* The welcome and the first catalog row share one desktop viewport. */
.discovery-top {
  display: grid;
  align-items: center;
  gap: 28px;
  margin-top: 28px;
}
.discovery-top:has(> .hub-ad) { grid-template-columns: minmax(0, 1fr) minmax(300px, 32%); }
.discovery-top > .hub-ad { margin: 0; }
.discovery-welcome {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: 206px;
  padding: 28px 32px;
  border-radius: 14px;
  background: #223c30;
  color: #f5f8ed;
}
:root[data-design="spielwiese"] .discovery-welcome { background: #372e41; }
:root[data-design="arcade"] .discovery-welcome { background: #2c2b49; }
.discovery-copy { position: relative; z-index: 1; max-width: calc(100% - 210px); }
.discovery-copy h1 { margin: 0 0 10px; font-size: clamp(32px, 3.1vw, 48px); line-height: 1.05; }
.discovery-copy p { margin: 0; font-size: 15px; line-height: 1.5; }
.discovery-link { display: inline-flex; gap: 10px; align-items: baseline; margin-top: 20px; font-weight: 700; font-size: 14px; color: #d4f597; }
.discovery-link:hover { text-decoration: underline; }
.discovery-link:focus-visible { outline-color: #d4f597; }
.discovery-art { position: absolute; width: 240px; right: 18px; top: 50%; transform: translateY(-50%); pointer-events: none; }
.discovery-art .play-composition { width: 430px; max-width: none; height: 340px; zoom: .54; transform: none; scale: none; animation: none; }
.discovery-art .composition-orbit { border-color: #ebf7e040; }
.discovery-art .composition-orbit::after { border-color: #ebf7e026; }
:root[data-design="arcade"] .discovery-art .play-composition,
.discovery-art :is(.arcade-art-label, .arcade-art-sticker, .spielwiese-art-caption) { display: none; }
.discovery-art :is(.spielwiese-artwork, .arcade-artwork) { margin: 0; }
.game-library .library-heading { align-items: baseline; justify-content: flex-start; gap: 18px; margin: 30px 0 14px; }
.game-library .library-heading h2 { font-size: 32px; }
.library-count { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.discovery-filters { position: relative; border-block: 1px solid var(--line); padding: 12px 0; margin-bottom: 20px; }
.discovery-tools, .library-modes { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.discovery-tools { min-height: 40px; gap: 10px 16px; padding-right: 130px; }
.discovery-filters fieldset { border: 0; padding: 0; min-width: 0; margin: 0; }
.library-search {
  display: flex; align-items: center; gap: 12px;
  width: min(360px, 34%); min-width: 205px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 7px; background: var(--surface); cursor: text;
}
.library-search-icon { position: relative; flex: none; width: 13px; height: 13px; border: 2px solid var(--muted); border-radius: 50%; }
.library-search-icon::after { content: ""; position: absolute; width: 7px; height: 2px; background: var(--muted); right: -5px; bottom: -3px; transform: rotate(45deg); }
.library-search input { height: 38px; min-width: 0; width: 100%; border: 0; padding: 0; background: transparent; color: var(--ink); font: inherit; font-size: 14px; }
.library-search input::placeholder { color: var(--muted); opacity: 1; }
.library-search:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
.library-search input:focus { outline: none; }
.discovery-tools .library-filter, .library-genres summary { min-height: 38px; padding: 7px 12px; font-size: 13px; }
.discovery-tools .library-filter { background: var(--surface); }
.library-genres summary {
  position: absolute; right: 0; top: 12px; display: flex; align-items: center; gap: 5px;
  min-width: 103px; justify-content: center; cursor: pointer; font-weight: 700;
  border: 1px solid var(--line); border-radius: 7px; background: var(--surface);
}
.library-genres summary::after { content: ""; width: 7px; height: 7px; border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-2px) rotate(45deg); margin-left: 7px; }
.library-genres[open] summary::after { transform: translateY(2px) rotate(225deg); }
.library-genres summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.library-genres .library-filter-options { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }
.discovery-tools #library-reset { color: var(--muted); font-size: 13px; }
.discovery-filters noscript .button { margin-top: 12px; }
#library-grid .game-catalog-card { position: relative; }
#library-grid .game-catalog-info { position: static; }
:root[data-design="spielwiese"] #library-grid .game-catalog-info::before {
  position: static; flex: none; margin: -29px 0 7px;
}
#library-grid .game-catalog-card:has(a:hover),
#library-grid .game-catalog-card:focus-within { border-color: var(--focus); }
#library-grid .game-catalog-info > a.button {
  position: static; justify-content: space-between; min-height: 38px;
  padding: 9px 0 0; border: 0; border-top: 1px solid var(--line); border-radius: 0;
  background: transparent; color: var(--accent-ink); box-shadow: none; transform: none;
}
#library-grid .game-catalog-info > a.button::after { content: ""; position: absolute; inset: 0; border-radius: 12px; }
#library-grid .game-catalog-info > a.button:focus-visible { outline: none; }
#library-grid .game-catalog-info > a.button:focus-visible::after { outline: 3px solid var(--focus); outline-offset: -3px; }
#library-grid .game-catalog-info > a.button span { font-size: 18px; }
@media (max-width: 1100px) {
  .discovery-copy { max-width: calc(100% - 140px); }
  .discovery-art { right: -40px; scale: .8; transform-origin: right top; }
}

.game-catalog-info h3 a { position: relative; z-index: 1; color: inherit; text-decoration: none; }
.game-catalog-info h3 a:hover { text-decoration: underline; }
.game-guide { max-width: 56rem; margin: 2rem auto 4rem; color: var(--ink); }
.game-guide .guide-heading { display: grid; grid-template-columns: minmax(0, 1fr) 36%; gap: 2rem; align-items: center; margin: 2rem 0; }
.game-guide h1 { margin: .3em 0; font-size: clamp(2.6rem, 5vw, 4rem); line-height: 1.05; }
.game-guide .game-catalog-preview { border: 1px solid var(--line); border-radius: 12px; height: auto; aspect-ratio: 360/168; }
.game-guide .guide-intro, .game-guide section p { max-width: 65ch; font-size: 1.1rem; line-height: 1.6; }
.game-guide dl { display: flex; flex-wrap: wrap; gap: 1.2rem 3rem; padding: 1.2rem 0; border-block: 1px solid var(--line); }
.game-guide dt { color: var(--muted); font-size: .85rem; }
.game-guide dd { margin: .35em 0 0; font-weight: 650; }
.game-guide section { margin: 2rem 0; }
