:root {
  color-scheme: light dark;
  --bg: #f7f8fb;
  --surface: #ffffff;
  --surface-strong: #eef3f8;
  --card: #ffffff;
  --text: #111827;
  --muted: #5f6b7a;
  --line: #d7dee8;
  --line-soft: rgba(215, 222, 232, 0.78);
  --line-strong: rgba(215, 222, 232, 0.9);
  --green: #1f7a5c;
  --blue: #2b64c8;
  --red: #e05263;
  --yellow: #f2b705;
  --primary: var(--blue);
  --primary-soft: #edf4ff;
  --input-bg: #ffffff;
  --soft-bg: #f8fafc;
  --code-bg: #f3f6fa;
  --code-text: #22324a;
  --header-bg: rgba(247, 248, 251, 0.94);
  --catalog-bg: rgba(255, 255, 255, 0.7);
  --success-bg: #f0fbf7;
  --success-border: rgba(31, 122, 92, 0.26);
  --success-text: #1f7a5c;
  --danger-bg: #fff3f5;
  --danger-border: rgba(224, 82, 99, 0.38);
  --danger-text: #9f2332;
  --warning-bg: #fff9df;
  --warning-border: rgba(242, 183, 5, 0.5);
  --warning-text: #765800;
  --button-bg: #111827;
  --button-text: #ffffff;
  --table-head-bg: #f3f6fa;
  --shadow: 0 12px 32px rgba(17, 24, 39, 0.08);
  --soft-shadow: 0 6px 18px rgba(17, 24, 39, 0.04);
  --panel-shadow: 0 8px 24px rgba(17, 24, 39, 0.04);
  --focus: rgba(43, 100, 200, 0.18);
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

html[data-theme="dark"] {
  --bg: #111316;
  --surface: #171a20;
  --surface-strong: #20252d;
  --card: #181c22;
  --text: #f3f6fb;
  --muted: #a7b0bd;
  --line: #303743;
  --line-soft: rgba(70, 80, 96, 0.66);
  --line-strong: rgba(83, 95, 115, 0.78);
  --green: #79d8ae;
  --blue: #8bb7ff;
  --red: #ff8ba0;
  --yellow: #f6cc5f;
  --primary: var(--blue);
  --primary-soft: rgba(139, 183, 255, 0.15);
  --input-bg: #11161d;
  --soft-bg: #20252d;
  --code-bg: #202630;
  --code-text: #d9e6ff;
  --header-bg: rgba(17, 19, 22, 0.94);
  --catalog-bg: rgba(23, 26, 32, 0.74);
  --success-bg: rgba(54, 186, 131, 0.13);
  --success-border: rgba(121, 216, 174, 0.34);
  --success-text: #9de7c4;
  --danger-bg: rgba(255, 139, 160, 0.12);
  --danger-border: rgba(255, 139, 160, 0.34);
  --danger-text: #ffb3c0;
  --warning-bg: rgba(246, 204, 95, 0.13);
  --warning-border: rgba(246, 204, 95, 0.38);
  --warning-text: #f7d984;
  --button-bg: #f3f6fb;
  --button-text: #111316;
  --table-head-bg: #20252d;
  --shadow: 0 14px 36px rgba(0, 0, 0, 0.36);
  --soft-shadow: 0 8px 22px rgba(0, 0, 0, 0.24);
  --panel-shadow: 0 10px 28px rgba(0, 0, 0, 0.24);
  --focus: rgba(139, 183, 255, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--bg);
}

a {
  color: inherit;
  text-decoration: none;
  transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

a:hover {
  color: var(--primary);
}

img {
  display: block;
  max-width: 100%;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

code {
  padding: 0.12rem 0.3rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--code-bg);
  color: var(--code-text);
  overflow-wrap: anywhere;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 72px;
  padding: 0.9rem max(1rem, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid var(--line-soft);
  background: var(--header-bg);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.58rem;
  min-width: 0;
  font-weight: 900;
}

.brand-mark {
  display: block;
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.brand-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.main-nav,
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.main-nav a,
.site-footer nav a,
.inline-links a,
.link-cloud a,
.catalog-shortcuts a,
.button-link,
.more-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--text);
  font-weight: 700;
}

.main-nav a:hover,
.site-footer nav a:hover,
.inline-links a:hover,
.link-cloud a:hover,
.catalog-shortcuts a:hover,
.button-link:hover,
.more-link:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.main-nav a {
  white-space: nowrap;
}

.main-nav a[aria-current="page"] {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
}

main {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
}

.hero {
  display: block;
  min-height: 0;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding: 3.8rem 2rem 2.2rem;
}

.hero-copy,
.page-hero {
  min-width: 0;
}

.hero-copy {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
}

.hero h1,
.page-hero h1,
.character-summary h1 {
  margin: 0;
  color: var(--text);
  font-size: 3rem;
  line-height: 1.04;
  letter-spacing: 0;
}

.page-hero {
  padding: 3.2rem 0 1.6rem;
}

.eyebrow {
  margin: 0 0 0.8rem;
  color: var(--green);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
}

.lead {
  max-width: none;
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.hero-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.7rem;
  width: 100%;
  margin-top: 1.5rem;
}

.hero-search input,
.catalog-controls input,
.catalog-controls select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--input-bg);
  color: var(--text);
  outline: none;
}

.hero-search input {
  padding: 0 1rem;
}

.hero-search input:focus,
.catalog-controls input:focus,
.catalog-controls select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--focus);
}

.hero-search button {
  min-width: 116px;
  min-height: 48px;
  border: 0;
  border-radius: var(--radius);
  background: var(--button-bg);
  color: var(--button-text);
  font-weight: 900;
  cursor: pointer;
}

.hero-search button:hover {
  background: var(--primary);
  color: var(--button-text);
}

.hero-search button:active,
.more-link:active,
.button-link:active,
.filter-reset:active {
  transform: translateY(1px);
}

.stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.35rem;
}

.stats-row span {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  min-height: 42px;
  padding: 0.5rem 0.72rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--muted);
}

.stats-row strong {
  color: var(--text);
  font-size: 1.2rem;
}

.content-band {
  padding: 2rem 0;
  border-top: 1px solid var(--line-soft);
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.section-heading h2,
.content-band h2 {
  margin: 0;
  color: var(--text);
  font-size: 1.42rem;
  line-height: 1.2;
  letter-spacing: 0;
}

.section-heading span {
  color: var(--muted);
  font-weight: 800;
}

.seo-text p {
  max-width: 980px;
  margin: 0.8rem 0 0;
  color: var(--muted);
  font-size: 1rem;
}

.link-cloud,
.inline-links,
.action-row,
.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.link-cloud a:nth-child(4n + 1) {
  border-color: var(--success-border);
}

.link-cloud a:nth-child(4n + 2) {
  border-color: var(--primary);
}

.link-cloud a:nth-child(4n + 3) {
  border-color: var(--danger-border);
}

.link-cloud a:nth-child(4n + 4) {
  border-color: var(--warning-border);
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.article-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 230px;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--soft-shadow);
}

.article-card h3 {
  margin: 0;
  font-size: 1.18rem;
  line-height: 1.24;
  overflow-wrap: anywhere;
}

.article-card p:not(.eyebrow) {
  margin: 0.7rem 0 0;
  color: var(--muted);
}

.article-card .more-link {
  align-self: flex-start;
  margin-top: auto;
}

.brainrot-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  overflow: hidden;
  box-shadow: var(--soft-shadow);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.brainrot-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.card-media {
  display: block;
  background: var(--surface-strong);
  overflow: hidden;
}

.card-media img {
  width: 100%;
  aspect-ratio: 1.35 / 1;
  padding: 0.65rem;
  object-fit: contain;
  transition: transform 0.18s ease;
}

.brainrot-card:hover .card-media img {
  transform: scale(1.02);
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  padding: 0.95rem;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.7rem;
}

.card-meta a,
.pill-list span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--soft-bg);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.brainrot-card h3 {
  margin: 0;
  font-size: 1.14rem;
  line-height: 1.22;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.name-en {
  margin: 0.25rem 0 0;
  color: var(--primary);
  font-size: 0.93rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.brainrot-card p {
  margin: 0.65rem 0 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.brainrot-card .components-line {
  padding: 0.58rem 0.65rem;
  border: 1px solid var(--success-border);
  border-radius: var(--radius);
  background: var(--success-bg);
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 800;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.brainrot-card p:not(.name-en):not(.components-line) {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.components-line strong,
.character-components strong {
  color: var(--success-text);
  font-weight: 900;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-top: auto;
  padding-top: 0.9rem;
}

.score {
  color: var(--green);
  font-size: 0.88rem;
  font-weight: 900;
}

.more-link {
  min-height: 34px;
  padding: 0.35rem 0.55rem;
  font-size: 0.9rem;
}

.catalog-shell {
  margin: 0 0 2.5rem;
  padding: 1rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--catalog-bg);
  box-shadow: var(--panel-shadow);
}

.catalog-heading {
  align-items: flex-start;
  margin-bottom: 0.9rem;
}

.catalog-heading > div:first-child {
  display: grid;
  gap: 0.25rem;
}

.catalog-controls {
  display: grid;
  grid-template-columns: minmax(240px, 2fr) repeat(5, minmax(132px, 1fr));
  align-items: end;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.catalog-controls label {
  display: grid;
  gap: 0.3rem;
  min-width: 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.catalog-controls input,
.catalog-controls select {
  padding: 0 0.75rem;
}

.catalog-controls input:hover,
.catalog-controls select:hover {
  border-color: var(--muted);
}

.catalog-status {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  margin: 0;
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--success-border);
  border-radius: var(--radius);
  background: var(--success-bg);
  color: var(--muted);
  font-weight: 800;
}

.catalog-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.catalog-shortcuts {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  width: 100%;
  min-width: 0;
}

.catalog-shortcuts > span {
  flex: 0 0 auto;
  padding-top: 0.5rem;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 900;
}

.catalog-shortcuts > div {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  width: 100%;
  min-width: 0;
}

.catalog-shortcuts a {
  min-height: 34px;
  padding: 0.34rem 0.55rem;
  background: var(--soft-bg);
  font-size: 0.88rem;
}

.filter-reset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--text);
  font-weight: 900;
}

.filter-reset:hover:not(:disabled) {
  border-color: var(--red);
  color: var(--red);
}

.empty-state,
.success-box {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--muted);
}

.success-box {
  border-color: var(--success-border);
  color: var(--success-text);
  font-weight: 800;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 1.3rem 0 0.8rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.breadcrumbs a {
  color: var(--primary);
  font-weight: 800;
}

.character-hero {
  display: grid;
  grid-template-columns: minmax(300px, 0.82fr) minmax(0, 1.18fr);
  gap: 1.6rem;
  align-items: center;
  padding: 1.3rem 0 2rem;
}

.character-image {
  min-width: 0;
}

.character-image img {
  width: 100%;
  aspect-ratio: 1.45 / 1;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  object-fit: cover;
  box-shadow: var(--shadow);
}

.fineprint,
.muted {
  color: var(--muted);
  font-size: 0.9rem;
}

.character-summary {
  min-width: 0;
}

.character-components {
  margin: 1rem 0 0;
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--success-border);
  border-radius: var(--radius);
  background: var(--success-bg);
  color: var(--text);
  font-size: 1.06rem;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.42fr);
  gap: 1.5rem;
}

.two-column p {
  color: var(--muted);
}

.facts-list {
  display: grid;
  gap: 0.55rem;
  margin: 0;
}

.facts-list div {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 0.7rem;
  padding: 0.7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.facts-list dt {
  color: var(--muted);
  font-weight: 800;
}

.facts-list dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.faq-list {
  display: grid;
  gap: 0.65rem;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.34fr);
  gap: 1.5rem;
  align-items: start;
  padding-bottom: 2.5rem;
}

.article-hero {
  padding-bottom: 1.2rem;
}

.article-body,
.article-aside {
  min-width: 0;
}

.article-body {
  display: grid;
  gap: 0;
}

.article-section {
  padding: 1.35rem 0;
  border-top: 1px solid var(--line-soft);
}

.article-section:first-child {
  border-top: 0;
}

.article-section p,
.article-section li {
  color: var(--muted);
  font-size: 1.02rem;
}

.article-section p {
  margin: 0.75rem 0 0;
}

.article-section ul {
  margin: 0.8rem 0 0;
  padding-left: 1.2rem;
}

.article-section li + li {
  margin-top: 0.35rem;
}

.article-aside {
  position: sticky;
  top: 92px;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.article-aside h2 {
  margin-bottom: 0.8rem;
}

.article-links {
  margin-top: 1rem;
}

.faq-list details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.faq-list summary {
  min-height: 48px;
  padding: 0.75rem 0.9rem;
  cursor: pointer;
  font-weight: 900;
}

.faq-list p {
  margin: 0;
  padding: 0 0.9rem 0.9rem;
  color: var(--muted);
}

.source-list {
  display: grid;
  gap: 0.45rem;
  padding-left: 1.2rem;
  overflow-wrap: anywhere;
}

.source-list a,
.image-source-list a {
  color: var(--primary);
  font-weight: 800;
}

.image-source-list {
  display: grid;
  gap: 0.7rem;
}

.image-source-list article {
  display: grid;
  gap: 0.25rem;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  overflow-wrap: anywhere;
}

.image-source-list span {
  color: var(--success-text);
  font-size: 0.9rem;
  font-weight: 900;
}

.image-source-list p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.admin-panel {
  padding-bottom: 3rem;
}

.issue-list {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.issue-list p {
  margin: 0;
  padding: 0.55rem 0.7rem;
  border-radius: var(--radius);
  overflow-wrap: anywhere;
}

.issue-list .error {
  border: 1px solid var(--danger-border);
  background: var(--danger-bg);
  color: var(--danger-text);
}

.issue-list .warning {
  border: 1px solid var(--warning-border);
  background: var(--warning-bg);
  color: var(--warning-text);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

th,
td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--table-head-bg);
  color: var(--text);
}

td span {
  color: var(--muted);
}

tr.has-error {
  background: var(--danger-bg);
}

tr.has-warning {
  background: var(--warning-bg);
}

.site-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.5rem;
  width: min(1180px, calc(100% - 2rem));
  margin: 2rem auto 0;
  padding: 1.5rem 0 2rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.site-footer p {
  max-width: 720px;
  margin: 0.35rem 0 0;
}

.footer-actions {
  display: grid;
  justify-items: end;
  gap: 0.85rem;
}

.theme-switcher {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  min-width: 0;
}

.theme-switcher > span {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 900;
}

.theme-switcher > div {
  display: inline-flex;
  padding: 0.18rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--soft-bg);
}

.theme-switcher button {
  min-height: 34px;
  padding: 0.28rem 0.55rem;
  border: 0;
  border-radius: calc(var(--radius) - 2px);
  background: transparent;
  color: var(--muted);
  font-weight: 900;
}

.theme-switcher button:hover {
  color: var(--text);
}

.theme-switcher button[aria-pressed="true"] {
  background: var(--card);
  color: var(--primary);
  box-shadow: var(--soft-shadow);
}

.footer-count {
  align-self: end;
  color: var(--success-text);
  font-weight: 900;
}

@media (max-width: 980px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.8rem;
  }

  .main-nav {
    flex-wrap: nowrap;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 0.2rem;
  }

  .main-nav a {
    flex: 0 0 auto;
  }

  .hero,
  .character-hero,
  .two-column,
  .article-layout {
    grid-template-columns: 1fr;
  }

  .article-aside {
    position: static;
  }

  .catalog-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .catalog-controls label:first-child {
    grid-column: span 2;
  }
}

@media (max-width: 640px) {
  main,
  .site-footer {
    width: min(100% - 1rem, 1180px);
  }

  .site-header {
    min-height: 0;
    padding: 0.75rem max(0.5rem, calc((100vw - 1180px) / 2));
  }

  .brand-mark {
    width: 44px;
    height: 44px;
  }

  .hero {
    min-height: 0;
    padding-top: 2rem;
  }

  .page-hero {
    padding: 2rem 0 1rem;
  }

  .hero-copy {
    width: min(100% - 1rem, 1180px);
  }

  .hero h1,
  .page-hero h1,
  .character-summary h1 {
    font-size: 2.1rem;
  }

  .lead {
    font-size: 1rem;
  }

  .hero-search {
    grid-template-columns: 1fr;
  }

  .catalog-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .catalog-controls label:first-child {
    grid-column: span 2;
  }

  .catalog-controls label:last-child {
    grid-column: span 2;
  }

  .section-heading,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    display: flex;
  }

  .footer-actions {
    justify-items: start;
    width: 100%;
  }

  .theme-switcher {
    align-items: flex-start;
    flex-direction: column;
    width: 100%;
  }

  .theme-switcher > div {
    width: 100%;
  }

  .theme-switcher button {
    flex: 1;
  }

  .catalog-shell {
    padding: 0.75rem;
  }

  .catalog-toolbar {
    margin-bottom: 0.75rem;
  }

  .catalog-shortcuts {
    display: none;
  }

  .filter-reset:disabled {
    display: none;
  }

  .filter-reset {
    width: 100%;
    justify-content: center;
  }

  .card-footer {
    flex-wrap: wrap;
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }

  .facts-list div {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 360px) {
  .hero-search,
  .catalog-controls {
    grid-template-columns: 1fr;
  }

  .catalog-controls label:first-child,
  .catalog-controls label:last-child {
    grid-column: span 1;
  }
}
