/* The switch lives at the viewport's right edge, as marked in the reference. */
.topbar{position:relative}
.theme-toggle{position:absolute;right:24px;top:50%;transform:translateY(-50%);display:flex;align-items:center;gap:6px;padding:5px;border:1px solid #c7cbc0;border-radius:22px;background:#eeefe5;color:#56624f;cursor:pointer;min-height:40px}
.theme-toggle svg{width:27px;height:27px;padding:5px;border-radius:50%;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.theme-toggle .theme-sun{background:#fffef8;box-shadow:0 1px 3px #25352c26}
.theme-toggle:focus-visible{outline:3px solid #a77a42;outline-offset:4px}
html[data-theme="dark"]{--paper:#202020;--ink:#e8e8e8;--muted:#b6b6b6;--line:#494949;--plum:#d5d5d5;color-scheme:dark}
html[data-theme="dark"] body{background:radial-gradient(#ffffff0b .5px,transparent .5px) 0 0/5px 5px,var(--paper)}
[data-theme="dark"] .topbar{background:#242424;border-color:#444444}
[data-theme="dark"] .theme-toggle{background:#303030;border-color:#565656;color:#cecece}
[data-theme="dark"] .theme-toggle .theme-sun{background:none;box-shadow:none}
[data-theme="dark"] .theme-toggle .theme-moon{background:#5a5a5a;color:#ffffff;box-shadow:0 1px 3px #0005}
[data-theme="dark"] .filter-panel{background:#2a2a2a;border-color:#4b4b4b;box-shadow:0 3px #191919,0 8px 22px #0002}
[data-theme="dark"] :is(.brand small,.topnote,.filter-heading .eyebrow,.filter-heading>span,.check,.store-filter,.store-filter select,.catalog-heading .eyebrow,.section-heading>span,.card-bottom,.card-note,.store-label,.note-indicator,footer,footer strong){color:#bcbcbc}
[data-theme="dark"] .stream-link{border-color:#555555;color:#e8e8e8}
[data-theme="dark"] .search input,[data-theme="dark"] select{background-color:#222222;border-color:#626262;color:#eeeeee}
[data-theme="dark"] input::placeholder{color:#b3b3b3}
[data-theme="dark"] .search svg{color:#c1c1c1}
[data-theme="dark"] .nav-item{background:#333333;border-color:#505050;color:#e6e6e6}
[data-theme="dark"] .nav-item:hover{background:#424242}
[data-theme="dark"] .nav-item b{background:#484848;color:#d7d7d7}
[data-theme="dark"] .nav-item.active{background:#c2c2c2;color:#252525;border-color:#d0d0d0}
[data-theme="dark"] .nav-item.active b{background:#a4a4a4;color:#202020}
[data-theme="dark"] .stats{background:#333333;border-color:#555555;box-shadow:inset 0 1px #666666}
[data-theme="dark"] .stats div{border-color:#555555}
[data-theme="dark"] .stats strong{color:#e2e2e2;text-shadow:none}
[data-theme="dark"] .stats span{color:#c7c7c7}
[data-theme="dark"] .view-switch{background:#3b3b3b}
[data-theme="dark"] .view-switch button.selected{background:#c2c2c2;color:#252525}
[data-theme="dark"] .status{color:#cbd4c3}
[data-theme="dark"] .reset{color:#e3b78e}
[data-theme="dark"] .load-more{background:#383838;border-color:#6b6b6b;color:#e6e6e6}
[data-theme="dark"] .load-more:hover{background:#484848}
[data-theme="dark"] footer,[data-theme="dark"] .empty{border-color:#4b4b4b}
[data-theme="dark"] .empty p{color:#bcbcbc}
/* Neutral graphite surfaces throughout dark mode. */
[data-theme="dark"] #details{--glass-ink:#e8e8e8;--glass-muted:#bcbcbc;--glass-accent:#d5d5d5;--glass-edge:#636363;background:#242424}
[data-theme="dark"] #details .detail-body{background:linear-gradient(125deg,#333333,#282828);box-shadow:inset 0 0 0 8px #ffffff08}
[data-theme="dark"] #details :is(.detail-fields,.detail-note,.detail-score,.detail-year,.detail-actions a){background:#22222299;box-shadow:none}
@media(max-width:1500px){.topbar{padding-right:120px}.theme-toggle{right:20px}.topnote{display:none}}
@media(max-width:550px){.topbar{height:auto;min-height:92px;flex-wrap:wrap;padding:14px 100px 14px 15px;gap:9px}.brand{font-size:18px}.stream-link{margin-left:51px}.theme-toggle{right:14px}}

/* A legible motto, with its own line when the header becomes narrow. */
.topbar .topnote{display:block;font-size:18px;font-weight:400;text-transform:uppercase;letter-spacing:.08em;line-height:1.45;color:#535d4d;text-align:center}
[data-theme="dark"] .topbar .topnote{color:#d5d5d5}
@media(max-width:1100px){.topbar{height:auto;min-height:90px;flex-wrap:wrap;padding-top:15px;padding-bottom:15px;row-gap:12px}.topbar .topnote{order:4;flex-basis:100%;font-size:17px}}
@media(max-width:550px){.topbar .topnote{font-size:16px;text-align:left}.topbar .stream-link{margin-left:0}}

/* Clear status labels, on the shelf and inside the game details. */
#details .detail-fields:has(.detail-completed) .detail-genres{grid-column:auto;min-width:0}
#details .detail-completed{min-width:0}
#details .detail-completed dd{font-variant-numeric:tabular-nums}
@media(max-width:450px){#details .detail-fields:has(.detail-completed){grid-template-columns:1fr}}
#filters .filter-heading{flex-wrap:wrap;gap:10px 20px}
#filters .filter-heading .eyebrow,#filters .filter-heading>span{font-size:18px;line-height:1.5;letter-spacing:.05em;color:var(--ink);font-weight:400}
@media(max-width:550px){#filters .filter-heading .eyebrow,#filters .filter-heading>span{font-size:16px}}
.filter-panel .controls{flex-wrap:wrap}
.filter-panel .controls .search{flex:1 1 300px}
.filter-panel .selects{display:flex;flex:1 1 520px;flex-wrap:wrap;gap:10px}
.filter-panel .selects label{flex:1 1 150px;min-width:0}
.filter-panel .selects select{width:100%;min-width:0}
:root .status.next{padding:3px 8px;border:1px solid #d6ad35;border-radius:4px;font-size:13px;line-height:1.3;gap:6px;background:#fff0b8;color:#705014}
[data-theme="dark"] .status.next{background:#51421e;border-color:#d6b54d;color:#ffe59b}
:root .status.completed,:root .status.dropped,:root .status.playing,:root .status.little{padding:3px 8px;border:1px solid;border-radius:4px;font-size:13px;line-height:1.3;gap:6px}
:root .status.little{background:#fff6d7;border-color:#d6ad35;color:#765816}
[data-theme="dark"] .status.little{background:#443a1d;border-color:#d6b54d;color:#ffe498}
:root .status.completed{background:#e3efdf;border-color:#a4c59c;color:#2c5d36}
:root .status.dropped{background:#fbe7e5;border-color:#d9a4a0;color:#9c3530}
:root .status.playing{background:#e3efff;border-color:#83afe0;color:#245687}
:root .status.completed::before{content:"✓";font-size:13px;font-weight:700}
:root .status.dropped::before{content:"×";font-size:17px;font-weight:700;line-height:1}
[data-theme="dark"] .status.completed{background:#1f4932;border-color:#437d57;color:#c9f1d7}
[data-theme="dark"] .status.dropped{background:#512d2d;border-color:#9b5450;color:#ffd2ce}
[data-theme="dark"] .status.playing{background:#203e5d;border-color:#548bc0;color:#c8e5ff}

/* Readable, full-width list rows. Grid cards keep their existing sizes. */
#games:not(.list) .card-bottom,#games:not(.list) .card-note{display:none}
#games:not(.list) .store-label{font-size:17px;line-height:1.4;letter-spacing:0}
#games:not(.list) .jewel-case>.rating-badge{font-size:24px;line-height:1.15;padding:10px 13px;bottom:18px;right:-4px;color:#332b17;background:#f3e6b4;border-color:#c0a769;box-shadow:0 3px 6px #0005}
#games:not(.list) .jewel-case>.rating-badge.ten{background:#edcb8e;border-color:#b78c46}
#games:not(.list) .rating-badge small{font-size:18px;color:#514225}
@media(max-width:550px){#games:not(.list) .jewel-case>.rating-badge{font-size:21px;padding:8px 10px;bottom:14px}#games:not(.list) .rating-badge small{font-size:16px}}
#catalog .catalog-heading{align-items:center;gap:18px;flex-wrap:wrap;margin-bottom:26px}
#catalog .catalog-heading h2{font-size:32px;line-height:1.25}
#catalog .catalog-heading .eyebrow{font-size:16px;line-height:1.5;letter-spacing:.07em;margin-bottom:10px}
#catalog #result-count{font-size:22px;line-height:1.5;color:var(--ink)}
@media(max-width:550px){#catalog .catalog-heading h2{font-size:28px}#catalog .catalog-heading .eyebrow{font-size:14px}#catalog #result-count{font-size:19px}}
#games.game-grid.list{align-items:stretch;gap:24px}
#games.list .game-card{width:100%;grid-template-columns:140px minmax(0,1fr);gap:26px;padding-bottom:24px;border-bottom-color:var(--line)}
#games.list .jewel-case{width:140px}
#games.list .card-body{padding:4px 0;min-width:0}
#games.list .card-title{font-size:23px;line-height:1.35;margin:12px 0;min-height:0}
#games.list .card-title button{overflow-wrap:anywhere}
#games.list .card-meta{justify-content:flex-start;align-items:center;gap:14px;flex-wrap:wrap}
:root #games.list .status{font-size:16px;padding:5px 10px;line-height:1.4}
#games.list .store-label{font-size:15px}
#games.list .card-bottom{font-size:17px;line-height:1.5;gap:12px 24px;flex-wrap:wrap}
#games.list .note-indicator{font-size:15px}
#games.list .card-note{font-size:17px;line-height:1.5;margin-top:12px;white-space:normal;display:block;overflow:visible;-webkit-line-clamp:unset}
#games.list .jewel-case>.rating-badge{font-size:16px;padding:5px 8px}
#games.list .rating-badge small{font-size:12px}
@media(max-width:550px){#games.list .game-card{grid-template-columns:105px minmax(0,1fr);gap:16px}#games.list .jewel-case{width:105px}#games.list .card-title{font-size:19px;margin:9px 0}#games.list .card-bottom,#games.list .card-note{font-size:15px}:root #games.list .status{font-size:14px}#games.list .store-label,#games.list .note-indicator{font-size:14px}}

/* Steam release year beside the personal rating. */
#details .detail-score-line{display:flex;align-items:stretch;gap:10px;flex-wrap:wrap}
#details .detail-score-line .detail-score{min-width:0;max-width:100%;align-items:baseline}
#details .detail-score-line .detail-muted{align-self:center;margin:0}
#details .detail-year{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-width:78px;padding:10px 12px;border:1px solid var(--glass-edge);border-radius:7px;color:var(--glass-accent);background:hsl(var(--glass-h) var(--glass-s) 93% / .8);box-sizing:border-box}
#details .detail-year strong{font-size:22px;font-weight:600;line-height:1.1;font-variant-numeric:tabular-nums}
#details .detail-year span{font-size:12px;line-height:1.25;color:var(--glass-muted)}
@media(max-width:550px){#details .detail-score-line{gap:8px}#details .detail-year{min-width:70px;padding:8px 10px}#details .detail-year strong{font-size:20px}}

/* Social links share one group and wrap before the header becomes crowded. */
.topbar .social-links{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:8px;flex-shrink:0}
.topbar .social-links .stream-link{margin:0;white-space:nowrap}
@media(max-width:1500px){.topbar{height:auto;min-height:90px;flex-wrap:wrap;padding-top:15px;padding-bottom:15px;row-gap:12px}.topbar .topnote{order:4;flex-basis:100%;font-size:17px}}
@media(max-width:850px){.topbar .social-links{flex-basis:100%;justify-content:flex-start}.topbar .topnote{text-align:left}}
@media(max-width:550px){.topbar .social-links{gap:7px}.topbar .social-links .stream-link{font-size:12px;padding:8px 10px}.topbar .topnote{font-size:16px}}
.topbar .brand{flex-shrink:0}.topbar .topnote{min-width:0}@media(min-width:1501px){.topbar .social-links{margin-right:80px}.topbar .topnote{flex:1}}

footer{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:20px}footer>div{min-width:0;max-width:none}footer>div:last-child{justify-self:end;text-align:right}.contact-line{grid-column:2;grid-row:1;margin:0;padding:0;text-align:center;font-size:14px;line-height:1.6;color:var(--muted);overflow-wrap:anywhere}.contact-line a{color:inherit;text-decoration:underline;text-underline-offset:3px}.contact-line a:hover{color:var(--ink)}

@media(max-width:850px){footer{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}footer>div:first-child{grid-column:1;grid-row:1}footer>div:last-child{grid-column:2;grid-row:1;max-width:none}.contact-line{grid-column:1/-1;grid-row:2}}
