/* Pully Club
 *
 * Warm paper, black ink and one red, the colours of a comic shop's price
 * tags. The covers are the colourful part of every page, so everything
 * around them stays quiet. Phone first: most people will use this standing
 * at a counter or on the sofa.
 */

:root {
  --paper: #f6f4ef;
  --surface: #ffffff;
  --sunken: #eeebe4;
  --ink: #1c1b19;
  --ink-2: #55524b;
  --ink-3: #85817a;
  --line: #e2ded5;
  --line-strong: #c9c4b8;
  --accent: #b4232a;
  --accent-hover: #981c22;
  --accent-ink: #ffffff;
  --accent-soft: #f8e7e6;
  --done: #1d6b3b;
  --done-soft: #e3f0e7;
  --done-strong: #1f6f3e;
  --done-hover: #185a32;
  --focus: #1c1b19;
  --shadow: 0 1px 2px rgba(28, 27, 25, 0.05), 0 6px 20px rgba(28, 27, 25, 0.06);
  --shadow-strong: 0 12px 40px rgba(28, 27, 25, 0.18);
  --radius: 12px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --bar: 64px;
  /* The page fills the screen it's on: more covers to a row on a wider one.
     Only very wide monitors stop at --page, and the side margins grow a
     little with the screen. */
  --page: 2400px;
  --gutter: clamp(16px, 2.5vw, 40px);
  color-scheme: light;
}

/* Dark: when the device is, unless the person chose light, and whenever the
   person chose dark. The two blocks hold the same colours. */
:root[data-theme="dark"] {
  --paper: #151514;
  --surface: #1e1d1b;
  --sunken: #2a2926;
  --ink: #f1efe9;
  --ink-2: #b7b2a7;
  --ink-3: #8a857a;
  --line: #33312d;
  --line-strong: #4a4741;
  --accent: #c9343b;
  --accent-hover: #d9474e;
  --accent-ink: #ffffff;
  --accent-soft: #3a1f20;
  --done: #63c98f;
  --done-soft: #183022;
  --done-strong: #257647;
  --done-hover: #2c8752;
  --focus: #f1efe9;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 6px 20px rgba(0, 0, 0, 0.25);
  --shadow-strong: 0 12px 40px rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #151514;
    --surface: #1e1d1b;
    --sunken: #2a2926;
    --ink: #f1efe9;
    --ink-2: #b7b2a7;
    --ink-3: #8a857a;
    --line: #33312d;
    --line-strong: #4a4741;
    --accent: #c9343b;
    --accent-hover: #d9474e;
    --accent-ink: #ffffff;
    --accent-soft: #3a1f20;
    --done: #63c98f;
    --done-soft: #183022;
    --done-strong: #257647;
    --done-hover: #2c8752;
    --focus: #f1efe9;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 6px 20px rgba(0, 0, 0, 0.25);
    --shadow-strong: 0 12px 40px rgba(0, 0, 0, 0.5);
    color-scheme: dark;
  }
}

/* ------------------------------------------------------------- basics */

*, *::before, *::after { box-sizing: border-box; }

/* The scrollbar's space is always kept, so a page doesn't shift sideways
   when its scrollbar comes and goes, as it does under a comic's details. */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scrollbar-gutter: stable; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p { margin: 0; }
h1 { font-size: 28px; line-height: 1.15; font-weight: 800; letter-spacing: -0.015em; }
h2 { font-size: 19px; line-height: 1.3; font-weight: 700; }
h3 { font-size: 16px; line-height: 1.3; font-weight: 600; }
a { color: inherit; }
img { display: block; max-width: 100%; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 50;
  background: var(--ink); color: var(--paper); padding: 10px 14px; border-radius: 8px; text-decoration: none;
}
.skip:focus { top: 12px; }

.icon { flex: none; width: 20px; height: 20px; }
.muted { color: var(--ink-2); font-weight: 400; }
.link { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; display: inline-flex; align-items: center; gap: 6px; }
.link .icon { width: 16px; height: 16px; }

/* ------------------------------------------------------------ buttons */

.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px;
  border: 1px solid var(--line-strong); border-radius: 10px;
  background: var(--surface); color: var(--ink);
  font-weight: 600; font-size: 15px; line-height: 1.2; text-decoration: none;
  cursor: pointer; transition: background-color 0.15s, border-color 0.15s, color 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { border-color: var(--ink-3); }
.btn:disabled { opacity: 0.6; cursor: progress; }
/* These change on the spot when tapped and save behind the scenes, so they
   never fade while saving: a flicker there reads as something going wrong. */
.btn-pick:disabled, .btn-follow:disabled { opacity: 1; cursor: default; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-quiet { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn-quiet:hover { background: var(--sunken); border-color: transparent; color: var(--ink); }
.btn-large { min-height: 52px; font-size: 17px; padding: 12px 22px; }
.btn-small { min-height: 38px; padding: 7px 14px; font-size: 14px; }
.btn-block { width: 100%; }

/* ------------------------------------------------------------ top bar */

.topbar {
  position: sticky; top: 0; z-index: 20;
  background: var(--surface); border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: var(--page); margin: 0 auto; height: 60px; padding: 0 var(--gutter);
  display: flex; align-items: center; gap: 24px;
}

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 18px; letter-spacing: -0.01em; }
/* Pully herself, in a red ring, where a logo would go. */
.brand-face {
  width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex: none;
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent);
}
.brand-dot { color: var(--accent); }
.brand-text { display: grid; line-height: 1.15; }
.brand-with {
  display: inline-flex; align-items: center; gap: 4px; white-space: nowrap;
  font-size: 11.5px; font-weight: 600; letter-spacing: 0; color: var(--ink-2);
}
.brand-shop { width: 16px; height: 16px; border-radius: 4px; flex: none; }

.tabs { display: flex; gap: 4px; margin-right: auto; }
.tabs a {
  position: relative; display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: 9px; text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: 15px;
}
.tabs a:hover { color: var(--ink); background: var(--sunken); }
.tabs a[aria-current="page"] { color: var(--ink); background: var(--sunken); }

.badge {
  display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px;
  border-radius: 999px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700;
}
/* George has set something aside since they last looked. */
.badge.is-news { background: var(--done-strong); }

.account { position: relative; }
.account summary {
  display: flex; align-items: center; gap: 10px; list-style: none; cursor: pointer;
  padding: 4px 8px 4px 4px; border-radius: 999px; font-weight: 600; font-size: 15px;
}
.account summary::-webkit-details-marker { display: none; }
.account summary:hover, .account[open] summary { background: var(--sunken); }
.account-menu {
  position: absolute; right: 0; top: calc(100% + 8px); width: 240px; z-index: 30;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-strong); padding: 14px; display: grid; gap: 12px;
}
.account-who { font-size: 14px; color: var(--ink-2); overflow-wrap: anywhere; }
.account-who strong { color: var(--ink); }

/* Light, dark or following the device, in the account menu: the same
   control as By person and By comic. */
.theme-choice fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.theme-choice legend {
  padding: 0; margin-bottom: 6px; font-size: 12px; font-weight: 700; color: var(--ink-3);
  text-transform: uppercase; letter-spacing: 0.05em;
}
.theme-choice .segmented { display: flex; width: 100%; }
.theme-choice label {
  flex: 1; position: relative; text-align: center; cursor: pointer; padding: 7px 4px; border-radius: 9px;
  font-weight: 600; font-size: 14px; color: var(--ink-2);
}
.theme-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.theme-choice label:has(input:checked) { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.theme-choice label:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }

.avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; background: var(--sunken); flex: none; }
.avatar-letter { display: inline-grid; place-items: center; font-weight: 700; font-size: 14px; color: var(--ink-2); }

/* --------------------------------------------------------------- page */

.main { flex: 1; width: 100%; max-width: var(--page); margin: 0 auto; padding: 28px var(--gutter) 56px; }
.main:focus { outline: none; } /* focused only to carry on reading from the top */

.page-head { margin-bottom: 20px; display: grid; gap: 6px; }
.page-head-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.page-head-row > div { display: grid; gap: 6px; }
.lede { color: var(--ink-2); font-size: 17px; }
.lede strong { color: var(--ink); }

.callout {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px; margin-bottom: 20px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); font-size: 15px;
}
.callout .icon { margin-top: 2px; color: var(--ink-3); }
.callout-done { background: var(--done-soft); border-color: transparent; color: var(--ink); text-decoration: none; }
.callout-done .icon { color: var(--done); }
.callout-done strong { font-weight: 700; }
.callout-link { font-weight: 600; color: var(--done); text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }

/* How much of a week's list George has set aside; green once it all is. */
.week-status {
  display: flex; gap: 8px; align-items: flex-start; margin: 4px 0 10px; padding: 10px 12px;
  border-radius: 10px; background: var(--sunken); color: var(--ink-2); font-size: 15px;
}
.week-status .icon { flex: none; margin-top: 2px; color: var(--done); }
.week-status strong { color: var(--ink); }
.week-status.is-ready { background: var(--done-soft); color: var(--ink); }

.empty {
  margin-top: 24px; padding: 40px 20px; text-align: center; display: grid; gap: 10px; justify-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
}
.empty p { color: var(--ink-2); max-width: 46ch; }
.empty .btn { margin-top: 8px; }

/* Ends well above the screen's bottom edge, so the back-to-top button in
   the corner never sits on its words. */
.footer {
  max-width: var(--page); width: 100%; margin: 0 auto; padding: 24px var(--gutter) 64px;
  color: var(--ink-3); font-size: 13px;
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 4px 20px;
}
.footer-side { display: grid; gap: 4px; }
.footer-end { text-align: right; }
.footer-note { font-size: 12px; }

/* -------------------------------------------------------------- weeks */

.weeks {
  display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; margin: 0 -2px 18px;
  scroll-snap-type: x proximity; scrollbar-width: none;
}
.weeks::-webkit-scrollbar { display: none; }
.weeks a {
  flex: none; scroll-snap-align: start; display: grid; gap: 1px; min-width: 112px;
  padding: 9px 14px; border-radius: 10px; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line);
}
.weeks a:hover { border-color: var(--ink-3); }
.week-name { font-weight: 700; font-size: 15px; }
.week-sub { font-size: 13px; color: var(--ink-2); }
.weeks a[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.weeks a[aria-current="page"] .week-sub { color: inherit; opacity: 0.75; }
/* The weeks further ahead, in a menu shaped like one more tab. It always
   reads "More weeks": the tabs show which week is on screen. */
select.weeks-more {
  flex: none; width: auto; align-self: stretch; min-height: 0; padding: 9px 38px 9px 14px;
  border: 1px solid var(--line); border-radius: 10px; background-color: var(--surface);
  font-weight: 700; font-size: 16px; color: var(--ink);
  background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%;
}
select.weeks-more:hover { border-color: var(--ink-3); }
select.weeks-more option { background: var(--surface); color: var(--ink); font-weight: 400; }

/* ------------------------------------------------------------ filters */

.filters { display: grid; gap: 12px; margin-bottom: 14px; }
/* min-width 0: otherwise the longest publisher's name decides how wide the
   whole filter row may be, and on a phone that is wider than the screen. */
.field { display: grid; gap: 6px; min-width: 0; }
.field-label { font-size: 14px; font-weight: 600; color: var(--ink-2); }

input[type="search"], select, textarea {
  width: 100%; min-height: 48px; padding: 11px 14px;
  border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface);
  font-size: 16px; /* 16 or more stops phones zooming in on tap */
}
input[type="search"]:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--sunken); }
textarea { min-height: 72px; resize: vertical; }
select {
  appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%);
  background-position: calc(100% - 20px) 21px, calc(100% - 14px) 21px;
  background-size: 6px 6px; background-repeat: no-repeat;
}
.input-icon { position: relative; display: block; }
.input-icon .icon { position: absolute; left: 14px; top: 14px; color: var(--ink-3); pointer-events: none; }
.input-icon input { padding-left: 44px; }
input[type="search"]::-webkit-search-cancel-button { cursor: pointer; }

.results { font-size: 15px; color: var(--ink-2); margin-bottom: 14px; }
.results span { color: var(--ink); font-weight: 700; }

/* -------------------------------------------------------------- cards */

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; }

.card {
  display: flex; flex-direction: column; min-width: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}

.cover {
  position: relative; display: block; width: 100%; aspect-ratio: 2 / 3; padding: 0; border: 0;
  background: var(--sunken); cursor: zoom-in; overflow: hidden;
}
/* A plain tile until the picture is whole: a picture arrives top down, and
   without this the title underneath shows through the part not yet come. */
.cover > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; background: var(--sunken); }
.cover-fallback {
  position: absolute; inset: 0; display: grid; place-items: center; padding: 14px; text-align: center;
  font-weight: 700; font-size: 15px; line-height: 1.25; color: var(--ink-2);
}

/* A comic whose cover is not out yet: a card with Utopia's logo and "Cover
   coming soon" in its place. The card is one picture, so a browser's or an
   extension's dark mode, which recolours backgrounds and text but never
   pictures, can't pull it apart. */
.soon { position: absolute; inset: 0; z-index: 1; display: block; }
.soon img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cover:focus-visible { outline-offset: -3px; border-radius: 0; }

.card-body { padding: 10px 12px 0; display: grid; gap: 2px; }
.publisher { font-size: 12px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.04em; }
.card-title {
  font-size: 15px; font-weight: 600; line-height: 1.3; min-height: 2.6em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.price { font-size: 14px; color: var(--ink-2); }

.pick { padding: 10px 12px 12px; margin-top: auto; }

/* Quiet until used, so a page of eighty covers is not eighty loud buttons;
   solid green once a comic is on the list, so what has been picked stands
   out at a glance while scrolling. */
/* Both states keep exactly the same size: one line, never wrapping, so
   nothing around the button moves when it changes. */
.btn-pick { width: 100%; white-space: nowrap; }
.btn-pick .when-on, .btn-pick.is-picked .when-off { display: none; }
.btn-pick.is-picked .when-on, .btn-pick .when-off { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.btn-pick.is-picked { background: var(--done-strong); border-color: var(--done-strong); color: #fff; }
.btn-pick.is-picked:hover { background: var(--done-hover); border-color: var(--done-hover); }
.btn-pick .when-gone, .btn-pick.is-sold-out .when-off, .btn-pick.is-sold-out .when-on { display: none; }
.btn-pick.is-sold-out .when-gone { display: inline; }
.btn-pick.is-sold-out, .btn-pick.is-sold-out:hover { background: var(--sunken); border-color: var(--line); color: var(--ink-2); cursor: not-allowed; }
/* A picked card gets an even green ring drawn outside its edge, which
   moves nothing inside it. */
.card { transition: border-color 0.15s, box-shadow 0.15s; }
.card:hover { border-color: var(--line-strong); }
.card:has(.is-picked), .card:has(.is-picked):hover { border-color: var(--done-strong); box-shadow: 0 0 0 1px var(--done-strong); }

.cover-count {
  position: absolute; left: 8px; bottom: 8px; z-index: 2; padding: 3px 8px; border-radius: 999px;
  background: rgba(17, 16, 15, 0.78); color: #fff; font-size: 12px; font-weight: 700; letter-spacing: 0.01em;
}
.foc { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.sold-out-badge {
  position: absolute; left: 8px; top: 8px; z-index: 2; padding: 3px 9px; border-radius: 999px;
  background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; letter-spacing: 0.01em;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}
.card:has(.sold-out-badge) .cover img { opacity: 0.6; }
.card:has(.sold-out-badge) .cover-fallback { display: none; }

/* A small tick on a cover that a second source agrees about. */
.verified-badge {
  position: absolute; top: 8px; right: 8px; z-index: 2; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; background: var(--done-strong); color: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}
.verified-badge .icon { width: 16px; height: 16px; stroke-width: 3; }

.check-line { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; padding: 10px 12px; border-radius: 10px; }
.check-line .icon { flex: none; margin-top: 1px; }
.check-line.is-ok { background: var(--done-soft); color: var(--done); font-weight: 600; }
.check-line.is-off { background: var(--accent-soft); color: var(--ink); }
.check-line ul { margin: 4px 0 0; padding-left: 18px; list-style: disc; }
.sku { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-weight: 700; color: var(--ink); letter-spacing: 0.02em; }

/* ----------------------------------------------------- comic details */

.sheet {
  width: min(900px, calc(100% - 24px)); max-height: calc(100% - 24px); padding: 0;
  border: 0; border-radius: 18px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow-strong);
  overscroll-behavior: contain;
}
/* While a comic's details are open, the page behind stays where it was:
   scrolling past the end of the details doesn't carry on into it. */
html:has(.sheet[open]) { overflow: hidden; }
.sheet::backdrop { background: rgba(20, 19, 17, 0.6); }
.sheet-inner { position: relative; padding: 18px; }
/* The close button stays in the top corner however far down the box is
   scrolled: a bar of no height, stuck to the top, holding it. */
.sheet-bar {
  position: sticky; top: 0; z-index: 10; height: 0; margin: -18px -18px 0;
  display: flex; justify-content: flex-end; pointer-events: none;
}
.sheet-close {
  pointer-events: auto; margin: 10px 10px 0 0; width: 44px; height: 44px; flex: none;
  display: grid; place-items: center; border: 0; border-radius: 50%;
  background: var(--surface); color: var(--ink); cursor: pointer;
  box-shadow: 0 0 0 1px var(--line), 0 4px 14px rgba(0, 0, 0, 0.25);
}
.sheet-close:hover { background: var(--sunken); }
.sheet-close .icon { width: 22px; height: 22px; }

.detail { display: grid; gap: 20px; }
.detail-cover {
  position: relative; width: min(280px, 72%); aspect-ratio: 2 / 3; justify-self: center;
  border-radius: 10px; overflow: hidden; background: var(--sunken); box-shadow: var(--shadow);
}
.detail-cover > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.detail-cover .detail-large { z-index: 2; }
.detail-cover .soon { display: none; }
.detail-cover.is-soon .soon { display: block; }
.detail-cover.is-soon > img { display: none; }

/* A tap on the cover shows it full screen; the corner mark says so. */
.detail-cover:not(.is-soon, .is-missing) { cursor: zoom-in; }
.detail-cover:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.zoom-hint {
  position: absolute; right: 8px; bottom: 8px; z-index: 3; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(17, 16, 15, 0.72); color: #fff; pointer-events: none;
}
.zoom-hint .icon { width: 18px; height: 18px; }
.detail-cover.is-soon .zoom-hint, .detail-cover.is-missing .zoom-hint { display: none; }

/* A cover, full screen: as large as the screen allows, over a dark veil. */
.viewer {
  width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 12px;
  border: 0; background: transparent; cursor: zoom-out; overscroll-behavior: contain;
}
.viewer[open] { display: grid; place-items: center; }
.viewer::backdrop { background: rgba(10, 10, 9, 0.92); }
.viewer img {
  max-width: 100%; max-height: calc(100dvh - 24px); width: auto; height: auto;
  border-radius: 8px; box-shadow: 0 12px 48px rgba(0, 0, 0, 0.6);
}
.viewer-close {
  position: fixed; top: 12px; right: 12px; width: 48px; height: 48px;
  display: grid; place-items: center; border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(255, 255, 255, 0.14); color: #fff;
}
.viewer-close:hover { background: rgba(255, 255, 255, 0.24); }
.viewer-close .icon { width: 24px; height: 24px; }
html:has(.viewer[open]) { overflow: hidden; }

.detail-info { display: grid; gap: 16px; align-content: start; min-width: 0; }
.detail-info > .publisher { margin-bottom: -12px; }
.detail-title { font-size: 24px; line-height: 1.2; font-weight: 800; padding-right: 44px; }
.detail.is-loading .detail-info .muted { font-size: 15px; }

.facts {
  margin: 0; padding: 14px 16px; border-radius: 12px; background: var(--sunken);
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 18px;
}
.facts div { display: grid; gap: 2px; min-width: 0; }
.facts dt { font-size: 12px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.05em; }
.facts dd { margin: 0; font-size: 15px; font-weight: 600; }

.detail-form { display: grid; gap: 14px; }
.choose-cover { border: 0; margin: 0; padding: 0; min-width: 0; }
.choose-cover legend { padding: 0; margin-bottom: 10px; font-weight: 700; font-size: 16px; }
/* Every cover at once, three to a row on a phone: tap the one you want. A
   sideways strip hid most of them and was easy to miss. */
.cover-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 10px; }
.cover-grid.is-collapsed .cover-option:nth-child(n + 10) { display: none; }
.show-all { margin-top: 14px; }
.cover-option {
  position: relative; display: grid; gap: 3px; align-content: start; min-width: 0;
  cursor: pointer; text-align: center; font-size: 13px; line-height: 1.25;
  -webkit-tap-highlight-color: transparent;
}
.cover-option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cover-option-image {
  position: relative; display: block; aspect-ratio: 2 / 3; border-radius: 8px; overflow: hidden; margin-bottom: 4px;
  background: var(--sunken); box-shadow: 0 0 0 1px var(--line); transition: box-shadow 0.12s;
}
.cover-option-image > img { width: 100%; height: 100%; object-fit: cover; background: var(--sunken); }
.cover-option:hover .cover-option-image { box-shadow: 0 0 0 2px var(--line-strong); }
.cover-option input:checked + .cover-option-image { box-shadow: 0 0 0 3px var(--done-strong); }
.cover-option input:focus-visible + .cover-option-image { outline: 3px solid var(--focus); outline-offset: 3px; }
.cover-option-tick {
  position: absolute; top: 6px; right: 6px; z-index: 2; width: 26px; height: 26px; border-radius: 50%;
  display: none; place-items: center; background: var(--done-strong); color: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}
.cover-option-tick .icon { width: 16px; height: 16px; stroke-width: 3; }
.cover-option input:checked + .cover-option-image .cover-option-tick { display: grid; }
.cover-option-name { font-weight: 700; font-size: 14px; }
.cover-option-kind { color: var(--ink-2); font-size: 12px; overflow-wrap: anywhere; }
.cover-option-price { color: var(--ink); font-size: 12px; font-weight: 700; }
.cover-option-price.cover-option-gone { color: var(--accent); }
.cover-option.is-sold-out .cover-option-image > img { opacity: 0.45; }
.cover-option:has(input:disabled) { cursor: not-allowed; }
.cover-option:has(input:disabled):hover .cover-option-image { box-shadow: 0 0 0 1px var(--line); }
.sold-out-note { font-size: 14px; color: var(--ink-2); }

/* The way to add stays in reach at the bottom while choosing a cover. */
.detail-actions {
  position: sticky; bottom: 0; z-index: 3; display: grid; gap: 8px;
  padding: 12px 0 4px; background: var(--surface); border-top: 1px solid var(--line);
}
.chosen { font-size: 14px; color: var(--ink-2); }
.chosen strong { color: var(--ink); }

.description { display: grid; gap: 10px; font-size: 15px; line-height: 1.6; }
.credits { margin: 0; display: grid; gap: 6px; font-size: 14px; }
.credits div { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 12px; }
.credits dt { font-weight: 700; color: var(--ink-2); }
.credits dd { margin: 0; }

.comic-page {
  max-width: 980px; margin: 0 auto; padding: 20px; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--line);
}

/* --------------------------------------------------------------- rows */

.week-block {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  padding: 16px 16px 14px; margin-bottom: 18px;
}
.week-heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding-bottom: 6px; }
.week-when { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.week-total { padding-top: 12px; font-weight: 700; text-align: right; }

.rows > li + li { border-top: 1px solid var(--line); }
.row { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; }
.row.is-leaving { opacity: 0.4; }
.row-main { flex: 1; min-width: 0; display: grid; gap: 3px; }
.row-title { font-size: 16px; font-weight: 600; line-height: 1.3; }
.row-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: 14px; color: var(--ink-2); }
.row-note { display: flex; gap: 6px; align-items: flex-start; font-size: 14px; color: var(--ink); margin-top: 2px; }
.row-note .icon { width: 16px; height: 16px; margin-top: 2px; color: var(--ink-3); }
.row-action { flex: none; }

.thumb {
  flex: none; display: block; width: 56px; aspect-ratio: 2 / 3; border-radius: 6px; overflow: hidden;
  background: var(--sunken); border: 1px solid var(--line);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; background: var(--sunken); }
.thumb-link { flex: none; display: block; border-radius: 6px; }
.row-title a { color: inherit; text-decoration: none; }
.row-title a:hover { text-decoration: underline; text-underline-offset: 3px; }
.nowrap { white-space: nowrap; }

.tag {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px;
  font-size: 13px; font-weight: 600; background: var(--sunken); color: var(--ink);
}
.tag .icon { width: 15px; height: 15px; margin-left: -2px; }
.tag-done { background: var(--done-soft); color: var(--done); }
.tag-strong { background: var(--ink); color: var(--paper); }
.tag-soldout { background: var(--accent-soft); color: var(--accent); }
.row.is-missed .row-title, .row.is-missed .thumb { opacity: 0.55; }

.note-edit { margin-top: 4px; }
.note-edit summary {
  display: inline-block; cursor: pointer; font-size: 14px; font-weight: 600; color: var(--ink-2);
  text-decoration: underline; text-underline-offset: 3px; padding: 4px 0; list-style: none;
}
.note-edit summary::-webkit-details-marker { display: none; }
.note-edit summary:hover { color: var(--ink); }
.note-edit form { display: grid; gap: 10px; padding: 10px 0 2px; max-width: 480px; justify-items: start; }
.note-edit .field { width: 100%; }

.earlier { margin-top: 28px; }
.earlier > summary {
  cursor: pointer; font-weight: 700; font-size: 17px; padding: 10px 0; margin-bottom: 8px;
}
.week-block-past { opacity: 0.92; }

/* ------------------------------------------------------------- orders */

.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.segmented { display: inline-flex; padding: 3px; gap: 2px; border-radius: 11px; background: var(--sunken); }
.segmented a { padding: 8px 16px; border-radius: 9px; text-decoration: none; font-weight: 600; font-size: 15px; color: var(--ink-2); }
.segmented a[aria-current="page"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.progress { color: var(--ink-2); font-size: 15px; }
.progress strong { color: var(--ink); }

/* Each person's comics are a card; a wide screen puts them side by side,
   flowing down one column and then the next. */
.people-columns { column-width: 520px; column-gap: 16px; }
.person {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  padding: 14px 16px 6px; margin-bottom: 16px; break-inside: avoid;
}
.person-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.person-head h2 { font-size: 18px; }
.person-head-main { margin-right: auto; display: grid; gap: 0; min-width: 0; }
.person-head-main .muted { font-size: 14px; }
.all-aside { padding: 6px 12px; }
.person-head .avatar { width: 36px; height: 36px; }
.person .rows > li + li { border-top: 1px solid var(--line); }

.row-check { align-items: center; }
.row-check.is-done .row-main, .row-check.is-done .thumb { opacity: 0.55; }
.set-aside { flex: none; display: flex; align-items: center; gap: 8px; }
.check {
  display: inline-flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer;
  font-size: 12px; font-weight: 600; color: var(--ink-2); min-width: 64px;
}
.check input { width: 26px; height: 26px; margin: 0; accent-color: var(--done); cursor: pointer; }

/* Covers big enough to find on a shelf at a glance. */
.thumb-large { flex: none; display: block; }
.thumb-large .thumb { width: 72px; border-radius: 8px; }

.head-actions { flex: none; display: flex; gap: 8px; }
.person-picker { display: flex; align-items: center; gap: 8px; }
.field-inline { display: flex; align-items: center; gap: 8px; }
.field-inline select { min-height: 42px; width: auto; max-width: 70vw; padding-top: 8px; padding-bottom: 8px; }

/* Orders fill the screen: each comic is a card, as many to a row as fit. */
.comic-orders {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 460px), 1fr));
  gap: 12px; align-items: start;
}
.comic-order {
  display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
}
.comic-order-for { font-size: 15px; margin-top: 2px; }
.comic-order-missed { color: var(--accent); }

/* The shop's sold out switch: one tap to open, the copies on hand, Save. */
.sold-out-box { margin-top: 6px; }
.sold-out-mark > summary { list-style: none; }
.sold-out-mark > summary::-webkit-details-marker { display: none; }
.sold-out-mark[open] > summary { background: var(--sunken); }
.sold-out-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 8px; }
.sold-out-box > .sold-out-form { margin-top: 0; }
.sold-out-copies { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); }
.sold-out-copies input {
  width: 4.5em; min-height: 38px; padding: 6px 10px; color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface);
  font-size: 16px; /* 16 or more stops phones zooming in on tap */
}
.sold-out-copies input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--sunken); }
.sold-out-form .segmented label { position: relative; cursor: pointer; }
.sold-out-form .segmented input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sold-out-form .segmented span { display: block; padding: 6px 10px; border-radius: 9px; font-weight: 600; font-size: 14px; color: var(--ink-2); white-space: nowrap; }
.sold-out-form .segmented input:checked + span { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.sold-out-form .segmented input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 1px; }
.btn-sold-out { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-sold-out:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.sold-out-count { font-size: 14px; color: var(--ink-2); }
.sold-out-help { flex-basis: 100%; font-size: 13px; color: var(--ink-2); }
.shop-tools { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); }
.shop-tools .sold-out-box { margin-top: 0; }

/* The shop's own price for a ratio cover, under the cover's name. */
.cover-price { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 6px 0 2px; }
.cover-price-field { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); }
.cover-price-field input {
  width: 7.5em; min-height: 38px; padding: 6px 10px; color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface);
  font-size: 16px; /* 16 or more stops phones zooming in on tap */
}
.cover-price-field input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--sunken); }
.comic-order-copies { flex: none; display: grid; justify-items: center; gap: 2px; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.copies {
  display: inline-grid; place-items: center; min-width: 44px; height: 44px; padding: 0 8px; border-radius: 10px;
  background: var(--ink); color: var(--paper); font-weight: 800; font-size: 20px;
}

/* ------------------------------------------------------------- series */

.follow { display: grid; gap: 6px; }
.btn-follow .when-on, .btn-follow.is-following .when-off { display: none; }
.btn-follow.is-following .when-on, .btn-follow .when-off { display: inline-flex; align-items: center; gap: 8px; }
.btn-follow.is-following { border-color: var(--done-strong); color: var(--done); background: var(--done-soft); }
.follow-help { font-size: 13px; color: var(--ink-2); text-align: center; }
.follow-help .when-on, .follow:has(.is-following) .follow-help .when-off { display: none; }
.follow:has(.is-following) .follow-help .when-on { display: inline; }

.series-block {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  padding: 16px 16px 8px; margin-bottom: 18px;
}
.series-block .week-heading { display: flex; align-items: center; gap: 8px; }
.series-list { margin-top: 8px; }
.series-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; }
.series-list li + li { border-top: 1px solid var(--line); }
.series-name { font-weight: 600; }

/* -------------------------------------------------------------- admin */

.notice {
  display: flex; gap: 8px; align-items: center; margin-bottom: 18px; padding: 12px 14px; border-radius: 12px;
  background: var(--done-soft); color: var(--done); font-weight: 600;
}
.crumb { margin-bottom: 12px; font-size: 15px; }
.crumb a { color: var(--ink-2); text-decoration: none; }
.crumb a:hover { color: var(--ink); text-decoration: underline; }
.person-page-head { display: flex; gap: 14px; align-items: center; }
.person-page-head .avatar { width: 56px; height: 56px; font-size: 22px; }
.person-page-head h1 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.people-list { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.people-list li + li { border-top: 1px solid var(--line); }
.person-link { display: flex; align-items: center; gap: 14px; padding: 14px 16px; text-decoration: none; color: inherit; }
.person-link:hover { background: var(--sunken); }
.person-link .avatar { width: 40px; height: 40px; }
.person-link-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.person-link-name { font-weight: 700; font-size: 16px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.person-link-main .muted { font-size: 13px; }
.person-link-counts { display: flex; gap: 16px; font-size: 13px; color: var(--ink-2); }
.person-link-counts strong { color: var(--ink); font-size: 15px; }
.row-center { align-items: center; }

.danger {
  margin-top: 28px; padding: 16px; border-radius: 16px; border: 1px solid var(--line);
  background: var(--surface); display: grid; gap: 10px;
}
.danger h2 { font-size: 17px; }
.danger details { border-top: 1px solid var(--line); padding-top: 10px; }
.danger summary { cursor: pointer; font-weight: 600; color: var(--accent); }
.danger details p { margin: 8px 0 12px; color: var(--ink-2); font-size: 14px; }
.btn-danger { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-danger:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

@media (max-width: 719px) {
  .person-link { flex-wrap: wrap; }
  .person-link-counts { width: 100%; padding-left: 54px; }
}

/* ------------------------------------------------------------ welcome */

.welcome { display: grid; place-items: center; padding: 24px 0; min-height: 70vh; }
.welcome-card {
  width: 100%; max-width: 460px; display: grid; gap: 16px; justify-items: start;
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 28px 24px;
  box-shadow: var(--shadow);
}
.welcome-card h1 { font-size: 32px; }
.welcome-actions { width: 100%; display: grid; gap: 10px; margin-top: 4px; }
.alert { width: 100%; padding: 12px 14px; border-radius: 10px; background: var(--accent-soft); color: var(--ink); font-size: 15px; }
.steps { display: grid; gap: 12px; margin-top: 8px; width: 100%; }
.steps li { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; color: var(--ink-2); }
.steps strong { color: var(--ink); }
.step-number {
  flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: var(--sunken); color: var(--ink); font-weight: 700; font-size: 14px;
}
.fine { font-size: 13px; color: var(--ink-3); }

/* The front page: one calm column, everything on the centre line. Pully
   and TDV in a portrait at the top, then the name with George's shop under
   it, the way the top bar of every page pairs them. */
.landing-card { max-width: 440px; justify-items: center; text-align: center; padding-top: 32px; }
.landing-portrait {
  width: 148px; height: 148px; border-radius: 32px; object-fit: cover; background: #1a1430;
  box-shadow: 0 0 0 4px var(--surface), 0 0 0 6px var(--accent), var(--shadow-strong);
  margin-bottom: 6px;
}
.landing-title { font-size: 38px; letter-spacing: -0.02em; margin-top: 4px; }
.landing-with {
  display: inline-flex; align-items: center; gap: 6px; margin-top: -8px;
  font-size: 14px; font-weight: 600; color: var(--ink-2);
}
.landing-with img { width: 22px; height: 22px; border-radius: 5px; }
.landing-with strong { color: var(--ink); }
.landing-card .lede { max-width: 34ch; }
.landing-card .steps { text-align: left; margin-top: 4px; padding: 16px; border-radius: 14px; background: var(--sunken); }
.landing-card .step-number { background: var(--surface); }
.people { width: 100%; display: grid; gap: 8px; }
.person-button { justify-content: flex-start; gap: 12px; }

/* -------------------------------------------------------- back to top */

/* Shows once a page is scrolled well down, small and see-through, in the
   corner where a thumb is; above the bottom bar on phones. It stays put
   when a message shows: messages keep clear of its corner. Hidden, it
   can't be tabbed to or tapped. */
.to-top {
  position: fixed; right: 16px; bottom: 16px; z-index: 50; width: 36px; height: 36px;
  display: grid; place-items: center; border: 0; border-radius: 50%; cursor: pointer;
  background: var(--ink); background: color-mix(in srgb, var(--ink) 50%, transparent);
  color: var(--paper); box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  visibility: hidden; opacity: 0; transform: translateY(8px);
  transition: opacity 0.18s, transform 0.18s, background 0.15s, visibility 0s linear 0.18s;
}
.to-top.is-showing { visibility: visible; opacity: 1; transform: none; transition: opacity 0.18s, transform 0.18s, background 0.15s; }
.to-top:hover, .to-top:focus-visible { background: color-mix(in srgb, var(--ink) 85%, transparent); }
.to-top:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.to-top .icon { width: 18px; height: 18px; }

/* -------------------------------------------------------------- toast */

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 60; transform: translateX(-50%);
  /* Clear of the back-to-top button's corner on either side, so it never
     has to move out of the way. */
  width: max-content; max-width: calc(100% - 2 * (16px + 36px + 8px));
  display: flex; align-items: center; gap: 16px; padding: 12px 12px 12px 18px;
  background: var(--ink); color: var(--paper); border-radius: 12px; box-shadow: var(--shadow-strong);
  font-size: 15px; font-weight: 500;
}
.toast-undo {
  border: 0; background: transparent; color: inherit; font-weight: 800; padding: 8px 10px; border-radius: 8px;
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.toast-undo:hover { background: rgba(127, 127, 127, 0.25); }
.toast.is-showing { animation: toast-in 0.18s ease-out; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } }

/* ------------------------------------------------------------- phones */

@media (max-width: 719px) {
  body.signed-in { padding-bottom: calc(var(--bar) + env(safe-area-inset-bottom)); }
  .topbar-inner { height: 56px; gap: 12px; justify-content: space-between; }
  .account-name { display: none; }
  .account summary { padding: 4px; }

  /* The main sections move to a bar along the bottom, where thumbs are. */
  .tabs {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; margin: 0; gap: 0;
    height: calc(var(--bar) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    background: var(--surface); border-top: 1px solid var(--line);
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  }
  .tabs a { flex-direction: column; justify-content: center; gap: 2px; border-radius: 0; font-size: 12px; padding: 6px 4px; }
  .tabs a:hover { background: transparent; }
  .tabs a[aria-current="page"] { background: transparent; color: var(--accent); }
  .tabs .icon { width: 24px; height: 24px; }
  .tabs .badge { position: absolute; top: 6px; left: calc(50% + 6px); min-width: 20px; height: 20px; font-size: 11px; }

  .toast { bottom: calc(var(--bar) + env(safe-area-inset-bottom) + 12px); }
  .to-top { bottom: calc(var(--bar) + env(safe-area-inset-bottom) + 12px); }
  .footer-end { text-align: left; }
  .main { padding-top: 20px; }
  h1 { font-size: 26px; }
  .page-head-row { flex-direction: column; }
  .thumb-large .thumb { width: 64px; }
  .head-actions { width: 100%; flex-wrap: nowrap; }
  .head-actions .btn { flex: 1; }
  .row-check { gap: 10px; }
  .check { min-width: 52px; }
  /* On a phone the comic page sits above the bottom bar. */
  .comic-page .detail-actions { bottom: calc(var(--bar) + env(safe-area-inset-bottom)); }
  .toolbar { align-items: stretch; }
  .person-picker, .field-inline, .field-inline select { width: 100%; max-width: none; }
  .field-inline select { flex: 1; }
}

/* A card too narrow for "Add to my list" on one line says "Add", whatever
   the screen: each card measures itself. Screen readers still hear the
   rest. */
.card { container-type: inline-size; }
@container (max-width: 199px) {
  .card .on-phones-unseen {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
  }
  .card .btn-pick { padding-left: 10px; padding-right: 10px; }
  .card-body { padding: 10px 10px 0; }
  .pick { padding: 10px 10px 10px; }
}

@media (min-width: 560px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 20px 16px; }
  .sheet-inner { padding: 24px; }
  .sheet-bar { margin: -24px -24px 0; }
  .detail { grid-template-columns: minmax(220px, 300px) 1fr; gap: 28px; align-items: start; }
  .detail-cover { width: 100%; }
  .facts { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
}

@media (min-width: 720px) {
  .filters { grid-template-columns: 1fr 280px; align-items: end; }
  .main { padding-top: 32px; }
  h1 { font-size: 32px; }
  .welcome-card { padding: 36px 32px; }
  .thumb { width: 60px; }
}

@media (min-width: 1000px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* -------------------------------------------------------------- print */

@media print {
  :root { --paper: #fff; --surface: #fff; --ink: #000; --ink-2: #333; --line: #bbb; }
  body { background: #fff; padding: 0 !important; }
  .topbar, .tabs, .footer, .weeks, .toolbar .segmented, [data-print], .toast, .to-top, .skip, .set-aside, .thumb { display: none !important; }
  .main { padding: 0; max-width: none; }
  .person, .table-wrap, .week-block, .comic-order { border-color: #bbb; box-shadow: none; }
  .comic-order { break-inside: avoid; }
  .row { padding: 6px 0; }
  .row-check.is-done .row-main { opacity: 1; text-decoration: line-through; }
}
