/* PaperBrawl site: notebook paper, tape and a red pen. No fonts or scripts from outside. */
:root {
  --paper: #f6f0df;
  --rule: #e2d9bd;
  --margin: #ecb9b2;
  --card: #fffdf6;
  --edge: #d8ceb2;
  --ink: #2b2a33;
  --muted: #5d584b;
  --red: #b8322b;
  --blue: #2a5699;
  --tape: #f1d56e;
  --tape-ink: #4a3d12;
  --sheet: #fffdf6;
  --shadow: 0 1px 0 rgba(0, 0, 0, .06), 0 6px 14px rgba(60, 45, 10, .12);
  --serif: Georgia, "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", SimSun, serif;
  --sans: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1e1c19;
    --rule: #2b2823;
    --margin: #5a2b27;
    --card: #28251f;
    --edge: #3d382d;
    --ink: #efe8d6;
    --muted: #bdb5a1;
    --red: #ff8f82;
    --blue: #9bbcf0;
    --tape: #9c7f2c;
    --tape-ink: #fff3cc;
    --shadow: 0 1px 0 rgba(0, 0, 0, .4), 0 6px 14px rgba(0, 0, 0, .35);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  color: var(--ink);
  background-color: var(--paper);
  background-image: repeating-linear-gradient(to bottom, transparent 0 31px, var(--rule) 31px 32px);
  font: 17px/1.65 var(--sans);
}

img { max-width: 100%; height: auto; }
a { color: var(--blue); text-underline-offset: 2px; }
a:hover { color: var(--red); }
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; border-radius: 3px; }

.skip { position: absolute; left: 8px; top: -60px; background: var(--card); color: var(--ink); padding: 8px 12px; z-index: 5; }
.skip:focus { top: 8px; }

/* header */
.top {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px;
  padding: 12px 16px; max-width: 62rem; margin: 0 auto;
}
.brand {
  display: inline-flex; align-items: center; gap: 8px; margin-right: auto;
  font: 700 1.35rem/1 var(--serif); color: var(--ink); text-decoration: none; letter-spacing: .01em;
}
.brand:hover { color: var(--red); }
.top nav { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.top nav a, .lang { color: var(--ink); text-decoration: none; padding: 6px 2px; border-bottom: 2px solid transparent; font-size: .95rem; }
.top nav a:hover, .lang:hover { border-bottom-color: var(--red); color: var(--ink); }
.top nav a[aria-current="page"] { border-bottom-color: var(--red); font-weight: 600; }
.lang { border: 1.5px solid var(--edge); border-radius: 999px; padding: 4px 14px; background: var(--card); }

/* page */
.page { max-width: 62rem; margin: 0 auto; padding: 8px 16px 48px; }
.page > section { margin: 0 0 20px; }
.page-privacy > section, .page-terms > section, .page-delete > section, .page-support > section, .page-404 > section {
  max-width: 44rem;
}
h1, h2 { font-family: var(--serif); line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(1.9rem, 5vw, 2.8rem); }
h2 { font-size: 1.45rem; }
h2::after {
  content: ""; display: block; width: 3.2rem; height: 4px; margin-top: 6px;
  background: var(--red); border-radius: 2px; transform: rotate(-1.5deg);
}
p { margin: 0 0 1em; }
.lead { font-size: 1.15rem; }
.meta { color: var(--muted); font-size: .9rem; }
.kicker {
  display: inline-block; margin: 0 0 12px; padding: 2px 12px; background: var(--tape); color: var(--tape-ink);
  font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: .8rem; transform: rotate(-2deg);
}

/* sections become sheets of paper */
.page > section:not(.hero) {
  background: var(--card);
  border: 1px solid var(--edge);
  box-shadow: var(--shadow);
  padding: 22px 22px 14px;
  border-radius: 3px 3px 12px 3px;
  position: relative;
}
.page > section:not(.hero)::before {
  content: ""; position: absolute; top: -9px; left: 24px; width: 70px; height: 20px;
  background: var(--tape); opacity: .85; transform: rotate(-3deg);
}
.page > section:nth-of-type(even):not(.hero)::before { left: auto; right: 24px; transform: rotate(2.5deg); }
.page-privacy > section:not(.hero), .page-terms > section:not(.hero), .page-delete > section:not(.hero), .page-support > section:not(.hero) { margin-left: 0; }

/* hero */
.hero {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 24px; align-items: center; padding: 20px 0 24px;
}
.hero h1 { margin-bottom: .4em; }
.platforms { list-style: none; padding: 0; margin: 20px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr)); gap: 10px; }
.platforms li {
  display: flex; flex-direction: column; gap: 4px; padding: 10px 14px; background: var(--card);
  border: 1.5px dashed var(--edge); border-radius: 6px;
}
.plat { font-weight: 700; }
.soon { align-self: flex-start; font-size: .78rem; font-weight: 700; color: var(--red); border: 1.5px solid var(--red); border-radius: 999px; padding: 0 10px; transform: rotate(-2deg); }

.sheet {
  margin: 0; padding: 14px; background: #fffdf6; border: 1px solid #d8ceb2; box-shadow: var(--shadow); position: relative;
}
.sheet::before {
  content: ""; position: absolute; top: -11px; left: 50%; width: 90px; height: 22px; margin-left: -45px;
  background: #f1d56e; opacity: .9; transform: rotate(2deg);
}
.sheet img { display: block; width: 100%; }
.tilt-r { transform: rotate(1.8deg); }
.tilt-l { transform: rotate(-1.8deg); }

.two { display: grid; grid-template-columns: 1.2fr 1fr; gap: 28px; align-items: center; }

/* lists */
.ticks { list-style: none; padding: 0; margin: 0 0 1em; }
.ticks li { position: relative; padding-left: 1.7em; margin-bottom: .55em; }
.ticks li::before {
  content: ""; position: absolute; left: .15em; top: .5em; width: .55em; height: .9em;
  border-right: 3px solid var(--red); border-bottom: 3px solid var(--red); transform: rotate(40deg) translate(-2px, -4px);
}
.page ul:not(.ticks):not(.pencilcase):not(.platforms) { padding-left: 1.3em; margin: 0 0 1em; }
.page ul:not(.ticks):not(.pencilcase):not(.platforms) li { margin-bottom: .5em; }

.pencilcase {
  list-style: none; padding: 12px; margin: 8px 0 12px; display: flex; flex-wrap: wrap; gap: 10px 14px; justify-content: center;
  background: #efe6cb; border: 1.5px dashed #cdbf98; border-radius: 10px;
}
.pencilcase li { margin: 0; }
.pencilcase img { display: block; height: 44px; width: auto; }

/* forms */
.paperform { display: grid; gap: 4px; max-width: 30rem; margin-top: 16px; padding: 16px; border: 1.5px dashed var(--edge); border-radius: 8px; }
.paperform label { font-weight: 600; margin-top: 8px; }
.paperform label.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.paperform input[type="checkbox"] { width: 1.3rem; height: 1.3rem; margin-top: .2rem; accent-color: var(--red); }
.paperform input[type="text"] {
  width: 100%; padding: 10px 12px; font: inherit; color: var(--ink); background: var(--paper);
  border: 2px solid var(--edge); border-radius: 6px;
}
.paperform input[type="text"]:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 3px var(--rule); }
.paperform small { color: var(--muted); font-weight: 400; }
button {
  margin-top: 12px; padding: 12px 20px; font: 700 1rem var(--sans); color: #fff; background: var(--red);
  border: 0; border-radius: 6px; cursor: pointer; box-shadow: 0 3px 0 rgba(0, 0, 0, .25);
}
@media (prefers-color-scheme: dark) { button { color: #2b1210; } }
button:hover { filter: brightness(1.06); }
button:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(0, 0, 0, .25); }

/* footer */
.foot { max-width: 62rem; margin: 0 auto; padding: 18px 16px 40px; color: var(--muted); font-size: .9rem; border-top: 2px dashed var(--edge); }
.foot p { margin: 0 0 .3em; }

/* notebook margin line on wide screens */
@media (min-width: 1000px) {
  body { background-image: linear-gradient(to right, transparent calc(50% - 33rem), var(--margin) calc(50% - 33rem) calc(50% - 33rem + 2px), transparent calc(50% - 33rem + 2px)), repeating-linear-gradient(to bottom, transparent 0 31px, var(--rule) 31px 32px); }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .hero, .two { grid-template-columns: 1fr; }
  .page > section:not(.hero) { padding: 20px 16px 10px; }
  .sheet { transform: none; }
  .top nav { order: 3; width: 100%; }
}

@media (prefers-reduced-motion: no-preference) {
  .sheet, button { transition: transform .15s ease; }
  .tilt-r:hover, .tilt-l:hover { transform: rotate(0); }
}
