/* Game Tracker -- dense dark catalogue. Dark by default, light via prefers-color-scheme. */
@font-face {
  font-family: "Inter";
  src: url("/static/fonts/Inter-var.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #14181c; --bg-2: #1b2128; --bg-3: #242c35; --line: #2c3641;
  --text: #d8e0e8; --text-2: #9aabbb; --muted: #678; --star-empty: #3b4652;
  --accent: #00b86b; --accent-ink: #06140d; --accent-2: #ff8000; --danger: #e5484d; --star: #ffb400;
  --s-want_to_play: #5aa9e6; --s-backlog: #8a96a3; --s-playing: #00b86b; --s-on_hold: #e0a030;
  --s-played: #a58de0; --s-completed: #ffb400; --s-dropped: #e5484d;
  --cover-edge: inset 0 0 0 1px rgb(255 255 255 / .08);
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f4f5f7; --bg-2: #fff; --bg-3: #eceef1; --line: #d6dae0;
    --text: #1c2127; --text-2: #4a5560; --muted: #7a8591; --star-empty: #cfd4da;
    --accent: #008f55; --accent-ink: #fff; --accent-2: #d96a00; --danger: #c62828; --star: #e69a00;
    --s-want_to_play: #2f80c4; --s-backlog: #6b7682; --s-playing: #008f55; --s-on_hold: #b77a0c;
    --s-played: #7a5cc4; --s-completed: #c98a00; --s-dropped: #c62828;
    --cover-edge: inset 0 0 0 1px rgb(0 0 0 / .1);
    color-scheme: light;
  }
}

/* status colour hook: any element with .status-x gets --sc */
.status-want_to_play { --sc: var(--s-want_to_play); }
.status-backlog { --sc: var(--s-backlog); }
.status-playing { --sc: var(--s-playing); }
.status-on_hold { --sc: var(--s-on_hold); }
.status-played { --sc: var(--s-played); }
.status-completed { --sc: var(--s-completed); }
.status-dropped { --sc: var(--s-dropped); }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 14px/1.45 var(--sans); font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased; counter-reset: selected;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
.text-link { color: var(--text-2); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 2px; }
.text-link:hover { color: var(--accent); text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1 { font-size: 24px; line-height: 1.2; font-weight: 600; margin: 0; letter-spacing: -.01em; }
h2 {
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted);
  margin: 32px 0 12px; padding-bottom: 6px; border-bottom: 1px solid var(--line);
  display: flex; align-items: baseline; gap: 12px;
}
.h2-link { margin-left: auto; font-size: 11px; color: var(--muted); }
.label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }
.sep { color: var(--muted); padding: 0 2px; }
.empty { color: var(--muted); margin: 8px 0 24px; }
.error, .notice { color: var(--danger); }
.notice { color: var(--text-2); border-left: 3px solid var(--danger); padding: 8px 12px; background: var(--bg-2); }
code { font-size: 12.5px; background: var(--bg-3); padding: 1px 5px; border-radius: 2px; }
.icon { width: 16px; height: 16px; flex: none; fill: currentColor; vertical-align: -3px; }

main { max-width: 1180px; margin: 0 auto; padding: 24px 20px 96px; }

/* ---- controls ---- */
input, select, textarea, button { font: inherit; color: inherit; }
input:not([type=checkbox]):not([type=radio]), select, textarea {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 3px; padding: 6px 9px; min-height: 32px;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: none; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; box-shadow: 0 0 0 1px var(--accent); }
textarea { resize: vertical; line-height: 1.5; }
input[type=date] { color-scheme: inherit; }
::placeholder { color: var(--muted); }
button { cursor: pointer; background: none; border: 0; padding: 0; }
button:disabled { opacity: .5; cursor: progress; }
.btn {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px;
  background: var(--bg-3); border: 1px solid var(--line); border-radius: 3px; color: var(--text);
  font-size: 13px; font-weight: 500; white-space: nowrap; transition: background-color .1s, border-color .1s;
}
.btn:hover { color: var(--text); border-color: var(--muted); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn.primary:hover { filter: brightness(1.08); color: var(--accent-ink); }
button.link { color: var(--muted); font-size: 13px; }
button.link:hover { color: var(--text); text-decoration: underline; }
button.link.danger:hover { color: var(--danger); }

/* ---- nav ---- */
.navbar { background: var(--bg-2); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.nav-inner { max-width: 1180px; margin: 0 auto; height: 48px; padding: 0 20px; display: flex; align-items: center; gap: 28px; }
.wordmark { font-size: 13px; font-weight: 750; letter-spacing: .16em; text-transform: uppercase; color: var(--text); }
.wordmark:hover { color: var(--text); }
.nav-links { display: flex; gap: 20px; height: 100%; }
.nav-links a { display: flex; align-items: center; color: var(--text-2); font-size: 13px; font-weight: 500; border-bottom: 2px solid transparent; padding-top: 2px; }
.nav-links a:hover { color: var(--text); }
.nav-links a[aria-current] { color: var(--text); border-bottom-color: var(--accent); }
.nav-search { margin-left: auto; position: relative; display: flex; align-items: center; }
.nav-search .icon { position: absolute; left: 8px; color: var(--muted); pointer-events: none; }
.navbar .btn { gap: 0; }
.nav-user { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); max-width: 160px; }
.nav-user span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-user[aria-current] { color: var(--text); }
.nav-user img, .avatar-blank { width: 24px; height: 24px; border-radius: 2px; flex: none; background: var(--bg-3); }
.nav-search input { width: 200px; padding-left: 30px !important; height: 30px; min-height: 0 !important; background: var(--bg) !important; font-size: 13px; }

/* ---- toast ---- */
.toast {
  position: fixed; bottom: 20px; right: 20px; max-width: 360px; z-index: 50;
  background: var(--bg-3); border: 1px solid var(--line); border-left: 3px solid var(--danger);
  border-radius: 2px; padding: 10px 14px; font-size: 13px;
}

/* ---- covers ---- */
.cover {
  position: relative; display: block; aspect-ratio: 264 / 374; border-radius: 2px; overflow: hidden;
  background: var(--bg-3);
}
.cover::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: var(--cover-edge); pointer-events: none; }
.cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: filter .1s; }
.no-cover {
  position: absolute; inset: 0; display: flex; align-items: flex-end; padding: 10px;
  background: linear-gradient(165deg, var(--bg-3) 30%, color-mix(in srgb, var(--line) 60%, var(--bg-3)));
  font-family: var(--serif); font-size: 15px; line-height: 1.2; color: var(--text-2); overflow: hidden;
}
.card:hover .no-cover span { opacity: 0; }
.no-cover span { display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.status-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--sc); z-index: 1; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px 12px; }
.grid-lg { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.card { position: relative; min-width: 0; }
.card-link { display: block; color: inherit; }
.card-link:hover { color: inherit; }
.card-link:hover .cover::after, .card-link:focus-visible .cover::after { box-shadow: inset 0 0 0 2px var(--accent); }
.card-link:hover img { filter: brightness(1.1); }
.card-link:focus-visible { outline: none; }
.card h3 {
  margin: 7px 0 0; font-size: 12.5px; font-weight: 500; line-height: 1.3; color: var(--text-2);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-link:hover h3 { color: var(--text); }
.card .meta { display: flex; gap: 8px; align-items: center; margin-top: 2px; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.score { display: inline-flex; align-items: center; gap: 3px; color: var(--text-2); }
.score .icon { width: 11px; height: 11px; color: var(--star); vertical-align: 0; }

/* selection checkbox: hidden until hover or until something is selected */
.card .select {
  position: absolute; top: 6px; left: 6px; width: 16px; height: 16px; margin: 0; z-index: 3;
  accent-color: var(--accent); opacity: 0; cursor: pointer; transition: opacity .1s;
}
.card:hover .select, .card .select:focus-visible, .library:has(.select:checked) .select { opacity: 1; }
.card .select:checked { counter-increment: selected; }
.card:has(.select:checked) .cover::after { box-shadow: inset 0 0 0 2px var(--accent); }

/* quick status overlay (pointer devices only) */
.quick {
  position: absolute; left: 0; right: 0; top: 0; aspect-ratio: 264 / 374; z-index: 2;
  display: flex; align-items: flex-end; justify-content: space-between; padding: 0 4px 8px;
  background: linear-gradient(transparent 58%, rgb(0 0 0 / .82));
  border-radius: 2px; opacity: 0; pointer-events: none; transition: opacity .1s;
}
.quick button { width: 20px; height: 22px; display: grid; place-items: center; color: rgb(255 255 255 / .6); border-radius: 2px; }
.quick button:hover { color: #fff; background: rgb(255 255 255 / .14); }
.quick button.on { color: var(--sc); }
.quick .icon { width: 14px; height: 14px; vertical-align: 0; }
.card:hover .quick, .card:focus-within .quick { opacity: 1; }
.card:hover .quick button, .card:focus-within .quick button { pointer-events: auto; }
@media (hover: none) { .quick { display: none; } }

.load-more { grid-column: 1 / -1; justify-self: center; margin-top: 12px; padding: 8px 16px; color: var(--text-2); font-size: 13px; }
.load-more:hover { color: var(--text); text-decoration: underline; }

/* status as text */
.status-tag { display: inline-flex; align-items: center; gap: 5px; color: var(--sc, var(--muted)); font-weight: 500; }

/* ---- page heads ---- */
.page-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head .muted { font-size: 13px; }

/* ---- dashboard ---- */
.summary-line { margin: 0 0 8px; font-size: 13px; color: var(--text-2); }
.summary-line a:hover { color: var(--accent); }
.dash { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 40px; }
.dash-main { min-width: 0; }
.dash-main > section:first-child h2 { margin-top: 16px; }
.dash-side h2 { margin-top: 16px; }
.strip { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.strip-item { flex: 0 0 110px; min-width: 0; }
.strip-item:hover .cover::after { box-shadow: inset 0 0 0 2px var(--accent); }
.strip-item .no-cover { font-size: 12.5px; padding: 8px; }
.strip-title { display: block; margin-top: 5px; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.strip-item:hover .strip-title { color: var(--text); }
.dist { display: flex; height: 8px; gap: 1px; border-radius: 1px; overflow: hidden; background: var(--bg-3); }
.dist span { background: var(--sc); min-width: 2px; }
.legend { list-style: none; padding: 0; margin: 12px 0 0; font-size: 13px; }
.legend a { display: flex; align-items: center; gap: 8px; padding: 4px 0; color: var(--text-2); }
.legend a:hover { color: var(--text); }
.legend .num { margin-left: auto; color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 1px; background: var(--sc, var(--bg-3)); flex: none; }
.legend-total { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 4px; }

/* ---- library ---- */
.library {
  display: grid; grid-template-columns: 200px minmax(0, 1fr); column-gap: 32px;
  grid-template-areas: "tabs tabs" "side tool" "side main";
}
#filters { display: contents; }
.tabs { grid-area: tabs; display: flex; gap: 22px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; }
.tab { position: relative; display: flex; align-items: baseline; gap: 6px; padding: 8px 0 10px; font-size: 13px; color: var(--text-2); cursor: pointer; white-space: nowrap; }
.tab .num { font-size: 11.5px; color: var(--muted); }
.tab input { position: absolute; opacity: 0; pointer-events: none; }
.tab:hover { color: var(--text); }
.tab:has(input:checked) { color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); }
.tab:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: -2px; }
.toolbar { grid-area: tool; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.search-field { position: relative; flex: 1 1 220px; max-width: 320px; display: flex; align-items: center; }
.search-field .icon { position: absolute; left: 9px; color: var(--muted); }
.search-field input { width: 100%; padding-left: 31px !important; }
.sort-field { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.dir-toggle .icon { color: var(--muted); }
.dir-toggle[data-dir="asc"] .icon { transform: scaleY(-1); }
.filters { grid-area: side; align-self: start; position: sticky; top: 64px; max-height: calc(100vh - 80px); overflow-y: auto; scrollbar-width: thin; }
.results { grid-area: main; min-width: 0; }
.result-count { margin: 0 0 12px; font-size: 12px; color: var(--muted); }
.facet { border-bottom: 1px solid var(--line); }
.facet summary { list-style: none; cursor: pointer; padding: 10px 0; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); display: flex; }
.facet summary::-webkit-details-marker { display: none; }
.facet summary::after { content: "+"; margin-left: auto; font-weight: 400; }
.facet[open] summary::after { content: "\2212"; }
.facet summary:hover { color: var(--text); }
.facet-options { display: flex; flex-direction: column; padding-bottom: 10px; max-height: 260px; overflow-y: auto; scrollbar-width: thin; }
.opt { display: block; padding: 3px 0; font-size: 13px; color: var(--text-2); cursor: pointer; }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt:hover { color: var(--text); }
.opt:has(input:checked) { color: var(--accent); font-weight: 500; }
.opt:has(input:focus-visible) { outline: 2px solid var(--accent); }
.opt:has(input[type=checkbox]) { display: flex; align-items: center; gap: 8px; }
.opt input[type=checkbox] { position: static; opacity: 1; pointer-events: auto; flex: none; width: 13px; height: 13px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.opt:has(input[type=checkbox]:focus-visible) { outline: 0; }
.opt-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.opt .num { margin-left: auto; padding-left: 8px; font-size: 11.5px; color: var(--muted); font-weight: 400; font-variant-numeric: tabular-nums; }
.opt.zero { opacity: .6; }
.facet:not(.show-all) .opt.extra, .more-opts .when-open, .show-all .more-opts .when-closed { display: none; }
.show-all .more-opts .when-open { display: inline; }
.more-opts { margin-top: 4px; align-self: flex-start; font-size: 12px; }
.opt-empty { margin: 0; padding: 3px 0; font-size: 12px; color: var(--muted); }
.facet .hint { margin-left: 6px; font-weight: 400; text-transform: none; letter-spacing: 0; }
.facet .facet-options { max-height: none; overflow: visible; }

.result-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 12px; }
.result-head .result-count { margin: 0; }
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; list-style: none; margin: 0; padding: 0; }
.chip {
  display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 6px 0 8px; font-size: 12px;
  background: var(--bg-3); border: 1px solid var(--line); border-radius: 3px; color: var(--text);
}
.chip .icon { width: 10px; height: 10px; color: var(--muted); }
.chip:hover { color: var(--text); border-color: var(--accent); }
.chip:hover .icon { color: var(--accent); }
.clear-filters { font-size: 12px; margin-left: 4px; }

.select-toggle .icon { color: var(--muted); }
.select-toggle[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
.select-toggle[aria-pressed="true"] .icon { color: var(--accent); }
.library.selecting .select { opacity: 1; }
.library.selecting .quick, .library.selecting .status-btn { display: none !important; }
.library.selecting .card-link { cursor: default; }

/* status button + bottom sheet (touch only; pointer devices use the hover overlay) */
.status-btn, .q-label, .sheet-title { display: none; }
.card.leaving { animation: card-leave .35s ease forwards; pointer-events: none; }
@keyframes card-leave { to { opacity: 0; transform: scale(.94); } }
@media (hover: none) {
  .card .select { display: none; }
  .library.selecting .card .select { display: block; width: 22px; height: 22px; top: 4px; left: 4px; }
  .status-btn {
    display: grid; place-items: center; position: relative; margin-left: auto; width: 28px; height: 22px; flex: none;
    color: var(--sc, var(--text-2)); border: 1px solid var(--line); border-radius: 3px; background: var(--bg-2);
  }
  .status-btn::before { content: ""; position: absolute; inset: -8px -6px; } /* bigger tap target */
  .status-btn .icon { width: 13px; height: 13px; vertical-align: 0; }
  .card.menu-open .quick {
    display: grid; grid-template-columns: 1fr 1fr; gap: 6px; position: fixed; inset: auto 0 0 0; aspect-ratio: auto;
    z-index: 60; opacity: 1; pointer-events: auto; padding: 14px 16px calc(16px + env(safe-area-inset-bottom));
    background: var(--bg-2); border-top: 1px solid var(--line); border-radius: 8px 8px 0 0;
    box-shadow: 0 0 0 100vmax rgb(0 0 0 / .55);
  }
  .card.menu-open .quick button {
    display: flex; align-items: center; gap: 10px; width: auto; height: 44px; padding: 0 12px; pointer-events: auto;
    background: var(--bg-3); color: var(--text); font-size: 14px; text-align: left;
  }
  .card.menu-open .quick button .icon { width: 16px; height: 16px; color: var(--sc); }
  .card.menu-open .quick button.on { box-shadow: inset 0 0 0 1px var(--sc); }
  .card.menu-open .quick button::after { display: none; }
  .card.menu-open .q-label { display: flex; flex-direction: column; line-height: 1.15; }
  .q-note { color: var(--muted); font-size: 11.5px; }
  .card.menu-open .sheet-title {
    display: block; grid-column: 1 / -1; margin: 0 0 4px; font-size: 13px; font-weight: 600; color: var(--text-2);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
}

/* view toggle (grid / table) */
.view-toggle { display: inline-flex; }
.view-toggle .btn { padding: 0 9px; color: var(--muted); }
.view-toggle .btn:first-child { border-radius: 3px 0 0 3px; }
.view-toggle .btn:last-child { border-radius: 0 3px 3px 0; margin-left: -1px; }
.view-toggle .btn[aria-pressed="true"] { color: var(--accent); border-color: var(--accent); position: relative; z-index: 1; }

/* library table view: rows are .card articles (select mode, quick status, leaving all reuse the card code) */
.gtable { border-top: 1px solid var(--line); }
.trow {
  display: grid; align-items: center; gap: 12px; min-height: 54px; padding: 4px 8px;
  grid-template-columns: 16px 32px minmax(0, 2.2fr) minmax(0, 1.2fr) 112px 58px 80px 44px 84px;
  border-bottom: 1px solid var(--line); font-size: 13px;
}
.trow > * { min-width: 0; }
.trow:not(.thead):hover { background: var(--bg-2); }
.trow:has(.select:checked) { background: color-mix(in srgb, var(--accent) 9%, transparent); }
.trow.menu-open { z-index: 20; }
.thead { min-height: 34px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.th { display: inline-flex; align-items: center; gap: 4px; justify-self: start; font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; white-space: nowrap; }
button.th:hover, .th.on { color: var(--text); }
.th .icon { width: 12px; height: 12px; vertical-align: 0; }
.th .dir-asc { transform: scaleY(-1); }
.thead .c-rating, .thead .c-time, .thead .c-year, .thead .c-updated { justify-self: end; }
.c-rating, .c-time, .c-year, .c-updated { text-align: right; }
.trow .select { position: static; opacity: 1; width: 14px; height: 14px; display: block; }
.tcover { display: block; width: 32px; aspect-ratio: 264 / 374; border-radius: 2px; overflow: hidden; background: var(--bg-3); box-shadow: var(--cover-edge); }
.tcover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.trow .c-title { font-weight: 500; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.3; }
.trow .c-title:hover { color: var(--accent); }
.c-plat { color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-time, .c-year { color: var(--text-2); }
.c-updated { color: var(--muted); font-size: 12px; }
.trow .score { justify-content: flex-end; }
.c-status { position: relative; }
.trow .status-btn {
  display: inline-flex; align-items: center; gap: 6px; width: auto; height: 28px; margin: 0 0 0 -6px; padding: 0 6px;
  color: var(--sc, var(--muted)); font-weight: 500; font-size: 13px; border: 0; border-radius: 3px; background: none; white-space: nowrap;
}
.trow .status-btn:hover, .trow.menu-open .status-btn { background: var(--bg-3); }
.trow .status-btn .icon { width: 14px; height: 14px; }
.trow .status-btn::before { content: none; }
.trow .quick { display: none; }
.library.selecting .trow .status-btn { display: inline-flex !important; pointer-events: none; }
@media (hover: hover) {
  .trow.menu-open .quick {
    display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 1px;
    inset: calc(100% + 2px) auto auto -6px; width: 200px; aspect-ratio: auto; padding: 4px; z-index: 40;
    background: var(--bg-2); border: 1px solid var(--line); border-radius: 4px; box-shadow: 0 8px 24px rgb(0 0 0 / .35);
    opacity: 1; pointer-events: auto;
  }
  .trow.menu-open .quick button { display: flex; align-items: center; gap: 9px; width: auto; height: 30px; padding: 0 8px; color: var(--text); font-size: 13px; text-align: left; }
  .trow.menu-open .quick button:hover { background: var(--bg-3); color: var(--text); }
  .trow.menu-open .quick button .icon { color: var(--sc); }
  .trow.menu-open .quick button.on { box-shadow: inset 0 0 0 1px var(--sc); }
  .trow.menu-open .quick button::after { display: none; }
  .trow.menu-open .q-label { display: inline; }
  .trow .q-note { display: none; }
}
@media (hover: none) { .library:not(.selecting) .trow .c-check { visibility: hidden; } }

.bulk-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: none;
  align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center;
  padding: 10px 20px; background: var(--bg-2); border-top: 1px solid var(--line);
}
body:has(#game-grid .select:checked) .bulk-bar { display: flex; }
.bulk-count { margin-right: 8px; font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; }
.bulk-count::before { content: counter(selected) " selected"; }
.bulk-sep { width: 1px; height: 20px; background: var(--line); margin: 0 4px; }
.bulk-msg { font-size: 13px; color: var(--text-2); }
.bulk-msg:empty { display: none; }

/* list page: add from library */
.list-add { position: relative; max-width: 420px; margin: 0 0 20px; }
.list-add .search-field { max-width: none; }
.lsr-list { list-style: none; margin: 6px 0 0; padding: 0; border: 1px solid var(--line); border-radius: 3px; background: var(--bg-2); }
.lsr { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 6px 6px 10px; font-size: 13px; }
.lsr + .lsr { border-top: 1px solid var(--line); }
.lsr-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lsr .btn { height: 28px; padding: 0 10px; }
.lsr .btn .icon { width: 12px; height: 12px; }
.lsr.added { color: var(--muted); padding-right: 12px; }
.lsr-empty { margin: 6px 0 0; font-size: 13px; }
#list-grid:has(.card-wrap) + .list-empty { display: none; }

/* ---- game detail ---- */
.sprite { display: none; }
.backdrop {  /* <img>: no inline style under the CSP */
  display: block; width: calc(100% + 40px); max-width: none; height: 180px; margin: -24px -20px -120px;
  object-fit: cover; object-position: center 30%; opacity: .25; pointer-events: none;
  /* fade on all sides so the image has no hard edges */
  mask-image: radial-gradient(ellipse 50% 100% at 50% 0%, #000 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 50% 100% at 50% 0%, #000 30%, transparent 100%);
}
.detail {
  position: relative; display: grid; grid-template-columns: 230px minmax(0, 1fr); column-gap: 40px;
  grid-template-areas: "cover head" "cover main" "side main"; grid-template-rows: auto auto 1fr; align-items: start;
}
.detail-cover { grid-area: cover; }
.detail-cover .cover-img { width: 100%; display: block; border-radius: 2px; box-shadow: 0 0 0 1px var(--line); }
.detail-cover .no-cover { font-size: 20px; padding: 16px; }
.detail-side { grid-area: side; }
.detail-head { grid-area: head; padding-top: 4px; }
.detail-main { grid-area: main; }
.detail h1 { font-family: var(--serif); font-size: 32px; font-weight: 600; line-height: 1.15; letter-spacing: 0; }
.meta-line { margin: 8px 0 0; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.genres { margin: 4px 0 0; font-size: 13px; color: var(--text-2); }
.genres a:hover { color: var(--accent); }
.detail-side h2 { margin-top: 20px; }
.status-control { display: flex; flex-direction: column; }
.status-opt {
  display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 10px; font-size: 13px; color: var(--text-2);
  border-left: 2px solid transparent; text-align: left; transition: background-color .1s;
}
.status-opt .icon { color: var(--muted); }
.status-opt:hover { background: var(--bg-2); color: var(--text); }
.status-opt:hover .icon { color: var(--sc); }
.status-opt.on { background: var(--bg-3); color: var(--sc); border-left-color: var(--sc); font-weight: 600; }
.status-opt.on .icon { color: var(--sc); }

.summary { position: relative; max-width: 65ch; margin-top: 20px; color: var(--text-2); }
.summary p { margin: 0; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-line; }
.more-toggle { position: absolute; opacity: 0; pointer-events: none; }
.more-toggle:checked ~ p { -webkit-line-clamp: unset; }
.more-toggle:checked ~ label { display: none; }
.summary label { cursor: pointer; font-size: 13px; }
.more-toggle:focus-visible ~ label { outline: 2px solid var(--accent); }

.rating-row { display: flex; align-items: center; gap: 14px; margin-top: 24px; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.rating-row + h2 { margin-top: 28px; }
.stars { display: flex; }
.half { width: 12px; height: 24px; overflow: hidden; position: relative; color: var(--star-empty); }
.half svg { position: absolute; top: 0; width: 24px; height: 24px; fill: currentColor; }
.half.l svg { left: 0; }
.half.r svg { left: -12px; }
.half.r { margin-right: 4px; }
.half.on { color: var(--star); }
.stars:hover .half { color: var(--star-empty); }
.stars .half:hover, .stars .half:has(~ .half:hover) { color: var(--star); }
.half:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; z-index: 1; }
.rating-value { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 2ch; }

.save-state { margin-left: auto; text-transform: none; letter-spacing: 0; font-weight: 400; font-size: 12px; color: var(--muted); }
.save-state.on { animation: fade 2.5s forwards; }
@keyframes fade { 0%, 60% { opacity: 1; } 100% { opacity: 0; } }
.notes-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 14px; max-width: 640px; }
.notes-form label { display: flex; flex-direction: column; gap: 5px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.notes-form input, .notes-form textarea { width: 100%; min-width: 0; font-size: 13.5px; font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--text); }
.notes-form .wide { grid-column: 1 / -1; }
.steam-log { margin: 0; font-size: 13px; }
.steam-log:empty { display: none; }
.notes-form select { width: 100%; min-width: 0; font-size: 13.5px; font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--text); }

/* play journal */
.h2-count { font-weight: 400; letter-spacing: 0; }
.journal-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 14px; max-width: 640px; margin-bottom: 18px; }
.journal-form label { display: flex; flex-direction: column; gap: 5px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.journal-form input, .journal-form select, .journal-form textarea { width: 100%; min-width: 0; font-size: 13.5px; font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--text); }
.journal-form .wide { grid-column: 1 / -1; }
.journal-month { margin: 18px 0 4px; font-size: 12px; font-weight: 600; color: var(--text-2); }
.journal-rows { list-style: none; margin: 0; padding: 0; max-width: 720px; }
.journal-row { display: grid; grid-template-columns: 56px minmax(0, 1fr) 16px 24px 24px; gap: 4px 12px; align-items: baseline; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.journal-row time { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.journal-text { margin: 0; white-space: pre-line; overflow-wrap: anywhere; color: var(--text); }
.journal-hours { color: var(--muted); font-size: 12.5px; margin-left: 4px; }
.journal-status { color: var(--sc); align-self: center; display: flex; }
.journal-status .icon { width: 14px; height: 14px; }
.journal-act { color: var(--muted); align-self: center; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 3px; opacity: .6; }
.journal-act:hover, .journal-act:focus-visible { color: var(--text); opacity: 1; background: var(--bg-3); }
.journal-del:hover, .journal-del:focus-visible { color: var(--danger); }
.journal-act .icon { width: 12px; height: 12px; }
.journal-row.editing { display: block; padding: 12px 0 12px 12px; border-left: 2px solid var(--accent); }
.journal-row.editing .journal-form { margin: 0; }
.form-actions { display: flex; align-items: center; gap: 14px; }
.dash-journal .journal-row { grid-template-columns: 92px minmax(0, 1fr) 16px; }
.journal-game { font-weight: 500; margin-right: 6px; }

.list-toggles { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.list-toggle { display: inline-flex; align-items: center; gap: 7px; padding: 3px 0; font-size: 13px; color: var(--muted); }
.list-toggle:hover { color: var(--text); }
.list-toggle.on { color: var(--accent); }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 20px; margin: 0; font-size: 13px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; color: var(--text-2); }
.facts a:hover { color: var(--accent); }
.footer-actions { display: flex; flex-wrap: wrap; gap: 20px; align-items: baseline; margin-top: 40px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.footer-actions a:hover { color: var(--text); }
.footer-actions .danger { margin-left: auto; }

/* ---- add game ---- */
.narrow { max-width: 720px; margin: 0 auto; }
.narrow h1 { margin-bottom: 16px; }
.login { min-height: 70vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; text-align: center; }
.login .wordmark { font-size: 15px; }
.login .muted { font-size: 13px; margin: 0; max-width: 40ch; }
.steam-btn { height: 40px; padding: 0 20px; }
.account-head { align-items: center; gap: 14px; }
.account-head h1 { margin: 0 0 2px; }
.account-head .text-link { font-size: 13px; }
.avatar-lg { width: 48px; height: 48px; border-radius: 2px; background: var(--bg-3); }
.logout { margin-left: auto; }
.sync-form { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 20px 0 12px; padding-bottom: 8px; }
.sync-form .muted { font-size: 13px; }
.sync-summary { font-size: 14px; color: var(--text-2); }
.unmatched summary { cursor: pointer; font-size: 13px; color: var(--muted); }
.unmatched summary:hover { color: var(--text); }
.unmatched ul { columns: 2 220px; font-size: 13px; color: var(--text-2); padding-left: 18px; }
.big-search { position: relative; margin-bottom: 20px; }
.big-search input { width: 100%; height: 48px; font-size: 16px; padding: 0 14px !important; border-width: 0 0 1px !important; border-radius: 3px 3px 0 0 !important; }
.big-search input:focus-visible { box-shadow: none; border-bottom: 1px solid var(--accent) !important; }
.progress { position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; overflow: hidden; }
.progress::after { content: ""; position: absolute; inset: 0 auto 0 0; width: 30%; background: var(--accent); animation: slide 1s linear infinite; }
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(340%); } }
.htmx-indicator { visibility: hidden; }
.htmx-request .htmx-indicator, .htmx-request.htmx-indicator { visibility: visible; }
.search-results { list-style: none; padding: 0; margin: 0; }
.search-results li { display: flex; gap: 14px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.search-results img, .thumb-blank { width: 40px; height: 56px; object-fit: cover; border-radius: 2px; background: var(--bg-3); flex: none; }
.search-results .info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.search-results .title { font-weight: 500; }
.search-results .sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-results .action { display: flex; gap: 8px; align-items: baseline; font-size: 13px; }
.search-results .action form { display: flex; gap: 6px; }
.search-results select { font-size: 12.5px; min-height: 32px; }

/* ---- lists ---- */
.new-list { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.new-list input { width: 180px; }
.list-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 32px 28px; }
.list-tile { display: flex; flex-direction: column; min-width: 0; }
.fan { display: flex; margin-bottom: 10px; }
.fan .cover { width: 64px; flex: none; box-shadow: 3px 0 6px rgb(0 0 0 / .35); }
.fan .cover + .cover { margin-left: -18px; }
.fan .cover:nth-child(1) { z-index: 5; } .fan .cover:nth-child(2) { z-index: 4; } .fan .cover:nth-child(3) { z-index: 3; }
.fan .cover:nth-child(4) { z-index: 2; } .fan .cover:nth-child(5) { z-index: 1; }
.fan .cover.blank { background: var(--bg-2); box-shadow: none; }
.fan .no-cover span { display: none; }
.list-tile:hover .fan .cover::after { box-shadow: inset 0 0 0 1px var(--accent); }
.list-name { font-size: 15px; font-weight: 600; color: var(--text); }
.list-tile:hover .list-name { color: var(--accent); }
.list-meta { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.list-head { justify-content: space-between; align-items: flex-end; margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.list-head h1 { margin: 2px 0 4px; }
.list-head p { margin: 2px 0 0; font-size: 13px; }
.head-actions { display: flex; align-items: baseline; gap: 8px; font-size: 13px; }
.head-actions form { display: inline; }
.card-wrap { position: relative; min-width: 0; }
.remove-from-list {
  position: absolute; top: 6px; right: 6px; z-index: 4; width: 22px; height: 22px; display: grid; place-items: center;
  background: rgb(0 0 0 / .7); color: #fff; border-radius: 2px; opacity: 0; transition: opacity .1s;
}
.remove-from-list .icon { width: 14px; height: 14px; vertical-align: 0; }
.card-wrap:hover .remove-from-list, .remove-from-list:focus-visible { opacity: 1; }
.remove-from-list:hover { background: var(--danger); }
@media (hover: none) { .remove-from-list { opacity: 1; } }

/* ---- responsive ---- */
@media (max-width: 999px) {
  .dash { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .dash-side h2 { margin-top: 32px; }
  .legend { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); column-gap: 24px; }
  .legend-total { border-top: 0; margin-top: 0; padding-top: 0; }
}
@media (max-width: 760px) {
  .nav-inner { gap: 16px; padding: 0 16px; }
  .nav-search { display: none; }
  .nav-links { gap: 14px; margin-left: auto; }
  .navbar .btn.primary { padding: 0 10px; }
  .wordmark { font-size: 12px; letter-spacing: .1em; }
  .hide-sm { display: none; }
  main { padding: 16px 16px 96px; }
  .grid, .grid-lg { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 14px 8px; }
  .library { grid-template-columns: minmax(0, 1fr); grid-template-areas: "tabs" "tool" "side" "main"; }
  .tabs { margin: 0 -16px 12px; padding: 0 16px; }
  .filters { position: static; max-height: none; display: flex; gap: 16px; margin-bottom: 12px; }
  .facet { flex: 1; min-width: 0; }
  .facet[open] { flex-basis: 100%; }
  .filters:has(.facet[open]) { flex-wrap: wrap; }
  .facet:not([open]) .hint { display: none; }
  .search-field { max-width: none; flex-basis: 100%; }
  .sort-field { margin-left: 0; }
  .sort-field .label { display: none; }
  .detail { grid-template-columns: 120px minmax(0, 1fr); column-gap: 16px; grid-template-areas: "cover head" "side side" "main main"; grid-template-rows: auto; }
  .detail-head { align-self: center; }
  .detail h1 { font-size: 24px; }
  .detail-side .status-control { display: grid; grid-template-columns: 1fr 1fr; }
  .detail-main { margin-top: 8px; }
  .notes-form { grid-template-columns: 1fr 1fr; }
  .backdrop { width: calc(100% + 32px); margin: -16px -16px -100px; }
  .new-list { margin-left: 0; width: 100%; }
  .new-list input { flex: 1; width: auto; min-width: 0; }
  .list-head { flex-direction: column; align-items: flex-start; }
  .footer-actions .danger { margin-left: 0; }
}
@media (max-width: 760px) {  /* table view: dense rows (cover, title, rating, status) */
  .thead, .trow .c-plat, .trow .c-time, .trow .c-year, .trow .c-updated, .library:not(.selecting) .trow .c-check { display: none; }
  .trow { grid-template-columns: 32px minmax(0, 1fr) auto auto; gap: 10px; padding: 4px 2px; }
  .library.selecting .trow { grid-template-columns: 22px 32px minmax(0, 1fr) auto auto; }
  .library.selecting .trow .select { width: 20px; height: 20px; }
  .trow .c-rating { order: 1; }
  .trow .c-status { order: 2; }
  .trow .tstatus-label { display: none; }
  .trow .status-btn { margin: 0; width: 34px; justify-content: center; border: 1px solid var(--line); background: var(--bg-2); }
  .gtable { border-top: 0; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation-duration: .01ms !important; } }

/* quick-status: name of the hovered/focused icon, so the 7 glyphs are self-explanatory */
.quick button::after {
  content: attr(data-label); position: absolute; left: 0; right: 0; bottom: 32px; padding: 0 6px;
  text-align: center; font-size: 11px; font-weight: 600; color: #fff; text-shadow: 0 1px 2px rgb(0 0 0 / .9);
  opacity: 0; pointer-events: none;
}
.quick button:hover::after, .quick button:focus-visible::after { opacity: 1; }
.first-run { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 8px; font-size: 14px; }
.first-run .muted { font-size: 13px; }

/* ---- round 4: list page tools/edit/ranking/table, screenshots, account data ---- */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.list-tools { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin: 0 0 20px; }
.list-tools .list-add { flex: 1; margin: 0; }
.view-toggle .btn[aria-current="true"] { color: var(--accent); border-color: var(--accent); position: relative; z-index: 1; }
.head-actions { flex-wrap: wrap; }
.head-actions .list-toggle { padding: 0; }
.list-desc { max-width: 65ch; }
.list-edit { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 10px 14px; align-items: end; }
.list-edit label { display: flex; flex-direction: column; gap: 5px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.list-edit input { width: 100%; min-width: 0; font-size: 14px; font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--text); }
.list-edit .form-actions { grid-column: 1 / -1; }
.list-body:has(.card-wrap) .list-empty { display: none; }
.ltable:not(:has(.card-wrap)) { display: none; }
.l-btn { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 3px; color: var(--muted); }
.l-btn:hover:not(:disabled), .l-btn:focus-visible { background: var(--bg-3); color: var(--text); }
.l-btn:disabled { opacity: .25; cursor: default; }
.l-btn .icon { width: 14px; height: 14px; }
.l-rank { font-weight: 600; color: var(--text-2); font-variant-numeric: tabular-nums; }
/* grid: rank badge on the cover, move buttons under the card */
.grid .l-rank {
  position: absolute; top: 6px; left: 6px; z-index: 4; min-width: 22px; height: 22px; padding: 0 5px;
  display: grid; place-items: center; background: rgb(0 0 0 / .75); color: #fff; font-size: 12px; border-radius: 2px;
}
.grid .l-actions { display: flex; gap: 4px; margin-top: 6px; }
.grid .l-move { flex: 1; height: 26px; border: 1px solid var(--line); background: var(--bg-2); }
.grid .l-actions:not(:has(.l-move)) { display: contents; }
/* table: [rank] row [actions]; the row is the library's game-row without its checkbox column */
.ltable .litem { display: grid; grid-template-columns: minmax(0, 1fr) 36px; align-items: center; gap: 4px; border-bottom: 1px solid var(--line); }
.list-body.ranked .ltable .litem { grid-template-columns: 30px minmax(0, 1fr) 92px; }
.ltable .litem:not(.lhead):hover { background: var(--bg-2); }
.ltable .trow { border-bottom: 0; grid-template-columns: 32px minmax(0, 2.2fr) minmax(0, 1.2fr) 112px 58px 80px 44px 84px; }
.ltable .trow:not(.thead):hover { background: none; }
.ltable .c-check { display: none; }
.ltable .l-rank { text-align: right; font-size: 13px; }
.ltable .lhead .l-rank { font-size: 11px; color: var(--muted); }
.ltable .l-actions { display: flex; justify-content: flex-end; gap: 2px; padding-right: 4px; }
.ltable .remove-from-list { position: static; opacity: 1; background: none; color: var(--muted); }
.ltable .remove-from-list:hover { background: var(--bg-3); color: var(--danger); }
/* screenshots strip + lightbox */
.shots { margin: 16px 0 24px; }
.shot-strip { list-style: none; margin: 0; padding: 0 0 6px; display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x proximity; }
.shot-strip li { flex: none; scroll-snap-align: start; }
.shot { display: block; border-radius: 2px; }
.shot img { display: block; width: 220px; height: auto; aspect-ratio: 569 / 320; object-fit: cover; border-radius: 2px; background: var(--bg-3); box-shadow: var(--cover-edge); }
.shot:hover img, .shot:focus-visible img { outline: 2px solid var(--accent); outline-offset: -2px; }
.lightbox { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgb(0 0 0 / .92); color: #fff; }
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: rgb(0 0 0 / .6); }
.lightbox-img { max-width: min(1280px, 94vw); max-height: 84dvh; object-fit: contain; border-radius: 2px; }
.lightbox-count { position: absolute; bottom: 14px; left: 0; right: 0; margin: 0; text-align: center; font-size: 13px; color: rgb(255 255 255 / .75); }
.lightbox-btn { position: absolute; width: 44px; height: 44px; display: grid; place-items: center; color: #fff; border-radius: 3px; background: rgb(255 255 255 / .08); }
.lightbox-btn:hover, .lightbox-btn:focus-visible { background: rgb(255 255 255 / .2); }
.lightbox-btn .icon { width: 20px; height: 20px; }
.lightbox-prev { left: 12px; top: calc(50% - 22px); }
.lightbox-next { right: 12px; top: calc(50% - 22px); }
.lightbox-close { right: 12px; top: 12px; }
.lightbox.single .lightbox-prev, .lightbox.single .lightbox-next { display: none; }
/* account: export + delete */
.account-note { font-size: 13px; margin: 0 0 10px; }
.export-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.btn .icon { width: 14px; height: 14px; }
.text-link.danger { color: var(--danger); text-decoration-color: currentColor; }
.account-danger { margin-top: 32px; font-size: 13px; }
.danger-btn { background: var(--danger); border-color: var(--danger); color: #fff; font-weight: 600; }
.danger-btn:hover { color: #fff; filter: brightness(1.08); border-color: var(--danger); }
.delete-account { display: grid; gap: 14px; max-width: 440px; margin-top: 20px; }
.delete-account label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-2); overflow-wrap: anywhere; }
.notice-ok { border-left-color: var(--accent); }
@media (max-width: 760px) {
  .list-tools { flex-wrap: wrap; }
  .list-tools .list-add { flex-basis: 100%; order: 2; }
  .list-edit { grid-template-columns: minmax(0, 1fr); }
  .ltable .lhead { display: none; }
  .ltable .trow { grid-template-columns: 32px minmax(0, 1fr) auto auto; }
  .list-body.ranked .ltable .litem { grid-template-columns: 20px minmax(0, 1fr) 88px; }
  .ltable .l-actions { padding-right: 0; }
  .shot img { width: 160px; }
  .lightbox-prev, .lightbox-next { top: auto; bottom: 8px; }
}
