:root {
  color-scheme: light;
  --surface: #fff8fd;
  --panel: #fff;
  --ink: #292333;
  --muted: #655a70;
  --edge: #e8d9ea;
  --accent: #c71d6b;
  --soft: #f7edf6;
}
html[data-theme='dark'] {
  color-scheme: dark;
  --surface: #0d0916;
  --panel: #171020;
  --ink: #f4eaf6;
  --muted: #c0b0cc;
  --edge: #3e2e4e;
  --accent: #ff75ae;
  --soft: #23192d;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font:
    15px/1.6 Inter,
    system-ui,
    -apple-system,
    'Noto Sans CJK TC',
    'Yu Gothic',
    sans-serif;
}
a {
  color: inherit;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
button,
input,
select {
  font: inherit;
  color: inherit;
}
button,
select,
.button {
  min-height: 44px;
  border: 1px solid var(--edge);
  border-radius: 24px;
  background: var(--soft);
  padding: 8px 17px;
  cursor: pointer;
}
button:hover,
.button:hover {
  border-color: var(--accent);
}
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}
header {
  border-bottom: 1px solid var(--edge);
  background: var(--surface);
}
.top {
  max-width: 1280px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 17px 24px;
}
.wordmark {
  font-size: 29px;
  font-weight: 850;
  letter-spacing: -1.5px;
  line-height: 1;
}
.wordmark span {
  color: var(--accent);
}
.wordmark small {
  display: block;
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 3px;
  margin-top: 5px;
}
.tools {
  display: flex;
  align-items: center;
  gap: 9px;
}
.languages {
  display: flex;
  gap: 2px;
  background: var(--soft);
  border: 1px solid var(--edge);
  border-radius: 30px;
  padding: 3px;
}
.languages a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 40px;
  border-radius: 50%;
  font-size: 13px;
}
.languages [aria-current] {
  background: var(--panel);
  font-weight: 700;
}
.theme {
  padding: 4px;
  min-width: 44px;
}
.nav {
  max-width: 1280px;
  margin: auto;
  display: flex;
  gap: 24px;
  padding: 8px 24px 15px;
  overflow: auto;
  white-space: nowrap;
}
.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
}
.nav .active {
  border-bottom: 2px solid var(--accent);
  font-weight: 700;
}
main {
  max-width: 1280px;
  margin: auto;
  padding: 36px 24px 60px;
}
.kicker {
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 0.14em;
}
h1 {
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.2;
  margin: 10px 0 16px;
}
.intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 30px;
}
.total {
  color: var(--muted);
  white-space: nowrap;
}
.total strong {
  font-size: 28px;
  color: var(--ink);
  padding-right: 8px;
}
.gallery-search {
  display: flex;
  gap: 16px;
  align-items: end;
  flex-wrap: wrap;
  padding: 20px;
  background: var(--panel);
  border: 1px solid var(--edge);
  border-radius: 18px;
}
.gallery-search label {
  display: grid;
  gap: 5px;
  font-size: 13px;
}
.gallery-search input {
  width: 300px;
  max-width: 100%;
  min-height: 44px;
  border: 1px solid var(--edge);
  border-radius: 9px;
  padding: 9px 12px;
  background: var(--surface);
}
.gallery-search select {
  max-width: 100%;
  border-radius: 9px;
  background: var(--surface);
}
.gallery-search .find {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--surface);
  font-weight: 700;
}
.results-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  margin: 24px 0 16px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(176px, 1fr));
  gap: 16px;
}
.card {
  min-width: 0;
  display: block;
  overflow: hidden;
  border: 1px solid var(--edge);
  border-radius: 15px;
  background: var(--panel);
}
.card:hover {
  border-color: var(--accent);
  text-decoration: none;
}
.pixel-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 224px;
  padding: 16px 6px;
}
.pixel-stage img {
  width: 128px;
  height: 192px;
  image-rendering: pixelated;
  object-fit: contain;
  max-width: none;
  display: block;
}
.card h2 {
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
  text-align: center;
  margin: 0;
  padding: 11px 8px;
  border-top: 1px solid var(--edge);
  overflow-wrap: anywhere;
}
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 30px 0;
}
.pagination a {
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--edge);
  border-radius: 50%;
  padding: 5px 13px;
}
.pagination [aria-current] {
  background: var(--accent);
  color: var(--surface);
  font-weight: 700;
}
body[data-scale='2'] .grid {
  grid-template-columns: repeat(auto-fill, minmax(276px, 1fr));
}
body[data-scale='2'] .pixel-stage {
  min-height: 416px;
}
body[data-scale='2'] .pixel-stage img {
  width: 256px;
  height: 384px;
}
.gallery-sizes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 20px;
}
.gallery-sizes .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 88px;
}
.gallery-sizes [aria-current] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--surface);
  font-weight: 700;
}
body[data-gallery-view='large'] .grid {
  grid-template-columns: repeat(auto-fill, minmax(536px, 1fr));
}
body[data-gallery-view='large'] .pixel-stage {
  min-height: 800px;
}
body[data-gallery-view='large'] .pixel-stage img {
  width: 512px;
  height: 768px;
}
.viewer-controls {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
  margin: 22px 0;
}
.viewer-controls label {
  display: flex;
  align-items: center;
  gap: 10px;
}
.art-pane {
  overflow: auto;
  background: var(--panel);
  border: 1px solid var(--edge);
  border-radius: 16px;
  padding: 24px;
  min-height: 242px;
  max-width: 100%;
}
.art-pane img {
  display: block;
  image-rendering: pixelated;
  max-width: none;
  margin: auto;
}
.back {
  display: inline-block;
  margin-bottom: 18px;
  min-height: 44px;
  padding-top: 10px;
}
.empty {
  padding: 50px 20px;
  text-align: center;
  color: var(--muted);
}
footer {
  max-width: 1280px;
  margin: auto;
  border-top: 1px solid var(--edge);
  padding: 24px;
  color: var(--muted);
  font-size: 12px;
}
[hidden] {
  display: none !important;
}
@media (max-width: 600px) {
  .top {
    padding: 17px 16px;
    gap: 10px;
  }
  .wordmark {
    font-size: 26px;
  }
  .tools {
    gap: 5px;
  }
  .languages a {
    min-width: 34px;
    min-height: 40px;
  }
  .nav {
    padding-left: 16px;
    gap: 19px;
  }
  main {
    padding: 25px 16px 40px;
  }
  .intro {
    align-items: start;
    flex-direction: column;
    gap: 3px;
  }
  .total strong {
    font-size: 22px;
  }
  .gallery-search {
    padding: 16px;
    gap: 12px;
  }
  .gallery-search label:first-child {
    width: 100%;
  }
  .gallery-search input {
    width: 100%;
  }
  .grid {
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .pixel-stage {
    padding: 16px 0;
  }
  .card h2 {
    font-size: 12px;
  }
  body[data-scale='2'] .grid {
    grid-template-columns: 1fr;
  }
  body[data-gallery-view='large'] .grid {
    grid-template-columns: 1fr;
  }
  body[data-gallery-view='large'] .pixel-stage {
    min-height: 416px;
  }
  body[data-gallery-view='large'] .pixel-stage img {
    width: 256px;
    height: 384px;
  }
  .art-pane {
    padding: 12px;
  }
}
@media (max-width: 350px) {
  .grid {
    grid-template-columns: 1fr;
  }
  .languages a {
    min-width: 29px;
  }
}

.art-pane[data-background='light'] {
  background: #f7f0e5;
}
.art-pane[data-background='dark'] {
  background: #24222d;
}
.art-pane[data-background='checker'] {
  background: repeating-conic-gradient(#bcbcc2 0% 25%, #e0e0e4 0% 50%) 0 0/16px 16px;
}

body {
  font-family:
    Inter, 'PingFang TC', 'Microsoft JhengHei', 'Noto Sans TC', ui-sans-serif, system-ui, sans-serif;
}
html[lang='ja'] body {
  font-family:
    Inter, 'Hiragino Sans', 'Yu Gothic', Meiryo, 'Noto Sans JP', ui-sans-serif, system-ui,
    sans-serif;
}
html[lang='zh-Hans'] body {
  font-family:
    Inter, 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', SimHei, ui-sans-serif, system-ui,
    sans-serif;
}
