/* ============ cukuto retro OS (home) ============ */
:root {
  --yellow: #f8d210;
  --yellow-2: #e9c400;
  --ink: #222222;
  --red: #ef4449;
  --blue: #0446b4;
  --blue-hi: #366bc3;
  --play: #0a74d1;
  --face: #ffffff;
  --face-2: #ebebeb;
  --muted: #5d6470;
  --teal: #14b39c;
  --mint: #d8fbd2;
  --px: 3px;
  --bar: 24px;
  --pixel: "Silkscreen", ui-monospace, monospace;
  --body: "Rubik", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--body);
  font-size: 16px; line-height: 1.55;
  color: var(--ink);
  background-color: #1e1f1f;
  background-image: radial-gradient(rgba(255,255,255,.06) 1.5px, transparent 1.6px);
  background-size: 18px 18px;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
.px { image-rendering: pixelated; }
a { color: inherit; }
:focus-visible { outline: 3px dashed var(--ink); outline-offset: 3px; }

/* ============ top bar ============ */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  height: 76px; padding: 0 24px;
  background: var(--yellow);
  border-bottom: 3px solid #000;
}
.brand { display: block; }
.brand img { height: 56px; width: auto; }
.topbar nav { display: flex; gap: 6px; }
.topbar nav a {
  font-weight: 600; font-size: 15px; text-decoration: none;
  padding: 7px 12px; border-radius: 6px;
}
.topbar nav a:hover { background: var(--ink); color: var(--yellow); }

/* ============ desktop ============ */
.desktop {
  position: relative;
  max-width: 720px; margin: 0 auto;
  padding: 56px 24px 24px;
  display: grid; gap: 32px;
}

/* ============ windows (in-game chrome) ============ */
.win {
  position: relative; z-index: 2;
  background: var(--face);
  border: var(--px) solid var(--blue); border-top: 0;
  box-shadow: 8px 8px 0 rgba(0,0,0,.45);
}
.win-bar {
  height: var(--bar);
  margin: 0 calc(var(--px) * -1);
  padding: 0 8px;
  display: flex; align-items: center; gap: 8px;
  background: var(--blue); border-top: var(--px) solid var(--blue-hi);
  color: #fff;
}
.win-ico { width: 15px; height: 15px; image-rendering: pixelated; flex: none; }
.win-title { flex: 1; margin: 0; font-family: var(--pixel); font-weight: 400; font-size: 12px; letter-spacing: .04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.win-btns { display: flex; gap: 3px; }
.win-btns i { width: 15px; height: 15px; background-size: 100% 100%; image-rendering: pixelated; }
.wb-min   { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 5 5' shape-rendering='crispEdges'%3E%3Crect width='5' height='5' fill='%231f6fe0'/%3E%3Crect width='5' height='1' fill='%234f8ff0'/%3E%3Crect x='1' y='3' width='3' height='1' fill='%23fff'/%3E%3C/svg%3E"); }
.wb-max   { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 5 5' shape-rendering='crispEdges'%3E%3Crect width='5' height='5' fill='%231f6fe0'/%3E%3Crect width='5' height='1' fill='%234f8ff0'/%3E%3Crect x='2' y='1' width='1' height='1' fill='%23fff'/%3E%3Crect x='1' y='2' width='1' height='1' fill='%23fff'/%3E%3Crect x='3' y='2' width='1' height='1' fill='%23fff'/%3E%3Crect x='2' y='3' width='1' height='1' fill='%23fff'/%3E%3C/svg%3E"); }
.wb-close { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 5 5' shape-rendering='crispEdges'%3E%3Crect width='5' height='5' fill='%23e72121'/%3E%3Crect width='5' height='1' fill='%23f04848'/%3E%3Crect width='1' height='5' fill='%23f04848'/%3E%3Crect x='1' y='1' width='1' height='1' fill='%23fff'/%3E%3Crect x='3' y='1' width='1' height='1' fill='%23fff'/%3E%3Crect x='2' y='2' width='1' height='1' fill='%23fff'/%3E%3Crect x='1' y='3' width='1' height='1' fill='%23fff'/%3E%3Crect x='3' y='3' width='1' height='1' fill='%23fff'/%3E%3C/svg%3E"); }

/* AUTORUN.EXE */

.ar-hero {
  background: #dbffcd url("/assets/autorun/swirl.png") center / cover;
  padding: 30px 24px; border-bottom: var(--px) solid var(--ink);
}
.ar-hero img { width: min(100%, 485px); margin: 0 auto; image-rendering: pixelated; }
.ar-body { padding: 20px 24px 24px; }
.ar-body .tag { font-size: 19px; font-weight: 600; margin: 0 0 4px; }
.ar-body .date { font-family: var(--pixel); font-size: 13px; color: var(--blue); margin: 0 0 20px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--pixel); font-size: 14px; line-height: 1;
  padding: 14px 18px; text-decoration: none;
  box-shadow: inset 0 -6px 0 rgba(0,0,0,.25);
}
.btn:active { box-shadow: inset 0 -2px 0 rgba(0,0,0,.25); transform: translateY(2px); }
.btn-play { background: var(--play); color: #fff; }
.btn-play:hover { background: #1a84e2; }
.btn-red { background: #d8392b; color: #fff; }
.btn-red:hover { background: #e64a3c; }

/* SCREENSHOTS */

.shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 10px; background: var(--face-2); }
.shots a { display: block; background: #000; border: var(--px) solid transparent; }
.shots a:hover { border-color: var(--yellow); }
.shots img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }

/* decorative in-game windows (static) */
.sprite { position: absolute; z-index: 1; image-rendering: pixelated; filter: drop-shadow(6px 6px 0 rgba(0,0,0,.18)); pointer-events: none; }

/* ============ press kit ============ */
.desktop.wide { max-width: 1120px; }
.win-body { padding: 22px 24px; }
.pk-head .ar-hero { padding: 26px 24px; }
.pk-head .ar-hero img { width: min(100%, 388px); }
.pk-head h1 { font-family: var(--pixel); font-weight: 400; font-size: 26px; line-height: 1.2; color: var(--blue); margin: 0 0 8px; }
.pk-head p { margin: 0 0 18px; }
.pk-grid { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 32px; align-items: start; }
.factsheet dl { margin: 0; }
.factsheet dt { font-family: var(--pixel); font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.factsheet dd { margin: 0 0 14px; font-weight: 600; overflow-wrap: anywhere; }
.factsheet dd:last-child { margin-bottom: 0; }
.factsheet a, .prose a, .notice a { color: var(--blue); }
.prose .win-body h2 { font-family: var(--pixel); font-weight: 400; font-size: 15px; color: var(--blue); margin: 26px 0 8px; }
.prose .win-body h2:first-child { margin-top: 0; }
.prose p { margin: 0 0 12px; }
.prose ul { margin: 0; padding-left: 20px; }
.prose li { margin-bottom: 6px; }
.assets { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); padding: 12px; background: var(--face-2); }
.asset { background: var(--face); display: flex; flex-direction: column; }
.thumbbox {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden;
  background: #ddd conic-gradient(#e6e6e6 25%, #f6f6f6 0 50%, #e6e6e6 0 75%, #f6f6f6 0) 0 0 / 16px 16px;
}
.thumbbox.dark { background: var(--ink); }
.thumbbox.yellow { background: var(--yellow); }
.thumbbox.swirl { background: #dbffcd url("/assets/autorun/swirl.png") center / cover; }
.thumbbox img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 10% 12%; }
.thumbbox img.cover { object-fit: cover; padding: 0; }
.asset-info { padding: 9px 12px; display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.asset-info small { display: block; color: var(--muted); font-weight: 400; font-size: 12px; }
.asset-info a { font-family: var(--pixel); font-size: 11px; color: var(--blue); white-space: nowrap; }
@media (max-width: 860px) { .pk-grid { grid-template-columns: 1fr; } }

/* ============ 404 ============ */
.err { max-width: 460px; margin: 12vh auto 0; }
.err .win-body { display: flex; gap: 18px; align-items: flex-start; }
.err .big { width: 60px; height: 60px; image-rendering: pixelated; flex: none; }
.err h1 { font-family: var(--pixel); font-weight: 400; font-size: 18px; margin: 0 0 8px; }
.err p { margin: 0 0 16px; }

/* ============ footer ============ */
.foot { text-align: center; padding: 8px 16px 32px; font-family: var(--pixel); font-size: 11px; color: #8a8a8a; }

/* ============ small screens ============ */
@media (max-width: 1000px) {
  .sprite { display: none; }
  .desktop { padding-top: 24px; gap: 24px; }
}
@media (max-width: 520px) {
  :root { --px: 2px; }
  .desktop { padding: 20px 16px 16px; }
  .topbar { padding: 0 12px; height: 64px; }
  .brand img { height: 46px; }
  .topbar nav { gap: 0; }
  .topbar nav a { font-size: 13px; padding: 6px 7px; }
  .ar-body .tag { font-size: 17px; }
  .shots { grid-template-columns: 1fr 1fr; }
  .shots a:last-child { display: none; }
}

/* ============ CRT overlay (static, click-through) ============ */
body::after {
  content: "";
  position: fixed; inset: 0; z-index: 9; /* below the sticky top bar (z 10) */
  pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(0,0,0,.05) 0 1px, transparent 1px 4px),
    radial-gradient(ellipse at center, transparent 70%, rgba(0,0,0,.18) 100%);
}
@media print { body::after { display: none; } }
