/* KitsuneUI framework site: Kitsunebi night glass. */
:root {
  --bg: #080A18;
  --glass: rgba(20, 24, 48, 0.93);
  --glass-soft: rgba(20, 24, 48, 0.75);
  --code: #0B0E22;
  --accent: #6FE3FF;
  --accent-rgb: 111, 227, 255;
  --gold: #D9B873;
  --text-bright: #F2F5FC;
  --text: #E8ECF7;
  --text-mid: #C3CAE0;
  --text-muted: #9AA3BF;
  --text-faint: #6F7899;
  --edge: rgba(150, 175, 255, 0.18);
  --edge-strong: rgba(150, 175, 255, 0.3);
  --cell: rgba(255, 255, 255, 0.055);
  --cell-alt: rgba(255, 255, 255, 0.03);
  --btn-hover: rgba(30, 84, 118, 0.9);
  --good: #6FD266;
  --warn: #F2B544;
  --font: 'Barlow Semi Condensed', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (max-width: 1100px) { html { scroll-padding-top: 130px; } }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 20px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); }
code {
  font-family: var(--mono);
  font-size: 0.82em;
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.08);
  border-radius: 5px;
  padding: 1px 5px;
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 10; background: var(--glass); padding: 8px 14px; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 5;
  height: 64px; display: flex; align-items: center; gap: 24px;
  padding: 0 32px;
  background: rgba(10, 12, 28, 0.88);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(150, 175, 255, 0.16);
}
.topbar.over { position: absolute; left: 0; right: 0; background: transparent; border-bottom: 0; backdrop-filter: none; -webkit-backdrop-filter: none; height: 72px; padding: 0 56px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text-bright); font-size: 24px; font-weight: 700; letter-spacing: 0.04em; }
.brand svg { width: 26px; height: 26px; fill: var(--accent); }
.pill { font-size: 14px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); border: 1px solid rgba(217, 184, 115, 0.45); border-radius: 999px; padding: 1px 10px; }
.spacer { flex: 1; }
.topnav { display: flex; gap: 24px; font-size: 18px; font-weight: 500; }
.topnav a { color: var(--text-mid); text-decoration: none; }
.topnav a:hover, .topnav a[aria-current="page"] { color: var(--accent); }
.badge { font-size: 15px; color: var(--text-muted); border: 1px solid var(--edge-strong); border-radius: 8px; padding: 3px 10px; white-space: nowrap; }

/* ---------- buttons ---------- */
.btn {
  height: 54px; display: inline-flex; align-items: center; gap: 10px;
  padding: 0 24px; border-radius: 14px; text-decoration: none;
  font-size: 21px; font-weight: 600; color: var(--text);
  background: var(--glass-soft); border: 1px solid var(--edge-strong);
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.btn:hover { background: var(--btn-hover); border-color: var(--accent); }
.btn.primary { font-weight: 700; color: var(--text-bright); background: var(--btn-hover); border-color: var(--accent); box-shadow: 0 0 28px rgba(var(--accent-rgb), 0.35); }
.btn.primary:hover { box-shadow: 0 0 36px rgba(var(--accent-rgb), 0.5); }
.btn.small { height: 40px; font-size: 17px; padding: 0 16px; border-radius: 10px; }
.btn.solid { color: var(--bg); background: var(--accent); border-color: var(--accent); font-weight: 700; }
.btn.solid:hover { background: #9BEDFF; }

/* ---------- shared blocks ---------- */
.card { padding: 20px 22px; border-radius: 18px; background: var(--glass); border: 1px solid var(--edge); }
.card h3 { margin: 0; font-size: 24px; color: var(--text-bright); }
.card p { margin: 6px 0 0; font-size: 18px; line-height: 1.45; color: var(--text-mid); }
.eyebrow { font-size: 17px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); }
.tag { font-size: 14px; font-weight: 600; border-radius: 999px; padding: 1px 9px; vertical-align: 3px; margin-left: 6px; }
.tag.good { color: var(--good); border: 1px solid rgba(111, 210, 102, 0.5); }
.tag.warn { color: var(--warn); border: 1px solid rgba(242, 181, 68, 0.5); }
.shot { border-radius: 16px; border: 1px solid rgba(150, 175, 255, 0.2); width: 100%; height: auto; object-fit: cover; }

.code { border-radius: 14px; overflow: hidden; border: 1px solid var(--edge); background: var(--code); }
.code-head { display: flex; align-items: center; height: 38px; padding: 0 8px 0 16px; background: rgba(255, 255, 255, 0.04); font-size: 15px; color: var(--text-muted); }
.code-head span { flex: 1; }
.copy { font: 600 15px var(--font); color: var(--accent); background: none; border: 0; border-radius: 6px; padding: 4px 10px; cursor: pointer; }
.copy:hover { background: rgba(var(--accent-rgb), 0.1); }
pre, code { font-variant-ligatures: none; font-feature-settings: "liga" 0, "calt" 0; }
.code pre { white-space: pre-wrap; overflow-wrap: anywhere; }
pre { margin: 0; padding: 16px 20px; font-family: var(--mono); font-size: 15px; line-height: 1.6; color: var(--text-mid); overflow-x: auto; tab-size: 2; }
pre .t { color: var(--text-muted); }
pre .a { color: var(--gold); }
pre .v { color: var(--accent); }
pre .c { color: var(--text-faint); }

.table { border-radius: 14px; overflow: hidden; border: 1px solid var(--edge); }
.table > div { display: grid; grid-template-columns: minmax(200px, 38%) 1fr; gap: 16px; padding: 11px 16px; font-size: 17px; color: var(--text-mid); background: var(--cell); }
.table > div:nth-child(even) { background: var(--cell-alt); }
.table > div > :first-child { font-family: var(--mono); font-size: 15px; color: var(--accent); overflow-wrap: anywhere; }

.note { display: flex; gap: 12px; margin-top: 16px; padding: 14px 16px; border-radius: 12px; font-size: 18px; color: var(--text-mid); background: rgba(var(--accent-rgb), 0.07); border: 1px solid rgba(var(--accent-rgb), 0.25); }
.note b { color: var(--accent); flex: none; }
.note span { min-width: 0; overflow-wrap: anywhere; }
.note.gold { background: rgba(217, 184, 115, 0.07); border-color: rgba(217, 184, 115, 0.3); }
.note.gold b { color: var(--gold); }

.grid-bg { background-image: linear-gradient(rgba(var(--accent-rgb), 0.07) 1px, transparent 1px), linear-gradient(90deg, rgba(var(--accent-rgb), 0.07) 1px, transparent 1px); background-size: 24px 24px; }
.move-stage { position: relative; border-radius: 18px; overflow: hidden; background-color: #111D20; border: 1px solid var(--edge); min-height: 220px; }
.piece { position: absolute; border: 2px dashed var(--text-muted); border-radius: 10px; background: rgba(154, 163, 191, 0.08); display: flex; align-items: center; gap: 10px; padding: 0 14px; font-size: 17px; color: var(--text); }
.piece > span { position: absolute; left: 8px; top: -25px; font-size: 14px; font-weight: 700; color: var(--bg); background: var(--text-muted); border-radius: 6px; padding: 1px 8px; white-space: nowrap; }
.piece.mine { border-color: var(--accent); background: rgba(var(--accent-rgb), 0.12); }
.piece.mine > span { background: var(--accent); }
.piece.health { border-color: #FF6B5A; background: rgba(255, 107, 90, 0.1); }
.piece.health > span { background: #FF6B5A; }
.piece .grip { position: absolute; right: -8px; bottom: -8px; width: 14px; height: 14px; border-radius: 3px; background: var(--accent); }

.footer { display: flex; flex-wrap: wrap; gap: 12px 26px; padding: 26px 0 40px; margin-top: 90px; font-size: 16px; color: var(--text-muted); border-top: 1px solid rgba(150, 175, 255, 0.14); }
.footer a { color: var(--text-mid); text-decoration: none; }
.footer a:hover { color: var(--accent); }

/* ---------- landing ---------- */
.hero { position: relative; min-height: 760px; overflow: hidden; }
.hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.75; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8, 10, 24, 0.96) 0%, rgba(8, 10, 24, 0.8) 42%, rgba(8, 10, 24, 0.15) 75%), linear-gradient(180deg, rgba(8, 10, 24, 0) 60%, var(--bg) 100%); }
.hero-body { position: relative; z-index: 1; max-width: 1280px; margin: 0 auto; padding: 190px 56px 80px; }
.hero h1 { margin: 10px 0 18px; max-width: 720px; font-size: 76px; line-height: 1; color: var(--text-bright); }
.hero .lede { margin: 0 0 30px; max-width: 600px; font-size: 24px; line-height: 1.45; color: var(--text-mid); }
.hero .eyebrow { color: var(--gold); font-size: 18px; }
.ctas { display: flex; flex-wrap: wrap; gap: 14px; }
.facts { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 46px; font-size: 18px; color: var(--text-muted); }
.facts b { color: var(--text-bright); }
.strip { display: flex; height: 12px; }
.strip i { flex: 1; }

.wrap { max-width: 1280px; margin-left: auto; margin-right: auto; padding-left: 56px; padding-right: 56px; }
.band { padding-top: 110px; }
.center { text-align: center; }
.band h2 { margin: 8px 0 40px; font-size: 48px; line-height: 1.1; color: var(--text-bright); }
.split h2 { margin-bottom: 16px; font-size: 44px; }
.split p { margin: 0 0 22px; font-size: 21px; color: var(--text-mid); }
.cols3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.cols4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.cols2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.split { display: grid; grid-template-columns: 1fr 1.25fr; gap: 48px; align-items: center; }

.step { display: flex; flex-direction: column; border-radius: 18px; overflow: hidden; background: var(--glass); border: 1px solid var(--edge); }
.step-head { padding: 22px 22px 14px; }
.step-head div { display: flex; align-items: center; gap: 12px; font-size: 26px; font-weight: 700; color: var(--text-bright); }
.step-head div b { width: 38px; height: 38px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 21px; color: var(--bg); background: var(--gold); }
.step-head p { margin: 10px 0 0; font-size: 18px; line-height: 1.45; color: var(--text-mid); }
.step pre { flex: 1; font-size: 14px; border-top: 1px solid rgba(150, 175, 255, 0.12); white-space: pre-wrap; }

.seg { display: inline-flex; padding: 4px; border-radius: 12px; background: var(--glass); border: 1px solid rgba(150, 175, 255, 0.2); }
.seg button { height: 40px; padding: 0 18px; border: 0; border-radius: 9px; font: 600 18px var(--font); color: var(--text-muted); background: transparent; cursor: pointer; }
.seg button[aria-pressed="true"] { color: var(--text-bright); background: var(--btn-hover); }

.demo { border-radius: 18px; overflow: hidden; background: var(--glass); border: 1px solid rgba(150, 175, 255, 0.25); box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45); transition: border-radius 0.2s, background 0.2s; }
.demo-head { height: 46px; display: flex; align-items: center; padding: 0 20px; background: rgba(255, 255, 255, 0.04); font-size: 22px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-bright); }
.demo-body { padding: 18px 20px 22px; }
.demo-title { font-size: 20px; font-weight: 700; color: var(--gold); }
.demo-rule { height: 1px; margin: 4px 0 12px; background: rgba(217, 184, 115, 0.45); }
.demo-row { height: 38px; display: flex; align-items: center; padding: 0 14px; margin-bottom: 5px; border-radius: 9px; font-size: 19px; color: #DADDE6; background: var(--cell); }
.demo-row:nth-of-type(even) { background: var(--cell-alt); }
.demo-row span { margin-left: auto; font-weight: 600; color: var(--gold); }
.demo-btns { display: flex; gap: 10px; margin-top: 14px; }
.demo-btns span { height: 40px; flex: 1; display: grid; place-items: center; border-radius: 9px; font-size: 19px; font-weight: 600; background: rgba(34, 92, 52, 0.88); }
.demo-btns span + span { background: rgba(104, 30, 36, 0.88); }
.demo.plain { border-radius: 2px; background: rgba(40, 40, 40, 0.96); border-color: #000; }
.demo.plain .demo-head { background: #141414; }
.demo.plain .demo-title, .demo.plain .demo-row span { color: #DADDE6; }
.demo.plain .demo-rule { background: rgba(120, 120, 120, 0.6); }
.demo.plain .demo-row { border-radius: 0; background: #343434; }
.demo.plain .demo-row:nth-of-type(even) { background: #3C3C3C; }
.demo.plain .demo-btns span { border-radius: 0; background: #464646; }

.kit svg { width: 34px; height: 34px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.kit h3 { margin-top: 12px; font-size: 26px; }
.kit .count { font-family: var(--mono); font-size: 14px; color: var(--gold); margin: 4px 0 10px; }

.moveband { margin-top: 110px; padding: 80px 0; background: linear-gradient(180deg, rgba(var(--accent-rgb), 0.06), rgba(var(--accent-rgb), 0)); border-top: 1px solid rgba(150, 175, 255, 0.14); }
.moveband .split { grid-template-columns: 1.2fr 1fr; }
.moveband .move-stage { height: 340px; }
.moveband pre { border-radius: 14px; background: var(--code); border: 1px solid var(--edge); white-space: pre-wrap; }

.mods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.mod { display: flex; gap: 16px; align-items: center; padding: 18px 20px; border-radius: 16px; background: var(--glass); border: 1px solid var(--edge); text-decoration: none; }
.mod b { width: 52px; height: 52px; flex: none; border-radius: 14px; display: grid; place-items: center; font-size: 24px; color: var(--accent); background: var(--btn-hover); }
.mod.gold b { color: var(--gold); background: rgba(217, 184, 115, 0.25); }
.mod.open { border-style: dashed; border-color: var(--edge-strong); }
.mod.open b { color: var(--text-muted); background: transparent; border: 1px dashed var(--edge-strong); }
.mod div { font-size: 22px; font-weight: 700; color: var(--text-bright); }
.mod small { display: block; font-size: 17px; font-weight: 400; color: var(--text-muted); }
a.mod:hover { border-color: var(--accent); }

/* ---------- guide ---------- */
.guide-page { background: radial-gradient(1200px 600px at 70% -10%, rgba(var(--accent-rgb), 0.1), rgba(8, 10, 24, 0) 60%), var(--bg); }
.layout { display: flex; max-width: 1360px; margin: 0 auto; }
.toc { position: sticky; top: 64px; align-self: flex-start; width: 270px; flex: none; max-height: calc(100vh - 64px); overflow-y: auto; padding: 36px 20px 36px 32px; }
.toc-title { font-size: 14px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 14px; }
.toc a { display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 4px 12px; margin-bottom: 4px; border-radius: 10px; border-left: 3px solid transparent; text-decoration: none; font-size: 19px; font-weight: 500; color: var(--text-mid); }
.toc a i { font-style: normal; font-family: var(--mono); font-size: 13px; color: var(--text-faint); }
.toc a:hover { color: var(--text-bright); }
.toc a.on { font-weight: 700; color: var(--text-bright); background: rgba(30, 84, 118, 0.55); border-left-color: var(--accent); }
.toc .card a { display: inline; min-height: 0; padding: 0; margin: 0; border: 0; border-radius: 0; font-size: inherit; color: var(--accent); }
.toc .card { margin-top: 28px; padding: 16px; border-radius: 14px; }
.toc .card h3 { font-size: 16px; color: var(--gold); }
.toc .card p { font-size: 16px; }
.content { flex: 1; min-width: 0; padding: 40px 48px 0 40px; }
.content > section { max-width: 980px; margin-bottom: 72px; }
.content h1 { margin: 8px 0 14px; font-size: 56px; line-height: 1.05; color: var(--text-bright); }
.content h2 { margin: 0 0 8px; font-size: 36px; line-height: 1.15; color: var(--gold); }
.content h2 + .rule { height: 1px; margin-bottom: 18px; background: linear-gradient(90deg, rgba(217, 184, 115, 0.6), rgba(217, 184, 115, 0)); }
.content h3 { margin: 32px 0 10px; font-size: 25px; color: var(--text-bright); }
.content .card h3 { margin: 0; font-size: 24px; }
.content .toc .card h3, .toc .card h3 { font-size: 16px; }
.content p, .content li { color: var(--text-mid); }
.content p { margin: 0 0 16px; }
.content ul { margin: 0 0 16px; padding-left: 22px; }
.content li { margin-bottom: 6px; }
.lede { font-size: 22px; max-width: 760px; }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.swatch { border-radius: 12px; overflow: hidden; background: var(--glass); border: 1px solid rgba(150, 175, 255, 0.14); }
.swatch i { display: block; height: 54px; background-image: linear-gradient(var(--c), var(--c)), repeating-conic-gradient(#1A1E36 0 25%, #11142A 0 50%); background-size: auto, 14px 14px; }
.swatch div { padding: 8px 12px 10px; font-size: 15px; color: var(--text-muted); }
.swatch div b { display: block; font-family: var(--mono); font-weight: 400; color: var(--text-bright); }
.sprites { display: grid; grid-template-columns: 1fr; gap: 20px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.tiles figure { margin: 0; padding: 14px 8px 10px; border-radius: 12px; background: #1A1F3C; border: 1px solid rgba(150, 175, 255, 0.14); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.tiles img { height: 112px; width: auto; max-width: 100%; object-fit: contain; }
.tiles figcaption { font-family: var(--mono); font-size: 13px; color: var(--text-mid); }
.preview { border-radius: 16px; padding-bottom: 18px; background: var(--glass); border: 1px solid rgba(150, 175, 255, 0.22); box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35); }
.preview .demo-body { padding-bottom: 0; }
.toggle { display: flex; align-items: center; gap: 12px; margin-top: 10px; font-size: 18px; color: var(--text); }
.toggle i { position: relative; width: 44px; height: 24px; border-radius: 999px; background: var(--btn-hover); border: 1px solid var(--accent); }
.toggle i::after { content: ""; position: absolute; right: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--accent); }
.content .footer { max-width: 980px; }

/* ---------- layouts ---------- */
.gallery { padding-top: 56px; }
.gallery h1 { margin: 8px 0 14px; font-size: 56px; line-height: 1.05; color: var(--text-bright); }
.gallery .lede { margin: 0 0 24px; color: var(--text-mid); }
.howto { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 0 0 40px; padding: 0; list-style: none; font-size: 18px; color: var(--text-mid); }
.howto b { display: block; font-size: 21px; color: var(--gold); }
.layout-card { display: flex; flex-direction: column; gap: 12px; }
.layout-card h2 { margin: 4px 0 0; font-size: 28px; color: var(--text-bright); }
.layout-card p { flex: 1; margin: 0; }
.layout-card .code pre { padding: 12px 14px; font-size: 13px; }
.move-stage.layout-stage { min-height: 0; aspect-ratio: 16 / 9; border-radius: 12px; }
.layout-stage .piece { justify-content: center; padding: 0; border-width: 1px; border-radius: 5px; }
.layout-stage .piece > span { position: static; padding: 0; font-size: 13px; font-weight: 600; color: var(--text); background: none; }
.gallery-notes { margin-top: 26px; }

/* ---------- small screens ---------- */
@media (max-width: 1100px) {
  .cols4 { grid-template-columns: repeat(2, 1fr); }
  .layout { flex-direction: column; }
  .toc { position: sticky; top: 64px; z-index: 4; width: 100%; max-height: none; display: flex; gap: 6px; overflow-x: auto; padding: 10px 16px; background: rgba(10, 12, 28, 0.92); border-bottom: 1px solid rgba(150, 175, 255, 0.12); scrollbar-width: none; }
  .toc-title, .toc .card, .toc a i { display: none; }
  .toc a { flex: none; min-height: 34px; margin: 0; padding: 2px 12px; font-size: 16px; border-left: 0; border: 1px solid var(--edge); border-radius: 999px; white-space: nowrap; }
  .toc a.on { border-color: var(--accent); }
  .content { padding: 32px 32px 0; }
}
@media (max-width: 860px) {
  body { font-size: 18px; }
  .topbar, .topbar.over { padding: 0 16px; gap: 14px; }
  .topnav { display: none; }
  .badge { display: none; }
  .hero { min-height: 0; }
  .hero-body { padding: 120px 16px 60px; }
  .hero h1 { font-size: 48px; }
  .hero .lede { font-size: 20px; }
  .wrap { padding-left: 16px; padding-right: 16px; }
  .band { padding-top: 72px; }
  .band h2, .split h2 { font-size: 34px; }
  .cols3, .cols2, .cols4, .split, .moveband .split, .mods, .sprites, .howto { grid-template-columns: 1fr; }
  .gallery h1 { font-size: 40px; }
  .moveband { margin-top: 72px; padding: 56px 0; }
  .content { padding: 24px 16px 0; }
  .content h1 { font-size: 40px; }
  .content h2 { font-size: 30px; }
  .table > div { grid-template-columns: 1fr; gap: 2px; }
  .note { flex-direction: column; gap: 4px; }
  .move-stage { min-height: 260px; }
}
