/* Anipixels site - one stylesheet, no external requests. */
:root {
  --bg: #12141a;
  --bg2: #171a22;
  --card: #1d222b;
  --card2: #252b36;
  --line: #343c52;
  --text: #f1f2f6;
  --muted: #a7aec2;
  --accent: #6ee7b7;
  --accent-ink: #0c2219;
  --warn: #fbbf24;
  --radius: 16px;
  --radius-s: 10px;
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, "SF Mono", Menlo, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 1rem/1.6 var(--font);
  overflow-wrap: break-word;
}
img { max-width: 100%; height: auto; display: block; }
/* Pixel art (class "px"): never smooth it when it is drawn larger than its own pixels. */
.kp-thumb img.px { image-rendering: pixelated; }
a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 0.5em; font-weight: 800; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 6vw, 3.4rem); font-weight: 900; }
h2 { font-size: clamp(1.4rem, 3.4vw, 1.9rem); margin-top: 0; }
h3 { font-size: 1.1rem; }
p, ul, ol, dl { margin: 0 0 1em; }
ul, ol { padding-left: 1.25em; }
li { margin-bottom: 0.3em; }
code, kbd, pre { font-family: var(--mono); font-size: 0.92em; }
code { background: var(--card2); padding: 0.1em 0.4em; border-radius: 6px; }
kbd { background: var(--card2); border: 1px solid var(--line); border-bottom-width: 2px; padding: 0.05em 0.45em; border-radius: 6px; white-space: nowrap; }
pre { background: #0d0f14; border: 1px solid var(--line); border-radius: var(--radius-s); padding: 12px 14px; overflow-x: auto; margin: 0 0 1em; line-height: 1.45; }
pre code { background: none; padding: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 8px; font-weight: 700; z-index: 10; }
.skip:focus { left: 8px; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.site-head { border-bottom: 1px solid var(--line); background: var(--bg2); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 8px 20px; flex-wrap: wrap; padding-top: 12px; padding-bottom: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 900; font-size: 1.2rem; letter-spacing: 0.02em; }
.brand img { width: 30px; height: 30px; }
.nav { display: flex; flex-wrap: wrap; gap: 2px 4px; margin: 0; padding: 0; list-style: none; }
.nav li { margin: 0; }
.nav a { display: block; padding: 8px 12px; border-radius: 999px; color: var(--text); text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--card2); }
main { display: block; padding: 28px 0 56px; }
section { margin-bottom: 52px; }
.crumbs { font-size: 0.9rem; color: var(--muted); margin-bottom: 18px; }
.crumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs li { margin: 0; }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line); }
.crumbs a { color: var(--muted); }

.pill { display: inline-block; background: var(--accent); color: var(--accent-ink); font-weight: 800; font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; padding: 5px 12px; border-radius: 999px; margin-bottom: 14px; }
.lead { font-size: clamp(1.05rem, 2.2vw, 1.25rem); color: var(--muted); max-width: 46em; }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0 0 1em; }
.chips li { margin: 0; background: var(--card2); border-radius: 999px; padding: 5px 12px; font-size: 0.88rem; font-weight: 600; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 9px 18px; border-radius: 12px; border: 1px solid transparent; font: 700 0.98rem/1.2 var(--font); text-decoration: none; cursor: pointer; text-align: center; }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 3px 0 rgba(0,0,0,0.35); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { background: var(--card2); color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent); }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 1em; }
.ext::after { content: "\00a0\2197"; font-weight: 400; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.pad { padding: 20px; }
.grid { display: grid; gap: 20px; }
.grid-packs { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grid-games { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }

.hero { padding: 20px 0 8px; }
.hero h1 { margin-bottom: 0.25em; }

.bundle { display: grid; grid-template-columns: 1fr auto; gap: 16px 28px; align-items: center; padding: 22px 24px; background: linear-gradient(135deg, #1f2a2c, #1d222b 60%); border-color: #3d5a52; }
.bundle h2 { margin-bottom: 0.2em; }
.bundle p { margin: 0; }
.price-big { font-size: 2rem; font-weight: 900; line-height: 1; }
.price-was { color: var(--muted); text-decoration: line-through; margin-left: 8px; font-weight: 600; font-size: 1.05rem; }
@media (max-width: 640px) { .bundle { grid-template-columns: 1fr; } }

.pack-card { display: flex; flex-direction: column; overflow: hidden; }
.pack-card .cover { aspect-ratio: 630 / 500; background: var(--bg2); }
.pack-card .cover img { width: 100%; height: 100%; object-fit: cover; }
.pack-card .body { padding: 16px 16px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.pack-card h3 { margin: 0; font-size: 1.2rem; }
.pack-card h3 a { color: var(--text); text-decoration: none; }
.pack-card h3 a:hover { text-decoration: underline; }
.pack-card p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.pack-card .kind { font-size: 0.75rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); }
.pack-card .price { font-weight: 800; font-size: 1.1rem; margin-top: auto; padding-top: 6px; }
.pack-card .btn-row { margin: 0; }
.pack-card .btn { flex: 1 1 auto; padding: 8px 12px; font-size: 0.92rem; }

.tool-card { padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.tool-card h3 { margin: 0; font-size: 1.2rem; }
.tool-card p { margin: 0; color: var(--muted); }
.tool-card .btn { align-self: flex-start; margin-top: auto; }
.game-link { display: block; padding: 14px 16px; text-decoration: none; color: var(--text); }
.game-link:hover { border-color: var(--accent); }
.game-link strong { display: block; }
.game-link span { color: var(--muted); font-size: 0.9rem; }

.pack-hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 32px; align-items: center; margin-bottom: 40px; }
.pack-hero img { border-radius: var(--radius); border: 1px solid var(--line); width: 100%; }
.pack-hero h1 { font-size: clamp(1.8rem, 4.4vw, 2.7rem); }
@media (max-width: 820px) { .pack-hero { grid-template-columns: minmax(0, 1fr); gap: 20px; } }
/* A pixel-art cover is 630 px wide: never lay it out wider than that, and where a high-density screen has to enlarge it anyway, enlarge it unsmoothed. */
.pack-hero img.px { max-width: 630px; }
@media (min-resolution: 2dppx) { .pack-hero img.px { image-rendering: pixelated; } }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 0; margin: 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.facts dt, .facts dd { margin: 0; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.facts dt { font-weight: 700; background: var(--card); color: var(--muted); }
.facts dd { background: var(--card); }
.facts dt:last-of-type, .facts dd:last-of-type { border-bottom: 0; }
@media (max-width: 520px) { .facts { grid-template-columns: 1fr; } .facts dt { border-bottom: 0; padding-bottom: 0; } }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0 36px; }
.contents-list { list-style: none; padding: 0; }
.contents-list li { padding: 10px 0; border-bottom: 1px solid var(--line); margin: 0; }
.contents-list li:last-child { border-bottom: 0; }
.contents-list .n { color: var(--accent); font-weight: 800; }
.faq h3 { margin: 1.2em 0 0.3em; }
.faq p { margin: 0; color: var(--muted); }
.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.shots a { display: block; border-radius: var(--radius-s); overflow: hidden; border: 1px solid var(--line); background: var(--bg2); }
.shots a:hover { border-color: var(--accent); }
.shots img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
.callout { padding: 18px 20px; }
.callout p:last-child { margin-bottom: 0; }
.more-packs { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; }
.more-packs li { margin: 0; }
.more-packs a { display: block; background: var(--card2); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; color: var(--text); text-decoration: none; font-weight: 600; font-size: 0.93rem; }
.more-packs a:hover { border-color: var(--accent); }

.site-foot { border-top: 1px solid var(--line); background: var(--bg2); padding: 32px 0 40px; color: var(--muted); font-size: 0.93rem; }
.site-foot h2 { font-size: 1rem; color: var(--text); margin-bottom: 0.4em; }
.site-foot .cols { gap: 8px 36px; }
.site-foot p { margin-bottom: 0.8em; }

/* ---------- tools (shared) ---------- */
.tool-head { margin-bottom: 20px; }
.tool-head h1 { font-size: clamp(1.8rem, 5vw, 2.6rem); }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.controls { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: end; }
.field { display: flex; flex-direction: column; gap: 4px; font-size: 0.86rem; font-weight: 700; color: var(--muted); min-width: 0; }
.field > span output { color: var(--text); font-weight: 700; }
.field label { color: inherit; }
input[type="search"], input[type="text"], select {
  min-height: 44px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); background: #0f1116; color: var(--text); font: 500 1rem var(--font); min-width: 0; max-width: 100%;
}
input[type="range"] { accent-color: var(--accent); min-height: 30px; width: 100%; max-width: 100%; margin: 0; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); width: 18px; height: 18px; }
input[type="color"] { width: 44px; height: 44px; padding: 2px; border-radius: 10px; border: 1px solid var(--line); background: #0f1116; }
.check { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 600; color: var(--text); font-size: 0.95rem; }
.seg { display: inline-flex; flex-wrap: wrap; background: #0f1116; border: 1px solid var(--line); border-radius: 12px; padding: 3px; gap: 2px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.seg span { display: block; padding: 8px 14px; border-radius: 9px; font-weight: 700; font-size: 0.92rem; color: var(--muted); min-height: 38px; }
.seg input:checked + span { background: var(--accent); color: var(--accent-ink); }
.seg input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.bg-dark { background: #12141a; }
.bg-light { background: #eef0f5; }
.bg-checker { background-color: #2a2d36; background-image: linear-gradient(45deg, #3a3e4a 25%, transparent 25%, transparent 75%, #3a3e4a 75%), linear-gradient(45deg, #3a3e4a 25%, transparent 25%, transparent 75%, #3a3e4a 75%); background-size: 24px 24px; background-position: 0 0, 12px 12px; }
.status { min-height: 1.6em; color: var(--accent); font-weight: 600; font-size: 0.93rem; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 0 0 1em; font-size: 0.95rem; }
.kv dt { color: var(--muted); font-weight: 600; }
.kv dd { margin: 0; min-width: 0; }

/* ---------- sound board ---------- */
.sb-bar { margin-bottom: 24px; }
@media (min-width: 760px) and (min-height: 600px) { .sb-bar { position: sticky; top: 0; z-index: 5; box-shadow: 0 8px 24px rgba(0,0,0,0.35); } }
.sb-bar .field-search { flex: 1 1 220px; }
.sb-bar .field-vol { flex: 0 1 160px; }
.sb-filters { margin-top: 12px; }
.sb-pack { margin-bottom: 36px; }
.sb-pack-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-bottom: 4px; }
.sb-pack-head h2 { margin: 0; }
.sb-pack-links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 14px; font-size: 0.95rem; }
.sb-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 10px; }
.sb-item { margin: 0; display: flex; background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.sb-item.is-playing { border-color: var(--pc, var(--accent)); box-shadow: 0 0 0 2px var(--pc, var(--accent)) inset; }
.sb-play { flex: 1; min-width: 0; display: grid; grid-template-columns: 30px 1fr; gap: 2px 10px; align-items: center; text-align: left; background: none; border: 0; color: var(--text); padding: 10px 6px 10px 12px; cursor: pointer; font: inherit; min-height: 56px; }
.sb-play:hover { background: var(--card2); }
.sb-ico { grid-row: 1 / 3; width: 30px; height: 30px; border-radius: 50%; background: var(--pc, var(--accent)); position: relative; }
.sb-ico::after { content: ""; position: absolute; left: 11px; top: 8px; border-left: 11px solid #12141a; border-top: 7px solid transparent; border-bottom: 7px solid transparent; }
.sb-name { font: 600 0.9rem var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-meta { font-size: 0.78rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-copy { flex: 0 0 44px; background: none; border: 0; border-left: 1px solid var(--line); color: var(--muted); cursor: pointer; font-size: 0.72rem; font-weight: 700; padding: 0; }
.sb-copy:hover { background: var(--card2); color: var(--text); }
.sb-item[hidden], .sb-pack[hidden] { display: none; }

/* ---------- ui kit preview ---------- */
.kp-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 20px; margin-bottom: 28px; }
@media (max-width: 860px) { .kp-layout { grid-template-columns: minmax(0, 1fr); } }
.kp-stage { min-height: 340px; border-radius: var(--radius); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; padding: 24px 12px; overflow: hidden; position: relative; }
.kp-box { position: relative; display: flex; align-items: center; justify-content: center; border-style: solid; border-color: transparent; font-weight: 800; color: #fff; text-shadow: 0 1px 0 rgba(0,0,0,0.35); max-width: 100%; }
.kp-box img { display: block; max-width: none; }
.kp-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.kp-handle { position: absolute; right: -12px; bottom: -12px; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); border: 3px solid #12141a; cursor: nwse-resize; touch-action: none; padding: 0; }
.kp-gallery { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.kp-gallery li { margin: 0; }
.kp-piece { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; gap: 6px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 8px; color: var(--text); cursor: pointer; font: inherit; }
.kp-piece:hover { border-color: var(--accent); }
.kp-piece[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent) inset; }
.kp-thumb { width: 100%; height: 72px; display: flex; align-items: center; justify-content: center; border-radius: 8px; padding: 6px; }
.kp-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.kp-pname { font: 600 0.8rem var(--mono); word-break: break-all; text-align: center; }
.kp-psize { font-size: 0.75rem; color: var(--muted); text-align: center; }
.kp-kit[hidden] { display: none; }
.kp-group-title { margin: 22px 0 10px; font-size: 1rem; color: var(--muted); }

/* ---------- vfx player ---------- */
.vx-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; margin-bottom: 28px; }
@media (max-width: 860px) { .vx-layout { grid-template-columns: minmax(0, 1fr); } }
.vx-stage { border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; height: min(62vh, 440px); min-height: 280px; cursor: crosshair; touch-action: manipulation; }
.vx-stage canvas { display: block; width: 100%; height: 100%; }
.vx-list { list-style: none; padding: 0; margin: 0 0 20px; display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.vx-list li { margin: 0; }
.vx-pick { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; gap: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 8px; color: var(--text); cursor: pointer; font: inherit; }
.vx-pick:hover { border-color: var(--accent); }
.vx-pick[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent) inset; }
.vx-thumb { width: 84px; height: 84px; border-radius: 8px; background-color: #12141a; background-repeat: no-repeat; }
.vx-pname { font: 600 0.74rem var(--mono); word-break: break-all; text-align: center; }
.vx-psize { font-size: 0.74rem; color: var(--muted); }
.vx-sheet { position: relative; border-radius: var(--radius-s); overflow: hidden; border: 1px solid var(--line); line-height: 0; }
.vx-sheet img { width: 100%; }
.vx-cursor { position: absolute; border: 2px solid var(--accent); border-radius: 4px; pointer-events: none; }
