/*
 * The game's website as a 2000s RPG site, all pixel art (owner, 15 November): a fixed-width page
 * on the island seen from far above, the forest's edges nearer (parallax), framed by a broken
 * castle wall; the menu of wood blocks on the left, the pages on parchment. Every picture is
 * cut from the credited packs (assets/art, tools/art/site_art.py); nothing is drawn here but
 * plain lines and fills. Square corners only.
 */

@font-face {
  font-family: 'Press Start 2P';
  src: url('assets/font/press-start-2p-latin-400-normal.woff2') format('woff2');
  font-display: swap;
}

:root {
  --pixel: 'Press Start 2P', ui-monospace, monospace;
  --text: Georgia, 'Times New Roman', serif;
  /* The parchment's ink, the wall's mortar, the night behind. */
  --ink: #3b2614;
  --ink-2: #6a4a2c;
  --ink-red: #8f2a1c;
  --ink-green: #2f6b2a;
  --gold: #f2cf63;
  --night: #15161d;
  --mortar: #3a342f;
  --light: #f5ead2;
  color-scheme: dark;
}

[hidden] {
  display: none !important;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--night);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--light);
  font: 16px/1.55 var(--text);
  image-rendering: pixelated;
}

a {
  color: #8b2d12;
}

a:hover {
  color: #c2410c;
}

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

[tabindex='-1']:focus {
  outline: none;
}

h1,
h2,
h3 {
  font-family: var(--pixel);
  font-weight: 400;
  line-height: 1.5;
  color: var(--ink);
  margin: 0 0 0.7em;
}

h1 {
  font-size: 1.1rem;
}

h2 {
  font-size: 0.85rem;
}

h3 {
  font-size: 0.75rem;
}

p {
  margin: 0 0 0.8em;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.skip {
  position: absolute;
  left: -9999px;
  z-index: 10;
}

.skip:focus {
  left: 12px;
  top: 12px;
  padding: 8px 12px;
  background: var(--light);
  color: var(--ink);
}

/* ---------------------------------------------------------------- the page */

.frame {
  width: min(1024px, 100%);
  margin: 0 auto;
}

.site-head {
  position: relative;
}

.banner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px 32px;
}

.brand {
  text-decoration: none;
}

.brand-name {
  display: inline-block;
  max-width: 100%;
  overflow-wrap: anywhere;
  text-align: center;
  font-family: var(--pixel);
  font-size: clamp(1.1rem, 4vw, 2.25rem);
  color: var(--gold);
  text-shadow:
    4px 4px 0 #2a1608,
    -2px -2px 0 #2a1608,
    2px -2px 0 #2a1608,
    -2px 2px 0 #2a1608;
  padding: 0 12px;
}

.brand:hover .brand-name {
  color: #ffe08a;
}

.menu-toggle {
  display: none;
}

/* The menu and the pages, side by side. */
.frame-body {
  display: grid;
  grid-template-columns: 208px 1fr;
  gap: 16px;
  padding: 0 16px 24px;
}

/* ---------------------------------------------------------------- the menu: wood blocks */

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.site-nav a,
.btn {
  display: block;
  border-style: solid;
  border-width: 6px;
  border-image: url('assets/art/wood.png') 6 fill / 6px stretch;
  color: var(--light);
  font-family: var(--pixel);
  font-size: 0.66rem;
  line-height: 1.4;
  padding: 10px 12px;
  text-align: center;
  text-decoration: none;
  text-shadow: 2px 2px 0 #2a1608;
  border-radius: 0;
  background: none;
  cursor: pointer;
}

.site-nav a:hover,
.btn:hover {
  color: var(--gold);
  filter: brightness(1.12);
}

.site-nav a:active,
.btn:active {
  transform: translateY(2px);
}

.site-nav a[aria-current='page'] {
  color: var(--gold);
  border-image-source: url('assets/art/plank.png');
}

.site-nav a.nav-play,
.btn-primary,
.btn-play {
  color: #fff6c9;
  filter: saturate(1.3);
}

.site-nav a.nav-account {
  margin-top: 8px;
}

.btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  filter: grayscale(0.6);
  transform: none;
}

.btn-teal {
  color: #b6f0e4;
}

.btn-danger {
  color: #ffb4a8;
}

.btn-block {
  width: 100%;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.actions .btn {
  display: inline-block;
}

/* ---------------------------------------------------------------- the pages: parchment */

.site-main {
  min-width: 0;
}

.page {
  margin: 0 auto;
}

.page.narrow {
  max-width: 460px;
}

.page.mid {
  max-width: 720px;
}

.loading {
  font-family: var(--pixel);
  font-size: 0.7rem;
  text-align: center;
  padding: 40px 0;
}

.card,
.section,
.hero {
  border-style: solid;
  /* The parchment ends 11 px before the art's right edge (the rollers stick out past it): the
     right slice keeps that strip whole, so only parchment is stretched. */
  border-width: 56px 12px 58px 8px;
  border-image: url('assets/art/scroll.png') 56 12 58 8 fill / 56px 12px 58px 8px stretch;
  padding: 4px 22px;
  color: var(--ink);
}

/* A panel inside a panel is a plain inset box, never a scroll in a scroll (owner, 15 November). */
:is(.card, .section, .hero) :is(.card, .section) {
  border: 2px solid rgba(59, 38, 20, 0.45);
  border-image: none;
  background: rgba(255, 244, 214, 0.45);
  padding: 8px 12px;
}

:is(.card, .section, .hero) .news-item + .news-item {
  margin-top: 8px;
}

.card + .card,
.section + .section,
.hero + .section {
  /* 1.5 times the old 12 px (owner, 16 November: "Space the scrolls out 1.5x more"). */
  margin-top: 18px;
}

/* The home page's scrolls hold their content centred (owner, 16 November). */
.section {
  text-align: center;
}

.section .section-head {
  justify-content: center;
}

.section .links {
  justify-content: center;
}

.muted {
  color: var(--ink-2);
}

.small {
  font-size: 0.85rem;
}

.center {
  text-align: center;
}

.pre {
  white-space: pre-wrap;
}

.hero h1 {
  font-size: 1.3rem;
  color: var(--ink-red);
}

.tagline {
  font-style: italic;
  color: var(--ink-2);
}

.hero .actions {
  justify-content: center;
}

.status {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--pixel);
  font-size: 0.6rem;
  padding: 6px 8px;
  background: rgba(59, 38, 20, 0.12);
  border: 2px solid rgba(59, 38, 20, 0.45);
  color: var(--ink);
}

.dot {
  width: 8px;
  height: 8px;
  background: var(--ink-green);
}

.chip.off .dot {
  background: var(--ink-red);
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.section-head h2 {
  margin: 0 0 0.7em;
}

.about {
  margin: 0;
}

.news-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.news-item {
  padding: 10px 0;
  border-bottom: 2px dashed rgba(59, 38, 20, 0.35);
}

.news-item:last-child {
  border-bottom: 0;
}

.news-item h3 {
  margin: 0 0 4px;
}

.news-item time {
  font-size: 0.8rem;
  color: var(--ink-2);
}

.news-item p {
  margin: 6px 0 0;
}

.links {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ---------------------------------------------------------------- forms */

.form {
  display: grid;
  gap: 12px;
}

.field {
  display: grid;
  gap: 4px;
}

.field .label {
  font-family: var(--pixel);
  font-size: 0.6rem;
  color: var(--ink);
}

.hint {
  font-size: 0.8rem;
  color: var(--ink-2);
}

input[type='email'],
input[type='password'],
input[type='text'],
input[type='date'],
input:not([type]),
select,
textarea {
  font: 16px var(--text);
  color: var(--ink);
  background: #fbf3dd;
  border: 2px solid var(--ink-2);
  border-radius: 0;
  padding: 8px 10px;
  width: 100%;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 0;
}

input::placeholder {
  color: #a08a6a;
}

input.masked {
  -webkit-text-security: disc;
}

.check {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 0.9rem;
}

.check input {
  margin-top: 4px;
}

.form-error {
  color: var(--ink-red);
  font-size: 0.9rem;
}

.form-error:empty {
  display: none;
}

.notice {
  padding: 8px 10px;
  border: 2px solid var(--ink-2);
  background: rgba(59, 38, 20, 0.08);
}

.notice.warn {
  border-color: var(--ink-red);
}

.notice.good {
  border-color: var(--ink-green);
}

.notice p:last-child {
  margin: 0;
}

.or {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--pixel);
  font-size: 0.6rem;
  color: var(--ink-2);
  margin: 12px 0;
}

.or::after {
  content: '';
  flex: 1;
  border-top: 2px dashed rgba(59, 38, 20, 0.35);
}

.providers {
  display: grid;
  gap: 8px;
}

.after {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  margin-top: 14px;
  font-size: 0.9rem;
}

/* ---------------------------------------------------------------- the account and server pages */

.facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 6px 14px;
  margin: 0;
}

.facts dt {
  font-family: var(--pixel);
  font-size: 0.6rem;
  color: var(--ink-2);
  padding-top: 3px;
}

.facts dd {
  margin: 0;
}

.badge {
  display: inline-block;
  font-family: var(--pixel);
  font-size: 0.55rem;
  padding: 3px 6px;
  border: 2px solid var(--ink-2);
  color: var(--ink);
}

.badge.good {
  border-color: var(--ink-green);
  color: var(--ink-green);
}

.badge.warn {
  border-color: var(--ink-red);
  color: var(--ink-red);
}

.actions + .muted {
  margin-top: 4px;
}

.page > .center {
  margin-top: 12px;
}

.rows {
  list-style: none;
  padding: 0;
  margin: 0;
}

.row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 2px dashed rgba(59, 38, 20, 0.3);
}

.row:last-child {
  border-bottom: 0;
}

.row-main {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: baseline;
  min-width: 0;
}

.row .btn {
  display: inline-block;
  flex: none;
}

.log {
  font:
    12px/1.5 ui-monospace,
    Menlo,
    monospace;
  background: #2a2119;
  color: #e9dcc0;
  border: 2px solid var(--ink-2);
  padding: 8px;
  max-height: 320px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.log-warn {
  color: #f2cf63;
}

.log-error {
  color: #ff9d8a;
}

/* ---------------------------------------------------------------- the foot */

.site-foot {
  padding: 0 16px 16px;
}

.foot-inner {
  background: rgba(21, 22, 29, 0.85);
  border: 2px solid #2a1608;
  padding: 12px 24px 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}

.foot-links,
.foot-social {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.foot-social:empty {
  display: none;
}

.foot-links a,
.foot-social a {
  color: #e9dcc0;
}

.foot-links a:hover,
.foot-social a:hover {
  color: var(--gold);
}

.foot-note {
  margin: 0;
  color: #bfae8e;
  width: 100%;
  text-align: center;
}

/* ---------------------------------------------------------------- phones and narrow windows */

@media (max-width: 760px) {
  .banner {
    padding: 24px 12px 12px;
  }

  .menu-toggle {
    /* Under the game's name, centred: never over it, however long it is. */
    display: block;
    margin: 0 auto 12px;
    border-style: solid;
    border-width: 6px;
    border-image: url('assets/art/wood.png') 6 fill / 6px stretch;
    color: var(--light);
    font-family: var(--pixel);
    font-size: 0.6rem;
    padding: 8px 10px;
    background: none;
    cursor: pointer;
  }

  .frame-body {
    grid-template-columns: 1fr;
    padding: 0 12px 20px;
  }

  .site-nav {
    display: none;
  }

  .site-head.open ~ .frame-body .site-nav {
    display: block;
  }

  .card,
  .section,
  .hero {
    padding: 2px 14px;
  }

  .site-foot {
    padding: 0 12px 12px;
  }

  .foot-inner {
    padding: 12px 16px 16px;
  }
}

/* ---------------------------------------------------------------- the sections row and coming soon */

/* The site's sections as wood buttons under the front panel, at every size. */
.section-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 12px 0;
}

.section-row .btn {
  font-size: 0.6rem;
}

.coming-title {
  font-family: var(--pixel);
  font-size: 0.8rem;
  margin: 0 0 6px;
}

/* ---------------------------------------------------------------- the Admin page */

.admin-title {
  text-align: center;
}

.admin-group {
  margin-top: 18px;
}

.admin-group-title {
  font-family: var(--pixel);
  color: var(--gold);
  text-align: center;
  text-shadow: 2px 2px 0 #2a1608;
  margin: 0 0 8px;
}

/* A part that opens and closes: its heading is the switch. */
.fold > summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.fold > summary::-webkit-details-marker {
  display: none;
}

.fold > summary::before {
  content: '▸';
  font-family: var(--pixel);
  font-size: 0.7rem;
}

.fold[open] > summary::before {
  content: '▾';
}

.fold > summary h3 {
  margin: 0.4em 0;
}

/* A save that went through on the Admin page. */
.ok {
  color: #2f6b1f;
  font-weight: 700;
}

.error:empty,
.ok:empty {
  display: none;
}

/* The Admin page's section buttons: the chosen one stands out. */
.admin-tabs .btn[aria-selected='true'] {
  filter: brightness(1.25);
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.admin-group[hidden] {
  display: none;
}

/* ================================================================ the redesign (owner, 17 November)
 * docs/site-redesign.md and the mockups in docs/site-redesign/: the whole page on the village with
 * no fade, a framed plank top bar, a drawer menu from the right, pinned paper notes on a plank
 * notice board, one scroll ("Ready to play?"), hanging shop signs and cloth banners. Kakele's
 * layout on a phone; on a computer the same page, wider, the notes and signs in columns.
 * Everything below overrides the 15 November look above.
 */

body {
  /* The game's dark night blue. */
  background: #1a1932;
}

.frame {
  width: 100%;
  max-width: none;
}

.frame-body {
  display: block;
  padding: 0;
}

.site-main {
  width: min(1100px, 100%);
  margin: 0 auto;
  padding: 0 12px 8px;
}

/* ------------------------------------------------ the top bar: the framed plank, name, Menu */

.site-head {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 4px;
  border-style: solid;
  border-width: 12px;
  border-image: url('assets/art/topbar.png') 12 fill / 12px stretch;
}

.site-head .brand-name {
  font-size: 12px;
  padding: 0;
  text-shadow: 2px 2px 0 #000;
}

.site-head .menu-toggle,
.site-head .menu-toggle:hover {
  display: block;
  margin: 0;
  border-style: solid;
  border-width: 6px;
  border-image: url('assets/art/plank.png') 6 fill / 6px stretch;
  background: none;
  color: var(--light);
  font: 9px/1 var(--pixel);
  padding: 10px 12px;
  min-height: 44px;
  cursor: pointer;
}

/* ------------------------------------------------ the drawer menu */

.drawer-shade {
  position: fixed;
  inset: 0;
  z-index: 29;
  background: rgb(10 8 6 / 0.62);
}

.site-nav,
.site-nav[hidden] {
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  width: min(300px, 82vw);
  overflow-y: auto;
  background: #2b1c10;
  border-left: 4px solid #1a1009;
  box-shadow: -6px 0 0 rgb(0 0 0 / 0.35);
  transform: translateX(100%);
  visibility: hidden;
  transition:
    transform 0.2s ease,
    visibility 0.2s;
}

body.menu-open .site-nav {
  transform: none;
  visibility: visible;
}

@media (prefers-reduced-motion: reduce) {
  .site-nav {
    transition: none;
  }
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
  border-style: solid;
  border-width: 12px;
  border-image: url('assets/art/topbar.png') 12 fill / 12px stretch;
}

.drawer-title {
  font: 11px var(--pixel);
  color: var(--light);
  text-shadow: 2px 2px 0 #000;
}

.drawer-close {
  font: 9px/1 var(--pixel);
  color: var(--gold);
  background: none;
  border-style: solid;
  border-width: 6px;
  border-image: url('assets/art/plank.png') 6 fill / 6px stretch;
  padding: 10px 12px;
  min-height: 44px;
  cursor: pointer;
}

.site-nav > ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 14px 24px;
  margin: 0;
  list-style: none;
}

.site-nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-image: url('assets/art/plank.png') 6 fill / 6px stretch;
  font: 10px/1.4 var(--pixel);
  color: var(--light);
  text-decoration: none;
  text-align: left;
  padding: 12px 12px;
  min-height: 44px;
}

.site-nav a[aria-current='page'] {
  color: var(--gold);
}

.site-nav a.nav-admin {
  color: var(--gold);
}

.nav-tag {
  font: 7px/1 var(--pixel);
  color: #1a120a;
  background: var(--gold);
  padding: 4px 5px;
  text-transform: uppercase;
}

.site-nav .nav-pair ul {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 10px;
}

.site-nav .nav-pair a {
  justify-content: center;
  text-align: center;
}

/* ------------------------------------------------ shared: small dark boxes, the glow, notes */

.tag {
  display: inline-block;
  background: rgb(26 18 10 / 0.82);
  border: 2px solid #2a1a0e;
  box-shadow: inset 0 0 0 2px #6a4a2c;
  color: var(--light);
}

.play-glow {
  display: inline-block;
  font: 24px/1.2 var(--pixel);
  color: #1a120a;
  text-decoration: none;
  padding: 10px 6px;
  text-shadow:
    0 0 6px var(--gold),
    0 0 14px var(--gold),
    0 0 26px var(--gold);
  animation: play-glow 1.8s ease-in-out infinite;
}

.play-glow-big {
  font-size: 30px;
  padding: 12px 8px;
}

.play-glow:hover {
  color: #000;
}

@keyframes play-glow {
  50% {
    text-shadow:
      0 0 10px var(--gold),
      0 0 22px var(--gold),
      0 0 40px var(--gold);
  }
}

@media (prefers-reduced-motion: reduce) {
  .play-glow {
    animation: none;
  }
}

/* The pages' sheets: pinned paper, never a scroll (owner: "No repeated scroll frames"). */
.card,
.section {
  position: relative;
  border: none;
  border-image: none;
  background: #f3e6c4;
  color: var(--ink);
  padding: 22px 18px 18px;
  margin: 18px auto;
  box-shadow: 3px 3px 0 rgb(0 0 0 / 0.4);
}

.card::before,
.section::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 50%;
  width: 8px;
  height: 8px;
  margin-left: -4px;
  background: var(--ink-red);
}

:is(.card, .section) :is(.card, .section)::before {
  display: none;
}

/* ------------------------------------------------ the home page */

.home .hero {
  border: none;
  border-image: none;
  background: none;
  padding: 64px 8px 44px;
  text-align: center;
  color: var(--light);
}

.hero-title {
  margin: 0;
}

.hero-name {
  display: block;
  font: 38px/1.2 var(--pixel);
  color: var(--gold);
  text-shadow: 4px 4px 0 #000;
  overflow-wrap: anywhere;
}

.hero-sub {
  display: block;
  margin-top: 12px;
  font: 11px/1.6 var(--pixel);
  color: var(--light);
  text-shadow: 2px 2px 0 #000;
}

.home .play-glow-big {
  margin-top: 30px;
}

.hero-free {
  margin: 6px 0 0;
  font-size: 12px;
  text-shadow: 1px 1px 0 #000;
}

.hero-link {
  display: inline-block;
  margin-top: 16px;
  font: 9px var(--pixel);
  color: var(--light);
  text-shadow: 2px 2px 0 #000;
  padding: 12px 6px;
}

.hero-link:hover {
  color: var(--gold);
}

.home .status {
  justify-content: center;
  margin-top: 14px;
}

.home .chip {
  background: rgb(0 0 0 / 0.55);
  border: none;
  color: var(--light);
  font: 12px var(--text);
  padding: 5px 10px;
}

.band {
  padding: 22px 0 24px;
  margin: 0 -12px 26px;
  background: rgb(21 22 29 / 0.88);
  border-top: 4px solid #2a2622;
  border-bottom: 4px solid #2a2622;
}

.band-title {
  margin: 0 16px 14px;
  font: 11px var(--pixel);
  color: var(--gold);
  text-shadow: 2px 2px 0 #000;
  text-align: center;
}

.strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 0 16px;
}

.strip img {
  flex: 0 0 min(300px, 80vw);
  width: min(300px, 80vw);
  aspect-ratio: 16 / 9;
  height: auto;
  object-fit: cover;
  scroll-snap-align: center;
  border: 4px solid var(--mortar);
  image-rendering: auto;
}

.dots {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: 12px;
}

.dots span {
  width: 8px;
  height: 8px;
  background: #5a534c;
}

.dots span.on {
  background: var(--gold);
}

.board {
  border: 12px solid transparent;
  border-image: url('assets/art/plank.png') 6 fill / 12px stretch;
  background-color: #5a3a20;
  background-clip: padding-box;
  padding: 12px 12px 16px;
}

.board-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.board-head h2 {
  margin: 0 0 14px;
  font: 11px var(--pixel);
  color: var(--gold);
  text-shadow: 2px 2px 0 #000;
}

.board-head a {
  font: 8px var(--pixel);
  color: var(--light);
  padding: 8px 0;
}

.notes {
  display: grid;
  gap: 14px;
}

.note {
  position: relative;
  margin: 0;
  background: #f3e6c4;
  color: var(--ink);
  padding: 18px 12px 12px;
  transform: rotate(-1deg);
  box-shadow: 3px 3px 0 rgb(0 0 0 / 0.4);
}

.notes > :nth-child(2n) .note,
.notes > .note:nth-child(2n) {
  transform: rotate(0.8deg);
}

.note-event {
  background: #e9f0d8;
}

.note .pin {
  position: absolute;
  top: 6px;
  left: 50%;
  width: 8px;
  height: 8px;
  margin-left: -4px;
  background: var(--ink-red);
}

.note-event .pin {
  background: var(--ink-green);
}

.note .note-label {
  margin: 0;
  font: 8px var(--pixel);
  color: var(--ink-red);
}

.note-event .note-label,
.note.note-event .note-label {
  color: var(--ink-green);
}

.note h3 {
  margin: 6px 0 4px;
  font: 16px var(--text);
  color: var(--ink);
}

.note p {
  margin: 0;
  font-size: 14px;
}

@media (prefers-reduced-motion: reduce) {
  .note,
  .notes > :nth-child(2n) .note,
  .notes > .note:nth-child(2n) {
    transform: none;
  }
}

.about-street {
  margin: 30px 0 0;
  text-align: center;
}

.about-street h2.tag {
  margin: 0 0 8px;
  padding: 10px 12px;
  font: 11px var(--pixel);
  color: var(--gold);
  text-shadow: 2px 2px 0 #000;
}

.about-street p.about,
.about-street > p.tag {
  margin: 0 8px 14px;
  padding: 8px 12px;
  font-size: 15px;
  max-width: 640px;
}

.sign-rail {
  height: 6px;
  background: #5a534c;
  border-top: 2px solid #8a8580;
  border-bottom: 2px solid #2a2622;
  margin: 0 4px;
}

.signs {
  list-style: none;
  margin: -14px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  row-gap: 4px;
}

.signs img {
  display: block;
  width: 96px;
  height: 96px;
  margin: 0 auto;
}

.signs .sign-name {
  margin: -10px 0 0;
  padding: 5px 7px;
  font: 8px var(--pixel);
}

.signs .sign-text {
  margin: 3px 0 0;
  padding: 2px 6px;
  font-size: 12px;
}

.scroll.ready {
  margin: 30px auto 0;
  max-width: 560px;
  border-style: solid;
  border-width: 56px 12px 58px 8px;
  border-image: url('assets/art/scroll.png') 56 12 58 8 fill / 56px 12px 58px 8px stretch;
  padding: 18px 18px 20px;
  color: var(--ink);
  text-align: center;
}

.ready h2 {
  margin: 0;
  font: 12px var(--pixel);
  color: var(--ink);
}

.ready .play-glow {
  margin-top: 18px;
}

/* ------------------------------------------------ the footer: cloth banners on a dark strip */

.site-foot {
  padding: 0;
  margin-top: 26px;
}

.site-foot .foot-inner {
  background: rgb(42 38 34 / 0.75);
  border: none;
  padding: 20px 14px 26px;
  display: block;
  text-align: center;
}

.foot-banners {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.foot-banners:empty {
  display: none;
}

.foot-banner {
  display: block;
  width: 92px;
  padding: 14px 0 24px;
  color: #fff;
  text-decoration: none;
  font: 8px var(--pixel);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 80%, 0 100%);
  border-top: 6px solid #5a3a20;
  background: #4a4038;
}

.foot-banner:hover {
  color: var(--gold);
}

.foot-banner img {
  display: block;
  width: 40px;
  height: 40px;
  margin: 0 auto 8px;
  object-fit: contain;
}

.foot-discord {
  background: #5865a8;
}

.foot-reddit {
  background: #ff4500;
}

.foot-newsletter {
  background: #2f6b5e;
}

.site-foot .foot-links {
  display: inline-flex;
  gap: 6px;
  margin: 18px 0 0;
  font-size: 13px;
}

.site-foot .foot-links li + li::before {
  content: '·';
  margin-right: 6px;
  color: #e8dcc0;
}

.site-foot .foot-note {
  margin: 4px 0 0;
  color: #e8dcc0;
  font-size: 13px;
}

/* ------------------------------------------------ computers: the same page, wider */

@media (min-width: 761px) {
  .site-head {
    padding: 0 16px;
  }

  .site-head .brand-name {
    font-size: 16px;
  }

  .home .hero {
    padding: 110px 16px 70px;
  }

  .hero-name {
    font-size: 64px;
  }

  .hero-sub {
    font-size: 14px;
  }

  .play-glow-big {
    font-size: 40px;
  }

  .band {
    margin: 0 calc(50% - 50vw) 34px;
  }

  .strip {
    justify-content: safe center;
  }

  .strip img {
    flex-basis: 360px;
    width: 360px;
  }

  .notes {
    grid-template-columns: repeat(3, 1fr);
  }

  .signs {
    grid-template-columns: repeat(6, 1fr);
  }

  .signs img {
    width: 120px;
    height: 120px;
  }
}

/* The small dark boxes stack, centred, one under the other. */
.about-street .tag,
.signs .tag {
  display: table;
  margin-left: auto;
  margin-right: auto;
}

.about-street h2.tag,
.about-street p.tag {
  margin-left: auto;
  margin-right: auto;
}

/* ------------------------------------------------ the shop's price tables and the creators page */

.price-table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0 12px;
  font-size: 14px;
}

.price-table th,
.price-table td {
  text-align: left;
  padding: 6px 8px;
  border-bottom: 1px solid rgb(59 38 20 / 0.25);
  vertical-align: top;
}

.price-table thead th {
  font: 8px var(--pixel);
  color: var(--ink-red);
}

.price-table .price {
  white-space: nowrap;
  font-weight: bold;
}

@media (max-width: 480px) {
  .price-table {
    font-size: 13px;
  }

  .price-table th,
  .price-table td {
    padding: 5px 4px;
  }

  .price-table .price {
    white-space: normal;
  }
}

.built-with {
  text-align: center;
  margin: 24px 0 0;
}

.built-with .tag {
  padding: 8px 12px;
  font: 9px var(--pixel);
  color: var(--gold);
  text-decoration: none;
}

.built-with .tag:hover {
  color: #fff;
}

.site-foot .foot-note {
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

/* The game's name breathes a warm gold light. */
.hero-name {
  animation: name-glow 3.2s ease-in-out infinite;
}

@keyframes name-glow {
  0%,
  100% {
    text-shadow:
      4px 4px 0 #000,
      0 0 12px rgb(242 207 99 / 0.35);
  }
  50% {
    text-shadow:
      4px 4px 0 #000,
      0 0 22px rgb(242 207 99 / 0.75),
      0 0 46px rgb(224 118 31 / 0.45);
  }
}

/* Play now: on hover a bigger flare and a small lift. */
.play-glow {
  transition: transform 0.15s ease;
}

.play-glow:hover,
.play-glow:focus-visible {
  transform: translateY(-2px) scale(1.04);
  text-shadow:
    0 0 10px #fff3c4,
    0 0 24px var(--gold),
    0 0 48px #f2a933,
    0 0 72px #e0761f;
}

/* Plank buttons, menu links and the top bar's buttons glow gold under the pointer. */
.site-nav a,
.menu-toggle,
.drawer-close,
.btn {
  transition:
    box-shadow 0.15s ease,
    filter 0.15s ease,
    transform 0.15s ease;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.menu-toggle:hover,
.drawer-close:hover,
.btn:hover {
  filter: brightness(1.15);
  box-shadow:
    0 0 10px rgb(242 207 99 / 0.55),
    0 0 22px rgb(242 169 51 / 0.3);
}

/* Notes lift off the board; the hanging signs swing; the banners flutter. */
.note {
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.note:hover {
  transform: rotate(0deg) translateY(-4px) scale(1.02);
  box-shadow:
    6px 8px 0 rgb(0 0 0 / 0.35),
    0 0 18px rgb(242 207 99 / 0.35);
}

.signs li {
  transform-origin: 50% 0;
}

.signs li:hover img {
  animation: sign-swing 1.2s ease-in-out;
  filter: drop-shadow(0 0 8px rgb(242 207 99 / 0.6));
}

.signs img {
  transform-origin: 50% 0;
  transition: filter 0.2s ease;
}

@keyframes sign-swing {
  20% {
    rotate: 8deg;
  }
  45% {
    rotate: -6deg;
  }
  70% {
    rotate: 3deg;
  }
  100% {
    rotate: 0deg;
  }
}

.foot-banner {
  transform-origin: 50% 0;
  transition:
    transform 0.2s ease,
    filter 0.2s ease;
}

.foot-banner:hover,
.foot-banner:focus-visible {
  animation: banner-wave 0.9s ease-in-out;
  filter: brightness(1.15) drop-shadow(0 0 10px rgb(255 255 255 / 0.35));
}

@keyframes banner-wave {
  30% {
    transform: skewX(4deg);
  }
  65% {
    transform: skewX(-3deg);
  }
  100% {
    transform: none;
  }
}

/* The screenshots light up under the pointer. */
.strip img {
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.strip img:hover {
  border-color: var(--gold);
  box-shadow: 0 0 18px rgb(242 207 99 / 0.55);
  transform: translateY(-3px);
}

/* The online dot pulses. */
.chip:not(.off) .dot {
  animation: dot-pulse 1.6s ease-in-out infinite;
}

@keyframes dot-pulse {
  50% {
    box-shadow: 0 0 8px 2px rgb(95 211 106 / 0.8);
  }
}

/* Headings in gold catch the light. */
.band-title,
.board-head h2,
.about-street h2.tag {
  text-shadow:
    2px 2px 0 #000,
    0 0 10px rgb(242 207 99 / 0.45);
}

/* The page fades in. */
.site-main > * {
  animation: page-in 0.35s ease-out both;
}

@keyframes page-in {
  from {
    opacity: 0;
    translate: 0 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-name,
  .chip:not(.off) .dot,
  .site-main > *,
  .signs li:hover img,
  .foot-banner:hover {
    animation: none;
  }

  .note:hover,
  .strip img:hover,
  .play-glow:hover {
    transform: none;
  }
}

/* The News page: the board with its filters. */
.board-head h1 {
  margin: 0 0 14px;
  font: 14px var(--pixel);
  color: var(--gold);
  text-shadow:
    2px 2px 0 #000,
    0 0 10px rgb(242 207 99 / 0.45);
}

.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 16px;
}

.filters .btn {
  font: 9px var(--pixel);
  padding: 10px 12px;
  min-height: 44px;
}

.filters .btn[aria-pressed='true'] {
  color: var(--gold);
}

.board {
  margin-top: 18px;
}

.home .board {
  margin-top: 0;
}

@media (min-width: 761px) {
  .notes-page {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ------------------------------------------------ rankings */

.rank-tabs .btn[disabled] {
  opacity: 0.6;
}

.rank-tabs .nav-tag {
  margin-left: 6px;
}

.rank-sheet {
  margin-top: 14px;
  transform: none;
}

.rank-sheet:hover {
  transform: none;
}

.rank-search {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 10px 0 12px;
}

.rank-search input,
.rank-search select {
  flex: 1 1 160px;
  min-height: 44px;
}

.rank-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.rank-row {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px 4px;
  border-bottom: 1px solid rgb(59 38 20 / 0.2);
}

.rank-place {
  font: 12px var(--pixel);
  text-align: center;
  color: var(--ink-2);
}

.rank-who {
  display: grid;
  min-width: 0;
}

.rank-who strong {
  overflow-wrap: anywhere;
}

.rank-value {
  font-weight: bold;
  white-space: nowrap;
}

.rank-1 .rank-place {
  color: #b8860b;
  text-shadow: 0 0 8px rgb(242 207 99 / 0.9);
}

.rank-2 .rank-place {
  color: #7d8a96;
}

.rank-3 .rank-place {
  color: #a0522d;
}

.rank-top {
  background: linear-gradient(90deg, rgb(242 207 99 / 0.22), transparent);
}

.rank-mine {
  background: rgb(47 107 42 / 0.12);
}

.rank-pages {
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
}

.rank-page {
  font: 8px var(--pixel);
}

.rank-pages {
  flex-wrap: nowrap;
  gap: 8px;
}

.rank-pages .btn {
  flex: 0 0 auto;
  width: auto;
  padding: 8px 10px;
  font-size: 8px;
}

.rank-page {
  flex: 1 1 auto;
  text-align: center;
}

/* Account and forms (docs/site-redesign/account.html): dashed rows, full-width planks. */
.facts {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0 12px;
}

.facts dt,
.facts dd {
  margin: 0;
  padding: 10px 0;
  border-top: 2px dashed #c7b088;
}

.facts dd {
  text-align: right;
  overflow-wrap: anywhere;
}

.account-play {
  margin: 8px 0 4px;
}

.card .actions .btn {
  flex: 1 1 140px;
  text-align: center;
}

.frame {
  position: relative;
  z-index: 1;
}

/* Events: hot time's week (owner, 18 November). */
.hot-week {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: 12px;
}
.hot-day h3 {
  margin: 0 0 4px;
}
.hot-day ul {
  margin: 0;
  padding-left: 18px;
  overflow-wrap: anywhere;
}

/* The Discord page: the Join button and the server widget. */
.btn-discord {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
}
.btn-discord img {
  width: 1.4em;
  height: 1.4em;
}
.discord-widget {
  display: block;
  width: 100%;
  max-width: 420px;
  height: min(500px, 60vh);
  margin: 1rem auto 0;
  border: 0;
  border-radius: 8px;
}

/* ------------------------------------------------ Home's scene (block 26a, owner, 28 November) */

/* Home is as wide as the page: the scene at the top is the whole width; the sections under it
   keep the page's column. */
.site-main:has(> .home) {
  width: 100%;
  padding: 0 0 8px;
}

.home > :not(.hero) {
  width: min(1100px, 100% - 24px);
  margin-inline: auto;
}

/* The hero: the name, Play and the status on a plain dark blue (the game's night). */
.home .hero {
  position: relative;
  display: grid;
  min-height: 0;
  height: auto;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: #1a1932;
}

.hero-over {
  position: relative;
  align-self: start;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 28px 12px 18px;
  text-align: center;
  background: linear-gradient(rgb(0 0 0 / 0.55), rgb(0 0 0 / 0));
}

.hero-over > * {
  margin: 0;
}

.home .hero-name {
  font-size: clamp(22px, 7vw, 44px);
}

.home .play-glow-big {
  margin-top: 0;
}

/* Play: the wood button of the game's own menus (client-web CreatorScreens.tsx). */
.home .play-glow {
  border-style: solid;
  border-width: 9px;
  border-image: url('/assets/ui/pixel-ui-free/themes/wood/button_normal.png') 3 fill / 9px stretch;
  image-rendering: pixelated;
  color: #3b2412;
  text-shadow: none;
  padding: 12px 22px;
  font-size: clamp(16px, 5vw, 24px);
  animation: none;
}

.home .play-glow:hover {
  border-image-source: url('/assets/ui/pixel-ui-free/themes/wood/button_hover.png');
  color: #000;
}

.home .play-glow:active {
  border-image-source: url('/assets/ui/pixel-ui-free/themes/wood/button_pressed.png');
}

.home .status {
  margin-top: 0;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}

/* The hero's extras on a wood panel under the scene. */
.home .hero-extras {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px 18px;
  margin-top: 14px;
  padding: 6px 12px;
  border-style: solid;
  border-width: 9px;
  border-image: url('/assets/ui/pixel-ui-free/themes/wood/panel.png') 3 fill / 9px stretch;
  image-rendering: pixelated;
  color: #f5e6c8;
  text-align: center;
}

.home .hero-extras .hero-free {
  margin: 0;
}

.home .hero-extras .hero-link {
  margin: 0;
}

/* The footer's Credits page. */
.credits {
  padding-left: 18px;
  line-height: 1.6;
}

/* ------------------------------------------------ the wood look, every page (block 26a) */

/* The pieces of the game's own menus (client-web CreatorScreens.tsx: Pixel UI Free, wood
   theme), as nine-slice borders: panels for sheets, buttons for buttons, boxes for fields. */
:root {
  --wood-cream: #f5e6c8;
  --wood-brown: #3b2412;
}

.card,
.section {
  border-style: solid;
  border-width: 12px;
  border-image: url('/assets/ui/pixel-ui-free/themes/wood/panel.png') 3 fill / 12px stretch;
  image-rendering: pixelated;
  background: none;
  color: var(--wood-cream);
  box-shadow: 4px 4px 0 rgb(0 0 0 / 0.45);
}

.card::before,
.section::before {
  display: none;
}

:is(.card, .section) :is(h1, h2, h3) {
  font-family: var(--pixel);
  color: var(--gold);
  text-shadow: 2px 2px 0 #000;
}

:is(.card, .section) a:not(.btn) {
  color: var(--gold);
}

:is(.card, .section) :is(.muted, .small, p, li, label, td, th) {
  color: var(--wood-cream);
}

/* Inner sheets: the sunken panel. */
:is(.card, .section) :is(.card, .section, .notice, .facts) {
  border-style: solid;
  border-width: 9px;
  border-image: url('/assets/ui/pixel-ui-free/themes/wood/panel_inset.png') 3 fill / 9px stretch;
  background: none;
  box-shadow: none;
}

.btn {
  border-style: solid;
  border-width: 9px;
  border-image: url('/assets/ui/pixel-ui-free/themes/wood/button_normal.png') 3 fill / 9px stretch;
  image-rendering: pixelated;
  background: none;
  box-shadow: none;
  color: var(--wood-brown);
  text-shadow: none;
}

.btn:hover {
  border-image-source: url('/assets/ui/pixel-ui-free/themes/wood/button_hover.png');
  background: none;
  color: #000;
}

.btn:active {
  border-image-source: url('/assets/ui/pixel-ui-free/themes/wood/button_pressed.png');
}

.btn[disabled] {
  border-image-source: url('/assets/ui/pixel-ui-free/themes/wood/button_disabled.png');
  color: rgb(59 36 18 / 0.6);
}

/* The main action keeps a gold word; danger keeps a red one. */
.btn-primary,
.btn-play {
  color: #1a120a;
  text-shadow: 0 0 6px var(--gold);
}

.btn-danger {
  color: #7a1a12;
}

input[type='email'],
input[type='password'],
input[type='text'],
input[type='date'],
input:not([type]),
select,
textarea {
  border-style: solid;
  border-width: 6px;
  border-image: url('/assets/ui/pixel-ui-free/themes/wood/line_edit.png') 3 fill / 6px stretch;
  background: none;
  color: var(--wood-cream);
}

select option {
  background: var(--wood-brown);
  color: var(--wood-cream);
}

/* ------------------------------------------------ Home (plan row WEB1, 29 November) */

/* The hero's scene: a real screenshot of the game, darkened under the name and Play. */
.home .hero-scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
  object-position: 50% 55%;
  /* Cropped in past the screenshot's HUD bars at its edges. */
  transform: scale(1.25);
  opacity: 0.45;
  pointer-events: none;
}

.home .hero {
  align-content: center;
}

.home .hero-over {
  align-self: center;
  padding: 56px 12px 48px;
  background: none;
}

.home .hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(rgb(26 25 50 / 0.2), rgb(26 25 50 / 0.95));
  pointer-events: none;
}

.home .hero-over {
  z-index: 1;
}

.top5-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.discord-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px;
  text-align: center;
}

.discord-band h2 {
  margin: 0 0 6px;
}

.discord-band p {
  margin: 0;
}

.discord-icon {
  width: 48px;
  height: 48px;
  image-rendering: pixelated;
}

.built-with .tag {
  cursor: default;
}

@media (min-width: 760px) {
  .discord-band {
    flex-wrap: nowrap;
    text-align: left;
  }
}
