/* Pokeflex: an independently drawn little corner for collectors. */
@layer reset, base, components, utilities;

@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  html { -webkit-text-size-adjust: 100%; scroll-padding-top: 6rem; }
  body, h1, h2, h3, h4, p, figure, blockquote, dl, dd { margin: 0; }
  img, picture, svg { display: block; max-width: 100%; }
  button, input, select, textarea { font: inherit; }
  button, select { cursor: pointer; }
  textarea { resize: vertical; }
  table { border-collapse: collapse; border-spacing: 0; }
  [hidden] { display: none !important; }
}

@layer base {
  :root {
    color-scheme: light;
    --ink: #20283f;
    --ink-soft: #4b556f;
    --paper: #f7f8ff;
    --white: #fff;
    --purple: #7660cf;
    --purple-dark: #513c9c;
    --purple-light: #e7e0ff;
    --mint: #b5ecd8;
    --mint-dark: #17654f;
    --yellow: #ffdf78;
    --yellow-dark: #71520a;
    --coral: #ffd3ca;
    --danger: #a52e3d;
    --line: #d9ddeb;
    --radius: .75rem;
    --radius-lg: 1.25rem;
    --shadow: 4px 4px 0 var(--ink);
    --mono: ui-monospace, "Cascadia Mono", "Lucida Console", monospace;
    --body: "Trebuchet MS", "Segoe UI", Verdana, sans-serif;
    --max-width: 80rem;
  }
  body {
    min-width: 20rem;
    min-height: 100vh;
    color: var(--ink);
    background: var(--paper);
    font-family: var(--body);
    font-size: 1rem;
    line-height: 1.6;
    overflow-wrap: break-word;
  }
  body.site-shell {
    display: flex;
    flex-direction: column;
    background-image: radial-gradient(#dfe2f1 .8px, transparent .8px);
    background-size: 1rem 1rem;
  }
  main, .page-wrap { flex: 1 0 auto; }
  a { color: var(--purple-dark); text-decoration-thickness: 1.5px; text-underline-offset: .2em; }
  a:hover { color: var(--ink); }
  a:visited:not(.btn):not(.nav-link):not(.brand) { color: #65508c; }
  :focus-visible { outline: 3px solid var(--purple); outline-offset: 4px; }
  ::selection { color: var(--ink); background: var(--yellow); }
  h1, h2, h3, h4 { color: var(--ink); line-height: 1.2; font-weight: 800; letter-spacing: -.025em; }
  h1 { font-size: clamp(2rem, 4.5vw, 3.25rem); }
  h2 { font-size: clamp(1.5rem, 3vw, 2.125rem); }
  h3 { font-size: 1.25rem; }
  p + p { margin-top: 1rem; }
  ul, ol { padding-left: 1.4rem; }
  li + li { margin-top: .4rem; }
  hr { margin: 2rem 0; border: 0; border-top: 1px solid var(--line); }
  code, kbd { padding: .1em .35em; border: 1px solid var(--line); border-radius: .25rem; background: #f1effa; font-family: var(--mono); font-size: .875em; }
  label { color: var(--ink); }
  input, select, textarea { max-width: 100%; }
  input[type="checkbox"], input[type="radio"] { width: 1.15rem; height: 1.15rem; margin: .15rem 0 0; accent-color: var(--purple-dark); cursor: pointer; flex: 0 0 auto; }
  button:disabled, input:disabled, select:disabled { cursor: not-allowed; }
  summary { cursor: pointer; font-weight: 700; }
}

@layer components {
  .skip-link { position: fixed; z-index: 200; top: .5rem; left: 1rem; transform: translateY(-160%); padding: .6rem 1rem; color: var(--ink); background: var(--yellow); border: 2px solid var(--ink); border-radius: .35rem; font-weight: 700; }
  .skip-link:focus { transform: none; }
  .site-header { position: relative; z-index: 50; background: var(--white); border-bottom: 2px solid var(--ink); }
  .site-header::before { content: ""; display: block; height: .35rem; background: repeating-linear-gradient(90deg, var(--purple) 0 25%, var(--mint) 25% 50%, var(--yellow) 50% 75%, var(--ink) 75% 100%); }
  .header-inner { max-width: calc(var(--max-width) + 3rem); min-height: 5.25rem; display: flex; align-items: center; gap: 2rem; margin-inline: auto; padding: .65rem 1.5rem; }
  .brand { display: inline-flex; align-items: center; gap: .6rem; flex: 0 0 auto; text-decoration: none; color: var(--ink); }
  .brand img, img.brand { width: 13.5rem; height: auto; }
  .brand-name { font-family: var(--mono); font-weight: 900; font-size: 1.65rem; letter-spacing: -.075em; }
  .main-nav { display: flex; align-items: center; gap: .25rem; margin-left: auto; }
  .nav-link { display: inline-flex; align-items: center; gap: .35rem; min-height: 2.6rem; padding: .45rem .8rem; color: var(--ink-soft); border: 1px solid transparent; border-radius: .4rem; font-size: .9375rem; font-weight: 700; text-decoration: none; white-space: nowrap; }
  .nav-link:hover { background: #f1eefb; color: var(--purple-dark); }
  .nav-link.is-active, .nav-link[aria-current="page"] { color: var(--ink); border-color: var(--ink); background: var(--yellow); box-shadow: 2px 2px 0 var(--ink); }
  .header-actions { display: flex; align-items: center; gap: .75rem; flex-shrink: 0; }
  .header-actions form { display: inline-flex; }
  .header-actions .btn { min-height: 2.65rem; padding: .4rem .85rem; font-size: .9375rem; }
  .menu-toggle, [data-menu-toggle] { display: none; }
  .page-wrap { width: min(var(--max-width), calc(100% - 3rem)); margin: 0 auto; padding: 2.5rem 0 4.5rem; }
  .page-wrap > section + section { margin-top: 3.5rem; }
  .page-wrap > .section-head:first-child { margin-bottom: 1.75rem; }
  .site-footer { margin-top: auto; color: #e5e8f2; background: var(--ink); border-top: .4rem solid var(--mint); }
  .footer-inner { width: min(var(--max-width), calc(100% - 3rem)); display: flex; align-items: flex-start; justify-content: space-between; gap: 2rem; margin-inline: auto; padding: 2.5rem 0; }
  .site-footer a, .site-footer a:visited { color: var(--yellow); }
  .site-footer p { font-size: .875rem; max-width: 40rem; }
  .site-footer .brand { color: white; margin-bottom: .8rem; }
  .site-footer .brand img { filter: brightness(0) invert(1); width: 11.5rem; }
  .footer-links { display: flex; flex-wrap: wrap; gap: .75rem 1.2rem; font-size: .875rem; }
  .footer-note { margin-top: 1rem; color: #bfc6d9; }
  .footer-stamp { display: inline-flex; gap: .5rem; align-items: center; padding: .4rem .65rem; color: var(--mint); border: 1px dashed #8794ae; font-family: var(--mono); font-size: .75rem; line-height: 1.5; }

  .hero { position: relative; isolation: isolate; display: grid; grid-template-columns: 1.1fr 1fr; overflow: hidden; color: var(--white); background: var(--ink); border: 3px solid var(--ink); border-radius: var(--radius-lg); box-shadow: 7px 7px 0 #c8c3e5; }
  .hero-copy { position: relative; z-index: 2; align-self: center; padding: clamp(1.75rem, 4vw, 3.5rem); }
  .eyebrow { display: inline-flex; align-items: center; gap: .55rem; margin-bottom: 1rem; color: var(--purple-dark); font-family: var(--mono); font-size: .8125rem; line-height: 1.5; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
  .eyebrow::before { content: "+"; font-size: 1.25em; line-height: 1; }
  .hero .eyebrow { color: var(--yellow); }
  .hero-title { max-width: 11ch; color: white; font-size: clamp(2.5rem, 5.2vw, 4.5rem); line-height: 1.02; letter-spacing: -.055em; text-wrap: balance; }
  .hero-title .highlight, .hero-title em { color: var(--yellow); font-style: normal; }
  .hero-description { max-width: 35rem; margin-top: 1.4rem; color: #dce0ef; font-size: 1.0625rem; line-height: 1.7; }
  .hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.75rem; }
  .hero .btn-primary { color: var(--ink); background: var(--yellow); border-color: var(--yellow); box-shadow: 3px 3px 0 #090f21; }
  .hero .btn-primary:hover { color: var(--ink); background: #ffeaa8; }
  .hero .btn-secondary { color: white; border-color: #7a85a5; background: transparent; box-shadow: none; }
  .hero .btn-secondary:hover { color: var(--ink); background: var(--mint); border-color: var(--mint); }
  .hero-art { position: relative; min-height: 25rem; display: grid; place-items: center; overflow: hidden; background: #403f77; border-left: 2px solid #66708e; }
  .hero-art::before { position: absolute; inset: 0; content: ""; z-index: -1; background: repeating-conic-gradient(#4b4a83 0 25%, #403f77 0 50%) 0 0 / 2.75rem 2.75rem; opacity: .55; }
  .hero-art > img { width: 100%; max-height: 31rem; object-fit: contain; }
  .hero-art .card-image { max-width: 14rem; height: auto; transform: rotate(8deg); box-shadow: 15px 16px 0 #161b38; border-radius: .65rem; }
  .hero-note { display: inline-flex; align-items: center; gap: .45rem; margin-top: 1.25rem; color: #bcc6dd; font-family: var(--mono); font-size: .75rem; }
  .hero-note::before { content: "✧"; color: var(--mint); font-size: 1.1rem; }

  .sticker { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; width: fit-content; padding: .4rem .8rem; border: 2px solid var(--ink); border-radius: .3rem; color: var(--ink); background: white; box-shadow: 2px 2px 0 var(--ink); font-family: var(--mono); font-size: .75rem; font-weight: 800; line-height: 1.4; letter-spacing: .04em; text-transform: uppercase; transform: rotate(-3deg); }
  .sticker-yellow { background: var(--yellow); }
  .sticker-mint { background: var(--mint); }
  .sticker-purple { background: var(--purple-light); }
  .hero .sticker { position: absolute; z-index: 3; right: 1.25rem; top: 1.25rem; transform: rotate(7deg); }
  .section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin: 0 0 1.4rem; }
  .section-title { position: relative; width: fit-content; font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -.035em; }
  .section-title::after { content: ""; display: block; width: 2.3rem; height: .28rem; margin-top: .6rem; background: var(--purple); box-shadow: 1.1rem 0 0 var(--mint), 2.2rem 0 0 var(--yellow); }
  .section-note { margin-top: .75rem; color: var(--ink-soft); font-size: .9375rem; line-height: 1.6; max-width: 43rem; }
  .section-head > a { flex-shrink: 0; font-size: .9375rem; font-weight: 700; }
  .section-head .eyebrow { margin-bottom: .4rem; }

  .btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 2.9rem; padding: .6rem 1.1rem; border: 2px solid var(--ink); border-radius: .45rem; color: var(--ink); background: white; font-weight: 700; font-size: 1rem; line-height: 1.4; text-decoration: none; text-align: center; box-shadow: 3px 3px 0 var(--ink); transition: transform 120ms ease, box-shadow 120ms ease, background-color 120ms ease; }
  .btn:visited { color: inherit; }
  .btn:hover { color: var(--ink); transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
  .btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
  .btn-primary { color: white; background: var(--purple-dark); }
  .btn-primary:hover { color: white; background: #6148b5; }
  .btn-secondary { background: var(--mint); }
  .btn-secondary:hover { background: #cdf4e7; }
  .btn-ghost { color: var(--purple-dark); border-color: var(--line); box-shadow: none; background: transparent; }
  .btn-ghost:hover { color: var(--purple-dark); background: #f0ecfb; border-color: var(--purple); box-shadow: none; transform: none; }
  .btn-small { min-height: 2.4rem; padding: .4rem .75rem; font-size: .875rem; box-shadow: 2px 2px 0 var(--ink); }
  .btn-danger { color: white; background: var(--danger); }
  .btn-danger:hover { color: white; background: #8e2634; }
  .btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
  .btn svg { width: 1.1rem; height: 1.1rem; flex-shrink: 0; }
  .btn-block { width: 100%; }
  .button-row, .actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; }
  .text-link { padding: 0; border: 0; color: var(--purple-dark); background: none; font: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: .2em; cursor: pointer; }

  .panel { margin-bottom: 1.5rem; overflow: hidden; border: 2px solid var(--ink); border-radius: var(--radius); background: var(--white); box-shadow: 3px 3px 0 #d4d8e8; }
  .panel-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--line); background: #f4f1fd; }
  .panel-header h2, .panel-header h3 { font-size: 1.125rem; }
  .panel-body { padding: 1.5rem; }
  .panel-body > :last-child { margin-bottom: 0; }
  .panel-footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.5rem; border-top: 1px solid var(--line); background: #fbfcff; }
  .panel-mint .panel-header { background: #e8f8f0; }
  .panel-yellow .panel-header { background: #fff5d6; }
  .split-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
  .split-grid > .panel { margin-bottom: 0; }
  .stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin: 1.5rem 0 2rem; }
  .stat-card { padding: 1.2rem 1.4rem; background: white; border: 2px solid var(--ink); border-radius: .65rem; box-shadow: 3px 3px 0 #d4d8e8; }
  .stat-card:nth-child(4n+1) { border-top: .4rem solid var(--purple); }
  .stat-card:nth-child(4n+2) { border-top: .4rem solid var(--mint); }
  .stat-card:nth-child(4n+3) { border-top: .4rem solid var(--yellow); }
  .stat-card:nth-child(4n) { border-top: .4rem solid #f5b3a6; }
  .stat-number { display: block; color: var(--ink); font-size: clamp(1.9rem, 3vw, 2.5rem); line-height: 1.15; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.05em; }
  .stat-label { display: block; margin-top: .35rem; color: var(--ink-soft); font-family: var(--mono); font-size: .75rem; letter-spacing: .035em; text-transform: uppercase; }

  .toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.5rem; padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
  .search-form { display: flex; align-items: center; gap: .65rem; flex: 1 1 21rem; }
  .search-form .search-input { flex: 1 1 auto; min-width: 0; }
  .search-input { min-height: 2.9rem; width: 100%; padding: .65rem .85rem; border: 2px solid #9da6be; border-radius: .4rem; color: var(--ink); background: #fff; line-height: 1.4; }
  .search-input::placeholder { color: #6d7690; opacity: 1; }
  .search-input:focus { border-color: var(--purple-dark); outline: 2px solid var(--purple-light); outline-offset: 1px; }
  .filter-form, .filters { display: flex; align-items: center; flex-wrap: wrap; gap: .65rem; }
  .filters { margin: 1rem 0 1.5rem; }
  .filters .field { flex: 1 1 10rem; }
  .filters label, .filter-form label { font-size: .875rem; font-weight: 700; }
  .filter-form select, .filters select, select.field-input { appearance: none; min-height: 2.9rem; padding: .55rem 2.2rem .55rem .8rem; color: var(--ink); background-color: white; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%2320283f' stroke-width='2'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .8rem center; border: 2px solid #9da6be; border-radius: .4rem; }
  .results-note { margin-bottom: 1rem; color: var(--ink-soft); font-size: .875rem; }
  .filter-tag { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .65rem; color: var(--purple-dark); border: 1px solid #bfb0ec; border-radius: .3rem; background: var(--purple-light); font-size: .875rem; }

  .set-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem; }
  .set-card { position: relative; display: flex; flex-direction: column; min-width: 0; overflow: hidden; border: 2px solid var(--ink); border-radius: var(--radius); background: white; box-shadow: 4px 4px 0 #d1d5e5; transition: transform 140ms ease, box-shadow 140ms ease; }
  a.set-card { color: inherit; text-decoration: none; }
  .set-card:hover { transform: translateY(-3px); box-shadow: 5px 7px 0 #c6c1df; }
  .set-card-art { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; min-height: 9rem; padding: 1.5rem; overflow: hidden; background: var(--purple-light); border-bottom: 2px solid var(--ink); }
  .set-card:nth-child(4n+2) .set-card-art { background: #c9efe0; }
  .set-card:nth-child(4n+3) .set-card-art { background: #ffe9a4; }
  .set-card:nth-child(4n+4) .set-card-art { background: #ffdcd5; }
  .set-card-art::before, .set-card-art::after { position: absolute; width: 1.8rem; height: 1.8rem; content: "+"; color: #20283f35; font-family: var(--mono); font-size: 2.1rem; font-weight: 700; line-height: 1; }
  .set-card-art::before { left: .7rem; top: .5rem; }
  .set-card-art::after { right: .7rem; bottom: .5rem; }
  .set-card-art img { position: relative; z-index: 1; width: auto; max-width: 85%; height: 4.5rem; object-fit: contain; }
  .set-card-art .set-code { padding: .3rem .75rem; color: var(--ink); border: 2px solid var(--ink); background: #ffffffb8; font-family: var(--mono); font-size: 1.4rem; font-weight: 800; letter-spacing: .06em; box-shadow: 3px 3px 0 #20283f3b; transform: rotate(-3deg); }
  .set-code { color: var(--purple-dark); font-family: var(--mono); font-size: .75rem; font-weight: 700; letter-spacing: .04em; }
  .set-card-body { display: flex; flex: 1; flex-direction: column; align-items: flex-start; gap: .45rem; padding: 1rem 1.1rem 1.1rem; }
  .set-name { font-size: 1.125rem; font-weight: 800; line-height: 1.35; }
  .set-name a { color: var(--ink); text-decoration: none; }
  .set-name a:hover { color: var(--purple-dark); text-decoration: underline; }
  .set-meta { color: var(--ink-soft); font-size: .875rem; }
  .set-count { color: var(--ink-soft); font-family: var(--mono); font-size: .75rem; }
  .set-progress { width: 100%; margin-top: auto; padding-top: .65rem; }
  .set-progress > span, .progress-label { display: flex; align-items: center; justify-content: space-between; margin-bottom: .3rem; color: var(--ink-soft); font-family: var(--mono); font-size: .75rem; }
  .progress-track { height: .65rem; overflow: hidden; background: #edeff7; border: 1px solid #bcc4d9; border-radius: .15rem; }
  .progress-bar { height: 100%; min-width: 0; max-width: 100%; background: var(--purple); border-right: 1px solid var(--purple-dark); }
  .progress-track.is-mint .progress-bar { background: #44b08e; border-right-color: var(--mint-dark); }
  .set-card .badge { margin-top: .25rem; }

  .card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: 1.25rem 1rem; align-items: start; }
  .card-tile { position: relative; min-width: 0; overflow: hidden; border: 2px solid #b7bfd5; border-radius: .7rem; background: white; box-shadow: 3px 3px 0 #dce0ee; transition: border-color 130ms ease, transform 130ms ease, box-shadow 130ms ease; }
  .card-tile:hover { border-color: var(--purple); transform: translateY(-2px); box-shadow: 3px 5px 0 #d3cbea; }
  .card-tile.is-selected { border-color: var(--purple-dark); box-shadow: 0 0 0 2px var(--purple-light), 3px 3px 0 var(--purple-dark); }
  .card-art { position: relative; display: block; aspect-ratio: 63 / 88; overflow: hidden; margin: .6rem .6rem 0; border-radius: .4rem; background: #e9e5f6; }
  .card-art > a { display: block; height: 100%; }
  .card-image, .card-art img { width: 100%; height: 100%; display: block; object-fit: contain; }
  .card-art .card-image { transition: transform 180ms ease; }
  .card-tile:hover .card-art .card-image { transform: scale(1.025); }
  .card-art input[type="checkbox"] { position: absolute; z-index: 2; top: .5rem; left: .5rem; width: 1.25rem; height: 1.25rem; border: 2px solid var(--ink); box-shadow: 0 0 0 3px white; }
  .card-info { padding: .75rem .75rem .9rem; }
  .card-name { display: block; color: var(--ink); font-size: 1rem; line-height: 1.3; font-weight: 800; text-decoration: none; }
  .card-name:hover { color: var(--purple-dark); text-decoration: underline; }
  .card-number { display: block; margin-top: .3rem; color: #68718a; font-family: var(--mono); font-size: .75rem; }
  .card-meta { display: flex; flex-wrap: wrap; gap: .25rem .45rem; margin-top: .45rem; color: var(--ink-soft); font-size: .8125rem; line-height: 1.5; }
  .card-actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .4rem; margin-top: .7rem; }
  .card-actions .btn { min-height: 2.35rem; padding: .3rem .6rem; font-size: .875rem; box-shadow: 2px 2px 0 var(--ink); }
  .owned-badge { position: absolute; z-index: 3; top: 1rem; right: .35rem; max-width: calc(100% - 1rem); padding: .25rem .55rem; color: var(--ink); border: 1px solid var(--ink); background: var(--mint); box-shadow: 2px 2px 0 #20283f7a; font-family: var(--mono); font-size: .75rem; font-weight: 700; line-height: 1.5; }
  .copy-label { display: inline-flex; align-items: center; gap: .3rem; font-size: .75rem; color: var(--ink-soft); }
  .badge { display: inline-flex; align-items: center; justify-content: center; gap: .3rem; padding: .2rem .5rem; color: var(--purple-dark); border: 1px solid #c4b6ee; border-radius: .3rem; background: #eee8ff; font-family: var(--mono); font-size: .75rem; line-height: 1.45; font-weight: 700; letter-spacing: .015em; vertical-align: middle; }
  .badge-muted { color: #58627b; background: #f0f2f8; border-color: #d2d8e6; }
  .badge-mint { color: #185b47; background: #d6f4e7; border-color: #9dd7c1; }
  .badge-yellow { color: #6b4b06; background: #fff0bf; border-color: #e3c563; }
  .badge-coral { color: #893c36; background: #ffe3dc; border-color: #eab0a1; }

  .notice { position: relative; display: flex; align-items: flex-start; gap: .75rem; margin-bottom: 1.5rem; padding: 1rem 1.15rem; color: #294176; border: 1px solid #a7bce8; border-left: .4rem solid #718ed1; border-radius: .5rem; background: #edf3ff; font-size: .9375rem; }
  .notice-success, .notice.success { color: #14563e; border-color: #9cd4ba; border-left-color: #319970; background: #e9f8ef; }
  .notice-error, .notice.error, .notice-danger { color: #822d3c; border-color: #e8a8b4; border-left-color: #b94057; background: #fff0f3; }
  .notice-warning, .notice.warning { color: #70510b; border-color: #e1c56e; border-left-color: #bd942a; background: #fff8dc; }
  .notice [data-dismiss] { margin: -.3rem -.25rem -.3rem auto; padding: .2rem .5rem; border: 0; background: none; color: inherit; font-size: 1.3rem; line-height: 1.3; }
  .notice p { flex: 1; }
  .notice a { color: inherit; font-weight: 700; }
  .empty-state { display: flex; min-height: 19rem; flex-direction: column; align-items: center; justify-content: center; padding: 3rem 1.5rem; text-align: center; border: 2px dashed #a8afc6; border-radius: var(--radius-lg); background: #ffffffbd; }
  .empty-icon { display: grid; width: 4.5rem; height: 4.5rem; place-items: center; margin-bottom: 1.25rem; color: var(--purple-dark); background: var(--purple-light); border: 2px solid var(--ink); border-radius: .6rem; box-shadow: 3px 3px 0 var(--ink); font-size: 2rem; transform: rotate(-6deg); }
  .empty-icon svg { width: 2.5rem; height: 2.5rem; }
  .empty-title { font-size: 1.6rem; }
  .empty-copy { max-width: 31rem; margin-top: .75rem; color: var(--ink-soft); }
  .empty-state .btn, .empty-state .button-row { margin-top: 1.4rem; }
  .pagination { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: .4rem; margin: 2rem 0 .5rem; }
  .pagination a, .pagination span { display: inline-flex; align-items: center; justify-content: center; min-width: 2.55rem; min-height: 2.55rem; padding: .35rem .7rem; border: 1px solid #bac2d8; border-radius: .3rem; background: white; font-family: var(--mono); font-size: .875rem; text-decoration: none; }
  .pagination a:hover { border-color: var(--purple-dark); background: var(--purple-light); }
  .pagination .is-active, .pagination [aria-current="page"] { color: white; border-color: var(--ink); background: var(--purple-dark); box-shadow: 2px 2px 0 var(--ink); }
  .pagination .is-disabled { color: #82899d; background: #edf0f8; }

  .auth-layout { display: grid; grid-template-columns: .9fr 1.1fr; align-items: start; gap: 3.5rem; max-width: 66rem; margin: 1rem auto 2rem; }
  .auth-aside { align-self: center; padding: 1.5rem 0; }
  .auth-aside h1 { max-width: 12ch; font-size: clamp(2.4rem, 5vw, 3.6rem); letter-spacing: -.05em; }
  .auth-aside p { max-width: 32rem; margin-top: 1.25rem; color: var(--ink-soft); }
  .auth-aside > img { width: min(100%, 26rem); margin-top: 1.5rem; }
  .auth-card { padding: 2rem; border: 2px solid var(--ink); border-top: .5rem solid var(--purple); border-radius: var(--radius-lg); background: white; box-shadow: 6px 6px 0 #d1cbe6; }
  .auth-card h1, .auth-card h2 { margin-bottom: .75rem; font-size: 1.8rem; }
  .auth-card > p { margin-bottom: 1.5rem; color: var(--ink-soft); font-size: .9375rem; }
  .auth-card .form-stack { margin-top: 1.5rem; }
  .auth-footer { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px dashed var(--line); color: var(--ink-soft); font-size: .9375rem; text-align: center; }
  .form-stack { display: flex; flex-direction: column; gap: 1.15rem; }
  .field { display: flex; flex-direction: column; gap: .4rem; min-width: 0; }
  .field-label { display: block; font-size: .9375rem; font-weight: 700; line-height: 1.5; }
  .field-label .optional { color: #647088; font-size: .8125rem; font-weight: 400; }
  .field-input, .field input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), .field textarea { width: 100%; min-height: 2.9rem; padding: .65rem .8rem; color: var(--ink); background: white; border: 2px solid #aab3ca; border-radius: .4rem; font-size: 1rem; line-height: 1.5; box-shadow: 0 2px 0 #eff0f6 inset; }
  .field-input:focus, .field input:focus, .field textarea:focus { border-color: var(--purple); outline: 2px solid var(--purple-light); outline-offset: 1px; }
  .field-input::placeholder, .field input::placeholder, .field textarea::placeholder { color: #69738b; }
  .field textarea { min-height: 7rem; }
  .field input[readonly], .field input:disabled { background: #f2f4fa; color: #666f87; }
  .field input[type="file"] { width: 100%; padding: .7rem; border: 2px dashed #b7b0cc; border-radius: .5rem; background: #faf8ff; font-size: .875rem; }
  .field input[type="file"]::file-selector-button { margin-right: .75rem; padding: .45rem .65rem; border: 1px solid var(--ink); border-radius: .25rem; color: var(--ink); background: var(--purple-light); font: inherit; cursor: pointer; }
  .field-help { color: #5e6982; font-size: .8125rem; line-height: 1.5; }
  .field-error, .error-message { color: #a12b43; font-size: .875rem; line-height: 1.5; }
  .field:has(.field-error) .field-input, .field-input[aria-invalid="true"] { border-color: #b9425a; background: #fff9fa; }
  .field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
  .checkbox-row { display: flex; align-items: flex-start; gap: .7rem; color: var(--ink-soft); font-size: .9375rem; line-height: 1.55; }
  .checkbox-row label { cursor: pointer; }
  .checkbox-row .field-help { display: block; margin-top: .25rem; }
  .password-field { position: relative; }
  .password-field .field-input { padding-right: 4rem; }
  [data-password-toggle] { min-height: 2.4rem; padding: .3rem .5rem; color: var(--purple-dark); border: 0; background: transparent; font-size: .875rem; font-weight: 700; }
  .password-field [data-password-toggle] { position: absolute; top: .25rem; right: .3rem; }
  .input-prefix { display: flex; align-items: center; border: 2px solid #aab3ca; border-radius: .4rem; background: #f3f0fc; overflow: hidden; }
  .input-prefix > span { padding-inline: .85rem; color: var(--purple-dark); font-family: var(--mono); }
  .input-prefix .field-input { border: 0; border-radius: 0; box-shadow: none; }
  .inline-form { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .65rem; margin: 0; }
  .inline-form .field-input { width: auto; }
  .inline-form .field { margin: 0; }
  [data-quantity-stepper] { display: inline-flex; align-items: stretch; width: fit-content; border: 2px solid #aab3ca; border-radius: .4rem; overflow: hidden; background: white; }
  [data-quantity-stepper] input[type="number"] { width: 4.25rem; min-height: 2.7rem; padding: .35rem; border: 0; border-inline: 1px solid var(--line); border-radius: 0; text-align: center; box-shadow: none; appearance: textfield; -moz-appearance: textfield; }
  [data-quantity-stepper] input::-webkit-inner-spin-button { appearance: none; }
  [data-quantity-stepper] button { min-width: 2.7rem; border: 0; color: var(--purple-dark); background: #f0ebfb; font-size: 1.2rem; font-weight: 700; }
  [data-quantity-stepper] button:hover { background: var(--purple-light); }
  [data-quantity-stepper] button:disabled { color: #969db0; background: #f4f5f9; }
  .upload-preview { width: min(100%, 15rem); max-height: 19rem; margin-top: .75rem; object-fit: contain; border: 1px solid var(--line); border-radius: .5rem; }

  .breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-bottom: 1.5rem; color: #6c7590; font-family: var(--mono); font-size: .75rem; }
  .breadcrumbs a { color: var(--purple-dark); }
  .breadcrumbs > span:not(:last-child)::after, .breadcrumbs li:not(:last-child)::after { content: "/"; margin-left: .4rem; color: #9ca4b9; }
  .detail-grid { display: grid; grid-template-columns: minmax(15rem, 24rem) minmax(0, 1fr); gap: 3rem; align-items: start; }
  .detail-art { position: relative; padding: 1.2rem; border: 2px solid var(--ink); border-radius: 1rem; background: #e4dcf9; box-shadow: 6px 6px 0 #b8afd0; }
  .detail-art > img, .detail-art .card-image { width: 100%; height: auto; aspect-ratio: 63 / 88; border-radius: .55rem; object-fit: contain; }
  .detail-art .owned-badge { top: 2rem; right: .5rem; font-size: .8rem; }
  .detail-content { min-width: 0; }
  .detail-title { margin: .45rem 0 .85rem; font-size: clamp(2rem, 4vw, 3rem); }
  .detail-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin-bottom: 1.5rem; color: var(--ink-soft); }
  .detail-content > .panel { margin-top: 1.75rem; }
  .detail-copy { color: var(--ink-soft); max-width: 52rem; }
  .detail-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.5rem; padding: 1.25rem 0; }
  .detail-facts dt { color: #647088; font-family: var(--mono); font-size: .75rem; text-transform: uppercase; letter-spacing: .035em; }
  .detail-facts dd { margin-top: .15rem; color: var(--ink); font-weight: 700; }
  .variant-list { display: flex; flex-wrap: wrap; gap: .5rem; margin-block: .75rem 1.25rem; }
  .variant-list label { display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .7rem; border: 1px solid #bfc5d8; border-radius: .3rem; background: white; cursor: pointer; font-size: .875rem; }
  .variant-list label:has(input:checked) { border-color: var(--purple-dark); background: var(--purple-light); }
  .variant-list input { margin: 0; width: 1rem; height: 1rem; }
  .artist-note, .collector-note { padding: 1rem 1.25rem; border: 1px dashed #c4ae5e; background: #fff8dd; border-radius: .4rem; color: #66531c; font-size: .875rem; }

  .profile-header { position: relative; display: flex; align-items: flex-start; gap: 1.75rem; margin-bottom: 2rem; padding: 2rem; overflow: hidden; border: 2px solid var(--ink); border-top: .65rem solid var(--purple); border-radius: var(--radius-lg); background: white; box-shadow: 5px 5px 0 #d7d1e9; }
  .profile-avatar { display: grid; place-items: center; flex: 0 0 auto; width: 6.8rem; height: 6.8rem; overflow: hidden; color: var(--purple-dark); border: 2px solid var(--ink); border-radius: 1rem; background: var(--purple-light); box-shadow: 3px 3px 0 var(--yellow); font-family: var(--mono); font-size: 2.5rem; font-weight: 800; transform: rotate(-3deg); }
  .profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
  .profile-info { flex: 1; min-width: 0; }
  .profile-info h1 { margin-bottom: .2rem; font-size: clamp(1.8rem, 3.5vw, 2.5rem); }
  .profile-handle { color: var(--purple-dark); font-family: var(--mono); font-size: .9375rem; }
  .profile-bio { max-width: 45rem; margin-top: 1rem; color: var(--ink-soft); white-space: pre-wrap; }
  .profile-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-left: auto; }
  .profile-since { margin-top: .75rem; color: #647088; font-family: var(--mono); font-size: .75rem; }
  .profile-stats { display: flex; flex-wrap: wrap; gap: 1.25rem; margin-top: 1rem; }
  .profile-stats strong { color: var(--ink); }
  .profile-stats span { color: var(--ink-soft); font-size: .875rem; }
  .collector-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
  .collector-card { display: flex; align-items: center; gap: 1rem; padding: 1.25rem; border: 2px solid var(--ink); border-radius: .7rem; background: white; box-shadow: 3px 3px 0 #d7d1e9; color: var(--ink); text-decoration: none; }
  .collector-card .profile-avatar { width: 3.6rem; height: 3.6rem; border-radius: .5rem; font-size: 1.35rem; box-shadow: 2px 2px 0 var(--yellow); }
  .collector-card:hover { background: #faf8ff; }
  .collector-card h3 { font-size: 1rem; }
  .collector-card .profile-handle { font-size: .875rem; }
  .collector-card p { color: var(--ink-soft); font-size: .8125rem; }

  .binder-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.35rem; }
  .binder-card { display: flex; flex-direction: column; overflow: hidden; border: 2px solid var(--ink); border-radius: .5rem .9rem .9rem .5rem; background: white; box-shadow: 5px 5px 0 #d6cee6; transition: transform 130ms ease, box-shadow 130ms ease; }
  a.binder-card { text-decoration: none; color: var(--ink); }
  .binder-card:hover { transform: translateY(-3px); box-shadow: 6px 8px 0 #c7bddb; }
  .binder-cover { position: relative; min-height: 11rem; display: grid; place-items: center; overflow: hidden; padding: 1.5rem 1.5rem 1.5rem 2.5rem; background: var(--purple-light); border-bottom: 2px solid var(--ink); }
  .binder-card:nth-child(3n+2) .binder-cover { background: var(--mint); }
  .binder-card:nth-child(3n) .binder-cover { background: #ffe9a4; }
  .binder-cover::before { position: absolute; content: ""; width: 1.2rem; top: 0; bottom: 0; left: 0; background: #20283f20; border-right: 2px solid var(--ink); }
  .binder-cover::after { position: absolute; content: ""; width: .35rem; height: .35rem; left: .42rem; top: 1.1rem; border-radius: 50%; background: #20283f5c; box-shadow: 0 3rem #20283f5c, 0 6rem #20283f5c; }
  .binder-cover > img { width: 100%; height: 10rem; object-fit: contain; }
  .binder-cover .binder-icon { color: var(--ink); font-family: var(--mono); font-size: 3.5rem; line-height: 1; }
  .binder-cover .binder-label { padding: .5rem 1rem; border: 2px solid var(--ink); background: #ffffffd6; font-family: var(--mono); font-size: 1.1rem; font-weight: 700; text-align: center; box-shadow: 3px 3px 0 #20283f3b; transform: rotate(-3deg); }
  .binder-info { padding: 1.15rem 1.25rem; }
  .binder-info h2, .binder-info h3 { margin-bottom: .4rem; font-size: 1.125rem; }
  .binder-info h3 a, .binder-info h2 a { color: var(--ink); text-decoration: none; }
  .binder-info p { color: var(--ink-soft); font-size: .875rem; }
  .binder-meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .4rem; margin-top: .85rem; color: #6b7590; font-family: var(--mono); font-size: .75rem; }

  .table-wrap { max-width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: .5rem; background: white; }
  .data-table { width: 100%; min-width: 35rem; text-align: left; }
  .data-table th { padding: .8rem 1rem; color: #535e7b; border-bottom: 2px solid #c0c7da; background: #f1eef9; font-family: var(--mono); font-size: .875rem; line-height: 1.5; font-weight: 700; text-transform: uppercase; letter-spacing: .035em; white-space: nowrap; }
  .data-table td { padding: .9rem 1rem; border-bottom: 1px solid #e6e9f1; font-size: .875rem; vertical-align: middle; }
  .data-table tr:last-child td { border-bottom: 0; }
  .data-table tbody tr:hover { background: #faf8ff; }
  .data-table tr.is-selected { background: #f1ecff; }
  .data-table .table-card { display: flex; align-items: center; gap: .8rem; }
  .table-card img { width: 2.7rem; height: 3.8rem; object-fit: contain; border-radius: .2rem; }
  .table-card a { color: var(--ink); font-weight: 700; }
  .table-card small { display: block; color: var(--ink-soft); font-family: var(--mono); font-size: .75rem; }
  .table-actions { display: flex; align-items: center; justify-content: flex-end; gap: .4rem; }
  .table-actions .btn { min-height: 2.35rem; padding: .3rem .55rem; font-size: .875rem; box-shadow: none; }
  .settings-layout { display: grid; grid-template-columns: 14rem minmax(0, 1fr); gap: 2rem; align-items: start; }
  .settings-nav { display: flex; flex-direction: column; gap: .25rem; padding: .5rem; border: 2px solid var(--ink); border-radius: .6rem; background: white; }
  .settings-nav a { padding: .6rem .8rem; border-radius: .3rem; color: var(--ink-soft); font-size: .9375rem; text-decoration: none; }
  .settings-nav a:hover { background: #f3effc; }
  .settings-nav .is-active, .settings-nav [aria-current="page"] { color: var(--purple-dark); background: var(--purple-light); font-weight: 700; }
  .settings-content { min-width: 0; }
  .settings-content .panel-body { max-width: 52rem; }
  .danger-zone { border-color: #b74b5e; }
  .danger-zone .panel-header { color: #8f2d40; background: #fff0f2; border-bottom-color: #e8b3bd; }
  .danger-zone .panel-header h2, .danger-zone .panel-header h3 { color: inherit; }
  .tabs { display: flex; gap: .2rem; margin: 1.5rem 0; padding: .25rem; overflow-x: auto; border: 1px solid #c5cadd; border-radius: .5rem; background: #eef0f8; scrollbar-width: thin; }
  .tab { display: inline-flex; justify-content: center; align-items: center; gap: .5rem; min-height: 2.6rem; padding: .45rem 1rem; color: #5d6680; border: 1px solid transparent; border-radius: .35rem; font-size: .9375rem; font-weight: 700; text-decoration: none; white-space: nowrap; }
  .tab:hover { color: var(--purple-dark); background: #f7f4ff; }
  .tab.is-active, .tab[aria-current="page"], .tab[aria-selected="true"] { color: var(--purple-dark); background: white; border-color: #c7bfdc; box-shadow: 1px 2px 0 #d8d5e5; }
  .checklist { margin: 0; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: .5rem; overflow: hidden; background: white; }
  .checklist-row { display: flex; align-items: center; gap: .9rem; padding: .9rem 1rem; margin: 0; border-bottom: 1px solid var(--line); }
  .checklist-row:last-child { border-bottom: 0; }
  .checklist-row.is-selected { background: #f1edff; }
  .checklist-row > :last-child { margin-left: auto; }
  .checklist-row .card-name { font-size: .9375rem; }
  .checklist-row .card-number { min-width: 3.75rem; margin: 0; }
  .checklist-row .card-image { width: 2.2rem; height: 3.1rem; border-radius: .2rem; }
  .bulk-bar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; padding: .8rem 1rem; margin-bottom: 1.25rem; border: 1px solid #b9a9e6; border-radius: .5rem; color: var(--purple-dark); background: #eee7ff; }
  .bulk-bar .checkbox-row { align-items: center; color: inherit; }
  .bulk-bar input[type="checkbox"] { margin: 0; }
  .bulk-count { font-family: var(--mono); font-size: .8125rem; }
  .mobile-nav { display: none; }
  .legal-copy { max-width: 48rem; padding: 2rem; border: 1px solid var(--line); border-radius: .7rem; background: white; }
  .legal-copy h2 { margin-top: 2rem; margin-bottom: .75rem; font-size: 1.4rem; }
  .legal-copy h3 { margin-top: 1.5rem; margin-bottom: .5rem; font-size: 1.125rem; }
  .legal-copy ul, .legal-copy ol { margin-block: .75rem 1.25rem; }
  .legal-copy .updated { color: #647088; font-family: var(--mono); font-size: .75rem; }
  .status-list { list-style: none; margin: 0; padding: 0; }
  .status-list li { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .65rem 0; margin: 0; border-bottom: 1px dashed var(--line); }
  .status-list li:last-child { border-bottom: 0; }
  .status-list small { color: var(--ink-soft); }
  .toast { position: fixed; z-index: 300; bottom: 1.5rem; left: 50%; transform: translateX(-50%); max-width: calc(100vw - 2rem); padding: .65rem 1rem; color: white; background: var(--ink); border: 2px solid var(--mint); border-radius: .5rem; box-shadow: 3px 3px 0 #20283f40; font-size: .875rem; }
  .about-stamp { display: inline-block; padding: .5rem .7rem; border: 1px dashed #c8b56a; color: #7b621c; background: #fff7d8; font-family: var(--mono); font-size: .75rem; transform: rotate(-2deg); }

  @media (min-width: 100rem) {
    .hero-art { min-height: 28rem; }
  }
  @media (max-width: 75rem) {
    .header-inner { gap: 1rem; }
    .brand img, img.brand { width: 11.5rem; }
    .nav-link { padding-inline: .6rem; }
    .header-actions { gap: .5rem; }
    .set-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .hero-copy { padding: 2rem; }
    .hero-title { font-size: 3.5rem; }
  }
  @media (max-width: 62rem) {
    .header-inner { flex-wrap: wrap; min-height: 4.8rem; }
    .header-actions { margin-left: auto; }
    .main-nav { flex-basis: 100%; order: 3; justify-content: center; padding-top: .35rem; margin: 0; border-top: 1px solid var(--line); }
    .hero { grid-template-columns: 1.05fr .95fr; }
    .hero-title { font-size: 3rem; }
    .hero-art { min-height: 23rem; }
    .hero-description { font-size: 1rem; }
    .stat-grid { gap: .75rem; }
    .stat-card { padding: 1rem; }
    .detail-grid { grid-template-columns: minmax(13rem, 19rem) minmax(0, 1fr); gap: 2rem; }
    .binder-grid, .collector-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .profile-header { flex-wrap: wrap; }
    .profile-actions { margin-left: 8.5rem; margin-top: -.5rem; }
    .auth-layout { gap: 2rem; }
    .auth-card { padding: 1.5rem; }
    .settings-layout { grid-template-columns: 11rem minmax(0, 1fr); gap: 1.25rem; }
  }
  @media (max-width: 48rem) {
    .page-wrap { width: min(var(--max-width), calc(100% - 2rem)); padding-top: 1.75rem; padding-bottom: 3rem; }
    .page-wrap > section + section { margin-top: 2.75rem; }
    .header-inner { padding-inline: 1rem; gap: .75rem; }
    .brand img, img.brand { width: 10.75rem; }
    .header-actions .btn { min-height: 2.65rem; padding: .35rem .65rem; font-size: .875rem; box-shadow: 2px 2px 0 var(--ink); }
    .main-nav { justify-content: flex-start; overflow-x: auto; gap: .2rem; scrollbar-width: none; }
    .main-nav::-webkit-scrollbar { display: none; }
    .nav-link { min-height: 2.4rem; padding: .35rem .65rem; font-size: .875rem; }
    .hero { grid-template-columns: 1fr; }
    .hero-copy { padding: 2rem 1.5rem 2.25rem; }
    .hero-title { max-width: 14ch; font-size: clamp(2.55rem, 8vw, 3.6rem); }
    .hero-description { max-width: 35rem; }
    .hero-art { min-height: auto; height: 17.5rem; border-left: 0; border-top: 2px solid #66708e; }
    .hero-art > img { height: 18.5rem; width: auto; max-width: 100%; }
    .hero .sticker { right: .8rem; top: .75rem; font-size: .75rem; }
    .hero-actions { gap: .7rem; }
    .hero-actions .btn { flex: 1 1 auto; }
    .section-head { align-items: flex-start; }
    .section-head > a { margin-top: .25rem; }
    .section-title { font-size: 1.6rem; }
    .section-note { font-size: .875rem; }
    .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stat-number { font-size: 2rem; }
    .stat-label { font-size: .75rem; }
    .set-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
    .set-card-art { min-height: 7.5rem; padding: 1rem; }
    .set-card-art img { height: 3.7rem; }
    .set-card-art .set-code { font-size: 1.15rem; }
    .set-card-body { padding: .85rem; }
    .set-name { font-size: 1rem; }
    .set-meta { font-size: .8125rem; }
    .card-grid { grid-template-columns: repeat(auto-fill, minmax(9.2rem, 1fr)); gap: 1rem .75rem; }
    .card-art { margin: .45rem .45rem 0; }
    .card-info { padding: .65rem; }
    .card-name { font-size: .9375rem; }
    .owned-badge { top: .8rem; right: .25rem; }
    .detail-grid { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
    .detail-art { width: min(100%, 21rem); margin-inline: auto; padding: 1rem; }
    .detail-title { font-size: 2rem; }
    .detail-meta { margin-bottom: 1rem; }
    .detail-content > .panel { margin-top: 1.5rem; }
    .auth-layout { grid-template-columns: 1fr; max-width: 34rem; gap: 1.75rem; margin-top: 0; }
    .auth-aside { padding: .25rem 0; }
    .auth-aside h1 { max-width: 20ch; font-size: 2.25rem; }
    .auth-aside > img { display: none; }
    .auth-aside p { margin-top: .75rem; font-size: .9375rem; }
    .auth-card { padding: 1.5rem; }
    .split-grid { grid-template-columns: 1fr; }
    .panel-body { padding: 1.25rem; }
    .panel-footer { flex-wrap: wrap; padding: 1rem 1.25rem; }
    .toolbar { gap: .75rem; padding: .85rem; }
    .search-form { flex-basis: 100%; gap: .5rem; }
    .search-form .btn { min-height: 2.9rem; padding-inline: .8rem; }
    .filter-form { width: 100%; }
    .filter-form select { flex: 1; min-width: 0; }
    .profile-header { padding: 1.5rem; gap: 1.2rem; }
    .profile-avatar { width: 5rem; height: 5rem; font-size: 1.9rem; border-radius: .7rem; }
    .profile-info h1 { font-size: 1.8rem; }
    .profile-handle { font-size: .875rem; }
    .profile-bio { flex-basis: 100%; margin-top: .75rem; font-size: .9375rem; }
    .profile-actions { margin: 0; width: 100%; }
    .profile-actions .btn { flex: 1; }
    .profile-stats { gap: .7rem 1.1rem; }
    .binder-grid { gap: 1rem; }
    .binder-cover { min-height: 9rem; padding: 1rem 1rem 1rem 2rem; }
    .binder-cover > img { height: 8rem; }
    .binder-info { padding: .9rem; }
    .binder-info h2, .binder-info h3 { font-size: 1rem; }
    .binder-cover .binder-label { padding: .4rem .6rem; font-size: .875rem; }
    .settings-layout { grid-template-columns: 1fr; gap: 1.25rem; }
    .settings-nav { flex-direction: row; overflow-x: auto; white-space: nowrap; }
    .settings-nav a { padding: .5rem .75rem; font-size: .875rem; }
    .footer-inner { width: calc(100% - 2rem); flex-direction: column; gap: 1.5rem; padding-block: 2rem; }
    .footer-links { gap: .6rem 1rem; }
    .checklist-row { padding: .75rem; gap: .65rem; }
    .checklist-row .card-number { min-width: 2.8rem; font-size: .75rem; }
    .checklist-row .card-name { font-size: .875rem; }
    .checklist-row .btn-small { font-size: .875rem; padding-inline: .5rem; }
    .bulk-bar { gap: .75rem; padding: .8rem; }
    .legal-copy { padding: 1.25rem; }
  }
  @media (max-width: 35rem) {
    .header-actions .secondary-action { display: none; }
    .menu-toggle, [data-menu-toggle] { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 2.45rem; height: 2.45rem; padding: .4rem; border: 1px solid #bbc2d5; border-radius: .3rem; color: var(--ink); background: white; font-size: 1.15rem; line-height: 1; }
    .header-inner:has([data-menu-toggle]) .main-nav { display: none; overflow: visible; flex-wrap: wrap; padding-top: .75rem; padding-bottom: .25rem; }
    .header-inner:has([data-menu-toggle]) .main-nav.is-open { display: flex; }
    .header-actions { gap: .4rem; }
    .header-actions .user-handle { display: none; }
    .hero-copy { padding: 1.75rem 1.25rem 2rem; }
    .hero-title { font-size: 2.7rem; }
    .hero-art { height: 15.5rem; }
    .hero-art > img { height: 17rem; }
    .eyebrow { font-size: .75rem; letter-spacing: .045em; }
    .hero .eyebrow { margin-bottom: .8rem; }
    .section-head { flex-wrap: wrap; gap: .75rem; }
    .section-head > a { margin-top: 0; }
    .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .card-actions { align-items: stretch; }
    .card-actions .btn { flex: 1; }
    .card-meta { font-size: .75rem; }
    .card-number { font-size: .75rem; }
    .set-grid { gap: .85rem; }
    .set-card-body { padding: .75rem; }
    .set-card-art { min-height: 6.8rem; }
    .set-card-art .set-code { font-size: 1rem; }
    .set-card-art img { max-width: 100%; height: 3.3rem; }
    .set-card-art::before, .set-card-art::after { font-size: 1.6rem; }
    .set-meta { font-size: .75rem; }
    .field-row { grid-template-columns: 1fr; }
    .auth-card { padding: 1.25rem; }
    .auth-card h1, .auth-card h2 { font-size: 1.55rem; }
    .profile-header { padding: 1.2rem; gap: 1rem; }
    .profile-avatar { width: 4rem; height: 4rem; font-size: 1.5rem; }
    .profile-info h1 { font-size: 1.55rem; }
    .collector-grid { grid-template-columns: 1fr; }
    .binder-grid { grid-template-columns: 1fr 1fr; gap: .85rem; }
    .binder-cover { min-height: 8rem; padding-left: 1.8rem; }
    .binder-info p { font-size: .8125rem; }
    .binder-info .binder-meta { font-size: .75rem; }
    .detail-facts { gap: .9rem 1rem; }
    .panel-header { padding: .85rem 1rem; }
    .panel-body { padding: 1rem; }
    .panel-footer { padding-inline: 1rem; }
    .panel-footer .btn { width: 100%; }
    .status-list li { align-items: flex-start; }
    .toast { bottom: 1rem; width: max-content; text-align: center; }
  }
  @media (max-width: 22rem) {
    .header-inner { padding-inline: .75rem; }
    .brand img, img.brand { width: 9.5rem; }
    .header-actions .btn { padding-inline: .45rem; font-size: .875rem; }
    .page-wrap { width: calc(100% - 1.5rem); }
    .hero-title { font-size: 2.35rem; }
    .set-grid, .binder-grid { grid-template-columns: 1fr; }
  }
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
    .card-tile:hover, .set-card:hover, .binder-card:hover, .btn:hover { transform: none; }
  }
  @media print {
    .site-header, .site-footer, .hero-art, .header-actions, .toolbar, .filters, .card-actions, .pagination, .btn, .settings-nav, .bulk-bar { display: none !important; }
    body.site-shell { display: block; color: #000; background: white; }
    .page-wrap { width: 100%; padding: 0; }
    .panel, .set-card, .card-tile, .stat-card, .binder-card, .profile-header { box-shadow: none; break-inside: avoid; }
    .card-grid { grid-template-columns: repeat(5, 1fr); gap: .4rem; }
    a { color: black; text-decoration: none; }
  }
}

@layer utilities {
  .sr-only, .visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
  .muted, .text-muted { color: var(--ink-soft); }
  .text-small { font-size: .875rem; }
  .text-mono { font-family: var(--mono); }
  .text-center { text-align: center; }
  .text-right { text-align: right; }
  .text-break { overflow-wrap: anywhere; }
  .nowrap { white-space: nowrap; }
  .grow { flex: 1; }
  .w-full { width: 100%; }
  .max-readable { max-width: 46rem; }
  .mt-0 { margin-top: 0 !important; }
  .mt-1 { margin-top: .5rem; }
  .mt-2 { margin-top: 1rem; }
  .mt-3 { margin-top: 1.5rem; }
  .mt-4 { margin-top: 2rem; }
  .mb-0 { margin-bottom: 0 !important; }
  .mb-1 { margin-bottom: .5rem; }
  .mb-2 { margin-bottom: 1rem; }
  .mb-3 { margin-bottom: 1.5rem; }
  .mb-4 { margin-bottom: 2rem; }
  .gap-1 { gap: .5rem; }
  .gap-2 { gap: 1rem; }
  .flex-wrap { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem; }
  .is-loading, [aria-busy="true"] { cursor: progress; }
}
