:root {
  --shell: #9a9f8f;
  --shell-dark: #7c8172;
  --shell-darker: #5f6455;
  --scr: #c4d9a8;
  --g1: #8bac0f;
  --g2: #4c722a;
  --g3: #0f380f;
  --maroon: #7b2d3a;
  --red: #c0392b;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  height: 100%;
  scroll-behavior: smooth;
}

body {
  background: #2b2b26;
  font-family: 'VT323', monospace;
  color: var(--g3);
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-snap-type: y mandatory;
}

a,
button {
  color: inherit;
  font: inherit;
}

h1,
h2,
.pixel-font {
  font-family: 'Press Start 2P', monospace;
  line-height: 1.6;
}

.snap-section {
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.2rem;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  position: relative;
}

.stage {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.6rem;
  max-width: 100%;
}

/* --- scroll nav buttons --- */
.scroll-nav-btn {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  background: var(--shell-dark);
  border: none;
  color: var(--scr);
  font-family: 'Press Start 2P', monospace;
  font-size: 0.56rem;
  padding: 0.7rem 1rem 0.6rem;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  box-shadow: 0 5px 0 var(--shell-darker);
  letter-spacing: 0.04em;
  transition: transform .1s ease;
}

.scroll-nav-btn:active {
  box-shadow: 0 1px 0 var(--shell-darker);
  transform: translateX(-50%) translateY(4px);
}

.scroll-nav-btn .arrow {
  font-size: 1.1rem;
  line-height: 1;
}

.scroll-nav-btn.down {
  bottom: 14px;
}

.scroll-nav-btn.up {
  top: 22px;
}

/* --- mockups page --- */
.mockups-section {
  background: #e9e6da;
}

.mockups-wrap {
  width: min(1000px, 92vw);
  padding: 4.5rem 0 3rem;
}

.mockups-head {
  text-align: center;
  margin-bottom: 2.6rem;
}

.mockups-head .eyebrow2 {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.62rem;
  color: var(--g2);
  letter-spacing: 0.08em;
  margin-bottom: 0.9rem;
}

.mockups-head h2 {
  font-size: clamp(1.3rem, 4vw, 1.8rem);
  color: var(--g3);
}

.mockups-head p {
  font-family: 'VT323', monospace;
  font-size: 1.3rem;
  color: #5f6455;
  max-width: 520px;
  margin: 0.8rem auto 0;
}

.mockup-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.6rem;
}

.mockup-card {
  aspect-ratio: 16/10;
  border: 3px dashed var(--shell-darker);
  border-radius: 12px;
  background: #f6f4ea;
  position: relative;
  overflow: hidden;
}

.mockup-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mockup-card .tag {
  position: absolute;
  top: 0.7rem;
  left: 0.7rem;
  font-family: 'Press Start 2P', monospace;
  font-size: 0.6rem;
  color: #fff;
  background: rgba(15, 56, 20, 0.75);
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  letter-spacing: 0.02em;
}

@media (max-width:640px) {
  .mockup-grid {
    grid-template-columns: 1fr;
  }
}

.mockups-repo {
  text-align: center;
  margin-top: 2.4rem;
}

.mockups-repo a {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.5rem;
  color: var(--shell-darker);
  text-decoration: none;
  border-bottom: 1px dashed var(--shell-darker);
  padding-bottom: 3px;
  letter-spacing: 0.04em;
}

.side-note {
  width: 260px;
  flex: 0 0 auto;
  color: #8f9484;
  font-family: 'VT323', monospace;
  font-size: 1.4rem;
  line-height: 1.5;
}

.side-note .welcome {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.85rem;
  color: #c7cab8;
  line-height: 1.8;
  margin-bottom: 1.2rem;
}

.side-note .howto-title {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.68rem;
  color: #6e7362;
  letter-spacing: 0.06em;
  margin-bottom: 1rem;
}

.side-note ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.side-note li {
  display: flex;
  gap: 0.7rem;
  align-items: baseline;
}

.side-note .key {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.62rem;
  color: #c7cab8;
  flex: 0 0 auto;
  min-width: 2.8em;
}

@media (max-width:1080px) {
  .side-note {
    display: none;
  }
}

.device {
  width: clamp(460px, 90vw, 620px);
  max-height: 98vh;
  background: var(--shell);
  padding: 1.7rem 1.7rem 1.9rem;
  border-radius: 26px 26px 90px 26px;
  box-shadow: 0 24px 0 -8px var(--shell-darker), inset 0 0 0 4px var(--shell-dark), 0 50px 80px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
}

.top-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.1rem 0.5rem 0.8rem;
}

.brand {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.85rem;
  color: var(--maroon);
  letter-spacing: 0.04em;
}

.brand span {
  color: var(--shell-darker);
}

.model-tag {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.44rem;
  color: var(--shell-darker);
  text-align: right;
  line-height: 1.6;
}

.surround {
  background: #3a3a34;
  border-radius: 12px 12px 32px 12px;
  padding: 1rem 1rem 0.5rem;
}

.screen {
  background: var(--scr);
  border: 10px solid #171814;
  border-radius: 5px;
  position: relative;
  overflow: hidden;
  height: clamp(400px, 60vh, 600px);
}

.screen::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  background: repeating-linear-gradient(to bottom, rgba(15, 56, 20, 0.06) 0px, rgba(15, 56, 20, 0.06) 1px, transparent 1px, transparent 3px);
}

.pages-track {
  display: flex;
  height: 100%;
  transition: transform .35s ease;
  width: 500%;
}

.page {
  width: 20%;
  height: 100%;
  padding: 1.8rem 1.6rem;
  overflow-y: auto;
  scrollbar-width: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.page::-webkit-scrollbar {
  display: none;
}

.eyebrow {
  font-size: 0.8rem;
  font-family: 'Press Start 2P', monospace;
  color: var(--g2);
  letter-spacing: 0.06em;
  margin-bottom: 1.2rem;
}

.page h1 {
  font-size: clamp(1.4rem, 5.4vw, 1.9rem);
  color: var(--g3);
  margin-bottom: 1.2rem;
}

.page p {
  font-size: 1.38rem;
  color: var(--g2);
  line-height: 1.48;
  margin-bottom: 0.8rem;
}

.section-title {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.92rem;
  color: var(--g3);
  margin-bottom: 1.3rem;
}

.cart-list {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.cart-row {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 0.8rem;
  border: 2px solid var(--g1);
  padding: 0.7rem 0.85rem;
  align-items: start;
}

.cart-num {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.76rem;
  color: var(--g3);
}

.cart-row h3 {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.7rem;
  color: var(--g3);
  margin-bottom: 0.35rem;
}

.cart-row p {
  color: var(--g2);
  font-size: 1.12rem;
  margin: 0;
  line-height: 1.32;
}

.party {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
}

.unit {
  border: 2px solid var(--g1);
  padding: 0.8rem;
  text-align: center;
}

.unit .hp {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.58rem;
  color: var(--g2);
  margin-bottom: 0.35rem;
}

.unit h3 {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.62rem;
  color: var(--g3);
  margin-bottom: 0.35rem;
}

.unit .role {
  font-size: 1.02rem;
  color: var(--g2);
  margin-bottom: 0.35rem;
}

.unit a {
  font-size: 0.86rem;
  color: var(--g2);
  text-decoration: underline;
  word-break: break-all;
}

.try-box {
  border: 2px solid var(--g1);
  padding: 1.4rem 1.2rem;
  text-align: center;
}

.try-box p {
  margin-bottom: 1.4rem;
}

.try-btn {
  display: inline-block;
  font-family: 'Press Start 2P', monospace;
  font-size: 0.62rem;
  color: var(--scr);
  background: var(--maroon);
  text-decoration: none;
  padding: 0.85rem 1.1rem;
  border-radius: 4px;
  box-shadow: 0 4px 0 #4a1a24;
  letter-spacing: 0.03em;
}

.try-btn:active {
  box-shadow: 0 1px 0 #4a1a24;
  transform: translateY(3px);
}

.dots {
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 9px;
  z-index: 4;
}

.dots button {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(15, 56, 20, 0.35);
  border: none;
  padding: 0;
  cursor: pointer;
}

.dots button.active {
  background: var(--g3);
}

.caption-row {
  display: flex;
  justify-content: space-between;
  padding: 0.6rem 0.4rem 0.1rem;
  font-family: 'Press Start 2P', monospace;
  font-size: 0.38rem;
  color: #8a8a7e;
  letter-spacing: 0.03em;
}

/* --- controls below screen --- */
.controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 0.7rem 0 0.5rem;
  flex: 1;
}

.dpad {
  display: grid;
  grid-template-columns: repeat(3, 30px);
  grid-template-rows: repeat(3, 30px);
}

.dpad button {
  background: #26261f;
  border: none;
  padding: 0;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.dpad button:active {
  background: #181812;
}

.dpad .up {
  grid-column: 2;
  grid-row: 1;
  border-radius: 4px 4px 0 0;
}

.dpad .left {
  grid-column: 1;
  grid-row: 2;
  border-radius: 4px 0 0 4px;
}

.dpad .mid {
  grid-column: 2;
  grid-row: 2;
  background: #1a1a15;
}

.dpad .right {
  grid-column: 3;
  grid-row: 2;
  border-radius: 0 4px 4px 0;
}

.dpad .down {
  grid-column: 2;
  grid-row: 3;
  border-radius: 0 0 4px 4px;
}

.ab-cluster {
  position: relative;
  width: 118px;
  height: 86px;
}

.ab-btn {
  position: absolute;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--maroon);
  color: var(--scr);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Press Start 2P', monospace;
  font-size: 0.76rem;
  border: none;
  cursor: pointer;
  box-shadow: 0 5px 0 #4a1a24;
}

.ab-btn:active {
  box-shadow: 0 1px 0 #4a1a24;
  transform: translateY(4px);
}

.btn-b {
  left: 0;
  bottom: 0;
}

.btn-a {
  right: 0;
  top: 0;
}

.ss-row {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin: 1.4rem 0 0.4rem;
  transform: rotate(-18deg);
}

.ss-item {
  text-align: center;
}

.ss-pill {
  width: 50px;
  height: 16px;
  border-radius: 9px;
  background: var(--shell-darker);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
  text-decoration: none;
  display: block;
  border: none;
  cursor: default;
}

.ss-label {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.36rem;
  color: var(--shell-darker);
  margin-top: 0.4rem;
  letter-spacing: 0.03em;
}

.bottom-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 0.4rem 0.6rem 0;
}

.speaker-dots {
  display: grid;
  grid-template-columns: repeat(4, 7px);
  grid-template-rows: repeat(4, 7px);
  gap: 4px;
  transform: rotate(-24deg);
}

.speaker-dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--shell-darker);
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.4);
}

.repo-strip a {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.65rem;
  color: var(--shell-darker);
  text-decoration: none;
  border-bottom: 1px dashed var(--shell-darker);
  padding-bottom: 2px;
}

@media (max-height:760px) {
  .screen {
    height: clamp(340px, 50vh, 480px);
  }

  .device {
    padding: 1.3rem 1.4rem 1.5rem;
  }
}