:root {
  --bg: #f7f7f7;
  --line: #1f1f1f;
  --text: #1f1f1f;
  --panel: rgba(255, 255, 255, 0.9);
}

* {
  box-sizing: border-box;
}

body.page {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: linear-gradient(#fafafa, #efefef);
  color: var(--text);
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 16px;
}

.wrap {
  width: min(920px, 100%);
}

.title {
  margin: 0 0 10px;
  font-size: clamp(24px, 4vw, 38px);
  font-weight: 800;
  letter-spacing: 0.04em;
}

.title-game {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 8px 0 4px;
  font-family: ui-monospace, "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  font-size: clamp(28px, 5vw, 44px);
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.title-game span {
  display: inline-block;
  min-width: 0;
  padding: 10px 14px 8px;
  border: 3px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 5px 5px 0 var(--line);
}

.title-link {
  color: inherit;
  text-decoration: none;
}

.title-link:hover {
  color: inherit;
}

.title-link:focus-visible {
  outline: 2px solid var(--line);
  outline-offset: 6px;
  border-radius: 12px;
}

.sub {
  margin: 0 0 14px;
  color: #555;
  font-size: 14px;
  line-height: 1.6;
}

.lead {
  margin: 0 0 10px;
  max-width: 760px;
  color: #2e2e2e;
  font-size: 15px;
  line-height: 1.8;
}

.panel {
  border: 3px solid var(--line);
  border-radius: 18px;
  background: var(--bg);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.panel-header {
  padding: 20px 22px 14px;
}

.panel-body {
  padding: 22px;
}

.section + .section {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 2px dashed rgba(31, 31, 31, 0.2);
}

h2 {
  margin: 0 0 10px;
  font-size: 20px;
  letter-spacing: 0.03em;
}

p,
li {
  color: #333;
  line-height: 1.8;
  font-size: 15px;
}

p {
  margin: 0;
}

ul {
  margin: 10px 0 0 20px;
  padding: 0;
}

.button-row {
  margin-top: 18px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.button-link {
  display: inline-block;
  color: #222;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  padding: 10px 14px;
  border: 2px solid #333;
  border-radius: 10px;
  background: #fff;
  transition: transform 0.2s ease, background 0.2s ease;
}

.button-link:hover {
  background: #fff;
  transform: translateY(-1px);
}

.button-link:active {
  box-shadow: 5px 5px 0 var(--line);
}

.notes {
  margin-top: 10px;
  font-size: 14px;
  color: #444;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.contact-inline {
  margin-top: 6px;
  color: #666;
  font-size: 13px;
}

.contact-inline-link {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.contact-inline-link:hover {
  color: #333;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border: 2px solid #333;
  border-radius: 8px;
  background: #fff;
  font-weight: 700;
  font-size: 12px;
}

.page-game canvas {
  width: 100%;
  height: auto;
  display: block;
  border: 3px solid var(--line);
  border-radius: 18px;
  background: var(--bg);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.08);
}

.page-game .info {
  margin-top: 10px;
  font-size: 14px;
  color: #444;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.page-game .kbd {
  display: inline-block;
  padding: 2px 8px;
  border: 2px solid #333;
  border-radius: 8px;
  background: #fff;
  font-weight: 700;
  font-size: 12px;
}

.page-footer.footer-links {
  margin-top: 14px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.page-footer.footer-links a {
  color: #444;
  text-decoration: none;
  font-size: 14px;
  padding: 8px 12px;
  border: 2px solid #333;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.85);
  transition: background 0.2s ease, transform 0.2s ease;
}

.page-footer.footer-links a:hover {
  background: #fff;
  transform: translateY(-1px);
}

.page-footer.footer-links a:active {
  box-shadow: 5px 5px 0 var(--line);
}

.page-about .button-row {
  margin-top: 16px;
  justify-content: flex-end;
}

.page-contact .contact-box {
  margin-top: 14px;
  padding: 16px;
  border: 2px solid #333;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.85);
}

.page-contact .muted {
  color: #666;
  font-size: 14px;
}

.page-contact code {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(31, 31, 31, 0.15);
  border-radius: 8px;
  padding: 2px 6px;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 14px;
}

.page-privacy .button-row {
  justify-content: flex-end;
}

.page-contact .wrap > .button-row {
  justify-content: flex-end;
}
@media (max-width: 768px) {
  body.page {
    padding: 12px;
    place-items: start center;
  }

  .wrap {
    width: 100%;
  }

  .title-game {
    font-size: clamp(24px, 8vw, 36px);
  }

  .title-game span {
    width: 100%;
    text-align: center;
  }

  .panel {
    border-radius: 14px;
  }

  .panel-header,
  .panel-body {
    padding: 18px;
  }

  .section + .section {
    margin-top: 20px;
    padding-top: 16px;
  }

  .page-game canvas {
    border-radius: 14px;
  }

  .page-game .info,
  .notes {
    gap: 8px;
  }
}

@media (max-width: 480px) {
  body.page {
    padding: 10px;
    place-items: start center;
  }

  .title {
    margin-bottom: 8px;
  }

  .title-game {
    width: 100%;
    font-size: clamp(22px, 9vw, 30px);
    letter-spacing: 0.05em;
  }

  .title-game span {
    padding: 10px 12px 8px;
    border-radius: 10px;
    box-shadow: 4px 4px 0 var(--line);
  }

  .lead,
  .sub,
  .page-game .info,
  .notes,
  .contact-inline {
    font-size: 13px;
  }

  h2 {
    font-size: 18px;
  }

  p,
  li {
    font-size: 14px;
    line-height: 1.7;
  }

  .panel-header,
  .panel-body {
    padding: 14px;
  }

  .page-game .info,
  .notes,
  .button-row,
  .page-footer.footer-links {
    align-items: stretch;
  }

  .button-link,
  .page-footer.footer-links a {
    text-align: center;
  }

  .page-about .button-row,
  .page-privacy .button-row,
  .page-contact .wrap > .button-row,
  .page-footer.footer-links {
    justify-content: stretch;
  }

  .page-game canvas {
    border-width: 2px;
    border-radius: 12px;
  }
}
@media (max-width: 768px) {
  .page-footer.button-row,
  .page-footer.footer-links {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 70px;
  }

  .page-footer .button-link,
  .page-footer a {
    width: auto;
    min-width: 0;
    padding: 0;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.3;
    text-align: center;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
    color: rgba(31, 31, 31, 0.68);
    text-decoration: underline;
    text-underline-offset: 2px;
  }

  .page-footer .button-link:hover,
  .page-footer a:hover {
    background: none;
    transform: none;
    color: rgba(31, 31, 31, 0.88);
  }

  .page-footer .button-link:active,
  .page-footer a:active {
    box-shadow: none;
  }
}