/* Approved light-green design: shared shell, library, game and event views. */
:root {
  --canvas: #f3f8f3;
  --surface: #fff;
  --ink: #173b2e;
  --accent: #357455;
  --selected: #deefdf;
  --muted: #586c63;
  --line: #dce7e0;
  --radius: 10px;
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--canvas);
  line-height: 1.5;
}
html { scroll-padding-bottom: 120px; }
body { padding: 24px 24px 0; }
.app-shell { max-width: 1180px; min-height: calc(100dvh - 24px); margin: auto; background: var(--surface); border: 1px solid var(--line); border-bottom: 0; border-radius: 12px 12px 0 0; }
.app-header, main, footer { max-width: none; }
.app-header { display: flex; align-items: center; justify-content: space-between; padding: 24px 36px; gap: 16px; }
.brand { color: var(--ink); font-size: 29px; letter-spacing: -1.2px; line-height: 1.2; font-weight: 750; }
.profile-link { display: inline-flex; border-radius: 50%; }
.profile-link .member-avatar { width: 38px; height: 38px; font-size: 16px; }
main { min-height: 0; padding: 4px 36px 44px; }
.signed-in main { padding-bottom: calc(128px + env(safe-area-inset-bottom)); }
main:focus { outline: none; }
h1 { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.15; letter-spacing: -1.2px; font-weight: 750; margin: 0 0 12px; overflow-wrap: anywhere; }
h2 { font-size: 23px; line-height: 1.25; letter-spacing: -.6px; margin: 0 0 20px; }
h3 { margin-top: 0; }
a { color: var(--accent); text-underline-offset: 3px; }
p { margin: 0 0 16px; }
a:hover { text-decoration-thickness: 2px; }
button, .button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; background: var(--accent); border: 1px solid transparent; border-radius: 8px; min-height: 44px; padding: 10px 18px; font-size: 15px; line-height: 1.4; font-weight: 600; }
button:hover, .button:hover { background: #285b42; color: white; }
button.secondary, .button.secondary { color: var(--ink); background: #eaf3ec; }
button.secondary:hover, .button.secondary:hover { background: var(--selected); color: var(--ink); }
.icon { display: inline-block; flex: 0 0 auto; vertical-align: middle; }
.button .icon, button .icon, .back-link .icon { width: 20px; height: 20px; }
.helptext, .muted, .game-metadata { color: var(--muted); }
.helptext { font-size: 13px; line-height: 1.5; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin-bottom: 20px; box-shadow: none; }
.panel > :last-child { margin-bottom: 0; }
.narrow { max-width: 600px; }
.detail-columns { gap: 16px; }
.detail-columns > .panel { margin-bottom: 20px; }
input:not([type=hidden]), textarea, select { border-color: #bacdc1; border-radius: 7px; padding: 10px 12px; min-height: 44px; background: var(--surface); color: var(--ink); font-size: 16px; }
input::placeholder { color: #60786c; opacity: 1; }
input[type=checkbox], input[type=radio] { min-height: 0; accent-color: var(--accent); }
.checkbox-field { gap: 12px; margin-bottom: 2px; min-height: 44px; }
.checkbox-field label { font-size: 16px; font-weight: 400; }
.checkbox-field input { width: 22px; height: 22px; margin: 0; }
.form-field { margin: 18px 0; }
.form-field label { font-size: 14px; font-weight: 500; margin-bottom: 8px; }
.form-field .helptext { margin-top: 8px; }
.wide-button { width: 100%; }
.preferences-panel .helptext { margin-top: 12px; }
.preferences-panel [data-knowledge-status]:empty { display: none; }
.preferences-panel .form-field { border-top: 1px solid var(--line); padding-top: 18px; }
summary { min-height: 44px; font-weight: 500; }
.notice { border-radius: 7px; background: #eaf3ec; color: var(--ink); }
.errorlist { color: #992828; }
:is(a,button,input,textarea,select,summary):focus-visible { outline: 3px solid #a65e0c; outline-offset: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: -100px; left: 20px; z-index: 100; padding: 12px; background: white; }
.skip-link:focus { top: 12px; }
.bottom-nav { position: fixed; z-index: 20; left: 50%; bottom: 0; transform: translateX(-50%); width: calc(100% - 48px); max-width: 1180px; margin: 0; padding: 8px 64px calc(8px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; border: 1px solid var(--line); border-bottom: 0; background: #fff; }
.bottom-nav a { min-height: 62px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; color: #65756f; text-decoration: none; font-size: 14px; border-radius: 8px; }
.bottom-nav .icon { width: 27px; height: 27px; }
.bottom-nav a[aria-current] { color: var(--accent); font-weight: 650; }
.bottom-nav a[aria-current] .icon { stroke-width: 2.4; }
.bottom-nav a:hover { background: var(--canvas); }
.page-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin: 14px 0 28px; }
.subtitle { color: #4c6e5e; font-size: 18px; margin-bottom: 0; }
.heading-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.subtle-link { font-size: 13px; color: var(--muted); }
.library-toolbar { display: flex; gap: 20px; align-items: stretch; margin-bottom: 28px; }
.library-search { display: flex; flex: 1; min-width: 0; border: 1px solid #bacdc1; border-radius: 8px; overflow: visible; position: relative; }
.library-search input { border: 0; padding-left: 48px; background: transparent; min-width: 0; }
.library-search button { position: absolute; left: 0; top: 0; height: 100%; width: 44px; min-height: 44px; color: #567565; background: transparent; padding: 0; }
.library-search button:hover { background: var(--canvas); color: var(--ink); }
.view-switch { display: flex; margin: 0; padding: 4px; gap: 4px; background: #eff5f1; border-radius: 8px; width: 198px; }
.view-switch a { flex: 1; display: flex; align-items: center; justify-content: center; padding: 8px 14px; min-height: 40px; border-radius: 6px; text-decoration: none; font-size: 15px; color: #3c5b4c; }
.view-switch a[aria-current=true], .library[data-layout=auto] .view-gallery { background: var(--accent); color: white; font-weight: 600; }
.library-games { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 32px 28px; padding: 0; margin: 0; list-style: none; }
.library-game { min-width: 0; }
.cover-link { display: block; text-decoration: none; border-radius: 8px; }
.library-game .game-cover { min-height: 0; aspect-ratio: 1; border: 0; background: transparent; overflow: hidden; border-radius: 8px; }
.library-game .game-cover img { display: block; width: 100%; height: 100%; object-fit: contain; }
.library-game .game-cover [data-cover-fallback] { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; background: #f0f5f1; color: #60796a; }
.game-cover [hidden], .library-game .game-cover [hidden] { display: none; }
.game-card-copy { padding: 12px 4px 0; min-width: 0; }
.game-card-copy h2 { font-size: 19px; letter-spacing: -.4px; line-height: 1.3; margin: 0 0 5px; overflow-wrap: anywhere; }
.game-card-copy h2 a { text-decoration: none; color: var(--ink); }
.game-card-copy h2 a:hover { text-decoration: underline; }
.game-card-copy .game-metadata, .game-summary { margin: 0 0 3px; font-size: 14px; color: var(--muted); }
.card-group { font-size: 13px; margin-top: 0; }
.card-group summary { min-height: 32px; padding: 3px 0; font-size: 13px; color: var(--muted); }
.game-detail-link { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; font-size: 13px; text-decoration: none; }
.game-detail-link .icon { width: 16px; height: 16px; }
.library[data-layout=liste] .library-games { grid-template-columns: minmax(0,1fr); gap: 0; }
.library[data-layout=liste] .library-game { display: grid; grid-template-columns: 130px minmax(0,1fr); align-items: start; gap: 24px; border-bottom: 1px solid var(--line); padding: 20px 0; }
.library[data-layout=liste] .game-card-copy { padding-top: 0; }
.library[data-layout=liste] .game-cover { aspect-ratio: auto; }
.library[data-layout=liste] .game-cover img { height: auto; }
.library[data-layout=liste] .game-cover [data-cover-fallback] { min-height: 130px; }
.empty-state { grid-column: 1/-1; padding: 36px 0; }
.search-feedback { color: var(--muted); font-size: 14px; }
.back-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 14px; text-decoration: none; color: #486056; margin-bottom: 16px; }
.detail-heading { display: flex; flex-direction: row; align-items: center; gap: 32px; margin-bottom: 28px; }
.detail-heading .game-cover { flex: 0 0 150px; width: 150px; background: transparent; border: 0; }
.detail-heading .game-cover img { height: auto; }
.detail-heading .game-metadata { font-size: 18px; margin: 12px 0; }
.detail-heading a { font-size: 15px; color: #486056; }
.group-entries { margin: 0; }
.group-entries li { border-bottom: 1px solid var(--line); padding: 16px 0; }
.group-entries li:last-child { border-bottom: 0; }
.group-person { display: flex; gap: 16px; align-items: flex-start; }
.group-person > div { min-width: 0; }
.group-person .member-avatar { flex: 0 0 46px; width: 46px; height: 46px; font-size: 18px; }
.card-group .group-person { gap: 8px; }
.card-group .member-avatar { flex-basis: 30px; width: 30px; height: 30px; font-size: 14px; }
.badges { margin-top: 6px; gap: 4px 12px; }
.badges span { background: transparent; border-radius: 0; padding: 0; font-size: 14px; color: var(--muted); }
.material-links { margin: 0; }
.material-links li { border-color: var(--line); }
.logout-form { border-top: 1px solid var(--line); padding-top: 20px; margin-top: 24px; }
@media (max-width: 1000px) {
  .library-games { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 28px 20px; }
  .page-heading { gap: 16px; }
}
@media (max-width: 700px) {
  body { padding: 0; }
  .app-shell { border: 0; border-radius: 0; min-height: 100dvh; }
  .app-header { padding: 24px 20px; }
  .brand { font-size: 27px; }
  main { padding: 4px 20px 36px; }
  h1 { font-size: 28px; letter-spacing: -.8px; }
  h2 { font-size: 21px; }
  .bottom-nav { width: 100%; padding-inline: 8px; gap: 0; }
  .bottom-nav a { min-height: 58px; font-size: 12px; }
  .bottom-nav .icon { width: 24px; height: 24px; }
  .page-heading { display: block; margin-top: 0; margin-bottom: 20px; }
  .subtitle { font-size: 16px; }
  .heading-actions { align-items: flex-start; margin-top: 18px; }
  .library-toolbar { flex-direction: column; gap: 12px; margin-bottom: 12px; }
  .view-switch { width: 100%; }
  .library[data-layout=auto] .view-gallery { background: transparent; color: #3c5b4c; font-weight: 400; }
  .library[data-layout=auto] .view-list { background: var(--accent); color: white; font-weight: 600; }
  .library-games { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 22px 16px; }
  .library[data-layout=auto] .library-games { grid-template-columns: minmax(0,1fr); gap: 0; }
  .library[data-layout=liste] .library-game, .library[data-layout=auto] .library-game { display: grid; grid-template-columns: 80px minmax(0,1fr); gap: 16px; padding: 18px 0; align-items: start; border-bottom: 1px solid var(--line); }
  .library[data-layout=auto] .game-card-copy { padding-top: 0; }
  .library[data-layout=auto] .game-cover { aspect-ratio: auto; }
  .library[data-layout=auto] .game-cover img { height: auto; }
  .library[data-layout=auto] .game-cover [data-cover-fallback], .library[data-layout=liste] .game-cover [data-cover-fallback] { min-height: 80px; padding: 6px; }
  .library[data-layout=auto] .game-cover [data-cover-fallback] span:last-child, .library[data-layout=liste] .game-cover [data-cover-fallback] span:last-child { font-size: 11px; white-space: nowrap; }
  .game-card-copy h2 { font-size: 17px; }
  .game-summary, .game-card-copy .game-metadata { font-size: 13px; }
  .panel { padding: 20px; }
  .detail-columns { grid-template-columns: minmax(0,1fr); gap: 0; }
  .detail-heading { gap: 18px; align-items: flex-start; margin-bottom: 24px; }
  .detail-heading .game-cover { width: 88px; flex-basis: 88px; }
  .detail-heading .game-cover [data-cover-fallback] { min-height: 88px; padding: 6px; }
  .detail-heading h1 { font-size: 25px; }
  .detail-heading .game-metadata { font-size: 14px; margin: 8px 0; }
  .detail-heading > div:last-child { min-width: 0; }
  .detail-heading a { font-size: 13px; }
  .game-details .checkbox-field label { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; } }
.edition-metadata { display:flex; flex-wrap:wrap; align-items:center; gap:.4rem .75rem; font-size:.85rem; margin:.4rem 0; }
.publisher-badge { display:inline-flex; align-items:center; gap:.35rem; }
.publisher-badge img { object-fit:contain; max-width:60px; }
.game-terms { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr)); gap:1rem; }
.game-terms dt { font-weight:650; }
.game-terms dd { margin:.3rem 0 0; font-size:.9rem; }
.game-terms details { font-size:.8rem; margin-top:.35rem; }
.expansion-list { list-style:none; padding:0; }
.expansion-list > li { border-top:1px solid var(--line, #cbded3); margin-top:1rem; padding:1rem 0; }
[data-catalog-form] [hidden] { display:none !important; }
.game-kind{display:inline-flex;align-items:center;gap:.4rem;vertical-align:middle;font-weight:600}.game-kind svg{flex:0 0 24px}.badges .game-kind span{padding:0;background:none;border:0}.description-research{max-width:850px;margin-inline:auto;margin-bottom:1rem}.research-links{padding-left:1.2rem}.research-links li{margin:.8rem 0}.research-links small{display:block;color:var(--muted);overflow-wrap:anywhere}.description-research textarea{min-height:12rem}.description-preview{margin-top:1.5rem;padding:1rem;border:1px solid var(--line);border-radius:12px;background:var(--surface);overflow-wrap:anywhere}.description-filter{margin:.75rem 0}
