:root {
  --paper: #f5f5f7;
  --ink: #000000;
  --muted: #000000b0;
  --line: #000000;
  --blue: #0011ff;
  --deep: #000022;
  --yellow: #ffde4d;
  --red: #ff3b30;
  --white: #ffffff;
}

body {
  background-color: var(--paper);
  background-image: linear-gradient(#00000008 1px, transparent 1px), linear-gradient(90deg, #00000008 1px, transparent 1px);
  background-size: 28px 28px;
}

.site-header { background: rgb(245 245 247 / 94%); border-bottom-color: #000; }
.brand-mark {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  overflow: hidden;
  border: 0;
  background: url('../img/favicon.ico') center / contain no-repeat;
  box-shadow: none;
  color: transparent;
  font-size: 0;
  transform: none;
}
.nav a { color: #000; }
.nav a:hover, .nav a[aria-current=page] { color: var(--blue); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.nav-toggle { border-color: #000; background: var(--yellow); color: #000; }

.hero.shopfront {
  min-height: 650px;
  color: #000;
  background: var(--paper);
  border-bottom: 2px solid #000;
  isolation: isolate;
}
.hero.shopfront::before {
  z-index: -2;
  background-image: linear-gradient(90deg, #f5f5f7f2 0%, #f5f5f7d9 42%, #f5f5f780 100%), url('../img/3.webp');
  background-position: center, 78% 42%;
  background-size: cover;
  filter: saturate(.18);
}
.hero.shopfront::after {
  z-index: -1;
  background: url('../img/2-(3).webp') center / cover;
  mix-blend-mode: multiply;
  opacity: .85;
}
.hero-inner { grid-template-columns: minmax(0, .85fr) minmax(420px, 1.15fr); gap: 52px; align-items: center; }
.shop-copy { position: relative; z-index: 1; }
.shop-copy::before {
  content: "NIGHT GOODS / OPEN 24H";
  display: inline-flex;
  margin-bottom: 10px;
  padding: 4px 9px;
  background: #000;
  color: var(--yellow);
  font: 800 11px/1.4 ui-monospace, Consolas, monospace;
}
.shop-copy .eyebrow { color: var(--blue); }
.shop-copy .eyebrow::before { background: var(--blue); }
.hero.shopfront h1 { font-size: 64px; color: #000; margin: 12px 0 14px; }
.hero.shopfront .hero-copy { color: #171820; max-width: 540px; font-size: 18px; }
.hero.shopfront .button-quiet { color: #000; border: 1px solid #000; background: #fff; }
.hero.shopfront .button-quiet:hover { background: var(--yellow); }
.shop-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.shop-meta span { border: 1px solid #000; background: #fff; padding: 5px 9px; font-size: 12px; font-weight: 800; }

.vending {
  position: relative;
  padding: 18px 18px 25px;
  background: #fff;
  border: 2px solid #000;
  box-shadow: 10px 10px 0 var(--yellow), 12px 12px 0 #000;
  transform: rotate(.4deg);
}
.vending-top { display: flex; align-items: center; justify-content: space-between; padding-bottom: 12px; border-bottom: 3px solid #000; font-weight: 900; }
.vending-top span:first-child { font-size: 20px; }
.vending-top span:last-child { padding: 4px 7px; background: var(--red); color: #fff; font: 800 10px/1.4 ui-monospace, Consolas, monospace; }
.shelf-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; padding: 16px 0 12px; }
.shelf-item { min-width: 0; min-height: 184px; padding: 9px; display: flex; flex-direction: column; justify-content: end; border: 1px solid #000; background: #f5f5f7; box-shadow: inset 0 -4px 0 var(--yellow); }
.shelf-item img { width: 100%; height: 92px; margin-bottom: auto; object-fit: cover; border: 1px solid #000; }
.shelf-item strong { display: block; margin-top: 8px; font-size: 14px; }
.shelf-item small { display: block; color: #555; font-size: 10px; line-height: 1.4; }
.item-drill { background: var(--paper); }
.item-stock { background: #fff7ca; }
.stock-pixel { min-height: 92px; display: grid; place-items: center; background: var(--blue); color: var(--yellow); font-size: 62px; line-height: 1; border: 1px solid #000; }
.vending-barcode { display: grid; grid-template-columns: 1fr auto; gap: 3px 14px; align-items: center; padding: 10px 0 0; border-top: 1px dashed #000; font: 700 10px/1.4 ui-monospace, Consolas, monospace; }
.vending-barcode i { grid-column: 2; grid-row: 1 / span 2; width: 90px; height: 33px; background: repeating-linear-gradient(90deg, #000 0 2px, transparent 2px 4px, #000 4px 5px, transparent 5px 8px); }
.vending-barcode b { font-size: 12px; }
.vending-tape { position: absolute; right: -13px; top: 44%; padding: 5px 12px; transform: rotate(5deg); background: var(--yellow); border: 1px solid #000; font: 900 9px/1.3 ui-monospace, Consolas, monospace; }
.hero-slice { display: none; }

.ticker { background: var(--yellow); color: #000; border-bottom: 1px solid #000; font-family: ui-monospace, Consolas, monospace; }
.section { background-color: rgb(245 245 247 / 94%); border-color: #000; }
.section-head .kicker, .kicker, .feature .num { color: var(--blue); }
.section-head h2, .section h2 { color: #000; }
.section.section-dark { background-color: var(--deep); color: #fff; border-color: #343748; }
.section.section-dark .section-head .kicker { color: var(--yellow); }
.section.section-dark .section-head h2, .section.section-dark .route-step h3 { color: #fff; }
.section.section-dark .section-head p, .section.section-dark .route-step p { color: #e0e3ed; }
.feature { border-color: #000; }
.feature .num { font-family: ui-monospace, Consolas, monospace; }
.index-card { border: 1px solid #000; box-shadow: 3px 3px 0 #000; background: #fff; border-radius: 0; }
.index-card:hover { border-color: var(--blue); box-shadow: 4px 4px 0 var(--blue); }
.index-card small { color: var(--blue); font-family: ui-monospace, Consolas, monospace; }
.callout { background: var(--yellow); border: 1px solid #000; box-shadow: 5px 5px 0 #000; }
.callout .button { background: #000; color: #fff; }
.faq-list, details { border-color: #000; }
summary::after { color: var(--blue); }
.page-hero { position: relative; overflow: hidden; background: var(--yellow); border-bottom: 2px solid #000; }
.page-hero::after { content: "FIELD COPY / KEEP DRY"; position: absolute; right: max(24px, calc((100vw - var(--max)) / 2)); bottom: 17px; padding: 4px 8px; background: #000; color: var(--yellow); font: 800 10px/1.4 ui-monospace, Consolas, monospace; transform: rotate(-2deg); }
.page-hero .kicker { color: #000; }
.article { background: rgb(245 245 247 / 94%); }
.side-index { border-color: var(--yellow); background: #fff; padding: 12px 14px; box-shadow: 3px 3px 0 #000; }
.side-index a { color: #222; }
.side-index a:hover { color: var(--blue); }
.info-table th, .info-table td { border-color: #000; }
.info-table th { background: #ffde4d70; color: #000; }
.route-card { background: #fff; border: 1px solid #000; border-left: 5px solid var(--blue); box-shadow: 4px 4px 0 #000; }
.timeline { border-color: var(--blue); }
.timeline-item::before { border-radius: 0; background: var(--yellow); border-color: #000; }
.timeline-item time { color: var(--blue); font-family: ui-monospace, Consolas, monospace; }
.receipt, .nutrition-sheet { position: relative; background: #fff; color: #000; border: 1px solid #000; box-shadow: 7px 7px 0 var(--yellow), 9px 9px 0 #000; }
.receipt::before, .nutrition-sheet::before { content: ""; position: absolute; inset: 0 0 auto; height: 7px; background: repeating-linear-gradient(135deg, var(--yellow) 0 8px, #000 8px 11px, var(--yellow) 11px 19px); }
.receipt-title { margin-top: 8px; border-color: #000; }
.receipt-row { border-color: #888; }
.receipt-row[role="button"] { cursor: pointer; }
.receipt-row[role="button"]:hover, .receipt-row[role="button"]:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; background: #ffde4d80; }
.site-footer { background: var(--deep); color: #fff; border-top: 4px solid var(--yellow); }
.footer-note { border-color: #fff4; }
.friends a { border: 1px solid var(--yellow); border-radius: 0; background: var(--blue); }
.button-primary:hover { background: var(--yellow); }
.prose p, .prose li { color: #000; }
.monitor-wall { background: var(--deep); border: 2px solid var(--blue); }
.monitor-feed[aria-pressed="true"] { outline-color: var(--yellow); }
.monitor-feed::after { background: repeating-linear-gradient(transparent 0 3px, #0005 3px 4px); }
.monitor-section .section-head p, .monitor-note { color: #ffffffc9; }
.receipt-row[role="button"]:hover, .receipt-row[role="button"]:focus-visible { background: #ffde4d80; }

.character-section { background: #fff; }
.character-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, .8fr); gap: 36px; align-items: stretch; }
.character-pack { position: relative; min-height: 340px; overflow: hidden; padding: 0; border: 2px solid #000; background: #f5f5f7; box-shadow: 8px 8px 0 var(--yellow), 10px 10px 0 #000; cursor: pointer; text-align: left; }
.character-pack::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; border: 14px solid rgb(255 255 255 / 35%); box-shadow: inset 0 0 40px #0004; }
.character-pack img { width: 100%; height: 100%; min-height: 340px; object-fit: cover; filter: grayscale(1) contrast(1.12); transition: filter .35s, transform .5s; }
.character-pack:hover img, .character-pack[aria-expanded="true"] img { filter: grayscale(0) saturate(1.4) contrast(1.08); transform: scale(1.04); }
.character-pack[aria-expanded="true"] { box-shadow: 8px 8px 0 var(--blue), 10px 10px 0 #000; }
.pack-seal, .pack-label { position: absolute; z-index: 2; padding: 7px 10px; background: #fff; border: 1px solid #000; color: #000; font-weight: 900; }
.pack-seal { left: 18px; top: 18px; background: var(--yellow); }
.pack-label { left: 18px; bottom: 18px; font-size: 20px; }
.pack-barcode { position: absolute; z-index: 2; right: 18px; bottom: 18px; width: 84px; padding-top: 32px; background: repeating-linear-gradient(90deg, #000 0 2px, #fff 2px 4px, #000 4px 5px, #fff 5px 8px); color: #000; font: 800 8px/1.2 ui-monospace, Consolas, monospace; }
.nutrition-sheet { padding: 28px; }
.nutrition-sheet .button { margin-top: 14px; border: 1px solid #000; background: var(--yellow); color: #000; }
.monitor-section { background: var(--deep); color: #fff; }
.monitor-section .section-head h2, .monitor-section .section-head .kicker { color: #fff; }
.monitor-section .section-head .kicker { color: var(--yellow); }
.monitor-section .section-head p, .monitor-note { color: #d6d7e1; }
.monitor-wall { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 8px; background: var(--deep); border: 2px solid var(--blue); box-shadow: 0 0 0 5px #000, 0 0 30px #0011ff80; }
.monitor-feed { position: relative; min-width: 0; aspect-ratio: 16 / 10; overflow: hidden; padding: 0; border: 1px solid #555; background: #000; color: #fff; cursor: pointer; text-align: left; }
.monitor-feed img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.1) brightness(.78); transition: filter .3s, transform .4s; }
.monitor-feed:hover img, .monitor-feed[aria-pressed="true"] img { filter: grayscale(0) sepia(.2) hue-rotate(190deg) saturate(2.8) contrast(1.15); transform: scale(1.04); }
.monitor-feed[aria-pressed="true"] { outline: 2px solid var(--yellow); outline-offset: -3px; }
.monitor-feed::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(transparent 0 3px, #0003 3px 4px); }
.monitor-label, .monitor-caption { position: absolute; z-index: 1; left: 8px; padding: 3px 5px; background: #000c; font: 800 9px/1.4 ui-monospace, Consolas, monospace; }
.monitor-label { top: 7px; color: var(--yellow); }
.monitor-caption { right: 7px; bottom: 7px; color: #fff; text-align: right; }
.monitor-note { margin: 16px 0 0; font-size: 12px; }
.mosaic-fragment { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 20px; background: rgb(0 0 34 / 90%); background-image: linear-gradient(90deg, #0011ff15 1px, transparent 1px), linear-gradient(#0011ff15 1px, transparent 1px); background-size: 9px 9px; }
.fragment-paper { position: relative; width: min(520px, 100%); padding: 46px 32px 30px; border: 2px solid var(--yellow); background: #f5f5f7; color: #000; box-shadow: 9px 9px 0 var(--blue), 12px 12px 0 #000; }
.fragment-paper::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, transparent 0 9px, #0011ff08 9px 10px); }
.fragment-stamp { display: inline-block; margin-bottom: 14px; padding: 4px 7px; background: var(--red); color: #fff; font: 900 10px/1.4 ui-monospace, Consolas, monospace; }
.fragment-paper h2 { position: relative; font-size: 28px; }
.fragment-paper p { position: relative; color: #222; }
.fragment-close { position: relative; min-height: 44px; padding: 0 16px; border: 1px solid #000; background: var(--yellow); color: #000; font-weight: 900; cursor: pointer; }

#features > .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: auto minmax(340px, auto);
  gap: 24px 28px;
  align-items: stretch;
}
#features .section-head { grid-column: 1 / -1; margin-bottom: 0; }
#features .section-head p { max-width: 460px; }
#features .grid-4 {
  grid-column: 2;
  grid-row: 2;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-content: stretch;
}
#features .feature {
  position: relative;
  min-width: 0;
  min-height: 160px;
  padding: 20px 16px 14px;
  border: 1px solid #000;
  background: #fff;
  box-shadow: 4px 4px 0 #000;
}
#features .feature::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: repeating-linear-gradient(90deg, var(--yellow) 0 18px, #000 18px 21px);
}
#features .feature .num { margin-bottom: 10px; }
#features .feature h3 { margin-bottom: 7px; font-size: 17px; }
#features .feature p { margin-bottom: 0; font-size: 14px; line-height: 1.55; }
#features .shot {
  grid-column: 1;
  grid-row: 2;
  width: 100%;
  max-width: none !important;
  height: 100%;
  min-height: 340px;
  margin: 0 !important;
  border: 2px solid #000;
  box-shadow: 7px 7px 0 var(--yellow), 9px 9px 0 #000;
}
#features .shot::before {
  content: "CHARACTER FILE / 04";
  position: absolute;
  z-index: 1;
  top: 14px;
  left: 14px;
  padding: 5px 8px;
  background: var(--yellow);
  border: 1px solid #000;
  color: #000;
  font: 900 10px/1.4 ui-monospace, Consolas, monospace;
}
#features .shot img { height: 100%; min-height: 340px; aspect-ratio: 16 / 10; object-fit: cover; }
#features .shot figcaption { padding: 48px 16px 14px; font-size: 14px; }

body.power-out { overflow: hidden; }
body.power-out::before, body.power-out::after { content: ""; position: fixed; inset: 0; z-index: 60; pointer-events: none; }
body.power-out::before { background: var(--deep); animation: power-cut .8s steps(1, end) forwards; }
body.power-out::after { background: linear-gradient(#0011ff35, #0011ff35), url('../img/2-(3).webp') center / cover; filter: saturate(1.7) contrast(1.15); clip-path: polygon(0 0, 0 0, 0 0, 0 0); animation: paper-tear .85s cubic-bezier(.18,.7,.21,1) forwards; }
@keyframes power-cut { 0%, 12% { opacity: 0; } 16%, 100% { opacity: 1; } }
@keyframes paper-tear { 0%, 16% { clip-path: polygon(0 0, 0 0, 0 0); } 40% { clip-path: polygon(48% 0, 52% 0, 0 100%, 0 88%); } 70%, 100% { clip-path: polygon(8% 0, 100% 0, 100% 100%, 0 100%); } }

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: minmax(0, .8fr) minmax(340px, 1.2fr); gap: 30px; }
  .shelf-grid { gap: 7px; }
  .shelf-item { padding: 7px; }
  .character-layout { gap: 22px; }
  #features > .wrap { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; }
  #features .feature { min-height: 150px; padding: 18px 12px 12px; }
  #features .feature h3 { font-size: 15px; }
  #features .feature p { font-size: 13px; }
}
@media (max-width: 680px) {
  body { background-size: 20px 20px; }
  .hero.shopfront { min-height: 0; }
  .hero.shopfront::before { background-image: linear-gradient(180deg, #f5f5f7e8 0%, #f5f5f7d9 48%, #f5f5f7b0 100%), url('../img/3.webp'); background-position: center, 57% center; }
  .hero-inner { display: flex; flex-direction: column; align-items: stretch; padding: 52px 0 40px; gap: 30px; }
  .hero.shopfront h1 { font-size: 44px; }
  .hero.shopfront .hero-copy { font-size: 16px; }
  .vending { padding: 13px 12px 20px; box-shadow: 6px 6px 0 var(--yellow), 8px 8px 0 #000; transform: none; }
  .shelf-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .shelf-item { min-height: 150px; }
  .shelf-item img, .stock-pixel { height: 70px; min-height: 70px; }
  .shelf-item strong { font-size: 12px; }
  .shelf-item small { font-size: 9px; }
  .vending-tape { right: -7px; top: 42%; }
  .page-hero::after { position: static; display: inline-block; margin: 20px 0 0 16px; }
  .character-layout { grid-template-columns: 1fr; }
  .character-pack, .character-pack img { min-height: 260px; }
  .nutrition-sheet { padding: 24px 20px; }
  .monitor-wall { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; padding: 5px; box-shadow: 0 0 0 3px #000, 0 0 18px #0011ff80; }
  .monitor-label, .monitor-caption { font-size: 8px; }
  .monitor-label { left: 5px; top: 5px; }
  .monitor-caption { right: 4px; bottom: 4px; }
  .index-grid { gap: 12px 9px; }
  .section-head { margin-bottom: 22px; }
  #features > .wrap { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto; gap: 20px; }
  #features .section-head { grid-column: 1; grid-row: 1; }
  #features .shot { grid-column: 1; grid-row: 2; min-height: 0; }
  #features .shot img { min-height: 0; height: auto; aspect-ratio: 16 / 10; }
  #features .grid-4 { grid-column: 1; grid-row: 3; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
  #features .feature { min-height: 150px; padding: 18px 12px 12px; }
  #features .feature h3 { font-size: 15px; }
  #features .feature p { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  body.power-out::before, body.power-out::after { animation-duration: .01ms; }
  .character-pack img, .monitor-feed img { transition: none; }
}
