/* Reference Gallery: quiet, system-native light design */
:root {
  color-scheme: light;
  --canvas: #f5f5f7;
  --surface: #fff;
  --surface-soft: #f7f8fa;
  --ink: #1d1d1f;
  --secondary: #6e6e73;
  --tertiary: #86868b;
  --line: #e5e5e9;
  --accent: #0066cc;
  --focus: #0071e3;
  --shadow: 0 12px 36px rgb(25 36 55 / 5%);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
/* Han characters have language-specific glyphs: prefer Japanese fonts in ja mode. */
html[lang="ja"] body {
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN",
    "Yu Gothic", "Meiryo", "Noto Sans JP", "Segoe UI", sans-serif;
}
button, input, select { font: inherit; }
button, select { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible,
.card:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
[hidden] { display: none !important; }
.muted { color: var(--secondary); }
::selection { background: #d4e8ff; }

/* Brand and spacious editorial hero */
.site-header {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid #e9edf4;
  background: linear-gradient(117deg, #fff 0%, #fafbff 54%, #ecf2ff 100%);
}
.site-header::after {
  content: "";
  position: absolute;
  top: 42px;
  right: -90px;
  width: 490px;
  height: 220px;
  background: radial-gradient(ellipse, rgb(178 207 255 / 29%), transparent 70%);
  pointer-events: none;
}
.header-top, .intro, main {
  width: min(calc(100% - 80px), 1320px);
  margin-inline: auto;
}
.header-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 66px;
  gap: 24px;
  border-bottom: 1px solid rgb(29 29 31 / 7%);
}
.brand { display: flex; align-items: center; gap: 11px; white-space: nowrap; }
.brand-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: var(--ink);
  color: white;
  font-size: 21px;
  font-weight: 750;
  letter-spacing: -.05em;
}
.brand-name { font-size: 15px; font-weight: 650; letter-spacing: -.03em; }
.brand-name strong { font-weight: 400; color: var(--secondary); }
.header-actions { display: flex; align-items: center; gap: 18px; }
.social-links { display: flex; align-items: center; gap: 5px; }
.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  padding: 7px 11px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #55565e;
  font-size: 12px;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
  transition: background .2s, border-color .2s, color .2s;
}
.social-link:hover {
  color: var(--ink);
  background: rgb(255 255 255 / 85%);
  border-color: #e5e8ef;
}
.social-x-icon { font-size: 18px; font-weight: 500; line-height: 1; }
.language-switch {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border: 1px solid rgb(0 0 0 / 3%);
  border-radius: 12px;
  background: rgb(235 237 241 / 85%);
}
.language-switch button {
  min-width: 43px;
  padding: 8px 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--secondary);
  font-size: 12px;
  font-weight: 600;
}
.language-switch button[aria-pressed="true"] {
  background: white;
  color: var(--ink);
  box-shadow: 0 1px 5px rgb(0 0 0 / 9%);
}
.intro { position: relative; z-index: 1; padding-block: 26px 31px; }
.hero-copy { max-width: 860px; }
.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 730;
  letter-spacing: .11em;
}
h1 {
  max-width: 950px;
  margin: 0;
  font-size: clamp(30px, 3.35vw, 48px);
  font-weight: 730;
  line-height: 1.13;
  letter-spacing: -.055em;
  text-wrap: balance;
}
.intro .muted {
  max-width: 650px;
  margin: 11px 0 0;
  font-size: clamp(14px, 1.4vw, 16px);
  line-height: 1.7;
  letter-spacing: -.014em;
}
.hero-counts {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 13px;
  padding: 8px 13px;
  border: 1px solid #e3e9f2;
  border-radius: 999px;
  background: rgb(255 255 255 / 80%);
  color: #545e6f;
  font-size: 12px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #35b37e; }

/* Collection controls */
main { padding-block: 31px 95px; }
.collection-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}
.section-eyebrow {
  margin: 0 0 8px;
  color: var(--tertiary);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .14em;
}
.collection-heading h2 {
  margin: 0;
  font-size: clamp(25px, 2.6vw, 34px);
  font-weight: 730;
  line-height: 1.25;
  letter-spacing: -.04em;
}
.type-tabs {
  display: inline-flex;
  flex-shrink: 0;
  gap: 3px;
  padding: 5px;
  border: 1px solid #e9e9ef;
  border-radius: 15px;
  background: #ececf0;
}
.type-tabs button {
  padding: 10px 24px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: #636369;
  font-size: 13px;
  font-weight: 650;
  transition: background .2s, color .2s, box-shadow .2s;
}
.type-tabs button:hover { color: var(--ink); }
.type-tabs button.active {
  color: var(--ink);
  background: white;
  box-shadow: 0 2px 7px rgb(0 0 0 / 9%);
}
.filters {
  display: grid;
  grid-template-columns: minmax(250px, 2fr) repeat(3, minmax(145px, 1fr));
  align-items: end;
  gap: 14px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.filters:has(#angle-filter[hidden]) {
  grid-template-columns: minmax(250px, 1fr) minmax(220px, 300px);
}
.filters label {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 9px;
  color: #68686e;
  font-size: 12px;
  font-weight: 600;
}
.input-wrap { position: relative; display: block; }
.search-icon {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 15px;
  transform: translateY(-50%);
  color: #92929b;
  pointer-events: none;
}
input, select {
  display: block;
  width: 100%;
  min-width: 0;
  height: 47px;
  padding: 0 14px;
  border: 1px solid #e2e4e9;
  border-radius: 11px;
  background: #f8f9fb;
  color: var(--ink);
  font-size: 13px;
  transition: background .2s, border-color .2s, box-shadow .2s;
}
input[type="search"] { padding-left: 43px; }
input::placeholder { color: #989aa2; }
input:hover, select:hover { border-color: #c9cbd2; }
input:focus, select:focus {
  background: white;
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgb(0 113 227 / 10%);
}
.series, .angles { display: flex; flex-wrap: wrap; gap: 8px; }
.series { margin: 20px 0 0; }
.series button, .angles button {
  padding: 8px 16px;
  border: 1px solid #e6e6ea;
  border-radius: 999px;
  background: white;
  color: #64646a;
  font-size: 12px;
  font-weight: 600;
  transition: background .2s, border-color .2s, color .2s;
}
.series button:hover, .angles button:hover { color: var(--ink); border-color: #c9cad2; }
.series button.active, .angles button.active {
  border-color: var(--ink);
  background: var(--ink);
  color: white;
}
.summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 31px 0 17px;
  color: var(--secondary);
  font-size: 12px;
}
.summary button {
  padding: 7px 0;
  border: 0;
  background: none;
  color: var(--accent);
  font-weight: 650;
}
.summary button:hover { text-decoration: underline; }

/* Image cards */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  align-items: stretch;
  gap: 20px;
}
.card {
  min-width: 0;
  padding: 9px;
  border: 1px solid #ececf0;
  border-radius: 22px;
  background: white;
  cursor: pointer;
  box-shadow: 0 4px 18px rgb(0 0 0 / 3%);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: #dfe5f0;
  box-shadow: 0 20px 48px rgb(31 41 55 / 12%);
}
.card:active { transform: translateY(-1px); }
.cover {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 4 / 4.7;
  border-radius: 14px;
  background: linear-gradient(155deg, #f8f9fa, #edf0f5);
}
.cover img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform .28s ease;
}
.card:hover .cover img { transform: scale(1.024); }
.card-info { padding: 17px 10px 12px; }
.code {
  color: var(--tertiary);
  font-size: 11px;
  font-weight: 650;
  word-break: break-word;
}
.name {
  display: -webkit-box;
  overflow: hidden;
  min-height: 43px;
  margin: 7px 0 12px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 670;
  line-height: 1.45;
  letter-spacing: -.02em;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pills span {
  max-width: 100%;
  padding: 5px 9px;
  overflow: hidden;
  border-radius: 7px;
  background: #f1f2f5;
  color: #68686e;
  font-size: 11px;
  font-weight: 550;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.strip { display: flex; gap: 5px; margin-top: 14px; }
.strip img {
  width: calc((100% - 20px) / 5);
  min-width: 0;
  height: 47px;
  border-radius: 7px;
  background: var(--surface-soft);
  object-fit: cover;
}
.costume-keywords {
  display: -webkit-box;
  overflow: hidden;
  min-height: 36px;
  margin: 12px 0 0;
  color: var(--tertiary);
  font-size: 12px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.load-more-wrap { display: flex; justify-content: center; margin-top: 38px; }
.load-more-wrap button {
  padding: 13px 35px;
  border: 1px solid #dfe1e7;
  border-radius: 999px;
  background: white;
  color: var(--ink);
  font-size: 13px;
  font-weight: 650;
  box-shadow: 0 3px 12px rgb(0 0 0 / 3%);
}
.load-more-wrap button:hover { box-shadow: var(--shadow); }
footer {
  padding: 29px 22px 38px;
  border-top: 1px solid #e3e3e7;
  background: #fafafb;
  color: var(--tertiary);
  font-size: 12px;
  line-height: 1.9;
  text-align: center;
}
footer a { margin-left: 9px; color: var(--accent); text-decoration: none; }
footer a:hover { text-decoration: underline; }
.footer-content { max-width: 760px; margin: 0 auto; }
.footer-content > p { margin: 0 0 3px; }
.footer-social-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-top: 15px;
}
.footer-social-links a {
  display: inline-flex;
  align-items: center;
  margin-left: 0;
  color: #52535c;
  font-weight: 650;
}
.footer-social-links a:hover { color: var(--accent); }

/* Image preview */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgb(21 25 35 / 58%);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}
.dialog {
  width: min(980px, 100%);
  max-height: min(94dvh, 1050px);
  padding: 24px;
  overflow: auto;
  border: 1px solid rgb(255 255 255 / 70%);
  border-radius: 25px;
  background: white;
  box-shadow: 0 36px 100px rgb(0 0 0 / 22%);
}
.dialog-top, .dialog-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.dialog-top { margin-bottom: 16px; }
.dialog-top h2 {
  margin: 5px 0;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.3;
  letter-spacing: -.035em;
}
.dialog-top p { margin: 0; color: var(--secondary); font-size: 12px; }
.close {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #f0f1f4;
  color: #55565b;
  font-size: 26px;
  line-height: 1;
}
.close:hover { background: #e5e7ec; }
.big-image {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  overflow: hidden;
  border-radius: 16px;
  background: #f5f6f8;
}
.big-image img {
  max-width: calc(100% - 126px);
  height: min(58dvh, 640px);
  min-height: 230px;
  object-fit: contain;
}
.big-image button {
  flex-shrink: 0;
  width: 52px;
  height: 74px;
  padding: 0;
  border: 0;
  border-radius: 0 12px 12px 0;
  background: rgb(255 255 255 / 80%);
  color: var(--ink);
  font-size: 30px;
}
.big-image button:last-child { border-radius: 12px 0 0 12px; }
.big-image button:hover { background: white; }
.angles { justify-content: center; margin: 18px 0 5px; }
.dialog-bottom { margin-top: 18px; }
.dialog-bottom a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 20px;
  border-radius: 999px;
  background: var(--accent);
  color: white;
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
}
.dialog-bottom a:hover { background: #005bb5; }
.hint {
  margin: 12px 0 0;
  color: var(--tertiary);
  font-size: 11px;
  text-align: center;
}

/* Responsive grids */
@media (max-width: 980px) {
  .header-top, .intro, main { width: min(calc(100% - 48px), 1320px); }
  .header-actions { gap: 9px; }
  .social-link { padding-inline: 8px; }
  .filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .filters .search-field { grid-column: 1 / -1; }
  .filters:has(#angle-filter[hidden]) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .filters:has(#angle-filter[hidden]) .search-field { grid-column: auto; }
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
  }
}
@media (max-width: 680px) {
  .header-top, .intro, main { width: min(calc(100% - 32px), 1320px); }
  .header-top { min-height: 58px; gap: 7px; padding-block: 9px; flex-wrap: wrap; }
  .brand { flex: 1 1 100%; }
  .header-actions { width: 100%; justify-content: space-between; }
  .social-links { gap: 3px; }
  .social-link { width: 35px; min-height: 34px; padding: 6px; }
  .social-link > span:last-child:not(.social-x-icon) { display: none; }
  .brand-icon { width: 32px; height: 32px; font-size: 18px; border-radius: 10px; }
  .brand { gap: 8px; }
  .brand-name { font-size: 13px; }
  .language-switch button { min-width: auto; padding: 7px 9px; font-size: 11px; }
  .intro { padding-block: 23px 28px; }
  .site-header::after { right: -220px; top: 55px; }
  .eyebrow { font-size: 11px; }
  h1 { font-size: clamp(29px, 7.5vw, 38px); }
  .intro .muted { margin-top: 9px; font-size: 13px; }
  .hero-counts { margin-top: 12px; font-size: 11px; }
  main { padding-block: 26px 65px; }
  .collection-heading { flex-direction: column; align-items: stretch; gap: 20px; }
  .type-tabs { width: 100%; }
  .type-tabs button { flex: 1; padding: 11px 12px; }
  .filters, .filters:has(#angle-filter[hidden]) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 13px;
    padding: 17px;
    border-radius: 16px;
  }
  .filters .search-field,
  .filters:has(#angle-filter[hidden]) .search-field { grid-column: 1 / -1; }
  .filters label { font-size: 11px; }
  input, select { height: 44px; padding-inline: 10px; font-size: 12px; }
  input[type="search"] { padding-left: 41px; }
  .series { gap: 7px; margin-top: 16px; }
  .series button { padding: 7px 12px; font-size: 11px; }
  .summary { margin-top: 24px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
  .card { padding: 6px; border-radius: 17px; }
  .cover { border-radius: 12px; }
  .card-info { padding: 11px 6px 8px; }
  .name { min-height: 35px; margin: 5px 0 9px; font-size: 12px; }
  .code { font-size: 10px; }
  .pills span { padding: 4px 6px; font-size: 10px; }
  .strip img { height: 31px; border-radius: 4px; }
  .costume-keywords { min-height: 30px; font-size: 10px; }
  .overlay { padding: 8px; }
  .dialog { max-height: 96dvh; padding: 14px; border-radius: 19px; }
  .dialog-top { margin-bottom: 12px; }
  .dialog-top h2 { font-size: 17px; }
  .big-image { gap: 4px; border-radius: 12px; }
  .big-image img {
    max-width: calc(100% - 72px);
    height: min(55dvh, 470px);
    min-height: 180px;
  }
  .big-image button { width: 32px; height: 62px; font-size: 23px; }
  .dialog-bottom a { padding: 9px 15px; font-size: 12px; }
  footer a { display: block; margin-left: 0; }
}
@media (max-width: 375px) {
  .brand-name strong { display: none; }
  .language-switch button { padding-inline: 7px; }
  .filters { gap: 9px; }
  .card-info { padding-inline: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
