/* Paper War — notebook-doodle look, shared by index.html and privacy.html */

@font-face {
  font-family: "Kalam";
  src: local("Kalam Regular"), local("Kalam-Regular"), url("fonts/Kalam-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Kalam";
  src: local("Kalam Bold"), local("Kalam-Bold"), url("fonts/Kalam-Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --paper: #F6F4EE;
  --paper-right: #F8F6F1;
  --card: #FFFDF8;
  --table: #E2DED5;
  --red: #B8312F;
  --blue: #1F3F9A;
  --pencil: #2A2927;
  --pencil-2: #4A4740;
  --crease: rgba(70, 58, 40, .45);
  --wobble: 255px 18px 225px 16px / 16px 225px 18px 255px;
  --wobble-2: 18px 225px 16px 255px / 255px 16px 225px 18px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--pencil);
  font-family: "Kalam", "Noteworthy", "Bradley Hand", "Segoe Print", cursive;
  font-size: 19px;
  line-height: 1.5;
  overflow-x: hidden;
}

/* Fine paper grain over everything (same recipe as the app's grain filter). */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  opacity: .75;
  transform: translateZ(0);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='192' height='192'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .3 0 0 0 0 .26 0 0 0 0 .2 .24 0 0 0 -.07'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: var(--blue); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--red); }
:focus-visible { outline: 3px dashed var(--blue); outline-offset: 4px; border-radius: 6px; }

h1, h2, h3 { font-weight: 700; line-height: 1.1; margin: 0; }
p { margin: 0; }

.wrap { width: min(1080px, 100% - 32px); margin-inline: auto; }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Buttons: graphite outline + flat offset shadow ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 22px 8px;
  border: 2.5px solid var(--pencil);
  border-radius: 999px;
  background: var(--card);
  color: var(--pencil);
  font-family: inherit;
  font-weight: 700;
  font-size: 19px;
  line-height: 1.2;
  text-decoration: none;
  box-shadow: 2px 3px 0 var(--pencil);
  transition: transform .08s ease, box-shadow .08s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { color: var(--pencil); transform: translate(-1px, -1px); box-shadow: 3px 4px 0 var(--pencil); }
.btn:active { transform: translate(2px, 3px); box-shadow: 0 0 0 var(--pencil); }
.btn svg { flex: none; }

/* Official "Download on the App Store" badge, shown as-is */
.store-badge { display: inline-block; line-height: 0; border-radius: 8px; transition: transform .12s ease; -webkit-tap-highlight-color: transparent; }
.store-badge img { display: block; width: 162px; height: auto; }
.store-badge:hover { transform: translateY(-2px); }
.store-badge:active { transform: translateY(1px); }

.btn-sm { padding: 6px 16px 4px; font-size: 16px; }

/* ---------- Header ---------- */
.top {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-block: 18px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--pencil); text-decoration: none; font-weight: 700; font-size: 22px;
}
.brand img {
  width: 38px; height: 38px; border-radius: 10px;
  border: 2px solid var(--pencil); box-shadow: 2px 2px 0 var(--pencil);
}
.brand:hover { color: var(--pencil); }
.nav { display: flex; align-items: center; gap: 22px; font-size: 17px; }
.nav a:not(.btn) { color: var(--pencil-2); text-decoration: none; }
.nav a:not(.btn):hover { color: var(--red); text-decoration: underline wavy; }
@media (max-width: 720px) { .nav a:not(.btn) { display: none; } }

/* ---------- Top menu (index) ---------- */
.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  border-bottom: 2.5px dashed transparent;
  transition: background-color .25s ease, border-color .25s ease;
}
.site-nav.scrolled, .site-nav.open {
  background: rgba(246, 244, 238, .96);
  border-bottom-color: var(--crease);
}
.nav-inner {
  width: min(1080px, 100% - 32px); margin-inline: auto;
  height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.nav-brand { display: block; line-height: 0; }
/* The icon sits like a sticker on the page: graphite outline, offset shadow, a slight tilt */
.nav-brand img {
  width: 52px; height: 52px; border-radius: 14px;
  border: 2.5px solid var(--pencil); box-shadow: 2px 3px 0 var(--pencil);
  rotate: -4deg; transition: rotate .2s ease, transform .12s ease, box-shadow .12s ease;
}
.nav-brand:hover img { rotate: 0deg; transform: translate(-1px, -1px); box-shadow: 3px 4px 0 var(--pencil); }
.nav-brand:active img { transform: translate(2px, 3px); box-shadow: none; }
@media (max-width: 760px) { .nav-brand img { width: 46px; height: 46px; border-radius: 12px; } }
.nav-links { display: flex; align-items: center; gap: 24px; font-size: 18px; }
.nav-links a:not(.btn) { color: var(--pencil); text-decoration: none; padding: 4px 2px; }
.nav-links a:not(.btn):hover { color: var(--red); text-decoration: underline wavy; text-decoration-thickness: 1.5px; text-underline-offset: 5px; }
.nav-toggle {
  display: none;
  width: 46px; height: 46px; place-items: center; padding: 0;
  color: var(--pencil); background: var(--card);
  border: 2.5px solid var(--pencil); border-radius: 50%;
  box-shadow: 2px 3px 0 var(--pencil); cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.nav-toggle:active { transform: translate(2px, 3px); box-shadow: none; }
main > section[id] { scroll-margin-top: 76px; }

@media (max-width: 760px) {
  .nav-toggle { display: grid; margin-left: auto; }
  .nav-links {
    position: absolute; top: 72px; right: 16px;
    flex-direction: column; align-items: stretch; gap: 2px;
    min-width: 210px; padding: 12px;
    background: var(--card); border: 2.5px solid var(--pencil);
    border-radius: 18px 24px 16px 22px / 22px 16px 24px 18px;
    box-shadow: 3px 4px 0 var(--pencil);
    opacity: 0; transform: translateY(-8px) scale(.98); transform-origin: top right;
    visibility: hidden; transition: opacity .18s ease, transform .18s ease, visibility 0s .18s;
  }
  .site-nav.open .nav-links { opacity: 1; transform: none; visibility: visible; transition: opacity .18s ease, transform .18s ease; }
  .nav-links a:not(.btn) { padding: 10px 12px; font-size: 20px; border-radius: 10px; }
  .nav-links .btn { margin-top: 8px; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .site-nav, .nav-links, .nav-brand img { transition: none !important; }
}

/* ---------- Headings with an ink scribble underline ---------- */
.title-scribble { position: relative; display: inline-block; }
.title-scribble::after {
  content: "";
  position: absolute;
  left: -2%; right: -2%; bottom: -.18em;
  height: .32em;
  background: no-repeat center / 100% 100% url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 16' preserveAspectRatio='none'%3E%3Cpath d='M4 10 C42 4 80 13 120 7 S196 4 236 9 M30 13 C80 9 150 12 210 10' fill='none' stroke='%23B8312F' stroke-width='3.2' stroke-linecap='round'/%3E%3C/svg%3E");
}
.title-scribble.scribble-blue::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 16' preserveAspectRatio='none'%3E%3Cpath d='M4 10 C42 4 80 13 120 7 S196 4 236 9 M30 13 C80 9 150 12 210 10' fill='none' stroke='%231F3F9A' stroke-width='3.2' stroke-linecap='round'/%3E%3C/svg%3E");
}

section { position: relative; padding-block: clamp(56px, 9vw, 104px); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto clamp(32px, 5vw, 52px); }
.section-head h2 { font-size: clamp(34px, 5vw, 48px); }
.section-head p { margin-top: 20px; color: var(--pencil-2); font-family: inherit; font-weight: 400; }
.kicker {
  display: block; margin-bottom: 10px;
  font-size: 16px; color: var(--pencil-2); letter-spacing: .04em;
}

/* Dashed fold crease between sections */
.crease-rule {
  height: 0; border: 0;
  border-top: 2.5px dashed var(--crease);
  width: min(1080px, 100% - 32px);
  margin: 0 auto;
}

/* ---------- Doodles ---------- */
.symbols { position: absolute; width: 0; height: 0; overflow: hidden; }
.doodle { display: block; overflow: visible; }
.red { color: var(--red); }
.blue { color: var(--blue); }
.graphite { color: var(--pencil); }

/* ---------- Hero: the whole first screen is the game world ---------- */
.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 560px;
  padding: 0;
  overflow: hidden;
  background: linear-gradient(90deg, var(--paper) 50%, var(--paper-right) 50%);
}
.battle { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
.battle-ground { transform: translateZ(0); }
/* Paper-colored fade under the title (cheaper than an SVG mask); height set by battle.js */
.hero-fade {
  position: absolute; left: 0; right: 0; top: 0; height: 45%;
  pointer-events: none;
  --solid: 70%;
  background:
    linear-gradient(to bottom, var(--paper) var(--solid), rgba(246, 244, 238, 0)) left top / 50.01% 100% no-repeat,
    linear-gradient(to bottom, var(--paper-right) var(--solid), rgba(248, 246, 241, 0)) right top / 50% 100% no-repeat;
}
.hero-copy {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: clamp(88px, 12vh, 120px) 16px 0;   /* clears the fixed top menu */
}
.hero h1 { position: relative; font-size: clamp(60px, 10.5vw, 132px); letter-spacing: -.01em; white-space: nowrap; }
.hero .pitch { margin-top: clamp(16px, 2.6vh, 26px); font-size: clamp(19px, 2vw, 24px); max-width: 40ch; }
.hero .cta { margin-top: clamp(16px, 2.6vh, 26px); }

/* Title writes itself on, then the underline is scribbled and an ink blot lands */
.intro-title .title-scribble {
  clip-path: inset(-30% 104% -60% -6%);
  animation: write-on 1.1s .15s cubic-bezier(.55, .1, .35, 1) forwards;
}
.intro-title .title-scribble::after {
  transform-origin: left center;
  transform: scaleX(0);
  animation: scribble-in .45s 1.15s ease-out forwards;
}
.title-blot {
  position: absolute; width: .36em; height: .36em; right: -.32em; top: .02em;
  opacity: 0; transform: scale(.2);
  animation: blot-in .35s 1.5s cubic-bezier(.3, 1.8, .5, 1) forwards;
}
@keyframes write-on { to { clip-path: inset(-30% -6% -60% -6%); } }
@keyframes scribble-in { to { transform: scaleX(1); } }
@keyframes blot-in { to { opacity: .9; transform: scale(1); } }
.rise { opacity: 0; transform: translateY(14px); animation: rise .6s ease-out forwards; animation-delay: var(--d, 0s); }
@keyframes rise { to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .intro-title .title-scribble, .intro-title .title-scribble::after, .title-blot, .rise {
    animation: none; clip-path: none; transform: none; opacity: 1;
  }
  .title-blot { opacity: .9; }
}

/* ---------- Notebook pages inside the device ---------- */
.page {
  position: relative;
  background: var(--paper);
}
.page.left { border-radius: 9% 0 0 13% / 13% 0 0 13%; }
.page.right { background: var(--paper-right); border-radius: 0 9% 13% 0 / 0 13% 13% 0; }
.page .doodle, .page .mark {
  position: absolute;
  width: 29%;
  aspect-ratio: 1;
  translate: -50% -50%;
  rotate: var(--tilt, 0deg);
}
.page .mark { width: 13%; }
.page .mark.big { width: 16%; }
.page .doodle.crossed { opacity: .72; }
.page .cross { position: absolute; width: 29%; aspect-ratio: 1; translate: -50% -50%; rotate: var(--tilt, 0deg); }
.page-label {
  position: absolute; left: 0; right: 0; bottom: 5%;
  text-align: center; font-size: clamp(11px, 1.4vw, 15px); color: var(--pencil-2);
}
.score-chip {
  position: absolute; top: 5%; left: 50%; translate: -50% 0; z-index: 4;
  padding: 1px 12px 0;
  background: var(--card); border: 2px solid var(--pencil); border-radius: 999px;
  box-shadow: 2px 2px 0 var(--pencil);
  font-weight: 700; font-size: clamp(12px, 1.6vw, 17px); white-space: nowrap;
}

/* Loose ink blots in the margins */
.blot { position: absolute; pointer-events: none; opacity: .9; }

/* ---------- How to play ---------- */
.steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px;
  counter-reset: step;
}
@media (max-width: 960px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

.card {
  background: var(--card);
  border: 2.5px solid var(--pencil);
  border-radius: var(--wobble);
  box-shadow: 2px 3px 0 var(--pencil);
  padding: 22px 22px 24px;
}
.card:nth-child(even) { border-radius: var(--wobble-2); }
.step { counter-increment: step; }
.step .num {
  display: grid; place-items: center;
  width: 46px; height: 46px; margin-bottom: 14px;
  border: 2.5px solid var(--pencil);
  border-radius: 52% 48% 55% 45% / 48% 55% 45% 52%;
  font-weight: 700; font-size: 24px; line-height: 1; padding-top: 4px;
}
.step .num::before { content: counter(step); }
.step h3 { font-size: 24px; margin-bottom: 8px; }
.step p { color: var(--pencil-2); font-size: 17px; }
.step .ink-red { color: var(--red); font-weight: 700; }
.step .ink-blue { color: var(--blue); font-weight: 700; }

/* ---------- Fold mechanic ---------- */
.fold-grid {
  display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 64px); align-items: center;
}
@media (max-width: 860px) { .fold-grid { grid-template-columns: 1fr; } }
.fold-copy h2 { font-size: clamp(34px, 5vw, 48px); margin-bottom: 26px; }
.fold-copy p + p { margin-top: 14px; }
.fold-copy p { color: var(--pencil-2); }
.fold-copy strong { color: var(--pencil); }

/* The iPhone Duo, open (951 × 669), lying on the desk and tilted back a little.
   The whole left half (frame + screen) swings shut on the hinge onto the right half. */
.duo3d { perspective: 2600px; perspective-origin: 50% 30%; padding: 4% 2% 2%; }
.duo-body {
  position: relative;
  aspect-ratio: 951 / 669;
  transform-style: preserve-3d;
  transform: rotateX(16deg);
  animation: press-shut 7s ease-in-out infinite;
  will-change: transform;
}
.duo-half {
  position: absolute; top: 0; bottom: 0; width: 50%;
  transform-style: preserve-3d;
}
.duo-half.right {
  right: 0;
  background: var(--card);
  border: 3px solid var(--pencil);
  border-left-width: 1.5px;
  border-radius: 0 13% 13% 0 / 0 9% 9% 0;
  box-shadow: 4px 5px 0 var(--pencil);
}
.duo-half.left { left: 0; z-index: 2; }
.duo-screen {
  position: absolute; inset: 5% 5% 5% 3%;
  border: 2px solid var(--pencil);
  border-radius: 0 9% 9% 0 / 0 6% 6% 0;
}
.duo-screen.left { inset: 5% 3% 5% 5%; border-radius: 9% 0 0 9% / 6% 0 0 6%; }
.fold-shade {
  position: absolute; inset: 0; border-radius: inherit;
  background: var(--pencil); opacity: 0; pointer-events: none;
  animation: shade 7s ease-in-out infinite;
}
.duo-hinge {
  position: absolute; left: 50%; top: -2.5%; bottom: -2.5%;
  width: 2.6%; translate: -50% 0;
  background: var(--table);
  border: 3px solid var(--pencil); border-radius: 99px;
  transform: translateZ(-2px);
}
.leaf { transform-origin: 100% 50%; animation: fold 7s ease-in-out infinite; will-change: transform; }
.leaf-face.front { animation: face-front 7s linear infinite; }
.leaf-face.back { animation: face-back 7s linear infinite; }
.leaf-face * { -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.leaf-face {
  position: absolute; inset: 0;
  background: var(--card);
  border: 3px solid var(--pencil);
  border-right-width: 1.5px;
  border-radius: 13% 0 0 13% / 9% 0 0 9%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
/* The phone's back: the small outer screen, which is what you see when it's shut */
.leaf-face.back {
  transform: rotateY(180deg);
  background: #EAE6DD;
  border-right-width: 3px; border-left-width: 1.5px;
  border-radius: 0 13% 13% 0 / 0 9% 9% 0;
}
.outer-screen {
  position: absolute; inset: 4.5% 6% 4.5% 4%;
  background: var(--paper);
  border: 2px solid var(--pencil);
  border-radius: 0 10% 10% 0 / 0 7% 7% 0;
  overflow: hidden;
}
.outer-ink { position: absolute; left: 50%; top: 42%; width: 34%; translate: -50% -50%; animation: outer-press 7s ease-in-out infinite; }
.outer-ground { position: absolute; left: 10%; right: 10%; bottom: 22%; border-top: 2.5px solid var(--pencil); border-radius: 2px; opacity: .8; }

.fold-demo .aim   { animation: aim 7s ease-in-out infinite; }
.fold-demo .press { animation: press 7s ease-in-out infinite; }
.fold-demo .hit   { animation: hit 7s ease-out infinite; }
.fold-demo .cross { animation: cross 7s ease-out infinite; }
.fold-demo .target { animation: target 7s ease-out infinite; }

/* The folding half sits a few px above the other one, so when it's shut it never
   shares a plane with the half underneath (that caused the flicker and see-through). */
@keyframes fold {
  0%, 24%   { transform: translateZ(4px) rotateY(0deg); }
  40%, 52%  { transform: translateZ(4px) rotateY(180deg); }
  68%, 100% { transform: translateZ(4px) rotateY(0deg); }
}
/* Swap front/back exactly when the half passes 90° (32% shutting, 60% opening),
   instead of trusting backface-visibility, which Safari ignores for animated children. */
@keyframes face-front {
  0%, 31.9%  { visibility: visible; }
  32%, 59.9% { visibility: hidden; }
  60%, 100%  { visibility: visible; }
}
@keyframes face-back {
  0%, 31.9%  { visibility: hidden; }
  32%, 59.9% { visibility: visible; }
  60%, 100%  { visibility: hidden; }
}
@keyframes shade {
  0%, 24%   { opacity: 0; }
  33%       { opacity: .2; }
  40%, 52%  { opacity: .28; }
  60%       { opacity: .14; }
  68%, 100% { opacity: 0; }
}
@keyframes press-shut {               /* a firm press while it's shut */
  0%, 41%, 51%, 100% { transform: rotateX(16deg) scale(1); }
  45%                { transform: rotateX(16deg) scale(.965); }
}
@keyframes outer-press {
  0%, 40%   { transform: scale(1); }
  45%       { transform: scale(.8); }
  50%, 100% { transform: scale(1); }
}
@keyframes aim {
  0%        { opacity: 0; transform: scale(.4); }
  8%, 30%   { opacity: 1; transform: scale(1); }
  36%, 100% { opacity: 0; transform: scale(1); }
}
@keyframes press {
  0%, 30%   { opacity: 0; }
  34%, 92%  { opacity: 1; }
  100%      { opacity: 0; }
}
@keyframes hit {
  0%, 44%   { opacity: 0; transform: scale(.3); }
  50%       { opacity: 1; transform: scale(1.25); }
  56%, 92%  { opacity: 1; transform: scale(1); }
  100%      { opacity: 0; transform: scale(1); }
}
@keyframes cross {
  0%, 70%   { opacity: 0; clip-path: inset(0 100% 0 0); }
  80%, 92%  { opacity: 1; clip-path: inset(0 0 0 0); }
  100%      { opacity: 0; clip-path: inset(0 0 0 0); }
}
@keyframes target {
  0%, 72%   { opacity: 1; }
  80%, 94%  { opacity: .72; }
  100%      { opacity: 1; }
}

.beats {
  list-style: none; margin: 22px 0 0; padding: 0;
  display: flex; justify-content: center; gap: clamp(10px, 3vw, 28px); flex-wrap: wrap;
}
.beats li {
  padding: 3px 14px 1px; border-radius: 999px;
  border: 2px solid transparent; font-size: 17px; color: var(--pencil-2);
}
.beats li:nth-child(1) { animation: beat1 7s infinite; }
.beats li:nth-child(2) { animation: beat2 7s infinite; }
.beats li:nth-child(3) { animation: beat3 7s infinite; }
@keyframes beat1 { 0%, 26% { border-color: var(--pencil); color: var(--pencil); background: var(--card); } 30%, 100% { border-color: transparent; color: var(--pencil-2); background: transparent; } }
@keyframes beat2 { 0%, 26% { border-color: transparent; color: var(--pencil-2); background: transparent; } 28%, 50% { border-color: var(--pencil); color: var(--pencil); background: var(--card); } 54%, 100% { border-color: transparent; color: var(--pencil-2); background: transparent; } }
@keyframes beat3 { 0%, 50% { border-color: transparent; color: var(--pencil-2); background: transparent; } 54%, 94% { border-color: var(--red); color: var(--red); background: var(--card); } 98%, 100% { border-color: transparent; color: var(--pencil-2); background: transparent; } }

@media (prefers-reduced-motion: reduce) {
  .leaf, .leaf-face, .duo-body, .fold-shade, .outer-ink, .fold-demo .aim, .fold-demo .hit, .fold-demo .cross, .fold-demo .target,
  .fold-demo .press, .beats li { animation: none; }
  .fold-demo .aim { opacity: 0; }
  .leaf-face.back { visibility: hidden; }
  .beats li:nth-child(3) { border-color: var(--red); color: var(--red); background: var(--card); }
}

/* ---------- Troops ---------- */
.troops {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px;
}
@media (max-width: 900px) { .troops { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .troops { gap: 14px; } .troop { padding: 16px 14px 18px; } }
.troop { text-align: center; }
.troop .doodle { width: min(130px, 80%); aspect-ratio: 1; margin: 0 auto 6px; rotate: var(--tilt, 0deg); transition: rotate .2s ease; }
.troop:hover .doodle { rotate: calc(var(--tilt, 0deg) * -1); }
.troop h3 { font-size: 26px; }
.troop .count {
  display: inline-block; margin: 6px 0 10px; padding: 0 10px;
  border: 2px solid currentColor; border-radius: 999px; font-size: 15px; font-weight: 700;
}
.troop p { color: var(--pencil-2); font-size: 16px; }
.troop p + p { margin-top: 6px; }
.troop .win { font-size: 15px; }
.troops-note { margin-top: 30px; text-align: center; color: var(--pencil-2); font-size: 17px; }

/* ---------- Features ---------- */
.features {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px;
}
@media (max-width: 720px) { .features { grid-template-columns: 1fr; } }
.feature { display: grid; grid-template-columns: 78px minmax(0, 1fr); gap: 18px; align-items: start; }
.feature svg { width: 78px; height: 78px; }
.feature h3 { font-size: 24px; margin: 4px 0 6px; }
.feature p { color: var(--pencil-2); font-size: 17px; }

/* ---------- Closing CTA ---------- */
.closing { text-align: center; }
.closing h2 { font-size: clamp(36px, 6vw, 60px); }
.closing p { margin: 18px auto 30px; color: var(--pencil-2); max-width: 34ch; }
.closing .icon-big {
  width: 112px; height: 112px; margin: 0 auto 26px; display: block;
  border-radius: 26px; border: 3px solid var(--pencil); box-shadow: 3px 4px 0 var(--pencil);
  rotate: -4deg;
}

/* ---------- Footer ---------- */
footer {
  padding-block: 28px 40px;
  border-top: 2.5px dashed var(--crease);
  font-size: 16px; color: var(--pencil-2);
}
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px 28px; align-items: center; }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
footer a { color: var(--pencil-2); }
footer .fine { width: 100%; font-size: 14px; }

/* ---------- Privacy page ---------- */
.doc { max-width: 720px; padding-block: 24px 80px; }
.doc h1 { font-size: clamp(42px, 7vw, 64px); margin: 18px 0 14px; }
.doc .updated { color: var(--pencil-2); font-size: 16px; margin-bottom: 30px; }
.doc .card { padding: 26px 28px 28px; }
.doc h2 { font-size: 26px; margin: 30px 0 8px; }
.doc .card h2:first-child { margin-top: 0; }
.doc p, .doc li { color: var(--pencil-2); }
.doc ul { padding-left: 1.1em; margin: 8px 0 0; }
.doc li + li { margin-top: 6px; }
.doc .lead { font-size: 23px; color: var(--pencil); margin-bottom: 26px; }

/* ---------- Match note under the steps ---------- */
.match-note {
  margin: 28px auto 0; max-width: 680px; text-align: center;
  color: var(--pencil-2); font-size: 17px;
}
.match-dots { display: inline-flex; gap: 6px; vertical-align: middle; margin-right: 8px; }
.match-dots i {
  width: 13px; height: 13px; border-radius: 50%;
  border: 2px solid var(--pencil); background: transparent;
}
.match-dots i.on { background: var(--red); }

/* ---------- Tiles: modes and items ---------- */
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
@media (max-width: 860px) { .tiles { grid-template-columns: 1fr; max-width: 520px; margin-inline: auto; } }
.tile { text-align: center; padding: 22px 22px 26px; }
.tile-art { display: block; width: min(200px, 80%); height: auto; margin: 0 auto 12px; overflow: visible; }
.tile h3 { font-size: 25px; margin-bottom: 8px; }
.tile p { color: var(--pencil-2); font-size: 17px; }

/* ---------- Progress (vs Device) ---------- */
.progress-grid {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 64px); align-items: center;
}
@media (max-width: 860px) { .progress-grid { grid-template-columns: 1fr; } }
.progress-copy h2 { font-size: clamp(34px, 5vw, 48px); margin-bottom: 24px; }
.progress-copy p { color: var(--pencil-2); }
.progress-copy strong { color: var(--pencil); }
.ink-list { list-style: none; margin: 10px 0 16px; padding: 0; color: var(--pencil); }
.ink-list li { position: relative; padding-left: 30px; margin: 4px 0; }
.ink-list li::before {
  content: ""; position: absolute; left: 4px; top: .45em; width: 14px; height: 14px;
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-22 -22 44 44'%3E%3Cpath d='M0 -20 Q6.4 -6.4 20 0 Q6.4 6.4 0 20 Q-6.4 6.4 -20 0 Q-6.4 -6.4 0 -20 Z' fill='%23F4C64E' stroke='%232A2927' stroke-width='3'/%3E%3C/svg%3E");
}
.round-card {
  max-width: 340px; margin-inline: auto; padding: 22px 26px 24px; text-align: center;
  rotate: 2deg;
}
.round-title { display: block; font-weight: 700; font-size: 26px; }
.round-stars { display: flex; justify-content: center; align-items: center; gap: 8px; margin: 8px 0 14px; }
.round-stars .star { width: 50px; height: 50px; overflow: visible; rotate: var(--tilt, 0deg); }
.round-stars .star.big { width: 64px; height: 64px; margin-top: -10px; }
.star.yellow { color: #F4C64E; }
.star.empty { color: var(--card); opacity: .7; }
.xp-lines { margin: 0; text-align: left; font-size: 17px; }
.xp-lines div { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; border-bottom: 1.5px dashed rgba(42, 41, 39, .22); }
.xp-lines dt { color: var(--pencil-2); }
.xp-lines dd { margin: 0; }
.xp-total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 10px; }
.xp-total span { font-weight: 700; font-size: 18px; }
.xp-total b { font-size: 30px; color: var(--blue); }
.xp-bar {
  display: block; height: 12px; margin-top: 8px; border: 2px solid var(--pencil); border-radius: 99px; overflow: hidden;
}
.xp-bar i {
  display: block; height: 100%; width: 62%;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='12'%3E%3Cpath d='M-1 13 L7 -1' stroke='%232A2927' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") repeat-x left center / 6px 100%;
  opacity: .6;
}

/* Fold demo outer screen: the enemy page, your ink hovering over its spot */
.outer-screen.page .doodle { width: 44%; }
.outer-screen .outer-ink { left: 58%; top: 38%; width: 30%; animation: outer-hover 7s ease-in-out infinite; }
@keyframes outer-hover {
  0%, 34%   { transform: translateY(-6%) scale(1); }
  38%       { transform: translateY(4%) scale(1); }
  42%       { transform: translateY(-4%) scale(1); }
  46%       { transform: translateY(3%) scale(.92); }
  50%, 100% { transform: translateY(-6%) scale(1); }
}
@media (prefers-reduced-motion: reduce) { .outer-screen .outer-ink { animation: none; } }

/* ---------- Download buttons before launch ---------- */
.store-badge.soon { position: relative; cursor: default; }
.store-badge.soon:hover, .store-badge.soon:active { transform: none; }
.store-badge.soon img { opacity: .45; filter: grayscale(1); }
.soon-tag {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%; rotate: -6deg;
  padding: 2px 12px 0; white-space: nowrap;
  background: var(--card); border: 2px solid var(--red); border-radius: 999px;
  color: var(--red); font-weight: 700; font-size: 16px; line-height: 1.5;
  box-shadow: 2px 2px 0 var(--red);
}
.btn.soon { cursor: default; color: var(--pencil-2); border-style: dashed; box-shadow: none; }
.btn.soon:hover, .btn.soon:active { transform: none; box-shadow: none; color: var(--pencil-2); }
footer a.soon { cursor: default; text-decoration: none; }

/* ---------- Privacy: at a glance ---------- */
.doc .glance { margin-bottom: 22px; rotate: -.4deg; }
.glance-list { margin: 6px 0 0; }
.glance-list div { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; border-bottom: 1.5px dashed rgba(42, 41, 39, .22); }
.glance-list div:last-child { border-bottom: 0; }
.glance-list dt { color: var(--pencil-2); }
.glance-list dd { margin: 0; font-weight: 700; color: var(--blue); }
.doc strong { color: var(--pencil); }

/* ---------- Support: contact card + FAQ ---------- */
.doc .contact-card { margin-bottom: 8px; border-color: var(--red); box-shadow: 2px 3px 0 var(--red); }
.doc .faq-head { margin: 38px 0 12px; font-size: 28px; }
.faq { display: grid; gap: 12px; }
.faq details {
  background: var(--card); border: 2.5px solid var(--pencil);
  border-radius: 14px 18px 12px 16px / 16px 12px 18px 14px;
  box-shadow: 2px 3px 0 var(--pencil);
}
.faq details:nth-child(even) { border-radius: 18px 12px 16px 14px / 12px 18px 14px 16px; }
.faq summary {
  list-style: none; cursor: pointer; position: relative;
  padding: 14px 52px 12px 20px; font-weight: 700; font-size: 19px; color: var(--pencil);
  -webkit-tap-highlight-color: transparent;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 18px; top: 50%; width: 20px; height: 20px; translate: 0 -50%;
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M3 10 C7 9.5 13 10.5 17 10 M10 3 C9.6 7 10.4 13 10 17' fill='none' stroke='%232A2927' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E");
  transition: rotate .2s ease;
}
.faq details[open] summary::after { rotate: 45deg; }
.faq details > :not(summary) { margin: 0 20px; }
.faq details > :last-child { padding-bottom: 16px; }
.faq details p + ul, .faq details ul { margin-top: 6px; }
@media (prefers-reduced-motion: reduce) { .faq summary::after { transition: none; } }

/* ---------- Made for iPhone Duo ---------- */
.duo-tag {
  display: inline-flex; align-items: center; gap: 9px;
  margin-bottom: 10px; padding: 4px 16px 2px 10px;
  background: var(--card); color: var(--pencil);
  border: 2.5px solid var(--pencil); border-radius: 999px;
  box-shadow: 2px 3px 0 var(--pencil);
  font-weight: 700; font-size: clamp(15px, 1.6vw, 18px);
  rotate: -2deg;
}
.duo-tag svg { flex: none; }
.duo-steps { list-style: none; margin: 16px 0; padding: 0; counter-reset: duo; }
.duo-steps li {
  counter-increment: duo; position: relative;
  padding: 0 0 12px 46px; color: var(--pencil-2);
}
.duo-steps li::before {
  content: counter(duo);
  position: absolute; left: 0; top: -2px;
  width: 32px; height: 32px; display: grid; place-items: center; padding-top: 3px;
  border: 2.5px solid var(--pencil); border-radius: 52% 48% 55% 45% / 48% 55% 45% 52%;
  font-weight: 700; color: var(--pencil); background: var(--card);
}
.duo-steps li:nth-child(odd)::before { border-color: var(--red); color: var(--red); }
.duo-steps li:nth-child(even)::before { border-color: var(--blue); color: var(--blue); }
.duo-footnote { font-size: 16px; padding-top: 10px; border-top: 2px dashed rgba(42, 41, 39, .2); }
