:root {
  --ink: #000;
  --muted: #59657a;
  --page: #d1d5ee;
  --shell: #eef2ff;
  --chrome: #d6daf0;
  --paper: #d6daf0;
  --panel: #eef2ff;
  --line: #b7c5d9;
  --line-soft: #c8cee0;
  --bar: #eeaa88;
  --bar-dark: #880000;
  --brand: #af0a0f;
  --subject: #0f0c5d;
  --green: #d6daf0;
  --green-dark: #34345c;
  --blue: #34345c;
  --pink: #dd0000;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 12px;
  background: var(--page);
  color: var(--ink);
  font-family: Tahoma, Verdana, Arial, sans-serif;
  font-size: 13px;
  line-height: 1.45;
}

a {
  color: var(--blue);
}

a:hover {
  color: var(--pink);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--pink);
  outline-offset: 2px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 20;
  transform: translateY(-180%);
  padding: 6px 9px;
  background: var(--paper);
  border: 1px solid var(--ink);
  font-weight: bold;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-shell {
  width: min(1040px, 100%);
  margin: 0 auto;
  background: var(--shell);
  border: 1px solid var(--ink);
  box-shadow: 4px 4px 0 #c4cae2;
}

.utility-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 34px;
  padding: 6px 10px;
  background: var(--chrome);
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  font-weight: bold;
}

.utility-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.utility-support {
  color: var(--bar-dark);
  white-space: nowrap;
}

.brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 22px 24px 24px;
  background: var(--shell);
  border-bottom: 1px solid var(--line-soft);
}

.brand-copy {
  max-width: 720px;
}

h1 {
  margin-bottom: 3px;
  color: var(--brand);
  font-family: Tahoma, Verdana, Arial, sans-serif;
  font-size: clamp(52px, 8vw, 76px);
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: -4px;
  text-shadow: 3px 3px 0 var(--line);
}

.brand-dek {
  max-width: 660px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
}

main {
  display: grid;
  gap: 12px;
  padding: 12px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 4px 7px;
  background: var(--bar);
  border-bottom: 2px solid var(--bar-dark);
  color: var(--bar-dark);
}

.panel-title h2 {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0;
  font-size: 14px;
  line-height: 1.2;
}

.board-name {
  font-weight: bold;
}

.board-caption {
  font-weight: normal;
}

.panel-body {
  padding: 10px;
}

.button-link,
.dialog-actions button,
.dialog-titlebar button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 12px;
  background: #f0f0f0;
  border: 2px outset #fff;
  box-shadow: 1px 1px 0 #747474;
  color: #111;
  font: bold 12px Tahoma, Verdana, Arial, sans-serif;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.button-link:hover,
.dialog-actions button:hover,
.dialog-titlebar button:hover {
  background: #fff;
  color: var(--bar);
}

.button-link:active,
.dialog-actions button:active,
.dialog-titlebar button:active {
  border-style: inset;
  box-shadow: none;
}

.button-link-secondary {
  min-height: 30px;
  padding: 5px 10px;
}

.goodies-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.goodie-card {
  display: flex;
  min-height: 205px;
  flex-direction: column;
  padding: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 2px 2px 0 #c0c6dc;
  color: var(--ink);
  text-decoration: none;
}

.goodie-card:hover,
.goodie-card:focus-visible {
  border-color: var(--pink);
  color: var(--ink);
  transform: translate(-1px, -1px);
  background: #e2e6f7;
  box-shadow: 3px 3px 0 #c0c6dc;
}

.card-title {
  margin-bottom: 7px;
  color: var(--subject);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 21px;
  line-height: 1.1;
}

.greentext-lines {
  display: block;
  margin-bottom: 18px;
  color: #789922;
  font-size: 12px;
  line-height: 1.4;
}

.greentext-line {
  display: block;
}

.card-cta {
  margin-top: auto;
  color: var(--blue);
  font-weight: bold;
  text-decoration: underline;
}

.goodie-card:hover .card-cta {
  color: var(--pink);
}

#goodies {
  position: relative;
}

.board-mascot-button {
  position: absolute;
  right: 22px;
  bottom: 100%;
  margin-bottom: -1px;
  padding: 0;
  background: none;
  border: 0;
  line-height: 0;
  cursor: pointer;
}

.board-mascot {
  display: block;
  width: 120px;
  height: auto;
  image-rendering: pixelated;
}

.card-post {
  margin-bottom: 8px;
  color: var(--muted);
  font-family: "Courier New", Courier, monospace;
  font-size: 10px;
}

.post-name {
  color: #117743;
}

.card-new {
  display: inline-block;
  margin-left: 5px;
  padding: 3px 6px;
  background: var(--brand);
  border: 1px solid var(--bar-dark);
  color: #ffe400;
  font-family: "Courier New", Courier, monospace;
  font-size: 10px;
  font-weight: bold;
  line-height: 1.1;
  vertical-align: middle;
  animation: blink 2.6s steps(1, end) infinite;
}

@keyframes blink {
  50% {
    opacity: 0.4;
  }
}

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

.support-body {
  background: var(--paper);
}

.support-copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.support-copy p {
  margin-bottom: 0;
}

.wallet-list {
  display: grid;
  gap: 7px;
}

.wallet-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 74px;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 58px;
  padding: 8px;
  background: var(--shell);
  border: 1px solid var(--line);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.wallet-row:hover {
  background: #fff;
  border-color: var(--pink);
}

.wallet-coin {
  display: flex;
  flex-direction: column;
}

.wallet-coin strong {
  color: var(--subject);
  font-size: 14px;
}

.wallet-coin span {
  color: var(--muted);
  font-size: 10px;
}

.wallet-row code,
.dialog-address {
  font-family: "Courier New", Courier, monospace;
  overflow-wrap: anywhere;
}

.wallet-row code {
  font-size: 10px;
  line-height: 1.3;
}

.wallet-action {
  color: var(--blue);
  font-size: 11px;
  font-weight: bold;
  text-align: right;
  text-decoration: underline;
}

.footer-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 10px;
  background: var(--chrome);
  border-top: 1px solid var(--line);
  font-size: 11px;
}

.footer-strip nav {
  display: flex;
  gap: 12px;
}

.qr-dialog {
  width: min(420px, calc(100vw - 24px));
  max-width: none;
  max-height: calc(100vh - 24px);
  padding: 0;
  background: transparent;
  border: 0;
  color: #111;
}

.qr-dialog::backdrop {
  background: rgba(15, 22, 51, 0.62);
}

.dialog-window {
  background: #c0c0c0;
  border: 2px outset #fff;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.35);
}

.dialog-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 5px 4px 8px;
  background: #0c2c91;
  color: #fff;
}

.dialog-titlebar h2 {
  margin: 0;
  font-size: 12px;
}

.dialog-titlebar button {
  min-height: 24px;
  padding: 3px 8px;
  font-size: 10px;
}

.dialog-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 7px;
  padding: 12px;
  background: #fff;
  border: 2px inset #fff;
}

.dialog-body img {
  display: block;
  width: min(240px, 100%);
  height: auto;
  image-rendering: pixelated;
}

.dialog-body > p:not(.copy-status) {
  margin: 8px 0 6px;
  color: #3f3f3f;
  font-size: 11px;
}

.dialog-address {
  width: 100%;
  padding: 6px;
  background: #f5f5f5;
  border: 1px solid #aaa;
  font-size: 10px;
  line-height: 1.3;
  text-align: center;
}

.dialog-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.copy-status {
  min-height: 18px;
  margin: 6px 0 0;
  color: var(--green-dark);
  font-size: 11px;
  font-weight: bold;
}

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

  .goodie-card {
    min-height: 180px;
  }
}

@media (max-width: 480px) {
  html {
    scroll-behavior: auto;
  }

  .board-mascot-button {
    right: 12px;
  }

  .board-mascot {
    width: 90px;
  }

  body {
    padding: 6px;
    font-size: 12px;
  }

  .site-shell {
    box-shadow: 2px 2px 0 #b7c1d8;
  }

  .utility-row,
  .brand-row,
  .support-copy,
  .footer-strip {
    align-items: flex-start;
    flex-direction: column;
  }

  .utility-row {
    gap: 5px;
  }

  .utility-links {
    gap: 11px;
  }

  .brand-row {
    gap: 12px;
    padding: 18px 14px 20px;
  }

  h1 {
    font-size: 50px;
    letter-spacing: -3px;
  }

  .brand-dek {
    font-size: 12px;
  }

  main {
    gap: 9px;
    padding: 8px;
  }

  .goodie-card {
    min-height: 0;
  }

  .wallet-row {
    grid-template-columns: 1fr auto;
  }

  .wallet-action {
    grid-column: 2;
    grid-row: 1;
  }

  .wallet-row code {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .footer-strip {
    gap: 7px;
  }

  .qr-dialog {
    width: calc(100vw - 12px);
    max-height: calc(100vh - 12px);
  }

  .dialog-body {
    margin: 5px;
    padding: 8px;
  }

  .dialog-body img {
    width: min(220px, 100%);
  }

  .button-link,
  .dialog-actions button {
    min-height: 40px;
  }

  .dialog-titlebar button {
    min-height: 32px;
  }
}
